diff --git a/Makefile b/Makefile
index aa8bfb296..e0be5cb40 100644
--- a/Makefile
+++ b/Makefile
@@ -71,6 +71,7 @@ deps: ## Update dependencies in vendor folders
cd sdk && make generate && go mod tidy && go mod vendor
cd test/performance && go mod tidy && go mod vendor
go mod tidy && go mod vendor && go mod download && go work sync
+ make generate-swagger
lint: ## Run linter
GOWORK=off go vet ./...
@@ -79,6 +80,7 @@ lint: ## Run linter
format: ## Format code
go fmt ./... && cd sdk && go fmt ./... && cd ../test/performance && go fmt ./...
+ buf format -w ./sdk/proto/
install-tools: ## Install dependencies in tools.go
@grep _ ./scripts/tools.go | awk '{print $$2}' | xargs -tI % go install %
diff --git a/README.md b/README.md
index 62f6d881d..f2ee61179 100644
--- a/README.md
+++ b/README.md
@@ -168,6 +168,8 @@ tls:
skip_verify: true
```
+Documentation for the proto definitions can be found here: https://github.com/nginx/agent/tree/main/docs/proto/README.md
+
### Enabling the REST interface
The NGINX Agent REST interface can be exposed by validating the following lines in the `/etc/nginx-agent/nginx-agent.conf` file are present:
diff --git a/docs/proto/README.md b/docs/proto/README.md
new file mode 100644
index 000000000..a755fc3a2
--- /dev/null
+++ b/docs/proto/README.md
@@ -0,0 +1,6 @@
+# Proto Documentation
+
+## Packages
+* [f5.nginx.agent.sdk](proto.md)
+* [f5.nginx.agent.sdk.common](common.md)
+* [f5.nginx.agent.sdk.events](events.md)
diff --git a/docs/proto/common.md b/docs/proto/common.md
new file mode 100644
index 000000000..cab93e490
--- /dev/null
+++ b/docs/proto/common.md
@@ -0,0 +1,64 @@
+# Protocol Documentation
+
+
+## Table of Contents
+
+- [common.proto](#common-proto)
+ - [Dimension](#f5-nginx-agent-sdk-common-Dimension)
+
+- [Scalar Value Types](#scalar-value-types)
+
+
+
+
+
Top
+
+## common.proto
+Common messages
+
+
+
+
+### Dimension
+Represents a dimension used in events
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Dimension name |
+| value | [string](#string) | | Dimension value |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Scalar Value Types
+
+| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
+| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
+| double | | double | double | float | float64 | double | float | Float |
+| float | | float | float | float | float32 | float | float | Float |
+| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
+| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
+| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
+| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
+| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
+| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
+| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |
+
diff --git a/docs/proto/events.md b/docs/proto/events.md
new file mode 100644
index 000000000..8bd5c9a4d
--- /dev/null
+++ b/docs/proto/events.md
@@ -0,0 +1,231 @@
+# Protocol Documentation
+
+
+## Table of Contents
+
+- [event.proto](#event-proto)
+ - [ActivityEvent](#f5-nginx-agent-sdk-events-ActivityEvent)
+ - [ContextData](#f5-nginx-agent-sdk-events-ContextData)
+ - [Event](#f5-nginx-agent-sdk-events-Event)
+ - [EventReport](#f5-nginx-agent-sdk-events-EventReport)
+ - [Metadata](#f5-nginx-agent-sdk-events-Metadata)
+ - [SecurityViolationEvent](#f5-nginx-agent-sdk-events-SecurityViolationEvent)
+ - [SignatureData](#f5-nginx-agent-sdk-events-SignatureData)
+ - [ViolationData](#f5-nginx-agent-sdk-events-ViolationData)
+
+- [Scalar Value Types](#scalar-value-types)
+
+
+
+
+Top
+
+## event.proto
+Event messages
+
+
+
+
+### ActivityEvent
+Represents an activity event
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| Message | [string](#string) | | Activtiy event message |
+| Dimensions | [f5.nginx.agent.sdk.common.Dimension](#f5-nginx-agent-sdk-common-Dimension) | repeated | Array of dimensions |
+
+
+
+
+
+
+
+
+### ContextData
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| Name | [string](#string) | | |
+| Value | [string](#string) | | |
+
+
+
+
+
+
+
+
+### Event
+Represents an event
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| Metadata | [Metadata](#f5-nginx-agent-sdk-events-Metadata) | | Event metadata |
+| ActivityEvent | [ActivityEvent](#f5-nginx-agent-sdk-events-ActivityEvent) | | Activity event |
+| SecurityViolationEvent | [SecurityViolationEvent](#f5-nginx-agent-sdk-events-SecurityViolationEvent) | | Security violation event |
+
+
+
+
+
+
+
+
+### EventReport
+Represents an event report
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| Events | [Event](#f5-nginx-agent-sdk-events-Event) | repeated | Array of events |
+
+
+
+
+
+
+
+
+### Metadata
+Represents the metadata for an event
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| Module | [string](#string) | | Module is the process that generate the event |
+| UUID | [string](#string) | | UUID is a unique identifier for each event |
+| CorrelationID | [string](#string) | | CorrelationID is an ID used by the producer of the message to track the flow of events |
+| Timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Timestamp defines the time of event generation |
+| EventLevel | [string](#string) | | EventLevel defines the criticality of event |
+| Type | [string](#string) | | Type is used to identify the event type for further processing |
+| Category | [string](#string) | | Category is used for classifying the event type into a higher level entity |
+
+
+
+
+
+
+
+
+### SecurityViolationEvent
+Represents a security violation that is emitted by the agent
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| PolicyName | [string](#string) | | |
+| SupportID | [string](#string) | | |
+| Outcome | [string](#string) | | |
+| OutcomeReason | [string](#string) | | |
+| BlockingExceptionReason | [string](#string) | | |
+| Method | [string](#string) | | |
+| Protocol | [string](#string) | | |
+| XForwardedForHeaderValue | [string](#string) | | |
+| URI | [string](#string) | | |
+| Request | [string](#string) | | |
+| IsTruncated | [string](#string) | | |
+| RequestStatus | [string](#string) | | |
+| ResponseCode | [string](#string) | | |
+| ServerAddr | [string](#string) | | |
+| VSName | [string](#string) | | |
+| RemoteAddr | [string](#string) | | |
+| RemotePort | [string](#string) | | |
+| ServerPort | [string](#string) | | |
+| Violations | [string](#string) | | |
+| SubViolations | [string](#string) | | |
+| ViolationRating | [string](#string) | | |
+| SigSetNames | [string](#string) | | |
+| SigCVEs | [string](#string) | | |
+| ClientClass | [string](#string) | | |
+| ClientApplication | [string](#string) | | |
+| ClientApplicationVersion | [string](#string) | | |
+| Severity | [string](#string) | | |
+| ThreatCampaignNames | [string](#string) | | |
+| BotAnomalies | [string](#string) | | |
+| BotCategory | [string](#string) | | |
+| EnforcedBotAnomalies | [string](#string) | | |
+| BotSignatureName | [string](#string) | | |
+| ViolationContexts | [string](#string) | | |
+| ViolationsData | [ViolationData](#f5-nginx-agent-sdk-events-ViolationData) | repeated | |
+| SystemID | [string](#string) | | |
+| InstanceTags | [string](#string) | | |
+| InstanceGroup | [string](#string) | | |
+| DisplayName | [string](#string) | | |
+| NginxID | [string](#string) | | |
+| ParentHostname | [string](#string) | | |
+
+
+
+
+
+
+
+
+### SignatureData
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| ID | [string](#string) | | |
+| BlockingMask | [string](#string) | | |
+| Buffer | [string](#string) | | |
+| Offset | [string](#string) | | |
+| Length | [string](#string) | | |
+
+
+
+
+
+
+
+
+### ViolationData
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| Name | [string](#string) | | |
+| Context | [string](#string) | | |
+| ContextData | [ContextData](#f5-nginx-agent-sdk-events-ContextData) | | |
+| Signatures | [SignatureData](#f5-nginx-agent-sdk-events-SignatureData) | repeated | |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+## Scalar Value Types
+
+| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
+| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
+| double | | double | double | float | float64 | double | float | Float |
+| float | | float | float | float | float32 | float | float | Float |
+| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
+| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
+| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
+| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
+| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
+| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
+| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |
+
diff --git a/docs/proto/proto.md b/docs/proto/proto.md
new file mode 100644
index 000000000..af6b6978e
--- /dev/null
+++ b/docs/proto/proto.md
@@ -0,0 +1,1509 @@
+# Protocol Documentation
+
+
+## Table of Contents
+
+- [agent.proto](#agent-proto)
+ - [AgentConfig](#f5-nginx-agent-sdk-AgentConfig)
+ - [AgentConfigRequest](#f5-nginx-agent-sdk-AgentConfigRequest)
+ - [AgentConnectRequest](#f5-nginx-agent-sdk-AgentConnectRequest)
+ - [AgentConnectResponse](#f5-nginx-agent-sdk-AgentConnectResponse)
+ - [AgentConnectStatus](#f5-nginx-agent-sdk-AgentConnectStatus)
+ - [AgentDetails](#f5-nginx-agent-sdk-AgentDetails)
+ - [AgentLogging](#f5-nginx-agent-sdk-AgentLogging)
+ - [AgentMeta](#f5-nginx-agent-sdk-AgentMeta)
+
+ - [AgentConnectStatus.StatusCode](#f5-nginx-agent-sdk-AgentConnectStatus-StatusCode)
+ - [AgentLogging.Level](#f5-nginx-agent-sdk-AgentLogging-Level)
+
+- [command.proto](#command-proto)
+ - [AgentActivityStatus](#f5-nginx-agent-sdk-AgentActivityStatus)
+ - [ChunkedResourceChunk](#f5-nginx-agent-sdk-ChunkedResourceChunk)
+ - [ChunkedResourceHeader](#f5-nginx-agent-sdk-ChunkedResourceHeader)
+ - [Command](#f5-nginx-agent-sdk-Command)
+ - [CommandStatusResponse](#f5-nginx-agent-sdk-CommandStatusResponse)
+ - [DataChunk](#f5-nginx-agent-sdk-DataChunk)
+ - [DataplaneSoftwareHealth](#f5-nginx-agent-sdk-DataplaneSoftwareHealth)
+ - [DataplaneStatus](#f5-nginx-agent-sdk-DataplaneStatus)
+ - [DataplaneUpdate](#f5-nginx-agent-sdk-DataplaneUpdate)
+ - [DownloadRequest](#f5-nginx-agent-sdk-DownloadRequest)
+ - [NginxConfigResponse](#f5-nginx-agent-sdk-NginxConfigResponse)
+ - [NginxConfigStatus](#f5-nginx-agent-sdk-NginxConfigStatus)
+ - [UploadStatus](#f5-nginx-agent-sdk-UploadStatus)
+
+ - [Command.CommandType](#f5-nginx-agent-sdk-Command-CommandType)
+ - [CommandStatusResponse.CommandErrorCode](#f5-nginx-agent-sdk-CommandStatusResponse-CommandErrorCode)
+ - [CommandStatusResponse.CommandStatus](#f5-nginx-agent-sdk-CommandStatusResponse-CommandStatus)
+ - [NginxConfigStatus.Status](#f5-nginx-agent-sdk-NginxConfigStatus-Status)
+ - [UploadStatus.TransferStatus](#f5-nginx-agent-sdk-UploadStatus-TransferStatus)
+
+- [command_svc.proto](#command_svc-proto)
+ - [Commander](#f5-nginx-agent-sdk-Commander)
+
+- [common.proto](#common-proto)
+ - [CertificateDates](#f5-nginx-agent-sdk-CertificateDates)
+ - [CertificateName](#f5-nginx-agent-sdk-CertificateName)
+ - [Directory](#f5-nginx-agent-sdk-Directory)
+ - [DirectoryMap](#f5-nginx-agent-sdk-DirectoryMap)
+ - [File](#f5-nginx-agent-sdk-File)
+ - [Metadata](#f5-nginx-agent-sdk-Metadata)
+ - [SslCertificate](#f5-nginx-agent-sdk-SslCertificate)
+ - [SslCertificates](#f5-nginx-agent-sdk-SslCertificates)
+ - [ZippedFile](#f5-nginx-agent-sdk-ZippedFile)
+
+ - [File.Action](#f5-nginx-agent-sdk-File-Action)
+
+- [config.proto](#config-proto)
+ - [ConfigDescriptor](#f5-nginx-agent-sdk-ConfigDescriptor)
+ - [ConfigReport](#f5-nginx-agent-sdk-ConfigReport)
+
+- [dp_software_details.proto](#dp_software_details-proto)
+ - [DataplaneSoftwareDetails](#f5-nginx-agent-sdk-DataplaneSoftwareDetails)
+
+- [host.proto](#host-proto)
+ - [Address](#f5-nginx-agent-sdk-Address)
+ - [CpuInfo](#f5-nginx-agent-sdk-CpuInfo)
+ - [CpuInfo.CacheEntry](#f5-nginx-agent-sdk-CpuInfo-CacheEntry)
+ - [DiskPartition](#f5-nginx-agent-sdk-DiskPartition)
+ - [HostInfo](#f5-nginx-agent-sdk-HostInfo)
+ - [Network](#f5-nginx-agent-sdk-Network)
+ - [NetworkInterface](#f5-nginx-agent-sdk-NetworkInterface)
+ - [ReleaseInfo](#f5-nginx-agent-sdk-ReleaseInfo)
+
+- [metrics.proto](#metrics-proto)
+ - [Dimension](#f5-nginx-agent-sdk-Dimension)
+ - [MetricsReport](#f5-nginx-agent-sdk-MetricsReport)
+ - [SimpleMetric](#f5-nginx-agent-sdk-SimpleMetric)
+ - [StatsEntity](#f5-nginx-agent-sdk-StatsEntity)
+
+ - [MetricsReport.Type](#f5-nginx-agent-sdk-MetricsReport-Type)
+
+- [metrics.svc.proto](#metrics-svc-proto)
+ - [MetricsService](#f5-nginx-agent-sdk-MetricsService)
+
+- [nap.proto](#nap-proto)
+ - [AppProtectWAFDetails](#f5-nginx-agent-sdk-AppProtectWAFDetails)
+ - [AppProtectWAFHealth](#f5-nginx-agent-sdk-AppProtectWAFHealth)
+
+ - [AppProtectWAFHealth.AppProtectWAFStatus](#f5-nginx-agent-sdk-AppProtectWAFHealth-AppProtectWAFStatus)
+
+- [nginx.proto](#nginx-proto)
+ - [AccessLog](#f5-nginx-agent-sdk-AccessLog)
+ - [AccessLogs](#f5-nginx-agent-sdk-AccessLogs)
+ - [ErrorLog](#f5-nginx-agent-sdk-ErrorLog)
+ - [ErrorLogs](#f5-nginx-agent-sdk-ErrorLogs)
+ - [NginxConfig](#f5-nginx-agent-sdk-NginxConfig)
+ - [NginxDetails](#f5-nginx-agent-sdk-NginxDetails)
+ - [NginxHealth](#f5-nginx-agent-sdk-NginxHealth)
+ - [NginxPlusMetaData](#f5-nginx-agent-sdk-NginxPlusMetaData)
+ - [NginxSslMetaData](#f5-nginx-agent-sdk-NginxSslMetaData)
+
+ - [NginxConfigAction](#f5-nginx-agent-sdk-NginxConfigAction)
+ - [NginxHealth.NginxStatus](#f5-nginx-agent-sdk-NginxHealth-NginxStatus)
+ - [NginxSslMetaData.NginxSslType](#f5-nginx-agent-sdk-NginxSslMetaData-NginxSslType)
+
+- [Scalar Value Types](#scalar-value-types)
+
+
+
+
+Top
+
+## agent.proto
+
+
+
+
+
+### AgentConfig
+Represents an agent's configuration. The message is sent from the management server to the agent.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| details | [AgentDetails](#f5-nginx-agent-sdk-AgentDetails) | | Provides information about the agent |
+| loggers | [AgentLogging](#f5-nginx-agent-sdk-AgentLogging) | | Provides information about the agent logging. This is will be implemented in a future release. |
+| configs | [ConfigReport](#f5-nginx-agent-sdk-ConfigReport) | | Provides meta information about the nginx configurations |
+
+
+
+
+
+
+
+
+### AgentConfigRequest
+Represents an agent config request that is sent from the agent to the management server.
+This is used by the agent to request the agent configuration from the management server.
+
+
+
+
+
+
+
+
+### AgentConnectRequest
+Represents an agent connect request that is sent from the agent to the management server
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| meta | [AgentMeta](#f5-nginx-agent-sdk-AgentMeta) | | Provides meta information about the agent |
+| details | [NginxDetails](#f5-nginx-agent-sdk-NginxDetails) | repeated | Provides information about the NGINX instances that are present. This data will be moving to dataplane_software_details in a future release |
+| host | [HostInfo](#f5-nginx-agent-sdk-HostInfo) | | Provides information about the host system |
+| dataplane_software_details | [DataplaneSoftwareDetails](#f5-nginx-agent-sdk-DataplaneSoftwareDetails) | repeated | Provides information about software installed in the system (e.g. App Protect WAF, NGINX, etc.) |
+
+
+
+
+
+
+
+
+### AgentConnectResponse
+Represents an agent connect response that is sent from the management server to the agent
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| agent_config | [AgentConfig](#f5-nginx-agent-sdk-AgentConfig) | | Agent configuration |
+| status | [AgentConnectStatus](#f5-nginx-agent-sdk-AgentConnectStatus) | | Agent connect request status |
+
+
+
+
+
+
+
+
+### AgentConnectStatus
+Represents an agent connect status
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| statusCode | [AgentConnectStatus.StatusCode](#f5-nginx-agent-sdk-AgentConnectStatus-StatusCode) | | Provides a status of the agent connect response |
+| message | [string](#string) | | Provides a user friendly message to describe the response |
+| error | [string](#string) | | Provides an error message of why the agent connect request was rejected |
+
+
+
+
+
+
+
+
+### AgentDetails
+Represents agent details. This message is sent from the management server to the agent.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| features | [string](#string) | repeated | List of agent feature that are enabled |
+| extensions | [string](#string) | repeated | List of agent extensions that are enabled |
+| tags | [string](#string) | repeated | List of tags |
+| alias | [string](#string) | | Alias name for the agent |
+
+
+
+
+
+
+
+
+### AgentLogging
+Represents agent logging details
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| level | [AgentLogging.Level](#f5-nginx-agent-sdk-AgentLogging-Level) | | Log level |
+| dir | [string](#string) | | Directory where the logs are located |
+| file | [string](#string) | | Name of the log file |
+| max_size | [uint32](#uint32) | | Max size of the log file in MB |
+| max_backups | [uint32](#uint32) | | Max number of backups |
+| max_age | [uint32](#uint32) | | Max age of a log file in days |
+| compress | [bool](#bool) | | Is the log file compressed |
+
+
+
+
+
+
+
+
+### AgentMeta
+Represents agent metadata
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| version | [string](#string) | | Version of the agent |
+| display_name | [string](#string) | | User friendly name for the agent |
+| tag | [string](#string) | repeated | List of tags |
+| instance_group | [string](#string) | | Instance group name used to group NGINX instances |
+| updated | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Last time agent was updated |
+| system_uid | [string](#string) | | ID of the system where the agent is installed |
+| agent_details | [AgentDetails](#f5-nginx-agent-sdk-AgentDetails) | | Provides other agent information |
+
+
+
+
+
+
+
+
+
+
+### AgentConnectStatus.StatusCode
+Different status codes for agent connect response
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CONNECT_UNKNOWN | 0 | Unknown status of the agent connect request |
+| CONNECT_OK | 1 | Agent connect request was successful |
+| CONNECT_REJECTED_OTHER | 2 | Agent connect request was rejected |
+| CONNECT_REJECTED_DUP_ID | 3 | Agent connect request was rejected because an agent with the same ID is already registered |
+
+
+
+
+
+### AgentLogging.Level
+Log level enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| INFO | 0 | info level |
+| DEBUG | 1 | debug level |
+| WARN | 2 | warn level |
+| ERROR | 3 | error level |
+| FATAL | 4 | fatal level |
+
+
+
+
+
+
+
+
+
+
+
+Top
+
+## command.proto
+
+
+
+
+
+### AgentActivityStatus
+Represent an agent activity status
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| nginx_config_status | [NginxConfigStatus](#f5-nginx-agent-sdk-NginxConfigStatus) | | NGINX configuration status |
+
+
+
+
+
+
+
+
+### ChunkedResourceChunk
+Represents a chunked resource chunk
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| meta | [Metadata](#f5-nginx-agent-sdk-Metadata) | | Metadata information |
+| chunk_id | [int32](#int32) | | Chunk ID |
+| data | [bytes](#bytes) | | Chunk data |
+
+
+
+
+
+
+
+
+### ChunkedResourceHeader
+Represents a chunked resource Header
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| meta | [Metadata](#f5-nginx-agent-sdk-Metadata) | | Metadata information |
+| chunks | [int32](#int32) | | Number of chunks expected in the transfer |
+| checksum | [string](#string) | | Chunk checksum |
+| chunk_size | [int32](#int32) | | Chunk size |
+
+
+
+
+
+
+
+
+### Command
+Represents a command message, which is used for communication between the management server and the agent.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| meta | [Metadata](#f5-nginx-agent-sdk-Metadata) | | Provides metadata information associated with the command |
+| type | [Command.CommandType](#f5-nginx-agent-sdk-Command-CommandType) | | Used to determine the type of command |
+| cmd_status | [CommandStatusResponse](#f5-nginx-agent-sdk-CommandStatusResponse) | | Common command status response |
+| nginx_config | [NginxConfig](#f5-nginx-agent-sdk-NginxConfig) | | Used by the management server to notify the agent to download or upload NGINX configuration. |
+| nginx_config_response | [NginxConfigResponse](#f5-nginx-agent-sdk-NginxConfigResponse) | | Response sent to indicate if a NGINX config apply was successful or not |
+| agent_connect_request | [AgentConnectRequest](#f5-nginx-agent-sdk-AgentConnectRequest) | | Agent connect request that is sent from the agent to the management server to initialize registration |
+| agent_connect_response | [AgentConnectResponse](#f5-nginx-agent-sdk-AgentConnectResponse) | | Agent connect response that is sent from the management server to the agent to finalize registration |
+| agent_config_request | [AgentConfigRequest](#f5-nginx-agent-sdk-AgentConfigRequest) | | Agent config request that is sent by the agent to the management server to request agent configuration |
+| agent_config | [AgentConfig](#f5-nginx-agent-sdk-AgentConfig) | | Agent Config is sent by the management server to the agent when is receives an AgentConfigRequest from the agent |
+| dataplane_status | [DataplaneStatus](#f5-nginx-agent-sdk-DataplaneStatus) | | Dataplane status is sent by the agent to the management server to report the information like the health of the system |
+| event_report | [events.EventReport](#f5-nginx-agent-sdk-events-EventReport) | | Reports events the agent is aware of like the start/stop of the agent, NGINX config applies, etc. |
+| dataplane_software_details | [DataplaneSoftwareDetails](#f5-nginx-agent-sdk-DataplaneSoftwareDetails) | | Provides details of additional software running on the dataplane |
+| dataplane_update | [DataplaneUpdate](#f5-nginx-agent-sdk-DataplaneUpdate) | | Provides details of any changes on the dataplane |
+
+
+
+
+
+
+
+
+### CommandStatusResponse
+Represents a command status response
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| status | [CommandStatusResponse.CommandStatus](#f5-nginx-agent-sdk-CommandStatusResponse-CommandStatus) | | Command status |
+| error_code | [CommandStatusResponse.CommandErrorCode](#f5-nginx-agent-sdk-CommandStatusResponse-CommandErrorCode) | | Error code |
+| message | [string](#string) | | Provides a user friendly message to describe the response |
+| error | [string](#string) | | Provides an error message of why the command failed |
+
+
+
+
+
+
+
+
+### DataChunk
+Represents a data chunck
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| header | [ChunkedResourceHeader](#f5-nginx-agent-sdk-ChunkedResourceHeader) | | Chunk header |
+| data | [ChunkedResourceChunk](#f5-nginx-agent-sdk-ChunkedResourceChunk) | | Chunk data |
+
+
+
+
+
+
+
+
+### DataplaneSoftwareHealth
+Represents a dataplane software health
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| nginx_health | [NginxHealth](#f5-nginx-agent-sdk-NginxHealth) | | Health of NGINX instance |
+| app_protect_waf_health | [AppProtectWAFHealth](#f5-nginx-agent-sdk-AppProtectWAFHealth) | | Health of App Protect WAF |
+
+
+
+
+
+
+
+
+### DataplaneStatus
+Represents a dataplane status, which is used by the agent to periodically report the status of NGINX, agent activities and other dataplane software activities.
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| system_id | [string](#string) | | System ID |
+| details | [NginxDetails](#f5-nginx-agent-sdk-NginxDetails) | repeated | List of NGINX details. This field will be moving to DataplaneSoftwareDetails in a future release. |
+| host | [HostInfo](#f5-nginx-agent-sdk-HostInfo) | | Host information |
+| healths | [NginxHealth](#f5-nginx-agent-sdk-NginxHealth) | repeated | List of NGINX health information. This field will be moving to DataplaneSoftwareHealth in a future release. |
+| dataplane_software_details | [DataplaneSoftwareDetails](#f5-nginx-agent-sdk-DataplaneSoftwareDetails) | repeated | List of software details. This includes details about NGINX and any other software installed in the system that the agent is interested in. |
+| dataplane_software_healths | [DataplaneSoftwareHealth](#f5-nginx-agent-sdk-DataplaneSoftwareHealth) | repeated | List of software health statues. This includes the health of NGINX and any other software installed in the system that the agent is interested in. |
+| agent_activity_status | [AgentActivityStatus](#f5-nginx-agent-sdk-AgentActivityStatus) | repeated | List of activity statuses. Reports on the status of activities that the agent is currently executing. |
+
+
+
+
+
+
+
+
+### DataplaneUpdate
+Represents a dataplane update
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| host | [HostInfo](#f5-nginx-agent-sdk-HostInfo) | | Host information |
+| dataplane_software_details | [DataplaneSoftwareDetails](#f5-nginx-agent-sdk-DataplaneSoftwareDetails) | repeated | List of software details. This includes details about NGINX and any other software installed in the system that the agent is interested in. |
+
+
+
+
+
+
+
+
+### DownloadRequest
+Represents a download request
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| meta | [Metadata](#f5-nginx-agent-sdk-Metadata) | | Metadata information |
+
+
+
+
+
+
+
+
+### NginxConfigResponse
+Represents a NGINX config response
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| status | [CommandStatusResponse](#f5-nginx-agent-sdk-CommandStatusResponse) | | Command status |
+| action | [NginxConfigAction](#f5-nginx-agent-sdk-NginxConfigAction) | | NGINX config action |
+| config_data | [ConfigDescriptor](#f5-nginx-agent-sdk-ConfigDescriptor) | | NGINX config description |
+
+
+
+
+
+
+
+
+### NginxConfigStatus
+Represents a NGINX configuration status
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| correlation_id | [string](#string) | | CorrelationID is an ID used by the producer of the message to track the flow of events |
+| status | [NginxConfigStatus.Status](#f5-nginx-agent-sdk-NginxConfigStatus-Status) | | Provides a status for the NGINX configuration |
+| message | [string](#string) | | Provides a user friendly message to describe the current state of the NGINX configuration. |
+| nginx_id | [string](#string) | | NGINX ID |
+
+
+
+
+
+
+
+
+### UploadStatus
+Represents an upload status
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| meta | [Metadata](#f5-nginx-agent-sdk-Metadata) | | Metadata information |
+| status | [UploadStatus.TransferStatus](#f5-nginx-agent-sdk-UploadStatus-TransferStatus) | | Transfer status |
+| reason | [string](#string) | | Provides an error message of why the upload failed |
+
+
+
+
+
+
+
+
+
+
+### Command.CommandType
+Command type enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| NORMAL | 0 | All commands default to normal |
+| DOWNLOAD | 1 | The download type is used when sending NginxConfig from the management server to the agent. It is used to instruct the agent to download the NGINX config from the management server. |
+| UPLOAD | 2 | The upload type is used when sending NginxConfig from the agent to the management server. It is used to instruct the agent to upload the NGINX config from the agent. This will be implemented in a future release. |
+
+
+
+
+
+### CommandStatusResponse.CommandErrorCode
+Command error code enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| ERR_OK | 0 | No Error (This is the default value) |
+| ERR_UNKNOWN | 1 | Unknown error |
+
+
+
+
+
+### CommandStatusResponse.CommandStatus
+Command status enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| CMD_UNKNOWN | 0 | Unknown status of command |
+| CMD_OK | 1 | Command was successful |
+| CMD_ERROR | 2 | Command failed |
+
+
+
+
+
+### NginxConfigStatus.Status
+NGINX configuration status enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| PENDING | 0 | The configuration is still in the process of being applied. |
+| OK | 1 | The configuration has being successfully applied. |
+| ERROR | 2 | The configuration has failed to be applied |
+
+
+
+
+
+### UploadStatus.TransferStatus
+Transfer status enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| UNKNOWN | 0 | Unknown status |
+| OK | 1 | Upload was successful |
+| FAILED | 2 | Upload failed |
+
+
+
+
+
+
+
+
+
+
+
+Top
+
+## command_svc.proto
+
+
+
+
+
+
+
+
+
+
+
+### Commander
+Represents a service used to sent command messages between the management server and the agent.
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| CommandChannel | [Command](#f5-nginx-agent-sdk-Command) stream | [Command](#f5-nginx-agent-sdk-Command) stream | A Bidirectional streaming RPC established by the agent and is kept open |
+| Download | [DownloadRequest](#f5-nginx-agent-sdk-DownloadRequest) | [DataChunk](#f5-nginx-agent-sdk-DataChunk) stream | A streaming RPC established by the agent and is used to download resources associated with commands The download stream will be kept open for the duration of the data transfer and will be closed when its done. The transfer is a stream of chunks as follows: header -> data chunk 1 -> data chunk N. Each data chunk is of a size smaller than the maximum gRPC payload |
+| Upload | [DataChunk](#f5-nginx-agent-sdk-DataChunk) stream | [UploadStatus](#f5-nginx-agent-sdk-UploadStatus) | A streaming RPC established by the agent and is used to upload resources associated with commands |
+
+
+
+
+
+
+Top
+
+## common.proto
+
+
+
+
+
+### CertificateDates
+Represents the dates for which a certificate is valid
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| not_before | [int64](#int64) | | The start date that for when the certificate is valid |
+| not_after | [int64](#int64) | | The end date that for when the certificate is valid |
+
+
+
+
+
+
+
+
+### CertificateName
+Represents a Distinguished Name (DN)
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| common_name | [string](#string) | | The fully qualified domain name (e.g. www.example.com) |
+| country | [string](#string) | repeated | Country |
+| state | [string](#string) | repeated | State |
+| locality | [string](#string) | repeated | Locality |
+| organization | [string](#string) | repeated | Organization |
+| organizational_unit | [string](#string) | repeated | Organizational Unit |
+
+
+
+
+
+
+
+
+### Directory
+Represents a directory
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Name of the directory |
+| mtime | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the directory was last modified |
+| permissions | [string](#string) | | Directory permissions (e.g. 0644) |
+| size | [int64](#int64) | | Size of the directory in bytes |
+| files | [File](#f5-nginx-agent-sdk-File) | repeated | List of files in the directory |
+
+
+
+
+
+
+
+
+### DirectoryMap
+Represents a map of directories & files on the system
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| directories | [Directory](#f5-nginx-agent-sdk-Directory) | repeated | List of directories |
+
+
+
+
+
+
+
+
+### File
+Represents a file
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Name of the file |
+| lines | [int32](#int32) | | Number of lines in the file |
+| mtime | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the file was last modified |
+| permissions | [string](#string) | | File permissions (e.g. 0644) |
+| size | [int64](#int64) | | Size of the file in bytes |
+| contents | [bytes](#bytes) | | The contents of the file in bytes |
+| action | [File.Action](#f5-nginx-agent-sdk-File-Action) | | Action to take on the file (e.g. update, delete, etc) |
+
+
+
+
+
+
+
+
+### Metadata
+Represents the metadata for a message
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | timestamp defines the time of message creation |
+| client_id | [string](#string) | | Client ID |
+| message_id | [string](#string) | | Message ID |
+| cloud_account_id | [string](#string) | | Cloud Account ID (e.g. AWS/Azure/GCP account ID) |
+
+
+
+
+
+
+
+
+### SslCertificate
+Represents a SSL certificate file
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| file_name | [string](#string) | | Name of the file |
+| size | [int64](#int64) | | Size of the file in bytes |
+| mtime | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | When the file was last modified |
+| validity | [CertificateDates](#f5-nginx-agent-sdk-CertificateDates) | | A time when the certificate is valid |
+| issuer | [CertificateName](#f5-nginx-agent-sdk-CertificateName) | | This field contains the distinguished name (DN) of the certificate issuer |
+| subject | [CertificateName](#f5-nginx-agent-sdk-CertificateName) | | This dedicated object name associated with the public key, for which the certificate is issued |
+| subj_alt_names | [string](#string) | repeated | Subject alternative names that allows users to specify additional host names for the SSL certificate |
+| ocsp_url | [string](#string) | repeated | Online Certificate Status Protocol URL |
+| public_key_algorithm | [string](#string) | | Public key encryption algorithm (e.g. RSA) |
+| signature_algorithm | [string](#string) | | The signature algorithm contain a hashing algorithm and an encryption algorithm (e.g. sha256RSA where sha256 is the hashing algorithm and RSA is the encryption algorithm) |
+| serial_number | [string](#string) | | Used to uniquely identify the certificate within a CA's systems |
+| subject_key_identifier | [string](#string) | | The subject key identifier extension provides a means of identifying certificates that contain a particular public key |
+| fingerprint | [string](#string) | | SSL certificate fingerprint |
+| fingerprint_algorithm | [string](#string) | | SSL certificate fingerprint algorithm |
+| version | [int64](#int64) | | There are three versions of certificates: 1, 2 and 3, numbered as 0, 1 and 2. Version 1 supports only the basic fields; Version 2 adds unique identifiers, which represent two additional fields; Version 3 adds extensions. |
+| authority_key_identifier | [string](#string) | | The authority key identifier extension provides a means of identifying the Public Key corresponding to the Private Key used to sign a certificate |
+
+
+
+
+
+
+
+
+### SslCertificates
+Represents a list of SSL certificates files
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| ssl_certs | [SslCertificate](#f5-nginx-agent-sdk-SslCertificate) | repeated | List of SSL certificates |
+
+
+
+
+
+
+
+
+### ZippedFile
+Represents a zipped file
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| contents | [bytes](#bytes) | | The contents of the file in bytes |
+| checksum | [string](#string) | | File checksum |
+| root_directory | [string](#string) | | The directory where the file is located |
+
+
+
+
+
+
+
+
+
+
+### File.Action
+Action enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| unset | 0 | Default value |
+| unchanged | 1 | No changes to the file |
+| add | 2 | New file |
+| update | 3 | Updated file |
+| delete | 4 | File deleted |
+
+
+
+
+
+
+
+
+
+
+
+Top
+
+## config.proto
+
+
+
+
+
+### ConfigDescriptor
+Represents a config descriptor
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| system_id | [string](#string) | | System ID |
+| nginx_id | [string](#string) | | NGINX ID |
+| checksum | [string](#string) | | Config file checksum |
+
+
+
+
+
+
+
+
+### ConfigReport
+Represents a config report
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| meta | [Metadata](#f5-nginx-agent-sdk-Metadata) | | Provides metadata information associated with the message |
+| configs | [ConfigDescriptor](#f5-nginx-agent-sdk-ConfigDescriptor) | repeated | List of NGINX config descriptors |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Top
+
+## dp_software_details.proto
+
+
+
+
+
+### DataplaneSoftwareDetails
+Represents dataplane software details which contains details for additional software running on the dataplane that pertains to NGINX Agent
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| app_protect_waf_details | [AppProtectWAFDetails](#f5-nginx-agent-sdk-AppProtectWAFDetails) | | App Protect WAF software details |
+| nginx_details | [NginxDetails](#f5-nginx-agent-sdk-NginxDetails) | | NGINX software details |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Top
+
+## host.proto
+
+
+
+
+
+### Address
+Represents an IP address
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| prefixlen | [int64](#int64) | | Prefix length |
+| netmask | [string](#string) | | Netmask |
+| address | [string](#string) | | IP Address |
+
+
+
+
+
+
+
+
+### CpuInfo
+Represents CPU information
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| model | [string](#string) | | Model of CPU |
+| cores | [int32](#int32) | | Number of cores |
+| architecture | [string](#string) | | CPU architecture |
+| mhz | [double](#double) | | CPU clock speed in MHz |
+| hypervisor | [string](#string) | | Hypervisor (e.g. VMWare, KVM, etc.) |
+| cpus | [int32](#int32) | | Total number of CPUs |
+| virtualization | [string](#string) | | Type of hypervisor (e.g guest or host) |
+| cache | [CpuInfo.CacheEntry](#f5-nginx-agent-sdk-CpuInfo-CacheEntry) | repeated | Map of caches with names as the keys and size in bytes as the values |
+
+
+
+
+
+
+
+
+### CpuInfo.CacheEntry
+
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| key | [string](#string) | | |
+| value | [string](#string) | | |
+
+
+
+
+
+
+
+
+### DiskPartition
+Represents a disk partition
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| mount_point | [string](#string) | | Mount point location |
+| device | [string](#string) | | Device file path |
+| fs_type | [string](#string) | | File system type (e.g. hfs, swap, etc) |
+
+
+
+
+
+
+
+
+### HostInfo
+Represents the host system information
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| agent | [string](#string) | | NGINX Agent version |
+| boot | [uint64](#uint64) | | Host boot time |
+| hostname | [string](#string) | | Hostname |
+| display_name | [string](#string) | | Display Name |
+| os_type | [string](#string) | | OS type (e.g. freebsd, linux, etc) |
+| uuid | [string](#string) | | Host UUID |
+| uname | [string](#string) | | The native cpu architecture queried at runtime, as returned by `uname -m` or empty string in case of error |
+| partitons | [DiskPartition](#f5-nginx-agent-sdk-DiskPartition) | repeated | List of disk partitions |
+| network | [Network](#f5-nginx-agent-sdk-Network) | | Network information |
+| processor | [CpuInfo](#f5-nginx-agent-sdk-CpuInfo) | repeated | List of CPU processor information |
+| release | [ReleaseInfo](#f5-nginx-agent-sdk-ReleaseInfo) | | Release Information |
+| tags | [string](#string) | repeated | List of tags |
+| agent_accessible_dirs | [string](#string) | | List of directories that the NGINX Agent is allowed to access on the host |
+
+
+
+
+
+
+
+
+### Network
+Represents a network
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| interfaces | [NetworkInterface](#f5-nginx-agent-sdk-NetworkInterface) | repeated | List of network interfaces |
+| default | [string](#string) | | Default network name |
+
+
+
+
+
+
+
+
+### NetworkInterface
+Represents a network interface
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| mac | [string](#string) | | MAC address |
+| ipv6 | [Address](#f5-nginx-agent-sdk-Address) | repeated | List of IPV6 addresses |
+| ipv4 | [Address](#f5-nginx-agent-sdk-Address) | repeated | List of IPV4 addresses |
+| name | [string](#string) | | Name of network interface |
+
+
+
+
+
+
+
+
+### ReleaseInfo
+Represents release information
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| codename | [string](#string) | | OS type (e.g. freebsd, linux, etc) |
+| id | [string](#string) | | OS name (e.g. ubuntu, linuxmint, etc) |
+| name | [string](#string) | | OS family (e.g. debian, rhel) |
+| version_id | [string](#string) | | Version of the OS kernel |
+| version | [string](#string) | | Version of the OS |
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+Top
+
+## metrics.proto
+
+
+
+
+
+### Dimension
+Represents a dimension which is a dimensional attribute used when classifying and categorizing data
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Dimension name |
+| value | [string](#string) | | Dimension value |
+
+
+
+
+
+
+
+
+### MetricsReport
+Represents a metric report
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| meta | [Metadata](#f5-nginx-agent-sdk-Metadata) | | Provides meta information about the metrics |
+| type | [MetricsReport.Type](#f5-nginx-agent-sdk-MetricsReport-Type) | | Type of metrics |
+| data | [StatsEntity](#f5-nginx-agent-sdk-StatsEntity) | repeated | List of stats entities |
+
+
+
+
+
+
+
+
+### SimpleMetric
+Represents a simple metric
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Metric name |
+| value | [double](#double) | | Metric value |
+
+
+
+
+
+
+
+
+### StatsEntity
+Represents a stats entity which is a timestamped entry for dimensions and metrics
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| timestamp | [google.protobuf.Timestamp](#google-protobuf-Timestamp) | | Timestamp defines the time of stats entity creation |
+| dimensions | [Dimension](#f5-nginx-agent-sdk-Dimension) | repeated | List of dimensions |
+| simplemetrics | [SimpleMetric](#f5-nginx-agent-sdk-SimpleMetric) | repeated | List of metrics |
+
+
+
+
+
+
+
+
+
+
+### MetricsReport.Type
+Metric type enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| SYSTEM | 0 | System metric type |
+| INSTANCE | 1 | NGINX instance metric type |
+| AGENT | 2 | Agent metric type |
+
+
+
+
+
+
+
+
+
+
+
+Top
+
+## metrics.svc.proto
+
+
+
+
+
+
+
+
+
+
+
+### MetricsService
+Represents a metrics service which is responsible for ingesting high volume metrics and events
+
+| Method Name | Request Type | Response Type | Description |
+| ----------- | ------------ | ------------- | ------------|
+| Stream | [MetricsReport](#f5-nginx-agent-sdk-MetricsReport) stream | [.google.protobuf.Empty](#google-protobuf-Empty) | A client-to-server streaming RPC to deliver high volume metrics reports. |
+| StreamEvents | [events.EventReport](#f5-nginx-agent-sdk-events-EventReport) stream | [.google.protobuf.Empty](#google-protobuf-Empty) | A client-to-server streaming RPC to deliver high volume event reports. |
+
+
+
+
+
+
+Top
+
+## nap.proto
+
+
+
+
+
+### AppProtectWAFDetails
+Represents App Protect WAF details
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| waf_version | [string](#string) | | WAF version |
+| attack_signatures_version | [string](#string) | | Attack signatures version (This is being deprecated and will be removed in a future release) |
+| threat_campaigns_version | [string](#string) | | Threat signatures version (This is being deprecated and will be removed in a future release) |
+| health | [AppProtectWAFHealth](#f5-nginx-agent-sdk-AppProtectWAFHealth) | | App Protect Health details (This is being deprecated and will be removed in a future release) |
+
+
+
+
+
+
+
+
+### AppProtectWAFHealth
+Represents the health of App Protect WAF
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| system_id | [string](#string) | | System ID |
+| app_protect_waf_status | [AppProtectWAFHealth.AppProtectWAFStatus](#f5-nginx-agent-sdk-AppProtectWAFHealth-AppProtectWAFStatus) | | App Protect WAF status |
+| degraded_reason | [string](#string) | | Provides an error message of why App Protect WAF is degraded |
+
+
+
+
+
+
+
+
+
+
+### AppProtectWAFHealth.AppProtectWAFStatus
+Status enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| UNKNOWN | 0 | Unknown status |
+| ACTIVE | 1 | Active status |
+| DEGRADED | 2 | Degraded status |
+
+
+
+
+
+
+
+
+
+
+
+Top
+
+## nginx.proto
+
+
+
+
+
+### AccessLog
+Represents an access log file
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Name of file |
+| format | [string](#string) | | Format of the file |
+| permissions | [string](#string) | | File Permissions |
+| readable | [bool](#bool) | | Determines if the file is readable or not |
+
+
+
+
+
+
+
+
+### AccessLogs
+Represents access log files
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| access_log | [AccessLog](#f5-nginx-agent-sdk-AccessLog) | repeated | List of access log files |
+
+
+
+
+
+
+
+
+### ErrorLog
+Represents an error log file
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| name | [string](#string) | | Name of file |
+| log_level | [string](#string) | | Log level |
+| permissions | [string](#string) | | File Permissions |
+| readable | [bool](#bool) | | Determines if the file is readable or not |
+
+
+
+
+
+
+
+
+### ErrorLogs
+Represents error log files
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| error_log | [ErrorLog](#f5-nginx-agent-sdk-ErrorLog) | repeated | List of error log files |
+
+
+
+
+
+
+
+
+### NginxConfig
+Represents a NGINX config
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| action | [NginxConfigAction](#f5-nginx-agent-sdk-NginxConfigAction) | | NGINX config action |
+| config_data | [ConfigDescriptor](#f5-nginx-agent-sdk-ConfigDescriptor) | | Metadata information about the configuration |
+| zconfig | [ZippedFile](#f5-nginx-agent-sdk-ZippedFile) | | Zipped file of all NGINX config files |
+| zaux | [ZippedFile](#f5-nginx-agent-sdk-ZippedFile) | | Zipped file of all auxiliary files |
+| access_logs | [AccessLogs](#f5-nginx-agent-sdk-AccessLogs) | | Information about all access log files |
+| error_logs | [ErrorLogs](#f5-nginx-agent-sdk-ErrorLogs) | | Information about all error log files |
+| ssl | [SslCertificates](#f5-nginx-agent-sdk-SslCertificates) | | Information about all SSL certificates files |
+| directory_map | [DirectoryMap](#f5-nginx-agent-sdk-DirectoryMap) | | Directory map of all config and aux files |
+
+
+
+
+
+
+
+
+### NginxDetails
+Represents NGINX details about a single NGINX instance
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| nginx_id | [string](#string) | | NGINX ID. Example: b636d4376dea15405589692d3c5d3869ff3a9b26b0e7bb4bb1aa7e658ace1437 |
+| version | [string](#string) | | NGINX version. Example: 1.23.2 |
+| conf_path | [string](#string) | | Path to NGINX configuration. Example: /usr/local/nginx/conf/nginx.conf |
+| process_id | [string](#string) | | Process ID of NGINX instance. Example: 8 |
+| process_path | [string](#string) | | The path to the NGINX executable. Example: /usr/local/nginx/sbin/nginx |
+| start_time | [int64](#int64) | | The start time of the NGINX instance. Example: 1670429190000 |
+| built_from_source | [bool](#bool) | | Determines if the NGINX instance was built from the source code in github or not. Example: false |
+| loadable_modules | [string](#string) | repeated | List of NGINX loadable modules. Example: [] |
+| runtime_modules | [string](#string) | repeated | List of NGINX runtime modules. Example: [ "http_stub_status_module" ] |
+| plus | [NginxPlusMetaData](#f5-nginx-agent-sdk-NginxPlusMetaData) | | NGINX Plus metadata. |
+| ssl | [NginxSslMetaData](#f5-nginx-agent-sdk-NginxSslMetaData) | | NGINX SSL metadata. |
+| status_url | [string](#string) | | Status URL. Example: http://localhost:8080/api |
+| configure_args | [string](#string) | repeated | Command line arguments that were used when the NGINX instance was started. Example: [ "", "with-http_stub_status_module" ] |
+
+
+
+
+
+
+
+
+### NginxHealth
+Represents the health of a NGINX instance
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| nginx_id | [string](#string) | | NGINX ID |
+| nginx_status | [NginxHealth.NginxStatus](#f5-nginx-agent-sdk-NginxHealth-NginxStatus) | | NGINX status |
+| degraded_reason | [string](#string) | | Provides an error message of why a NGINX instance is degraded |
+
+
+
+
+
+
+
+
+### NginxPlusMetaData
+Represents NGINX Plus metadata
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| enabled | [bool](#bool) | | Determines if its a plus instance or not. Example: true |
+| release | [string](#string) | | NGINX Plus version. Example: R27 |
+
+
+
+
+
+
+
+
+### NginxSslMetaData
+Represents NGINX SSL metadata
+
+
+| Field | Type | Label | Description |
+| ----- | ---- | ----- | ----------- |
+| ssl_type | [NginxSslMetaData.NginxSslType](#f5-nginx-agent-sdk-NginxSslMetaData-NginxSslType) | | SSL Type. Example: 0 |
+| details | [string](#string) | repeated | List of SSL information (e.g. version, type, etc). Example: null |
+
+
+
+
+
+
+
+
+
+
+### NginxConfigAction
+NGINX config action enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| UNKNOWN | 0 | Unknown action |
+| APPLY | 1 | Apply config action |
+| TEST | 2 | Test config action (This will be implemented in a future release) |
+| ROLLBACK | 3 | Rollback config action (This will be implemented in a future release) |
+| RETURN | 4 | Return config action (This will be implemented in a future release) |
+| FORCE | 5 | Force config apply action |
+
+
+
+
+
+### NginxHealth.NginxStatus
+NGINX status enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| UNKNOWN | 0 | Unknown status |
+| ACTIVE | 1 | Active status |
+| DEGRADED | 2 | Degraded status |
+
+
+
+
+
+### NginxSslMetaData.NginxSslType
+SSL type enum
+
+| Name | Number | Description |
+| ---- | ------ | ----------- |
+| BUILT | 0 | SSL complied with NGINX |
+| RUN | 1 | SSL not complied with NGINX |
+
+
+
+
+
+
+
+
+
+
+## Scalar Value Types
+
+| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
+| ----------- | ----- | --- | ---- | ------ | -- | -- | --- | ---- |
+| double | | double | double | float | float64 | double | float | Float |
+| float | | float | float | float | float32 | float | float | Float |
+| int32 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| int64 | Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| uint32 | Uses variable-length encoding. | uint32 | int | int/long | uint32 | uint | integer | Bignum or Fixnum (as required) |
+| uint64 | Uses variable-length encoding. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum or Fixnum (as required) |
+| sint32 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| sint64 | Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| fixed32 | Always four bytes. More efficient than uint32 if values are often greater than 2^28. | uint32 | int | int | uint32 | uint | integer | Bignum or Fixnum (as required) |
+| fixed64 | Always eight bytes. More efficient than uint64 if values are often greater than 2^56. | uint64 | long | int/long | uint64 | ulong | integer/string | Bignum |
+| sfixed32 | Always four bytes. | int32 | int | int | int32 | int | integer | Bignum or Fixnum (as required) |
+| sfixed64 | Always eight bytes. | int64 | long | int/long | int64 | long | integer/string | Bignum |
+| bool | | bool | boolean | boolean | bool | bool | boolean | TrueClass/FalseClass |
+| string | A string must always contain UTF-8 encoded or 7-bit ASCII text. | string | String | str/unicode | string | string | string | String (UTF-8) |
+| bytes | May contain any arbitrary sequence of bytes. | string | ByteString | str | []byte | ByteString | string | String (ASCII-8BIT) |
+
diff --git a/docs/swagger.json b/docs/swagger.json
index 5704ee04b..b8dab3c80 100644
--- a/docs/swagger.json
+++ b/docs/swagger.json
@@ -199,19 +199,19 @@
"type": "object",
"properties": {
"built_from_source": {
- "description": "Was NGINX built from source",
+ "description": "Determines if the NGINX instance was built from the source code in github or not.",
"type": "boolean",
"x-go-name": "BuiltFromSource",
"example": false
},
"conf_path": {
- "description": "Path to configuration file",
+ "description": "Path to NGINX configuration.",
"type": "string",
"x-go-name": "ConfPath",
"example": "/usr/local/nginx/conf/nginx.conf"
},
"configure_args": {
- "description": "Configuration arguments",
+ "description": "Command line arguments that were used when the NGINX instance was started.",
"type": "array",
"items": {
"type": "string"
@@ -223,7 +223,7 @@
]
},
"loadable_modules": {
- "description": "List of loadable modules",
+ "description": "List of NGINX loadable modules.",
"type": "array",
"items": {
"type": "string"
@@ -232,7 +232,7 @@
"example": []
},
"nginx_id": {
- "description": "NGINX ID",
+ "description": "NGINX ID.",
"type": "string",
"x-go-name": "NginxId",
"example": "b636d4376dea15405589692d3c5d3869ff3a9b26b0e7bb4bb1aa7e658ace1437"
@@ -241,19 +241,19 @@
"$ref": "#/definitions/NginxPlusMetaData"
},
"process_id": {
- "description": "Process ID",
+ "description": "Process ID of NGINX instance.",
"type": "string",
"x-go-name": "ProcessId",
"example": "8"
},
"process_path": {
- "description": "Process Path",
+ "description": "The path to the NGINX executable.",
"type": "string",
"x-go-name": "ProcessPath",
"example": "/usr/local/nginx/sbin/nginx"
},
"runtime_modules": {
- "description": "List of runtime modules",
+ "description": "List of NGINX runtime modules.",
"type": "array",
"items": {
"type": "string"
@@ -267,20 +267,20 @@
"$ref": "#/definitions/NginxSslMetaData"
},
"start_time": {
- "description": "Start Time",
+ "description": "The start time of the NGINX instance.",
"type": "integer",
"format": "int64",
"x-go-name": "StartTime",
"example": 1670429190000
},
"status_url": {
- "description": "Status URL",
+ "description": "Status URL.",
"type": "string",
"x-go-name": "StatusUrl",
"example": "http://localhost:8080/api"
},
"version": {
- "description": "Version of NGINX",
+ "description": "NGINX version.",
"type": "string",
"x-go-name": "Version",
"example": "1.23.2"
@@ -316,13 +316,13 @@
"type": "object",
"properties": {
"enabled": {
- "description": "Is NGINX instance a plus instance",
+ "description": "Determines if its a plus instance or not.",
"type": "boolean",
"x-go-name": "Enabled",
"example": true
},
"release": {
- "description": "NGINX plus release",
+ "description": "NGINX Plus version.",
"type": "string",
"x-go-name": "Release",
"example": "R27"
@@ -334,7 +334,7 @@
"type": "object",
"properties": {
"details": {
- "description": "SSL details",
+ "description": "List of SSL information (e.g. version, type, etc).",
"type": "array",
"items": {
"type": "string"
diff --git a/go.mod b/go.mod
index 0d0fcaab9..9b4c85a14 100644
--- a/go.mod
+++ b/go.mod
@@ -9,7 +9,7 @@ require (
github.com/gogo/protobuf v1.3.2
github.com/golang/mock v1.6.0
github.com/golang/protobuf v1.5.2
- github.com/google/go-cmp v0.5.8
+ github.com/google/go-cmp v0.5.9
github.com/google/uuid v1.3.0
github.com/klauspost/cpuid/v2 v2.1.0
github.com/maxbrunsfeld/counterfeiter/v6 v6.5.0
@@ -22,22 +22,23 @@ require (
github.com/shirou/gopsutil v3.21.11+incompatible
github.com/shirou/gopsutil/v3 v3.22.7
github.com/sirupsen/logrus v1.9.0
- github.com/spf13/cobra v1.5.0
+ github.com/spf13/cobra v1.6.1
github.com/spf13/pflag v1.0.5
github.com/spf13/viper v1.12.0
- github.com/stretchr/testify v1.8.0
+ github.com/stretchr/testify v1.8.1
github.com/trivago/grok v1.0.0
github.com/vardius/message-bus v1.1.5
- go.uber.org/atomic v1.9.0
- golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
- google.golang.org/grpc v1.48.0
+ go.uber.org/atomic v1.10.0
+ golang.org/x/sync v0.1.0
+ google.golang.org/grpc v1.51.0
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0
- google.golang.org/protobuf v1.28.1
+ google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect
gopkg.in/mcuadros/go-syslog.v2 v2.3.0
gopkg.in/yaml.v3 v3.0.1
)
require (
+ github.com/bufbuild/buf v1.11.0
github.com/go-resty/resty/v2 v2.7.0
github.com/nginx/agent/sdk/v2 v2.0.0-00010101000000-000000000000
github.com/prometheus/client_golang v1.13.0
@@ -46,40 +47,78 @@ require (
)
require (
+ github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 // indirect
+ github.com/Microsoft/go-winio v0.6.0 // indirect
github.com/beorn7/perks v1.0.1 // indirect
+ github.com/bufbuild/connect-go v1.4.0 // indirect
+ github.com/bufbuild/protocompile v0.1.0 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
+ github.com/cpuguy83/go-md2man/v2 v2.0.2 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
+ github.com/docker/cli v20.10.21+incompatible // indirect
+ github.com/docker/distribution v2.8.1+incompatible // indirect
+ github.com/docker/docker v20.10.21+incompatible // indirect
+ github.com/docker/docker-credential-helpers v0.7.0 // indirect
+ github.com/docker/go-connections v0.4.0 // indirect
+ github.com/docker/go-units v0.5.0 // indirect
+ github.com/felixge/fgprof v0.9.3 // indirect
+ github.com/go-chi/chi/v5 v5.0.8 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
+ github.com/gofrs/flock v0.8.1 // indirect
+ github.com/gofrs/uuid v4.3.1+incompatible // indirect
+ github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
+ github.com/google/go-containerregistry v0.12.1 // indirect
+ github.com/google/pprof v0.0.0-20221203041831-ce31453925ec // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
- github.com/inconshreveable/mousetrap v1.0.1 // indirect
+ github.com/inconshreveable/mousetrap v1.1.0 // indirect
+ github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 // indirect
+ github.com/klauspost/compress v1.15.13 // indirect
+ github.com/klauspost/pgzip v1.2.5 // indirect
github.com/lufia/plan9stats v0.0.0-20220517141722-cf486979b281 // indirect
github.com/magiconair/properties v1.8.6 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
+ github.com/mitchellh/go-homedir v1.1.0 // indirect
+ github.com/moby/term v0.0.0-20221205130635-1aeaba878587 // indirect
+ github.com/morikuni/aec v1.0.0 // indirect
github.com/nginxinc/nginx-go-crossplane v0.4.1 // indirect
+ github.com/opencontainers/go-digest v1.0.0 // indirect
+ github.com/opencontainers/image-spec v1.1.0-rc2 // indirect
github.com/pascaldekloe/name v1.0.1 // indirect
github.com/pelletier/go-toml v1.9.5 // indirect
github.com/pelletier/go-toml/v2 v2.0.2 // indirect
+ github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 // indirect
+ github.com/pkg/errors v0.9.1 // indirect
+ github.com/pkg/profile v1.7.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/power-devops/perfstat v0.0.0-20220216144756-c35f1ee13d7c // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
+ github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
- github.com/stretchr/objx v0.4.0 // indirect
+ github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.5.0 // indirect
github.com/trivago/tgo v1.0.7 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
- golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
- golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 // indirect
- golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 // indirect
- golang.org/x/text v0.4.0 // indirect
- golang.org/x/tools v0.1.12 // indirect
- google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 // indirect
+ go.opencensus.io v0.24.0 // indirect
+ go.opentelemetry.io/otel v1.11.2 // indirect
+ go.opentelemetry.io/otel/metric v0.34.0 // indirect
+ go.opentelemetry.io/otel/trace v1.11.2 // indirect
+ go.uber.org/multierr v1.9.0 // indirect
+ go.uber.org/zap v1.24.0 // indirect
+ golang.org/x/mod v0.7.0 // indirect
+ golang.org/x/net v0.4.0 // indirect
+ golang.org/x/sys v0.3.0 // indirect
+ golang.org/x/term v0.3.0 // indirect
+ golang.org/x/text v0.5.0 // indirect
+ golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
+ golang.org/x/tools v0.4.0 // indirect
+ google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
)
diff --git a/go.sum b/go.sum
index 2160266b4..53c87733c 100644
--- a/go.sum
+++ b/go.sum
@@ -36,8 +36,12 @@ cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RX
cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0=
cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
+github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8=
+github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1/go.mod h1:xomTg63KZ2rFqZQzSB4Vz2SUXa1BpHTVz9L5PTmPC4E=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
+github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg=
+github.com/Microsoft/go-winio v0.6.0/go.mod h1:cTAf44im0RAYeL23bpB+fzCyDH2MJiz2BO69KH/soAE=
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc=
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
@@ -45,11 +49,17 @@ github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRF
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfAMY=
github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo=
-github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/benbjohnson/clock v1.3.0 h1:ip6w0uFQkncKQ979AypyG0ER7mqUSBdKLOgAle/AT8A=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw=
+github.com/bufbuild/buf v1.11.0 h1:jq/ckkxg87GaEgyHMqGGvZkVh8FeZuYLBF9DyOQK1RU=
+github.com/bufbuild/buf v1.11.0/go.mod h1:IoaGkUhois4gv4EqTGT7H+4bbhZUvlYutECLgfoE2cA=
+github.com/bufbuild/connect-go v1.4.0 h1:N94D0tGxuM2cSI7hM/aL8mtxL6+8rtHuFcIj9oGRp5s=
+github.com/bufbuild/connect-go v1.4.0/go.mod h1:9iNvh/NOsfhNBUH5CtvXeVUskQO1xsrEviH7ZArwZ3I=
+github.com/bufbuild/protocompile v0.1.0 h1:HjgJBI85hY/qmW5tw/66sNDZ7z0UDdVSi/5r40WHw4s=
+github.com/bufbuild/protocompile v0.1.0/go.mod h1:ix/MMMdsT3fzxfw91dvbfzKW3fRRnuPCP47kpAm5m/4=
github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4=
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
@@ -63,27 +73,40 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
-github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/containerd/stargz-snapshotter/estargz v0.12.1 h1:+7nYmHJb0tEkcRaAW+MHqoKaJYZmkikupxCqVtmPuY0=
+github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
+github.com/creack/pty v1.1.18 h1:n56/Zwd5o6whRC5PMGretI4IdRLlmBXYNjScPaBgsbY=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/docker/cli v20.10.21+incompatible h1:qVkgyYUnOLQ98LtXBrwd/duVqPT2X4SHndOuGsfwyhU=
+github.com/docker/cli v20.10.21+incompatible/go.mod h1:JLrzqnKDaYBop7H2jaqPtU4hHvMKP+vjCwu2uszcLI8=
+github.com/docker/distribution v2.8.1+incompatible h1:Q50tZOPR6T/hjNsyc9g8/syEs6bk8XXApsHjKukMl68=
+github.com/docker/distribution v2.8.1+incompatible/go.mod h1:J2gT2udsDAN96Uj4KfcMRqY0/ypR+oyYUYmja8H+y+w=
+github.com/docker/docker v20.10.21+incompatible h1:UTLdBmHk3bEY+w8qeO5KttOhy6OmXWsl/FEet9Uswog=
+github.com/docker/docker v20.10.21+incompatible/go.mod h1:eEKB0N0r5NX/I1kEveEz05bcu8tLC/8azJZsviup8Sk=
+github.com/docker/docker-credential-helpers v0.7.0 h1:xtCHsjxogADNZcdv1pKUHXryefjlVRqWqIhk/uXJp0A=
+github.com/docker/docker-credential-helpers v0.7.0/go.mod h1:rETQfLdHNT3foU5kuNkFR1R1V12OJRRO5lzt2D1b5X0=
+github.com/docker/go-connections v0.4.0 h1:El9xVISelRB7BuFusrZozjnkIM5YnzCViNKohAFqRJQ=
+github.com/docker/go-connections v0.4.0/go.mod h1:Gbd7IOopHjR8Iph03tsViu4nIes5XhDvyHbTtUxmeec=
+github.com/docker/go-units v0.5.0 h1:69rxXcBk27SvSaaxTtLh/8llcHD8vYHT7WSdRZ/jvr4=
+github.com/docker/go-units v0.5.0/go.mod h1:fgPhTUdO+D/Jk86RDLlptpiXQzgHJF7gydDDbaIK4Dk=
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
+github.com/felixge/fgprof v0.9.3 h1:VvyZxILNuCiUCSXtPtYmmtGvb65nqXh2QFWc0Wpf2/g=
+github.com/felixge/fgprof v0.9.3/go.mod h1:RdbpDgzqYVh/T9fPELJyV7EYJuHB55UTEULNun8eiPw=
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
-github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/go-chi/chi/v5 v5.0.8 h1:lD+NLqFcAi1ovnVZpsnObHGW4xb4J8lNmoYVfECH1Y0=
+github.com/go-chi/chi/v5 v5.0.8/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -101,6 +124,10 @@ github.com/go-resty/resty/v2 v2.7.0 h1:me+K9p3uhSmXtrBZ4k9jcEAfJmuC8IivWHwaLZwPr
github.com/go-resty/resty/v2 v2.7.0/go.mod h1:9PWDzw47qPphMRFfhsyk0NnSgvluHcljSMVIq3w7q0I=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
+github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw=
+github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU=
+github.com/gofrs/uuid v4.3.1+incompatible h1:0/KbAdpx3UXAx1kEOWHJeOkpbgRFGHVgv+CFIY7dBJI=
+github.com/gofrs/uuid v4.3.1+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
github.com/gogo/protobuf v1.1.1/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/gogo/protobuf v1.3.0/go.mod h1:SlYgWuQ5SjCEi6WLHjHCa1yvBfUnHcTbrrZtXPKa29o=
github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q=
@@ -109,6 +136,8 @@ github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfU
github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
+github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
+github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
github.com/golang/mock v1.1.1/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A=
github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y=
@@ -145,11 +174,15 @@ github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-containerregistry v0.12.1 h1:W1mzdNUTx4Zla4JaixCRLhORcR7G6KxE5hHl5fkPsp8=
+github.com/google/go-containerregistry v0.12.1/go.mod h1:sdIK+oHQO7B93xI8UweYdl887YhuIwg9vz8BSLH3+8k=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -165,6 +198,9 @@ github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLe
github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20211214055906-6f57359322fd/go.mod h1:KgnwoLYCZ8IQu3XUZ8Nc/bM9CCZFOyjUNOSygVozoDg=
+github.com/google/pprof v0.0.0-20221203041831-ce31453925ec h1:fR20TYVVwhK4O7r7y+McjRYyaTH6/vjwJOajE+XhlzM=
+github.com/google/pprof v0.0.0-20221203041831-ce31453925ec/go.mod h1:dDKJzRmX4S37WGHujM7tX//fmj1uioxKzKxz3lo4HJo=
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
@@ -174,7 +210,6 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
@@ -182,9 +217,13 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
-github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
+github.com/ianlancetaylor/demangle v0.0.0-20210905161508-09a460cdf81d/go.mod h1:aYm2/VgdVmcIU8iMfdMvDMsRAQjcfZSKFby6HOFvi/w=
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
+github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
+github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
+github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84 h1:2uT3aivO7NVpUPGcQX7RbHijHMyWix/yCnIrCWc+5co=
+github.com/jdxcode/netrc v0.0.0-20221124155335-4616370d1a84/go.mod h1:Zi/ZFkEqFHTm7qkjyNJjaWH4LQA9LQhGJyF0lTYGpxw=
+github.com/jhump/protoreflect v1.14.0 h1:MBbQK392K3u8NTLbKOCIi3XdI+y+c6yt5oMq0X3xviw=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
@@ -198,8 +237,12 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8
github.com/kisielk/errcheck v1.2.0/go.mod h1:/BMXB+zMLi60iA8Vv6Ksmxu/1UDYcXs4uQLJ+jE2L00=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
+github.com/klauspost/compress v1.15.13 h1:NFn1Wr8cfnenSJSA46lLq4wHCcBzKTSjnBIexDMMOV0=
+github.com/klauspost/compress v1.15.13/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0=
github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
+github.com/klauspost/pgzip v1.2.5 h1:qnWYvvKqedOF2ulHpMG72XQol4ILEJ8k2wwRl/Km8oE=
+github.com/klauspost/pgzip v1.2.5/go.mod h1:Ch1tH69qFZu15pkjo5kYi6mth2Zzwzt50oCQKQE9RUs=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg=
@@ -219,13 +262,19 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/maxbrunsfeld/counterfeiter/v6 v6.5.0 h1:rBhB9Rls+yb8kA4x5a/cWxOufWfXt24E+kq4YlbGj3g=
github.com/maxbrunsfeld/counterfeiter/v6 v6.5.0/go.mod h1:fJ0UAZc1fx3xZhU4eSHQDJ1ApFmTVhp5VTpV9tm2ogg=
+github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
+github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/mapstructure v1.5.0 h1:jeMsZIYE/09sWLaz43PL7Gy6RuMjD2eJVyuac5Z2hdY=
github.com/mitchellh/mapstructure v1.5.0/go.mod h1:bFUtVrKA4DC2yAKiSyO/QUcy7e+RRV2QTWOzhPopBRo=
+github.com/moby/term v0.0.0-20221205130635-1aeaba878587 h1:HfkjXDfhgVaN5rmueG8cL8KKeFNecRCXFhaJ2qZ5SKA=
+github.com/moby/term v0.0.0-20221205130635-1aeaba878587/go.mod h1:8FzsFHVUBGZdbDsJw/ot+X+d5HLUbvklYLJ9uGfcI3Y=
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
+github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
+github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U=
github.com/mwitkow/go-proto-validators v0.3.2 h1:qRlmpTzm2pstMKKzTdvwPCF5QfBNURSlAgN/R+qbKos=
@@ -236,6 +285,7 @@ github.com/nginxinc/nginx-plus-go-client v0.10.0 h1:3zsMMkPvRDo8D7ZSprXtbAEW/SDm
github.com/nginxinc/nginx-plus-go-client v0.10.0/go.mod h1:0v3RsQCvRn/IyrMtW+DK6CNkz+PxEsXDJPjQ3yUMBF0=
github.com/nginxinc/nginx-prometheus-exporter v0.10.0 h1:wFP8mYMtmn8uK1I5tzXb3s4CQq+r3h6Y0Qdc7d+QpyM=
github.com/nginxinc/nginx-prometheus-exporter v0.10.0/go.mod h1:U3BudpuBp/uO++yvnaaI4Dz7oOFJPdM726WEv70k3O4=
+github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
@@ -248,6 +298,10 @@ github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1y
github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs=
+github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U=
+github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM=
+github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034=
+github.com/opencontainers/image-spec v1.1.0-rc2/go.mod h1:3OVijpioIKYWTqjiG0zfF6wvoJ4fAXGbjdZuI2NgsRQ=
github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HDbW65HOY=
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
@@ -258,9 +312,14 @@ github.com/pelletier/go-toml v1.9.5 h1:4yBQzkHv+7BHq2PQUZF3Mx0IYxG7LsP222s7Agd3v
github.com/pelletier/go-toml v1.9.5/go.mod h1:u1nR/EPcESfeI/szUZKdtJ0xRNbUoANCkoOuaOx1Y+c=
github.com/pelletier/go-toml/v2 v2.0.2 h1:+jQXlF3scKIcSEKkdHzXhCTDLPFi5r1wnK6yPS+49Gw=
github.com/pelletier/go-toml/v2 v2.0.2/go.mod h1:MovirKjgVRESsAvNZlAjtFwV867yGuwRkXbG66OzopI=
+github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8 h1:KoWmjvw+nsYOo29YJK9vDA65RGE3NrOnUtO7a+RF9HU=
+github.com/pkg/browser v0.0.0-20210911075715-681adbf594b8/go.mod h1:HKlIX3XHQyzLZPlr7++PzdhaXEj94dEiJgZDTsxEqUI=
github.com/pkg/errors v0.8.0/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
+github.com/pkg/profile v1.7.0 h1:hnbDkaNWPCLMO9wGLdBFTIZvzDrDfBM2072E1S9gJkA=
+github.com/pkg/profile v1.7.0/go.mod h1:8Uer0jas47ZQMJ7VD+OHknK4YDY07LPUC6dEvqDjvNo=
github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg=
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
@@ -292,11 +351,11 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
-github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
+github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
@@ -313,8 +372,8 @@ github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
-github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU=
-github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM=
+github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
+github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
@@ -323,8 +382,9 @@ github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ=
github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
@@ -332,8 +392,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs=
github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo=
github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw=
@@ -347,6 +408,7 @@ github.com/trivago/tgo v1.0.7 h1:uaWH/XIy9aWYWpjm2CU3RpcqZXmX2ysQ9/Go+d9gyrM=
github.com/trivago/tgo v1.0.7/go.mod h1:w4dpD+3tzNIIiIfkWWa85w5/B77tlvdZckQ+6PkFnhc=
github.com/vardius/message-bus v1.1.5 h1:YSAC2WB4HRlwc4neFPTmT88kzzoiQ+9WRRbej/E/LZc=
github.com/vardius/message-bus v1.1.5/go.mod h1:6xladCV2lMkUAE4bzzS85qKOiB5miV7aBVRafiTJGqw=
+github.com/vbatts/tar-split v0.11.2 h1:Via6XqJr0hceW4wff3QRzD5gAk/tatMw/4ZA7cTlIME=
github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
@@ -361,12 +423,24 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
-go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
+go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0=
+go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo=
+go.opentelemetry.io/otel v1.11.2 h1:YBZcQlsVekzFsFbjygXMOXSs6pialIZxcjfO/mBDmR0=
+go.opentelemetry.io/otel v1.11.2/go.mod h1:7p4EUV+AqgdlNV9gL97IgUZiVR3yrFXYo53f9BM3tRI=
+go.opentelemetry.io/otel/metric v0.34.0 h1:MCPoQxcg/26EuuJwpYN1mZTeCYAUGx8ABxfW07YkjP8=
+go.opentelemetry.io/otel/metric v0.34.0/go.mod h1:ZFuI4yQGNCupurTXCwkeD/zHBt+C2bR7bw5JqUm/AP8=
+go.opentelemetry.io/otel/trace v1.11.2 h1:Xf7hWSF2Glv0DE3MH7fBHvtpSBsjcBUe5MYAmZM/+y0=
+go.opentelemetry.io/otel/trace v1.11.2/go.mod h1:4N+yC7QEz7TTsG9BSRLNAa63eg5E06ObSbKPmxQ/pKA=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
-go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ=
+go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
+go.uber.org/goleak v1.1.11 h1:wy28qYRKZgnJTxGxvye5/wgWr1EKjmUDGYox5mGlRlI=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
+go.uber.org/multierr v1.9.0 h1:7fIwc/ZtS0q++VgcfqFDxSBZVv/Xo49/SYnDFupUwlI=
+go.uber.org/multierr v1.9.0/go.mod h1:X2jQV1h+kxSjClGpnseKVIxpmcjrj7MNnI0bnlfKTVQ=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
+go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60=
+go.uber.org/zap v1.24.0/go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
@@ -411,8 +485,8 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 h1:6zppjxzCulZykYSLyVDYbneBfbaBIQPYMevg0bEwv2s=
-golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
+golang.org/x/mod v0.7.0 h1:LapD9S96VoQRhi/GrNTqeBJFrUjs5UHCAtTlgwA5oZA=
+golang.org/x/mod v0.7.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -445,6 +519,7 @@ golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81R
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
@@ -455,8 +530,8 @@ golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211029224645-99673261e6eb/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 h1:N9Vc/rorQUDes6B9CNdIxAn5jODGj2wzfrei2x4wNj4=
-golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
+golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
+golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -479,8 +554,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
-golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -533,6 +608,9 @@ golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210616045830-e2b7044e8c71/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
@@ -543,10 +621,12 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 h1:9vYwv7OjYaky/tlAeD7C4oC9EsPTlaFl1H2jS++V+ME=
-golang.org/x/sys v0.0.0-20220804214406-8e32c043e418/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
+golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/term v0.3.0 h1:qoo4akIqOcDME5bhc/NgxUdovd6BSS2uMsVjB56q1xI=
+golang.org/x/term v0.3.0/go.mod h1:q750SLmJuPmVoN1blW3UFBPREJfb1KmY3vwxfr+nFDA=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -555,11 +635,13 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
-golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
+golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
+golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 h1:ftMN5LMiBFjbzleLqtoBZk7KdJwhuybIU+FckUHgoyQ=
+golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20181030221726-6c7e314b6563/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
@@ -614,8 +696,8 @@ golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4f
golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0=
golang.org/x/tools v0.1.1/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E=
-golang.org/x/tools v0.1.12 h1:VveCTK38A2rkS8ZqFY25HIDFscX5X9OoEhJd3quQmXU=
-golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc=
+golang.org/x/tools v0.4.0 h1:7mTAgkunk3fr4GAloyyCasadO6h9zSsQZbwvcaIciV4=
+golang.org/x/tools v0.4.0/go.mod h1:UE5sM2OK9E/d67R0ANs2xJizIymRP5gJU295PvKXxjQ=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -670,7 +752,6 @@ google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfG
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
@@ -684,8 +765,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 h1:sRT5xdTkj1Kbk30qbYC7VyMj73N5pZYsw6v+Nrzdhno=
-google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
+google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 h1:jmIfw8+gSvXcZSgaFAGyInDXeWzUhvYH57G/5GKMn70=
+google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -699,13 +780,11 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
-google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
+google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0 h1:TLkBREm4nIsEcexnCjgQd5GQWaHcqMzwQV0TX9pq8S0=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.2.0/go.mod h1:DNq5QpG7LJqD2AamLZ7zvKE0DEpVl2BSEVjFycAAjRY=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
@@ -721,12 +800,13 @@ google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlba
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
-google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk=
+google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
@@ -739,7 +819,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
@@ -748,6 +827,7 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
+gotest.tools/v3 v3.0.3 h1:4AuOwCGf4lLR9u3YOe2awrHygurzhO/HeQ6laiA6Sx0=
honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
diff --git a/go.work.sum b/go.work.sum
index 9b1408ec8..8187c9662 100644
--- a/go.work.sum
+++ b/go.work.sum
@@ -11,18 +11,264 @@ cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Ud
cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=
cloud.google.com/go v0.100.2 h1:t9Iw5QH5v4XtlEQaCtUY7x6sCABps8sW0acw7e2WQ6Y=
cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A=
+cloud.google.com/go v0.102.0/go.mod h1:oWcCzKlqJ5zgHQt9YsaeTY9KzIvjyy0ArmiBUgpQ+nc=
+cloud.google.com/go v0.105.0 h1:DNtEKRBAAzeS4KyIory52wWHuClNaXJ5x1F7xa4q+5Y=
+cloud.google.com/go v0.105.0/go.mod h1:PrLgOJNe5nfE9UMxKxgXj4mD3voiP+YQ6gdt6KMFOKM=
+cloud.google.com/go/accessapproval v1.5.0 h1:/nTivgnV/n1CaAeo+ekGexTYUsKEU9jUVkoY5359+3Q=
+cloud.google.com/go/accessapproval v1.5.0/go.mod h1:HFy3tuiGvMdcd/u+Cu5b9NkO1pEICJ46IR82PoUdplw=
+cloud.google.com/go/accesscontextmanager v1.4.0 h1:CFhNhU7pcD11cuDkQdrE6PQJgv0EXNKNv06jIzbLlCU=
+cloud.google.com/go/accesscontextmanager v1.4.0/go.mod h1:/Kjh7BBu/Gh83sv+K60vN9QE5NJcd80sU33vIe2IFPE=
+cloud.google.com/go/aiplatform v1.27.0 h1:DBi3Jk9XjCJ4pkkLM4NqKgj3ozUL1wq4l+d3/jTGXAI=
+cloud.google.com/go/aiplatform v1.27.0/go.mod h1:Bvxqtl40l0WImSb04d0hXFU7gDOiq9jQmorivIiWcKg=
+cloud.google.com/go/analytics v0.12.0 h1:NKw6PpQi6V1O+KsjuTd+bhip9d0REYu4NevC45vtGp8=
+cloud.google.com/go/analytics v0.12.0/go.mod h1:gkfj9h6XRf9+TS4bmuhPEShsh3hH8PAZzm/41OOhQd4=
+cloud.google.com/go/apigateway v1.4.0 h1:IIoXKR7FKrEAQhMTz5hK2wiDz2WNFHS7eVr/L1lE/rM=
+cloud.google.com/go/apigateway v1.4.0/go.mod h1:pHVY9MKGaH9PQ3pJ4YLzoj6U5FUDeDFBllIz7WmzJoc=
+cloud.google.com/go/apigeeconnect v1.4.0 h1:AONoTYJviyv1vS4IkvWzq69gEVdvHx35wKXc+e6wjZQ=
+cloud.google.com/go/apigeeconnect v1.4.0/go.mod h1:kV4NwOKqjvt2JYR0AoIWo2QGfoRtn/pkS3QlHp0Ni04=
+cloud.google.com/go/appengine v1.5.0 h1:lmG+O5oaR9xNwaRBwE2XoMhwQHsHql5IoiGr1ptdDwU=
+cloud.google.com/go/appengine v1.5.0/go.mod h1:TfasSozdkFI0zeoxW3PTBLiNqRmzraodCWatWI9Dmak=
+cloud.google.com/go/area120 v0.6.0 h1:TCMhwWEWhCn8d44/Zs7UCICTWje9j3HuV6nVGMjdpYw=
+cloud.google.com/go/area120 v0.6.0/go.mod h1:39yFJqWVgm0UZqWTOdqkLhjoC7uFfgXRC8g/ZegeAh0=
+cloud.google.com/go/artifactregistry v1.9.0 h1:3d0LRAU1K6vfqCahhl9fx2oGHcq+s5gftdix4v8Ibrc=
+cloud.google.com/go/artifactregistry v1.9.0/go.mod h1:2K2RqvA2CYvAeARHRkLDhMDJ3OXy26h3XW+3/Jh2uYc=
+cloud.google.com/go/asset v1.10.0 h1:aCrlaLGJWTODJX4G56ZYzJefITKEWNfbjjtHSzWpxW0=
+cloud.google.com/go/asset v1.10.0/go.mod h1:pLz7uokL80qKhzKr4xXGvBQXnzHn5evJAEAtZiIb0wY=
+cloud.google.com/go/assuredworkloads v1.9.0 h1:hhIdCOowsT1GG5eMCIA0OwK6USRuYTou/1ZeNxCSRtA=
+cloud.google.com/go/assuredworkloads v1.9.0/go.mod h1:kFuI1P78bplYtT77Tb1hi0FMxM0vVpRC7VVoJC3ZoT0=
+cloud.google.com/go/automl v1.8.0 h1:BMioyXSbg7d7xLibn47cs0elW6RT780IUWr42W8rp2Q=
+cloud.google.com/go/automl v1.8.0/go.mod h1:xWx7G/aPEe/NP+qzYXktoBSDfjO+vnKMGgsApGJJquM=
+cloud.google.com/go/baremetalsolution v0.4.0 h1:g9KO6SkakcYPcc/XjAzeuUrEOXlYPnMpuiaywYaGrmQ=
+cloud.google.com/go/baremetalsolution v0.4.0/go.mod h1:BymplhAadOO/eBa7KewQ0Ppg4A4Wplbn+PsFKRLo0uI=
+cloud.google.com/go/batch v0.4.0 h1:1jvEBY55OH4Sd2FxEXQfxGExFWov1A/IaRe+Z5Z71Fw=
+cloud.google.com/go/batch v0.4.0/go.mod h1:WZkHnP43R/QCGQsZ+0JyG4i79ranE2u8xvjq/9+STPE=
+cloud.google.com/go/beyondcorp v0.3.0 h1:w+4kThysgl0JiKshi2MKDCg2NZgOyqOI0wq2eBZyrzA=
+cloud.google.com/go/beyondcorp v0.3.0/go.mod h1:E5U5lcrcXMsCuoDNyGrpyTm/hn7ne941Jz2vmksAxW8=
cloud.google.com/go/bigquery v1.8.0 h1:PQcPefKFdaIzjQFbiyOgAqyx8q5djaE7x9Sqe712DPA=
+cloud.google.com/go/bigquery v1.44.0 h1:Wi4dITi+cf9VYp4VH2T9O41w0kCW0uQTELq2Z6tukN0=
+cloud.google.com/go/bigquery v1.44.0/go.mod h1:0Y33VqXTEsbamHJvJHdFmtqHvMIY28aK1+dFsvaChGc=
+cloud.google.com/go/billing v1.7.0 h1:Xkii76HWELHwBtkQVZvqmSo9GTr0O+tIbRNnMcGdlg4=
+cloud.google.com/go/billing v1.7.0/go.mod h1:q457N3Hbj9lYwwRbnlD7vUpyjq6u5U1RAOArInEiD5Y=
+cloud.google.com/go/binaryauthorization v1.4.0 h1:pL70vXWn9TitQYXBWTK2abHl2JHLwkFRjYw6VflRqEA=
+cloud.google.com/go/binaryauthorization v1.4.0/go.mod h1:tsSPQrBd77VLplV70GUhBf/Zm3FsKmgSqgm4UmiDItk=
+cloud.google.com/go/certificatemanager v1.4.0 h1:tzbR4UHBbgsewMWUD93JHi8EBi/gHBoSAcY1/sThFGk=
+cloud.google.com/go/certificatemanager v1.4.0/go.mod h1:vowpercVFyqs8ABSmrdV+GiFf2H/ch3KyudYQEMM590=
+cloud.google.com/go/channel v1.9.0 h1:pNuUlZx0Jb0Ts9P312bmNMuH5IiFWIR4RUtLb70Ke5s=
+cloud.google.com/go/channel v1.9.0/go.mod h1:jcu05W0my9Vx4mt3/rEHpfxc9eKi9XwsdDL8yBMbKUk=
+cloud.google.com/go/cloudbuild v1.4.0 h1:TAAmCmAlOJ4uNBu6zwAjwhyl/7fLHHxIEazVhr3QBbQ=
+cloud.google.com/go/cloudbuild v1.4.0/go.mod h1:5Qwa40LHiOXmz3386FrjrYM93rM/hdRr7b53sySrTqA=
+cloud.google.com/go/clouddms v1.4.0 h1:UhzHIlgFfMr6luVYVNydw/pl9/U5kgtjCMJHnSvoVws=
+cloud.google.com/go/clouddms v1.4.0/go.mod h1:Eh7sUGCC+aKry14O1NRljhjyrr0NFC0G2cjwX0cByRk=
+cloud.google.com/go/cloudtasks v1.8.0 h1:faUiUgXjW8yVZ7XMnKHKm1WE4OldPBUWWfIRN/3z1dc=
+cloud.google.com/go/cloudtasks v1.8.0/go.mod h1:gQXUIwCSOI4yPVK7DgTVFiiP0ZW/eQkydWzwVMdHxrI=
cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow=
cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM=
cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M=
cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s=
cloud.google.com/go/compute v1.6.1 h1:2sMmt8prCn7DPaG4Pmh0N3Inmc8cT8ae5k1M6VJ9Wqc=
cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU=
+cloud.google.com/go/compute v1.7.0/go.mod h1:435lt8av5oL9P3fv1OEzSbSUe+ybHXGMPQHHZWZxy9U=
+cloud.google.com/go/compute v1.10.0/go.mod h1:ER5CLbMxl90o2jtNbGSbtfOpQKR0t15FOtRsugnLrlU=
+cloud.google.com/go/compute v1.12.1/go.mod h1:e8yNOBcBONZU1vJKCvCoDw/4JQsA0dpM4x/6PIIOocU=
+cloud.google.com/go/compute v1.13.0 h1:AYrLkB8NPdDRslNp4Jxmzrhdr03fUAIDbiGFjLWowoU=
+cloud.google.com/go/compute v1.13.0/go.mod h1:5aPTS0cUNMIc1CE546K+Th6weJUNQErARyZtRXDJ8GE=
+cloud.google.com/go/compute/metadata v0.2.1/go.mod h1:jgHgmJd2RKBGzXqF5LR2EZMGxBkeanZ9wwa75XHJgOM=
+cloud.google.com/go/contactcenterinsights v1.4.0 h1:tTQLI/ZvguUf9Hv+36BkG2+/PeC8Ol1q4pBW+tgCx0A=
+cloud.google.com/go/contactcenterinsights v1.4.0/go.mod h1:L2YzkGbPsv+vMQMCADxJoT9YiTTnSEd6fEvCeHTYVck=
+cloud.google.com/go/container v1.7.0 h1:nbEK/59GyDRKKlo1SqpohY1TK8LmJ2XNcvS9Gyom2A0=
+cloud.google.com/go/container v1.7.0/go.mod h1:Dp5AHtmothHGX3DwwIHPgq45Y8KmNsgN3amoYfxVkLo=
+cloud.google.com/go/containeranalysis v0.6.0 h1:2824iym832ljKdVpCBnpqm5K94YT/uHTVhNF+dRTXPI=
+cloud.google.com/go/containeranalysis v0.6.0/go.mod h1:HEJoiEIu+lEXM+k7+qLCci0h33lX3ZqoYFdmPcoO7s4=
+cloud.google.com/go/datacatalog v1.8.0 h1:6kZ4RIOW/uT7QWC5SfPfq/G8sYzr/v+UOmOAxy4Z1TE=
+cloud.google.com/go/datacatalog v1.8.0/go.mod h1:KYuoVOv9BM8EYz/4eMFxrr4DUKhGIOXxZoKYF5wdISM=
+cloud.google.com/go/dataflow v0.7.0 h1:CW3541Fm7KPTyZjJdnX6NtaGXYFn5XbFC5UcjgALKvU=
+cloud.google.com/go/dataflow v0.7.0/go.mod h1:PX526vb4ijFMesO1o202EaUmouZKBpjHsTlCtB4parQ=
+cloud.google.com/go/dataform v0.5.0 h1:vLwowLF2ZB5J5gqiZCzv076lDI/Rd7zYQQFu5XO1PSg=
+cloud.google.com/go/dataform v0.5.0/go.mod h1:GFUYRe8IBa2hcomWplodVmUx/iTL0FrsauObOM3Ipr0=
+cloud.google.com/go/datafusion v1.5.0 h1:j5m2hjWovTZDTQak4MJeXAR9yN7O+zMfULnjGw/OOLg=
+cloud.google.com/go/datafusion v1.5.0/go.mod h1:Kz+l1FGHB0J+4XF2fud96WMmRiq/wj8N9u007vyXZ2w=
+cloud.google.com/go/datalabeling v0.6.0 h1:dp8jOF21n/7jwgo/uuA0RN8hvLcKO4q6s/yvwevs2ZM=
+cloud.google.com/go/datalabeling v0.6.0/go.mod h1:WqdISuk/+WIGeMkpw/1q7bK/tFEZxsrFJOJdY2bXvTQ=
+cloud.google.com/go/dataplex v1.4.0 h1:cNxeA2DiWliQGi21kPRqnVeQ5xFhNoEjPRt1400Pm8Y=
+cloud.google.com/go/dataplex v1.4.0/go.mod h1:X51GfLXEMVJ6UN47ESVqvlsRplbLhcsAt0kZCCKsU0A=
+cloud.google.com/go/dataproc v1.8.0 h1:gVOqNmElfa6n/ccG/QDlfurMWwrK3ezvy2b2eDoCmS0=
+cloud.google.com/go/dataproc v1.8.0/go.mod h1:5OW+zNAH0pMpw14JVrPONsxMQYMBqJuzORhIBfBn9uI=
+cloud.google.com/go/dataqna v0.6.0 h1:gx9jr41ytcA3dXkbbd409euEaWtofCVXYBvJz3iYm18=
+cloud.google.com/go/dataqna v0.6.0/go.mod h1:1lqNpM7rqNLVgWBJyk5NF6Uen2PHym0jtVJonplVsDA=
cloud.google.com/go/datastore v1.1.0 h1:/May9ojXjRkPBNVrq+oWLqmWCkr4OU5uRY29bu0mRyQ=
+cloud.google.com/go/datastore v1.10.0 h1:4siQRf4zTiAVt/oeH4GureGkApgb2vtPQAtOmhpqQwE=
+cloud.google.com/go/datastore v1.10.0/go.mod h1:PC5UzAmDEkAmkfaknstTYbNpgE49HAgW2J1gcgUfmdM=
+cloud.google.com/go/datastream v1.5.0 h1:PgIgbhedBtYBU6POGXFMn2uSl9vpqubc3ewTNdcU8Mk=
+cloud.google.com/go/datastream v1.5.0/go.mod h1:6TZMMNPwjUqZHBKPQ1wwXpb0d5VDVPl2/XoS5yi88q4=
+cloud.google.com/go/deploy v1.5.0 h1:kI6dxt8Ml0is/x7YZjLveTvR7YPzXAUD/8wQZ2nH5zA=
+cloud.google.com/go/deploy v1.5.0/go.mod h1:ffgdD0B89tToyW/U/D2eL0jN2+IEV/3EMuXHA0l4r+s=
+cloud.google.com/go/dialogflow v1.19.0 h1:HYHVOkoxQ9bSfNIelSZYNAtUi4CeSrCnROyOsbOqPq8=
+cloud.google.com/go/dialogflow v1.19.0/go.mod h1:JVmlG1TwykZDtxtTXujec4tQ+D8SBFMoosgy+6Gn0s0=
+cloud.google.com/go/dlp v1.7.0 h1:9I4BYeJSVKoSKgjr70fLdRDumqcUeVmHV4fd5f9LR6Y=
+cloud.google.com/go/dlp v1.7.0/go.mod h1:68ak9vCiMBjbasxeVD17hVPxDEck+ExiHavX8kiHG+Q=
+cloud.google.com/go/documentai v1.10.0 h1:jfq09Fdjtnpnmt/MLyf6A3DM3ynb8B2na0K+vSXvpFM=
+cloud.google.com/go/documentai v1.10.0/go.mod h1:vod47hKQIPeCfN2QS/jULIvQTugbmdc0ZvxxfQY1bg4=
+cloud.google.com/go/domains v0.7.0 h1:pu3JIgC1rswIqi5romW0JgNO6CTUydLYX8zyjiAvO1c=
+cloud.google.com/go/domains v0.7.0/go.mod h1:PtZeqS1xjnXuRPKE/88Iru/LdfoRyEHYA9nFQf4UKpg=
+cloud.google.com/go/edgecontainer v0.2.0 h1:hd6J2n5dBBRuAqnNUEsKWrp6XNPKsaxwwIyzOPZTokk=
+cloud.google.com/go/edgecontainer v0.2.0/go.mod h1:RTmLijy+lGpQ7BXuTDa4C4ssxyXT34NIuHIgKuP4s5w=
+cloud.google.com/go/errorreporting v0.3.0 h1:kj1XEWMu8P0qlLhm3FwcaFsUvXChV/OraZwA70trRR0=
+cloud.google.com/go/errorreporting v0.3.0/go.mod h1:xsP2yaAp+OAW4OIm60An2bbLpqIhKXdWR/tawvl7QzU=
+cloud.google.com/go/essentialcontacts v1.4.0 h1:b6csrQXCHKQmfo9h3dG/pHyoEh+fQG1Yg78a53LAviY=
+cloud.google.com/go/essentialcontacts v1.4.0/go.mod h1:8tRldvHYsmnBCHdFpvU+GL75oWiBKl80BiqlFh9tp+8=
+cloud.google.com/go/eventarc v1.8.0 h1:AgCqrmMMIcel5WWKkzz5EkCUKC3Rl5LNMMYsS+LvsI0=
+cloud.google.com/go/eventarc v1.8.0/go.mod h1:imbzxkyAU4ubfsaKYdQg04WS1NvncblHEup4kvF+4gw=
+cloud.google.com/go/filestore v1.4.0 h1:yjKOpzvqtDmL5AXbKttLc8j0hL20kuC1qPdy5HPcxp0=
+cloud.google.com/go/filestore v1.4.0/go.mod h1:PaG5oDfo9r224f8OYXURtAsY+Fbyq/bLYoINEK8XQAI=
cloud.google.com/go/firestore v1.6.1 h1:8rBq3zRjnHx8UtBvaOWqBB1xq9jH6/wltfQLlTMh2Fw=
cloud.google.com/go/firestore v1.6.1/go.mod h1:asNXNOzBdyVQmEU+ggO8UPodTkEVFW5Qx+rwHnAz+EY=
+cloud.google.com/go/firestore v1.9.0 h1:IBlRyxgGySXu5VuW0RgGFlTtLukSnNkpDiEOMkQkmpA=
+cloud.google.com/go/firestore v1.9.0/go.mod h1:HMkjKHNTtRyZNiMzu7YAsLr9K3X2udY2AMwDaMEQiiE=
+cloud.google.com/go/functions v1.9.0 h1:35tgv1fQOtvKqH/uxJMzX3w6usneJ0zXpsFr9KAVhNE=
+cloud.google.com/go/functions v1.9.0/go.mod h1:Y+Dz8yGguzO3PpIjhLTbnqV1CWmgQ5UwtlpzoyquQ08=
+cloud.google.com/go/gaming v1.8.0 h1:97OAEQtDazAJD7yh/kvQdSCQuTKdR0O+qWAJBZJ4xiA=
+cloud.google.com/go/gaming v1.8.0/go.mod h1:xAqjS8b7jAVW0KFYeRUxngo9My3f33kFmua++Pi+ggM=
+cloud.google.com/go/gkebackup v0.3.0 h1:4K+jiv4ocqt1niN8q5Imd8imRoXBHTrdnJVt/uFFxF4=
+cloud.google.com/go/gkebackup v0.3.0/go.mod h1:n/E671i1aOQvUxT541aTkCwExO/bTer2HDlj4TsBRAo=
+cloud.google.com/go/gkeconnect v0.6.0 h1:zAcvDa04tTnGdu6TEZewaLN2tdMtUOJJ7fEceULjguA=
+cloud.google.com/go/gkeconnect v0.6.0/go.mod h1:Mln67KyU/sHJEBY8kFZ0xTeyPtzbq9StAVvEULYK16A=
+cloud.google.com/go/gkehub v0.10.0 h1:JTcTaYQRGsVm+qkah7WzHb6e9sf1C0laYdRPn9aN+vg=
+cloud.google.com/go/gkehub v0.10.0/go.mod h1:UIPwxI0DsrpsVoWpLB0stwKCP+WFVG9+y977wO+hBH0=
+cloud.google.com/go/gkemulticloud v0.4.0 h1:8F1NhJj8ucNj7lK51UZMtAjSWTgP1zO18XF6vkfiPPU=
+cloud.google.com/go/gkemulticloud v0.4.0/go.mod h1:E9gxVBnseLWCk24ch+P9+B2CoDFJZTyIgLKSalC7tuI=
+cloud.google.com/go/gsuiteaddons v1.4.0 h1:TGT2oGmO5q3VH6SjcrlgPUWI0njhYv4kywLm6jag0to=
+cloud.google.com/go/gsuiteaddons v1.4.0/go.mod h1:rZK5I8hht7u7HxFQcFei0+AtfS9uSushomRlg+3ua1o=
+cloud.google.com/go/iam v0.3.0/go.mod h1:XzJPvDayI+9zsASAFO68Hk07u3z+f+JrT2xXNdp4bnY=
+cloud.google.com/go/iam v0.8.0 h1:E2osAkZzxI/+8pZcxVLcDtAQx/u+hZXVryUaYQ5O0Kk=
+cloud.google.com/go/iam v0.8.0/go.mod h1:lga0/y3iH6CX7sYqypWJ33hf7kkfXJag67naqGESjkE=
+cloud.google.com/go/iap v1.5.0 h1:BGEXovwejOCt1zDk8hXq0bOhhRu9haXKWXXXp2B4wBM=
+cloud.google.com/go/iap v1.5.0/go.mod h1:UH/CGgKd4KyohZL5Pt0jSKE4m3FR51qg6FKQ/z/Ix9A=
+cloud.google.com/go/ids v1.2.0 h1:LncHK4HHucb5Du310X8XH9/ICtMwZ2PCfK0ScjWiJoY=
+cloud.google.com/go/ids v1.2.0/go.mod h1:5WXvp4n25S0rA/mQWAg1YEEBBq6/s+7ml1RDCW1IrcY=
+cloud.google.com/go/iot v1.4.0 h1:Y9+oZT9jD4GUZzORXTU45XsnQrhxmDT+TFbPil6pRVQ=
+cloud.google.com/go/iot v1.4.0/go.mod h1:dIDxPOn0UvNDUMD8Ger7FIaTuvMkj+aGk94RPP0iV+g=
+cloud.google.com/go/kms v1.6.0 h1:OWRZzrPmOZUzurjI2FBGtgY2mB1WaJkqhw6oIwSj0Yg=
+cloud.google.com/go/kms v1.6.0/go.mod h1:Jjy850yySiasBUDi6KFUwUv2n1+o7QZFyuUJg6OgjA0=
+cloud.google.com/go/language v1.8.0 h1:3Wa+IUMamL4JH3Zd3cDZUHpwyqplTACt6UZKRD2eCL4=
+cloud.google.com/go/language v1.8.0/go.mod h1:qYPVHf7SPoNNiCL2Dr0FfEFNil1qi3pQEyygwpgVKB8=
+cloud.google.com/go/lifesciences v0.6.0 h1:tIqhivE2LMVYkX0BLgG7xL64oNpDaFFI7teunglt1tI=
+cloud.google.com/go/lifesciences v0.6.0/go.mod h1:ddj6tSX/7BOnhxCSd3ZcETvtNr8NZ6t/iPhY2Tyfu08=
+cloud.google.com/go/logging v1.6.1 h1:ZBsZK+JG+oCDT+vaxwqF2egKNRjz8soXiS6Xv79benI=
+cloud.google.com/go/logging v1.6.1/go.mod h1:5ZO0mHHbvm8gEmeEUHrmDlTDSu5imF6MUP9OfilNXBw=
+cloud.google.com/go/longrunning v0.3.0 h1:NjljC+FYPV3uh5/OwWT6pVU+doBqMg2x/rZlE+CamDs=
+cloud.google.com/go/longrunning v0.3.0/go.mod h1:qth9Y41RRSUE69rDcOn6DdK3HfQfsUI0YSmW3iIlLJc=
+cloud.google.com/go/managedidentities v1.4.0 h1:3Kdajn6X25yWQFhFCErmKSYTSvkEd3chJROny//F1A0=
+cloud.google.com/go/managedidentities v1.4.0/go.mod h1:NWSBYbEMgqmbZsLIyKvxrYbtqOsxY1ZrGM+9RgDqInM=
+cloud.google.com/go/maps v0.1.0 h1:kLReRbclTgJefw2fcCbdLPLhPj0U6UUWN10ldG8sdOU=
+cloud.google.com/go/maps v0.1.0/go.mod h1:BQM97WGyfw9FWEmQMpZ5T6cpovXXSd1cGmFma94eubI=
+cloud.google.com/go/mediatranslation v0.6.0 h1:qAJzpxmEX+SeND10Y/4868L5wfZpo4Y3BIEnIieP4dk=
+cloud.google.com/go/mediatranslation v0.6.0/go.mod h1:hHdBCTYNigsBxshbznuIMFNe5QXEowAuNmmC7h8pu5w=
+cloud.google.com/go/memcache v1.7.0 h1:yLxUzJkZVSH2kPaHut7k+7sbIBFpvSh1LW9qjM2JDjA=
+cloud.google.com/go/memcache v1.7.0/go.mod h1:ywMKfjWhNtkQTxrWxCkCFkoPjLHPW6A7WOTVI8xy3LY=
+cloud.google.com/go/metastore v1.8.0 h1:3KcShzqWdqxrDEXIBWpYJpOOrgpDj+HlBi07Grot49Y=
+cloud.google.com/go/metastore v1.8.0/go.mod h1:zHiMc4ZUpBiM7twCIFQmJ9JMEkDSyZS9U12uf7wHqSI=
+cloud.google.com/go/monitoring v1.8.0 h1:c9riaGSPQ4dUKWB+M1Fl0N+iLxstMbCktdEwYSPGDvA=
+cloud.google.com/go/monitoring v1.8.0/go.mod h1:E7PtoMJ1kQXWxPjB6mv2fhC5/15jInuulFdYYtlcvT4=
+cloud.google.com/go/networkconnectivity v1.7.0 h1:BVdIKaI68bihnXGdCVL89Jsg9kq2kg+II30fjVqo62E=
+cloud.google.com/go/networkconnectivity v1.7.0/go.mod h1:RMuSbkdbPwNMQjB5HBWD5MpTBnNm39iAVpC3TmsExt8=
+cloud.google.com/go/networkmanagement v1.5.0 h1:mDHA3CDW00imTvC5RW6aMGsD1bH+FtKwZm/52BxaiMg=
+cloud.google.com/go/networkmanagement v1.5.0/go.mod h1:ZnOeZ/evzUdUsnvRt792H0uYEnHQEMaz+REhhzJRcf4=
+cloud.google.com/go/networksecurity v0.6.0 h1:qDEX/3sipg9dS5JYsAY+YvgTjPR63cozzAWop8oZS94=
+cloud.google.com/go/networksecurity v0.6.0/go.mod h1:Q5fjhTr9WMI5mbpRYEbiexTzROf7ZbDzvzCrNl14nyU=
+cloud.google.com/go/notebooks v1.5.0 h1:AC8RPjNvel3ExgXjO1YOAz+teg9+j+89TNxa7pIZfww=
+cloud.google.com/go/notebooks v1.5.0/go.mod h1:q8mwhnP9aR8Hpfnrc5iN5IBhrXUy8S2vuYs+kBJ/gu0=
+cloud.google.com/go/optimization v1.2.0 h1:7PxOq9VTT7TMib/6dMoWpMvWS2E4dJEvtYzjvBreaec=
+cloud.google.com/go/optimization v1.2.0/go.mod h1:Lr7SOHdRDENsh+WXVmQhQTrzdu9ybg0NecjHidBq6xs=
+cloud.google.com/go/orchestration v1.4.0 h1:39d6tqvNjd/wsSub1Bn4cEmrYcet5Ur6xpaN+SxOxtY=
+cloud.google.com/go/orchestration v1.4.0/go.mod h1:6W5NLFWs2TlniBphAViZEVhrXRSMgUGDfW7vrWKvsBk=
+cloud.google.com/go/orgpolicy v1.5.0 h1:erF5PHqDZb6FeFrUHiYj2JK2BMhsk8CyAg4V4amJ3rE=
+cloud.google.com/go/orgpolicy v1.5.0/go.mod h1:hZEc5q3wzwXJaKrsx5+Ewg0u1LxJ51nNFlext7Tanwc=
+cloud.google.com/go/osconfig v1.10.0 h1:NO0RouqCOM7M2S85Eal6urMSSipWwHU8evzwS+siqUI=
+cloud.google.com/go/osconfig v1.10.0/go.mod h1:uMhCzqC5I8zfD9zDEAfvgVhDS8oIjySWh+l4WK6GnWw=
+cloud.google.com/go/oslogin v1.7.0 h1:pKGDPfeZHDybtw48WsnVLjoIPMi9Kw62kUE5TXCLCN4=
+cloud.google.com/go/oslogin v1.7.0/go.mod h1:e04SN0xO1UNJ1M5GP0vzVBFicIe4O53FOfcixIqTyXo=
+cloud.google.com/go/phishingprotection v0.6.0 h1:OrwHLSRSZyaiOt3tnY33dsKSedxbMzsXvqB21okItNQ=
+cloud.google.com/go/phishingprotection v0.6.0/go.mod h1:9Y3LBLgy0kDTcYET8ZH3bq/7qni15yVUoAxiFxnlSUA=
+cloud.google.com/go/policytroubleshooter v1.4.0 h1:NQklJuOUoz1BPP+Epjw81COx7IISWslkZubz/1i0UN8=
+cloud.google.com/go/policytroubleshooter v1.4.0/go.mod h1:DZT4BcRw3QoO8ota9xw/LKtPa8lKeCByYeKTIf/vxdE=
+cloud.google.com/go/privatecatalog v0.6.0 h1:Vz86uiHCtNGm1DeC32HeG2VXmOq5JRYA3VRPf8ZEcSg=
+cloud.google.com/go/privatecatalog v0.6.0/go.mod h1:i/fbkZR0hLN29eEWiiwue8Pb+GforiEIBnV9yrRUOKI=
cloud.google.com/go/pubsub v1.3.1 h1:ukjixP1wl0LpnZ6LWtZJ0mX5tBmjp1f8Sqer8Z2OMUU=
+cloud.google.com/go/pubsub v1.27.1 h1:q+J/Nfr6Qx4RQeu3rJcnN48SNC0qzlYzSeqkPq93VHs=
+cloud.google.com/go/pubsub v1.27.1/go.mod h1:hQN39ymbV9geqBnfQq6Xf63yNhUAhv9CZhzp5O6qsW0=
+cloud.google.com/go/pubsublite v1.5.0 h1:iqrD8vp3giTb7hI1q4TQQGj77cj8zzgmMPsTZtLnprM=
+cloud.google.com/go/pubsublite v1.5.0/go.mod h1:xapqNQ1CuLfGi23Yda/9l4bBCKz/wC3KIJ5gKcxveZg=
+cloud.google.com/go/recaptchaenterprise/v2 v2.5.0 h1:UqzFfb/WvhwXGDF1eQtdHLrmni+iByZXY4h3w9Kdyv8=
+cloud.google.com/go/recaptchaenterprise/v2 v2.5.0/go.mod h1:O8LzcHXN3rz0j+LBC91jrwI3R+1ZSZEWrfL7XHgNo9U=
+cloud.google.com/go/recommendationengine v0.6.0 h1:6w+WxPf2LmUEqX0YyvfCoYb8aBYOcbIV25Vg6R0FLGw=
+cloud.google.com/go/recommendationengine v0.6.0/go.mod h1:08mq2umu9oIqc7tDy8sx+MNJdLG0fUi3vaSVbztHgJ4=
+cloud.google.com/go/recommender v1.8.0 h1:9kMZQGeYfcOD/RtZfcNKGKtoex3DdoB4zRgYU/WaIwE=
+cloud.google.com/go/recommender v1.8.0/go.mod h1:PkjXrTT05BFKwxaUxQmtIlrtj0kph108r02ZZQ5FE70=
+cloud.google.com/go/redis v1.10.0 h1:/zTwwBKIAD2DEWTrXZp8WD9yD/gntReF/HkPssVYd0U=
+cloud.google.com/go/redis v1.10.0/go.mod h1:ThJf3mMBQtW18JzGgh41/Wld6vnDDc/F/F35UolRZPM=
+cloud.google.com/go/resourcemanager v1.4.0 h1:NDao6CHMwEZIaNsdWy+tuvHaavNeGP06o1tgrR0kLvU=
+cloud.google.com/go/resourcemanager v1.4.0/go.mod h1:MwxuzkumyTX7/a3n37gmsT3py7LIXwrShilPh3P1tR0=
+cloud.google.com/go/resourcesettings v1.4.0 h1:eTzOwB13WrfF0kuzG2ZXCfB3TLunSHBur4s+HFU6uSM=
+cloud.google.com/go/resourcesettings v1.4.0/go.mod h1:ldiH9IJpcrlC3VSuCGvjR5of/ezRrOxFtpJoJo5SmXg=
+cloud.google.com/go/retail v1.11.0 h1:N9fa//ecFUOEPsW/6mJHfcapPV0wBSwIUwpVZB7MQ3o=
+cloud.google.com/go/retail v1.11.0/go.mod h1:MBLk1NaWPmh6iVFSz9MeKG/Psyd7TAgm6y/9L2B4x9Y=
+cloud.google.com/go/run v0.3.0 h1:AWPuzU7Xtaj3Jf+QarDWIs6AJ5hM1VFQ+F6Q+VZ6OT4=
+cloud.google.com/go/run v0.3.0/go.mod h1:TuyY1+taHxTjrD0ZFk2iAR+xyOXEA0ztb7U3UNA0zBo=
+cloud.google.com/go/scheduler v1.7.0 h1:K/mxOewgHGeKuATUJNGylT75Mhtjmx1TOkKukATqMT8=
+cloud.google.com/go/scheduler v1.7.0/go.mod h1:jyCiBqWW956uBjjPMMuX09n3x37mtyPJegEWKxRsn44=
+cloud.google.com/go/secretmanager v1.9.0 h1:xE6uXljAC1kCR8iadt9+/blg1fvSbmenlsDN4fT9gqw=
+cloud.google.com/go/secretmanager v1.9.0/go.mod h1:b71qH2l1yHmWQHt9LC80akm86mX8AL6X1MA01dW8ht4=
+cloud.google.com/go/security v1.10.0 h1:KSKzzJMyUoMRQzcz7azIgqAUqxo7rmQ5rYvimMhikqg=
+cloud.google.com/go/security v1.10.0/go.mod h1:QtOMZByJVlibUT2h9afNDWRZ1G96gVywH8T5GUSb9IA=
+cloud.google.com/go/securitycenter v1.16.0 h1:QTVtk/Reqnx2bVIZtJKm1+mpfmwRwymmNvlaFez7fQY=
+cloud.google.com/go/securitycenter v1.16.0/go.mod h1:Q9GMaLQFUD+5ZTabrbujNWLtSLZIZF7SAR0wWECrjdk=
+cloud.google.com/go/servicecontrol v1.5.0 h1:ImIzbOu6y4jL6ob65I++QzvqgFaoAKgHOG+RU9/c4y8=
+cloud.google.com/go/servicecontrol v1.5.0/go.mod h1:qM0CnXHhyqKVuiZnGKrIurvVImCs8gmqWsDoqe9sU1s=
+cloud.google.com/go/servicedirectory v1.7.0 h1:f7M8IMcVzO3T425AqlZbP3yLzeipsBHtRza8vVFYMhQ=
+cloud.google.com/go/servicedirectory v1.7.0/go.mod h1:5p/U5oyvgYGYejufvxhgwjL8UVXjkuw7q5XcG10wx1U=
+cloud.google.com/go/servicemanagement v1.5.0 h1:TpkCO5M7dhKSy1bKUD9o/sSEW/U1Gtx7opA1fsiMx0c=
+cloud.google.com/go/servicemanagement v1.5.0/go.mod h1:XGaCRe57kfqu4+lRxaFEAuqmjzF0r+gWHjWqKqBvKFo=
+cloud.google.com/go/serviceusage v1.4.0 h1:b0EwJxPJLpavSljMQh0RcdHsUrr5DQ+Nelt/3BAs5ro=
+cloud.google.com/go/serviceusage v1.4.0/go.mod h1:SB4yxXSaYVuUBYUml6qklyONXNLt83U0Rb+CXyhjEeU=
+cloud.google.com/go/shell v1.4.0 h1:b1LFhFBgKsG252inyhtmsUUZwchqSz3WTvAIf3JFo4g=
+cloud.google.com/go/shell v1.4.0/go.mod h1:HDxPzZf3GkDdhExzD/gs8Grqk+dmYcEjGShZgYa9URw=
+cloud.google.com/go/spanner v1.41.0 h1:NvdTpRwf7DTegbfFdPjAWyD7bOVu0VeMqcvR9aCQCAc=
+cloud.google.com/go/spanner v1.41.0/go.mod h1:MLYDBJR/dY4Wt7ZaMIQ7rXOTLjYrmxLE/5ve9vFfWos=
+cloud.google.com/go/speech v1.9.0 h1:yK0ocnFH4Wsf0cMdUyndJQ/hPv02oTJOxzi6AgpBy4s=
+cloud.google.com/go/speech v1.9.0/go.mod h1:xQ0jTcmnRFFM2RfX/U+rk6FQNUF6DQlydUSyoooSpco=
cloud.google.com/go/storage v1.14.0 h1:6RRlFMv1omScs6iq2hfE3IvgE+l6RfJPampq8UZc5TU=
+cloud.google.com/go/storage v1.22.1/go.mod h1:S8N1cAStu7BOeFfE8KAQzmyyLkK8p/vmRq6kuBTW58Y=
+cloud.google.com/go/storage v1.27.0/go.mod h1:x9DOL8TK/ygDUMieqwfhdpQryTeEkhGKMi80i/iqR2s=
+cloud.google.com/go/storagetransfer v1.6.0 h1:fUe3OydbbvHcAYp07xY+2UpH4AermGbmnm7qdEj3tGE=
+cloud.google.com/go/storagetransfer v1.6.0/go.mod h1:y77xm4CQV/ZhFZH75PLEXY0ROiS7Gh6pSKrM8dJyg6I=
+cloud.google.com/go/talent v1.4.0 h1:MrekAGxLqAeAol4Sc0allOVqUGO8j+Iim8NMvpiD7tM=
+cloud.google.com/go/talent v1.4.0/go.mod h1:ezFtAgVuRf8jRsvyE6EwmbTK5LKciD4KVnHuDEFmOOA=
+cloud.google.com/go/texttospeech v1.5.0 h1:ccPiHgTewxgyAeCWgQWvZvrLmbfQSFABTMAfrSPLPyY=
+cloud.google.com/go/texttospeech v1.5.0/go.mod h1:oKPLhR4n4ZdQqWKURdwxMy0uiTS1xU161C8W57Wkea4=
+cloud.google.com/go/tpu v1.4.0 h1:ztIdKoma1Xob2qm6QwNh4Xi9/e7N3IfvtwG5AcNsj1g=
+cloud.google.com/go/tpu v1.4.0/go.mod h1:mjZaX8p0VBgllCzF6wcU2ovUXN9TONFLd7iz227X2Xg=
+cloud.google.com/go/trace v1.4.0 h1:qO9eLn2esajC9sxpqp1YKX37nXC3L4BfGnPS0Cx9dYo=
+cloud.google.com/go/trace v1.4.0/go.mod h1:UG0v8UBqzusp+z63o7FK74SdFE+AXpCLdFb1rshXG+Y=
+cloud.google.com/go/translate v1.4.0 h1:AOYOH3MspzJ/bH1YXzB+xTE8fMpn3mwhLjugwGXvMPI=
+cloud.google.com/go/translate v1.4.0/go.mod h1:06Dn/ppvLD6WvA5Rhdp029IX2Mi3Mn7fpMRLPvXT5Wg=
+cloud.google.com/go/video v1.9.0 h1:ttlvO4J5c1VGq6FkHqWPD/aH6PfdxujHt+muTJlW1Zk=
+cloud.google.com/go/video v1.9.0/go.mod h1:0RhNKFRF5v92f8dQt0yhaHrEuH95m068JYOvLZYnJSw=
+cloud.google.com/go/videointelligence v1.9.0 h1:RPFgVVXbI2b5vnrciZjtsUgpNKVtHO/WIyXUhEfuMhA=
+cloud.google.com/go/videointelligence v1.9.0/go.mod h1:29lVRMPDYHikk3v8EdPSaL8Ku+eMzDljjuvRs105XoU=
+cloud.google.com/go/vision/v2 v2.5.0 h1:TQHxRqvLMi19azwm3qYuDbEzZWmiKJNTpGbkNsfRCik=
+cloud.google.com/go/vision/v2 v2.5.0/go.mod h1:MmaezXOOE+IWa+cS7OhRRLK2cNv1ZL98zhqFFZaaH2E=
+cloud.google.com/go/vmmigration v1.3.0 h1:A2Tl2ZmwMRpvEmhV2ibISY85fmQR+Y5w9a0PlRz5P3s=
+cloud.google.com/go/vmmigration v1.3.0/go.mod h1:oGJ6ZgGPQOFdjHuocGcLqX4lc98YQ7Ygq8YQwHh9A7g=
+cloud.google.com/go/vmwareengine v0.1.0 h1:JMPZaOT/gIUxVlTqSl/QQ32Y2k+r0stNeM1NSqhVP9o=
+cloud.google.com/go/vmwareengine v0.1.0/go.mod h1:RsdNEf/8UDvKllXhMz5J40XxDrNJNN4sagiox+OI208=
+cloud.google.com/go/vpcaccess v1.5.0 h1:woHXXtnW8b9gLFdWO9HLPalAddBQ9V4LT+1vjKwR3W8=
+cloud.google.com/go/vpcaccess v1.5.0/go.mod h1:drmg4HLk9NkZpGfCmZ3Tz0Bwnm2+DKqViEpeEpOq0m8=
+cloud.google.com/go/webrisk v1.7.0 h1:ypSnpGlJnZSXbN9a13PDmAYvVekBLnGKxQ3Q9SMwnYY=
+cloud.google.com/go/webrisk v1.7.0/go.mod h1:mVMHgEYH0r337nmt1JyLthzMr6YxwN1aAIEc2fTcq7A=
+cloud.google.com/go/websecurityscanner v1.4.0 h1:y7yIFg/h/mO+5Y5aCOtVAnpGUOgqCH5rXQ2Oc8Oq2+g=
+cloud.google.com/go/websecurityscanner v1.4.0/go.mod h1:ebit/Fp0a+FWu5j4JOmJEV8S8CzdTkAS77oDsiSqYWQ=
+cloud.google.com/go/workflows v1.9.0 h1:7Chpin9p50NTU8Tb7qk+I11U/IwVXmDhEoSsdccvInE=
+cloud.google.com/go/workflows v1.9.0/go.mod h1:ZGkj1aFIOd9c8Gerkjjq7OW7I5+l6cSvT3ujaO/WwSA=
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9 h1:VpgP7xuJadIUuKccphEpTJnWhS2jkQyMt6Y7pJCD7fY=
github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802 h1:1BDTz0u9nC3//pOCMdNH+CiXJVYJh5UQNCOBG7jbELc=
@@ -53,10 +299,12 @@ github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEe
github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM=
github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk=
+github.com/census-instrumentation/opencensus-proto v0.3.0/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=
+github.com/chzyer/readline v1.5.0 h1:lSwwFrbNviGePhkewF1az4oLmcwqCZijQ2/Wi3BGHAI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8=
github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag=
github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I=
@@ -73,433 +321,79 @@ github.com/coreos/go-semver v0.3.0 h1:wkHLiw0WNATZnSG7epLsujiMCgPAc9xhjJ4tgnAxmf
github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
github.com/coreos/go-systemd/v22 v22.3.2 h1:D9/bQk5vlXQFZ6Kwuu6zaiXJ9oTPe68++AzAJc1DzSI=
github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA=
-github.com/cpuguy83/go-md2man/v2 v2.0.2 h1:p1EgwI/C7NhT0JmVkwCD2ZBK8j4aeHQX2pMHHBfMQ6w=
-github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
-github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w=
-github.com/dustin/go-humanize v0.0.0-20171111073723-bb3d318650d4/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
-github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5mFgVsvEsIPBvNs=
-github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU=
-github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I=
-github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M=
-github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20210217033140-668b12f5399d/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
-github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
+github.com/danieljoos/wincred v1.1.2 h1:QLdCxFs1/Yl4zduvBdcHB8goaYk9RARS2SgLLRuAyr0=
github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1 h1:xvqufLtNVwAhN8NMyWklVgxnWohi+wtMGQMhtxexlm0=
github.com/envoyproxy/protoc-gen-validate v0.1.0 h1:EQciDnbrYxy13PgWoY8AqoxGiPrpgBZ1R8UNe3ddc+A=
-github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
github.com/fatih/color v1.13.0 h1:8LOYc1KYPPmyKMuN8QV2DNRWNbLo6LZ0iLs8+mlH53w=
-github.com/fatih/color v1.13.0/go.mod h1:kLAiJbzzSOZDVNGyDpeOxJ47H46qBXwg5ILebYFFOfk=
-github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568 h1:BHsljHzVlRcyQhjrss6TZTdY2VfCqZPbv5k3iBFa2ZQ=
-github.com/franela/goblin v0.0.0-20200105215937-c9ffbefa60db/go.mod h1:7dvUGVsVBjqR7JHJk0brhHOZYGmfBYOrK0ZhYMEtBr4=
-github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20=
-github.com/frankban/quicktest v1.14.3/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps=
-github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I=
github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk=
-github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o=
github.com/go-kit/log v0.2.0 h1:7i2K3eKTos3Vc0enKCfnVcgHh2olr/MyfboYq7cAcFw=
github.com/go-logfmt/logfmt v0.5.1 h1:otpy5pqBCBZ1ng9RQ0dPu4PN7ba75Y/aA+UpowDyNVA=
-github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG5ZlKdlhCg5w=
+github.com/go-logr/logr v1.2.3 h1:2DntVwHkVopvECVRSlL5PSo9eG+cAkDCuckLubN+rq0=
+github.com/go-logr/stdr v1.2.2 h1:hSWxHoqTgW2S2qGc0LTAI563KZ5YKYRhT3MFKZMbjag=
github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk=
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0 h1:p104kn46Q8WdvHunIJ9dAyjPVtrBPhSr3KT2yUst43I=
-github.com/gogo/googleapis v1.1.0/go.mod h1:gf4bu3Q80BeJ6H1S1vYPm8/ELATdvryBaNFGgqEef3s=
-github.com/gogo/protobuf v1.2.0/go.mod h1:r8qH/GZQm5c6nD/R0oafs1akxWv10x8SbQlK7atdtwQ=
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b h1:VKtxabqXZkF25pY9ekfRL6a582T4P37/31XEstQ5p58=
-github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE=
-github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc=
-github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
-github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
-github.com/golang/snappy v0.0.0-20180518054509-2e65f85255db/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
-github.com/golang/snappy v0.0.3 h1:fHPg5GQYlCeLIPB9BZqMVR5nR9A+IM5zcgeTdjMYmLA=
-github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo=
-github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
github.com/google/gofuzz v1.0.0 h1:A8PeW59pxE9IoFRqBp37U+mSNaQoZ46F1f0f863XSXw=
github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no=
github.com/google/martian/v3 v3.1.0 h1:wCKgOCHuUEVfsaQLpPSJb7VdYCdTVZQAuOdYm1yc/60=
-github.com/google/martian/v3 v3.2.1 h1:d8MncMlErDFTwQGBK1xhv026j9kqhvw1Qv9IbWT1VLQ=
-github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
-github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38 h1:yAJXTCF9TqKcTiHJAE8dj7HMvPfh66eeA2JYW7eFpSE=
-github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1 h1:K6RDEckDVWvDI9JAJYCmNdQXq6neHJOYx3V6jnqNEec=
-github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA=
-github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
-github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
-github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
-github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM=
-github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM=
github.com/googleapis/gax-go/v2 v2.4.0 h1:dS9eYAjhrE2RjmzYw2XAPvcXfmcQLtFEQWn0CR82awk=
-github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c=
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4=
-github.com/gorilla/context v1.1.1/go.mod h1:kBGZzfjB9CEq2AlWe17Uuf7NDRt0dE0s8S51q0aT7Yg=
-github.com/gorilla/mux v1.6.2/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
-github.com/gorilla/mux v1.7.3/go.mod h1:1lud6UwP+6orDFRuTfBEV8e9/aOM/c4fVVCaMa2zaAs=
-github.com/gorilla/websocket v0.0.0-20170926233335-4201258b820c/go.mod h1:E7qHFY5m1UJ88s3WnNqhKjPHQ0heANvMoAMk2YaljkQ=
-github.com/grpc-ecosystem/go-grpc-middleware v1.0.1-0.20190118093823-f849b5445de4/go.mod h1:FiyG127CGDf3tlThmgyCl78X/SZQqEOJBCDaAfeWzPs=
-github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t/GYV9WGTSLVdBhOQFDY=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
-github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE=
github.com/hashicorp/consul/api v1.12.0 h1:k3y1FYv6nuKyNTqj6w9gXOx5r5CfLj/k/euUeBXj1OY=
-github.com/hashicorp/consul/api v1.12.0/go.mod h1:6pVBMo0ebnYdt2S3H87XhekM/HHrUoTD2XXb/VrZVy0=
-github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8=
-github.com/hashicorp/consul/sdk v0.8.0/go.mod h1:GBvyrGALthsZObzUGsfgHZQDXjg4lOjagTIwIR1vPms=
-github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80=
github.com/hashicorp/go-cleanhttp v0.5.2 h1:035FKYIWjmULyFRBKPs8TBQoi0x6d9G4xc9neXJWAZQ=
-github.com/hashicorp/go-cleanhttp v0.5.2/go.mod h1:kO/YDlP8L1346E6Sodw+PrpBSV4/SoxCXGY6BqNFT48=
-github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-hclog v1.2.0 h1:La19f8d7WIlm4ogzNHB0JGqs5AUDAZ2UfCY4sJXcJdM=
-github.com/hashicorp/go-hclog v1.2.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ=
github.com/hashicorp/go-immutable-radix v1.3.1 h1:DKHmCUm2hRBK510BaiZlwvpD40f8bJFeZnpfm2KLowc=
-github.com/hashicorp/go-immutable-radix v1.3.1/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60=
-github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA=
-github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs=
github.com/hashicorp/go-rootcerts v1.0.2 h1:jzhAVGtqPKbwpyCPELlgNWhE1znq+qwJtW5Oi2viEzc=
-github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8=
-github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
github.com/hashicorp/golang-lru v0.5.4 h1:YDjusn29QI/Das2iO9M0BHnIbxPeyuCHsjMW+lJfyTc=
-github.com/hashicorp/golang-lru v0.5.4/go.mod h1:iADmTwqILo4mZ8BN3D2Q6+9jd8WM5uGBxy+E8yxSoD4=
-github.com/hashicorp/mdns v1.0.4/go.mod h1:mtBihi+LeNXGtG8L9dX59gAEa12BDtBQSp4v/YAJqrc=
-github.com/hashicorp/memberlist v0.3.0/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE=
-github.com/hashicorp/serf v0.9.6/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
github.com/hashicorp/serf v0.9.7 h1:hkdgbqizGQHuU5IPqYM1JdSMV8nKfpuOnZYXssk9muY=
-github.com/hashicorp/serf v0.9.7/go.mod h1:TXZNMjZQijwlDvp+r0b63xZ45H7JmCmgg4gpTwn9UV4=
github.com/hpcloud/tail v1.0.0 h1:nfCOvKYfkgYP8hkirhJocXT2+zOD8yUNjXaWfTlyFKI=
-github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg=
-github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639 h1:mV02weKRL81bEnm8A0HT1/CAelMQDBuQIfLw8n+d6xI=
-github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo=
-github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k=
+github.com/ianlancetaylor/demangle v0.0.0-20220319035150-800ac71e25c2 h1:rcanfLhLDA8nozr/K289V1zcntHr3V+SHlXwzz1ZI2g=
github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA=
-github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
-github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
github.com/jstemmer/go-junit-report v1.0.0 h1:8X1gzZpR+nVQLAht+L/foqOeX2l9DTZoaIPbEQHxsds=
github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U=
github.com/kisielk/errcheck v1.5.0 h1:e8esj/e4R+SAOwFwN+n3zr0nYeCyeweozKfO23MvHzY=
github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg=
-github.com/klauspost/compress v1.14.4/go.mod h1:/3/Vjq9QcHkK5uEr5lBEmyoZ1iFhe47etQ6QUkpK6sk=
-github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/konsorten/go-windows-terminal-sequences v1.0.3 h1:CE8S1cTafDpPvMhIxNJKvHsGVBgn1xWYf1NbHQhywc8=
github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8=
github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY=
-github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw=
-github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM=
-github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4=
-github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ=
-github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
-github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
-github.com/mattn/go-colorable v0.1.9/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
github.com/mattn/go-colorable v0.1.12 h1:jF+Du6AlPIjs2BiUiQlKOX0rt3SujHxPnksPKZbaA40=
-github.com/mattn/go-colorable v0.1.12/go.mod h1:u5H1YNBxpqRaxsYJYSkiCWKzEfiAb1Gb520KVy5xxl4=
-github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
-github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
-github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
-github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
-github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
github.com/mattn/go-isatty v0.0.14 h1:yVuAays6BHfxijgZPzw+3Zlu5yQgKGP2/hcQbHb7S9Y=
-github.com/mattn/go-isatty v0.0.14/go.mod h1:7GGIvUiUoEMVVmxf/4nioHXj79iQHKdU27kJ6hsGG94=
-github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
-github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=
-github.com/miekg/dns v1.1.41/go.mod h1:p6aan82bvRIyn+zDIv9xYNUpwa73JcSh9BKwknJysuI=
-github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI=
-github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f h1:KUppIJq7/+SVif2QVs3tOP0zanoHgBEVAwHxUSIzRqU=
-github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
-github.com/nats-io/jwt v0.3.2 h1:+RB5hMpXUUA2dfxuhBTEkMOrYmM+gKIZYS1KjSostMI=
-github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU=
-github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k=
-github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
-github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
-github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
-github.com/nginxinc/nginx-plus-go-client v0.8.0/go.mod h1:DBAmdDP71tOhgFPdCMVusegzdKmLVpVL0nVcMX17pbY=
-github.com/nginxinc/nginx-prometheus-exporter v0.9.0/go.mod h1:IDlTI98WaztOTMWG68EjsUTM9epAvLrYD1P9pGh/QDk=
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs=
-github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs=
-github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
-github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo=
-github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
+github.com/oklog/ulid/v2 v2.1.0 h1:+9lhoxAP56we25tyYETBBY1YLA2SaoLvUFgrP2miPJU=
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ=
-github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
-github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk=
-github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis=
-github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74=
-github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o=
github.com/opentracing/opentracing-go v1.1.0 h1:pWlfV3Bxv7k65HYwkikxat0+s3pV4bsqf19k25Ur8rU=
-github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA=
-github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw=
-github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
-github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4=
-github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM=
-github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc=
-github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k=
-github.com/pelletier/go-toml/v2 v2.0.1/go.mod h1:r9LEWfGN8R5k0VXJ+0BkIe7MYkRdwZOjgMj2KwnJFUo=
-github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac=
-github.com/pierrec/lz4 v1.0.2-0.20190131084431-473cd7ce01a1/go.mod h1:3/3N9NVKO0jef7pBehbT1qWhCMrIgbYNnFAZCqQ5LRc=
-github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
-github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
-github.com/pkg/profile v1.2.1/go.mod h1:hJw3o1OdXxsrSjjVksARp5W95eeEaEfptyVZyv6JUPA=
github.com/pkg/sftp v1.13.1 h1:I2qBYMChEhIjOgazfJmV3/mZM256btk6wkCDRmW7JYs=
-github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s=
-github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs=
-github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeDPbaTKGT+JTgUa3og=
-github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU=
-github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU=
-github.com/prometheus/client_golang v1.11.1/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0=
-github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo=
-github.com/prometheus/client_model v0.1.0/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/prometheus/common v0.2.0/go.mod h1:TNfzLD0ON7rHzMJeJkieUDPYmFC7Snx/y86RQel1bk4=
-github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt26CguLLsqA=
-github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4=
-github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
-github.com/prometheus/common v0.19.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s=
-github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk=
-github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A=
-github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4=
-github.com/rogpeppe/fastuuid v1.2.0 h1:Ppwyp6VYCF1nvBTXL3trRso7mXMlRrw9ooo375wvi2s=
-github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
+github.com/russross/blackfriday v1.6.0 h1:KqfZb0pUVN2lYqZUYRddxF4OR8ZMURnJIG5Y3VRLtww=
github.com/sagikazarmark/crypt v0.6.0 h1:REOEXCs/NFY/1jOCEouMuT4zEniE5YoXbvpC5X/TLF8=
-github.com/sagikazarmark/crypt v0.6.0/go.mod h1:U8+INwJo3nBv1m6A/8OBXAq7Jnpspk5AxSgDyEQcea8=
-github.com/samuel/go-zookeeper v0.0.0-20190923202752-2cc03de413da/go.mod h1:gi+0XIa01GRL2eRQVjQkKGqKF3SF9vZR/HnPullcV2E=
-github.com/shurcooL/sanitized_anchor_name v1.0.0 h1:PdmoCO6wvbs+7yrJyMORt4/BmY5IYyJwS/kOiWx8mHo=
-github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
-github.com/sony/gobreaker v0.4.1/go.mod h1:ZKptC7FHNvhBz7dN2LGjPVBz2sZJmc0/PkyDJOjmxWY=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72 h1:qLC7fQah7D6K1B0ujays3HV9gkFtllcxhzImRR7ArPQ=
-github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
-github.com/spf13/cobra v0.0.3/go.mod h1:1l0Ry5zgKvJasoi3XT1TypsSe7PqH0Sj9dhYf7v3XqQ=
-github.com/spf13/cobra v1.2.1/go.mod h1:ExllRjgxM/piMAM+3tAZvg8fsklGAf3tPfi+i8t68Nk=
-github.com/spf13/pflag v1.0.1/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
-github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
-github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw=
-github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI=
-github.com/subosito/gotenv v1.3.0/go.mod h1:YzJjq/33h7nrwdY+iHMhEOEEbW0ovIz0tB6t6PwAXzs=
-github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U=
-github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM=
-github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijbERA=
-github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0=
-github.com/urfave/cli/v2 v2.3.0 h1:qph92Y649prgesehzOrQjdWyxFOp/QVM+6imKHad91M=
+github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f h1:J9EGpcZtP0E/raorCMxlFGSTBrsSlaDGf3jU/qvAE2c=
+github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 h1:EzJWgHovont7NscjpAxXsDA8S8BMYve8Y5+7cuRE7R0=
+github.com/xeipuuv/gojsonschema v1.2.0 h1:LhYJRs+L4fBtjZUfuSZIKGeVu0QRy8e5Xi7D17UxZ74=
github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE=
-github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY=
-gitlab.com/f5/nginx/agent/product/nginx-agent/sdk/v2 v2.16.7 h1:BP5fSvOYAYE8JM2Bh+mqPk4x+0tzgA2T8dofOuuwEtY=
-gitlab.com/f5/nginx/agent/product/nginx-agent/sdk/v2 v2.16.7/go.mod h1:Thlo11vvA//Y2z5pL2ippM7sf3iOsanrJKCXhlC/vXA=
-gitlab.com/f5/nginx/agent/product/nginx-agent/v2 v2.16.7 h1:6eCOi25Bv/mAU3OGkYDoCB24nLmBMwxbzfgwBbFxsME=
-gitlab.com/f5/nginx/agent/product/nginx-agent/v2 v2.16.7/go.mod h1:Tx2Q5VD5dEk10sdkT6cPFk5787kqDtU0C6ACFneoZi0=
-gitlab.com/f5/nginx/crossplane-go v0.2.1/go.mod h1:WELKPHoXidafN90KF+q6Caix3TUiMKtw2OEovFZM0Kc=
-go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU=
-go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg=
go.etcd.io/etcd/api/v3 v3.5.4 h1:OHVyt3TopwtUQ2GKdd5wu3PmmipR4FTwCqoEjSyRdIc=
-go.etcd.io/etcd/api/v3 v3.5.4/go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A=
go.etcd.io/etcd/client/pkg/v3 v3.5.4 h1:lrneYvz923dvC14R54XcA7FXoZ3mlGZAgmwhfm7HqOg=
-go.etcd.io/etcd/client/pkg/v3 v3.5.4/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g=
go.etcd.io/etcd/client/v2 v2.305.4 h1:Dcx3/MYyfKcPNLpR4VVQUP5KgYrBeJtktBwEKkw08Ao=
-go.etcd.io/etcd/client/v2 v2.305.4/go.mod h1:Ud+VUwIi9/uQHOMA+4ekToJ12lTxlv0zB/+DHwTGEbU=
go.etcd.io/etcd/client/v3 v3.5.4 h1:p83BUL3tAYS0OT/r0qglgc3M1JjhM0diV8DSWAhVXv4=
-go.etcd.io/etcd/client/v3 v3.5.4/go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY=
-go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
-go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk=
-go.opencensus.io v0.23.0 h1:gqCw0LfLxScz8irSi8exQc7fyQ0fKQU/qnC/X8+V/1M=
-go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
-go.opentelemetry.io/proto/otlp v0.7.0 h1:rwOQPCuKAKmwGKq2aVNnYIibI6wnV7EvzgfTCzcdGg8=
-go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
-go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
-go.uber.org/multierr v1.6.0 h1:y6IPFStTAIT5Ytl7/XYmHvzXQ7S3g/IeZW9hyZ5thw4=
-go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
-go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
-go.uber.org/zap v1.17.0 h1:MTjgFu6ZLKvY6Pvaqk97GlxNBuMpV4Hy/3P6tRGlI2U=
-golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
-golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY=
-golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
-golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4 h1:kUhD7nTDoI3fVd9G4ORWrbV5NY0liEs/Jg2pv5f+bBA=
-golang.org/x/crypto v0.0.0-20220411220226-7b82a4e95df4/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
-golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6 h1:QE6XYQK6naiK1EPAe1g/ILLxN5RBoH5xkJk3CqlMI/Y=
+golang.org/x/exp v0.0.0-20221211140036-ad323defaf05 h1:T8EldfGCcveFMewH5xAYxxoX3PSQMrsechlUGVFlQBU=
golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4=
golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 h1:VLliZ0d+/avPrXXH+OakdXhpJuEoBZuwh1m2j7U6Iug=
-golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs=
-golang.org/x/net v0.0.0-20190125091013-d26f9f9a57f3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
-golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
-golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
-golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
-golang.org/x/net v0.0.0-20210410081132-afb366fc7cd1/go.mod h1:9tjilg8BloeKEkVJvy7fQ90B1CfIiPueXVOjqfkSzI8=
-golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
-golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
-golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20211005180243-6b3c2da341f1/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
-golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
-golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5 h1:OSnWWcOd/CtWQC2cYSBgbTSJv3ciqd8r54ySIW2y3RE=
-golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
-golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20220601150217-0de741cfad7f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
-golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210303074136-134d130e1a04/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20210927094055-39ccf1dd6fa6/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20211007075335-d3039528d8ac/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220405052023-b1e9470b6e64/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY=
-golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
-golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
-golang.org/x/tools v0.0.0-20180828015842-6cd1fcedba52/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
-golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
-golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
-golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
-golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/oauth2 v0.1.0 h1:isLCZuhj4v+tYv7eskaN4v/TM+A1begWWgyVJDdl1+Y=
golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df h1:5Pf6pFKu98ODmgnpvkJ3kFUOQGGLIzLIkbzUHp47618=
-golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
-google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk=
-google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
-google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
-google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=
-google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=
-google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
-google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
-google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
-google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
-google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
-google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
-google.golang.org/api v0.59.0/go.mod h1:sT2boj7M9YJxZzgeZqXogmhfmRWDtPzT31xkieUbuZU=
-google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
-google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo=
-google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g=
-google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA=
-google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8=
-google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs=
-google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA=
-google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw=
google.golang.org/api v0.81.0 h1:o8WF5AvfidafWbFjsRyupxyEQJNUWxLZJCK5NXrxZZ8=
-google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko=
-google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4=
google.golang.org/appengine v1.6.7 h1:FZR1q0exgwxzPzp/aF+VccGrSfxfPpkBqjIIEq3ru6c=
-google.golang.org/genproto v0.0.0-20190530194941-fb225487d101/go.mod h1:z3L6/3dTEVtUr6QSP8miRzeRqwQOioJ9I66odjN4I7s=
-google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
-google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
-google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
-google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=
-google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
-google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
-google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
-google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
-google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
-google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
-google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
-google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
-google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
-google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
-google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211008145708-270636b82663/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211028162531-8db9c33dc351/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
-google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
-google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
-google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
-google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
-google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
-google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
-google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
-google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
-google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
-google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
-google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
-google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
-google.golang.org/grpc v1.17.0/go.mod h1:6QZJwpn2B+Zp71q/5VxRsJ6NXXVCE5NRUHRo+f3cWCs=
-google.golang.org/grpc v1.20.0/go.mod h1:chYK+tFQF0nDUGJgXMSgLCQk3phJEuONr2DCgLDdAQM=
-google.golang.org/grpc v1.21.0/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
-google.golang.org/grpc v1.22.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.23.1/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
-google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc v1.38.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
-google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
-google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
-google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
-google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
-google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
-google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
-google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
-google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
-google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
-google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc=
-gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw=
gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8=
gopkg.in/fsnotify.v1 v1.4.7 h1:xOHLXZwVvI9hhs+cLKq5+I5onOuwQLhQwiu63xxlHs4=
-gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o=
-gopkg.in/yaml.v3 v3.0.0/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
-honnef.co/go/tools v0.0.0-20180728063816-88497007e858/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4=
honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8=
rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE=
rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY=
rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4=
-sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o=
-sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc=
-sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU=
diff --git a/scripts/tools.go b/scripts/tools.go
index 5ec13a3dd..080332ea9 100644
--- a/scripts/tools.go
+++ b/scripts/tools.go
@@ -11,5 +11,5 @@ import (
_ "github.com/maxbrunsfeld/counterfeiter/v6"
_ "github.com/mwitkow/go-proto-validators/protoc-gen-govalidators"
_ "google.golang.org/grpc/cmd/protoc-gen-go-grpc"
- _ "google.golang.org/protobuf/cmd/protoc-gen-go"
+ _ "github.com/bufbuild/buf/cmd/buf"
)
diff --git a/sdk/Makefile b/sdk/Makefile
index 8403a85e6..8df31cf4c 100644
--- a/sdk/Makefile
+++ b/sdk/Makefile
@@ -23,7 +23,10 @@ Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\
Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\
Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:\
./proto/$$packageName/ \
+ --doc_out=./../docs/proto/ \
+ --doc_opt=markdown,$$packageName.md \
proto/$$packageName/*.proto;\
+ grep -v '^swagger:' ./../docs/proto/$$packageName.md > ./../docs/proto/tmp-$$packageName.md && mv ./../docs/proto/tmp-$$packageName.md ./../docs/proto/$$packageName.md;\
done
protoc \
@@ -40,7 +43,10 @@ Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\
Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\
Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:\
./proto/ \
- proto/*.proto
+ --doc_out=./../docs/proto/ \
+ --doc_opt=markdown,proto.md \
+ proto/*.proto; \
+ grep -v '^swagger:' ./../docs/proto/proto.md > ./../docs/proto/tmp-proto.md && mv ./../docs/proto/tmp-proto.md ./../docs/proto/proto.md
go generate ./sdk/...
diff --git a/sdk/go.mod b/sdk/go.mod
index f047fe68f..a01e779a0 100644
--- a/sdk/go.mod
+++ b/sdk/go.mod
@@ -8,21 +8,21 @@ require (
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
github.com/nginxinc/nginx-go-crossplane v0.4.1
github.com/sirupsen/logrus v1.9.0
- github.com/stretchr/testify v1.8.0
- google.golang.org/grpc v1.48.0
+ github.com/stretchr/testify v1.8.1
+ google.golang.org/grpc v1.51.0
)
require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/golang/protobuf v1.5.2 // indirect
- github.com/google/go-cmp v0.5.8 // indirect
+ github.com/google/go-cmp v0.5.9 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
- github.com/stretchr/objx v0.4.0 // indirect
- golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 // indirect
- golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 // indirect
- golang.org/x/text v0.4.0 // indirect
- google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 // indirect
- google.golang.org/protobuf v1.28.1 // indirect
+ github.com/stretchr/objx v0.5.0 // indirect
+ golang.org/x/net v0.4.0 // indirect
+ golang.org/x/sys v0.3.0 // indirect
+ golang.org/x/text v0.5.0 // indirect
+ google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 // indirect
+ google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
diff --git a/sdk/go.sum b/sdk/go.sum
index 63c066ac3..cd7025b05 100644
--- a/sdk/go.sum
+++ b/sdk/go.sum
@@ -1,21 +1,13 @@
cloud.google.com/go v0.26.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
-cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
-github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4=
github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
-github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
-github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
-github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
@@ -23,12 +15,9 @@ github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSs
github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4=
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
-github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
-github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as=
github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk=
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
@@ -45,9 +34,7 @@ github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:x
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
-github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8=
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
-github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
github.com/golang/protobuf v1.5.2 h1:ROPKBNFfQgOUMifHyP+KYbvpjbdoFNs+aK7DXlji0Tw=
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
@@ -55,16 +42,12 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
-github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/pprof v0.0.0-20210407192527-94a9f03dee38/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
-github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/jstemmer/go-junit-report v1.0.0/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
@@ -98,7 +81,6 @@ github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINE
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
-github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/rogpeppe/go-internal v1.6.1/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
@@ -107,19 +89,20 @@ github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
github.com/yuin/goldmark v1.4.1/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k=
-go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
@@ -137,26 +120,22 @@ golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
-golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190213061140-3a22650c66bd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
-golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 h1:N9Vc/rorQUDes6B9CNdIxAn5jODGj2wzfrei2x4wNj4=
-golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
+golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
+golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
-golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
@@ -174,23 +153,22 @@ golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
-golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220315194320-039c03cc5b86/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 h1:9vYwv7OjYaky/tlAeD7C4oC9EsPTlaFl1H2jS++V+ME=
-golang.org/x/sys v0.0.0-20220804214406-8e32c043e418/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
+golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
-golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
+golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY=
@@ -210,33 +188,25 @@ google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7
google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc=
google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc=
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
-google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 h1:sRT5xdTkj1Kbk30qbYC7VyMj73N5pZYsw6v+Nrzdhno=
-google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
+google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 h1:jmIfw8+gSvXcZSgaFAGyInDXeWzUhvYH57G/5GKMn70=
+google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.23.0/go.mod h1:Y5yQAOtifL1yxbo5wqy6BxZv8vAUGQwXBOALyacEbxg=
google.golang.org/grpc v1.25.1/go.mod h1:c3i+UQWmh7LiEpx4sFZnkU36qjEYZ0imhYfXVyQciAY=
google.golang.org/grpc v1.27.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk=
google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3IjizoKk=
-google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
-google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
-google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
+google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
-google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
-google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
-google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk=
+google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
@@ -245,7 +215,6 @@ gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
diff --git a/sdk/proto/agent.pb.go b/sdk/proto/agent.pb.go
index f0335e02e..ca50f0ae9 100644
--- a/sdk/proto/agent.pb.go
+++ b/sdk/proto/agent.pb.go
@@ -24,12 +24,17 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Different status codes for agent connect response
type AgentConnectStatus_StatusCode int32
const (
- AgentConnectStatus_CONNECT_UNKNOWN AgentConnectStatus_StatusCode = 0
- AgentConnectStatus_CONNECT_OK AgentConnectStatus_StatusCode = 1
- AgentConnectStatus_CONNECT_REJECTED_OTHER AgentConnectStatus_StatusCode = 2
+ // Unknown status of the agent connect request
+ AgentConnectStatus_CONNECT_UNKNOWN AgentConnectStatus_StatusCode = 0
+ // Agent connect request was successful
+ AgentConnectStatus_CONNECT_OK AgentConnectStatus_StatusCode = 1
+ // Agent connect request was rejected
+ AgentConnectStatus_CONNECT_REJECTED_OTHER AgentConnectStatus_StatusCode = 2
+ // Agent connect request was rejected because an agent with the same ID is already registered
AgentConnectStatus_CONNECT_REJECTED_DUP_ID AgentConnectStatus_StatusCode = 3
)
@@ -55,13 +60,19 @@ func (AgentConnectStatus_StatusCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_56ede974c0020f77, []int{1, 0}
}
+// Log level enum
type AgentLogging_Level int32
const (
- AgentLogging_INFO AgentLogging_Level = 0
+ // info level
+ AgentLogging_INFO AgentLogging_Level = 0
+ // debug level
AgentLogging_DEBUG AgentLogging_Level = 1
- AgentLogging_WARN AgentLogging_Level = 2
+ // warn level
+ AgentLogging_WARN AgentLogging_Level = 2
+ // error level
AgentLogging_ERROR AgentLogging_Level = 3
+ // fatal level
AgentLogging_FATAL AgentLogging_Level = 4
)
@@ -89,10 +100,16 @@ func (AgentLogging_Level) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_56ede974c0020f77, []int{6, 0}
}
+// Represents an agent connect request that is sent from the agent to the management server
type AgentConnectRequest struct {
- Meta *AgentMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
- Details []*NginxDetails `protobuf:"bytes,3,rep,name=details,proto3" json:"details"`
- Host *HostInfo `protobuf:"bytes,4,opt,name=host,proto3" json:"host"`
+ // Provides meta information about the agent
+ Meta *AgentMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
+ // Provides information about the NGINX instances that are present.
+ // This data will be moving to dataplane_software_details in a future release
+ Details []*NginxDetails `protobuf:"bytes,3,rep,name=details,proto3" json:"details"`
+ // Provides information about the host system
+ Host *HostInfo `protobuf:"bytes,4,opt,name=host,proto3" json:"host"`
+ // Provides information about software installed in the system (e.g. App Protect WAF, NGINX, etc.)
DataplaneSoftwareDetails []*DataplaneSoftwareDetails `protobuf:"bytes,5,rep,name=dataplane_software_details,json=dataplaneSoftwareDetails,proto3" json:"dataplane_software_details"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -160,13 +177,17 @@ func (m *AgentConnectRequest) GetDataplaneSoftwareDetails() []*DataplaneSoftware
return nil
}
+// Represents an agent connect status
type AgentConnectStatus struct {
- StatusCode AgentConnectStatus_StatusCode `protobuf:"varint,1,opt,name=statusCode,proto3,enum=f5.nginx.agent.sdk.AgentConnectStatus_StatusCode" json:"status_code"`
- Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message"`
- Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Provides a status of the agent connect response
+ StatusCode AgentConnectStatus_StatusCode `protobuf:"varint,1,opt,name=statusCode,proto3,enum=f5.nginx.agent.sdk.AgentConnectStatus_StatusCode" json:"status_code"`
+ // Provides a user friendly message to describe the response
+ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message"`
+ // Provides an error message of why the agent connect request was rejected
+ Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *AgentConnectStatus) Reset() { *m = AgentConnectStatus{} }
@@ -223,8 +244,11 @@ func (m *AgentConnectStatus) GetError() string {
return ""
}
+// Represents an agent connect response that is sent from the management server to the agent
type AgentConnectResponse struct {
- AgentConfig *AgentConfig `protobuf:"bytes,1,opt,name=agent_config,json=agentConfig,proto3" json:"agent_config"`
+ // Agent configuration
+ AgentConfig *AgentConfig `protobuf:"bytes,1,opt,name=agent_config,json=agentConfig,proto3" json:"agent_config"`
+ // Agent connect request status
Status *AgentConnectStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -278,6 +302,8 @@ func (m *AgentConnectResponse) GetStatus() *AgentConnectStatus {
return nil
}
+// Represents an agent config request that is sent from the agent to the management server.
+// This is used by the agent to request the agent configuration from the management server.
type AgentConfigRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -317,9 +343,14 @@ func (m *AgentConfigRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_AgentConfigRequest proto.InternalMessageInfo
+// Represents an agent's configuration. The message is sent from the management server to the agent.
type AgentConfig struct {
- Details *AgentDetails `protobuf:"bytes,1,opt,name=details,proto3" json:"details"`
- Loggers *AgentLogging `protobuf:"bytes,2,opt,name=loggers,proto3" json:"loggers"`
+ // Provides information about the agent
+ Details *AgentDetails `protobuf:"bytes,1,opt,name=details,proto3" json:"details"`
+ // Provides information about the agent logging.
+ // This is will be implemented in a future release.
+ Loggers *AgentLogging `protobuf:"bytes,2,opt,name=loggers,proto3" json:"loggers"`
+ // Provides meta information about the nginx configurations
Configs *ConfigReport `protobuf:"bytes,3,opt,name=configs,proto3" json:"configs"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -380,10 +411,15 @@ func (m *AgentConfig) GetConfigs() *ConfigReport {
return nil
}
+// Represents agent details. This message is sent from the management server to the agent.
type AgentDetails struct {
- Features []string `protobuf:"bytes,1,rep,name=features,proto3" json:"features"`
- Extensions []string `protobuf:"bytes,2,rep,name=extensions,proto3" json:"extensions"`
- Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags"`
+ // List of agent feature that are enabled
+ Features []string `protobuf:"bytes,1,rep,name=features,proto3" json:"features"`
+ // List of agent extensions that are enabled
+ Extensions []string `protobuf:"bytes,2,rep,name=extensions,proto3" json:"extensions"`
+ // List of tags
+ Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags"`
+ // Alias name for the agent
Alias string `protobuf:"bytes,4,opt,name=alias,proto3" json:"alias"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -451,17 +487,25 @@ func (m *AgentDetails) GetAlias() string {
return ""
}
+// Represents agent logging details
type AgentLogging struct {
- Level AgentLogging_Level `protobuf:"varint,1,opt,name=level,proto3,enum=f5.nginx.agent.sdk.AgentLogging_Level" json:"level"`
- Dir string `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir"`
- File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file"`
- MaxSize uint32 `protobuf:"varint,4,opt,name=max_size,json=maxSize,proto3" json:"max_size"`
- MaxBackups uint32 `protobuf:"varint,5,opt,name=max_backups,json=maxBackups,proto3" json:"max_backups"`
- MaxAge uint32 `protobuf:"varint,6,opt,name=max_age,json=maxAge,proto3" json:"max_age"`
- Compress bool `protobuf:"varint,7,opt,name=compress,proto3" json:"compress"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Log level
+ Level AgentLogging_Level `protobuf:"varint,1,opt,name=level,proto3,enum=f5.nginx.agent.sdk.AgentLogging_Level" json:"level"`
+ // Directory where the logs are located
+ Dir string `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir"`
+ // Name of the log file
+ File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file"`
+ // Max size of the log file in MB
+ MaxSize uint32 `protobuf:"varint,4,opt,name=max_size,json=maxSize,proto3" json:"max_size"`
+ // Max number of backups
+ MaxBackups uint32 `protobuf:"varint,5,opt,name=max_backups,json=maxBackups,proto3" json:"max_backups"`
+ // Max age of a log file in days
+ MaxAge uint32 `protobuf:"varint,6,opt,name=max_age,json=maxAge,proto3" json:"max_age"`
+ // Is the log file compressed
+ Compress bool `protobuf:"varint,7,opt,name=compress,proto3" json:"compress"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *AgentLogging) Reset() { *m = AgentLogging{} }
@@ -546,17 +590,25 @@ func (m *AgentLogging) GetCompress() bool {
return false
}
+// Represents agent metadata
type AgentMeta struct {
- Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name"`
- Tag []string `protobuf:"bytes,3,rep,name=tag,proto3" json:"tag"`
- InstanceGroup string `protobuf:"bytes,5,opt,name=instance_group,json=instanceGroup,proto3" json:"instance_group"`
- Updated *types.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated"`
- SystemUid string `protobuf:"bytes,7,opt,name=system_uid,json=systemUid,proto3" json:"system_uid"`
- AgentDetails *AgentDetails `protobuf:"bytes,8,opt,name=agent_details,json=agentDetails,proto3" json:"agent_details"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Version of the agent
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
+ // User friendly name for the agent
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name"`
+ // List of tags
+ Tag []string `protobuf:"bytes,3,rep,name=tag,proto3" json:"tag"`
+ // Instance group name used to group NGINX instances
+ InstanceGroup string `protobuf:"bytes,5,opt,name=instance_group,json=instanceGroup,proto3" json:"instance_group"`
+ // Last time agent was updated
+ Updated *types.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated"`
+ // ID of the system where the agent is installed
+ SystemUid string `protobuf:"bytes,7,opt,name=system_uid,json=systemUid,proto3" json:"system_uid"`
+ // Provides other agent information
+ AgentDetails *AgentDetails `protobuf:"bytes,8,opt,name=agent_details,json=agentDetails,proto3" json:"agent_details"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *AgentMeta) Reset() { *m = AgentMeta{} }
@@ -663,69 +715,69 @@ var fileDescriptor_56ede974c0020f77 = []byte{
0x88, 0x2a, 0x58, 0x81, 0x52, 0x14, 0x05, 0xe1, 0x22, 0x59, 0x8a, 0x63, 0xc7, 0x48, 0xd4, 0x58,
0xae, 0x50, 0x5c, 0xb6, 0xc6, 0xda, 0xd1, 0x66, 0xb1, 0x76, 0x57, 0xec, 0x8c, 0x8c, 0x9c, 0x47,
0xe0, 0x21, 0xb8, 0x72, 0xe1, 0x01, 0x78, 0x04, 0x8e, 0x3c, 0xc1, 0x16, 0xe5, 0x13, 0xb5, 0x67,
- 0x2e, 0xdc, 0xa8, 0xf9, 0x59, 0x5b, 0xc6, 0x3f, 0xc9, 0x65, 0xb6, 0xfb, 0x9b, 0xee, 0x9e, 0x9e,
+ 0x2e, 0xdc, 0xa8, 0xf9, 0x59, 0x5b, 0xc6, 0x3f, 0xc9, 0x65, 0xa6, 0xfb, 0xdb, 0xee, 0x9e, 0x9e,
0x6f, 0xa6, 0x7b, 0x16, 0xaa, 0xc4, 0xa3, 0x21, 0xb7, 0xe7, 0x71, 0xc4, 0x23, 0x84, 0xa6, 0x9f,
- 0xdb, 0xa1, 0xe7, 0x87, 0x4b, 0x5b, 0xa1, 0xcc, 0x3d, 0xae, 0x83, 0x17, 0x79, 0x91, 0x9a, 0xaf,
- 0xc3, 0xcb, 0x88, 0x69, 0xdb, 0xfa, 0xfa, 0x24, 0x0a, 0xa7, 0xbe, 0xa7, 0xb5, 0xaa, 0x72, 0x53,
- 0x8a, 0xe5, 0x45, 0x91, 0x37, 0xa3, 0x6d, 0xa9, 0x1d, 0x2d, 0xa6, 0x6d, 0xee, 0x07, 0x94, 0x71,
- 0x12, 0xcc, 0xb5, 0xc1, 0x03, 0x77, 0xee, 0xb0, 0x68, 0xca, 0x7f, 0x22, 0x31, 0x75, 0x5c, 0xca,
- 0x89, 0x3f, 0x63, 0x6a, 0xaa, 0xf9, 0x4f, 0x0e, 0xee, 0x75, 0xc5, 0xe2, 0xdb, 0x51, 0x18, 0xd2,
- 0x09, 0xc7, 0xf4, 0xc7, 0x05, 0x65, 0x1c, 0x3d, 0x81, 0x42, 0x40, 0x39, 0xa9, 0xe5, 0x1a, 0x46,
- 0xab, 0xda, 0x79, 0xcf, 0xbe, 0x9a, 0xa9, 0x2d, 0xdd, 0xbe, 0xa1, 0x9c, 0xf4, 0xca, 0x69, 0x62,
- 0x49, 0x73, 0x2c, 0x47, 0xb4, 0x03, 0x25, 0xbd, 0x4a, 0x2d, 0xdf, 0xc8, 0xb7, 0xaa, 0x9d, 0xc6,
- 0x75, 0xfe, 0x43, 0xa1, 0xf7, 0x95, 0x5d, 0xaf, 0x9a, 0x26, 0x56, 0xe6, 0x84, 0x33, 0x01, 0x7d,
- 0x05, 0x05, 0x41, 0x41, 0xad, 0x20, 0xb3, 0x78, 0x78, 0x5d, 0x94, 0x67, 0x11, 0xe3, 0xbb, 0xe1,
- 0x34, 0x52, 0x49, 0x08, 0x6b, 0x2c, 0x47, 0xf4, 0xb3, 0x01, 0x75, 0x97, 0x70, 0x32, 0x9f, 0x91,
- 0x90, 0x5e, 0xd9, 0x7e, 0xad, 0x28, 0x13, 0xfb, 0xf8, 0xba, 0x90, 0xfd, 0xcc, 0xeb, 0x40, 0x3b,
- 0x65, 0x49, 0x6e, 0xa5, 0x89, 0x75, 0x4b, 0x4c, 0x5c, 0x73, 0x6f, 0xf0, 0xdc, 0x2b, 0x94, 0x0d,
- 0x33, 0x87, 0xcb, 0xbe, 0x4b, 0x43, 0xee, 0xf3, 0xd3, 0xe6, 0x6f, 0x39, 0x40, 0xab, 0xb4, 0x1f,
- 0x70, 0xc2, 0x17, 0x0c, 0x1d, 0x01, 0x30, 0x29, 0x6d, 0x47, 0x2e, 0xad, 0x19, 0x0d, 0xa3, 0xb5,
- 0xd9, 0xf9, 0xec, 0x46, 0xee, 0x2f, 0xf9, 0xda, 0x07, 0xe7, 0x8e, 0xbd, 0xbb, 0x69, 0x62, 0x55,
- 0x55, 0x20, 0x67, 0x12, 0xb9, 0x14, 0xaf, 0x44, 0x45, 0x1f, 0x40, 0x29, 0xa0, 0x8c, 0x11, 0x8f,
- 0xca, 0xc3, 0xad, 0x28, 0xea, 0x35, 0x84, 0x33, 0x01, 0x59, 0x50, 0xa4, 0x71, 0x1c, 0xc5, 0xb5,
- 0xbc, 0x34, 0xaa, 0xa4, 0x89, 0xa5, 0x00, 0xac, 0x3e, 0xcd, 0x1f, 0x00, 0x2e, 0x96, 0x44, 0xf7,
+ 0xdb, 0xa1, 0xe7, 0x87, 0x4b, 0x5b, 0xa1, 0xcc, 0x3d, 0xae, 0xaf, 0x4f, 0xa2, 0x70, 0xea, 0x7b,
+ 0xca, 0xa2, 0xfe, 0xc0, 0x9d, 0x3b, 0x2c, 0x9a, 0xf2, 0x9f, 0x48, 0x4c, 0x1d, 0x97, 0x72, 0xe2,
+ 0xcf, 0x98, 0xfe, 0x04, 0x5e, 0xe4, 0x45, 0x5a, 0xb6, 0xbc, 0x28, 0xf2, 0x66, 0xb4, 0x2d, 0xb5,
+ 0xa3, 0xc5, 0xb4, 0xcd, 0xfd, 0x80, 0x32, 0x4e, 0x82, 0x79, 0x66, 0xfc, 0x32, 0x62, 0x7a, 0xd5,
+ 0x7a, 0x55, 0x2d, 0x29, 0x95, 0xe6, 0x3f, 0x39, 0xb8, 0xd7, 0x15, 0x8b, 0x6f, 0x47, 0x61, 0x48,
+ 0x27, 0x1c, 0xd3, 0x1f, 0x17, 0x94, 0x71, 0xf4, 0x04, 0x0a, 0x01, 0xe5, 0xa4, 0x96, 0x6b, 0x18,
+ 0xad, 0x6a, 0xe7, 0x3d, 0xfb, 0x6a, 0xa6, 0xb6, 0x74, 0xfb, 0x86, 0x72, 0xd2, 0x2b, 0xa7, 0x89,
+ 0x25, 0xcd, 0xb1, 0x1c, 0xd1, 0x0e, 0x94, 0x74, 0xae, 0xb5, 0x7c, 0x23, 0xdf, 0xaa, 0x76, 0x1a,
+ 0xd7, 0xf9, 0x0f, 0x85, 0xde, 0x57, 0x76, 0xbd, 0x6a, 0x9a, 0x58, 0x99, 0x13, 0xce, 0x04, 0xf4,
+ 0x15, 0x14, 0x44, 0xe2, 0xb5, 0x82, 0xcc, 0xe2, 0xe1, 0x75, 0x51, 0x9e, 0x45, 0x8c, 0xef, 0x86,
+ 0xd3, 0x48, 0x25, 0x21, 0xac, 0xb1, 0x1c, 0xd1, 0xcf, 0x06, 0xd4, 0x5d, 0xc2, 0xc9, 0x7c, 0x46,
+ 0x42, 0x7a, 0x85, 0xc4, 0x5a, 0x51, 0x26, 0xf6, 0xf1, 0x75, 0x21, 0xfb, 0x99, 0xd7, 0x81, 0x76,
+ 0xca, 0x92, 0xdc, 0x4a, 0x13, 0xeb, 0x96, 0x98, 0xb8, 0xe6, 0xde, 0xe0, 0xb9, 0x57, 0x28, 0x1b,
+ 0x66, 0x0e, 0x97, 0x7d, 0x97, 0x86, 0xdc, 0xe7, 0xa7, 0xcd, 0xdf, 0x72, 0x80, 0x56, 0x69, 0x3f,
+ 0xe0, 0x84, 0x2f, 0x18, 0x3a, 0x02, 0x60, 0x52, 0xda, 0x8e, 0x5c, 0x5a, 0x33, 0x1a, 0x46, 0x6b,
+ 0xb3, 0xf3, 0xd9, 0x8d, 0xdc, 0x5f, 0xf2, 0xb5, 0x0f, 0xce, 0x1d, 0x7b, 0x77, 0xd3, 0xc4, 0xaa,
+ 0xaa, 0x40, 0xce, 0x24, 0x72, 0x29, 0x5e, 0x89, 0x8a, 0x3e, 0x80, 0x52, 0x40, 0x19, 0x23, 0x1e,
+ 0x95, 0x87, 0x5b, 0x51, 0xd4, 0x6b, 0x08, 0x67, 0x02, 0xb2, 0xa0, 0x48, 0xe3, 0x38, 0x8a, 0x6b,
+ 0x79, 0x69, 0x54, 0x49, 0x13, 0x4b, 0x01, 0x58, 0x4d, 0xcd, 0x1f, 0x00, 0x2e, 0x96, 0x44, 0xf7,
0xe0, 0xee, 0xf6, 0x68, 0x38, 0x1c, 0x6c, 0x8f, 0x9d, 0xc3, 0xe1, 0xf3, 0xe1, 0xe8, 0xc5, 0xd0,
0xbc, 0x83, 0x36, 0x01, 0x32, 0x70, 0xf4, 0xdc, 0x34, 0x50, 0x1d, 0xde, 0xce, 0x74, 0x3c, 0xd8,
0x1b, 0x6c, 0x8f, 0x07, 0x7d, 0x67, 0x34, 0x7e, 0x36, 0xc0, 0x66, 0x0e, 0xbd, 0x0b, 0xef, 0x5c,
- 0x99, 0xeb, 0x1f, 0x7e, 0xeb, 0xec, 0xf6, 0xcd, 0x7c, 0xf3, 0x77, 0x03, 0xee, 0x5f, 0xbe, 0xa5,
- 0x6c, 0x1e, 0x85, 0x8c, 0xa2, 0x31, 0xac, 0x4b, 0x52, 0x1c, 0x55, 0x1d, 0x92, 0xb2, 0x6a, 0xc7,
- 0xba, 0x8d, 0xb2, 0xa9, 0xef, 0xf5, 0xcc, 0x34, 0xb1, 0x2e, 0x39, 0x62, 0x55, 0x97, 0x6a, 0x1a,
- 0xed, 0xc1, 0x9a, 0x22, 0x4c, 0x5f, 0xff, 0x47, 0x6f, 0x76, 0x04, 0x3d, 0x48, 0x13, 0x4b, 0x7b,
- 0x62, 0xfd, 0x6d, 0xde, 0xbf, 0x38, 0x68, 0xb1, 0x8e, 0x2a, 0xaf, 0xe6, 0xdf, 0x06, 0x54, 0x57,
- 0xe0, 0xd5, 0x8a, 0x51, 0x5b, 0x68, 0xdc, 0xb8, 0xe4, 0xed, 0x15, 0xb3, 0x03, 0xa5, 0x59, 0xe4,
- 0x79, 0x34, 0xce, 0x72, 0xbf, 0x39, 0xd0, 0x7e, 0xe4, 0x79, 0x7e, 0xe8, 0xa9, 0x40, 0xda, 0x09,
- 0x67, 0x82, 0x08, 0xa4, 0xa8, 0x61, 0xf2, 0x06, 0xdc, 0x10, 0x28, 0xdb, 0xd5, 0x3c, 0x8a, 0xb9,
- 0x0a, 0xa4, 0x9d, 0x70, 0x26, 0x34, 0x7f, 0x35, 0x60, 0x7d, 0x35, 0x71, 0xd4, 0x82, 0xf2, 0x94,
- 0x12, 0xbe, 0x88, 0xa9, 0xd8, 0x6c, 0xbe, 0x55, 0xe9, 0xad, 0xa7, 0x89, 0x75, 0x8e, 0xe1, 0x73,
- 0x09, 0xd9, 0x00, 0x74, 0xc9, 0x69, 0xc8, 0xfc, 0x28, 0x14, 0xfb, 0x11, 0xb6, 0x9b, 0x69, 0x62,
- 0xad, 0xa0, 0x78, 0x45, 0x46, 0x0f, 0xa1, 0xc0, 0x89, 0xa7, 0x9a, 0x4e, 0x45, 0x35, 0x04, 0xa1,
- 0x63, 0x39, 0x8a, 0x1b, 0x4d, 0x66, 0x3e, 0x61, 0xb2, 0x9b, 0xe8, 0x1b, 0x2d, 0x01, 0xac, 0x3e,
+ 0xf9, 0xd6, 0x3f, 0xfc, 0xd6, 0xd9, 0xed, 0x9b, 0xf9, 0xe6, 0xef, 0x06, 0xdc, 0xbf, 0x7c, 0x4b,
+ 0xd9, 0x3c, 0x0a, 0x19, 0x45, 0x63, 0x58, 0x97, 0xa4, 0x38, 0xaa, 0x6a, 0x24, 0x65, 0xd5, 0x8e,
+ 0x75, 0x1b, 0x65, 0x53, 0xdf, 0xeb, 0x99, 0x69, 0x62, 0x5d, 0x72, 0xc4, 0xaa, 0x2e, 0xd5, 0x67,
+ 0xb4, 0x07, 0x6b, 0x8a, 0x30, 0x7d, 0xfd, 0x1f, 0xbd, 0xd9, 0x11, 0xf4, 0x20, 0x4d, 0x2c, 0xed,
+ 0x89, 0xf5, 0xdc, 0xbc, 0x7f, 0x71, 0xd0, 0x62, 0x1d, 0x55, 0x5e, 0xcd, 0xbf, 0x0d, 0xa8, 0xae,
+ 0xc0, 0xab, 0x15, 0xa3, 0xb6, 0xd0, 0xb8, 0x71, 0xc9, 0xdb, 0x2b, 0x66, 0x07, 0x4a, 0xb3, 0xc8,
+ 0xf3, 0x68, 0x9c, 0xe5, 0x7e, 0x73, 0xa0, 0xfd, 0xc8, 0xf3, 0xfc, 0xd0, 0x53, 0x81, 0xb4, 0x13,
+ 0xce, 0x04, 0x11, 0x48, 0x51, 0xc3, 0xe4, 0x0d, 0xb8, 0x21, 0x50, 0xb6, 0xab, 0x79, 0x14, 0x73,
+ 0x15, 0x48, 0x3b, 0xe1, 0x4c, 0x68, 0xfe, 0x6a, 0xc0, 0xfa, 0x6a, 0xe2, 0xa8, 0x05, 0xe5, 0x29,
+ 0x25, 0x7c, 0x11, 0x53, 0xb1, 0xd9, 0x7c, 0xab, 0xd2, 0x5b, 0x4f, 0x13, 0xeb, 0x1c, 0xc3, 0xe7,
+ 0x12, 0xb2, 0x01, 0xe8, 0x92, 0xd3, 0x90, 0xf9, 0x51, 0x28, 0xf6, 0x23, 0x6c, 0x37, 0xd3, 0xc4,
+ 0x5a, 0x41, 0xf1, 0x8a, 0x8c, 0x1e, 0x42, 0x81, 0x13, 0x4f, 0x35, 0x9d, 0x8a, 0x6a, 0x08, 0x42,
+ 0xc7, 0x72, 0x14, 0x37, 0x9a, 0xcc, 0x7c, 0xc2, 0x64, 0x37, 0xd1, 0x37, 0x5a, 0x02, 0x58, 0x4d,
0xcd, 0x7f, 0x73, 0x3a, 0x53, 0xcd, 0x0c, 0xda, 0x81, 0xe2, 0x8c, 0x9e, 0xd0, 0x99, 0xae, 0xc4,
- 0x47, 0xaf, 0xa3, 0xd2, 0xde, 0x17, 0xd6, 0x2a, 0xb2, 0x74, 0xc4, 0xea, 0x83, 0x1e, 0x40, 0xde,
- 0xf5, 0x63, 0x5d, 0x6f, 0xa5, 0x34, 0xb1, 0x84, 0x8a, 0xc5, 0x20, 0x72, 0x9e, 0xfa, 0x33, 0xaa,
- 0xcb, 0x4c, 0xe6, 0x2c, 0x74, 0x2c, 0x47, 0xf4, 0x21, 0x94, 0x03, 0xb2, 0x74, 0x98, 0xff, 0x8a,
- 0xca, 0xb4, 0x37, 0x14, 0x57, 0x19, 0x86, 0x4b, 0x01, 0x59, 0x1e, 0xf8, 0xaf, 0x28, 0xfa, 0x14,
- 0xaa, 0x02, 0x3c, 0x22, 0x93, 0xe3, 0xc5, 0x5c, 0x74, 0x37, 0x61, 0x2b, 0xfb, 0xc0, 0x0a, 0x8c,
- 0x21, 0x20, 0xcb, 0x9e, 0x92, 0xd1, 0xfb, 0x20, 0x9c, 0x1d, 0xd1, 0x07, 0xd6, 0xa4, 0xb5, 0xea,
- 0x03, 0x0a, 0xc2, 0x6b, 0x01, 0x59, 0x76, 0x3d, 0x2a, 0x0e, 0x6b, 0x12, 0x05, 0xf3, 0x98, 0x32,
- 0x56, 0x2b, 0x35, 0x8c, 0x56, 0x59, 0x25, 0x90, 0x61, 0xf8, 0x5c, 0x6a, 0x7e, 0x0d, 0x45, 0xb9,
- 0x7d, 0x54, 0x86, 0xc2, 0xee, 0xf0, 0xe9, 0xc8, 0xbc, 0x83, 0x2a, 0x50, 0xec, 0x0f, 0x7a, 0x87,
- 0x3b, 0xa6, 0x21, 0xc0, 0x17, 0x5d, 0x3c, 0x34, 0x73, 0x02, 0x1c, 0x60, 0x3c, 0xc2, 0x66, 0x5e,
- 0x88, 0x4f, 0xbb, 0xe3, 0xee, 0xbe, 0x59, 0x68, 0xfe, 0x92, 0x87, 0xca, 0xf9, 0x83, 0x22, 0x7a,
- 0xd4, 0x09, 0x8d, 0xc5, 0xa1, 0x4a, 0xea, 0x75, 0x8f, 0xd2, 0x10, 0xce, 0x04, 0xf4, 0x18, 0xd6,
- 0x5d, 0x9f, 0xcd, 0x67, 0xe4, 0xd4, 0x09, 0x49, 0x90, 0xf5, 0x33, 0x59, 0xdc, 0xab, 0x38, 0xae,
- 0x6a, 0x6d, 0x48, 0x02, 0x2a, 0xce, 0x82, 0x13, 0x4f, 0xdf, 0x11, 0x79, 0x16, 0x9c, 0x78, 0x58,
- 0x0c, 0xe8, 0x4b, 0xd8, 0xf4, 0x43, 0xc6, 0x49, 0x38, 0xa1, 0x8e, 0x17, 0x47, 0x8b, 0xb9, 0xe4,
- 0xb1, 0xd2, 0x43, 0x69, 0x62, 0xfd, 0x6f, 0x06, 0x6f, 0x64, 0xfa, 0x8e, 0x50, 0x51, 0x17, 0x4a,
- 0x8b, 0xb9, 0x4b, 0x38, 0x75, 0x25, 0x9b, 0xd5, 0x4e, 0xdd, 0x56, 0xaf, 0xb2, 0x9d, 0xbd, 0xca,
- 0xf6, 0x38, 0x7b, 0x95, 0xd5, 0x6e, 0xb4, 0x39, 0xce, 0x04, 0xf4, 0x09, 0x00, 0x3b, 0x65, 0x9c,
+ 0x47, 0xaf, 0xa3, 0xd2, 0xde, 0x17, 0xd6, 0x2a, 0xb2, 0x74, 0xc4, 0x6a, 0x42, 0x0f, 0x20, 0xef,
+ 0xfa, 0xb1, 0xae, 0xb7, 0x52, 0x9a, 0x58, 0x42, 0xc5, 0x62, 0x10, 0x39, 0x4f, 0xfd, 0x19, 0xd5,
+ 0x65, 0x26, 0x73, 0x16, 0x3a, 0x96, 0x23, 0xfa, 0x10, 0xca, 0x01, 0x59, 0x3a, 0xcc, 0x7f, 0x45,
+ 0x65, 0xda, 0x1b, 0x8a, 0xab, 0x0c, 0xc3, 0xa5, 0x80, 0x2c, 0x0f, 0xfc, 0x57, 0x14, 0x7d, 0x0a,
+ 0x55, 0x01, 0x1e, 0x91, 0xc9, 0xf1, 0x62, 0x2e, 0xba, 0x9b, 0xb0, 0x95, 0x7d, 0x60, 0x05, 0xc6,
+ 0x10, 0x90, 0x65, 0x4f, 0xc9, 0xe8, 0x7d, 0x10, 0xce, 0x8e, 0xe8, 0x03, 0x6b, 0xd2, 0x5a, 0xf5,
+ 0x01, 0x05, 0xe1, 0xb5, 0x80, 0x2c, 0xbb, 0x1e, 0x15, 0x87, 0x35, 0x89, 0x82, 0x79, 0x4c, 0x19,
+ 0xab, 0x95, 0x1a, 0x46, 0xab, 0xac, 0x12, 0xc8, 0x30, 0x7c, 0x2e, 0x35, 0xbf, 0x86, 0xa2, 0xdc,
+ 0x3e, 0x2a, 0x43, 0x61, 0x77, 0xf8, 0x74, 0x64, 0xde, 0x41, 0x15, 0x28, 0xf6, 0x07, 0xbd, 0xc3,
+ 0x1d, 0xd3, 0x10, 0xe0, 0x8b, 0x2e, 0x1e, 0x9a, 0x39, 0x01, 0x0e, 0x30, 0x1e, 0x61, 0x33, 0x2f,
+ 0xc4, 0xa7, 0xdd, 0x71, 0x77, 0xdf, 0x2c, 0x34, 0x7f, 0xc9, 0x43, 0xe5, 0xfc, 0x41, 0x11, 0x3d,
+ 0xea, 0x84, 0xc6, 0xe2, 0x50, 0x25, 0xf5, 0xba, 0x47, 0x69, 0x08, 0x67, 0x02, 0x7a, 0x0c, 0xeb,
+ 0xae, 0xcf, 0xe6, 0x33, 0x72, 0xea, 0x84, 0x24, 0xc8, 0xfa, 0x99, 0x2c, 0xee, 0x55, 0x1c, 0x57,
+ 0xb5, 0x36, 0x24, 0x01, 0x15, 0x67, 0xc1, 0x89, 0xa7, 0xef, 0x88, 0x3c, 0x0b, 0x4e, 0x3c, 0x2c,
+ 0x06, 0xf4, 0x25, 0x6c, 0xfa, 0x21, 0xe3, 0x24, 0x9c, 0x50, 0xc7, 0x8b, 0xa3, 0xc5, 0x5c, 0xf2,
+ 0x58, 0xe9, 0xa1, 0x34, 0xb1, 0xfe, 0xf7, 0x05, 0x6f, 0x64, 0xfa, 0x8e, 0x50, 0x51, 0x17, 0x4a,
+ 0x8b, 0xb9, 0x4b, 0x38, 0x75, 0x25, 0x9b, 0xd5, 0x4e, 0xdd, 0x56, 0x6f, 0xb2, 0x9d, 0xbd, 0xc9,
+ 0xf6, 0x38, 0x7b, 0x93, 0xd5, 0x6e, 0xb4, 0x39, 0xce, 0x04, 0xf4, 0x09, 0x00, 0x3b, 0x65, 0x9c,
0x06, 0xce, 0xc2, 0x77, 0x25, 0xd9, 0xfa, 0xb6, 0x5f, 0xa0, 0xb8, 0xa2, 0xe4, 0x43, 0xdf, 0x45,
0xdf, 0xc1, 0x86, 0xea, 0x60, 0x59, 0xe3, 0x28, 0xbf, 0x61, 0xe3, 0x78, 0x2b, 0x4d, 0xac, 0xcb,
0xae, 0x58, 0xf5, 0xc2, 0x8b, 0xc7, 0xaa, 0x60, 0x16, 0x2f, 0x36, 0x28, 0x39, 0xec, 0x7d, 0xf1,
0xc7, 0xd9, 0x96, 0xf1, 0xe7, 0xd9, 0x96, 0xf1, 0xd7, 0xd9, 0x96, 0xf1, 0xfd, 0x47, 0x9e, 0xcf,
0x5f, 0x2e, 0x8e, 0xec, 0x49, 0x14, 0xb4, 0xe5, 0x62, 0x6d, 0x19, 0xa1, 0xcd, 0xdc, 0xe3, 0xf6,
- 0x49, 0x47, 0xfd, 0x89, 0x3c, 0x51, 0x3b, 0x5f, 0x93, 0x9f, 0xc7, 0xff, 0x05, 0x00, 0x00, 0xff,
- 0xff, 0xb4, 0x95, 0x5a, 0x2d, 0xfa, 0x08, 0x00, 0x00,
+ 0x49, 0x47, 0xfd, 0x87, 0x3c, 0x51, 0x3b, 0x5f, 0x93, 0xd3, 0xe3, 0xff, 0x02, 0x00, 0x00, 0xff,
+ 0xff, 0x01, 0x6e, 0xed, 0x83, 0xfa, 0x08, 0x00, 0x00,
}
func (m *AgentConnectRequest) Marshal() (dAtA []byte, err error) {
diff --git a/sdk/proto/agent.proto b/sdk/proto/agent.proto
index 7aa32e2e0..ef7d6b720 100644
--- a/sdk/proto/agent.proto
+++ b/sdk/proto/agent.proto
@@ -1,82 +1,135 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+import "config.proto";
+import "dp_software_details.proto";
import "gogo.proto";
+import "google/protobuf/timestamp.proto";
import "host.proto";
-import "config.proto";
import "nginx.proto";
-import "google/protobuf/timestamp.proto";
-import "dp_software_details.proto";
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents an agent connect request that is sent from the agent to the management server
message AgentConnectRequest {
- // DEPRECATED
- reserved 1;
- reserved "identity";
- AgentMeta meta = 2 [(gogoproto.jsontag) = "meta"];
- repeated NginxDetails details = 3 [(gogoproto.jsontag) = "details"]; // moving to dataplane_software_details
- HostInfo host = 4 [(gogoproto.jsontag) = "host"];
- repeated DataplaneSoftwareDetails dataplane_software_details = 5 [(gogoproto.jsontag) = "dataplane_software_details"];
+ // DEPRECATED
+ reserved 1;
+ reserved "identity";
+ // Provides meta information about the agent
+ AgentMeta meta = 2 [(gogoproto.jsontag) = "meta"];
+ // Provides information about the NGINX instances that are present.
+ // This data will be moving to dataplane_software_details in a future release
+ repeated NginxDetails details = 3 [(gogoproto.jsontag) = "details"];
+ // Provides information about the host system
+ HostInfo host = 4 [(gogoproto.jsontag) = "host"];
+ // Provides information about software installed in the system (e.g. App Protect WAF, NGINX, etc.)
+ repeated DataplaneSoftwareDetails dataplane_software_details = 5 [(gogoproto.jsontag) = "dataplane_software_details"];
}
+// Represents an agent connect status
message AgentConnectStatus {
- enum StatusCode {
- CONNECT_UNKNOWN = 0;
- CONNECT_OK = 1;
- CONNECT_REJECTED_OTHER = 2;
- CONNECT_REJECTED_DUP_ID = 3;
- }
- StatusCode statusCode = 1 [(gogoproto.jsontag) = "status_code"];
- string message = 2 [(gogoproto.jsontag) = "message"];
- string error = 3 [(gogoproto.jsontag) = "error"];
+ // Different status codes for agent connect response
+ enum StatusCode {
+ // Unknown status of the agent connect request
+ CONNECT_UNKNOWN = 0;
+ // Agent connect request was successful
+ CONNECT_OK = 1;
+ // Agent connect request was rejected
+ CONNECT_REJECTED_OTHER = 2;
+ // Agent connect request was rejected because an agent with the same ID is already registered
+ CONNECT_REJECTED_DUP_ID = 3;
+ }
+ // Provides a status of the agent connect response
+ StatusCode statusCode = 1 [(gogoproto.jsontag) = "status_code"];
+ // Provides a user friendly message to describe the response
+ string message = 2 [(gogoproto.jsontag) = "message"];
+ // Provides an error message of why the agent connect request was rejected
+ string error = 3 [(gogoproto.jsontag) = "error"];
}
+// Represents an agent connect response that is sent from the management server to the agent
message AgentConnectResponse {
- AgentConfig agent_config = 1 [(gogoproto.jsontag) = "agent_config"];
- AgentConnectStatus status = 2 [(gogoproto.jsontag) = "status"];
+ // Agent configuration
+ AgentConfig agent_config = 1 [(gogoproto.jsontag) = "agent_config"];
+ // Agent connect request status
+ AgentConnectStatus status = 2 [(gogoproto.jsontag) = "status"];
}
+// Represents an agent config request that is sent from the agent to the management server.
+// This is used by the agent to request the agent configuration from the management server.
message AgentConfigRequest {}
+// Represents an agent's configuration. The message is sent from the management server to the agent.
message AgentConfig {
- AgentDetails details = 1 [(gogoproto.jsontag) = "details"];
- AgentLogging loggers = 2 [(gogoproto.jsontag) = "loggers"];
- ConfigReport configs = 3 [(gogoproto.jsontag) = "configs"];
+ // Provides information about the agent
+ AgentDetails details = 1 [(gogoproto.jsontag) = "details"];
+ // Provides information about the agent logging.
+ // This is will be implemented in a future release.
+ AgentLogging loggers = 2 [(gogoproto.jsontag) = "loggers"];
+ // Provides meta information about the nginx configurations
+ ConfigReport configs = 3 [(gogoproto.jsontag) = "configs"];
}
+// Represents agent details. This message is sent from the management server to the agent.
message AgentDetails {
- repeated string features = 1 [(gogoproto.jsontag) = "features"];
- repeated string extensions = 2 [(gogoproto.jsontag) = "extensions"];
- repeated string tags = 3 [(gogoproto.jsontag) = "tags"];
- string alias = 4 [(gogoproto.jsontag) = "alias"];
+ // List of agent feature that are enabled
+ repeated string features = 1 [(gogoproto.jsontag) = "features"];
+ // List of agent extensions that are enabled
+ repeated string extensions = 2 [(gogoproto.jsontag) = "extensions"];
+ // List of tags
+ repeated string tags = 3 [(gogoproto.jsontag) = "tags"];
+ // Alias name for the agent
+ string alias = 4 [(gogoproto.jsontag) = "alias"];
}
+// Represents agent logging details
message AgentLogging {
- enum Level {
- INFO = 0;
- DEBUG = 1;
- WARN = 2;
- ERROR = 3;
- FATAL = 4;
- }
- Level level = 1 [(gogoproto.jsontag) = "level"];
- string dir = 2 [(gogoproto.jsontag) = "dir"];
- string file = 3 [(gogoproto.jsontag) = "file"];
- uint32 max_size = 4 [(gogoproto.jsontag) = "max_size"]; // max size in MB
- uint32 max_backups = 5 [(gogoproto.jsontag) = "max_backups"];
- uint32 max_age = 6 [(gogoproto.jsontag) = "max_age"]; // age in days
- bool compress = 7 [(gogoproto.jsontag) = "compress"];
+ // Log level enum
+ enum Level {
+ // info level
+ INFO = 0;
+ // debug level
+ DEBUG = 1;
+ // warn level
+ WARN = 2;
+ // error level
+ ERROR = 3;
+ // fatal level
+ FATAL = 4;
+ }
+ // Log level
+ Level level = 1 [(gogoproto.jsontag) = "level"];
+ // Directory where the logs are located
+ string dir = 2 [(gogoproto.jsontag) = "dir"];
+ // Name of the log file
+ string file = 3 [(gogoproto.jsontag) = "file"];
+ // Max size of the log file in MB
+ uint32 max_size = 4 [(gogoproto.jsontag) = "max_size"];
+ // Max number of backups
+ uint32 max_backups = 5 [(gogoproto.jsontag) = "max_backups"];
+ // Max age of a log file in days
+ uint32 max_age = 6 [(gogoproto.jsontag) = "max_age"];
+ // Is the log file compressed
+ bool compress = 7 [(gogoproto.jsontag) = "compress"];
}
+// Represents agent metadata
message AgentMeta {
- string version = 1 [(gogoproto.jsontag) = "version"];
- string display_name = 2 [(gogoproto.jsontag) = "display_name"];
- repeated string tag = 3 [(gogoproto.jsontag) = "tag"];
- // DEPRECATED
- reserved 4;
- reserved "instance_name";
- string instance_group = 5 [(gogoproto.jsontag) = "instance_group"];
- google.protobuf.Timestamp updated = 6 [(gogoproto.jsontag) = "updated"];
- string system_uid = 7 [(gogoproto.jsontag) = "system_uid"];
- AgentDetails agent_details = 8 [(gogoproto.jsontag) = "agent_details"];
+ // Version of the agent
+ string version = 1 [(gogoproto.jsontag) = "version"];
+ // User friendly name for the agent
+ string display_name = 2 [(gogoproto.jsontag) = "display_name"];
+ // List of tags
+ repeated string tag = 3 [(gogoproto.jsontag) = "tag"];
+ // DEPRECATED
+ reserved 4;
+ reserved "instance_name";
+ // Instance group name used to group NGINX instances
+ string instance_group = 5 [(gogoproto.jsontag) = "instance_group"];
+ // Last time agent was updated
+ google.protobuf.Timestamp updated = 6 [(gogoproto.jsontag) = "updated"];
+ // ID of the system where the agent is installed
+ string system_uid = 7 [(gogoproto.jsontag) = "system_uid"];
+ // Provides other agent information
+ AgentDetails agent_details = 8 [(gogoproto.jsontag) = "agent_details"];
}
diff --git a/sdk/proto/command.pb.go b/sdk/proto/command.pb.go
index 1eb5da172..e53ccbf5e 100644
--- a/sdk/proto/command.pb.go
+++ b/sdk/proto/command.pb.go
@@ -24,12 +24,19 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Command type enum
type Command_CommandType int32
const (
- Command_NORMAL Command_CommandType = 0
+ // All commands default to normal
+ Command_NORMAL Command_CommandType = 0
+ // The download type is used when sending NginxConfig from the management server to the agent.
+ // It is used to instruct the agent to download the NGINX config from the management server.
Command_DOWNLOAD Command_CommandType = 1
- Command_UPLOAD Command_CommandType = 2
+ // The upload type is used when sending NginxConfig from the agent to the management server.
+ // It is used to instruct the agent to upload the NGINX config from the agent.
+ // This will be implemented in a future release.
+ Command_UPLOAD Command_CommandType = 2
)
var Command_CommandType_name = map[int32]string{
@@ -52,12 +59,16 @@ func (Command_CommandType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{0, 0}
}
+// Command status enum
type CommandStatusResponse_CommandStatus int32
const (
+ // Unknown status of command
CommandStatusResponse_CMD_UNKNOWN CommandStatusResponse_CommandStatus = 0
- CommandStatusResponse_CMD_OK CommandStatusResponse_CommandStatus = 1
- CommandStatusResponse_CMD_ERROR CommandStatusResponse_CommandStatus = 2
+ // Command was successful
+ CommandStatusResponse_CMD_OK CommandStatusResponse_CommandStatus = 1
+ // Command failed
+ CommandStatusResponse_CMD_ERROR CommandStatusResponse_CommandStatus = 2
)
var CommandStatusResponse_CommandStatus_name = map[int32]string{
@@ -80,10 +91,13 @@ func (CommandStatusResponse_CommandStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{1, 0}
}
+// Command error code enum
type CommandStatusResponse_CommandErrorCode int32
const (
- CommandStatusResponse_ERR_OK CommandStatusResponse_CommandErrorCode = 0
+ // No Error (This is the default value)
+ CommandStatusResponse_ERR_OK CommandStatusResponse_CommandErrorCode = 0
+ // Unknown error
CommandStatusResponse_ERR_UNKNOWN CommandStatusResponse_CommandErrorCode = 1
)
@@ -105,12 +119,16 @@ func (CommandStatusResponse_CommandErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{1, 1}
}
+// NGINX configuration status enum
type NginxConfigStatus_Status int32
const (
+ // The configuration is still in the process of being applied.
NginxConfigStatus_PENDING NginxConfigStatus_Status = 0
- NginxConfigStatus_OK NginxConfigStatus_Status = 1
- NginxConfigStatus_ERROR NginxConfigStatus_Status = 2
+ // The configuration has being successfully applied.
+ NginxConfigStatus_OK NginxConfigStatus_Status = 1
+ // The configuration has failed to be applied
+ NginxConfigStatus_ERROR NginxConfigStatus_Status = 2
)
var NginxConfigStatus_Status_name = map[int32]string{
@@ -133,12 +151,16 @@ func (NginxConfigStatus_Status) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{4, 0}
}
+// Transfer status enum
type UploadStatus_TransferStatus int32
const (
+ // Unknown status
UploadStatus_UNKNOWN UploadStatus_TransferStatus = 0
- UploadStatus_OK UploadStatus_TransferStatus = 1
- UploadStatus_FAILED UploadStatus_TransferStatus = 2
+ // Upload was successful
+ UploadStatus_OK UploadStatus_TransferStatus = 1
+ // Upload failed
+ UploadStatus_FAILED UploadStatus_TransferStatus = 2
)
var UploadStatus_TransferStatus_name = map[int32]string{
@@ -161,11 +183,11 @@ func (UploadStatus_TransferStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{9, 0}
}
-// Command is the envelope sent between the management plane and the data plane, requesting some action or reporting a response
+// Represents a command message, which is used for communication between the management server and the agent.
type Command struct {
+ // Provides metadata information associated with the command
Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- // used as a dispatch flag to quickly send the command to the correct base processor that will then further sort
- // based on the actual data type
+ // Used to determine the type of command
Type Command_CommandType `protobuf:"varint,2,opt,name=type,proto3,enum=f5.nginx.agent.sdk.Command_CommandType" json:"type"`
// Types that are valid to be assigned to Data:
// *Command_CmdStatus
@@ -385,14 +407,19 @@ func (*Command) XXX_OneofWrappers() []interface{} {
}
}
+// Represents a command status response
type CommandStatusResponse struct {
- Status CommandStatusResponse_CommandStatus `protobuf:"varint,1,opt,name=status,proto3,enum=f5.nginx.agent.sdk.CommandStatusResponse_CommandStatus" json:"status"`
- ErrorCode CommandStatusResponse_CommandErrorCode `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3,enum=f5.nginx.agent.sdk.CommandStatusResponse_CommandErrorCode" json:"error_code"`
- Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
- Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Command status
+ Status CommandStatusResponse_CommandStatus `protobuf:"varint,1,opt,name=status,proto3,enum=f5.nginx.agent.sdk.CommandStatusResponse_CommandStatus" json:"status"`
+ // Error code
+ ErrorCode CommandStatusResponse_CommandErrorCode `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3,enum=f5.nginx.agent.sdk.CommandStatusResponse_CommandErrorCode" json:"error_code"`
+ // Provides a user friendly message to describe the response
+ Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
+ // Provides an error message of why the command failed
+ Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *CommandStatusResponse) Reset() { *m = CommandStatusResponse{} }
@@ -456,18 +483,25 @@ func (m *CommandStatusResponse) GetError() string {
return ""
}
-// DataplaneStatus reports Dataplane metrics the Agent is aware of
+// Represents a dataplane status, which is used by the agent to periodically report the status of NGINX, agent activities and other dataplane software activities.
type DataplaneStatus struct {
- SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
- Details []*NginxDetails `protobuf:"bytes,2,rep,name=details,proto3" json:"details"`
- Host *HostInfo `protobuf:"bytes,3,opt,name=host,proto3" json:"host"`
- Healths []*NginxHealth `protobuf:"bytes,5,rep,name=healths,proto3" json:"healths"`
+ // System ID
+ SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
+ // List of NGINX details. This field will be moving to DataplaneSoftwareDetails in a future release.
+ Details []*NginxDetails `protobuf:"bytes,2,rep,name=details,proto3" json:"details"`
+ // Host information
+ Host *HostInfo `protobuf:"bytes,3,opt,name=host,proto3" json:"host"`
+ // List of NGINX health information. This field will be moving to DataplaneSoftwareHealth in a future release.
+ Healths []*NginxHealth `protobuf:"bytes,5,rep,name=healths,proto3" json:"healths"`
+ // List of software details. This includes details about NGINX and any other software installed in the system that the agent is interested in.
DataplaneSoftwareDetails []*DataplaneSoftwareDetails `protobuf:"bytes,6,rep,name=dataplane_software_details,json=dataplaneSoftwareDetails,proto3" json:"dataplane_software_details"`
- DataplaneSoftwareHealths []*DataplaneSoftwareHealth `protobuf:"bytes,7,rep,name=dataplane_software_healths,json=dataplaneSoftwareHealths,proto3" json:"dataplane_software_healths"`
- AgentActivityStatus []*AgentActivityStatus `protobuf:"bytes,8,rep,name=agent_activity_status,json=agentActivityStatus,proto3" json:"agent_activity_status"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // List of software health statues. This includes the health of NGINX and any other software installed in the system that the agent is interested in.
+ DataplaneSoftwareHealths []*DataplaneSoftwareHealth `protobuf:"bytes,7,rep,name=dataplane_software_healths,json=dataplaneSoftwareHealths,proto3" json:"dataplane_software_healths"`
+ // List of activity statuses. Reports on the status of activities that the agent is currently executing.
+ AgentActivityStatus []*AgentActivityStatus `protobuf:"bytes,8,rep,name=agent_activity_status,json=agentActivityStatus,proto3" json:"agent_activity_status"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *DataplaneStatus) Reset() { *m = DataplaneStatus{} }
@@ -552,6 +586,7 @@ func (m *DataplaneStatus) GetAgentActivityStatus() []*AgentActivityStatus {
return nil
}
+// Represent an agent activity status
type AgentActivityStatus struct {
// Types that are valid to be assigned to Status:
// *AgentActivityStatus_NginxConfigStatus
@@ -627,14 +662,19 @@ func (*AgentActivityStatus) XXX_OneofWrappers() []interface{} {
}
}
+// Represents a NGINX configuration status
type NginxConfigStatus struct {
- CorrelationId string `protobuf:"bytes,1,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id"`
- Status NginxConfigStatus_Status `protobuf:"varint,2,opt,name=status,proto3,enum=f5.nginx.agent.sdk.NginxConfigStatus_Status" json:"status"`
- Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
- NginxId string `protobuf:"bytes,4,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // CorrelationID is an ID used by the producer of the message to track the flow of events
+ CorrelationId string `protobuf:"bytes,1,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id"`
+ // Provides a status for the NGINX configuration
+ Status NginxConfigStatus_Status `protobuf:"varint,2,opt,name=status,proto3,enum=f5.nginx.agent.sdk.NginxConfigStatus_Status" json:"status"`
+ // Provides a user friendly message to describe the current state of the NGINX configuration.
+ Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
+ // NGINX ID
+ NginxId string `protobuf:"bytes,4,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *NginxConfigStatus) Reset() { *m = NginxConfigStatus{} }
@@ -698,6 +738,7 @@ func (m *NginxConfigStatus) GetNginxId() string {
return ""
}
+// Represents a dataplane software health
type DataplaneSoftwareHealth struct {
// Types that are valid to be assigned to Health:
// *DataplaneSoftwareHealth_NginxHealth
@@ -786,8 +827,11 @@ func (*DataplaneSoftwareHealth) XXX_OneofWrappers() []interface{} {
}
}
+// Represents a dataplane update
type DataplaneUpdate struct {
- Host *HostInfo `protobuf:"bytes,1,opt,name=host,proto3" json:"host"`
+ // Host information
+ Host *HostInfo `protobuf:"bytes,1,opt,name=host,proto3" json:"host"`
+ // List of software details. This includes details about NGINX and any other software installed in the system that the agent is interested in.
DataplaneSoftwareDetails []*DataplaneSoftwareDetails `protobuf:"bytes,2,rep,name=dataplane_software_details,json=dataplaneSoftwareDetails,proto3" json:"dataplane_software_details"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -841,7 +885,9 @@ func (m *DataplaneUpdate) GetDataplaneSoftwareDetails() []*DataplaneSoftwareDeta
return nil
}
+// Represents a download request
type DownloadRequest struct {
+ // Metadata information
Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -888,13 +934,17 @@ func (m *DownloadRequest) GetMeta() *Metadata {
return nil
}
+// Represents a NGINX config response
type NginxConfigResponse struct {
- Status *CommandStatusResponse `protobuf:"bytes,1,opt,name=status,proto3" json:"status"`
- Action NginxConfigAction `protobuf:"varint,2,opt,name=action,proto3,enum=f5.nginx.agent.sdk.NginxConfigAction" json:"action"`
- ConfigData *ConfigDescriptor `protobuf:"bytes,3,opt,name=config_data,json=configData,proto3" json:"config_data"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Command status
+ Status *CommandStatusResponse `protobuf:"bytes,1,opt,name=status,proto3" json:"status"`
+ // NGINX config action
+ Action NginxConfigAction `protobuf:"varint,2,opt,name=action,proto3,enum=f5.nginx.agent.sdk.NginxConfigAction" json:"action"`
+ // NGINX config description
+ ConfigData *ConfigDescriptor `protobuf:"bytes,3,opt,name=config_data,json=configData,proto3" json:"config_data"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *NginxConfigResponse) Reset() { *m = NginxConfigResponse{} }
@@ -951,13 +1001,17 @@ func (m *NginxConfigResponse) GetConfigData() *ConfigDescriptor {
return nil
}
+// Represents an upload status
type UploadStatus struct {
- Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- Status UploadStatus_TransferStatus `protobuf:"varint,2,opt,name=status,proto3,enum=f5.nginx.agent.sdk.UploadStatus_TransferStatus" json:"status"`
- Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Metadata information
+ Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
+ // Transfer status
+ Status UploadStatus_TransferStatus `protobuf:"varint,2,opt,name=status,proto3,enum=f5.nginx.agent.sdk.UploadStatus_TransferStatus" json:"status"`
+ // Provides an error message of why the upload failed
+ Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *UploadStatus) Reset() { *m = UploadStatus{} }
@@ -1014,6 +1068,7 @@ func (m *UploadStatus) GetReason() string {
return ""
}
+// Represents a data chunck
type DataChunk struct {
// Types that are valid to be assigned to Chunk:
// *DataChunk_Header
@@ -1102,11 +1157,15 @@ func (*DataChunk) XXX_OneofWrappers() []interface{} {
}
}
+// Represents a chunked resource Header
type ChunkedResourceHeader struct {
+ // Metadata information
Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- // number of chunks expected in this transfer
- Chunks int32 `protobuf:"varint,2,opt,name=chunks,proto3" json:"chunks"`
- Checksum string `protobuf:"bytes,3,opt,name=checksum,proto3" json:"checksum"`
+ // Number of chunks expected in the transfer
+ Chunks int32 `protobuf:"varint,2,opt,name=chunks,proto3" json:"chunks"`
+ // Chunk checksum
+ Checksum string `protobuf:"bytes,3,opt,name=checksum,proto3" json:"checksum"`
+ // Chunk size
ChunkSize int32 `protobuf:"varint,4,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -1174,13 +1233,17 @@ func (m *ChunkedResourceHeader) GetChunkSize() int32 {
return 0
}
+// Represents a chunked resource chunk
type ChunkedResourceChunk struct {
- Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- ChunkId int32 `protobuf:"varint,2,opt,name=chunk_id,json=chunkId,proto3" json:"chunk_id"`
- Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Metadata information
+ Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
+ // Chunk ID
+ ChunkId int32 `protobuf:"varint,2,opt,name=chunk_id,json=chunkId,proto3" json:"chunk_id"`
+ // Chunk data
+ Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *ChunkedResourceChunk) Reset() { *m = ChunkedResourceChunk{} }
@@ -1261,7 +1324,7 @@ func init() {
func init() { proto.RegisterFile("command.proto", fileDescriptor_213c0bb044472049) }
var fileDescriptor_213c0bb044472049 = []byte{
- // 1535 bytes of a gzipped FileDescriptorProto
+ // 1534 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x6e, 0xdb, 0x46,
0x17, 0x26, 0x15, 0xeb, 0x76, 0x24, 0xdb, 0xca, 0xd8, 0x49, 0x14, 0x23, 0x30, 0x0d, 0xfe, 0x7f,
0x6a, 0xa7, 0x4d, 0x25, 0xd4, 0x41, 0x11, 0x34, 0x59, 0x59, 0x96, 0x13, 0x0a, 0x89, 0x65, 0x63,
@@ -1270,94 +1333,94 @@ var fileDescriptor_213c0bb044472049 = []byte{
0x64, 0xc9, 0x07, 0x68, 0x17, 0xdd, 0x14, 0x73, 0xa1, 0x44, 0x49, 0x94, 0xec, 0xd4, 0x45, 0x37,
0x9a, 0xe1, 0xf0, 0x3b, 0xdf, 0xb9, 0xcc, 0xcc, 0x37, 0x43, 0xc1, 0x7c, 0xdb, 0xee, 0xf5, 0x74,
0xcb, 0xa8, 0x38, 0xae, 0xed, 0xdb, 0x08, 0x75, 0x3e, 0xad, 0x58, 0x5d, 0xd3, 0x7a, 0x5d, 0xd1,
- 0xbb, 0xc4, 0xf2, 0x2b, 0x9e, 0x71, 0xb4, 0x02, 0x5d, 0xbb, 0x6b, 0xf3, 0xf7, 0x2b, 0x45, 0x0a,
- 0xb7, 0x2d, 0xf1, 0x54, 0xe0, 0x20, 0xfe, 0x00, 0x87, 0xb6, 0x17, 0xf5, 0x0b, 0x9c, 0x63, 0x60,
- 0x63, 0x75, 0xcc, 0xae, 0x78, 0x42, 0xe4, 0x84, 0x58, 0xbe, 0x57, 0x65, 0x8d, 0x18, 0xbb, 0x6e,
- 0x38, 0x2d, 0xcf, 0xee, 0xf8, 0xaf, 0x74, 0x97, 0xb4, 0x0c, 0xe2, 0xeb, 0xe6, 0xb1, 0x27, 0x5e,
- 0xe5, 0x2d, 0xdd, 0xe1, 0x5d, 0xf5, 0x2f, 0x80, 0xec, 0x36, 0x8f, 0x16, 0xdd, 0x83, 0xb9, 0x1e,
- 0xf1, 0xf5, 0xb2, 0xbc, 0x26, 0x6f, 0x14, 0x36, 0x6f, 0x54, 0x26, 0xc3, 0xae, 0xec, 0x12, 0x5f,
- 0x37, 0x74, 0x5f, 0xaf, 0xe5, 0xc2, 0x40, 0x61, 0x68, 0xcc, 0x7e, 0xd1, 0x0e, 0xcc, 0xf9, 0xa7,
- 0x0e, 0x29, 0xa7, 0xd6, 0xe4, 0x8d, 0x85, 0xcd, 0xf5, 0x24, 0x5b, 0xe1, 0x26, 0x6a, 0x9f, 0x9e,
- 0x3a, 0x84, 0xd3, 0x50, 0x43, 0xcc, 0x7e, 0xd1, 0x0b, 0x80, 0x76, 0xcf, 0x68, 0x79, 0xbe, 0xee,
- 0xf7, 0xbd, 0xf2, 0x25, 0x16, 0xc8, 0xad, 0x19, 0x64, 0x4f, 0x18, 0x10, 0x13, 0xcf, 0xb1, 0x2d,
- 0x8f, 0xd4, 0x16, 0xc2, 0x40, 0x89, 0x11, 0x68, 0x12, 0xce, 0xb7, 0x7b, 0x02, 0x84, 0x9e, 0x41,
- 0x91, 0xb1, 0xb4, 0x78, 0xe9, 0xca, 0x73, 0x8c, 0x5d, 0x49, 0x62, 0x6f, 0xd2, 0xe7, 0x6d, 0x06,
- 0xab, 0x95, 0xc2, 0x40, 0x19, 0x31, 0xd4, 0x24, 0xcc, 0xa7, 0x82, 0x03, 0xd0, 0x6b, 0xb8, 0x12,
- 0x7f, 0xdd, 0x72, 0x45, 0x34, 0xe5, 0x34, 0x73, 0xb0, 0x7e, 0x86, 0x83, 0x41, 0xf0, 0xd7, 0xc3,
- 0x40, 0x49, 0x66, 0xd2, 0x24, 0xbc, 0x64, 0x4d, 0x5a, 0x50, 0xcf, 0x8c, 0x92, 0xe2, 0x2d, 0xd2,
- 0xf6, 0x5b, 0x2e, 0xf9, 0xb2, 0x4f, 0x3c, 0xbf, 0x9c, 0x99, 0xee, 0x79, 0x8b, 0xf6, 0xb6, 0x39,
- 0x1e, 0x73, 0x38, 0xf7, 0x9c, 0xc8, 0x44, 0x3d, 0xeb, 0x93, 0x16, 0xe8, 0x2b, 0xb8, 0x3a, 0x8e,
- 0x17, 0x49, 0x67, 0x99, 0xeb, 0x8d, 0xb3, 0x5d, 0x8b, 0xac, 0x57, 0xc2, 0x40, 0x99, 0xc2, 0xa5,
- 0x49, 0x78, 0x59, 0x4f, 0xb0, 0x41, 0x3e, 0x2c, 0x0f, 0x2c, 0x78, 0x9d, 0x78, 0xda, 0x39, 0xe6,
- 0xfb, 0x83, 0x59, 0xbe, 0x59, 0xf9, 0x78, 0xd6, 0xe5, 0x30, 0x50, 0x12, 0x79, 0x34, 0x09, 0x23,
- 0x7d, 0x02, 0x4f, 0xd7, 0x4f, 0x1c, 0x5d, 0xce, 0x4f, 0x5f, 0x3f, 0x31, 0x6f, 0x7c, 0xfd, 0xc4,
- 0x0d, 0xe9, 0xfa, 0x89, 0xd1, 0xa3, 0x0e, 0x94, 0xe8, 0x96, 0x72, 0x8e, 0x75, 0x8b, 0x44, 0x2b,
- 0xbf, 0xc0, 0xb8, 0xff, 0x97, 0xc4, 0x5d, 0x8f, 0xb0, 0x7c, 0x59, 0xd7, 0x96, 0xc3, 0x40, 0x99,
- 0x20, 0xd0, 0x24, 0xbc, 0x68, 0x8c, 0x02, 0xd1, 0x17, 0x50, 0x64, 0xfa, 0xd0, 0x72, 0x89, 0x63,
- 0xbb, 0x7e, 0xb9, 0x38, 0xbd, 0x5a, 0x5c, 0x4e, 0x2a, 0x3b, 0xb4, 0xc1, 0x0c, 0xcd, 0xd3, 0x88,
- 0xdb, 0xd3, 0x34, 0xc8, 0x10, 0x80, 0xbe, 0x93, 0x61, 0x25, 0x16, 0xc6, 0x98, 0xf2, 0x94, 0xe7,
- 0x99, 0xb7, 0xdb, 0xb3, 0x33, 0x12, 0x46, 0x75, 0x6e, 0x53, 0x5b, 0x0d, 0x03, 0x65, 0x06, 0xa7,
- 0x26, 0xe1, 0xb2, 0x31, 0xc5, 0x76, 0xb4, 0xaa, 0x7d, 0xc7, 0xd0, 0x7d, 0x52, 0x5e, 0x38, 0x47,
- 0x55, 0x0f, 0x18, 0x74, 0xbc, 0xaa, 0x9c, 0x60, 0xa4, 0xaa, 0x1c, 0xa8, 0xde, 0x81, 0x42, 0x4c,
- 0xd0, 0x10, 0x40, 0xa6, 0xb9, 0x87, 0x77, 0xb7, 0x1e, 0x97, 0x24, 0x54, 0x84, 0x5c, 0x7d, 0xef,
- 0x79, 0xf3, 0xf1, 0xde, 0x56, 0xbd, 0x24, 0xd3, 0x37, 0x07, 0xfb, 0xac, 0x9f, 0xaa, 0x65, 0x60,
- 0x8e, 0xf2, 0xa8, 0x3f, 0x5c, 0x82, 0x2b, 0x89, 0x4a, 0x86, 0x3e, 0x87, 0x8c, 0x58, 0x0a, 0x32,
- 0x53, 0xd4, 0xbb, 0xe7, 0x16, 0xc1, 0xd1, 0xd1, 0x1a, 0x84, 0x81, 0x22, 0xa8, 0xb0, 0x68, 0x91,
- 0x09, 0x40, 0x5c, 0xd7, 0x76, 0x5b, 0x6d, 0xdb, 0x88, 0x24, 0xfb, 0xde, 0x7b, 0x3b, 0xd8, 0xa1,
- 0x14, 0xdb, 0xb6, 0x21, 0x64, 0x77, 0xc8, 0x88, 0xf3, 0x24, 0x7a, 0x85, 0x6e, 0x42, 0xb6, 0x47,
- 0x3c, 0x4f, 0xef, 0x12, 0xa6, 0xe6, 0xf9, 0x5a, 0x21, 0x0c, 0x94, 0x68, 0x08, 0x47, 0x1d, 0xa4,
- 0x40, 0x9a, 0xd9, 0x30, 0x51, 0xce, 0xd7, 0xf2, 0x61, 0xa0, 0xf0, 0x01, 0xcc, 0x1b, 0xf5, 0x3e,
- 0xcc, 0x8f, 0x04, 0x83, 0x16, 0xa1, 0xb0, 0xbd, 0x5b, 0x6f, 0x1d, 0x34, 0x1f, 0x35, 0xf7, 0x9e,
- 0x37, 0x4b, 0x12, 0xad, 0x2f, 0x1d, 0xd8, 0x7b, 0x54, 0x92, 0xd1, 0x3c, 0xe4, 0x69, 0x7f, 0x07,
- 0xe3, 0x3d, 0x5c, 0x4a, 0xa9, 0x55, 0x28, 0x8d, 0xc7, 0x4c, 0xe1, 0x3b, 0x18, 0x53, 0xb8, 0x44,
- 0xb9, 0x68, 0x3f, 0xe2, 0x92, 0xd5, 0x9f, 0xd3, 0xb0, 0x38, 0xb6, 0xcf, 0xd0, 0x87, 0x90, 0xf7,
- 0x4e, 0x3d, 0x9f, 0xf4, 0x5a, 0xa6, 0xc1, 0x26, 0x25, 0x5f, 0x9b, 0x0f, 0x03, 0x65, 0x38, 0x88,
- 0x73, 0xbc, 0xdb, 0x30, 0xd0, 0x43, 0xc8, 0x46, 0xeb, 0x3e, 0xb5, 0x76, 0x69, 0xa3, 0xb0, 0xb9,
- 0x36, 0xf5, 0x10, 0x88, 0xd6, 0x3a, 0xab, 0x8b, 0x30, 0xc2, 0x51, 0x87, 0x1e, 0xc9, 0xf4, 0x06,
- 0x20, 0x4e, 0xc2, 0xc4, 0x23, 0x59, 0xb3, 0x3d, 0xbf, 0x61, 0x75, 0x6c, 0x7e, 0x96, 0x52, 0x34,
- 0x66, 0xbf, 0xe8, 0x01, 0x64, 0x0f, 0x89, 0x7e, 0xec, 0x1f, 0x7a, 0xe5, 0x34, 0x0b, 0x62, 0xfa,
- 0x51, 0xa7, 0x31, 0x1c, 0x8f, 0x41, 0xd8, 0xe0, 0xa8, 0x83, 0xbe, 0x9d, 0xbd, 0xb1, 0x33, 0x8c,
- 0xfb, 0x5f, 0xdd, 0xd8, 0x33, 0xb6, 0xf5, 0x37, 0xc9, 0xc1, 0x44, 0x89, 0x66, 0x59, 0x30, 0x1f,
- 0x9d, 0x2b, 0x18, 0x91, 0xf4, 0xb4, 0x58, 0xa2, 0x3a, 0x4c, 0xc6, 0xa2, 0x89, 0xc2, 0x9c, 0x44,
- 0xc7, 0xaf, 0xde, 0xf6, 0xcd, 0x13, 0xd3, 0x3f, 0x8d, 0xd4, 0x3b, 0xc7, 0xa2, 0x98, 0x7e, 0xfc,
- 0x6e, 0x09, 0xbc, 0xd8, 0xa2, 0xb1, 0xe3, 0x77, 0x8c, 0x49, 0x1c, 0xbe, 0xa3, 0x78, 0xf5, 0x7b,
- 0x19, 0x96, 0x12, 0x78, 0x90, 0x03, 0x4b, 0x23, 0xd7, 0x87, 0x98, 0x80, 0x14, 0x36, 0x6f, 0x9e,
- 0x71, 0x0d, 0x11, 0xb1, 0x5c, 0x0b, 0x03, 0x25, 0x89, 0x45, 0x93, 0xf0, 0x65, 0x6b, 0x02, 0x9d,
- 0x83, 0x8c, 0x88, 0xe9, 0xa7, 0x14, 0x5c, 0x9e, 0x60, 0x43, 0x9f, 0xc1, 0x42, 0xdb, 0x76, 0x5d,
- 0x72, 0xac, 0xfb, 0xa6, 0x6d, 0x0d, 0x37, 0x0e, 0x0a, 0x03, 0x65, 0xec, 0x0d, 0x9e, 0x8f, 0x3d,
- 0x37, 0x0c, 0xb4, 0x3f, 0x10, 0x40, 0xae, 0x4f, 0xb7, 0xcf, 0x15, 0x7f, 0x65, 0x86, 0xea, 0x9d,
- 0x53, 0x8a, 0xd6, 0x21, 0xc7, 0xf3, 0x37, 0x0d, 0xa1, 0x46, 0xc5, 0x30, 0x50, 0x06, 0x63, 0x38,
- 0xcb, 0x7a, 0x0d, 0x43, 0xdd, 0x88, 0x92, 0x47, 0x05, 0xc8, 0xee, 0xef, 0x34, 0xeb, 0x8d, 0xe6,
- 0xc3, 0x92, 0x84, 0x32, 0x90, 0x62, 0x1a, 0x94, 0x87, 0x74, 0xa4, 0x3f, 0x7f, 0xca, 0x70, 0x6d,
- 0xca, 0xf2, 0x1b, 0xde, 0x4a, 0xf9, 0x7a, 0x13, 0xb3, 0x75, 0xe6, 0x56, 0x8d, 0xdd, 0x4a, 0xb9,
- 0xe1, 0xe0, 0x56, 0x2a, 0x78, 0xdf, 0xc0, 0x55, 0xdd, 0x71, 0x5a, 0xf4, 0x96, 0x4f, 0xef, 0x54,
- 0xaf, 0xf4, 0x4e, 0xe4, 0x21, 0x35, 0xe3, 0x72, 0xe8, 0x38, 0xfb, 0xdc, 0xe0, 0xf9, 0xd6, 0x03,
- 0xe1, 0x89, 0x5f, 0xd0, 0x12, 0xa9, 0xd8, 0xed, 0x70, 0x68, 0xa2, 0x77, 0x84, 0x49, 0x0e, 0x32,
- 0x1c, 0xa0, 0xfe, 0x26, 0xc7, 0x84, 0x94, 0x9f, 0x98, 0x03, 0x4d, 0x93, 0xff, 0x81, 0xa6, 0x9d,
- 0xa1, 0x45, 0xa9, 0xff, 0x52, 0x8b, 0xd4, 0x5d, 0x58, 0xac, 0xdb, 0xaf, 0xac, 0x63, 0x5b, 0x37,
- 0xa2, 0x3b, 0xe2, 0x05, 0x3e, 0xa1, 0xd4, 0xaf, 0x53, 0xb0, 0x94, 0xf0, 0x5d, 0x80, 0x76, 0x47,
- 0xae, 0x02, 0xef, 0xf5, 0x3d, 0x94, 0xb4, 0x0d, 0x1a, 0x90, 0xa1, 0x2a, 0x63, 0x5b, 0x62, 0x63,
- 0x9d, 0x25, 0x0c, 0x5b, 0x0c, 0xcc, 0xa9, 0xb8, 0x21, 0x16, 0x2d, 0x7a, 0x06, 0x05, 0x21, 0x12,
- 0x34, 0x21, 0x71, 0x48, 0xfd, 0x3f, 0x39, 0x3c, 0x0a, 0xab, 0x13, 0xaf, 0xed, 0x9a, 0x8e, 0x6f,
- 0xbb, 0xb5, 0xc5, 0x30, 0x50, 0xe2, 0xc6, 0x18, 0xf8, 0x03, 0x9d, 0x26, 0xf5, 0x0f, 0x19, 0x8a,
- 0x07, 0x0e, 0xad, 0xab, 0xd8, 0x60, 0x17, 0xf9, 0x32, 0x7d, 0x32, 0x26, 0x24, 0xd5, 0x24, 0xeb,
- 0xb8, 0xb7, 0xca, 0x53, 0x57, 0xb7, 0xbc, 0x0e, 0x71, 0x67, 0x68, 0x89, 0x0a, 0x19, 0x97, 0xe8,
- 0x9e, 0x6d, 0x09, 0x29, 0x61, 0x18, 0x3e, 0x82, 0x45, 0xab, 0x7e, 0x02, 0x0b, 0xa3, 0x4c, 0x54,
- 0x27, 0x86, 0xf7, 0x95, 0x48, 0x27, 0x00, 0x32, 0x0f, 0xb6, 0x1a, 0x8f, 0x77, 0xea, 0xa5, 0x94,
- 0xfa, 0x8b, 0x0c, 0x79, 0x5a, 0x81, 0xed, 0xc3, 0xbe, 0x75, 0x84, 0xf6, 0xd8, 0x36, 0x32, 0x88,
- 0x3b, 0x73, 0xe2, 0x29, 0x94, 0x18, 0x98, 0x78, 0x76, 0xdf, 0x6d, 0x53, 0x55, 0x31, 0x88, 0xcb,
- 0xe3, 0xe1, 0xc6, 0x9a, 0x84, 0x45, 0x0f, 0x69, 0xfc, 0xda, 0x29, 0x14, 0x60, 0xe3, 0x1c, 0x74,
- 0xec, 0x91, 0x97, 0x94, 0x5a, 0x6a, 0x12, 0x66, 0x6d, 0x2d, 0x0b, 0xe9, 0x36, 0x7d, 0xa5, 0xbe,
- 0x95, 0xe1, 0x4a, 0x62, 0x08, 0x17, 0x9a, 0x33, 0x15, 0x32, 0x8c, 0x9e, 0xcf, 0x59, 0x9a, 0xa7,
- 0xc3, 0x47, 0xb0, 0x68, 0xd1, 0x06, 0xe4, 0xda, 0x87, 0xa4, 0x7d, 0xe4, 0xf5, 0x7b, 0x62, 0x12,
- 0x98, 0x4e, 0x47, 0x63, 0x78, 0xd0, 0x43, 0x1f, 0x03, 0x30, 0x9b, 0x96, 0x67, 0xbe, 0x21, 0x4c,
- 0xd3, 0xd3, 0xe2, 0x9f, 0x82, 0xc1, 0x28, 0xce, 0xb3, 0xfe, 0x13, 0xf3, 0x0d, 0x51, 0x7f, 0x94,
- 0x61, 0x39, 0xa9, 0x0c, 0x17, 0xca, 0x68, 0x9d, 0x46, 0x4b, 0xbd, 0x99, 0x86, 0xc8, 0x49, 0x44,
- 0xcb, 0xc7, 0x70, 0x96, 0xf5, 0x1a, 0x06, 0xba, 0x21, 0xe6, 0x88, 0xa6, 0x54, 0x1c, 0x56, 0x5e,
- 0xd4, 0xfd, 0xee, 0xaf, 0xef, 0x56, 0xe5, 0xb7, 0xef, 0x56, 0xe5, 0xdf, 0xdf, 0xad, 0xca, 0x2f,
- 0x6e, 0x75, 0x4d, 0xff, 0xb0, 0xff, 0xb2, 0xd2, 0xb6, 0x7b, 0x55, 0x16, 0x49, 0x95, 0x45, 0x52,
- 0xf5, 0x8c, 0xa3, 0xea, 0xc9, 0x66, 0x95, 0xfd, 0xc3, 0x73, 0x9f, 0xfd, 0xbe, 0xcc, 0xb0, 0xe6,
- 0xce, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x1f, 0x57, 0x17, 0x9b, 0x12, 0x00, 0x00,
+ 0xbb, 0xc4, 0xf2, 0x2b, 0x9e, 0x71, 0xb4, 0x52, 0xe0, 0x5d, 0x06, 0x58, 0x29, 0x52, 0xbc, 0x6d,
+ 0x0d, 0x9f, 0xac, 0x8e, 0xd9, 0x15, 0x4f, 0xd7, 0x0d, 0xa7, 0xe5, 0xd9, 0x1d, 0xff, 0x95, 0xee,
+ 0x92, 0x96, 0x41, 0x7c, 0xdd, 0x3c, 0xf6, 0xc4, 0x2b, 0x44, 0x4e, 0x88, 0xe5, 0x7b, 0x55, 0xd6,
+ 0x88, 0x31, 0xe8, 0xda, 0x5d, 0x3b, 0xea, 0x1f, 0xda, 0x5e, 0x34, 0x9e, 0xb7, 0x74, 0x47, 0x74,
+ 0x0b, 0x3c, 0x16, 0xf6, 0xa0, 0xfe, 0x05, 0x90, 0xdd, 0xe6, 0xd1, 0xa2, 0x7b, 0x30, 0xd7, 0x23,
+ 0xbe, 0x5e, 0x96, 0xd7, 0xe4, 0x8d, 0xc2, 0xe6, 0x8d, 0xca, 0x64, 0xd8, 0x95, 0x5d, 0xe2, 0xeb,
+ 0x86, 0xee, 0xeb, 0xb5, 0x5c, 0x18, 0x28, 0x0c, 0x8d, 0xd9, 0x2f, 0xda, 0x81, 0x39, 0xff, 0xd4,
+ 0x21, 0xe5, 0xd4, 0x9a, 0xbc, 0xb1, 0xb0, 0xb9, 0x9e, 0x64, 0x2b, 0xdc, 0x44, 0xed, 0xd3, 0x53,
+ 0x87, 0x70, 0x1a, 0x6a, 0x88, 0xd9, 0x2f, 0x7a, 0x01, 0xd0, 0xee, 0x19, 0x2d, 0xcf, 0xd7, 0xfd,
+ 0xbe, 0x57, 0xbe, 0xc4, 0x02, 0xb9, 0x35, 0x83, 0xec, 0x09, 0x03, 0x62, 0xe2, 0x39, 0xb6, 0xe5,
+ 0x91, 0xda, 0x42, 0x18, 0x28, 0x31, 0x02, 0x4d, 0xc2, 0xf9, 0x76, 0x4f, 0x80, 0xd0, 0x33, 0x28,
+ 0x32, 0x96, 0x16, 0xaf, 0x6f, 0x79, 0x8e, 0xb1, 0x2b, 0x49, 0xec, 0x4d, 0xfa, 0xbc, 0xcd, 0x60,
+ 0xb5, 0x52, 0x18, 0x28, 0x23, 0x86, 0x9a, 0x84, 0x79, 0x09, 0x39, 0x00, 0xbd, 0x86, 0x2b, 0xf1,
+ 0xd7, 0x2d, 0x57, 0x44, 0x53, 0x4e, 0x33, 0x07, 0xeb, 0x67, 0x38, 0x18, 0x04, 0x7f, 0x3d, 0x0c,
+ 0x94, 0x64, 0x26, 0x4d, 0xc2, 0x4b, 0xd6, 0xa4, 0x05, 0xf5, 0xcc, 0x28, 0x29, 0xde, 0x22, 0x6d,
+ 0xbf, 0xe5, 0x92, 0x2f, 0xfb, 0xc4, 0xf3, 0xcb, 0x99, 0xe9, 0x9e, 0xb7, 0x68, 0x6f, 0x9b, 0xe3,
+ 0x31, 0x87, 0x73, 0xcf, 0x89, 0x4c, 0xd4, 0xb3, 0x3e, 0x69, 0x81, 0xbe, 0x82, 0xab, 0xe3, 0x78,
+ 0x91, 0x74, 0x96, 0xb9, 0xde, 0x38, 0xdb, 0xb5, 0xc8, 0x7a, 0x25, 0x0c, 0x94, 0x29, 0x5c, 0x9a,
+ 0x84, 0x97, 0xf5, 0x04, 0x1b, 0xe4, 0xc3, 0xf2, 0xc0, 0x82, 0xd7, 0x89, 0xa7, 0x9d, 0x63, 0xbe,
+ 0x3f, 0x98, 0xe5, 0x9b, 0x95, 0x8f, 0x67, 0x5d, 0x0e, 0x03, 0x25, 0x91, 0x47, 0x93, 0x30, 0xd2,
+ 0x27, 0xf0, 0x74, 0xfd, 0xc4, 0xd1, 0xe5, 0xfc, 0xf4, 0xf5, 0x13, 0xf3, 0xc6, 0xd7, 0x4f, 0xdc,
+ 0x90, 0xae, 0x9f, 0x18, 0x3d, 0xea, 0x40, 0x89, 0x6e, 0x29, 0xe7, 0x58, 0xb7, 0x48, 0xb4, 0xf2,
+ 0x0b, 0x8c, 0xfb, 0x7f, 0x49, 0xdc, 0xf5, 0x08, 0xcb, 0x97, 0x75, 0x6d, 0x39, 0x0c, 0x94, 0x09,
+ 0x02, 0x4d, 0xc2, 0x8b, 0xc6, 0x28, 0x10, 0x7d, 0x01, 0x45, 0xa6, 0x14, 0x2d, 0x97, 0x38, 0xb6,
+ 0xeb, 0x97, 0x8b, 0xd3, 0xab, 0xc5, 0x85, 0xa5, 0xb2, 0x43, 0x1b, 0xcc, 0xd0, 0x3c, 0x8d, 0xb8,
+ 0x3d, 0x4d, 0x83, 0x0c, 0x01, 0xe8, 0x3b, 0x19, 0x56, 0x62, 0x61, 0x8c, 0x49, 0x56, 0x79, 0x9e,
+ 0x79, 0xbb, 0x3d, 0x3b, 0x23, 0x61, 0x54, 0xe7, 0x36, 0xb5, 0xd5, 0x30, 0x50, 0x66, 0x70, 0x6a,
+ 0x12, 0x2e, 0x1b, 0x53, 0x6c, 0x47, 0xab, 0xda, 0x77, 0x0c, 0xdd, 0x27, 0xe5, 0x85, 0x73, 0x54,
+ 0xf5, 0x80, 0x41, 0xc7, 0xab, 0xca, 0x09, 0x46, 0xaa, 0xca, 0x81, 0xea, 0x1d, 0x28, 0xc4, 0x04,
+ 0x0d, 0x01, 0x64, 0x9a, 0x7b, 0x78, 0x77, 0xeb, 0x71, 0x49, 0x42, 0x45, 0xc8, 0xd5, 0xf7, 0x9e,
+ 0x37, 0x1f, 0xef, 0x6d, 0xd5, 0x4b, 0x32, 0x7d, 0x73, 0xb0, 0xcf, 0xfa, 0xa9, 0x5a, 0x06, 0xe6,
+ 0x28, 0x8f, 0xfa, 0xc3, 0x25, 0xb8, 0x92, 0xa8, 0x64, 0xe8, 0x73, 0xc8, 0x88, 0xa5, 0x20, 0x33,
+ 0x45, 0xbd, 0x7b, 0x6e, 0x11, 0x1c, 0x1d, 0xad, 0x41, 0x18, 0x28, 0x82, 0x0a, 0x8b, 0x16, 0x99,
+ 0x00, 0xc4, 0x75, 0x6d, 0xb7, 0xd5, 0xb6, 0x8d, 0x48, 0xb2, 0xef, 0xbd, 0xb7, 0x83, 0x1d, 0x4a,
+ 0xb1, 0x6d, 0x1b, 0x42, 0x76, 0x87, 0x8c, 0x38, 0x4f, 0xa2, 0x57, 0xe8, 0x26, 0x64, 0x7b, 0xc4,
+ 0xf3, 0xf4, 0x2e, 0x61, 0x6a, 0x9e, 0xaf, 0x15, 0xc2, 0x40, 0x89, 0x86, 0x70, 0xd4, 0x41, 0x0a,
+ 0xa4, 0x99, 0x0d, 0x13, 0xe5, 0x7c, 0x2d, 0x1f, 0x06, 0x0a, 0x1f, 0xc0, 0xbc, 0x51, 0xef, 0xc3,
+ 0xfc, 0x48, 0x30, 0x68, 0x11, 0x0a, 0xdb, 0xbb, 0xf5, 0xd6, 0x41, 0xf3, 0x51, 0x73, 0xef, 0x79,
+ 0xb3, 0x24, 0xd1, 0xfa, 0xd2, 0x81, 0xbd, 0x47, 0x25, 0x19, 0xcd, 0x43, 0x9e, 0xf6, 0x77, 0x30,
+ 0xde, 0xc3, 0xa5, 0x94, 0x5a, 0x85, 0xd2, 0x78, 0xcc, 0x14, 0xbe, 0x83, 0x31, 0x85, 0x4b, 0x94,
+ 0x8b, 0xf6, 0x23, 0x2e, 0x59, 0xfd, 0x39, 0x0d, 0x8b, 0x63, 0xfb, 0x0c, 0x7d, 0x08, 0x79, 0xef,
+ 0xd4, 0xf3, 0x49, 0xaf, 0x65, 0x1a, 0x6c, 0x52, 0xf2, 0xb5, 0xf9, 0x30, 0x50, 0x86, 0x83, 0x38,
+ 0xc7, 0xbb, 0x0d, 0x03, 0x3d, 0x84, 0x6c, 0xb4, 0xee, 0x53, 0x6b, 0x97, 0x36, 0x0a, 0x9b, 0x6b,
+ 0x53, 0x0f, 0x81, 0x68, 0xad, 0xb3, 0xba, 0x08, 0x23, 0x1c, 0x75, 0xe8, 0x91, 0x4c, 0x0f, 0x71,
+ 0x71, 0x12, 0x26, 0x1e, 0xc9, 0x9a, 0xed, 0xf9, 0x0d, 0xab, 0x63, 0xf3, 0xb3, 0x94, 0xa2, 0x31,
+ 0xfb, 0x45, 0x0f, 0x20, 0x7b, 0x48, 0xf4, 0x63, 0xff, 0xd0, 0x2b, 0xa7, 0x59, 0x10, 0xd3, 0x8f,
+ 0x3a, 0x8d, 0xe1, 0x78, 0x0c, 0xc2, 0x06, 0x47, 0x1d, 0xf4, 0xed, 0xec, 0x8d, 0x9d, 0x61, 0xdc,
+ 0xff, 0xea, 0xc6, 0x9e, 0xb1, 0xad, 0xbf, 0x49, 0x0e, 0x26, 0x4a, 0x34, 0xcb, 0x82, 0xf9, 0xe8,
+ 0x5c, 0xc1, 0x88, 0xa4, 0xa7, 0xc5, 0x12, 0xd5, 0x61, 0x32, 0x16, 0x4d, 0x14, 0xe6, 0x24, 0x3a,
+ 0x7e, 0xf5, 0xb6, 0x6f, 0x9e, 0x98, 0xfe, 0x69, 0xa4, 0xde, 0x39, 0x16, 0xc5, 0xf4, 0xe3, 0x77,
+ 0x4b, 0xe0, 0xc5, 0x16, 0x8d, 0x1d, 0xbf, 0x63, 0x4c, 0xe2, 0xf0, 0x1d, 0xc5, 0xab, 0xdf, 0xcb,
+ 0xb0, 0x94, 0xc0, 0x83, 0x1c, 0x58, 0x1a, 0xb9, 0x3e, 0xc4, 0x04, 0xa4, 0xb0, 0x79, 0xf3, 0x8c,
+ 0x6b, 0x88, 0x88, 0xe5, 0x5a, 0x18, 0x28, 0x49, 0x2c, 0x9a, 0x84, 0x2f, 0x5b, 0x13, 0xe8, 0x1c,
+ 0x64, 0x44, 0x4c, 0x3f, 0xa5, 0xe0, 0xf2, 0x04, 0x1b, 0xfa, 0x0c, 0x16, 0xda, 0xb6, 0xeb, 0x92,
+ 0x63, 0xdd, 0x37, 0x6d, 0x6b, 0xb8, 0x71, 0x50, 0x18, 0x28, 0x63, 0x6f, 0xf0, 0x7c, 0xec, 0xb9,
+ 0x61, 0xa0, 0xfd, 0x81, 0x00, 0x72, 0x7d, 0xba, 0x7d, 0xae, 0xf8, 0x2b, 0x33, 0x54, 0xef, 0x9c,
+ 0x52, 0xb4, 0x0e, 0x39, 0x9e, 0xbf, 0x69, 0x08, 0x35, 0x2a, 0x86, 0x81, 0x32, 0x18, 0xc3, 0x59,
+ 0xd6, 0x6b, 0x18, 0xea, 0x46, 0x94, 0x3c, 0x2a, 0x40, 0x76, 0x7f, 0xa7, 0x59, 0x6f, 0x34, 0x1f,
+ 0x96, 0x24, 0x94, 0x81, 0x14, 0xd3, 0xa0, 0x3c, 0xa4, 0x23, 0xfd, 0xf9, 0x53, 0x86, 0x6b, 0x53,
+ 0x96, 0xdf, 0xf0, 0x56, 0xca, 0xd7, 0x9b, 0x98, 0xad, 0x33, 0xb7, 0x6a, 0xec, 0x56, 0xca, 0x0d,
+ 0x07, 0xb7, 0x52, 0xc1, 0xfb, 0x06, 0xae, 0xea, 0x8e, 0xd3, 0xa2, 0xb7, 0x7c, 0x7a, 0xa7, 0x7a,
+ 0xa5, 0x77, 0x22, 0x0f, 0xa9, 0x19, 0x97, 0x43, 0xc7, 0xd9, 0xe7, 0x06, 0xcf, 0xb7, 0x1e, 0x08,
+ 0x4f, 0xfc, 0x82, 0x96, 0x48, 0xc5, 0x6e, 0x87, 0x43, 0x13, 0xbd, 0x23, 0x4c, 0x72, 0x90, 0xe1,
+ 0x00, 0xf5, 0x37, 0x39, 0x26, 0xa4, 0xfc, 0xc4, 0x1c, 0x68, 0x9a, 0xfc, 0x0f, 0x34, 0xed, 0x0c,
+ 0x2d, 0x4a, 0xfd, 0x97, 0x5a, 0xa4, 0xee, 0xc2, 0x62, 0xdd, 0x7e, 0x65, 0x1d, 0xdb, 0xba, 0x11,
+ 0xdd, 0x11, 0x2f, 0xf0, 0x09, 0xa5, 0x7e, 0x9d, 0x82, 0xa5, 0x84, 0xef, 0x02, 0xb4, 0x3b, 0x72,
+ 0x15, 0x78, 0xaf, 0xef, 0xa1, 0xa4, 0x6d, 0xd0, 0x80, 0x0c, 0x55, 0x19, 0xdb, 0x12, 0x1b, 0xeb,
+ 0x2c, 0x61, 0xd8, 0x62, 0x60, 0x4e, 0xc5, 0x0d, 0xb1, 0x68, 0xd1, 0x33, 0x28, 0x08, 0x91, 0xa0,
+ 0x09, 0x89, 0x43, 0xea, 0xff, 0xc9, 0xe1, 0x51, 0x58, 0x9d, 0x78, 0x6d, 0xd7, 0x74, 0x7c, 0xdb,
+ 0xad, 0x2d, 0x86, 0x81, 0x12, 0x37, 0xc6, 0xc0, 0x1f, 0xe8, 0x34, 0xa9, 0x7f, 0xc8, 0x50, 0x3c,
+ 0x70, 0x68, 0x5d, 0xc5, 0x06, 0xbb, 0xc8, 0x97, 0xe9, 0x93, 0x31, 0x21, 0xa9, 0x26, 0x59, 0xc7,
+ 0xbd, 0x55, 0x9e, 0xba, 0xba, 0xe5, 0x75, 0x88, 0x3b, 0x43, 0x4b, 0x54, 0xc8, 0xb8, 0x44, 0xf7,
+ 0x6c, 0x4b, 0x48, 0x09, 0xc3, 0xf0, 0x11, 0x2c, 0x5a, 0xf5, 0x13, 0x58, 0x18, 0x65, 0xa2, 0x3a,
+ 0x31, 0xbc, 0xaf, 0x44, 0x3a, 0x01, 0x90, 0x79, 0xb0, 0xd5, 0x78, 0xbc, 0x53, 0x2f, 0xa5, 0xd4,
+ 0x5f, 0x64, 0xc8, 0xd3, 0x0a, 0x6c, 0x1f, 0xf6, 0xad, 0x23, 0xb4, 0xc7, 0xb6, 0x91, 0x41, 0xdc,
+ 0x99, 0x13, 0x4f, 0xa1, 0xc4, 0xc0, 0xc4, 0xb3, 0xfb, 0x6e, 0x9b, 0xaa, 0x8a, 0x41, 0x5c, 0x1e,
+ 0x0f, 0x37, 0xd6, 0x24, 0x2c, 0x7a, 0x48, 0xe3, 0xd7, 0x4e, 0xa1, 0x00, 0x1b, 0xe7, 0xa0, 0x63,
+ 0x8f, 0xbc, 0xa4, 0xd4, 0x52, 0x93, 0x30, 0x6b, 0x6b, 0x59, 0x48, 0xb7, 0xe9, 0x2b, 0xf5, 0xad,
+ 0x0c, 0x57, 0x12, 0x43, 0xb8, 0xd0, 0x9c, 0xa9, 0x90, 0x61, 0xf4, 0x7c, 0xce, 0xd2, 0x3c, 0x1d,
+ 0x3e, 0x82, 0x45, 0x8b, 0x36, 0x20, 0xd7, 0x3e, 0x24, 0xed, 0x23, 0xaf, 0xdf, 0x13, 0x93, 0xc0,
+ 0x74, 0x3a, 0x1a, 0xc3, 0x83, 0x1e, 0xfa, 0x18, 0x80, 0xd9, 0xb4, 0x3c, 0xf3, 0x0d, 0x61, 0x9a,
+ 0x9e, 0x16, 0xff, 0x14, 0x0c, 0x46, 0x71, 0x9e, 0xf5, 0x9f, 0x98, 0x6f, 0x88, 0xfa, 0xa3, 0x0c,
+ 0xcb, 0x49, 0x65, 0xb8, 0x50, 0x46, 0xeb, 0x34, 0x5a, 0xea, 0xcd, 0x34, 0x44, 0x4e, 0x22, 0x5a,
+ 0x3e, 0x86, 0xb3, 0xac, 0xd7, 0x30, 0xd0, 0x0d, 0x31, 0x47, 0x34, 0xa5, 0xe2, 0xb0, 0xf2, 0xa2,
+ 0xee, 0x77, 0x7f, 0x7d, 0xb7, 0x2a, 0xbf, 0x7d, 0xb7, 0x2a, 0xff, 0xfe, 0x6e, 0x55, 0x7e, 0x71,
+ 0xab, 0x6b, 0xfa, 0x87, 0xfd, 0x97, 0x95, 0xb6, 0xdd, 0xab, 0xb2, 0x48, 0xaa, 0x2c, 0x92, 0xaa,
+ 0x67, 0x1c, 0x55, 0x4f, 0x36, 0xab, 0xec, 0x1f, 0x9e, 0xfb, 0xec, 0xf7, 0x65, 0x86, 0x35, 0x77,
+ 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x53, 0x4d, 0x33, 0x9b, 0x12, 0x00, 0x00,
}
func (m *Command) Marshal() (dAtA []byte, err error) {
diff --git a/sdk/proto/command.proto b/sdk/proto/command.proto
index feb738c3c..dcdc69782 100644
--- a/sdk/proto/command.proto
+++ b/sdk/proto/command.proto
@@ -1,167 +1,232 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-import "gogo.proto";
-import "common.proto";
import "agent.proto";
-import "host.proto";
-import "nginx.proto";
+import "common.proto";
import "config.proto";
-import "events/event.proto";
import "dp_software_details.proto";
+import "events/event.proto";
+import "gogo.proto";
+import "host.proto";
import "nap.proto";
+import "nginx.proto";
+
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-// Command is the envelope sent between the management plane and the data plane, requesting some action or reporting a response
+// Represents a command message, which is used for communication between the management server and the agent.
message Command {
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ]; // add metadata later with fields like timestamp etc
-
+ // Provides metadata information associated with the command
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // Command type enum
enum CommandType {
+ // All commands default to normal
NORMAL = 0;
+ // The download type is used when sending NginxConfig from the management server to the agent.
+ // It is used to instruct the agent to download the NGINX config from the management server.
DOWNLOAD = 1;
+ // The upload type is used when sending NginxConfig from the agent to the management server.
+ // It is used to instruct the agent to upload the NGINX config from the agent.
+ // This will be implemented in a future release.
UPLOAD = 2;
}
- // used as a dispatch flag to quickly send the command to the correct base processor that will then further sort
- // based on the actual data type
- CommandType type = 2 [(gogoproto.jsontag) = "type" ];
+ // Used to determine the type of command
+ CommandType type = 2 [(gogoproto.jsontag) = "type"];
oneof data {
- // common command status response - used by most command responses
- CommandStatusResponse cmd_status = 3 [(gogoproto.jsontag) = "cmd_status" ];
+ // Common command status response
+ CommandStatusResponse cmd_status = 3 [(gogoproto.jsontag) = "cmd_status"];
- // request action on nginx config when sent C → A - all action values (see NgxConfig)
- // notify config details when sent A → C - only RETURN action
- NginxConfig nginx_config = 4 [(gogoproto.jsontag) = "nginx_config" ];
+ // Used by the management server to notify the agent to download or upload NGINX configuration.
+ NginxConfig nginx_config = 4 [(gogoproto.jsontag) = "nginx_config"];
- // request action on nginx config when sent C → A - all action values (see NgxConfig)
- // notify config details when sent A → C - only RETURN action
- NginxConfigResponse nginx_config_response = 5 [(gogoproto.jsontag) = "nginx_config_response" ];
+ // Response sent to indicate if a NGINX config apply was successful or not
+ NginxConfigResponse nginx_config_response = 5 [(gogoproto.jsontag) = "nginx_config_response"];
- // request connection to a management plane, A → C
- AgentConnectRequest agent_connect_request = 6 [(gogoproto.jsontag) = "agent_connect_request" ];
+ // Agent connect request that is sent from the agent to the management server to initialize registration
+ AgentConnectRequest agent_connect_request = 6 [(gogoproto.jsontag) = "agent_connect_request"];
- // connection response to the data plane, C → A
- AgentConnectResponse agent_connect_response = 7 [(gogoproto.jsontag) = "agent_connect_response" ];
+ // Agent connect response that is sent from the management server to the agent to finalize registration
+ AgentConnectResponse agent_connect_response = 7 [(gogoproto.jsontag) = "agent_connect_response"];
- // request Configuration parameters for agent, A → C
- AgentConfigRequest agent_config_request = 8 [(gogoproto.jsontag) = "agent_config_request" ];
+ // Agent config request that is sent by the agent to the management server to request agent configuration
+ AgentConfigRequest agent_config_request = 8 [(gogoproto.jsontag) = "agent_config_request"];
- // configuration parameters for Agent C → A. This message can be sent asynchronously as well
- AgentConfig agent_config = 9 [(gogoproto.jsontag) = "agent_config" ];
+ // Agent Config is sent by the management server to the agent when is receives an AgentConfigRequest from the agent
+ AgentConfig agent_config = 9 [(gogoproto.jsontag) = "agent_config"];
- // DataplaneStatus reports Dataplane metrics the Agent is aware of
- DataplaneStatus dataplane_status = 11 [(gogoproto.jsontag) = "dataplane_status" ];
+ // Dataplane status is sent by the agent to the management server to report the information like the health of the system
+ DataplaneStatus dataplane_status = 11 [(gogoproto.jsontag) = "dataplane_status"];
- // EventReport reports events the Agent is aware of, e.g. Start/Stop of Agent, Config Apply NGINX
- f5.nginx.agent.sdk.events.EventReport event_report = 12 [(gogoproto.jsontag) = "event_report" ];
+ // Reports events the agent is aware of like the start/stop of the agent, NGINX config applies, etc.
+ f5.nginx.agent.sdk.events.EventReport event_report = 12 [(gogoproto.jsontag) = "event_report"];
- // DataplaneSoftwareDetails contains details for additional software running on the dataplane that pertains
- // to NGINX Agent
+ // Provides details of additional software running on the dataplane
DataplaneSoftwareDetails dataplane_software_details = 13 [(gogoproto.jsontag) = "dataplane_software_details"];
- // DataplaneUpdate contains details for dataplane resources that have changed
- DataplaneUpdate dataplane_update = 14 [(gogoproto.jsontag) = "dataplane_update" ];
+ // Provides details of any changes on the dataplane
+ DataplaneUpdate dataplane_update = 14 [(gogoproto.jsontag) = "dataplane_update"];
}
}
+// Represents a command status response
message CommandStatusResponse {
+ // Command status enum
enum CommandStatus {
+ // Unknown status of command
CMD_UNKNOWN = 0;
+ // Command was successful
CMD_OK = 1;
+ // Command failed
CMD_ERROR = 2;
}
+ // Command error code enum
enum CommandErrorCode {
- ERR_OK = 0; // No Error
- ERR_UNKNOWN = 1; // unknown error
+ // No Error (This is the default value)
+ ERR_OK = 0;
+ // Unknown error
+ ERR_UNKNOWN = 1;
}
- CommandStatus status = 1 [(gogoproto.jsontag) = "status" ];
- CommandErrorCode error_code = 2 [(gogoproto.jsontag) = "error_code" ];
- string message = 3 [(gogoproto.jsontag) = "message" ];
- string error = 4 [(gogoproto.jsontag) = "error" ];
+ // Command status
+ CommandStatus status = 1 [(gogoproto.jsontag) = "status"];
+ // Error code
+ CommandErrorCode error_code = 2 [(gogoproto.jsontag) = "error_code"];
+ // Provides a user friendly message to describe the response
+ string message = 3 [(gogoproto.jsontag) = "message"];
+ // Provides an error message of why the command failed
+ string error = 4 [(gogoproto.jsontag) = "error"];
}
-// DataplaneStatus reports Dataplane metrics the Agent is aware of
+// Represents a dataplane status, which is used by the agent to periodically report the status of NGINX, agent activities and other dataplane software activities.
message DataplaneStatus {
- string system_id = 1 [(gogoproto.jsontag) = "system_id" ];
- repeated NginxDetails details = 2 [(gogoproto.jsontag) = "details" ]; // moving to dataplane_software_details
- HostInfo host = 3 [(gogoproto.jsontag) = "host" ];
- repeated NginxHealth healths = 5 [(gogoproto.jsontag) = "healths" ]; // moving to DataplaneSoftwareHealth
+ // System ID
+ string system_id = 1 [(gogoproto.jsontag) = "system_id"];
+ // List of NGINX details. This field will be moving to DataplaneSoftwareDetails in a future release.
+ repeated NginxDetails details = 2 [(gogoproto.jsontag) = "details"];
+ // Host information
+ HostInfo host = 3 [(gogoproto.jsontag) = "host"];
+ // List of NGINX health information. This field will be moving to DataplaneSoftwareHealth in a future release.
+ repeated NginxHealth healths = 5 [(gogoproto.jsontag) = "healths"];
+ // List of software details. This includes details about NGINX and any other software installed in the system that the agent is interested in.
repeated DataplaneSoftwareDetails dataplane_software_details = 6 [(gogoproto.jsontag) = "dataplane_software_details"];
+ // List of software health statues. This includes the health of NGINX and any other software installed in the system that the agent is interested in.
repeated DataplaneSoftwareHealth dataplane_software_healths = 7 [(gogoproto.jsontag) = "dataplane_software_healths"];
- repeated AgentActivityStatus agent_activity_status = 8 [(gogoproto.jsontag) = "agent_activity_status" ];
+ // List of activity statuses. Reports on the status of activities that the agent is currently executing.
+ repeated AgentActivityStatus agent_activity_status = 8 [(gogoproto.jsontag) = "agent_activity_status"];
}
+// Represent an agent activity status
message AgentActivityStatus {
- oneof Status {
- NginxConfigStatus nginx_config_status = 1 [(gogoproto.jsontag) = "nginx_config_status" ];
- }
+ oneof Status {
+ // NGINX configuration status
+ NginxConfigStatus nginx_config_status = 1 [(gogoproto.jsontag) = "nginx_config_status"];
+ }
}
+// Represents a NGINX configuration status
message NginxConfigStatus {
- string correlation_id = 1 [(gogoproto.jsontag) = "correlation_id" ];
- Status status = 2 [(gogoproto.jsontag) = "status" ];
- string message = 3 [(gogoproto.jsontag) = "message" ];
- string nginx_id = 4 [(gogoproto.jsontag) = "nginx_id" ];
-
+ // CorrelationID is an ID used by the producer of the message to track the flow of events
+ string correlation_id = 1 [(gogoproto.jsontag) = "correlation_id"];
+ // Provides a status for the NGINX configuration
+ Status status = 2 [(gogoproto.jsontag) = "status"];
+ // Provides a user friendly message to describe the current state of the NGINX configuration.
+ string message = 3 [(gogoproto.jsontag) = "message"];
+ // NGINX ID
+ string nginx_id = 4 [(gogoproto.jsontag) = "nginx_id"];
+
+ // NGINX configuration status enum
enum Status {
+ // The configuration is still in the process of being applied.
PENDING = 0;
+ // The configuration has being successfully applied.
OK = 1;
+ // The configuration has failed to be applied
ERROR = 2;
}
}
+// Represents a dataplane software health
message DataplaneSoftwareHealth {
- oneof health {
- NginxHealth nginx_health = 1 [(gogoproto.jsontag) = "nginx_health"];
- AppProtectWAFHealth app_protect_waf_health = 2 [(gogoproto.jsontag) = "app_protect_waf_health"];
- }
+ oneof health {
+ // Health of NGINX instance
+ NginxHealth nginx_health = 1 [(gogoproto.jsontag) = "nginx_health"];
+ // Health of App Protect WAF
+ AppProtectWAFHealth app_protect_waf_health = 2 [(gogoproto.jsontag) = "app_protect_waf_health"];
+ }
}
+// Represents a dataplane update
message DataplaneUpdate {
- HostInfo host = 1 [(gogoproto.jsontag) = "host"];
- repeated DataplaneSoftwareDetails dataplane_software_details = 2 [(gogoproto.jsontag) = "dataplane_software_details"];
+ // Host information
+ HostInfo host = 1 [(gogoproto.jsontag) = "host"];
+ // List of software details. This includes details about NGINX and any other software installed in the system that the agent is interested in.
+ repeated DataplaneSoftwareDetails dataplane_software_details = 2 [(gogoproto.jsontag) = "dataplane_software_details"];
}
+// Represents a download request
message DownloadRequest {
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
+ // Metadata information
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
}
+// Represents a NGINX config response
message NginxConfigResponse {
- CommandStatusResponse status = 1 [(gogoproto.jsontag) = "status" ];
- NginxConfigAction action = 2 [(gogoproto.jsontag) = "action" ];
- ConfigDescriptor config_data = 3 [(gogoproto.jsontag) = "config_data" ];
+ // Command status
+ CommandStatusResponse status = 1 [(gogoproto.jsontag) = "status"];
+ // NGINX config action
+ NginxConfigAction action = 2 [(gogoproto.jsontag) = "action"];
+ // NGINX config description
+ ConfigDescriptor config_data = 3 [(gogoproto.jsontag) = "config_data"];
}
+// Represents an upload status
message UploadStatus {
+ // Transfer status enum
enum TransferStatus {
+ // Unknown status
UNKNOWN = 0;
+ // Upload was successful
OK = 1;
+ // Upload failed
FAILED = 2;
}
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- TransferStatus status = 2 [(gogoproto.jsontag) = "status" ];
- string reason = 3 [(gogoproto.jsontag) = "reason" ];
+ // Metadata information
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // Transfer status
+ TransferStatus status = 2 [(gogoproto.jsontag) = "status"];
+ // Provides an error message of why the upload failed
+ string reason = 3 [(gogoproto.jsontag) = "reason"];
}
+// Represents a data chunck
message DataChunk {
oneof chunk {
- ChunkedResourceHeader header = 1 [(gogoproto.jsontag) = "header" ];
- ChunkedResourceChunk data = 2 [(gogoproto.jsontag) = "data" ];
- };
+ // Chunk header
+ ChunkedResourceHeader header = 1 [(gogoproto.jsontag) = "header"];
+ // Chunk data
+ ChunkedResourceChunk data = 2 [(gogoproto.jsontag) = "data"];
+ }
}
+// Represents a chunked resource Header
message ChunkedResourceHeader {
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- // number of chunks expected in this transfer
- int32 chunks = 2 [(gogoproto.jsontag) = "chunks" ];
- string checksum = 3 [(gogoproto.jsontag) = "checksum" ];
- int32 chunk_size = 4 [(gogoproto.jsontag) = "chunk_size" ];
+ // Metadata information
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // Number of chunks expected in the transfer
+ int32 chunks = 2 [(gogoproto.jsontag) = "chunks"];
+ // Chunk checksum
+ string checksum = 3 [(gogoproto.jsontag) = "checksum"];
+ // Chunk size
+ int32 chunk_size = 4 [(gogoproto.jsontag) = "chunk_size"];
}
+// Represents a chunked resource chunk
message ChunkedResourceChunk {
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- int32 chunk_id = 2 [(gogoproto.jsontag) = "chunk_id" ];
- bytes data = 3 [(gogoproto.jsontag) = "data" ];
+ // Metadata information
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // Chunk ID
+ int32 chunk_id = 2 [(gogoproto.jsontag) = "chunk_id"];
+ // Chunk data
+ bytes data = 3 [(gogoproto.jsontag) = "data"];
}
diff --git a/sdk/proto/command_svc.pb.go b/sdk/proto/command_svc.pb.go
index 86f71f023..05ac4ec44 100644
--- a/sdk/proto/command_svc.pb.go
+++ b/sdk/proto/command_svc.pb.go
@@ -57,21 +57,14 @@ const _ = grpc.SupportPackageIsVersion4
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CommanderClient interface {
- // A Bidirectional streaming RPC established by the data plane agent and is kept open
+ // A Bidirectional streaming RPC established by the agent and is kept open
CommandChannel(ctx context.Context, opts ...grpc.CallOption) (Commander_CommandChannelClient, error)
- // A streaming RPC established by the data plane agent and is used to download resources associated with commands
- // The download stream will be kept open for the duration of the data transfer and will be closed when its done/
- // The transfer is a stream of chunks as follows:
- // - header
- // - data chunk count to follow
- // - resource identifier/metadata
- // - data 1
- // ...
- // - data
- //
- // each data chunk is of a size smaller than the maximum gRPC payload
+ // A streaming RPC established by the agent and is used to download resources associated with commands
+ // The download stream will be kept open for the duration of the data transfer and will be closed when its done.
+ // The transfer is a stream of chunks as follows: header -> data chunk 1 -> data chunk N.
+ // Each data chunk is of a size smaller than the maximum gRPC payload
Download(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (Commander_DownloadClient, error)
- // A streaming RPC established by the data plane agent and is used to upload resources associated with commands
+ // A streaming RPC established by the agent and is used to upload resources associated with commands
Upload(ctx context.Context, opts ...grpc.CallOption) (Commander_UploadClient, error)
}
@@ -182,21 +175,14 @@ func (x *commanderUploadClient) CloseAndRecv() (*UploadStatus, error) {
// CommanderServer is the server API for Commander service.
type CommanderServer interface {
- // A Bidirectional streaming RPC established by the data plane agent and is kept open
+ // A Bidirectional streaming RPC established by the agent and is kept open
CommandChannel(Commander_CommandChannelServer) error
- // A streaming RPC established by the data plane agent and is used to download resources associated with commands
- // The download stream will be kept open for the duration of the data transfer and will be closed when its done/
- // The transfer is a stream of chunks as follows:
- // - header
- // - data chunk count to follow
- // - resource identifier/metadata
- // - data 1
- // ...
- // - data
- //
- // each data chunk is of a size smaller than the maximum gRPC payload
+ // A streaming RPC established by the agent and is used to download resources associated with commands
+ // The download stream will be kept open for the duration of the data transfer and will be closed when its done.
+ // The transfer is a stream of chunks as follows: header -> data chunk 1 -> data chunk N.
+ // Each data chunk is of a size smaller than the maximum gRPC payload
Download(*DownloadRequest, Commander_DownloadServer) error
- // A streaming RPC established by the data plane agent and is used to upload resources associated with commands
+ // A streaming RPC established by the agent and is used to upload resources associated with commands
Upload(Commander_UploadServer) error
}
diff --git a/sdk/proto/command_svc.proto b/sdk/proto/command_svc.proto
index 2c232c967..d3addcb55 100644
--- a/sdk/proto/command_svc.proto
+++ b/sdk/proto/command_svc.proto
@@ -1,29 +1,21 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
import "command.proto";
-// Interface exported by the server.
-service Commander {
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
- // A Bidirectional streaming RPC established by the data plane agent and is kept open
+// Represents a service used to sent command messages between the management server and the agent.
+service Commander {
+ // A Bidirectional streaming RPC established by the agent and is kept open
rpc CommandChannel(stream Command) returns (stream Command) {}
- // A streaming RPC established by the data plane agent and is used to download resources associated with commands
- // The download stream will be kept open for the duration of the data transfer and will be closed when its done/
- // The transfer is a stream of chunks as follows:
- // - header
- // - data chunk count to follow
- // - resource identifier/metadata
- // - data 1
- // ...
- // - data
- //
- // each data chunk is of a size smaller than the maximum gRPC payload
+ // A streaming RPC established by the agent and is used to download resources associated with commands
+ // The download stream will be kept open for the duration of the data transfer and will be closed when its done.
+ // The transfer is a stream of chunks as follows: header -> data chunk 1 -> data chunk N.
+ // Each data chunk is of a size smaller than the maximum gRPC payload
rpc Download(DownloadRequest) returns (stream DataChunk) {}
- // A streaming RPC established by the data plane agent and is used to upload resources associated with commands
+ // A streaming RPC established by the agent and is used to upload resources associated with commands
rpc Upload(stream DataChunk) returns (UploadStatus) {}
}
-
diff --git a/sdk/proto/common.pb.go b/sdk/proto/common.pb.go
index 96be39044..398267a49 100644
--- a/sdk/proto/common.pb.go
+++ b/sdk/proto/common.pb.go
@@ -24,14 +24,20 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Action enum
type File_Action int32
const (
- File_unset File_Action = 0
+ // Default value
+ File_unset File_Action = 0
+ // No changes to the file
File_unchanged File_Action = 1
- File_add File_Action = 2
- File_update File_Action = 3
- File_delete File_Action = 4
+ // New file
+ File_add File_Action = 2
+ // Updated file
+ File_update File_Action = 3
+ // File deleted
+ File_delete File_Action = 4
)
var File_Action_name = map[int32]string{
@@ -58,15 +64,19 @@ func (File_Action) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{2, 0}
}
-// Metadata timestamped info associating a client with a specific command message
+// Represents the metadata for a message
type Metadata struct {
- Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp"`
- ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id"`
- MessageId string `protobuf:"bytes,3,opt,name=message_id,json=messageId,proto3" json:"message_id"`
- CloudAccountId string `protobuf:"bytes,4,opt,name=cloud_account_id,json=cloudAccountId,proto3" json:"cloud_account_id"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // timestamp defines the time of message creation
+ Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp"`
+ // Client ID
+ ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id"`
+ // Message ID
+ MessageId string `protobuf:"bytes,3,opt,name=message_id,json=messageId,proto3" json:"message_id"`
+ // Cloud Account ID (e.g. AWS/Azure/GCP account ID)
+ CloudAccountId string `protobuf:"bytes,4,opt,name=cloud_account_id,json=cloudAccountId,proto3" json:"cloud_account_id"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Metadata) Reset() { *m = Metadata{} }
@@ -130,7 +140,9 @@ func (m *Metadata) GetCloudAccountId() string {
return ""
}
+// Represents a map of directories & files on the system
type DirectoryMap struct {
+ // List of directories
Directories []*Directory `protobuf:"bytes,1,rep,name=directories,proto3" json:"directories,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -177,17 +189,25 @@ func (m *DirectoryMap) GetDirectories() []*Directory {
return nil
}
+// Represents a file
type File struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
- Lines int32 `protobuf:"varint,2,opt,name=lines,proto3" json:"lines"`
- Mtime *types.Timestamp `protobuf:"bytes,3,opt,name=mtime,proto3" json:"mtime"`
- Permissions string `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions"`
- Size_ int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size"`
- Contents []byte `protobuf:"bytes,6,opt,name=contents,proto3" json:"contents"`
- Action File_Action `protobuf:"varint,7,opt,name=action,proto3,enum=f5.nginx.agent.sdk.File_Action" json:"action,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Name of the file
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Number of lines in the file
+ Lines int32 `protobuf:"varint,2,opt,name=lines,proto3" json:"lines"`
+ // When the file was last modified
+ Mtime *types.Timestamp `protobuf:"bytes,3,opt,name=mtime,proto3" json:"mtime"`
+ // File permissions (e.g. 0644)
+ Permissions string `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions"`
+ // Size of the file in bytes
+ Size_ int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size"`
+ // The contents of the file in bytes
+ Contents []byte `protobuf:"bytes,6,opt,name=contents,proto3" json:"contents"`
+ // Action to take on the file (e.g. update, delete, etc)
+ Action File_Action `protobuf:"varint,7,opt,name=action,proto3,enum=f5.nginx.agent.sdk.File_Action" json:"action,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *File) Reset() { *m = File{} }
@@ -272,15 +292,21 @@ func (m *File) GetAction() File_Action {
return File_unset
}
+// Represents a directory
type Directory struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Mtime *types.Timestamp `protobuf:"bytes,2,opt,name=mtime,proto3" json:"mtime,omitempty"`
- Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"`
- Size_ int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
- Files []*File `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Name of the directory
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // When the directory was last modified
+ Mtime *types.Timestamp `protobuf:"bytes,2,opt,name=mtime,proto3" json:"mtime,omitempty"`
+ // Directory permissions (e.g. 0644)
+ Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"`
+ // Size of the directory in bytes
+ Size_ int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
+ // List of files in the directory
+ Files []*File `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Directory) Reset() { *m = Directory{} }
@@ -351,7 +377,9 @@ func (m *Directory) GetFiles() []*File {
return nil
}
+// Represents a list of SSL certificates files
type SslCertificates struct {
+ // List of SSL certificates
SslCerts []*SslCertificate `protobuf:"bytes,1,rep,name=ssl_certs,json=sslCerts,proto3" json:"ssl_certs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -398,26 +426,43 @@ func (m *SslCertificates) GetSslCerts() []*SslCertificate {
return nil
}
+// Represents a SSL certificate file
type SslCertificate struct {
- FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"fileName"`
- Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size"`
- Mtime *types.Timestamp `protobuf:"bytes,3,opt,name=mtime,proto3" json:"mtime"`
- Validity *CertificateDates `protobuf:"bytes,4,opt,name=validity,proto3" json:"validity"`
- Issuer *CertificateName `protobuf:"bytes,5,opt,name=issuer,proto3" json:"issuer"`
- Subject *CertificateName `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject"`
- SubjAltNames []string `protobuf:"bytes,7,rep,name=subj_alt_names,json=subjAltNames,proto3" json:"subjectAltName"`
- OcspUrl []string `protobuf:"bytes,8,rep,name=ocsp_url,json=ocspUrl,proto3" json:"ocspURL"`
- PublicKeyAlgorithm string `protobuf:"bytes,9,opt,name=public_key_algorithm,json=publicKeyAlgorithm,proto3" json:"publicKeyAlgorithm"`
- SignatureAlgorithm string `protobuf:"bytes,10,opt,name=signature_algorithm,json=signatureAlgorithm,proto3" json:"signatureAlgorithm"`
- SerialNumber string `protobuf:"bytes,11,opt,name=serial_number,json=serialNumber,proto3" json:"serialNumber"`
- SubjectKeyIdentifier string `protobuf:"bytes,12,opt,name=subject_key_identifier,json=subjectKeyIdentifier,proto3" json:"subjectKeyIdentifier"`
- Fingerprint string `protobuf:"bytes,13,opt,name=fingerprint,proto3" json:"fingerprint"`
- FingerprintAlgorithm string `protobuf:"bytes,14,opt,name=fingerprint_algorithm,json=fingerprintAlgorithm,proto3" json:"fingerprintAlgorithm"`
- Version int64 `protobuf:"varint,15,opt,name=version,proto3" json:"version"`
- AuthorityKeyIdentifier string `protobuf:"bytes,16,opt,name=authority_key_identifier,json=authorityKeyIdentifier,proto3" json:"authorityKeyIdentifier"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Name of the file
+ FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"fileName"`
+ // Size of the file in bytes
+ Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size"`
+ // When the file was last modified
+ Mtime *types.Timestamp `protobuf:"bytes,3,opt,name=mtime,proto3" json:"mtime"`
+ // A time when the certificate is valid
+ Validity *CertificateDates `protobuf:"bytes,4,opt,name=validity,proto3" json:"validity"`
+ // This field contains the distinguished name (DN) of the certificate issuer
+ Issuer *CertificateName `protobuf:"bytes,5,opt,name=issuer,proto3" json:"issuer"`
+ // This dedicated object name associated with the public key, for which the certificate is issued
+ Subject *CertificateName `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject"`
+ // Subject alternative names that allows users to specify additional host names for the SSL certificate
+ SubjAltNames []string `protobuf:"bytes,7,rep,name=subj_alt_names,json=subjAltNames,proto3" json:"subjectAltName"`
+ // Online Certificate Status Protocol URL
+ OcspUrl []string `protobuf:"bytes,8,rep,name=ocsp_url,json=ocspUrl,proto3" json:"ocspURL"`
+ // Public key encryption algorithm (e.g. RSA)
+ PublicKeyAlgorithm string `protobuf:"bytes,9,opt,name=public_key_algorithm,json=publicKeyAlgorithm,proto3" json:"publicKeyAlgorithm"`
+ // The signature algorithm contain a hashing algorithm and an encryption algorithm (e.g. sha256RSA where sha256 is the hashing algorithm and RSA is the encryption algorithm)
+ SignatureAlgorithm string `protobuf:"bytes,10,opt,name=signature_algorithm,json=signatureAlgorithm,proto3" json:"signatureAlgorithm"`
+ // Used to uniquely identify the certificate within a CA's systems
+ SerialNumber string `protobuf:"bytes,11,opt,name=serial_number,json=serialNumber,proto3" json:"serialNumber"`
+ // The subject key identifier extension provides a means of identifying certificates that contain a particular public key
+ SubjectKeyIdentifier string `protobuf:"bytes,12,opt,name=subject_key_identifier,json=subjectKeyIdentifier,proto3" json:"subjectKeyIdentifier"`
+ // SSL certificate fingerprint
+ Fingerprint string `protobuf:"bytes,13,opt,name=fingerprint,proto3" json:"fingerprint"`
+ // SSL certificate fingerprint algorithm
+ FingerprintAlgorithm string `protobuf:"bytes,14,opt,name=fingerprint_algorithm,json=fingerprintAlgorithm,proto3" json:"fingerprintAlgorithm"`
+ // There are three versions of certificates: 1, 2 and 3, numbered as 0, 1 and 2. Version 1 supports only the basic fields; Version 2 adds unique identifiers, which represent two additional fields; Version 3 adds extensions.
+ Version int64 `protobuf:"varint,15,opt,name=version,proto3" json:"version"`
+ // The authority key identifier extension provides a means of identifying the Public Key corresponding to the Private Key used to sign a certificate
+ AuthorityKeyIdentifier string `protobuf:"bytes,16,opt,name=authority_key_identifier,json=authorityKeyIdentifier,proto3" json:"authorityKeyIdentifier"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *SslCertificate) Reset() { *m = SslCertificate{} }
@@ -565,8 +610,11 @@ func (m *SslCertificate) GetAuthorityKeyIdentifier() string {
return ""
}
+// Represents the dates for which a certificate is valid
type CertificateDates struct {
- NotBefore int64 `protobuf:"varint,1,opt,name=not_before,json=notBefore,proto3" json:"notBefore"`
+ // The start date that for when the certificate is valid
+ NotBefore int64 `protobuf:"varint,1,opt,name=not_before,json=notBefore,proto3" json:"notBefore"`
+ // The end date that for when the certificate is valid
NotAfter int64 `protobuf:"varint,2,opt,name=not_after,json=notAfter,proto3" json:"notAfter"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -620,12 +668,19 @@ func (m *CertificateDates) GetNotAfter() int64 {
return 0
}
+// Represents a Distinguished Name (DN)
type CertificateName struct {
- CommonName string `protobuf:"bytes,1,opt,name=common_name,json=commonName,proto3" json:"commonName"`
- Country []string `protobuf:"bytes,2,rep,name=country,proto3" json:"country"`
- State []string `protobuf:"bytes,3,rep,name=state,proto3" json:"state"`
- Locality []string `protobuf:"bytes,4,rep,name=locality,proto3" json:"locality"`
- Organization []string `protobuf:"bytes,5,rep,name=organization,proto3" json:"organization"`
+ // The fully qualified domain name (e.g. www.example.com)
+ CommonName string `protobuf:"bytes,1,opt,name=common_name,json=commonName,proto3" json:"commonName"`
+ // Country
+ Country []string `protobuf:"bytes,2,rep,name=country,proto3" json:"country"`
+ // State
+ State []string `protobuf:"bytes,3,rep,name=state,proto3" json:"state"`
+ // Locality
+ Locality []string `protobuf:"bytes,4,rep,name=locality,proto3" json:"locality"`
+ // Organization
+ Organization []string `protobuf:"bytes,5,rep,name=organization,proto3" json:"organization"`
+ // Organizational Unit
OrganizationalUnit []string `protobuf:"bytes,6,rep,name=organizational_unit,json=organizationalUnit,proto3" json:"organizationalUnit"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -707,9 +762,13 @@ func (m *CertificateName) GetOrganizationalUnit() []string {
return nil
}
+// Represents a zipped file
type ZippedFile struct {
- Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents"`
- Checksum string `protobuf:"bytes,2,opt,name=checksum,proto3" json:"checksum"`
+ // The contents of the file in bytes
+ Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents"`
+ // File checksum
+ Checksum string `protobuf:"bytes,2,opt,name=checksum,proto3" json:"checksum"`
+ // The directory where the file is located
RootDirectory string `protobuf:"bytes,3,opt,name=root_directory,json=rootDirectory,proto3" json:"root_directory"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
diff --git a/sdk/proto/common.proto b/sdk/proto/common.proto
index fb01fb89a..092d4dad1 100644
--- a/sdk/proto/common.proto
+++ b/sdk/proto/common.proto
@@ -1,86 +1,146 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
import "gogo.proto";
import "google/protobuf/timestamp.proto";
-// Metadata timestamped info associating a client with a specific command message
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents the metadata for a message
message Metadata {
- google.protobuf.Timestamp timestamp = 1 [(gogoproto.jsontag) = "timestamp" ];
- string client_id = 2 [(gogoproto.jsontag) = "client_id" ];
- string message_id = 3 [(gogoproto.jsontag) = "message_id" ];
- string cloud_account_id = 4 [(gogoproto.jsontag) = "cloud_account_id" ];
+ // timestamp defines the time of message creation
+ google.protobuf.Timestamp timestamp = 1 [(gogoproto.jsontag) = "timestamp"];
+ // Client ID
+ string client_id = 2 [(gogoproto.jsontag) = "client_id"];
+ // Message ID
+ string message_id = 3 [(gogoproto.jsontag) = "message_id"];
+ // Cloud Account ID (e.g. AWS/Azure/GCP account ID)
+ string cloud_account_id = 4 [(gogoproto.jsontag) = "cloud_account_id"];
}
+// Represents a map of directories & files on the system
message DirectoryMap {
+ // List of directories
repeated Directory directories = 1;
}
+// Represents a file
message File {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- int32 lines = 2 [(gogoproto.jsontag) = "lines" ];
- google.protobuf.Timestamp mtime = 3 [(gogoproto.jsontag) = "mtime" ];
- string permissions = 4 [(gogoproto.jsontag) = "permissions" ];
- int64 size = 5 [(gogoproto.jsontag) = "size" ];
- bytes contents = 6 [(gogoproto.jsontag) = "contents" ];
+ // Name of the file
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Number of lines in the file
+ int32 lines = 2 [(gogoproto.jsontag) = "lines"];
+ // When the file was last modified
+ google.protobuf.Timestamp mtime = 3 [(gogoproto.jsontag) = "mtime"];
+ // File permissions (e.g. 0644)
+ string permissions = 4 [(gogoproto.jsontag) = "permissions"];
+ // Size of the file in bytes
+ int64 size = 5 [(gogoproto.jsontag) = "size"];
+ // The contents of the file in bytes
+ bytes contents = 6 [(gogoproto.jsontag) = "contents"];
+ // Action enum
enum Action {
+ // Default value
unset = 0;
+ // No changes to the file
unchanged = 1;
+ // New file
add = 2;
+ // Updated file
update = 3;
+ // File deleted
delete = 4;
}
+ // Action to take on the file (e.g. update, delete, etc)
Action action = 7;
}
+// Represents a directory
message Directory {
+ // Name of the directory
string name = 1;
+ // When the directory was last modified
google.protobuf.Timestamp mtime = 2;
+ // Directory permissions (e.g. 0644)
string permissions = 3;
+ // Size of the directory in bytes
int64 size = 4;
+ // List of files in the directory
repeated File files = 5;
}
+// Represents a list of SSL certificates files
message SslCertificates {
+ // List of SSL certificates
repeated SslCertificate ssl_certs = 1;
}
+// Represents a SSL certificate file
message SslCertificate {
- string file_name = 1 [(gogoproto.jsontag) = "fileName" ];
- int64 size = 2 [(gogoproto.jsontag) = "size" ];
- google.protobuf.Timestamp mtime = 3 [(gogoproto.jsontag) = "mtime" ];
- CertificateDates validity = 4 [(gogoproto.jsontag) = "validity" ];
- CertificateName issuer = 5 [(gogoproto.jsontag) = "issuer" ];
- CertificateName subject = 6 [(gogoproto.jsontag) = "subject" ];
- repeated string subj_alt_names = 7 [(gogoproto.jsontag) = "subjectAltName" ];
- repeated string ocsp_url = 8 [(gogoproto.jsontag) = "ocspURL" ];
- string public_key_algorithm = 9 [(gogoproto.jsontag) = "publicKeyAlgorithm" ];
- string signature_algorithm = 10 [(gogoproto.jsontag) = "signatureAlgorithm" ];
- string serial_number = 11 [(gogoproto.jsontag) = "serialNumber" ];
- string subject_key_identifier = 12 [(gogoproto.jsontag) = "subjectKeyIdentifier" ];
- string fingerprint = 13 [(gogoproto.jsontag) = "fingerprint" ];
- string fingerprint_algorithm = 14 [(gogoproto.jsontag) = "fingerprintAlgorithm" ];
- int64 version = 15 [(gogoproto.jsontag) = "version" ];
- string authority_key_identifier = 16 [(gogoproto.jsontag) = "authorityKeyIdentifier" ];
+ // Name of the file
+ string file_name = 1 [(gogoproto.jsontag) = "fileName"];
+ // Size of the file in bytes
+ int64 size = 2 [(gogoproto.jsontag) = "size"];
+ // When the file was last modified
+ google.protobuf.Timestamp mtime = 3 [(gogoproto.jsontag) = "mtime"];
+ // A time when the certificate is valid
+ CertificateDates validity = 4 [(gogoproto.jsontag) = "validity"];
+ // This field contains the distinguished name (DN) of the certificate issuer
+ CertificateName issuer = 5 [(gogoproto.jsontag) = "issuer"];
+ // This dedicated object name associated with the public key, for which the certificate is issued
+ CertificateName subject = 6 [(gogoproto.jsontag) = "subject"];
+ // Subject alternative names that allows users to specify additional host names for the SSL certificate
+ repeated string subj_alt_names = 7 [(gogoproto.jsontag) = "subjectAltName"];
+ // Online Certificate Status Protocol URL
+ repeated string ocsp_url = 8 [(gogoproto.jsontag) = "ocspURL"];
+ // Public key encryption algorithm (e.g. RSA)
+ string public_key_algorithm = 9 [(gogoproto.jsontag) = "publicKeyAlgorithm"];
+ // The signature algorithm contain a hashing algorithm and an encryption algorithm (e.g. sha256RSA where sha256 is the hashing algorithm and RSA is the encryption algorithm)
+ string signature_algorithm = 10 [(gogoproto.jsontag) = "signatureAlgorithm"];
+ // Used to uniquely identify the certificate within a CA's systems
+ string serial_number = 11 [(gogoproto.jsontag) = "serialNumber"];
+ // The subject key identifier extension provides a means of identifying certificates that contain a particular public key
+ string subject_key_identifier = 12 [(gogoproto.jsontag) = "subjectKeyIdentifier"];
+ // SSL certificate fingerprint
+ string fingerprint = 13 [(gogoproto.jsontag) = "fingerprint"];
+ // SSL certificate fingerprint algorithm
+ string fingerprint_algorithm = 14 [(gogoproto.jsontag) = "fingerprintAlgorithm"];
+ // There are three versions of certificates: 1, 2 and 3, numbered as 0, 1 and 2. Version 1 supports only the basic fields; Version 2 adds unique identifiers, which represent two additional fields; Version 3 adds extensions.
+ int64 version = 15 [(gogoproto.jsontag) = "version"];
+ // The authority key identifier extension provides a means of identifying the Public Key corresponding to the Private Key used to sign a certificate
+ string authority_key_identifier = 16 [(gogoproto.jsontag) = "authorityKeyIdentifier"];
}
+// Represents the dates for which a certificate is valid
message CertificateDates {
- int64 not_before = 1 [(gogoproto.jsontag) = "notBefore" ];
- int64 not_after = 2 [(gogoproto.jsontag) = "notAfter" ];
+ // The start date that for when the certificate is valid
+ int64 not_before = 1 [(gogoproto.jsontag) = "notBefore"];
+ // The end date that for when the certificate is valid
+ int64 not_after = 2 [(gogoproto.jsontag) = "notAfter"];
}
+// Represents a Distinguished Name (DN)
message CertificateName {
- string common_name = 1 [(gogoproto.jsontag) = "commonName" ];
- repeated string country = 2 [(gogoproto.jsontag) = "country" ];
- repeated string state = 3 [(gogoproto.jsontag) = "state" ];
- repeated string locality = 4 [(gogoproto.jsontag) = "locality" ];
- repeated string organization = 5 [(gogoproto.jsontag) = "organization" ];
- repeated string organizational_unit = 6 [(gogoproto.jsontag) = "organizationalUnit" ];
+ // The fully qualified domain name (e.g. www.example.com)
+ string common_name = 1 [(gogoproto.jsontag) = "commonName"];
+ // Country
+ repeated string country = 2 [(gogoproto.jsontag) = "country"];
+ // State
+ repeated string state = 3 [(gogoproto.jsontag) = "state"];
+ // Locality
+ repeated string locality = 4 [(gogoproto.jsontag) = "locality"];
+ // Organization
+ repeated string organization = 5 [(gogoproto.jsontag) = "organization"];
+ // Organizational Unit
+ repeated string organizational_unit = 6 [(gogoproto.jsontag) = "organizationalUnit"];
}
+// Represents a zipped file
message ZippedFile {
- bytes contents = 1 [(gogoproto.jsontag) = "contents" ];
- string checksum = 2 [(gogoproto.jsontag) = "checksum" ];
- string root_directory = 3 [(gogoproto.jsontag) = "root_directory" ];
+ // The contents of the file in bytes
+ bytes contents = 1 [(gogoproto.jsontag) = "contents"];
+ // File checksum
+ string checksum = 2 [(gogoproto.jsontag) = "checksum"];
+ // The directory where the file is located
+ string root_directory = 3 [(gogoproto.jsontag) = "root_directory"];
}
diff --git a/sdk/proto/common/common.pb.go b/sdk/proto/common/common.pb.go
index 5b8bfdda9..74c563d70 100644
--- a/sdk/proto/common/common.pb.go
+++ b/sdk/proto/common/common.pb.go
@@ -23,8 +23,11 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Represents a dimension used in events
type Dimension struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Dimension name
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Dimension value
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
diff --git a/sdk/proto/common/common.proto b/sdk/proto/common/common.proto
index 710d56d24..a85e2bcff 100644
--- a/sdk/proto/common/common.proto
+++ b/sdk/proto/common/common.proto
@@ -1,11 +1,15 @@
+// Common messages
syntax = "proto3";
package f5.nginx.agent.sdk.common;
-option go_package = "github.com/nginx/agent/sdk/v2/proto/common;f5.nginx.agent.sdk.common";
import "gogo.proto";
+option go_package = "github.com/nginx/agent/sdk/v2/proto/common;f5.nginx.agent.sdk.common";
+
+// Represents a dimension used in events
message Dimension {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- string value = 2 [(gogoproto.jsontag) = "value" ];
+ // Dimension name
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Dimension value
+ string value = 2 [(gogoproto.jsontag) = "value"];
}
-
diff --git a/sdk/proto/config.pb.go b/sdk/proto/config.pb.go
index 821e8b96f..e7bdcb53c 100644
--- a/sdk/proto/config.pb.go
+++ b/sdk/proto/config.pb.go
@@ -23,8 +23,11 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Represents a config report
type ConfigReport struct {
- Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
+ // Provides metadata information associated with the message
+ Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
+ // List of NGINX config descriptors
Configs []*ConfigDescriptor `protobuf:"bytes,2,rep,name=configs,proto3" json:"configs"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -78,9 +81,13 @@ func (m *ConfigReport) GetConfigs() []*ConfigDescriptor {
return nil
}
+// Represents a config descriptor
type ConfigDescriptor struct {
- SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
- NginxId string `protobuf:"bytes,2,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
+ // System ID
+ SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
+ // NGINX ID
+ NginxId string `protobuf:"bytes,2,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
+ // Config file checksum
Checksum string `protobuf:"bytes,3,opt,name=checksum,proto3" json:"checksum"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -152,23 +159,23 @@ var fileDescriptor_3eaf2c85e69e9ea4 = []byte{
// 298 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0xce, 0xcf, 0x4b,
0xcb, 0x4c, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4a, 0x33, 0xd5, 0xcb, 0x4b, 0xcf,
- 0xcc, 0xab, 0xd0, 0x4b, 0x4c, 0x4f, 0xcd, 0x2b, 0xd1, 0x2b, 0x4e, 0xc9, 0x96, 0xe2, 0x4a, 0xcf,
- 0x4f, 0xcf, 0x87, 0xc8, 0x4b, 0xf1, 0x24, 0xe7, 0xe7, 0xe6, 0xe6, 0xe7, 0x41, 0x78, 0x4a, 0xd3,
- 0x19, 0xb9, 0x78, 0x9c, 0xc1, 0xda, 0x83, 0x52, 0x0b, 0xf2, 0x8b, 0x4a, 0x84, 0xac, 0xb8, 0x58,
- 0x72, 0x53, 0x4b, 0x12, 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0x64, 0xf4, 0x30, 0x4d, 0xd3,
- 0xf3, 0x4d, 0x2d, 0x49, 0x4c, 0x49, 0x2c, 0x49, 0x74, 0xe2, 0x78, 0x75, 0x4f, 0x1e, 0xac, 0x3a,
- 0x08, 0x4c, 0x0a, 0x79, 0x73, 0xb1, 0x43, 0x9c, 0x52, 0x2c, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d,
- 0xa4, 0x82, 0x4d, 0x3b, 0xc4, 0x3a, 0x97, 0xd4, 0xe2, 0xe4, 0xa2, 0xcc, 0x82, 0x92, 0xfc, 0x22,
- 0x27, 0xee, 0x57, 0xf7, 0xe4, 0x61, 0x1a, 0x83, 0x60, 0x0c, 0xa5, 0x89, 0x8c, 0x5c, 0x02, 0xe8,
- 0x4a, 0x85, 0xb4, 0xb8, 0x38, 0x8b, 0x2b, 0x8b, 0x4b, 0x52, 0x73, 0xe3, 0x33, 0x53, 0xc0, 0x4e,
- 0xe4, 0x74, 0xe2, 0x7d, 0x75, 0x4f, 0x1e, 0x21, 0x18, 0xc4, 0x01, 0x61, 0x7a, 0xa6, 0x08, 0xa9,
- 0x73, 0x71, 0x80, 0xad, 0x06, 0x29, 0x65, 0x02, 0x2b, 0xe5, 0x79, 0x75, 0x4f, 0x1e, 0x2e, 0x16,
- 0xc4, 0x0e, 0x66, 0x79, 0xa6, 0x08, 0x69, 0x70, 0x71, 0x24, 0x67, 0xa4, 0x26, 0x67, 0x17, 0x97,
- 0xe6, 0x4a, 0x30, 0x23, 0x14, 0xc2, 0xc4, 0x82, 0xe0, 0x2c, 0x27, 0xf3, 0x13, 0x8f, 0xe4, 0x18,
- 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0x4a, 0x33, 0x3d, 0xb3, 0x24, 0xa3, 0x34,
- 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x6c, 0x96, 0x3e, 0xd8, 0x93, 0xfa, 0xc5, 0x29, 0xd9, 0xfa,
- 0x65, 0x46, 0xfa, 0xe0, 0x00, 0xb6, 0x06, 0x93, 0x49, 0x6c, 0x60, 0xca, 0x18, 0x10, 0x00, 0x00,
- 0xff, 0xff, 0x2e, 0xd1, 0x9b, 0xd3, 0xab, 0x01, 0x00, 0x00,
+ 0xcc, 0xab, 0xd0, 0x4b, 0x4c, 0x4f, 0xcd, 0x2b, 0xd1, 0x2b, 0x4e, 0xc9, 0x96, 0xe2, 0x49, 0xce,
+ 0xcf, 0xcd, 0xcd, 0xcf, 0x83, 0xa8, 0x90, 0xe2, 0x4a, 0xcf, 0x4f, 0xcf, 0x87, 0xb0, 0x95, 0xa6,
+ 0x33, 0x72, 0xf1, 0x38, 0x83, 0xb5, 0x07, 0xa5, 0x16, 0xe4, 0x17, 0x95, 0x08, 0x59, 0x71, 0xb1,
+ 0xe4, 0xa6, 0x96, 0x24, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0xc9, 0xe8, 0x61, 0x9a, 0xa6,
+ 0xe7, 0x9b, 0x5a, 0x92, 0x98, 0x92, 0x58, 0x92, 0xe8, 0xc4, 0xf1, 0xea, 0x9e, 0x3c, 0x58, 0x75,
+ 0x10, 0x98, 0x14, 0xf2, 0xe6, 0x62, 0x87, 0x38, 0xa5, 0x58, 0x82, 0x49, 0x81, 0x59, 0x83, 0xdb,
+ 0x48, 0x05, 0x9b, 0x76, 0x88, 0x75, 0x2e, 0xa9, 0xc5, 0xc9, 0x45, 0x99, 0x05, 0x25, 0xf9, 0x45,
+ 0x4e, 0xdc, 0xaf, 0xee, 0xc9, 0xc3, 0x34, 0x06, 0xc1, 0x18, 0x4a, 0x13, 0x19, 0xb9, 0x04, 0xd0,
+ 0x95, 0x0a, 0x69, 0x71, 0x71, 0x16, 0x57, 0x16, 0x97, 0xa4, 0xe6, 0xc6, 0x67, 0xa6, 0x80, 0x9d,
+ 0xc8, 0xe9, 0xc4, 0xfb, 0xea, 0x9e, 0x3c, 0x42, 0x30, 0x88, 0x03, 0xc2, 0xf4, 0x4c, 0x11, 0x52,
+ 0xe7, 0xe2, 0x00, 0x5b, 0x0d, 0x52, 0xca, 0x04, 0x56, 0xca, 0xf3, 0xea, 0x9e, 0x3c, 0x5c, 0x2c,
+ 0x88, 0x1d, 0xcc, 0xf2, 0x4c, 0x11, 0xd2, 0xe0, 0xe2, 0x48, 0xce, 0x48, 0x4d, 0xce, 0x2e, 0x2e,
+ 0xcd, 0x95, 0x60, 0x46, 0x28, 0x84, 0x89, 0x05, 0xc1, 0x59, 0x4e, 0xe6, 0x27, 0x1e, 0xc9, 0x31,
+ 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, 0x66, 0x7a, 0x66, 0x49, 0x46, 0x69,
+ 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xd8, 0x2c, 0x7d, 0xb0, 0x27, 0xf5, 0x8b, 0x53, 0xb2, 0xf5,
+ 0xcb, 0x8c, 0xf4, 0xc1, 0x01, 0x6c, 0x0d, 0x26, 0x93, 0xd8, 0xc0, 0x94, 0x31, 0x20, 0x00, 0x00,
+ 0xff, 0xff, 0x53, 0x4a, 0x06, 0x93, 0xab, 0x01, 0x00, 0x00,
}
func (m *ConfigReport) Marshal() (dAtA []byte, err error) {
diff --git a/sdk/proto/config.proto b/sdk/proto/config.proto
index adc8d5003..d44386e6d 100644
--- a/sdk/proto/config.proto
+++ b/sdk/proto/config.proto
@@ -1,17 +1,25 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-import "gogo.proto";
import "common.proto";
+import "gogo.proto";
+
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+// Represents a config report
message ConfigReport {
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- repeated ConfigDescriptor configs = 2 [(gogoproto.jsontag) = "configs" ];
+ // Provides metadata information associated with the message
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // List of NGINX config descriptors
+ repeated ConfigDescriptor configs = 2 [(gogoproto.jsontag) = "configs"];
}
+// Represents a config descriptor
message ConfigDescriptor {
- string system_id = 1 [(gogoproto.jsontag) = "system_id" ];
- string nginx_id = 2 [(gogoproto.jsontag) = "nginx_id" ];
- string checksum = 3 [(gogoproto.jsontag) = "checksum" ];
+ // System ID
+ string system_id = 1 [(gogoproto.jsontag) = "system_id"];
+ // NGINX ID
+ string nginx_id = 2 [(gogoproto.jsontag) = "nginx_id"];
+ // Config file checksum
+ string checksum = 3 [(gogoproto.jsontag) = "checksum"];
}
diff --git a/sdk/proto/dp_software_details.pb.go b/sdk/proto/dp_software_details.pb.go
index a30ec906d..c3628b516 100644
--- a/sdk/proto/dp_software_details.pb.go
+++ b/sdk/proto/dp_software_details.pb.go
@@ -23,8 +23,7 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
-// DataplaneSoftwareDetails contains details for additional software running on the dataplane that pertains
-// to NGINX Agent
+// Represents dataplane software details which contains details for additional software running on the dataplane that pertains to NGINX Agent
type DataplaneSoftwareDetails struct {
// Types that are valid to be assigned to Data:
// *DataplaneSoftwareDetails_AppProtectWafDetails
diff --git a/sdk/proto/dp_software_details.proto b/sdk/proto/dp_software_details.proto
index 4d9a20771..891a57266 100644
--- a/sdk/proto/dp_software_details.proto
+++ b/sdk/proto/dp_software_details.proto
@@ -1,16 +1,18 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
import "gogo.proto";
import "nap.proto";
import "nginx.proto";
-// DataplaneSoftwareDetails contains details for additional software running on the dataplane that pertains
-// to NGINX Agent
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents dataplane software details which contains details for additional software running on the dataplane that pertains to NGINX Agent
message DataplaneSoftwareDetails {
- oneof data {
- AppProtectWAFDetails app_protect_waf_details = 1 [(gogoproto.jsontag) = "app_protect_waf_details"];
- NginxDetails nginx_details = 2 [(gogoproto.jsontag) = "nginx_details"];
- }
+ oneof data {
+ // App Protect WAF software details
+ AppProtectWAFDetails app_protect_waf_details = 1 [(gogoproto.jsontag) = "app_protect_waf_details"];
+ // NGINX software details
+ NginxDetails nginx_details = 2 [(gogoproto.jsontag) = "nginx_details"];
+ }
}
diff --git a/sdk/proto/dpenv.pb.go b/sdk/proto/dpenv.pb.go
deleted file mode 100644
index 847e0772e..000000000
--- a/sdk/proto/dpenv.pb.go
+++ /dev/null
@@ -1,1121 +0,0 @@
-// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: dpenv.proto
-
-package proto
-
-import (
- encoding_binary "encoding/binary"
- fmt "fmt"
- _ "github.com/gogo/protobuf/gogoproto"
- proto "github.com/gogo/protobuf/proto"
- io "io"
- math "math"
- math_bits "math/bits"
-)
-
-// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
-
-type EnvReport_Type int32
-
-const (
- EnvReport_SYSTEM EnvReport_Type = 0
- EnvReport_INSTANCE EnvReport_Type = 1
- EnvReport_AGENT EnvReport_Type = 2
-)
-
-var EnvReport_Type_name = map[int32]string{
- 0: "SYSTEM",
- 1: "INSTANCE",
- 2: "AGENT",
-}
-
-var EnvReport_Type_value = map[string]int32{
- "SYSTEM": 0,
- "INSTANCE": 1,
- "AGENT": 2,
-}
-
-func (x EnvReport_Type) String() string {
- return proto.EnumName(EnvReport_Type_name, int32(x))
-}
-
-func (EnvReport_Type) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_a2ec482b9ece7397, []int{0, 0}
-}
-
-// MetasReport a report containing status entities for a specific metric type
-type EnvReport struct {
- Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- Type EnvReport_Type `protobuf:"varint,2,opt,name=type,proto3,enum=f5.nginx.agent.sdk.EnvReport_Type" json:"type"`
- PropertySets []*EnvPropertySet `protobuf:"bytes,3,rep,name=property_sets,json=propertySets,proto3" json:"property_sets"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *EnvReport) Reset() { *m = EnvReport{} }
-func (m *EnvReport) String() string { return proto.CompactTextString(m) }
-func (*EnvReport) ProtoMessage() {}
-func (*EnvReport) Descriptor() ([]byte, []int) {
- return fileDescriptor_a2ec482b9ece7397, []int{0}
-}
-func (m *EnvReport) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *EnvReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_EnvReport.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *EnvReport) XXX_Merge(src proto.Message) {
- xxx_messageInfo_EnvReport.Merge(m, src)
-}
-func (m *EnvReport) XXX_Size() int {
- return m.Size()
-}
-func (m *EnvReport) XXX_DiscardUnknown() {
- xxx_messageInfo_EnvReport.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_EnvReport proto.InternalMessageInfo
-
-func (m *EnvReport) GetMeta() *Metadata {
- if m != nil {
- return m.Meta
- }
- return nil
-}
-
-func (m *EnvReport) GetType() EnvReport_Type {
- if m != nil {
- return m.Type
- }
- return EnvReport_SYSTEM
-}
-
-func (m *EnvReport) GetPropertySets() []*EnvPropertySet {
- if m != nil {
- return m.PropertySets
- }
- return nil
-}
-
-// EnvPropety - a container for a Dataplane Environment property.
-type EnvProperty struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
- // Types that are valid to be assigned to Value:
- // *EnvProperty_Ival
- // *EnvProperty_Dval
- // *EnvProperty_Sval
- Value isEnvProperty_Value `protobuf_oneof:"value"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *EnvProperty) Reset() { *m = EnvProperty{} }
-func (m *EnvProperty) String() string { return proto.CompactTextString(m) }
-func (*EnvProperty) ProtoMessage() {}
-func (*EnvProperty) Descriptor() ([]byte, []int) {
- return fileDescriptor_a2ec482b9ece7397, []int{1}
-}
-func (m *EnvProperty) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *EnvProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_EnvProperty.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *EnvProperty) XXX_Merge(src proto.Message) {
- xxx_messageInfo_EnvProperty.Merge(m, src)
-}
-func (m *EnvProperty) XXX_Size() int {
- return m.Size()
-}
-func (m *EnvProperty) XXX_DiscardUnknown() {
- xxx_messageInfo_EnvProperty.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_EnvProperty proto.InternalMessageInfo
-
-type isEnvProperty_Value interface {
- isEnvProperty_Value()
- MarshalTo([]byte) (int, error)
- Size() int
-}
-
-type EnvProperty_Ival struct {
- Ival int64 `protobuf:"varint,10,opt,name=ival,proto3,oneof" json:"ival"`
-}
-type EnvProperty_Dval struct {
- Dval float64 `protobuf:"fixed64,11,opt,name=dval,proto3,oneof" json:"dval"`
-}
-type EnvProperty_Sval struct {
- Sval string `protobuf:"bytes,12,opt,name=sval,proto3,oneof" json:"sval"`
-}
-
-func (*EnvProperty_Ival) isEnvProperty_Value() {}
-func (*EnvProperty_Dval) isEnvProperty_Value() {}
-func (*EnvProperty_Sval) isEnvProperty_Value() {}
-
-func (m *EnvProperty) GetValue() isEnvProperty_Value {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *EnvProperty) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *EnvProperty) GetIval() int64 {
- if x, ok := m.GetValue().(*EnvProperty_Ival); ok {
- return x.Ival
- }
- return 0
-}
-
-func (m *EnvProperty) GetDval() float64 {
- if x, ok := m.GetValue().(*EnvProperty_Dval); ok {
- return x.Dval
- }
- return 0
-}
-
-func (m *EnvProperty) GetSval() string {
- if x, ok := m.GetValue().(*EnvProperty_Sval); ok {
- return x.Sval
- }
- return ""
-}
-
-// XXX_OneofWrappers is for the internal use of the proto package.
-func (*EnvProperty) XXX_OneofWrappers() []interface{} {
- return []interface{}{
- (*EnvProperty_Ival)(nil),
- (*EnvProperty_Dval)(nil),
- (*EnvProperty_Sval)(nil),
- }
-}
-
-type EnvPropertySet struct {
- Dimensions []*Dimension `protobuf:"bytes,1,rep,name=dimensions,proto3" json:"dimensions"`
- Properties []*EnvProperty `protobuf:"bytes,2,rep,name=properties,proto3" json:"properties"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *EnvPropertySet) Reset() { *m = EnvPropertySet{} }
-func (m *EnvPropertySet) String() string { return proto.CompactTextString(m) }
-func (*EnvPropertySet) ProtoMessage() {}
-func (*EnvPropertySet) Descriptor() ([]byte, []int) {
- return fileDescriptor_a2ec482b9ece7397, []int{2}
-}
-func (m *EnvPropertySet) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *EnvPropertySet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_EnvPropertySet.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *EnvPropertySet) XXX_Merge(src proto.Message) {
- xxx_messageInfo_EnvPropertySet.Merge(m, src)
-}
-func (m *EnvPropertySet) XXX_Size() int {
- return m.Size()
-}
-func (m *EnvPropertySet) XXX_DiscardUnknown() {
- xxx_messageInfo_EnvPropertySet.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_EnvPropertySet proto.InternalMessageInfo
-
-func (m *EnvPropertySet) GetDimensions() []*Dimension {
- if m != nil {
- return m.Dimensions
- }
- return nil
-}
-
-func (m *EnvPropertySet) GetProperties() []*EnvProperty {
- if m != nil {
- return m.Properties
- }
- return nil
-}
-
-func init() {
- proto.RegisterEnum("f5.nginx.agent.sdk.EnvReport_Type", EnvReport_Type_name, EnvReport_Type_value)
- proto.RegisterType((*EnvReport)(nil), "f5.nginx.agent.sdk.EnvReport")
- proto.RegisterType((*EnvProperty)(nil), "f5.nginx.agent.sdk.EnvProperty")
- proto.RegisterType((*EnvPropertySet)(nil), "f5.nginx.agent.sdk.EnvPropertySet")
-}
-
-func init() { proto.RegisterFile("dpenv.proto", fileDescriptor_a2ec482b9ece7397) }
-
-var fileDescriptor_a2ec482b9ece7397 = []byte{
- // 441 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0x6e, 0xd3, 0x40,
- 0x10, 0x86, 0xbb, 0x89, 0x5b, 0x9a, 0x71, 0x1a, 0x85, 0x3d, 0x59, 0x55, 0x49, 0x2c, 0x9f, 0x8c,
- 0x90, 0x6c, 0x29, 0x08, 0x21, 0xc1, 0x85, 0x1a, 0x22, 0xe0, 0x90, 0x80, 0x9c, 0x5c, 0xe8, 0x05,
- 0x6d, 0xb3, 0x8b, 0xb1, 0x5a, 0xef, 0xae, 0xbc, 0x5b, 0x8b, 0xbc, 0x06, 0xe2, 0x41, 0x78, 0x0c,
- 0x8e, 0x3c, 0x41, 0x84, 0x72, 0xcc, 0x53, 0xa0, 0x5d, 0x1b, 0x92, 0x8a, 0xa0, 0x5e, 0x66, 0x76,
- 0xf4, 0xcd, 0xff, 0x4f, 0xf2, 0xcb, 0xe0, 0x52, 0xc9, 0x78, 0x15, 0xc9, 0x52, 0x68, 0x81, 0xf1,
- 0xa7, 0x27, 0x11, 0xcf, 0x72, 0xfe, 0x25, 0x22, 0x19, 0xe3, 0x3a, 0x52, 0xf4, 0xea, 0x14, 0x32,
- 0x91, 0x89, 0x9a, 0x9f, 0x76, 0x17, 0xa2, 0x28, 0x04, 0x6f, 0xa6, 0x93, 0x82, 0xe9, 0x32, 0x5f,
- 0xa8, 0x7a, 0x0c, 0xbe, 0xb6, 0xa0, 0x33, 0xe6, 0x55, 0xca, 0xa4, 0x28, 0x35, 0x7e, 0x06, 0x4e,
- 0xc1, 0x34, 0xf1, 0x90, 0x8f, 0x42, 0x77, 0x74, 0x16, 0xfd, 0xeb, 0x1c, 0x4d, 0x98, 0x26, 0x94,
- 0x68, 0x92, 0x1c, 0x6f, 0x56, 0x43, 0xbb, 0x9d, 0xda, 0x8a, 0x5f, 0x80, 0xa3, 0x97, 0x92, 0x79,
- 0x2d, 0x1f, 0x85, 0xbd, 0x51, 0xb0, 0x4f, 0xfb, 0xf7, 0x50, 0x34, 0x5f, 0x4a, 0x56, 0x3b, 0x18,
- 0x4d, 0x6a, 0x2b, 0xbe, 0x80, 0x13, 0x59, 0x0a, 0xc9, 0x4a, 0xbd, 0xfc, 0xa8, 0x98, 0x56, 0x5e,
- 0xdb, 0x6f, 0x87, 0xee, 0x7f, 0xad, 0xde, 0x37, 0xbb, 0x33, 0xa6, 0x93, 0xfb, 0x9b, 0xd5, 0xf0,
- 0xb6, 0x38, 0xed, 0xca, 0x2d, 0x57, 0xc1, 0x23, 0x70, 0xcc, 0x4d, 0x0c, 0x70, 0x34, 0xfb, 0x30,
- 0x9b, 0x8f, 0x27, 0xfd, 0x03, 0xdc, 0x85, 0xe3, 0xb7, 0xd3, 0xd9, 0xfc, 0x7c, 0xfa, 0x72, 0xdc,
- 0x47, 0xb8, 0x03, 0x87, 0xe7, 0xaf, 0xc7, 0xd3, 0x79, 0xbf, 0x15, 0x7c, 0x43, 0xe0, 0xee, 0x1c,
- 0xc0, 0x67, 0xe0, 0x70, 0x52, 0x30, 0x1b, 0x4b, 0xa7, 0xfe, 0xd9, 0x66, 0x4e, 0x6d, 0xc5, 0x03,
- 0x70, 0xf2, 0x8a, 0x5c, 0x7b, 0xe0, 0xa3, 0xb0, 0x5d, 0x53, 0x33, 0xbf, 0x39, 0x48, 0x6d, 0x37,
- 0x9c, 0x1a, 0xee, 0xfa, 0x28, 0x44, 0x35, 0xa7, 0x0d, 0xa7, 0x0d, 0x57, 0x86, 0x77, 0xb7, 0xee,
- 0xaa, 0xe1, 0xa6, 0x27, 0xf7, 0xe0, 0xb0, 0x22, 0xd7, 0x37, 0x2c, 0xf8, 0x8e, 0xa0, 0x77, 0xfb,
- 0x7f, 0xe3, 0x09, 0x00, 0xcd, 0x0b, 0xc6, 0x55, 0x2e, 0xb8, 0xf2, 0x90, 0xcd, 0xeb, 0xc1, 0xbe,
- 0xbc, 0x5e, 0xfd, 0xd9, 0x4a, 0x7a, 0x9b, 0xd5, 0x70, 0x47, 0x94, 0xee, 0xbc, 0xf1, 0x3b, 0x80,
- 0x26, 0xb5, 0x9c, 0x29, 0xaf, 0x65, 0xed, 0x86, 0x77, 0xc4, 0x5f, 0x1b, 0x6e, 0x65, 0xe9, 0xce,
- 0x3b, 0x79, 0xfa, 0x63, 0x3d, 0x40, 0x3f, 0xd7, 0x03, 0xf4, 0x6b, 0x3d, 0x40, 0x17, 0x0f, 0xb3,
- 0x5c, 0x7f, 0xbe, 0xb9, 0x8c, 0x16, 0xa2, 0x88, 0xad, 0x63, 0x6c, 0x1d, 0x63, 0x45, 0xaf, 0xe2,
- 0x6a, 0x14, 0xdb, 0x2f, 0xf2, 0xb9, 0xad, 0x97, 0x47, 0xb6, 0x3d, 0xfe, 0x1d, 0x00, 0x00, 0xff,
- 0xff, 0xc5, 0xd7, 0xbe, 0xea, 0xea, 0x02, 0x00, 0x00,
-}
-
-func (m *EnvReport) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *EnvReport) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvReport) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if len(m.PropertySets) > 0 {
- for iNdEx := len(m.PropertySets) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.PropertySets[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintDpenv(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
- }
- if m.Type != 0 {
- i = encodeVarintDpenv(dAtA, i, uint64(m.Type))
- i--
- dAtA[i] = 0x10
- }
- if m.Meta != nil {
- {
- size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintDpenv(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *EnvProperty) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *EnvProperty) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvProperty) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if m.Value != nil {
- {
- size := m.Value.Size()
- i -= size
- if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
- return 0, err
- }
- }
- }
- if len(m.Name) > 0 {
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintDpenv(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *EnvProperty_Ival) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvProperty_Ival) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- i = encodeVarintDpenv(dAtA, i, uint64(m.Ival))
- i--
- dAtA[i] = 0x50
- return len(dAtA) - i, nil
-}
-func (m *EnvProperty_Dval) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvProperty_Dval) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- i -= 8
- encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Dval))))
- i--
- dAtA[i] = 0x59
- return len(dAtA) - i, nil
-}
-func (m *EnvProperty_Sval) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvProperty_Sval) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- i -= len(m.Sval)
- copy(dAtA[i:], m.Sval)
- i = encodeVarintDpenv(dAtA, i, uint64(len(m.Sval)))
- i--
- dAtA[i] = 0x62
- return len(dAtA) - i, nil
-}
-func (m *EnvPropertySet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *EnvPropertySet) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvPropertySet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if len(m.Properties) > 0 {
- for iNdEx := len(m.Properties) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Properties[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintDpenv(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- if len(m.Dimensions) > 0 {
- for iNdEx := len(m.Dimensions) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Dimensions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintDpenv(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func encodeVarintDpenv(dAtA []byte, offset int, v uint64) int {
- offset -= sovDpenv(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return base
-}
-func (m *EnvReport) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.Meta != nil {
- l = m.Meta.Size()
- n += 1 + l + sovDpenv(uint64(l))
- }
- if m.Type != 0 {
- n += 1 + sovDpenv(uint64(m.Type))
- }
- if len(m.PropertySets) > 0 {
- for _, e := range m.PropertySets {
- l = e.Size()
- n += 1 + l + sovDpenv(uint64(l))
- }
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
-}
-
-func (m *EnvProperty) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- if l > 0 {
- n += 1 + l + sovDpenv(uint64(l))
- }
- if m.Value != nil {
- n += m.Value.Size()
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
-}
-
-func (m *EnvProperty_Ival) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- n += 1 + sovDpenv(uint64(m.Ival))
- return n
-}
-func (m *EnvProperty_Dval) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- n += 9
- return n
-}
-func (m *EnvProperty_Sval) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Sval)
- n += 1 + l + sovDpenv(uint64(l))
- return n
-}
-func (m *EnvPropertySet) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Dimensions) > 0 {
- for _, e := range m.Dimensions {
- l = e.Size()
- n += 1 + l + sovDpenv(uint64(l))
- }
- }
- if len(m.Properties) > 0 {
- for _, e := range m.Properties {
- l = e.Size()
- n += 1 + l + sovDpenv(uint64(l))
- }
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
-}
-
-func sovDpenv(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
-}
-func sozDpenv(x uint64) (n int) {
- return sovDpenv(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (m *EnvReport) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: EnvReport: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: EnvReport: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Meta == nil {
- m.Meta = &Metadata{}
- }
- if err := m.Meta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- m.Type = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Type |= EnvReport_Type(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PropertySets", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PropertySets = append(m.PropertySets, &EnvPropertySet{})
- if err := m.PropertySets[len(m.PropertySets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipDpenv(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthDpenv
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *EnvProperty) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: EnvProperty: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: EnvProperty: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 10:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ival", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Value = &EnvProperty_Ival{v}
- case 11:
- if wireType != 1 {
- return fmt.Errorf("proto: wrong wireType = %d for field Dval", wireType)
- }
- var v uint64
- if (iNdEx + 8) > l {
- return io.ErrUnexpectedEOF
- }
- v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
- iNdEx += 8
- m.Value = &EnvProperty_Dval{float64(math.Float64frombits(v))}
- case 12:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Sval", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Value = &EnvProperty_Sval{string(dAtA[iNdEx:postIndex])}
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipDpenv(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthDpenv
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *EnvPropertySet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: EnvPropertySet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: EnvPropertySet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Dimensions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Dimensions = append(m.Dimensions, &Dimension{})
- if err := m.Dimensions[len(m.Dimensions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Properties", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Properties = append(m.Properties, &EnvProperty{})
- if err := m.Properties[len(m.Properties)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipDpenv(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthDpenv
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipDpenv(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- depth := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- case 1:
- iNdEx += 8
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if length < 0 {
- return 0, ErrInvalidLengthDpenv
- }
- iNdEx += length
- case 3:
- depth++
- case 4:
- if depth == 0 {
- return 0, ErrUnexpectedEndOfGroupDpenv
- }
- depth--
- case 5:
- iNdEx += 4
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- if iNdEx < 0 {
- return 0, ErrInvalidLengthDpenv
- }
- if depth == 0 {
- return iNdEx, nil
- }
- }
- return 0, io.ErrUnexpectedEOF
-}
-
-var (
- ErrInvalidLengthDpenv = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowDpenv = fmt.Errorf("proto: integer overflow")
- ErrUnexpectedEndOfGroupDpenv = fmt.Errorf("proto: unexpected end of group")
-)
diff --git a/sdk/proto/dpenv.proto b/sdk/proto/dpenv.proto
deleted file mode 100644
index 409df2818..000000000
--- a/sdk/proto/dpenv.proto
+++ /dev/null
@@ -1,36 +0,0 @@
-syntax = "proto3";
-package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-
-import "gogo.proto";
-import "common.proto";
-import "metrics.proto";
-
-// MetasReport a report containing status entities for a specific metric type
-message EnvReport {
- enum Type {
- SYSTEM = 0;
- INSTANCE = 1;
- AGENT = 2;
- }
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- Type type = 2 [(gogoproto.jsontag) = "type" ];
- repeated EnvPropertySet property_sets = 3 [(gogoproto.jsontag) = "property_sets" ];
-}
-
-
-// EnvPropety - a container for a Dataplane Environment property.
-message EnvProperty {
- string name = 1 [(gogoproto.jsontag) = "name" ];
-
- oneof value {
- int64 ival = 10 [(gogoproto.jsontag) = "ival" ]; // for example cpu count.
- double dval = 11 [(gogoproto.jsontag) = "dval" ]; // for example cpu utilization
- string sval = 12 [(gogoproto.jsontag) = "sval" ]; // for example os name, release name
- }
-}
-
-message EnvPropertySet {
- repeated Dimension dimensions = 1 [(gogoproto.jsontag) = "dimensions" ];
- repeated EnvProperty properties = 2 [(gogoproto.jsontag) = "properties" ];
-}
diff --git a/sdk/proto/events/event.pb.go b/sdk/proto/events/event.pb.go
index 903408281..e054b5c00 100644
--- a/sdk/proto/events/event.pb.go
+++ b/sdk/proto/events/event.pb.go
@@ -25,17 +25,25 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Represents the metadata for an event
type Metadata struct {
- Module string `protobuf:"bytes,1,opt,name=Module,proto3" json:"module"`
- UUID string `protobuf:"bytes,2,opt,name=UUID,proto3" json:"uuid"`
- CorrelationID string `protobuf:"bytes,3,opt,name=CorrelationID,proto3" json:"correlation_id"`
- Timestamp *types.Timestamp `protobuf:"bytes,4,opt,name=Timestamp,proto3" json:"timestamp"`
- EventLevel string `protobuf:"bytes,5,opt,name=EventLevel,proto3" json:"event_level"`
- Type string `protobuf:"bytes,6,opt,name=Type,proto3" json:"type"`
- Category string `protobuf:"bytes,7,opt,name=Category,proto3" json:"category"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Module is the process that generate the event
+ Module string `protobuf:"bytes,1,opt,name=Module,proto3" json:"module"`
+ // UUID is a unique identifier for each event
+ UUID string `protobuf:"bytes,2,opt,name=UUID,proto3" json:"uuid"`
+ // CorrelationID is an ID used by the producer of the message to track the flow of events
+ CorrelationID string `protobuf:"bytes,3,opt,name=CorrelationID,proto3" json:"correlation_id"`
+ // Timestamp defines the time of event generation
+ Timestamp *types.Timestamp `protobuf:"bytes,4,opt,name=Timestamp,proto3" json:"timestamp"`
+ // EventLevel defines the criticality of event
+ EventLevel string `protobuf:"bytes,5,opt,name=EventLevel,proto3" json:"event_level"`
+ // Type is used to identify the event type for further processing
+ Type string `protobuf:"bytes,6,opt,name=Type,proto3" json:"type"`
+ // Category is used for classifying the event type into a higher level entity
+ Category string `protobuf:"bytes,7,opt,name=Category,proto3" json:"category"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Metadata) Reset() { *m = Metadata{} }
@@ -120,7 +128,9 @@ func (m *Metadata) GetCategory() string {
return ""
}
+// Represents an event
type Event struct {
+ // Event metadata
Metadata *Metadata `protobuf:"bytes,1,opt,name=Metadata,proto3" json:"metadata"`
// Types that are valid to be assigned to Data:
//
@@ -217,7 +227,9 @@ func (*Event) XXX_OneofWrappers() []interface{} {
}
}
+// Represents an event report
type EventReport struct {
+ // Array of events
Events []*Event `protobuf:"bytes,1,rep,name=Events,proto3" json:"events"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -264,8 +276,11 @@ func (m *EventReport) GetEvents() []*Event {
return nil
}
+// Represents an activity event
type ActivityEvent struct {
- Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"message"`
+ // Activtiy event message
+ Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"message"`
+ // Array of dimensions
Dimensions []*common.Dimension `protobuf:"bytes,2,rep,name=Dimensions,proto3" json:"dimensions"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -319,7 +334,7 @@ func (m *ActivityEvent) GetDimensions() []*common.Dimension {
return nil
}
-// SecurityViolationEvent represents a Security Violation that is emitted by the Agent
+// Represents a security violation that is emitted by the agent
type SecurityViolationEvent struct {
PolicyName string `protobuf:"bytes,1,opt,name=PolicyName,proto3" json:"policy_name"`
SupportID string `protobuf:"bytes,2,opt,name=SupportID,proto3" json:"support_id"`
@@ -898,7 +913,7 @@ func init() {
func init() { proto.RegisterFile("event.proto", fileDescriptor_2d17a9d3f0ddf27e) }
var fileDescriptor_2d17a9d3f0ddf27e = []byte{
- // 1646 bytes of a gzipped FileDescriptorProto
+ // 1647 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0xdd, 0x6e, 0xdc, 0xc6,
0x15, 0xee, 0xca, 0xb2, 0x7e, 0x66, 0x25, 0xd9, 0x1e, 0x39, 0xf6, 0x48, 0x71, 0x44, 0x75, 0x9d,
0xb8, 0x2a, 0x52, 0xec, 0xa2, 0x4a, 0x02, 0x14, 0x08, 0x10, 0xc0, 0xab, 0x75, 0x92, 0x45, 0x23,
@@ -906,102 +921,102 @@ var fileDescriptor_2d17a9d3f0ddf27e = []byte{
0x6b, 0x3d, 0x42, 0x81, 0x3e, 0x57, 0x91, 0xcb, 0xdc, 0x17, 0x20, 0x0a, 0x5f, 0xf2, 0x05, 0x7a,
0x5b, 0xcc, 0x99, 0x21, 0x87, 0xd4, 0x5f, 0xae, 0x6c, 0x9e, 0xef, 0xfb, 0xce, 0x99, 0x39, 0x3f,
0xb3, 0x47, 0xa8, 0xcb, 0x17, 0x3c, 0x51, 0xfd, 0x34, 0x13, 0x4a, 0xe0, 0x9d, 0xe9, 0x57, 0xfd,
- 0x24, 0x8a, 0x93, 0xf7, 0x7d, 0x16, 0x69, 0xab, 0x0c, 0x2f, 0xfb, 0x80, 0xcb, 0x5d, 0x14, 0x89,
- 0x48, 0x18, 0xda, 0xae, 0x17, 0x09, 0x11, 0xcd, 0xf8, 0x00, 0xbe, 0xce, 0xf3, 0xe9, 0x40, 0xc5,
- 0x73, 0x2e, 0x15, 0x9b, 0xa7, 0x96, 0xb0, 0x1d, 0x88, 0xf9, 0x5c, 0x24, 0x03, 0xf3, 0x8f, 0x31,
- 0xf6, 0x7e, 0x5e, 0x42, 0x6b, 0xc7, 0x5c, 0xb1, 0x90, 0x29, 0x86, 0x7b, 0x68, 0xe5, 0x58, 0x84,
- 0xf9, 0x8c, 0x93, 0xce, 0x7e, 0xe7, 0x60, 0x7d, 0x88, 0xca, 0xc2, 0x5b, 0x99, 0x83, 0x85, 0x5a,
- 0x04, 0xbf, 0x40, 0xcb, 0xef, 0xde, 0x8d, 0x47, 0x64, 0x09, 0x18, 0x6b, 0x65, 0xe1, 0x2d, 0xe7,
- 0x79, 0x1c, 0x52, 0xb0, 0xe2, 0x3f, 0xa1, 0xcd, 0x23, 0x91, 0x65, 0x7c, 0xc6, 0x54, 0x2c, 0x92,
- 0xf1, 0x88, 0x3c, 0x00, 0x1a, 0x2e, 0x0b, 0x6f, 0x2b, 0x70, 0x80, 0x1f, 0x87, 0xb4, 0x4d, 0xc4,
- 0xdf, 0xa1, 0xf5, 0xd3, 0xea, 0xc0, 0x64, 0x79, 0xbf, 0x73, 0xd0, 0x3d, 0xdc, 0xed, 0x9b, 0x2b,
- 0xf5, 0xab, 0x2b, 0xf5, 0x6b, 0xc6, 0x70, 0xb3, 0x2c, 0xbc, 0xf5, 0xfa, 0x86, 0xd4, 0x69, 0xf1,
- 0x00, 0xa1, 0x37, 0x3a, 0x3b, 0x3f, 0xf0, 0x05, 0x9f, 0x91, 0x87, 0x10, 0xff, 0x51, 0x59, 0x78,
- 0x26, 0xa7, 0xfe, 0x4c, 0x9b, 0x69, 0x83, 0xa2, 0x6f, 0x74, 0x7a, 0x95, 0x72, 0xb2, 0xe2, 0x6e,
- 0xa4, 0xae, 0x52, 0x4e, 0xc1, 0x8a, 0x0f, 0xd0, 0xda, 0x11, 0x53, 0x3c, 0x12, 0xd9, 0x15, 0x59,
- 0x05, 0xc6, 0x46, 0x59, 0x78, 0x6b, 0x81, 0xb5, 0xd1, 0x1a, 0xed, 0xfd, 0xb2, 0x84, 0x1e, 0x82,
- 0x5b, 0x7c, 0xec, 0x72, 0x0a, 0x99, 0xec, 0x1e, 0xbe, 0xec, 0xdf, 0x59, 0xc4, 0x7e, 0x45, 0x35,
- 0x8e, 0xe7, 0xf6, 0x8b, 0xba, 0xb2, 0x84, 0x68, 0xf3, 0x75, 0xa0, 0xe2, 0x45, 0xac, 0xae, 0xc0,
- 0x3f, 0xe4, 0xbe, 0x7b, 0x78, 0x70, 0x8f, 0xcf, 0x16, 0xdf, 0xa4, 0x9f, 0x59, 0x93, 0x0f, 0x94,
- 0xef, 0x7f, 0x43, 0xdb, 0x4e, 0xf1, 0x3f, 0x3b, 0xe8, 0xd9, 0x84, 0x07, 0x79, 0x16, 0xab, 0xab,
- 0xb3, 0x58, 0x98, 0xc2, 0x98, 0x78, 0x0f, 0x20, 0xde, 0x1f, 0xef, 0x89, 0x77, 0xbb, 0x70, 0xf8,
- 0xa2, 0x2c, 0x3c, 0x22, 0x2d, 0xe6, 0x2f, 0x2a, 0xb0, 0x3e, 0xc2, 0x1d, 0x01, 0x87, 0x2b, 0x68,
- 0x59, 0xdf, 0xbc, 0x37, 0x41, 0x5d, 0x30, 0x50, 0x9e, 0x8a, 0x4c, 0xe1, 0x11, 0x5a, 0x81, 0x4f,
- 0x49, 0x3a, 0xfb, 0x0f, 0x0e, 0xba, 0x87, 0xfb, 0xf7, 0x9c, 0xc8, 0x38, 0x82, 0x0e, 0x36, 0x16,
- 0x6a, 0xb5, 0xbd, 0x7f, 0x75, 0xae, 0xe5, 0x13, 0x7f, 0x86, 0x56, 0x8f, 0xb9, 0x94, 0x2c, 0xaa,
- 0x1a, 0xbf, 0x5b, 0x16, 0xde, 0xea, 0xdc, 0x98, 0x68, 0x85, 0xe1, 0x53, 0x84, 0x46, 0xf1, 0x9c,
- 0x27, 0x32, 0x16, 0x89, 0x24, 0x4b, 0x70, 0x84, 0x4f, 0x6f, 0x3b, 0x82, 0x9d, 0xb0, 0x9a, 0x3c,
- 0xdc, 0x2a, 0x0b, 0x0f, 0x85, 0xb5, 0x96, 0x36, 0xfc, 0xf4, 0xfe, 0xf3, 0xe4, 0xae, 0xbc, 0xeb,
- 0x56, 0x3e, 0x11, 0xb3, 0x38, 0xb8, 0x7a, 0xcb, 0xe6, 0xd5, 0xd1, 0xa0, 0x95, 0x53, 0xb0, 0xfa,
- 0x09, 0x9b, 0x73, 0xda, 0xa0, 0xe0, 0x3f, 0xa0, 0xf5, 0x49, 0x9e, 0xea, 0x5c, 0xd5, 0x13, 0x0a,
- 0xa1, 0xa5, 0x31, 0xea, 0xb1, 0x73, 0x04, 0x7d, 0xed, 0x1f, 0x73, 0x15, 0x88, 0x39, 0xb7, 0x63,
- 0x0a, 0xd7, 0x16, 0xc6, 0x44, 0x2b, 0x4c, 0xcf, 0xb4, 0xfd, 0x2f, 0xe5, 0x4c, 0x8a, 0x04, 0xa6,
- 0xd3, 0xce, 0xb4, 0x25, 0xfb, 0x19, 0x20, 0xb4, 0x4d, 0xc4, 0x7f, 0x41, 0xcf, 0x87, 0x33, 0x11,
- 0x5c, 0xc6, 0x49, 0xf4, 0xe6, 0x7d, 0xc0, 0x53, 0x7d, 0x33, 0xeb, 0xc3, 0xcc, 0xe5, 0x27, 0x65,
- 0xe1, 0xed, 0x9c, 0x5b, 0x8a, 0xcf, 0x2b, 0x4e, 0xe5, 0xee, 0x2e, 0x35, 0x3c, 0x54, 0x5c, 0x5d,
- 0x88, 0xd0, 0x0e, 0xad, 0x79, 0xa8, 0xc0, 0x42, 0x2d, 0xa2, 0x07, 0xf7, 0x44, 0xbf, 0x1b, 0x81,
- 0x98, 0x35, 0x07, 0x37, 0xb5, 0x36, 0x5a, 0xa3, 0xf8, 0x04, 0x91, 0xbf, 0x7e, 0x2b, 0xb2, 0x7f,
- 0xb0, 0x2c, 0xe4, 0xe1, 0xb7, 0x22, 0xfb, 0x9e, 0xb3, 0x90, 0x67, 0x67, 0x6c, 0x96, 0x73, 0xb2,
- 0x06, 0xca, 0xa7, 0x65, 0xe1, 0x3d, 0x7e, 0x3f, 0x9d, 0xfa, 0x17, 0x00, 0xf9, 0x0b, 0x8d, 0xd1,
- 0x3b, 0x55, 0x78, 0x07, 0x3d, 0x78, 0x47, 0xc7, 0x64, 0x1d, 0xc4, 0xab, 0x65, 0xe1, 0x3d, 0xc8,
- 0xb3, 0x98, 0x6a, 0x9b, 0x4e, 0x3a, 0xe5, 0x7f, 0xcf, 0xb9, 0x54, 0x04, 0xb9, 0xa4, 0x67, 0xc6,
- 0x44, 0x2b, 0x0c, 0x1f, 0xa2, 0xee, 0x58, 0x9e, 0x66, 0x79, 0xa2, 0x1f, 0x9a, 0x90, 0x74, 0x81,
- 0xfa, 0xb8, 0x2c, 0xbc, 0x8d, 0x58, 0xfa, 0xaa, 0xb2, 0xd3, 0x26, 0x49, 0x17, 0xca, 0xca, 0x27,
- 0x8a, 0xa9, 0x5c, 0x92, 0x0d, 0x57, 0x28, 0x1b, 0xc0, 0x97, 0x80, 0xd0, 0x36, 0x11, 0x7f, 0x85,
- 0x36, 0x28, 0x97, 0xa9, 0x48, 0x24, 0x3f, 0x12, 0x21, 0x27, 0x9b, 0x20, 0x7c, 0x52, 0x16, 0xde,
- 0x66, 0x66, 0xed, 0x7e, 0x20, 0x42, 0x4e, 0x5b, 0x34, 0xdd, 0x9f, 0x13, 0x9e, 0x2d, 0x78, 0xf6,
- 0x3a, 0x0c, 0x33, 0xb2, 0xe5, 0xfa, 0x53, 0x82, 0xd5, 0x67, 0x61, 0x98, 0xd1, 0x06, 0x05, 0xbf,
- 0x44, 0x2b, 0x67, 0x13, 0x68, 0xe6, 0x47, 0xee, 0xee, 0x0b, 0x69, 0x1a, 0xd9, 0x42, 0xda, 0x2b,
- 0xe5, 0x73, 0xa1, 0x38, 0x78, 0x7d, 0xec, 0xbc, 0x66, 0x60, 0xb5, 0x5e, 0x1d, 0x05, 0x7f, 0x59,
- 0x09, 0x4e, 0x44, 0xa6, 0xc8, 0x13, 0x57, 0xb1, 0x90, 0x4b, 0x15, 0x27, 0xe6, 0xc9, 0xd1, 0x3d,
- 0x4f, 0x1b, 0x3c, 0x77, 0x78, 0x50, 0xe1, 0x1b, 0x87, 0x37, 0x02, 0x47, 0xc1, 0x7d, 0x84, 0xea,
- 0xf9, 0x94, 0x64, 0xdb, 0x4d, 0x57, 0xfd, 0xae, 0x49, 0xda, 0x60, 0xe8, 0x72, 0x4c, 0xf2, 0xf3,
- 0x86, 0xe4, 0xa9, 0x2b, 0x87, 0xcc, 0xcf, 0xfd, 0x86, 0xac, 0x4d, 0xc4, 0xdf, 0xa0, 0x47, 0xf5,
- 0x17, 0x65, 0x2a, 0x4e, 0x22, 0xf2, 0x91, 0xbb, 0x95, 0x7b, 0x46, 0x33, 0xc0, 0xe8, 0x75, 0x32,
- 0xfe, 0x02, 0x75, 0x27, 0x71, 0x34, 0xe1, 0x4a, 0xe7, 0x53, 0x92, 0x67, 0xae, 0x9a, 0x32, 0x8e,
- 0x7c, 0xc9, 0x15, 0x24, 0x5c, 0xd2, 0x26, 0x0b, 0xbf, 0x42, 0xab, 0x93, 0x38, 0x3a, 0x3a, 0x7b,
- 0x23, 0xc9, 0x73, 0x37, 0x2e, 0x5a, 0x10, 0x2c, 0xb8, 0xa4, 0x15, 0xa8, 0x3b, 0xf3, 0x68, 0x16,
- 0xf3, 0x44, 0x1d, 0xcd, 0x98, 0x94, 0x84, 0xb8, 0xce, 0x0c, 0xc0, 0xec, 0x07, 0xda, 0x4e, 0x9b,
- 0x24, 0x3c, 0x42, 0x4f, 0xcc, 0xe7, 0xeb, 0x34, 0x9d, 0xc5, 0x01, 0x9c, 0x95, 0xec, 0x80, 0xf2,
- 0x59, 0x59, 0x78, 0xd8, 0x2a, 0x99, 0x43, 0xe9, 0x4d, 0x01, 0xfe, 0x09, 0x91, 0x1b, 0xc6, 0x33,
- 0x9e, 0xe9, 0x67, 0x94, 0xec, 0x82, 0xb3, 0xbd, 0xb2, 0xf0, 0x76, 0x6f, 0x3a, 0xf3, 0x17, 0x86,
- 0x45, 0xef, 0xd4, 0xeb, 0xd7, 0x62, 0xc2, 0x17, 0x5c, 0x3f, 0xc2, 0xe4, 0xe3, 0xc6, 0xf5, 0xad,
- 0x8d, 0xd6, 0x28, 0xfe, 0x33, 0xda, 0x3e, 0xbd, 0xc8, 0x38, 0x53, 0x47, 0x6c, 0x9e, 0xb2, 0x38,
- 0x4a, 0x4c, 0x92, 0x5f, 0x80, 0x68, 0xa7, 0x2c, 0xbc, 0x8f, 0x14, 0xc0, 0x7e, 0x60, 0x71, 0x9b,
- 0xec, 0xdb, 0x54, 0x7a, 0xf0, 0x86, 0x42, 0xbd, 0x4e, 0xc4, 0x9c, 0xcd, 0x62, 0x2e, 0xc9, 0x27,
- 0xae, 0x54, 0xe7, 0x42, 0xf9, 0xac, 0x02, 0x68, 0x8b, 0xa6, 0x6b, 0x30, 0x14, 0xaa, 0xde, 0x4b,
- 0xf6, 0x5c, 0x0d, 0xb4, 0xaa, 0xde, 0x4d, 0x9a, 0x24, 0xfc, 0x16, 0x3d, 0x7d, 0x93, 0x4c, 0x45,
- 0x16, 0xf0, 0xb0, 0x15, 0xd2, 0x03, 0xf1, 0x6e, 0x59, 0x78, 0xcf, 0xb8, 0xc5, 0xfd, 0x76, 0xec,
- 0x5b, 0x75, 0x78, 0x88, 0x1e, 0x0f, 0x85, 0x9a, 0xc4, 0x51, 0xc2, 0x54, 0x9e, 0x71, 0x98, 0xea,
- 0x7d, 0x57, 0x52, 0xed, 0x42, 0x56, 0xa0, 0x19, 0xf0, 0x1b, 0x7c, 0xdd, 0x17, 0x75, 0xef, 0x1e,
- 0x89, 0x44, 0xf1, 0xf7, 0x4a, 0x92, 0xdf, 0x3a, 0x27, 0xae, 0xd5, 0x03, 0x8b, 0xd2, 0x9b, 0x02,
- 0xcc, 0xd1, 0x96, 0x1b, 0x9e, 0x91, 0x5e, 0xba, 0x7a, 0xf0, 0xdb, 0x7c, 0xdf, 0x82, 0x54, 0x0b,
- 0x34, 0x7f, 0xb8, 0x5d, 0x16, 0xde, 0x23, 0x37, 0x8f, 0x3e, 0x2c, 0x60, 0xd7, 0x9c, 0xe2, 0xdf,
- 0xa3, 0xb5, 0xc9, 0x95, 0x54, 0x7c, 0x3e, 0x1e, 0x91, 0x97, 0x70, 0x46, 0x58, 0x42, 0x25, 0xd8,
- 0xf4, 0x4f, 0x6b, 0x0d, 0xeb, 0xb2, 0x8e, 0x13, 0xa9, 0x58, 0x12, 0xf0, 0x53, 0x16, 0x49, 0xf2,
- 0xa9, 0x2b, 0x6b, 0x6c, 0xed, 0xbe, 0x62, 0x91, 0xa4, 0x2d, 0x9a, 0x7e, 0x31, 0xaa, 0xef, 0xef,
- 0x32, 0x91, 0xa7, 0xe4, 0x33, 0xf7, 0x62, 0xd4, 0xba, 0x48, 0x23, 0xb4, 0x4d, 0xd4, 0x0d, 0x31,
- 0x8a, 0x65, 0x3a, 0x63, 0x66, 0x55, 0x78, 0xe5, 0x1a, 0x22, 0x34, 0x66, 0x53, 0x81, 0x26, 0x49,
- 0x0f, 0xfc, 0x5b, 0x9d, 0x9c, 0xf1, 0x88, 0xfc, 0xce, 0x75, 0x3c, 0xe4, 0x4b, 0xdf, 0xa6, 0x02,
- 0xf1, 0xd7, 0x68, 0xeb, 0x84, 0x65, 0x7a, 0x61, 0x13, 0x52, 0x69, 0x37, 0xe4, 0x00, 0xe8, 0x90,
- 0xb4, 0x14, 0x10, 0xff, 0xc2, 0x42, 0xf4, 0x1a, 0xb5, 0xf7, 0xbf, 0x0e, 0xda, 0xac, 0x6b, 0x0e,
- 0x69, 0xf4, 0xd0, 0xd2, 0x78, 0xd4, 0x5c, 0x66, 0xf4, 0x13, 0xa3, 0x13, 0xae, 0x83, 0x2e, 0x8d,
- 0x47, 0xf8, 0x1b, 0xb4, 0x51, 0xfd, 0xee, 0x1f, 0x33, 0x79, 0x69, 0xf7, 0x18, 0x68, 0xd0, 0x9a,
- 0x5a, 0xef, 0x0c, 0x73, 0x26, 0x2f, 0x69, 0x8b, 0x8f, 0x3f, 0x47, 0x2b, 0xc3, 0x7c, 0x3a, 0xe5,
- 0x99, 0xdd, 0x6a, 0xe0, 0x9c, 0x4e, 0x09, 0x10, 0xb5, 0x14, 0x4d, 0xfe, 0x71, 0x3a, 0x95, 0x5c,
- 0xd9, 0xad, 0xa6, 0x4d, 0x16, 0x00, 0x51, 0x4b, 0xd1, 0xe4, 0x1f, 0x78, 0x12, 0xa9, 0x0b, 0xbb,
- 0xbe, 0xb4, 0xc9, 0x33, 0x80, 0xa8, 0xa5, 0xf4, 0xfe, 0x86, 0xba, 0xb6, 0x43, 0xe1, 0xda, 0x9f,
- 0xa3, 0xe5, 0xc6, 0x16, 0xf7, 0xbc, 0x2c, 0xbc, 0xed, 0x94, 0x65, 0x6c, 0xce, 0x15, 0xcf, 0x8c,
- 0x1e, 0xf2, 0x07, 0x24, 0xdc, 0x47, 0x0f, 0xcd, 0xfa, 0x61, 0xee, 0x4e, 0xca, 0xc2, 0x7b, 0x7a,
- 0x8d, 0x6d, 0x56, 0x10, 0x43, 0xeb, 0xfd, 0x7b, 0x09, 0x6d, 0xb6, 0x3a, 0xfa, 0xb6, 0x70, 0x6e,
- 0x98, 0xae, 0x87, 0xfb, 0x12, 0xad, 0xda, 0xa3, 0x36, 0x93, 0x7d, 0x8d, 0x6f, 0x27, 0x90, 0x56,
- 0x54, 0x1c, 0xb7, 0x2e, 0x68, 0xff, 0x48, 0x78, 0x75, 0xcf, 0xcc, 0x35, 0xd8, 0x43, 0xaf, 0x2c,
- 0xbc, 0x8f, 0x6f, 0x8f, 0x60, 0xa6, 0xaf, 0x95, 0xbc, 0x08, 0xa1, 0xba, 0x89, 0x24, 0x59, 0xfe,
- 0xd5, 0xe9, 0x6e, 0x75, 0x9c, 0xd9, 0x32, 0xaf, 0xc5, 0xaa, 0x9f, 0x26, 0x49, 0x1b, 0xae, 0x87,
- 0xf4, 0xe7, 0x0f, 0x7b, 0x9d, 0x5f, 0x3e, 0xec, 0x75, 0xfe, 0xfb, 0x61, 0xaf, 0xf3, 0xd3, 0x28,
- 0x8a, 0xd5, 0x45, 0x7e, 0xae, 0xf7, 0xf9, 0x01, 0x44, 0x1a, 0x40, 0xa4, 0x81, 0x0c, 0x2f, 0x07,
- 0x8b, 0x43, 0xf3, 0x97, 0xf6, 0xc0, 0x84, 0xfc, 0xfa, 0xce, 0xc3, 0x9c, 0xaf, 0x00, 0xef, 0x8b,
- 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x89, 0xc8, 0x71, 0xe0, 0xd5, 0x0f, 0x00, 0x00,
+ 0x24, 0x8a, 0x93, 0xf7, 0x7d, 0x16, 0x69, 0xab, 0x0c, 0x2f, 0xfb, 0x80, 0xcb, 0xdd, 0xed, 0x40,
+ 0xcc, 0xe7, 0x22, 0x19, 0x98, 0x7f, 0x0c, 0x7f, 0x17, 0x45, 0x22, 0x12, 0xf6, 0xff, 0x5e, 0x24,
+ 0x44, 0x34, 0xe3, 0x03, 0xf8, 0x3a, 0xcf, 0xa7, 0x03, 0x15, 0xcf, 0xb9, 0x54, 0x6c, 0x9e, 0x1a,
+ 0x42, 0xef, 0xe7, 0x25, 0xb4, 0x76, 0xcc, 0x15, 0x0b, 0x99, 0x62, 0xb8, 0x87, 0x56, 0x8e, 0x45,
+ 0x98, 0xcf, 0x38, 0xe9, 0xec, 0x77, 0x0e, 0xd6, 0x87, 0xa8, 0x2c, 0xbc, 0x95, 0x39, 0x58, 0xa8,
+ 0x45, 0xf0, 0x0b, 0xb4, 0xfc, 0xee, 0xdd, 0x78, 0x44, 0x96, 0x80, 0xb1, 0x56, 0x16, 0xde, 0x72,
+ 0x9e, 0xc7, 0x21, 0x05, 0x2b, 0xfe, 0x13, 0xda, 0x3c, 0x12, 0x59, 0xc6, 0x67, 0x4c, 0xc5, 0x22,
+ 0x19, 0x8f, 0xc8, 0x03, 0xa0, 0xe1, 0xb2, 0xf0, 0xb6, 0x02, 0x07, 0xf8, 0x71, 0x48, 0xdb, 0x44,
+ 0xfc, 0x1d, 0x5a, 0x3f, 0xad, 0xce, 0x46, 0x96, 0xf7, 0x3b, 0x07, 0xdd, 0xc3, 0xdd, 0xbe, 0x39,
+ 0x7d, 0xbf, 0x3a, 0x7d, 0xbf, 0x66, 0x0c, 0x37, 0xcb, 0xc2, 0x5b, 0xaf, 0x2f, 0x43, 0x9d, 0x16,
+ 0x0f, 0x10, 0x7a, 0xa3, 0xb3, 0xf3, 0x03, 0x5f, 0xf0, 0x19, 0x79, 0x08, 0xf1, 0x1f, 0x95, 0x85,
+ 0x67, 0x72, 0xea, 0xcf, 0xb4, 0x99, 0x36, 0x28, 0xfa, 0x46, 0xa7, 0x57, 0x29, 0x27, 0x2b, 0xee,
+ 0x46, 0xea, 0x2a, 0xe5, 0x14, 0xac, 0xf8, 0x00, 0xad, 0x1d, 0x31, 0xc5, 0x23, 0x91, 0x5d, 0x91,
+ 0x55, 0x60, 0x6c, 0x94, 0x85, 0xb7, 0x16, 0x58, 0x1b, 0xad, 0xd1, 0xde, 0x2f, 0x4b, 0xe8, 0x21,
+ 0xb8, 0xc5, 0xc7, 0x2e, 0xa7, 0x90, 0xc9, 0xee, 0xe1, 0xcb, 0xfe, 0x9d, 0x45, 0xec, 0x57, 0x54,
+ 0xe3, 0x78, 0x6e, 0xbf, 0xa8, 0x2b, 0x4b, 0x88, 0x36, 0x5f, 0x07, 0x2a, 0x5e, 0xc4, 0xea, 0x0a,
+ 0xfc, 0x43, 0xee, 0xbb, 0x87, 0x07, 0xf7, 0xf8, 0x6c, 0xf1, 0x4d, 0xfa, 0x99, 0x35, 0xf9, 0x40,
+ 0xf9, 0xfe, 0x37, 0xb4, 0xed, 0x14, 0xff, 0xb3, 0x83, 0x9e, 0x4d, 0x78, 0x90, 0x67, 0xb1, 0xba,
+ 0x3a, 0x8b, 0x85, 0x29, 0x8c, 0x89, 0xf7, 0x00, 0xe2, 0xfd, 0xf1, 0x9e, 0x78, 0xb7, 0x0b, 0x87,
+ 0x2f, 0xca, 0xc2, 0x23, 0xd2, 0x62, 0xfe, 0xa2, 0x02, 0xeb, 0x23, 0xdc, 0x11, 0x70, 0xb8, 0x82,
+ 0x96, 0xf5, 0xcd, 0x7b, 0x13, 0xd4, 0x05, 0x03, 0xe5, 0xa9, 0xc8, 0x14, 0x1e, 0xa1, 0x15, 0xf8,
+ 0x94, 0xa4, 0xb3, 0xff, 0xe0, 0xa0, 0x7b, 0xb8, 0x7f, 0xcf, 0x89, 0x8c, 0x23, 0xe8, 0x60, 0x63,
+ 0xa1, 0x56, 0xdb, 0xfb, 0x57, 0xe7, 0x5a, 0x3e, 0xf1, 0x67, 0x68, 0xf5, 0x98, 0x4b, 0xc9, 0xa2,
+ 0xaa, 0xf1, 0xbb, 0x65, 0xe1, 0xad, 0xce, 0x8d, 0x89, 0x56, 0x18, 0x3e, 0x45, 0x68, 0x14, 0xcf,
+ 0x79, 0x22, 0x63, 0x91, 0x48, 0xb2, 0x04, 0x47, 0xf8, 0xf4, 0xb6, 0x23, 0xd8, 0x71, 0xac, 0xc9,
+ 0xc3, 0xad, 0xb2, 0xf0, 0x50, 0x58, 0x6b, 0x69, 0xc3, 0x4f, 0xef, 0x3f, 0x4f, 0xee, 0xca, 0xbb,
+ 0x6e, 0xe5, 0x13, 0x31, 0x8b, 0x83, 0xab, 0xb7, 0x6c, 0x5e, 0x1d, 0x0d, 0x5a, 0x39, 0x05, 0xab,
+ 0x9f, 0xb0, 0x39, 0xa7, 0x0d, 0x0a, 0xfe, 0x03, 0x5a, 0x9f, 0xe4, 0xa9, 0xce, 0x55, 0x3d, 0xa1,
+ 0x10, 0x5a, 0x1a, 0xa3, 0x1e, 0x3b, 0x47, 0xd0, 0xd7, 0xfe, 0x31, 0x57, 0x81, 0x98, 0x73, 0x3b,
+ 0xa6, 0x70, 0x6d, 0x61, 0x4c, 0xb4, 0xc2, 0xf4, 0x4c, 0xdb, 0xff, 0x52, 0xce, 0xa4, 0x48, 0x60,
+ 0x3a, 0xed, 0x4c, 0x5b, 0xb2, 0x9f, 0x01, 0x42, 0xdb, 0x44, 0xfc, 0x17, 0xf4, 0x7c, 0x38, 0x13,
+ 0xc1, 0x65, 0x9c, 0x44, 0x6f, 0xde, 0x07, 0x3c, 0xd5, 0x37, 0xb3, 0x3e, 0xcc, 0x5c, 0x7e, 0x52,
+ 0x16, 0xde, 0xce, 0xb9, 0xa5, 0xf8, 0xbc, 0xe2, 0x54, 0xee, 0xee, 0x52, 0xc3, 0x43, 0xc5, 0xd5,
+ 0x85, 0x08, 0xed, 0xd0, 0x9a, 0x87, 0x0a, 0x2c, 0xd4, 0x22, 0x7a, 0x70, 0x4f, 0xf4, 0xbb, 0x11,
+ 0x88, 0x59, 0x73, 0x70, 0x53, 0x6b, 0xa3, 0x35, 0x8a, 0x4f, 0x10, 0xf9, 0xeb, 0xb7, 0x22, 0xfb,
+ 0x07, 0xcb, 0x42, 0x1e, 0x7e, 0x2b, 0xb2, 0xef, 0x39, 0x0b, 0x79, 0x76, 0xc6, 0x66, 0x39, 0x27,
+ 0x6b, 0xa0, 0x7c, 0x5a, 0x16, 0xde, 0xe3, 0xf7, 0xd3, 0xa9, 0x7f, 0x01, 0x90, 0xbf, 0xd0, 0x18,
+ 0xbd, 0x53, 0x85, 0x77, 0xd0, 0x83, 0x77, 0x74, 0x4c, 0xd6, 0x41, 0xbc, 0x5a, 0x16, 0xde, 0x83,
+ 0x3c, 0x8b, 0xa9, 0xb6, 0xe9, 0xa4, 0x53, 0xfe, 0xf7, 0x9c, 0x4b, 0x45, 0x90, 0x4b, 0x7a, 0x66,
+ 0x4c, 0xb4, 0xc2, 0xf0, 0x21, 0xea, 0x8e, 0xe5, 0x69, 0x96, 0x27, 0xfa, 0xa1, 0x09, 0x49, 0x17,
+ 0xa8, 0x8f, 0xcb, 0xc2, 0xdb, 0x88, 0xa5, 0xaf, 0x2a, 0x3b, 0x6d, 0x92, 0x74, 0xa1, 0xac, 0x7c,
+ 0xa2, 0x98, 0xca, 0x25, 0xd9, 0x70, 0x85, 0xb2, 0x01, 0x7c, 0x09, 0x08, 0x6d, 0x13, 0xf1, 0x57,
+ 0x68, 0x83, 0x72, 0x99, 0x8a, 0x44, 0xf2, 0x23, 0x11, 0x72, 0xb2, 0x09, 0xc2, 0x27, 0x65, 0xe1,
+ 0x6d, 0x66, 0xd6, 0xee, 0x07, 0x22, 0xe4, 0xb4, 0x45, 0xd3, 0xfd, 0x39, 0xe1, 0xd9, 0x82, 0x67,
+ 0xaf, 0xc3, 0x30, 0x23, 0x5b, 0xae, 0x3f, 0x25, 0x58, 0x7d, 0x16, 0x86, 0x19, 0x6d, 0x50, 0xf0,
+ 0x4b, 0xb4, 0x72, 0x36, 0x81, 0x66, 0x7e, 0xe4, 0xee, 0xbe, 0x90, 0xa6, 0x91, 0x2d, 0xa4, 0xbd,
+ 0x52, 0x3e, 0x17, 0x8a, 0x83, 0xd7, 0xc7, 0xce, 0x6b, 0x06, 0x56, 0xeb, 0xd5, 0x51, 0xf0, 0x97,
+ 0x95, 0xe0, 0x44, 0x64, 0x8a, 0x3c, 0x71, 0x15, 0x0b, 0xb9, 0x54, 0x71, 0x62, 0x9e, 0x1c, 0xdd,
+ 0xf3, 0xb4, 0xc1, 0x73, 0x87, 0x07, 0x15, 0xbe, 0x71, 0x78, 0x23, 0x70, 0x14, 0xdc, 0x47, 0xa8,
+ 0x9e, 0x4f, 0x49, 0xb6, 0xdd, 0x74, 0xd5, 0xef, 0x9a, 0xa4, 0x0d, 0x86, 0x2e, 0xc7, 0x24, 0x3f,
+ 0x6f, 0x48, 0x9e, 0xba, 0x72, 0xc8, 0xfc, 0xdc, 0x6f, 0xc8, 0xda, 0x44, 0xfc, 0x0d, 0x7a, 0x54,
+ 0x7f, 0x51, 0xa6, 0xe2, 0x24, 0x22, 0x1f, 0xb9, 0x5b, 0xb9, 0x67, 0x34, 0x03, 0x8c, 0x5e, 0x27,
+ 0xe3, 0x2f, 0x50, 0x77, 0x12, 0x47, 0x13, 0xae, 0x74, 0x3e, 0x25, 0x79, 0xe6, 0xaa, 0x29, 0xe3,
+ 0xc8, 0x97, 0x5c, 0x41, 0xc2, 0x25, 0x6d, 0xb2, 0xf0, 0x2b, 0xb4, 0x3a, 0x89, 0xa3, 0xa3, 0xb3,
+ 0x37, 0x92, 0x3c, 0x77, 0xe3, 0xa2, 0x05, 0xc1, 0x82, 0x4b, 0x5a, 0x81, 0xba, 0x33, 0x8f, 0x66,
+ 0x31, 0x4f, 0xd4, 0xd1, 0x8c, 0x49, 0x49, 0x88, 0xeb, 0xcc, 0x00, 0xcc, 0x7e, 0xa0, 0xed, 0xb4,
+ 0x49, 0xc2, 0x23, 0xf4, 0xc4, 0x7c, 0xbe, 0x4e, 0xd3, 0x59, 0x1c, 0xc0, 0x59, 0xc9, 0x0e, 0x28,
+ 0x9f, 0x95, 0x85, 0x87, 0xad, 0x92, 0x39, 0x94, 0xde, 0x14, 0xe0, 0x9f, 0x10, 0xb9, 0x61, 0x3c,
+ 0xe3, 0x99, 0x7e, 0x46, 0xc9, 0x2e, 0x38, 0xdb, 0x2b, 0x0b, 0x6f, 0xf7, 0xa6, 0x33, 0x7f, 0x61,
+ 0x58, 0xf4, 0x4e, 0xbd, 0x7e, 0x2d, 0x26, 0x7c, 0xc1, 0xf5, 0x23, 0x4c, 0x3e, 0x6e, 0x5c, 0xdf,
+ 0xda, 0x68, 0x8d, 0xe2, 0x3f, 0xa3, 0xed, 0xd3, 0x8b, 0x8c, 0x33, 0x75, 0xc4, 0xe6, 0x29, 0x8b,
+ 0xa3, 0xc4, 0x24, 0xf9, 0x05, 0x88, 0x76, 0xca, 0xc2, 0xfb, 0x48, 0x01, 0xec, 0x07, 0x16, 0xb7,
+ 0xc9, 0xbe, 0x4d, 0xa5, 0x07, 0x6f, 0x28, 0xd4, 0xeb, 0x44, 0xcc, 0xd9, 0x2c, 0xe6, 0x92, 0x7c,
+ 0xe2, 0x4a, 0x75, 0x2e, 0x94, 0xcf, 0x2a, 0x80, 0xb6, 0x68, 0xba, 0x06, 0x43, 0xa1, 0xea, 0xbd,
+ 0x64, 0xcf, 0xd5, 0x40, 0xab, 0xea, 0xdd, 0xa4, 0x49, 0xc2, 0x6f, 0xd1, 0xd3, 0x37, 0xc9, 0x54,
+ 0x64, 0x01, 0x0f, 0x5b, 0x21, 0x3d, 0x10, 0xef, 0x96, 0x85, 0xf7, 0x8c, 0x5b, 0xdc, 0x6f, 0xc7,
+ 0xbe, 0x55, 0x87, 0x87, 0xe8, 0xf1, 0x50, 0xa8, 0x49, 0x1c, 0x25, 0x4c, 0xe5, 0x19, 0x87, 0xa9,
+ 0xde, 0x77, 0x25, 0xd5, 0x2e, 0x64, 0x05, 0x9a, 0x01, 0xbf, 0xc1, 0xd7, 0x7d, 0x51, 0xf7, 0xee,
+ 0x91, 0x48, 0x14, 0x7f, 0xaf, 0x24, 0xf9, 0xad, 0x73, 0xe2, 0x5a, 0x3d, 0xb0, 0x28, 0xbd, 0x29,
+ 0xc0, 0x1c, 0x6d, 0xb9, 0xe1, 0x19, 0xe9, 0xa5, 0xab, 0x07, 0xbf, 0xcd, 0xf7, 0x2d, 0x48, 0xb5,
+ 0x40, 0xf3, 0x87, 0xdb, 0x65, 0xe1, 0x3d, 0x72, 0xf3, 0xe8, 0xc3, 0x02, 0x76, 0xcd, 0x29, 0xfe,
+ 0x3d, 0x5a, 0x9b, 0x5c, 0x49, 0xc5, 0xe7, 0xe3, 0x11, 0x79, 0x09, 0x67, 0x84, 0x25, 0x54, 0x82,
+ 0x4d, 0xff, 0xb4, 0xd6, 0xb0, 0x2e, 0xeb, 0x38, 0x91, 0x8a, 0x25, 0x01, 0x3f, 0x65, 0x91, 0x24,
+ 0x9f, 0xba, 0xb2, 0xc6, 0xd6, 0xee, 0x2b, 0x16, 0x49, 0xda, 0xa2, 0xe9, 0x17, 0xa3, 0xfa, 0xfe,
+ 0x2e, 0x13, 0x79, 0x4a, 0x3e, 0x73, 0x2f, 0x46, 0xad, 0x8b, 0x34, 0x42, 0xdb, 0x44, 0xdd, 0x10,
+ 0xa3, 0x58, 0xa6, 0x33, 0x66, 0x56, 0x85, 0x57, 0xae, 0x21, 0x42, 0x63, 0x36, 0x15, 0x68, 0x92,
+ 0xf4, 0xc0, 0xbf, 0xd5, 0xc9, 0x19, 0x8f, 0xc8, 0xef, 0x5c, 0xc7, 0x43, 0xbe, 0xf4, 0x6d, 0x2a,
+ 0x10, 0x7f, 0x8d, 0xb6, 0x4e, 0x58, 0xa6, 0x17, 0x36, 0x21, 0x95, 0x76, 0x43, 0x0e, 0x80, 0x0e,
+ 0x49, 0x4b, 0x01, 0xf1, 0x2f, 0x2c, 0x44, 0xaf, 0x51, 0x7b, 0xff, 0xeb, 0xa0, 0xcd, 0xba, 0xe6,
+ 0x90, 0x46, 0x0f, 0x2d, 0x8d, 0x47, 0xcd, 0x65, 0x46, 0x3f, 0x31, 0x3a, 0xe1, 0x3a, 0xe8, 0xd2,
+ 0x78, 0x84, 0xbf, 0x41, 0x1b, 0xd5, 0xef, 0xfe, 0x31, 0x93, 0x97, 0x76, 0x8f, 0x81, 0x06, 0xad,
+ 0xa9, 0xf5, 0xce, 0x30, 0x67, 0xf2, 0x92, 0xb6, 0xf8, 0xf8, 0x73, 0xb4, 0x32, 0xcc, 0xa7, 0x53,
+ 0x9e, 0xd9, 0xad, 0x06, 0xce, 0xe9, 0x94, 0x00, 0x51, 0x4b, 0xd1, 0xe4, 0x1f, 0xa7, 0x53, 0xc9,
+ 0x95, 0xdd, 0x6a, 0xda, 0x64, 0x01, 0x10, 0xb5, 0x14, 0x4d, 0xfe, 0x81, 0x27, 0x91, 0xba, 0xb0,
+ 0xeb, 0x4b, 0x9b, 0x3c, 0x03, 0x88, 0x5a, 0x4a, 0xef, 0x6f, 0xa8, 0x6b, 0x3b, 0x14, 0xae, 0xfd,
+ 0x39, 0x5a, 0x6e, 0x6c, 0x71, 0xcf, 0xcb, 0xc2, 0xdb, 0x4e, 0x59, 0xc6, 0xe6, 0x5c, 0xf1, 0xcc,
+ 0xe8, 0x21, 0x7f, 0x40, 0xc2, 0x7d, 0xf4, 0xd0, 0xac, 0x1f, 0xe6, 0xee, 0xa4, 0x2c, 0xbc, 0xa7,
+ 0xd7, 0xd8, 0x66, 0x05, 0x31, 0xb4, 0xde, 0xbf, 0x97, 0xd0, 0x66, 0xab, 0xa3, 0x6f, 0x0b, 0xe7,
+ 0x86, 0xe9, 0x7a, 0xb8, 0x2f, 0xd1, 0xaa, 0x3d, 0x6a, 0x33, 0xd9, 0xd7, 0xf8, 0x76, 0x02, 0x69,
+ 0x45, 0xc5, 0x71, 0xeb, 0x82, 0xf6, 0x8f, 0x84, 0x57, 0xf7, 0xcc, 0x5c, 0x83, 0x3d, 0xf4, 0xca,
+ 0xc2, 0xfb, 0xf8, 0xf6, 0x08, 0x66, 0xfa, 0x5a, 0xc9, 0x8b, 0x10, 0xaa, 0x9b, 0x48, 0x92, 0xe5,
+ 0x5f, 0x9d, 0xee, 0x56, 0xc7, 0x99, 0x2d, 0xf3, 0x5a, 0xac, 0xfa, 0x69, 0x92, 0xb4, 0xe1, 0x7a,
+ 0x48, 0x7f, 0xfe, 0xb0, 0xd7, 0xf9, 0xe5, 0xc3, 0x5e, 0xe7, 0xbf, 0x1f, 0xf6, 0x3a, 0x3f, 0x8d,
+ 0xa2, 0x58, 0x5d, 0xe4, 0xe7, 0x7a, 0x9f, 0x1f, 0x40, 0xa4, 0x01, 0x44, 0x1a, 0xc8, 0xf0, 0x72,
+ 0xb0, 0x38, 0x34, 0x7f, 0x54, 0x0f, 0x4c, 0xc8, 0xaf, 0xef, 0x3c, 0xcc, 0xf9, 0x0a, 0xf0, 0xbe,
+ 0xf8, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xb3, 0x5c, 0xb5, 0xd5, 0x0f, 0x00, 0x00,
}
func (m *Metadata) Marshal() (dAtA []byte, err error) {
diff --git a/sdk/proto/events/event.proto b/sdk/proto/events/event.proto
index bbbf8aff9..4dfc67f58 100644
--- a/sdk/proto/events/event.proto
+++ b/sdk/proto/events/event.proto
@@ -1,121 +1,140 @@
+// Event messages
syntax = "proto3";
package f5.nginx.agent.sdk.events;
-option go_package = "github.com/nginx/agent/sdk/v2/proto/events;f5.nginx.agent.sdk.events";
+import "common/common.proto";
import "gogo.proto";
import "google/protobuf/timestamp.proto";
-import "common/common.proto";
+option go_package = "github.com/nginx/agent/sdk/v2/proto/events;f5.nginx.agent.sdk.events";
+
+// Represents the metadata for an event
message Metadata {
- string Module = 1 [(gogoproto.jsontag) = "module" ];
- string UUID = 2 [(gogoproto.jsontag) = "uuid" ];
- string CorrelationID = 3 [(gogoproto.jsontag) = "correlation_id" ];
- google.protobuf.Timestamp Timestamp = 4 [(gogoproto.jsontag) = "timestamp" ];
- string EventLevel = 5 [(gogoproto.jsontag) = "event_level" ];
- string Type = 6 [(gogoproto.jsontag) = "type" ];
- string Category = 7 [(gogoproto.jsontag) = "category" ];
+ // Module is the process that generate the event
+ string Module = 1 [(gogoproto.jsontag) = "module"];
+ // UUID is a unique identifier for each event
+ string UUID = 2 [(gogoproto.jsontag) = "uuid"];
+ // CorrelationID is an ID used by the producer of the message to track the flow of events
+ string CorrelationID = 3 [(gogoproto.jsontag) = "correlation_id"];
+ // Timestamp defines the time of event generation
+ google.protobuf.Timestamp Timestamp = 4 [(gogoproto.jsontag) = "timestamp"];
+ // EventLevel defines the criticality of event
+ string EventLevel = 5 [(gogoproto.jsontag) = "event_level"];
+ // Type is used to identify the event type for further processing
+ string Type = 6 [(gogoproto.jsontag) = "type"];
+ // Category is used for classifying the event type into a higher level entity
+ string Category = 7 [(gogoproto.jsontag) = "category"];
}
+// Represents an event
message Event {
- Metadata Metadata = 1 [(gogoproto.jsontag) = "metadata" ];
- oneof data {
- ActivityEvent ActivityEvent = 2 [(gogoproto.jsontag) = "activity_event" ];
-
- // While generating the SecurityViolationEvent, the Metadata for a SecurityViolationEvent
- // would look as shown below:
- // * Module = Agent
- // * UUID = A UUID generated by the Agent for the EventReport
- // * CorrelationID = The UUID will be used as the Correlation ID to track the EventReport
- // * Timestamp = The timestamp when NGINX Agent received the violation event
- // * EventLevel = All the SecurityViolationEvent would be generated at an ERROR_EVENT_LEVEL ("ERROR") level
- // In future, the levels might be dynamically chosen based on Request Outcome of SecurityViolationEvent
- // * Type = NGINX_EVENT_TYPE ("Nginx")
- // * Category = APP_PROTECT_CATEGORY ("AppProtect")
- //
- SecurityViolationEvent SecurityViolationEvent = 3 [(gogoproto.jsontag) = "security_violation_event" ];
- }
+ // Event metadata
+ Metadata Metadata = 1 [(gogoproto.jsontag) = "metadata"];
+ oneof data {
+ ActivityEvent ActivityEvent = 2 [(gogoproto.jsontag) = "activity_event"]; // Activity event
+
+ /**
+ * While generating the SecurityViolationEvent, the Metadata for a SecurityViolationEvent
+ * would look as shown below:
+ * - Module = Agent
+ * - UUID = A UUID generated by the Agent for the EventReport
+ * - CorrelationID = The UUID will be used as the Correlation ID to track the EventReport
+ * - Timestamp = The timestamp when NGINX Agent received the violation event
+ * - EventLevel = All the SecurityViolationEvent would be generated at an ERROR_EVENT_LEVEL ("ERROR") level
+ * In future, the levels might be dynamically chosen based on Request Outcome of SecurityViolationEvent
+ * - Type = NGINX_EVENT_TYPE ("Nginx")
+ * - Category = APP_PROTECT_CATEGORY ("AppProtect")
+ */
+
+ SecurityViolationEvent SecurityViolationEvent = 3 [(gogoproto.jsontag) = "security_violation_event"]; // Security violation event
+ }
}
+// Represents an event report
message EventReport {
- repeated Event Events = 1 [(gogoproto.jsontag) = "events" ];
+ // Array of events
+ repeated Event Events = 1 [(gogoproto.jsontag) = "events"];
}
+// Represents an activity event
message ActivityEvent {
- string Message = 1 [(gogoproto.jsontag) = "message" ];
- repeated f5.nginx.agent.sdk.common.Dimension Dimensions = 2 [(gogoproto.jsontag) = "dimensions" ];
+ // Activtiy event message
+ string Message = 1 [(gogoproto.jsontag) = "message"];
+ // Array of dimensions
+ repeated f5.nginx.agent.sdk.common.Dimension Dimensions = 2 [(gogoproto.jsontag) = "dimensions"];
}
-// SecurityViolationEvent represents a Security Violation that is emitted by the Agent
+// Represents a security violation that is emitted by the agent
message SecurityViolationEvent {
- string PolicyName = 1 [(gogoproto.jsontag) = "policy_name" ];
- string SupportID = 2 [(gogoproto.jsontag) = "support_id" ];
-
- string Outcome = 3 [(gogoproto.jsontag) = "outcome" ];
- string OutcomeReason = 4 [(gogoproto.jsontag) = "outcome_reason" ];
- string BlockingExceptionReason = 5 [(gogoproto.jsontag) = "blocking_exception_reason" ];
-
- string Method = 6 [(gogoproto.jsontag) = "method" ];
- string Protocol = 7 [(gogoproto.jsontag) = "protocol" ];
- string XForwardedForHeaderValue = 8 [(gogoproto.jsontag) = "xff_header_value" ];
-
- string URI = 9 [(gogoproto.jsontag) = "uri" ];
- string Request = 10 [(gogoproto.jsontag) = "request" ];
- string IsTruncated = 11 [(gogoproto.jsontag) = "is_truncated" ];
- string RequestStatus = 12 [(gogoproto.jsontag) = "request_status" ];
- string ResponseCode = 13 [(gogoproto.jsontag) = "response_code" ];
-
- string ServerAddr = 14 [(gogoproto.jsontag) = "server_addr" ];
- string VSName = 15 [(gogoproto.jsontag) = "vs_name" ];
- string RemoteAddr = 16[(gogoproto.jsontag) = "remote_addr" ];
- string RemotePort = 17 [(gogoproto.jsontag) = "destination_port" ];
- string ServerPort = 18 [(gogoproto.jsontag) = "server_port" ];
-
- string Violations = 19 [(gogoproto.jsontag) = "violations" ];
- string SubViolations = 20 [(gogoproto.jsontag) = "sub_violations" ];
- string ViolationRating = 21 [(gogoproto.jsontag) = "violation_rating" ];
-
- string SigSetNames = 22 [(gogoproto.jsontag) = "sig_set_names" ];
- string SigCVEs = 23 [(gogoproto.jsontag) = "sig_cves" ];
-
- string ClientClass = 24 [(gogoproto.jsontag) = "client_class" ];
- string ClientApplication = 25 [(gogoproto.jsontag) = "client_application" ];
- string ClientApplicationVersion = 26 [(gogoproto.jsontag) = "client_application_version" ];
-
- string Severity = 27 [(gogoproto.jsontag) = "severity" ];
- string ThreatCampaignNames = 28 [(gogoproto.jsontag) = "threat_campaign_names" ];
-
- string BotAnomalies = 29 [(gogoproto.jsontag) = "bot_anomalies" ];
- string BotCategory = 30 [(gogoproto.jsontag) = "bot_category" ];
- string EnforcedBotAnomalies = 31 [(gogoproto.jsontag) = "enforced_bot_anomalies" ];
- string BotSignatureName = 32 [(gogoproto.jsontag) = "bot_signature_name" ];
-
- string ViolationContexts = 33 [(gogoproto.jsontag) = "violation_contexts" ];
- repeated ViolationData ViolationsData = 34 [(gogoproto.jsontag) = "violations_data" ];
-
- string SystemID = 35 [(gogoproto.jsontag) = "system_id" ];
- string InstanceTags = 36 [(gogoproto.jsontag) = "instance_tags" ];
- string InstanceGroup = 37 [(gogoproto.jsontag) = "instance_group" ];
- string DisplayName = 38 [(gogoproto.jsontag) = "display_name" ];
- string NginxID = 39 [(gogoproto.jsontag) = "nginx_id" ];
- string ParentHostname = 40 [(gogoproto.jsontag) = "parent_hostname" ];
+ string PolicyName = 1 [(gogoproto.jsontag) = "policy_name"];
+ string SupportID = 2 [(gogoproto.jsontag) = "support_id"];
+
+ string Outcome = 3 [(gogoproto.jsontag) = "outcome"];
+ string OutcomeReason = 4 [(gogoproto.jsontag) = "outcome_reason"];
+ string BlockingExceptionReason = 5 [(gogoproto.jsontag) = "blocking_exception_reason"];
+
+ string Method = 6 [(gogoproto.jsontag) = "method"];
+ string Protocol = 7 [(gogoproto.jsontag) = "protocol"];
+ string XForwardedForHeaderValue = 8 [(gogoproto.jsontag) = "xff_header_value"];
+
+ string URI = 9 [(gogoproto.jsontag) = "uri"];
+ string Request = 10 [(gogoproto.jsontag) = "request"];
+ string IsTruncated = 11 [(gogoproto.jsontag) = "is_truncated"];
+ string RequestStatus = 12 [(gogoproto.jsontag) = "request_status"];
+ string ResponseCode = 13 [(gogoproto.jsontag) = "response_code"];
+
+ string ServerAddr = 14 [(gogoproto.jsontag) = "server_addr"];
+ string VSName = 15 [(gogoproto.jsontag) = "vs_name"];
+ string RemoteAddr = 16 [(gogoproto.jsontag) = "remote_addr"];
+ string RemotePort = 17 [(gogoproto.jsontag) = "destination_port"];
+ string ServerPort = 18 [(gogoproto.jsontag) = "server_port"];
+
+ string Violations = 19 [(gogoproto.jsontag) = "violations"];
+ string SubViolations = 20 [(gogoproto.jsontag) = "sub_violations"];
+ string ViolationRating = 21 [(gogoproto.jsontag) = "violation_rating"];
+
+ string SigSetNames = 22 [(gogoproto.jsontag) = "sig_set_names"];
+ string SigCVEs = 23 [(gogoproto.jsontag) = "sig_cves"];
+
+ string ClientClass = 24 [(gogoproto.jsontag) = "client_class"];
+ string ClientApplication = 25 [(gogoproto.jsontag) = "client_application"];
+ string ClientApplicationVersion = 26 [(gogoproto.jsontag) = "client_application_version"];
+
+ string Severity = 27 [(gogoproto.jsontag) = "severity"];
+ string ThreatCampaignNames = 28 [(gogoproto.jsontag) = "threat_campaign_names"];
+
+ string BotAnomalies = 29 [(gogoproto.jsontag) = "bot_anomalies"];
+ string BotCategory = 30 [(gogoproto.jsontag) = "bot_category"];
+ string EnforcedBotAnomalies = 31 [(gogoproto.jsontag) = "enforced_bot_anomalies"];
+ string BotSignatureName = 32 [(gogoproto.jsontag) = "bot_signature_name"];
+
+ string ViolationContexts = 33 [(gogoproto.jsontag) = "violation_contexts"];
+ repeated ViolationData ViolationsData = 34 [(gogoproto.jsontag) = "violations_data"];
+
+ string SystemID = 35 [(gogoproto.jsontag) = "system_id"];
+ string InstanceTags = 36 [(gogoproto.jsontag) = "instance_tags"];
+ string InstanceGroup = 37 [(gogoproto.jsontag) = "instance_group"];
+ string DisplayName = 38 [(gogoproto.jsontag) = "display_name"];
+ string NginxID = 39 [(gogoproto.jsontag) = "nginx_id"];
+ string ParentHostname = 40 [(gogoproto.jsontag) = "parent_hostname"];
}
message SignatureData {
- string ID = 1 [(gogoproto.jsontag) = "sig_data_id" ];
- string BlockingMask = 2 [(gogoproto.jsontag) = "sig_data_blocking_mask" ];
- string Buffer = 3 [(gogoproto.jsontag) = "sig_data_buffer" ];
- string Offset = 4 [(gogoproto.jsontag) = "sig_data_offset" ];
- string Length = 5 [(gogoproto.jsontag) = "sig_data_length" ];
+ string ID = 1 [(gogoproto.jsontag) = "sig_data_id"];
+ string BlockingMask = 2 [(gogoproto.jsontag) = "sig_data_blocking_mask"];
+ string Buffer = 3 [(gogoproto.jsontag) = "sig_data_buffer"];
+ string Offset = 4 [(gogoproto.jsontag) = "sig_data_offset"];
+ string Length = 5 [(gogoproto.jsontag) = "sig_data_length"];
}
message ContextData {
- string Name = 1 [(gogoproto.jsontag) = "parameter_data_name"];
- string Value = 2 [(gogoproto.jsontag) = "parameter_data_value"];
+ string Name = 1 [(gogoproto.jsontag) = "parameter_data_name"];
+ string Value = 2 [(gogoproto.jsontag) = "parameter_data_value"];
}
message ViolationData {
- string Name = 1 [(gogoproto.jsontag) = "violation_data_name" ];
- string Context = 2 [(gogoproto.jsontag) = "violation_data_context" ];
- ContextData ContextData = 3 [(gogoproto.jsontag) = "violation_data_context_data" ];
- repeated SignatureData Signatures = 4 [(gogoproto.jsontag) = "violation_data_signatures" ];
+ string Name = 1 [(gogoproto.jsontag) = "violation_data_name"];
+ string Context = 2 [(gogoproto.jsontag) = "violation_data_context"];
+ ContextData ContextData = 3 [(gogoproto.jsontag) = "violation_data_context_data"];
+ repeated SignatureData Signatures = 4 [(gogoproto.jsontag) = "violation_data_signatures"];
}
diff --git a/sdk/proto/host.pb.go b/sdk/proto/host.pb.go
index 6168ed6ff..0e5d9b0e6 100644
--- a/sdk/proto/host.pb.go
+++ b/sdk/proto/host.pb.go
@@ -24,23 +24,37 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Represents the host system information
type HostInfo struct {
- Agent string `protobuf:"bytes,1,opt,name=agent,proto3" json:"agent"`
- Boot uint64 `protobuf:"varint,2,opt,name=boot,proto3" json:"boot"`
- Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname"`
- DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name"`
- OsType string `protobuf:"bytes,5,opt,name=os_type,json=osType,proto3" json:"os-type"`
- Uuid string `protobuf:"bytes,6,opt,name=uuid,proto3" json:"uuid"`
- Uname string `protobuf:"bytes,7,opt,name=uname,proto3" json:"uname"`
- Partitons []*DiskPartition `protobuf:"bytes,8,rep,name=partitons,proto3" json:"disk_partitions"`
- Network *Network `protobuf:"bytes,9,opt,name=network,proto3" json:"network"`
- Processor []*CpuInfo `protobuf:"bytes,10,rep,name=processor,proto3" json:"processor"`
- Release *ReleaseInfo `protobuf:"bytes,11,opt,name=release,proto3" json:"release"`
- Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags"`
- AgentAccessibleDirs string `protobuf:"bytes,13,opt,name=agent_accessible_dirs,json=agentAccessibleDirs,proto3" json:"agent_accessible_dirs"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // NGINX Agent version
+ Agent string `protobuf:"bytes,1,opt,name=agent,proto3" json:"agent"`
+ // Host boot time
+ Boot uint64 `protobuf:"varint,2,opt,name=boot,proto3" json:"boot"`
+ // Hostname
+ Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname"`
+ // Display Name
+ DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name"`
+ // OS type (e.g. freebsd, linux, etc)
+ OsType string `protobuf:"bytes,5,opt,name=os_type,json=osType,proto3" json:"os-type"`
+ // Host UUID
+ Uuid string `protobuf:"bytes,6,opt,name=uuid,proto3" json:"uuid"`
+ // The native cpu architecture queried at runtime, as returned by `uname -m` or empty string in case of error
+ Uname string `protobuf:"bytes,7,opt,name=uname,proto3" json:"uname"`
+ // List of disk partitions
+ Partitons []*DiskPartition `protobuf:"bytes,8,rep,name=partitons,proto3" json:"disk_partitions"`
+ // Network information
+ Network *Network `protobuf:"bytes,9,opt,name=network,proto3" json:"network"`
+ // List of CPU processor information
+ Processor []*CpuInfo `protobuf:"bytes,10,rep,name=processor,proto3" json:"processor"`
+ // Release Information
+ Release *ReleaseInfo `protobuf:"bytes,11,opt,name=release,proto3" json:"release"`
+ // List of tags
+ Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags"`
+ // List of directories that the NGINX Agent is allowed to access on the host
+ AgentAccessibleDirs string `protobuf:"bytes,13,opt,name=agent_accessible_dirs,json=agentAccessibleDirs,proto3" json:"agent_accessible_dirs"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *HostInfo) Reset() { *m = HostInfo{} }
@@ -167,9 +181,13 @@ func (m *HostInfo) GetAgentAccessibleDirs() string {
return ""
}
+// Represents a disk partition
type DiskPartition struct {
- MountPoint string `protobuf:"bytes,1,opt,name=mount_point,json=mountPoint,proto3" json:"mountpoint"`
- Device string `protobuf:"bytes,2,opt,name=device,proto3" json:"device"`
+ // Mount point location
+ MountPoint string `protobuf:"bytes,1,opt,name=mount_point,json=mountPoint,proto3" json:"mountpoint"`
+ // Device file path
+ Device string `protobuf:"bytes,2,opt,name=device,proto3" json:"device"`
+ // File system type (e.g. hfs, swap, etc)
FsType string `protobuf:"bytes,3,opt,name=fs_type,json=fsType,proto3" json:"fstype"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -230,12 +248,15 @@ func (m *DiskPartition) GetFsType() string {
return ""
}
+// Represents a network
type Network struct {
- Interfaces []*NetworkInterface `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces"`
- Default string `protobuf:"bytes,2,opt,name=default,proto3" json:"default"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // List of network interfaces
+ Interfaces []*NetworkInterface `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces"`
+ // Default network name
+ Default string `protobuf:"bytes,2,opt,name=default,proto3" json:"default"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Network) Reset() { *m = Network{} }
@@ -285,14 +306,19 @@ func (m *Network) GetDefault() string {
return ""
}
+// Represents a network interface
type NetworkInterface struct {
- Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac"`
- Ipv6 []*Address `protobuf:"bytes,2,rep,name=ipv6,proto3" json:"ipv6"`
- Ipv4 []*Address `protobuf:"bytes,3,rep,name=ipv4,proto3" json:"ipv4"`
- Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // MAC address
+ Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac"`
+ // List of IPV6 addresses
+ Ipv6 []*Address `protobuf:"bytes,2,rep,name=ipv6,proto3" json:"ipv6"`
+ // List of IPV4 addresses
+ Ipv4 []*Address `protobuf:"bytes,3,rep,name=ipv4,proto3" json:"ipv4"`
+ // Name of network interface
+ Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *NetworkInterface) Reset() { *m = NetworkInterface{} }
@@ -356,9 +382,13 @@ func (m *NetworkInterface) GetName() string {
return ""
}
+// Represents an IP address
type Address struct {
- Prefixlen int64 `protobuf:"varint,1,opt,name=prefixlen,proto3" json:"prefixlen"`
- Netmask string `protobuf:"bytes,2,opt,name=netmask,proto3" json:"netmask"`
+ // Prefix length
+ Prefixlen int64 `protobuf:"varint,1,opt,name=prefixlen,proto3" json:"prefixlen"`
+ // Netmask
+ Netmask string `protobuf:"bytes,2,opt,name=netmask,proto3" json:"netmask"`
+ // IP Address
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -419,14 +449,23 @@ func (m *Address) GetAddress() string {
return ""
}
+// Represents CPU information
type CpuInfo struct {
- Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model"`
- Cores int32 `protobuf:"varint,2,opt,name=cores,proto3" json:"cores"`
- Architecture string `protobuf:"bytes,3,opt,name=architecture,proto3" json:"architecture"`
- Mhz float64 `protobuf:"fixed64,4,opt,name=mhz,proto3" json:"mhz"`
- Hypervisor string `protobuf:"bytes,5,opt,name=hypervisor,proto3" json:"hypervisor"`
- Cpus int32 `protobuf:"varint,6,opt,name=cpus,proto3" json:"cpus"`
- Virtualization string `protobuf:"bytes,7,opt,name=virtualization,proto3" json:"virtualization"`
+ // Model of CPU
+ Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model"`
+ // Number of cores
+ Cores int32 `protobuf:"varint,2,opt,name=cores,proto3" json:"cores"`
+ // CPU architecture
+ Architecture string `protobuf:"bytes,3,opt,name=architecture,proto3" json:"architecture"`
+ // CPU clock speed in MHz
+ Mhz float64 `protobuf:"fixed64,4,opt,name=mhz,proto3" json:"mhz"`
+ // Hypervisor (e.g. VMWare, KVM, etc.)
+ Hypervisor string `protobuf:"bytes,5,opt,name=hypervisor,proto3" json:"hypervisor"`
+ // Total number of CPUs
+ Cpus int32 `protobuf:"varint,6,opt,name=cpus,proto3" json:"cpus"`
+ // Type of hypervisor (e.g guest or host)
+ Virtualization string `protobuf:"bytes,7,opt,name=virtualization,proto3" json:"virtualization"`
+ // Map of caches with names as the keys and size in bytes as the values
Cache map[string]string `protobuf:"bytes,8,rep,name=cache,proto3" json:"cache" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -522,11 +561,17 @@ func (m *CpuInfo) GetCache() map[string]string {
return nil
}
+// Represents release information
type ReleaseInfo struct {
- Codename string `protobuf:"bytes,1,opt,name=codename,proto3" json:"codename"`
- Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id"`
- Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
- VersionId string `protobuf:"bytes,4,opt,name=version_id,json=versionId,proto3" json:"version_id"`
+ // OS type (e.g. freebsd, linux, etc)
+ Codename string `protobuf:"bytes,1,opt,name=codename,proto3" json:"codename"`
+ // OS name (e.g. ubuntu, linuxmint, etc)
+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id"`
+ // OS family (e.g. debian, rhel)
+ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
+ // Version of the OS kernel
+ VersionId string `protobuf:"bytes,4,opt,name=version_id,json=versionId,proto3" json:"version_id"`
+ // Version of the OS
Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
diff --git a/sdk/proto/host.proto b/sdk/proto/host.proto
index 5fdc7a75d..892d182b2 100644
--- a/sdk/proto/host.proto
+++ b/sdk/proto/host.proto
@@ -1,64 +1,110 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
import "gogo.proto";
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents the host system information
message HostInfo {
- string agent = 1 [(gogoproto.jsontag) = "agent" ];
- uint64 boot = 2 [(gogoproto.jsontag) = "boot" ];
- string hostname = 3 [(gogoproto.jsontag) = "hostname" ];
- string display_name = 4 [(gogoproto.jsontag) = "display_name" ];
- string os_type = 5 [(gogoproto.jsontag) = "os-type" ]; // note kebab case used for compatibility with legacy
- string uuid = 6 [(gogoproto.jsontag) = "uuid" ];
- string uname = 7 [(gogoproto.jsontag) = "uname" ];
- repeated DiskPartition partitons = 8 [(gogoproto.jsontag) = "disk_partitions" ];
- Network network = 9 [(gogoproto.jsontag) = "network" ];
- repeated CpuInfo processor = 10 [(gogoproto.jsontag) = "processor" ];
- ReleaseInfo release = 11 [(gogoproto.jsontag) = "release" ];
- repeated string tags = 12 [(gogoproto.jsontag) = "tags" ];
- string agent_accessible_dirs = 13 [(gogoproto.jsontag) = "agent_accessible_dirs" ];
+ // NGINX Agent version
+ string agent = 1 [(gogoproto.jsontag) = "agent"];
+ // Host boot time
+ uint64 boot = 2 [(gogoproto.jsontag) = "boot"];
+ // Hostname
+ string hostname = 3 [(gogoproto.jsontag) = "hostname"];
+ // Display Name
+ string display_name = 4 [(gogoproto.jsontag) = "display_name"];
+ // OS type (e.g. freebsd, linux, etc)
+ string os_type = 5 [(gogoproto.jsontag) = "os-type"];
+ // Host UUID
+ string uuid = 6 [(gogoproto.jsontag) = "uuid"];
+ // The native cpu architecture queried at runtime, as returned by `uname -m` or empty string in case of error
+ string uname = 7 [(gogoproto.jsontag) = "uname"];
+ // List of disk partitions
+ repeated DiskPartition partitons = 8 [(gogoproto.jsontag) = "disk_partitions"];
+ // Network information
+ Network network = 9 [(gogoproto.jsontag) = "network"];
+ // List of CPU processor information
+ repeated CpuInfo processor = 10 [(gogoproto.jsontag) = "processor"];
+ // Release Information
+ ReleaseInfo release = 11 [(gogoproto.jsontag) = "release"];
+ // List of tags
+ repeated string tags = 12 [(gogoproto.jsontag) = "tags"];
+ // List of directories that the NGINX Agent is allowed to access on the host
+ string agent_accessible_dirs = 13 [(gogoproto.jsontag) = "agent_accessible_dirs"];
}
+// Represents a disk partition
message DiskPartition {
- string mount_point = 1 [(gogoproto.jsontag) = "mountpoint" ];
- string device = 2 [(gogoproto.jsontag) = "device" ];
- string fs_type = 3 [(gogoproto.jsontag) = "fstype" ];
+ // Mount point location
+ string mount_point = 1 [(gogoproto.jsontag) = "mountpoint"];
+ // Device file path
+ string device = 2 [(gogoproto.jsontag) = "device"];
+ // File system type (e.g. hfs, swap, etc)
+ string fs_type = 3 [(gogoproto.jsontag) = "fstype"];
}
+// Represents a network
message Network {
- repeated NetworkInterface interfaces = 1 [(gogoproto.jsontag) = "interfaces" ];
- string default = 2 [(gogoproto.jsontag) = "default" ];
+ // List of network interfaces
+ repeated NetworkInterface interfaces = 1 [(gogoproto.jsontag) = "interfaces"];
+ // Default network name
+ string default = 2 [(gogoproto.jsontag) = "default"];
}
+// Represents a network interface
message NetworkInterface {
- string mac = 1 [(gogoproto.jsontag) = "mac" ];
- repeated Address ipv6 = 2 [(gogoproto.jsontag) = "ipv6" ];
- repeated Address ipv4 = 3 [(gogoproto.jsontag) = "ipv4" ];
- string name = 4 [(gogoproto.jsontag) = "name" ];
+ // MAC address
+ string mac = 1 [(gogoproto.jsontag) = "mac"];
+ // List of IPV6 addresses
+ repeated Address ipv6 = 2 [(gogoproto.jsontag) = "ipv6"];
+ // List of IPV4 addresses
+ repeated Address ipv4 = 3 [(gogoproto.jsontag) = "ipv4"];
+ // Name of network interface
+ string name = 4 [(gogoproto.jsontag) = "name"];
}
+// Represents an IP address
message Address {
- int64 prefixlen = 1 [(gogoproto.jsontag) = "prefixlen" ];
- string netmask = 2 [(gogoproto.jsontag) = "netmask" ];
- string address = 3 [(gogoproto.jsontag) = "address" ];
+ // Prefix length
+ int64 prefixlen = 1 [(gogoproto.jsontag) = "prefixlen"];
+ // Netmask
+ string netmask = 2 [(gogoproto.jsontag) = "netmask"];
+ // IP Address
+ string address = 3 [(gogoproto.jsontag) = "address"];
}
+// Represents CPU information
message CpuInfo {
- string model = 1 [(gogoproto.jsontag) = "model" ];
- int32 cores = 2 [(gogoproto.jsontag) = "cores" ];
- string architecture = 3 [(gogoproto.jsontag) = "architecture" ];
- double mhz = 4 [(gogoproto.jsontag) = "mhz" ];
- string hypervisor = 5 [(gogoproto.jsontag) = "hypervisor" ];
- int32 cpus = 6 [(gogoproto.jsontag) = "cpus" ];
- string virtualization = 7 [(gogoproto.jsontag) = "virtualization" ];
- map cache = 8 [(gogoproto.jsontag) = "cache" ];
+ // Model of CPU
+ string model = 1 [(gogoproto.jsontag) = "model"];
+ // Number of cores
+ int32 cores = 2 [(gogoproto.jsontag) = "cores"];
+ // CPU architecture
+ string architecture = 3 [(gogoproto.jsontag) = "architecture"];
+ // CPU clock speed in MHz
+ double mhz = 4 [(gogoproto.jsontag) = "mhz"];
+ // Hypervisor (e.g. VMWare, KVM, etc.)
+ string hypervisor = 5 [(gogoproto.jsontag) = "hypervisor"];
+ // Total number of CPUs
+ int32 cpus = 6 [(gogoproto.jsontag) = "cpus"];
+ // Type of hypervisor (e.g guest or host)
+ string virtualization = 7 [(gogoproto.jsontag) = "virtualization"];
+ // Map of caches with names as the keys and size in bytes as the values
+ map cache = 8 [(gogoproto.jsontag) = "cache"];
}
+// Represents release information
message ReleaseInfo {
- string codename = 1 [(gogoproto.jsontag) = "codename" ];
- string id = 2 [(gogoproto.jsontag) = "id" ];
- string name = 3 [(gogoproto.jsontag) = "name" ];
- string version_id = 4 [(gogoproto.jsontag) = "version_id" ];
- string version = 5 [(gogoproto.jsontag) = "version" ];
+ // OS type (e.g. freebsd, linux, etc)
+ string codename = 1 [(gogoproto.jsontag) = "codename"];
+ // OS name (e.g. ubuntu, linuxmint, etc)
+ string id = 2 [(gogoproto.jsontag) = "id"];
+ // OS family (e.g. debian, rhel)
+ string name = 3 [(gogoproto.jsontag) = "name"];
+ // Version of the OS kernel
+ string version_id = 4 [(gogoproto.jsontag) = "version_id"];
+ // Version of the OS
+ string version = 5 [(gogoproto.jsontag) = "version"];
}
diff --git a/sdk/proto/metrics.pb.go b/sdk/proto/metrics.pb.go
index afaa09a13..ee8c82794 100644
--- a/sdk/proto/metrics.pb.go
+++ b/sdk/proto/metrics.pb.go
@@ -25,12 +25,16 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Metric type enum
type MetricsReport_Type int32
const (
- MetricsReport_SYSTEM MetricsReport_Type = 0
+ // System metric type
+ MetricsReport_SYSTEM MetricsReport_Type = 0
+ // NGINX instance metric type
MetricsReport_INSTANCE MetricsReport_Type = 1
- MetricsReport_AGENT MetricsReport_Type = 2
+ // Agent metric type
+ MetricsReport_AGENT MetricsReport_Type = 2
)
var MetricsReport_Type_name = map[int32]string{
@@ -53,13 +57,17 @@ func (MetricsReport_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6039342a2ba47b72, []int{0, 0}
}
+// Represents a metric report
type MetricsReport struct {
- Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- Type MetricsReport_Type `protobuf:"varint,2,opt,name=type,proto3,enum=f5.nginx.agent.sdk.MetricsReport_Type" json:"type"`
- Data []*StatsEntity `protobuf:"bytes,3,rep,name=data,proto3" json:"data"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Provides meta information about the metrics
+ Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
+ // Type of metrics
+ Type MetricsReport_Type `protobuf:"varint,2,opt,name=type,proto3,enum=f5.nginx.agent.sdk.MetricsReport_Type" json:"type"`
+ // List of stats entities
+ Data []*StatsEntity `protobuf:"bytes,3,rep,name=data,proto3" json:"data"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *MetricsReport) Reset() { *m = MetricsReport{} }
@@ -116,8 +124,11 @@ func (m *MetricsReport) GetData() []*StatsEntity {
return nil
}
+// Represents a simple metric
type SimpleMetric struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Metric name
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Metric value
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -171,9 +182,11 @@ func (m *SimpleMetric) GetValue() float64 {
return 0
}
-// Dimension defines a dimensional attribute used when classifying and categorizing data
+// Represents a dimension which is a dimensional attribute used when classifying and categorizing data
type Dimension struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Dimension name
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Dimension value
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -227,14 +240,17 @@ func (m *Dimension) GetValue() string {
return ""
}
-// StatsEntity a timestamped entry for Dimensions and Metrics
+// Represents a stats entity which is a timestamped entry for dimensions and metrics
type StatsEntity struct {
- Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
- Dimensions []*Dimension `protobuf:"bytes,3,rep,name=dimensions,proto3" json:"dimensions"`
- Simplemetrics []*SimpleMetric `protobuf:"bytes,4,rep,name=simplemetrics,proto3" json:"simplemetrics"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Timestamp defines the time of stats entity creation
+ Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+ // List of dimensions
+ Dimensions []*Dimension `protobuf:"bytes,3,rep,name=dimensions,proto3" json:"dimensions"`
+ // List of metrics
+ Simplemetrics []*SimpleMetric `protobuf:"bytes,4,rep,name=simplemetrics,proto3" json:"simplemetrics"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *StatsEntity) Reset() { *m = StatsEntity{} }
@@ -302,36 +318,36 @@ func init() {
func init() { proto.RegisterFile("metrics.proto", fileDescriptor_6039342a2ba47b72) }
var fileDescriptor_6039342a2ba47b72 = []byte{
- // 459 bytes of a gzipped FileDescriptorProto
+ // 460 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x41, 0x6f, 0xd3, 0x30,
0x14, 0xc6, 0x6d, 0x36, 0x9a, 0xd7, 0x76, 0x2a, 0x3e, 0x55, 0xd5, 0x68, 0xaa, 0x1e, 0x50, 0x11,
0x92, 0x23, 0x15, 0x21, 0x10, 0x88, 0xc3, 0xc2, 0x2a, 0xc4, 0xa4, 0xf4, 0xe0, 0xe4, 0x32, 0x6e,
0x5e, 0xeb, 0x85, 0x68, 0x75, 0x1c, 0xd5, 0xee, 0x44, 0x6f, 0xfc, 0x3c, 0x8e, 0xfc, 0x82, 0x0a,
0xf5, 0xd8, 0xff, 0x80, 0x84, 0x62, 0xa7, 0x5b, 0x27, 0xc2, 0x61, 0x97, 0x67, 0x3f, 0xeb, 0x7d,
0xdf, 0x7b, 0xef, 0xfb, 0x0c, 0x6d, 0xc1, 0xf5, 0x32, 0x9d, 0x29, 0x92, 0x2f, 0xa5, 0x96, 0x18,
- 0x5f, 0xbf, 0x21, 0x59, 0x92, 0x66, 0xdf, 0x09, 0x4b, 0x78, 0xa6, 0x89, 0x9a, 0xdf, 0xf4, 0xbc,
- 0x44, 0xca, 0x64, 0xc1, 0x7d, 0x53, 0x71, 0xb5, 0xba, 0xf6, 0x75, 0x2a, 0xb8, 0xd2, 0x4c, 0xe4,
- 0x16, 0xd4, 0x6b, 0xcd, 0xa4, 0x10, 0x32, 0x2b, 0x33, 0x48, 0x64, 0x22, 0xed, 0x7d, 0xf8, 0x07,
- 0x41, 0x3b, 0xb4, 0x0d, 0x28, 0xcf, 0xe5, 0x52, 0xe3, 0xf7, 0xe0, 0x08, 0xae, 0x59, 0x17, 0x0d,
- 0xd0, 0xa8, 0x39, 0x3e, 0x25, 0xff, 0xf6, 0x23, 0x21, 0xd7, 0x6c, 0xce, 0x34, 0x0b, 0x1a, 0xbb,
- 0x8d, 0x67, 0xaa, 0xa9, 0x89, 0xf8, 0x1c, 0x1c, 0xbd, 0xce, 0x79, 0xb7, 0x36, 0x40, 0xa3, 0x93,
- 0xf1, 0x8b, 0xff, 0x60, 0xef, 0x9b, 0x91, 0x78, 0x9d, 0x73, 0xcb, 0x52, 0xe0, 0xa8, 0x89, 0xf8,
- 0x23, 0x38, 0x05, 0x7b, 0xb7, 0x3e, 0xa8, 0x8f, 0x9a, 0x63, 0xaf, 0x8a, 0x25, 0xd2, 0x4c, 0xab,
- 0x49, 0xa6, 0x53, 0xbd, 0xb6, 0xf0, 0x02, 0x40, 0x4d, 0x1c, 0xbe, 0x02, 0xa7, 0xa0, 0xc5, 0x00,
- 0xc7, 0xd1, 0x65, 0x14, 0x4f, 0xc2, 0xce, 0x13, 0xdc, 0x82, 0xc6, 0x97, 0x69, 0x14, 0x9f, 0x4d,
- 0x3f, 0x4d, 0x3a, 0x08, 0xbb, 0x70, 0x74, 0xf6, 0x79, 0x32, 0x8d, 0x3b, 0xb5, 0x61, 0x08, 0xad,
- 0x28, 0x15, 0xf9, 0x82, 0xdb, 0xb9, 0xf0, 0x29, 0x38, 0x19, 0x13, 0xdc, 0x6c, 0xef, 0x5a, 0xea,
- 0x22, 0xa7, 0x26, 0x62, 0x0f, 0x8e, 0x6e, 0xd9, 0x62, 0x65, 0x17, 0x44, 0x81, 0xbb, 0xdb, 0x78,
- 0xf6, 0x81, 0xda, 0x63, 0x78, 0x01, 0xee, 0x79, 0x2a, 0x78, 0xa6, 0x52, 0x99, 0x3d, 0x86, 0xcb,
- 0xad, 0xe0, 0xfa, 0x51, 0x83, 0xe6, 0xc1, 0x9e, 0xf8, 0x1d, 0xb8, 0x77, 0xbe, 0x96, 0xee, 0xf4,
- 0x88, 0x75, 0x9e, 0xec, 0x9d, 0x27, 0xf1, 0xbe, 0x82, 0xde, 0x17, 0xe3, 0x10, 0x60, 0xbe, 0x9f,
- 0x4a, 0x95, 0xb2, 0x3e, 0xaf, 0x92, 0xf5, 0x6e, 0xf6, 0xe0, 0x64, 0xb7, 0xf1, 0x0e, 0x40, 0xf4,
- 0xe0, 0x8e, 0x2f, 0xa1, 0xad, 0x8c, 0x66, 0xe5, 0xcf, 0xec, 0x3a, 0x86, 0x71, 0x50, 0x69, 0xd4,
- 0x81, 0xb8, 0xc1, 0xb3, 0xdd, 0xc6, 0x7b, 0x08, 0xa5, 0x0f, 0xd3, 0x0b, 0xa7, 0x51, 0xeb, 0xd4,
- 0xe9, 0xd3, 0x32, 0x0d, 0xde, 0xfe, 0xdc, 0xf6, 0xd1, 0xaf, 0x6d, 0x1f, 0xfd, 0xde, 0xf6, 0xd1,
- 0xd7, 0x97, 0x49, 0xaa, 0xbf, 0xad, 0xae, 0xc8, 0x4c, 0x0a, 0xdf, 0xf4, 0xf1, 0x4d, 0x1f, 0x5f,
- 0xcd, 0x6f, 0xfc, 0xdb, 0xb1, 0xfd, 0xfd, 0x1f, 0xac, 0x12, 0xc7, 0xe6, 0x78, 0xfd, 0x37, 0x00,
- 0x00, 0xff, 0xff, 0xb6, 0xea, 0xd2, 0xe4, 0x3d, 0x03, 0x00, 0x00,
+ 0x5f, 0xbf, 0x21, 0x59, 0x92, 0x66, 0xdf, 0x09, 0x4b, 0x78, 0xa6, 0x89, 0x9a, 0xdf, 0xf4, 0x5a,
+ 0x33, 0x29, 0x84, 0xcc, 0x6c, 0x45, 0x0f, 0x12, 0x99, 0xc8, 0xf2, 0xee, 0x25, 0x52, 0x26, 0x0b,
+ 0xee, 0x9b, 0xec, 0x6a, 0x75, 0xed, 0xeb, 0x54, 0x70, 0xa5, 0x99, 0xc8, 0x6d, 0xc1, 0xf0, 0x0f,
+ 0x82, 0x76, 0x68, 0x1b, 0x50, 0x9e, 0xcb, 0xa5, 0xc6, 0xef, 0xc1, 0x11, 0x5c, 0xb3, 0x2e, 0x1a,
+ 0xa0, 0x51, 0x73, 0x7c, 0x4a, 0xfe, 0xed, 0x47, 0x42, 0xae, 0xd9, 0x9c, 0x69, 0x16, 0x34, 0x76,
+ 0x1b, 0xcf, 0x54, 0x53, 0x13, 0xf1, 0x39, 0x38, 0x7a, 0x9d, 0xf3, 0x6e, 0x6d, 0x80, 0x46, 0x27,
+ 0xe3, 0x17, 0xff, 0xc1, 0xde, 0x37, 0x23, 0xf1, 0x3a, 0xe7, 0x96, 0xa5, 0xc0, 0x51, 0x13, 0xf1,
+ 0x47, 0x70, 0x0a, 0xf6, 0x6e, 0x7d, 0x50, 0x1f, 0x35, 0xc7, 0x5e, 0x15, 0x4b, 0xa4, 0x99, 0x56,
+ 0x93, 0x4c, 0xa7, 0x7a, 0x6d, 0xe1, 0x05, 0x80, 0x9a, 0x38, 0x7c, 0x05, 0x4e, 0x41, 0x8b, 0x01,
+ 0x8e, 0xa3, 0xcb, 0x28, 0x9e, 0x84, 0x9d, 0x27, 0xb8, 0x05, 0x8d, 0x2f, 0xd3, 0x28, 0x3e, 0x9b,
+ 0x7e, 0x9a, 0x74, 0x10, 0x76, 0xe1, 0xe8, 0xec, 0xf3, 0x64, 0x1a, 0x77, 0x6a, 0xc3, 0x10, 0x5a,
+ 0x51, 0x2a, 0xf2, 0x05, 0xb7, 0x73, 0xe1, 0x53, 0x70, 0x32, 0x26, 0xb8, 0xd9, 0xde, 0xb5, 0xd4,
+ 0x45, 0x4e, 0x4d, 0xc4, 0x1e, 0x1c, 0xdd, 0xb2, 0xc5, 0xca, 0x2e, 0x88, 0x02, 0x77, 0xb7, 0xf1,
+ 0xec, 0x03, 0xb5, 0xc7, 0xf0, 0x02, 0xdc, 0xf3, 0x54, 0xf0, 0x4c, 0xa5, 0x32, 0x7b, 0x0c, 0x97,
+ 0x5b, 0xc1, 0xf5, 0xa3, 0x06, 0xcd, 0x83, 0x3d, 0xf1, 0x3b, 0x70, 0xef, 0xdc, 0x2b, 0xdd, 0xe9,
+ 0x11, 0xeb, 0x2f, 0xd9, 0xfb, 0x4b, 0xe2, 0x7d, 0x05, 0xbd, 0x2f, 0xc6, 0x21, 0xc0, 0x7c, 0x3f,
+ 0x95, 0x2a, 0x65, 0x7d, 0x5e, 0x25, 0xeb, 0xdd, 0xec, 0xc1, 0xc9, 0x6e, 0xe3, 0x1d, 0x80, 0xe8,
+ 0xc1, 0x1d, 0x5f, 0x42, 0x5b, 0x19, 0xcd, 0xca, 0x9f, 0xd9, 0x75, 0x0c, 0xe3, 0xa0, 0xd2, 0xa8,
+ 0x03, 0x71, 0x83, 0x67, 0xbb, 0x8d, 0xf7, 0x10, 0x4a, 0x1f, 0xa6, 0x17, 0x4e, 0xa3, 0xd6, 0xa9,
+ 0xd3, 0xa7, 0x65, 0x1a, 0xbc, 0xfd, 0xb9, 0xed, 0xa3, 0x5f, 0xdb, 0x3e, 0xfa, 0xbd, 0xed, 0xa3,
+ 0xaf, 0x2f, 0x93, 0x54, 0x7f, 0x5b, 0x5d, 0x91, 0x99, 0x14, 0xbe, 0xe9, 0xe3, 0x9b, 0x3e, 0xbe,
+ 0x9a, 0xdf, 0xf8, 0xb7, 0x63, 0xfb, 0xc7, 0x3f, 0x58, 0x25, 0x8e, 0xcd, 0xf1, 0xfa, 0x6f, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xe6, 0xcd, 0x1e, 0xb5, 0x3d, 0x03, 0x00, 0x00,
}
func (m *MetricsReport) Marshal() (dAtA []byte, err error) {
diff --git a/sdk/proto/metrics.proto b/sdk/proto/metrics.proto
index 8c3734976..e4cba46fd 100644
--- a/sdk/proto/metrics.proto
+++ b/sdk/proto/metrics.proto
@@ -1,39 +1,56 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-import "google/protobuf/timestamp.proto";
import "common.proto";
import "gogo.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+// Represents a metric report
message MetricsReport {
+ // Metric type enum
enum Type {
+ // System metric type
SYSTEM = 0;
+ // NGINX instance metric type
INSTANCE = 1;
+ // Agent metric type
AGENT = 2;
}
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- Type type = 2 [(gogoproto.jsontag) = "type" ];
- repeated StatsEntity data = 3 [(gogoproto.jsontag) = "data" ];
+ // Provides meta information about the metrics
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // Type of metrics
+ Type type = 2 [(gogoproto.jsontag) = "type"];
+ // List of stats entities
+ repeated StatsEntity data = 3 [(gogoproto.jsontag) = "data"];
}
+// Represents a simple metric
message SimpleMetric {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- double value = 2 [(gogoproto.jsontag) = "value" ];
+ // Metric name
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Metric value
+ double value = 2 [(gogoproto.jsontag) = "value"];
}
-// Dimension defines a dimensional attribute used when classifying and categorizing data
+// Represents a dimension which is a dimensional attribute used when classifying and categorizing data
message Dimension {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- string value = 2 [(gogoproto.jsontag) = "value" ];
+ // Dimension name
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Dimension value
+ string value = 2 [(gogoproto.jsontag) = "value"];
}
-// StatsEntity a timestamped entry for Dimensions and Metrics
+// Represents a stats entity which is a timestamped entry for dimensions and metrics
message StatsEntity {
+ // Timestamp defines the time of stats entity creation
google.protobuf.Timestamp timestamp = 1;
// DEPRECATED
reserved 2;
reserved "metrics";
- repeated Dimension dimensions = 3 [(gogoproto.jsontag) = "dimensions" ];
- repeated SimpleMetric simplemetrics = 4 [(gogoproto.jsontag) = "simplemetrics" ];
+ // List of dimensions
+ repeated Dimension dimensions = 3 [(gogoproto.jsontag) = "dimensions"];
+ // List of metrics
+ repeated SimpleMetric simplemetrics = 4 [(gogoproto.jsontag) = "simplemetrics"];
}
diff --git a/sdk/proto/metrics.svc.pb.go b/sdk/proto/metrics.svc.pb.go
index f86abcd9f..781af9dd3 100644
--- a/sdk/proto/metrics.svc.pb.go
+++ b/sdk/proto/metrics.svc.pb.go
@@ -29,22 +29,22 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() { proto.RegisterFile("metrics.svc.proto", fileDescriptor_ece8a4321458910f) }
var fileDescriptor_ece8a4321458910f = []byte{
- // 229 bytes of a gzipped FileDescriptorProto
+ // 228 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0x4d, 0x2d, 0x29,
0xca, 0x4c, 0x2e, 0xd6, 0x2b, 0x2e, 0x4b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4a,
0x33, 0xd5, 0xcb, 0x4b, 0xcf, 0xcc, 0xab, 0xd0, 0x4b, 0x4c, 0x4f, 0xcd, 0x2b, 0xd1, 0x2b, 0x4e,
- 0xc9, 0x96, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x07, 0xab, 0x48, 0x2a, 0x4d, 0xd3,
- 0x4f, 0xcd, 0x2d, 0x28, 0xa9, 0x84, 0x68, 0x90, 0x12, 0x4a, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6,
- 0x07, 0x53, 0x50, 0x31, 0x5e, 0x98, 0xb9, 0x60, 0xae, 0xd1, 0x5a, 0x46, 0x2e, 0x3e, 0x5f, 0x88,
- 0x48, 0x70, 0x6a, 0x51, 0x59, 0x66, 0x72, 0xaa, 0x90, 0x3b, 0x17, 0x5b, 0x70, 0x49, 0x51, 0x6a,
- 0x62, 0xae, 0x90, 0xa2, 0x1e, 0xa6, 0x8d, 0x7a, 0x50, 0xd5, 0x41, 0xa9, 0x05, 0xf9, 0x45, 0x25,
- 0x52, 0x62, 0x7a, 0x10, 0x07, 0xe8, 0xc1, 0x1c, 0xa0, 0xe7, 0x0a, 0x72, 0x80, 0x12, 0x83, 0x06,
- 0xa3, 0x50, 0x10, 0x17, 0x0f, 0xc4, 0x20, 0x57, 0xb0, 0x33, 0x84, 0xd4, 0xb0, 0x19, 0x07, 0x71,
- 0xa2, 0x1e, 0x58, 0x09, 0x61, 0x33, 0x9d, 0xcc, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e,
- 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x28, 0xcd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc,
- 0x5c, 0x7d, 0xb0, 0xc1, 0xfa, 0x60, 0x83, 0xf5, 0x8b, 0x53, 0xb2, 0xf5, 0xcb, 0x8c, 0x20, 0x81,
- 0x62, 0x0d, 0x31, 0x85, 0x0d, 0x4c, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xc4, 0x8d,
- 0xf5, 0x58, 0x01, 0x00, 0x00,
+ 0xc9, 0x96, 0x12, 0x4a, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x07, 0x53, 0x10, 0x75, 0x52, 0xd2,
+ 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x60, 0x5e, 0x52, 0x69, 0x9a, 0x7e, 0x6a, 0x6e, 0x41,
+ 0x49, 0x25, 0x54, 0x92, 0x17, 0x66, 0x2e, 0x98, 0x6b, 0xb4, 0x96, 0x91, 0x8b, 0xcf, 0x17, 0x22,
+ 0x12, 0x9c, 0x5a, 0x54, 0x96, 0x99, 0x9c, 0x2a, 0xe4, 0xce, 0xc5, 0x16, 0x5c, 0x52, 0x94, 0x9a,
+ 0x98, 0x2b, 0xa4, 0xa8, 0x87, 0x69, 0xa3, 0x1e, 0x54, 0x75, 0x50, 0x6a, 0x41, 0x7e, 0x51, 0x89,
+ 0x94, 0x98, 0x1e, 0xc4, 0x32, 0x3d, 0x98, 0x65, 0x7a, 0xae, 0x20, 0xcb, 0x94, 0x18, 0x34, 0x18,
+ 0x85, 0x82, 0xb8, 0x78, 0x20, 0x06, 0xb9, 0x82, 0xdd, 0x28, 0xa4, 0x86, 0xcd, 0x38, 0x88, 0xfb,
+ 0xf5, 0xc0, 0x4a, 0x08, 0x9b, 0xe9, 0x64, 0x7e, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c,
+ 0x0f, 0x1e, 0xc9, 0x31, 0x46, 0x69, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7,
+ 0xea, 0x83, 0x0d, 0xd6, 0x07, 0x1b, 0xac, 0x5f, 0x9c, 0x92, 0xad, 0x5f, 0x66, 0x04, 0x09, 0x00,
+ 0x6b, 0x88, 0x29, 0x6c, 0x60, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x70, 0x1f, 0xc3, 0xc1,
+ 0x58, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
diff --git a/sdk/proto/metrics.svc.proto b/sdk/proto/metrics.svc.proto
index 81959dda8..ef22b6888 100644
--- a/sdk/proto/metrics.svc.proto
+++ b/sdk/proto/metrics.svc.proto
@@ -1,12 +1,13 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-import "google/protobuf/empty.proto";
import "events/event.proto";
+import "google/protobuf/empty.proto";
import "metrics.proto";
-// MetricsService is responsible for ingesting high volume metrics and events
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents a metrics service which is responsible for ingesting high volume metrics and events
service MetricsService {
// A client-to-server streaming RPC to deliver high volume metrics reports.
rpc Stream(stream MetricsReport) returns (google.protobuf.Empty) {}
diff --git a/sdk/proto/nap.pb.go b/sdk/proto/nap.pb.go
index 15a1f6b33..56526ebd1 100644
--- a/sdk/proto/nap.pb.go
+++ b/sdk/proto/nap.pb.go
@@ -23,11 +23,15 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Status enum
type AppProtectWAFHealth_AppProtectWAFStatus int32
const (
- AppProtectWAFHealth_UNKNOWN AppProtectWAFHealth_AppProtectWAFStatus = 0
- AppProtectWAFHealth_ACTIVE AppProtectWAFHealth_AppProtectWAFStatus = 1
+ // Unknown status
+ AppProtectWAFHealth_UNKNOWN AppProtectWAFHealth_AppProtectWAFStatus = 0
+ // Active status
+ AppProtectWAFHealth_ACTIVE AppProtectWAFHealth_AppProtectWAFStatus = 1
+ // Degraded status
AppProtectWAFHealth_DEGRADED AppProtectWAFHealth_AppProtectWAFStatus = 2
)
@@ -51,15 +55,19 @@ func (AppProtectWAFHealth_AppProtectWAFStatus) EnumDescriptor() ([]byte, []int)
return fileDescriptor_f34234efeae954d9, []int{1, 0}
}
-// AppProtectWAFDetails reports the details of Nginx App Protect
+// Represents App Protect WAF details
type AppProtectWAFDetails struct {
- WafVersion string `protobuf:"bytes,1,opt,name=waf_version,json=wafVersion,proto3" json:"waf_version"`
- AttackSignaturesVersion string `protobuf:"bytes,2,opt,name=attack_signatures_version,json=attackSignaturesVersion,proto3" json:"attack_signatures_version"`
- ThreatCampaignsVersion string `protobuf:"bytes,3,opt,name=threat_campaigns_version,json=threatCampaignsVersion,proto3" json:"threat_campaigns_version"`
- Health *AppProtectWAFHealth `protobuf:"bytes,4,opt,name=health,proto3" json:"health"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // WAF version
+ WafVersion string `protobuf:"bytes,1,opt,name=waf_version,json=wafVersion,proto3" json:"waf_version"`
+ // Attack signatures version (This is being deprecated and will be removed in a future release)
+ AttackSignaturesVersion string `protobuf:"bytes,2,opt,name=attack_signatures_version,json=attackSignaturesVersion,proto3" json:"attack_signatures_version"`
+ // Threat signatures version (This is being deprecated and will be removed in a future release)
+ ThreatCampaignsVersion string `protobuf:"bytes,3,opt,name=threat_campaigns_version,json=threatCampaignsVersion,proto3" json:"threat_campaigns_version"`
+ // App Protect Health details (This is being deprecated and will be removed in a future release)
+ Health *AppProtectWAFHealth `protobuf:"bytes,4,opt,name=health,proto3" json:"health"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *AppProtectWAFDetails) Reset() { *m = AppProtectWAFDetails{} }
@@ -123,14 +131,17 @@ func (m *AppProtectWAFDetails) GetHealth() *AppProtectWAFHealth {
return nil
}
-// AppProtectWAFHealth reports the health details of Nginx App Protect
+// Represents the health of App Protect WAF
type AppProtectWAFHealth struct {
- SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
- AppProtectWafStatus AppProtectWAFHealth_AppProtectWAFStatus `protobuf:"varint,2,opt,name=app_protect_waf_status,json=appProtectWafStatus,proto3,enum=f5.nginx.agent.sdk.AppProtectWAFHealth_AppProtectWAFStatus" json:"app_protect_waf_status"`
- DegradedReason string `protobuf:"bytes,3,opt,name=degraded_reason,json=degradedReason,proto3" json:"degraded_reason"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // System ID
+ SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
+ // App Protect WAF status
+ AppProtectWafStatus AppProtectWAFHealth_AppProtectWAFStatus `protobuf:"varint,2,opt,name=app_protect_waf_status,json=appProtectWafStatus,proto3,enum=f5.nginx.agent.sdk.AppProtectWAFHealth_AppProtectWAFStatus" json:"app_protect_waf_status"`
+ // Provides an error message of why App Protect WAF is degraded
+ DegradedReason string `protobuf:"bytes,3,opt,name=degraded_reason,json=degradedReason,proto3" json:"degraded_reason"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *AppProtectWAFHealth) Reset() { *m = AppProtectWAFHealth{} }
diff --git a/sdk/proto/nap.proto b/sdk/proto/nap.proto
index f91b87f02..ab2348edb 100644
--- a/sdk/proto/nap.proto
+++ b/sdk/proto/nap.proto
@@ -1,25 +1,37 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
import "gogo.proto";
-// AppProtectWAFDetails reports the details of Nginx App Protect
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents App Protect WAF details
message AppProtectWAFDetails {
- string waf_version = 1 [(gogoproto.jsontag) = "waf_version"];
- string attack_signatures_version = 2 [(gogoproto.jsontag) = "attack_signatures_version"]; // deprecating
- string threat_campaigns_version = 3 [(gogoproto.jsontag) = "threat_campaigns_version"]; // deprecating
- AppProtectWAFHealth health = 4 [(gogoproto.jsontag) = "health"]; // deprecating
+ // WAF version
+ string waf_version = 1 [(gogoproto.jsontag) = "waf_version"];
+ // Attack signatures version (This is being deprecated and will be removed in a future release)
+ string attack_signatures_version = 2 [(gogoproto.jsontag) = "attack_signatures_version"];
+ // Threat signatures version (This is being deprecated and will be removed in a future release)
+ string threat_campaigns_version = 3 [(gogoproto.jsontag) = "threat_campaigns_version"];
+ // App Protect Health details (This is being deprecated and will be removed in a future release)
+ AppProtectWAFHealth health = 4 [(gogoproto.jsontag) = "health"];
}
-// AppProtectWAFHealth reports the health details of Nginx App Protect
+// Represents the health of App Protect WAF
message AppProtectWAFHealth {
- enum AppProtectWAFStatus {
- UNKNOWN = 0;
- ACTIVE = 1;
- DEGRADED = 2;
- }
- string system_id = 1 [(gogoproto.jsontag) = "system_id"];
- AppProtectWAFStatus app_protect_waf_status = 2 [(gogoproto.jsontag) = "app_protect_waf_status"];
- string degraded_reason = 3 [(gogoproto.jsontag) = "degraded_reason"];
+ // Status enum
+ enum AppProtectWAFStatus {
+ // Unknown status
+ UNKNOWN = 0;
+ // Active status
+ ACTIVE = 1;
+ // Degraded status
+ DEGRADED = 2;
+ }
+ // System ID
+ string system_id = 1 [(gogoproto.jsontag) = "system_id"];
+ // App Protect WAF status
+ AppProtectWAFStatus app_protect_waf_status = 2 [(gogoproto.jsontag) = "app_protect_waf_status"];
+ // Provides an error message of why App Protect WAF is degraded
+ string degraded_reason = 3 [(gogoproto.jsontag) = "degraded_reason"];
}
diff --git a/sdk/proto/nginx.pb.go b/sdk/proto/nginx.pb.go
index a8ab6ef23..d3d3ea688 100644
--- a/sdk/proto/nginx.pb.go
+++ b/sdk/proto/nginx.pb.go
@@ -23,15 +23,22 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// NGINX config action enum
type NginxConfigAction int32
const (
- NginxConfigAction_UNKNOWN NginxConfigAction = 0
- NginxConfigAction_APPLY NginxConfigAction = 1
- NginxConfigAction_TEST NginxConfigAction = 2
+ // Unknown action
+ NginxConfigAction_UNKNOWN NginxConfigAction = 0
+ // Apply config action
+ NginxConfigAction_APPLY NginxConfigAction = 1
+ // Test config action (This will be implemented in a future release)
+ NginxConfigAction_TEST NginxConfigAction = 2
+ // Rollback config action (This will be implemented in a future release)
NginxConfigAction_ROLLBACK NginxConfigAction = 3
- NginxConfigAction_RETURN NginxConfigAction = 4
- NginxConfigAction_FORCE NginxConfigAction = 5
+ // Return config action (This will be implemented in a future release)
+ NginxConfigAction_RETURN NginxConfigAction = 4
+ // Force config apply action
+ NginxConfigAction_FORCE NginxConfigAction = 5
)
var NginxConfigAction_name = map[int32]string{
@@ -64,8 +71,10 @@ func (NginxConfigAction) EnumDescriptor() ([]byte, []int) {
type NginxSslMetaData_NginxSslType int32
const (
+ // SSL complied with NGINX
NginxSslMetaData_BUILT NginxSslMetaData_NginxSslType = 0
- NginxSslMetaData_RUN NginxSslMetaData_NginxSslType = 1
+ // SSL not complied with NGINX
+ NginxSslMetaData_RUN NginxSslMetaData_NginxSslType = 1
)
var NginxSslMetaData_NginxSslType_name = map[int32]string{
@@ -83,14 +92,18 @@ func (x NginxSslMetaData_NginxSslType) String() string {
}
func (NginxSslMetaData_NginxSslType) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{5, 0}
+ return fileDescriptor_917f1a70b1fd7255, []int{2, 0}
}
+// NGINX status enum
type NginxHealth_NginxStatus int32
const (
- NginxHealth_UNKNOWN NginxHealth_NginxStatus = 0
- NginxHealth_ACTIVE NginxHealth_NginxStatus = 1
+ // Unknown status
+ NginxHealth_UNKNOWN NginxHealth_NginxStatus = 0
+ // Active status
+ NginxHealth_ACTIVE NginxHealth_NginxStatus = 1
+ // Degraded status
NginxHealth_DEGRADED NginxHealth_NginxStatus = 2
)
@@ -111,213 +124,48 @@ func (x NginxHealth_NginxStatus) String() string {
}
func (NginxHealth_NginxStatus) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{6, 0}
-}
-
-type PlusInfo struct {
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
- Release string `protobuf:"bytes,2,opt,name=release,proto3" json:"release"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PlusInfo) Reset() { *m = PlusInfo{} }
-func (m *PlusInfo) String() string { return proto.CompactTextString(m) }
-func (*PlusInfo) ProtoMessage() {}
-func (*PlusInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{0}
-}
-func (m *PlusInfo) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *PlusInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_PlusInfo.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *PlusInfo) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PlusInfo.Merge(m, src)
-}
-func (m *PlusInfo) XXX_Size() int {
- return m.Size()
-}
-func (m *PlusInfo) XXX_DiscardUnknown() {
- xxx_messageInfo_PlusInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PlusInfo proto.InternalMessageInfo
-
-func (m *PlusInfo) GetEnabled() bool {
- if m != nil {
- return m.Enabled
- }
- return false
-}
-
-func (m *PlusInfo) GetRelease() string {
- if m != nil {
- return m.Release
- }
- return ""
-}
-
-type SSLInfo struct {
- Built []string `protobuf:"bytes,1,rep,name=built,proto3" json:"built"`
- Run []string `protobuf:"bytes,2,rep,name=run,proto3" json:"run"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *SSLInfo) Reset() { *m = SSLInfo{} }
-func (m *SSLInfo) String() string { return proto.CompactTextString(m) }
-func (*SSLInfo) ProtoMessage() {}
-func (*SSLInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{1}
-}
-func (m *SSLInfo) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *SSLInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_SSLInfo.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *SSLInfo) XXX_Merge(src proto.Message) {
- xxx_messageInfo_SSLInfo.Merge(m, src)
-}
-func (m *SSLInfo) XXX_Size() int {
- return m.Size()
-}
-func (m *SSLInfo) XXX_DiscardUnknown() {
- xxx_messageInfo_SSLInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SSLInfo proto.InternalMessageInfo
-
-func (m *SSLInfo) GetBuilt() []string {
- if m != nil {
- return m.Built
- }
- return nil
-}
-
-func (m *SSLInfo) GetRun() []string {
- if m != nil {
- return m.Run
- }
- return nil
-}
-
-type PathInfo struct {
- Bin string `protobuf:"bytes,1,opt,name=bin,proto3" json:"bin"`
- Conf string `protobuf:"bytes,2,opt,name=conf,proto3" json:"conf"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PathInfo) Reset() { *m = PathInfo{} }
-func (m *PathInfo) String() string { return proto.CompactTextString(m) }
-func (*PathInfo) ProtoMessage() {}
-func (*PathInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{2}
-}
-func (m *PathInfo) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *PathInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_PathInfo.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *PathInfo) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PathInfo.Merge(m, src)
-}
-func (m *PathInfo) XXX_Size() int {
- return m.Size()
-}
-func (m *PathInfo) XXX_DiscardUnknown() {
- xxx_messageInfo_PathInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PathInfo proto.InternalMessageInfo
-
-func (m *PathInfo) GetBin() string {
- if m != nil {
- return m.Bin
- }
- return ""
-}
-
-func (m *PathInfo) GetConf() string {
- if m != nil {
- return m.Conf
- }
- return ""
+ return fileDescriptor_917f1a70b1fd7255, []int{3, 0}
}
// swagger:model NginxDetails
-// Each NGINXDetails is associated with with a single NGINX instance.
+// Represents NGINX details about a single NGINX instance
type NginxDetails struct {
- // NGINX ID
- // example: b636d4376dea15405589692d3c5d3869ff3a9b26b0e7bb4bb1aa7e658ace1437
+ // NGINX ID.
+ // Example: b636d4376dea15405589692d3c5d3869ff3a9b26b0e7bb4bb1aa7e658ace1437
NginxId string `protobuf:"bytes,1,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
- // Version of NGINX
- // example: 1.23.2
+ // NGINX version.
+ // Example: 1.23.2
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version"`
- // Path to configuration file
- // example: /usr/local/nginx/conf/nginx.conf
+ // Path to NGINX configuration.
+ // Example: /usr/local/nginx/conf/nginx.conf
ConfPath string `protobuf:"bytes,3,opt,name=conf_path,json=confPath,proto3" json:"conf_path"`
- // Process ID
- // example: 8
+ // Process ID of NGINX instance.
+ // Example: 8
ProcessId string `protobuf:"bytes,4,opt,name=process_id,json=processId,proto3" json:"process_id"`
- // Process Path
- // example: /usr/local/nginx/sbin/nginx
+ // The path to the NGINX executable.
+ // Example: /usr/local/nginx/sbin/nginx
ProcessPath string `protobuf:"bytes,5,opt,name=process_path,json=processPath,proto3" json:"process_path"`
- // Start Time
- // example: 1670429190000
+ // The start time of the NGINX instance.
+ // Example: 1670429190000
StartTime int64 `protobuf:"varint,6,opt,name=start_time,json=startTime,proto3" json:"start_time"`
- // Was NGINX built from source
- // example: false
+ // Determines if the NGINX instance was built from the source code in github or not.
+ // Example: false
BuiltFromSource bool `protobuf:"varint,7,opt,name=built_from_source,json=builtFromSource,proto3" json:"built_from_source"`
- // List of loadable modules
- // example: []
+ // List of NGINX loadable modules.
+ // Example: []
LoadableModules []string `protobuf:"bytes,8,rep,name=loadable_modules,json=loadableModules,proto3" json:"loadable_modules"`
- // List of runtime modules
- // example: [ "http_stub_status_module" ]
+ // List of NGINX runtime modules.
+ // Example: [ "http_stub_status_module" ]
RuntimeModules []string `protobuf:"bytes,9,rep,name=runtime_modules,json=runtimeModules,proto3" json:"runtime_modules"`
- // NGINX plus metadata
+ // NGINX Plus metadata.
Plus *NginxPlusMetaData `protobuf:"bytes,10,opt,name=plus,proto3" json:"plus"`
- // SSL metadata
+ // NGINX SSL metadata.
Ssl *NginxSslMetaData `protobuf:"bytes,11,opt,name=ssl,proto3" json:"ssl"`
- // Status URL
- // example: http://localhost:8080/api
+ // Status URL.
+ // Example: http://localhost:8080/api
StatusUrl string `protobuf:"bytes,12,opt,name=status_url,json=statusUrl,proto3" json:"status_url"`
- // Configuration arguments
- // example: [ "", "with-http_stub_status_module" ]
+ // Command line arguments that were used when the NGINX instance was started.
+ // Example: [ "", "with-http_stub_status_module" ]
ConfigureArgs []string `protobuf:"bytes,13,rep,name=configure_args,json=configureArgs,proto3" json:"configure_args"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -328,7 +176,7 @@ func (m *NginxDetails) Reset() { *m = NginxDetails{} }
func (m *NginxDetails) String() string { return proto.CompactTextString(m) }
func (*NginxDetails) ProtoMessage() {}
func (*NginxDetails) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{3}
+ return fileDescriptor_917f1a70b1fd7255, []int{0}
}
func (m *NginxDetails) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -449,12 +297,13 @@ func (m *NginxDetails) GetConfigureArgs() []string {
}
// swagger:model NginxPlusMetaData
+// Represents NGINX Plus metadata
type NginxPlusMetaData struct {
- // Is NGINX instance a plus instance
- // example: true
+ // Determines if its a plus instance or not.
+ // Example: true
Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
- // NGINX plus release
- // example: R27
+ // NGINX Plus version.
+ // Example: R27
Release string `protobuf:"bytes,2,opt,name=release,proto3" json:"release"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -465,7 +314,7 @@ func (m *NginxPlusMetaData) Reset() { *m = NginxPlusMetaData{} }
func (m *NginxPlusMetaData) String() string { return proto.CompactTextString(m) }
func (*NginxPlusMetaData) ProtoMessage() {}
func (*NginxPlusMetaData) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{4}
+ return fileDescriptor_917f1a70b1fd7255, []int{1}
}
func (m *NginxPlusMetaData) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -509,12 +358,13 @@ func (m *NginxPlusMetaData) GetRelease() string {
}
// swagger:model NginxSslMetaData
+// Represents NGINX SSL metadata
type NginxSslMetaData struct {
- // SSL type
- // example: 0
+ // SSL Type.
+ // Example: 0
SslType NginxSslMetaData_NginxSslType `protobuf:"varint,1,opt,name=ssl_type,json=sslType,proto3,enum=f5.nginx.agent.sdk.NginxSslMetaData_NginxSslType" json:"ssl_type"`
- // SSL details
- // example: null
+ // List of SSL information (e.g. version, type, etc).
+ // Example: null
Details []string `protobuf:"bytes,2,rep,name=details,proto3" json:"details"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -525,7 +375,7 @@ func (m *NginxSslMetaData) Reset() { *m = NginxSslMetaData{} }
func (m *NginxSslMetaData) String() string { return proto.CompactTextString(m) }
func (*NginxSslMetaData) ProtoMessage() {}
func (*NginxSslMetaData) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{5}
+ return fileDescriptor_917f1a70b1fd7255, []int{2}
}
func (m *NginxSslMetaData) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -568,20 +418,24 @@ func (m *NginxSslMetaData) GetDetails() []string {
return nil
}
+// Represents the health of a NGINX instance
type NginxHealth struct {
- NginxId string `protobuf:"bytes,1,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
- NginxStatus NginxHealth_NginxStatus `protobuf:"varint,2,opt,name=nginx_status,json=nginxStatus,proto3,enum=f5.nginx.agent.sdk.NginxHealth_NginxStatus" json:"nginx_status"`
- DegradedReason string `protobuf:"bytes,3,opt,name=degraded_reason,json=degradedReason,proto3" json:"degraded_reason"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // NGINX ID
+ NginxId string `protobuf:"bytes,1,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
+ // NGINX status
+ NginxStatus NginxHealth_NginxStatus `protobuf:"varint,2,opt,name=nginx_status,json=nginxStatus,proto3,enum=f5.nginx.agent.sdk.NginxHealth_NginxStatus" json:"nginx_status"`
+ // Provides an error message of why a NGINX instance is degraded
+ DegradedReason string `protobuf:"bytes,3,opt,name=degraded_reason,json=degradedReason,proto3" json:"degraded_reason"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *NginxHealth) Reset() { *m = NginxHealth{} }
func (m *NginxHealth) String() string { return proto.CompactTextString(m) }
func (*NginxHealth) ProtoMessage() {}
func (*NginxHealth) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{6}
+ return fileDescriptor_917f1a70b1fd7255, []int{3}
}
func (m *NginxHealth) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -631,25 +485,34 @@ func (m *NginxHealth) GetDegradedReason() string {
return ""
}
+// Represents a NGINX config
type NginxConfig struct {
- Action NginxConfigAction `protobuf:"varint,1,opt,name=action,proto3,enum=f5.nginx.agent.sdk.NginxConfigAction" json:"action"`
- ConfigData *ConfigDescriptor `protobuf:"bytes,2,opt,name=config_data,json=configData,proto3" json:"config_data"`
- Zconfig *ZippedFile `protobuf:"bytes,3,opt,name=zconfig,proto3" json:"zconfig"`
- Zaux *ZippedFile `protobuf:"bytes,4,opt,name=zaux,proto3" json:"zaux"`
- AccessLogs *AccessLogs `protobuf:"bytes,5,opt,name=access_logs,json=accessLogs,proto3" json:"access_logs"`
- ErrorLogs *ErrorLogs `protobuf:"bytes,6,opt,name=error_logs,json=errorLogs,proto3" json:"error_logs"`
- Ssl *SslCertificates `protobuf:"bytes,7,opt,name=ssl,proto3" json:"ssl"`
- DirectoryMap *DirectoryMap `protobuf:"bytes,8,opt,name=directory_map,json=directoryMap,proto3" json:"directory_map"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // NGINX config action
+ Action NginxConfigAction `protobuf:"varint,1,opt,name=action,proto3,enum=f5.nginx.agent.sdk.NginxConfigAction" json:"action"`
+ // Metadata information about the configuration
+ ConfigData *ConfigDescriptor `protobuf:"bytes,2,opt,name=config_data,json=configData,proto3" json:"config_data"`
+ // Zipped file of all NGINX config files
+ Zconfig *ZippedFile `protobuf:"bytes,3,opt,name=zconfig,proto3" json:"zconfig"`
+ // Zipped file of all auxiliary files
+ Zaux *ZippedFile `protobuf:"bytes,4,opt,name=zaux,proto3" json:"zaux"`
+ // Information about all access log files
+ AccessLogs *AccessLogs `protobuf:"bytes,5,opt,name=access_logs,json=accessLogs,proto3" json:"access_logs"`
+ // Information about all error log files
+ ErrorLogs *ErrorLogs `protobuf:"bytes,6,opt,name=error_logs,json=errorLogs,proto3" json:"error_logs"`
+ // Information about all SSL certificates files
+ Ssl *SslCertificates `protobuf:"bytes,7,opt,name=ssl,proto3" json:"ssl"`
+ // Directory map of all config and aux files
+ DirectoryMap *DirectoryMap `protobuf:"bytes,8,opt,name=directory_map,json=directoryMap,proto3" json:"directory_map"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *NginxConfig) Reset() { *m = NginxConfig{} }
func (m *NginxConfig) String() string { return proto.CompactTextString(m) }
func (*NginxConfig) ProtoMessage() {}
func (*NginxConfig) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{7}
+ return fileDescriptor_917f1a70b1fd7255, []int{4}
}
func (m *NginxConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -734,7 +597,9 @@ func (m *NginxConfig) GetDirectoryMap() *DirectoryMap {
return nil
}
+// Represents access log files
type AccessLogs struct {
+ // List of access log files
AccessLog []*AccessLog `protobuf:"bytes,1,rep,name=access_log,json=accessLog,proto3" json:"access_log"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -745,7 +610,7 @@ func (m *AccessLogs) Reset() { *m = AccessLogs{} }
func (m *AccessLogs) String() string { return proto.CompactTextString(m) }
func (*AccessLogs) ProtoMessage() {}
func (*AccessLogs) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{8}
+ return fileDescriptor_917f1a70b1fd7255, []int{5}
}
func (m *AccessLogs) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -781,10 +646,15 @@ func (m *AccessLogs) GetAccessLog() []*AccessLog {
return nil
}
+// Represents an access log file
type AccessLog struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
- Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format"`
- Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions"`
+ // Name of file
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Format of the file
+ Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format"`
+ // File Permissions
+ Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions"`
+ // Determines if the file is readable or not
Readable bool `protobuf:"varint,4,opt,name=readable,proto3" json:"readable"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -795,7 +665,7 @@ func (m *AccessLog) Reset() { *m = AccessLog{} }
func (m *AccessLog) String() string { return proto.CompactTextString(m) }
func (*AccessLog) ProtoMessage() {}
func (*AccessLog) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{9}
+ return fileDescriptor_917f1a70b1fd7255, []int{6}
}
func (m *AccessLog) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -852,7 +722,9 @@ func (m *AccessLog) GetReadable() bool {
return false
}
+// Represents error log files
type ErrorLogs struct {
+ // List of error log files
ErrorLog []*ErrorLog `protobuf:"bytes,1,rep,name=error_log,json=errorLog,proto3" json:"error_log"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -863,7 +735,7 @@ func (m *ErrorLogs) Reset() { *m = ErrorLogs{} }
func (m *ErrorLogs) String() string { return proto.CompactTextString(m) }
func (*ErrorLogs) ProtoMessage() {}
func (*ErrorLogs) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{10}
+ return fileDescriptor_917f1a70b1fd7255, []int{7}
}
func (m *ErrorLogs) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -899,10 +771,15 @@ func (m *ErrorLogs) GetErrorLog() []*ErrorLog {
return nil
}
+// Represents an error log file
type ErrorLog struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
- LogLevel string `protobuf:"bytes,2,opt,name=log_level,json=logLevel,proto3" json:"log_level"`
- Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions"`
+ // Name of file
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Log level
+ LogLevel string `protobuf:"bytes,2,opt,name=log_level,json=logLevel,proto3" json:"log_level"`
+ // File Permissions
+ Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions"`
+ // Determines if the file is readable or not
Readable bool `protobuf:"varint,4,opt,name=readable,proto3" json:"readable"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -913,7 +790,7 @@ func (m *ErrorLog) Reset() { *m = ErrorLog{} }
func (m *ErrorLog) String() string { return proto.CompactTextString(m) }
func (*ErrorLog) ProtoMessage() {}
func (*ErrorLog) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{11}
+ return fileDescriptor_917f1a70b1fd7255, []int{8}
}
func (m *ErrorLog) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -974,9 +851,6 @@ func init() {
proto.RegisterEnum("f5.nginx.agent.sdk.NginxConfigAction", NginxConfigAction_name, NginxConfigAction_value)
proto.RegisterEnum("f5.nginx.agent.sdk.NginxSslMetaData_NginxSslType", NginxSslMetaData_NginxSslType_name, NginxSslMetaData_NginxSslType_value)
proto.RegisterEnum("f5.nginx.agent.sdk.NginxHealth_NginxStatus", NginxHealth_NginxStatus_name, NginxHealth_NginxStatus_value)
- proto.RegisterType((*PlusInfo)(nil), "f5.nginx.agent.sdk.PlusInfo")
- proto.RegisterType((*SSLInfo)(nil), "f5.nginx.agent.sdk.SSLInfo")
- proto.RegisterType((*PathInfo)(nil), "f5.nginx.agent.sdk.PathInfo")
proto.RegisterType((*NginxDetails)(nil), "f5.nginx.agent.sdk.NginxDetails")
proto.RegisterType((*NginxPlusMetaData)(nil), "f5.nginx.agent.sdk.NginxPlusMetaData")
proto.RegisterType((*NginxSslMetaData)(nil), "f5.nginx.agent.sdk.NginxSslMetaData")
@@ -991,215 +865,80 @@ func init() {
func init() { proto.RegisterFile("nginx.proto", fileDescriptor_917f1a70b1fd7255) }
var fileDescriptor_917f1a70b1fd7255 = []byte{
- // 1240 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0xdc, 0xc4,
- 0x17, 0xaf, 0xb3, 0x49, 0xd6, 0x3e, 0xbb, 0x49, 0xb6, 0xf3, 0xff, 0x23, 0x6d, 0xab, 0x12, 0x47,
- 0x86, 0x8a, 0x50, 0x44, 0xa2, 0xa6, 0x20, 0x84, 0xa8, 0xa8, 0xf6, 0xab, 0x34, 0xea, 0x36, 0x8d,
- 0x26, 0x9b, 0x52, 0x72, 0xb3, 0x4c, 0xd6, 0x93, 0x8d, 0x55, 0xaf, 0xbd, 0x9a, 0xb1, 0xab, 0xb6,
- 0xcf, 0xc0, 0x93, 0x70, 0xc7, 0x25, 0x6f, 0xc0, 0x1d, 0x3c, 0x81, 0x85, 0x7a, 0xe9, 0x1b, 0x5e,
- 0x01, 0xcd, 0x99, 0xb1, 0x77, 0xf3, 0x45, 0x7b, 0x01, 0x37, 0xe3, 0x39, 0xbf, 0x39, 0xe7, 0xe7,
- 0x39, 0x9f, 0x36, 0xd4, 0xa2, 0x71, 0x10, 0xbd, 0xda, 0x9a, 0x8a, 0x38, 0x89, 0x09, 0x39, 0xf9,
- 0x72, 0x4b, 0xcb, 0x6c, 0xcc, 0xa3, 0x64, 0x4b, 0xfa, 0x2f, 0x6e, 0xc2, 0x38, 0x1e, 0xc7, 0xfa,
- 0xfc, 0x66, 0x7d, 0x14, 0x47, 0x27, 0xc1, 0x78, 0x26, 0x4d, 0x26, 0x71, 0xa4, 0x25, 0xef, 0x39,
- 0xd8, 0xfb, 0x61, 0x2a, 0x77, 0xa3, 0x93, 0x98, 0xdc, 0x86, 0x2a, 0x8f, 0xd8, 0x71, 0xc8, 0xfd,
- 0xa6, 0xb5, 0x61, 0x6d, 0xda, 0xed, 0x5a, 0x9e, 0xb9, 0x05, 0x44, 0x8b, 0x8d, 0x52, 0x13, 0x3c,
- 0xe4, 0x4c, 0xf2, 0xe6, 0xc2, 0x86, 0xb5, 0xe9, 0x68, 0x35, 0x03, 0xd1, 0x62, 0xe3, 0xf5, 0xa0,
- 0x7a, 0x70, 0xd0, 0x47, 0x62, 0x17, 0x96, 0x8e, 0xd3, 0x20, 0x4c, 0x9a, 0xd6, 0x46, 0x65, 0xd3,
- 0x69, 0x3b, 0x79, 0xe6, 0x6a, 0x80, 0xea, 0x07, 0xb9, 0x01, 0x15, 0x91, 0x46, 0xcd, 0x05, 0x3c,
- 0xae, 0xe6, 0x99, 0xab, 0x44, 0xaa, 0x16, 0xaf, 0x03, 0xf6, 0x3e, 0x4b, 0x4e, 0x91, 0xe7, 0x06,
- 0x54, 0x8e, 0x83, 0x08, 0x2f, 0x67, 0xd4, 0x8e, 0x83, 0x88, 0xaa, 0x85, 0xdc, 0x82, 0x45, 0xe5,
- 0xa5, 0xb9, 0x91, 0x9d, 0x67, 0x2e, 0xca, 0x14, 0x57, 0xef, 0xf7, 0x25, 0xa8, 0xef, 0xa9, 0x08,
- 0x75, 0x79, 0xc2, 0x82, 0x50, 0x92, 0x4f, 0xc0, 0xc6, 0x88, 0x0d, 0x03, 0xdf, 0xd0, 0xd5, 0xf3,
- 0xcc, 0x2d, 0x31, 0x5a, 0xc5, 0xdd, 0x2e, 0x3a, 0xfb, 0x92, 0x0b, 0x19, 0xc4, 0xd1, 0xbc, 0xb3,
- 0x06, 0xa2, 0xc5, 0x86, 0xdc, 0x01, 0x47, 0xbd, 0x68, 0x38, 0x65, 0xc9, 0x69, 0xb3, 0x82, 0x8a,
- 0x2b, 0x79, 0xe6, 0xce, 0x40, 0x6a, 0xab, 0xad, 0xf2, 0x84, 0x7c, 0x0e, 0x30, 0x15, 0xf1, 0x88,
- 0x4b, 0xa9, 0xde, 0xbe, 0x88, 0xca, 0xab, 0x79, 0xe6, 0xce, 0xa1, 0xd4, 0x31, 0xfb, 0x5d, 0x9f,
- 0xdc, 0x83, 0x7a, 0x71, 0x80, 0xec, 0x4b, 0x68, 0xd0, 0xc8, 0x33, 0xf7, 0x0c, 0x4e, 0x6b, 0x46,
- 0x2a, 0xde, 0x21, 0x13, 0x26, 0x92, 0x61, 0x12, 0x4c, 0x78, 0x73, 0x79, 0xc3, 0xda, 0xac, 0xe8,
- 0x77, 0xcc, 0x50, 0xea, 0xe0, 0x7e, 0x10, 0x4c, 0x38, 0x69, 0xc1, 0x75, 0x4c, 0xc4, 0xf0, 0x44,
- 0xc4, 0x93, 0xa1, 0x8c, 0x53, 0x31, 0xe2, 0xcd, 0x2a, 0xd6, 0xc0, 0x07, 0x79, 0xe6, 0x5e, 0x3c,
- 0xa4, 0x6b, 0x08, 0x3d, 0x14, 0xf1, 0xe4, 0x00, 0x01, 0xf2, 0x00, 0x1a, 0x61, 0xcc, 0x7c, 0x55,
- 0x22, 0xc3, 0x49, 0xec, 0xa7, 0x21, 0x97, 0x4d, 0x1b, 0xf3, 0xf9, 0xff, 0x3c, 0x73, 0x2f, 0x9c,
- 0xd1, 0xb5, 0x02, 0x79, 0xa2, 0x01, 0x72, 0x1f, 0xd6, 0x44, 0x1a, 0xa9, 0x9b, 0x95, 0xf6, 0x0e,
- 0xda, 0xff, 0x2f, 0xcf, 0xdc, 0xf3, 0x47, 0x74, 0xd5, 0x00, 0x85, 0x75, 0x07, 0x16, 0xa7, 0x61,
- 0x2a, 0x9b, 0xb0, 0x61, 0x6d, 0xd6, 0x76, 0x6e, 0x6f, 0x5d, 0x6c, 0x89, 0x2d, 0x2c, 0x00, 0x55,
- 0xec, 0x4f, 0x78, 0xc2, 0xba, 0x2c, 0x61, 0xba, 0x4c, 0x94, 0x19, 0xc5, 0x95, 0x3c, 0x80, 0x8a,
- 0x94, 0x61, 0xb3, 0x86, 0x1c, 0x1f, 0x5f, 0xc9, 0x71, 0x20, 0xc3, 0x92, 0x02, 0xab, 0x50, 0xca,
- 0x90, 0xaa, 0xc5, 0x84, 0x3d, 0x49, 0xe5, 0x30, 0x15, 0x61, 0xb3, 0x3e, 0x4b, 0xed, 0x0c, 0xc5,
- 0xb0, 0x27, 0xa9, 0x3c, 0x14, 0x21, 0xf9, 0x1a, 0x56, 0x75, 0x6b, 0xa6, 0x82, 0x0f, 0x99, 0x18,
- 0xcb, 0xe6, 0x0a, 0x7a, 0x4c, 0xf2, 0xcc, 0x3d, 0x77, 0x42, 0x57, 0x4a, 0xb9, 0x25, 0xc6, 0xd2,
- 0x63, 0x70, 0xfd, 0x82, 0x3f, 0xff, 0x72, 0x03, 0xff, 0x6a, 0x41, 0xe3, 0xbc, 0xbf, 0xe4, 0x08,
- 0x6c, 0x29, 0xc3, 0x61, 0xf2, 0x7a, 0xca, 0xf1, 0x1d, 0xab, 0x3b, 0x77, 0xdf, 0x27, 0x4e, 0x25,
- 0x30, 0x78, 0x3d, 0xe5, 0xba, 0xd7, 0x0a, 0x1a, 0x5a, 0x95, 0x1a, 0x56, 0xf7, 0xf2, 0x75, 0x7f,
- 0x9a, 0x49, 0x80, 0xf7, 0x32, 0x10, 0x2d, 0x36, 0x9e, 0x67, 0x7a, 0xd9, 0xb0, 0x11, 0x07, 0x96,
- 0xda, 0x87, 0xbb, 0xfd, 0x41, 0xe3, 0x1a, 0xa9, 0x42, 0x85, 0x1e, 0xee, 0x35, 0x2c, 0xef, 0xa7,
- 0x05, 0xa8, 0xa1, 0xd2, 0x23, 0xce, 0xc2, 0xe4, 0xf4, 0xfd, 0xfb, 0xfd, 0x47, 0xa8, 0x6b, 0x50,
- 0x67, 0x09, 0x03, 0xb4, 0xba, 0xf3, 0xd9, 0x95, 0x3e, 0x6a, 0x7e, 0xe3, 0x1e, 0x9a, 0xe8, 0xd6,
- 0x9c, 0x27, 0xa1, 0x7a, 0x5a, 0xeb, 0x63, 0x55, 0xe7, 0x3e, 0x1f, 0x0b, 0xe6, 0x73, 0x7f, 0x28,
- 0x38, 0x93, 0x71, 0x64, 0x06, 0x06, 0xd6, 0xf9, 0xb9, 0x23, 0xba, 0x5a, 0x00, 0x14, 0x65, 0xef,
- 0x0b, 0xe3, 0x97, 0x21, 0xab, 0x41, 0xf5, 0x70, 0xef, 0xf1, 0xde, 0xd3, 0xef, 0xf7, 0x1a, 0xd7,
- 0x08, 0xc0, 0x72, 0xab, 0x33, 0xd8, 0x7d, 0xd6, 0x6b, 0x58, 0xa4, 0x0e, 0x76, 0xb7, 0xf7, 0x1d,
- 0x6d, 0x75, 0x7b, 0xdd, 0xc6, 0x82, 0xf7, 0xd7, 0xa2, 0x31, 0xeb, 0x60, 0x11, 0x91, 0x5d, 0x58,
- 0x66, 0xa3, 0x44, 0x0d, 0x35, 0x9d, 0xc3, 0xab, 0xfb, 0x45, 0x1b, 0xb4, 0x50, 0xb9, 0x0d, 0x79,
- 0xe6, 0x1a, 0x43, 0x6a, 0x9e, 0xe4, 0x19, 0xd4, 0x74, 0x65, 0x0e, 0x7d, 0x96, 0x30, 0x8c, 0xd7,
- 0x15, 0xbd, 0xa3, 0xa9, 0xba, 0x5c, 0x8e, 0x44, 0x30, 0x4d, 0x62, 0xd1, 0x5e, 0xcb, 0x33, 0x77,
- 0xde, 0x98, 0x82, 0x16, 0xb0, 0xd0, 0x7a, 0x50, 0x7d, 0xa3, 0x45, 0x0c, 0x4f, 0x6d, 0x67, 0xfd,
- 0x32, 0xce, 0xa3, 0x60, 0x3a, 0xe5, 0xfe, 0xc3, 0x20, 0xe4, 0xba, 0x58, 0x8c, 0x09, 0x2d, 0x36,
- 0xe4, 0x3e, 0x2c, 0xbe, 0x61, 0xe9, 0x2b, 0x1c, 0xb3, 0xef, 0xe6, 0xc0, 0x81, 0xa0, 0xf4, 0x29,
- 0xae, 0x64, 0x1f, 0x6a, 0x6c, 0x84, 0x23, 0x36, 0x8c, 0xc7, 0x12, 0x47, 0xef, 0x15, 0x24, 0x2d,
- 0x54, 0xeb, 0xc7, 0x63, 0xa9, 0xdd, 0x9a, 0x33, 0xa3, 0xc0, 0xca, 0x43, 0xd2, 0x07, 0xe0, 0x42,
- 0xc4, 0x42, 0x13, 0x2e, 0x23, 0xe1, 0x87, 0x97, 0x11, 0xf6, 0x94, 0x16, 0xf2, 0xe1, 0x00, 0x99,
- 0x19, 0x51, 0x87, 0x17, 0x47, 0xe4, 0x5b, 0x3d, 0xb0, 0xaa, 0x48, 0xf3, 0xd1, 0x65, 0x34, 0x07,
- 0x32, 0xec, 0x70, 0x91, 0x04, 0x27, 0xc1, 0x88, 0x25, 0x5c, 0x9e, 0x9b, 0x57, 0xcf, 0x61, 0xc5,
- 0x0f, 0x04, 0x1f, 0x25, 0xb1, 0x78, 0x3d, 0x9c, 0xb0, 0x69, 0xd3, 0x46, 0xa6, 0x8d, 0xcb, 0x98,
- 0xba, 0x85, 0xe2, 0x13, 0x36, 0x6d, 0x5f, 0xcf, 0x33, 0xf7, 0xac, 0x29, 0xad, 0xfb, 0x73, 0x0a,
- 0xde, 0x11, 0x40, 0xeb, 0x8c, 0xd7, 0xb3, 0x80, 0xe0, 0x5f, 0xc0, 0x15, 0x5e, 0x97, 0x36, 0xda,
- 0xeb, 0x99, 0x11, 0x75, 0xca, 0x20, 0x7a, 0x3f, 0x5b, 0xe0, 0x94, 0x8a, 0xea, 0xcb, 0x1f, 0xb1,
- 0x09, 0x37, 0x6d, 0x8d, 0x19, 0x54, 0x32, 0xc5, 0x95, 0x78, 0xb0, 0x7c, 0x12, 0x8b, 0x09, 0x4b,
- 0xcc, 0xa8, 0xc3, 0x12, 0xd6, 0x08, 0x35, 0x4f, 0x72, 0x17, 0x6a, 0x53, 0x2e, 0x26, 0x81, 0x54,
- 0x9f, 0x72, 0x69, 0xba, 0x11, 0xb3, 0x38, 0x07, 0xd3, 0x79, 0x81, 0x6c, 0x82, 0x2d, 0xb8, 0xfe,
- 0x7e, 0x61, 0x69, 0xd9, 0x7a, 0x9e, 0x14, 0x18, 0x2d, 0x77, 0xde, 0x21, 0x38, 0x65, 0x2a, 0xc9,
- 0x23, 0x70, 0xca, 0x44, 0x9a, 0x30, 0xdc, 0xfa, 0xa7, 0xe4, 0xeb, 0x9f, 0x88, 0xd2, 0x84, 0xda,
- 0x45, 0xea, 0xbd, 0x5f, 0x2c, 0xb0, 0x0b, 0xad, 0x77, 0x84, 0xe0, 0x0e, 0x38, 0x61, 0x3c, 0x1e,
- 0x86, 0xfc, 0x25, 0x0f, 0x4d, 0x14, 0x90, 0xb6, 0x04, 0xa9, 0x1d, 0xc6, 0xe3, 0xbe, 0xda, 0xfd,
- 0xa7, 0xa1, 0xb8, 0x73, 0x64, 0xbe, 0x59, 0xf3, 0x33, 0xe5, 0xec, 0x04, 0x73, 0x60, 0xa9, 0xb5,
- 0xbf, 0xdf, 0xff, 0xa1, 0x61, 0x11, 0x1b, 0x16, 0x07, 0xbd, 0x83, 0x41, 0x63, 0x41, 0x8d, 0x32,
- 0xfa, 0xb4, 0xdf, 0x6f, 0xb7, 0x3a, 0x8f, 0x1b, 0x15, 0x35, 0xe4, 0x68, 0x6f, 0x70, 0x48, 0xf7,
- 0x1a, 0x8b, 0x4a, 0xfd, 0xe1, 0x53, 0xda, 0xe9, 0x35, 0x96, 0xda, 0x5f, 0xfd, 0xf6, 0x76, 0xdd,
- 0xfa, 0xe3, 0xed, 0xba, 0xf5, 0xe7, 0xdb, 0x75, 0xeb, 0xe8, 0xd3, 0x71, 0x90, 0x9c, 0xa6, 0xc7,
- 0x5b, 0xa3, 0x78, 0xb2, 0x8d, 0xb1, 0xdd, 0xc6, 0xd8, 0x6e, 0x4b, 0xff, 0xc5, 0xf6, 0xcb, 0x9d,
- 0x6d, 0xfc, 0xf5, 0xfd, 0x06, 0xd7, 0xe3, 0x65, 0x7c, 0xdc, 0xfb, 0x3b, 0x00, 0x00, 0xff, 0xff,
- 0xd1, 0x1d, 0x3e, 0xf9, 0x52, 0x0b, 0x00, 0x00,
-}
-
-func (m *PlusInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PlusInfo) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *PlusInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if len(m.Release) > 0 {
- i -= len(m.Release)
- copy(dAtA[i:], m.Release)
- i = encodeVarintNginx(dAtA, i, uint64(len(m.Release)))
- i--
- dAtA[i] = 0x12
- }
- if m.Enabled {
- i--
- if m.Enabled {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i--
- dAtA[i] = 0x8
- }
- return len(dAtA) - i, nil
-}
-
-func (m *SSLInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SSLInfo) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *SSLInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if len(m.Run) > 0 {
- for iNdEx := len(m.Run) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.Run[iNdEx])
- copy(dAtA[i:], m.Run[iNdEx])
- i = encodeVarintNginx(dAtA, i, uint64(len(m.Run[iNdEx])))
- i--
- dAtA[i] = 0x12
- }
- }
- if len(m.Built) > 0 {
- for iNdEx := len(m.Built) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.Built[iNdEx])
- copy(dAtA[i:], m.Built[iNdEx])
- i = encodeVarintNginx(dAtA, i, uint64(len(m.Built[iNdEx])))
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func (m *PathInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PathInfo) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *PathInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if len(m.Conf) > 0 {
- i -= len(m.Conf)
- copy(dAtA[i:], m.Conf)
- i = encodeVarintNginx(dAtA, i, uint64(len(m.Conf)))
- i--
- dAtA[i] = 0x12
- }
- if len(m.Bin) > 0 {
- i -= len(m.Bin)
- copy(dAtA[i:], m.Bin)
- i = encodeVarintNginx(dAtA, i, uint64(len(m.Bin)))
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
+ // 1166 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xdb, 0x46,
+ 0x10, 0x0e, 0x2d, 0xd9, 0x22, 0x47, 0xb2, 0xcd, 0x6c, 0x5b, 0x80, 0x28, 0x52, 0x53, 0x60, 0x1b,
+ 0xd4, 0x4d, 0x51, 0x1b, 0x71, 0x5a, 0x14, 0x45, 0x83, 0x06, 0x92, 0xa5, 0x34, 0x46, 0x14, 0xc7,
+ 0x58, 0xcb, 0x69, 0xeb, 0x0b, 0xbb, 0x16, 0xd7, 0x34, 0x11, 0x4a, 0x14, 0x76, 0xa9, 0x20, 0xc9,
+ 0x33, 0xf4, 0x49, 0x7a, 0xeb, 0xb1, 0x6f, 0xd0, 0x5b, 0xfb, 0x04, 0x44, 0x91, 0x23, 0x2f, 0x7d,
+ 0x85, 0x82, 0xb3, 0x4b, 0x4a, 0xfe, 0x6b, 0x72, 0xe9, 0x85, 0x9a, 0xf9, 0x76, 0xbe, 0x6f, 0x39,
+ 0xb3, 0xb3, 0x43, 0x41, 0x73, 0x12, 0x46, 0x93, 0x97, 0x5b, 0x53, 0x91, 0xa4, 0x09, 0x21, 0xa7,
+ 0x5f, 0x6d, 0x29, 0x9f, 0x85, 0x7c, 0x92, 0x6e, 0xc9, 0xe0, 0xf9, 0x87, 0xad, 0x51, 0x32, 0x1e,
+ 0x27, 0x13, 0x15, 0x51, 0x78, 0x93, 0xd3, 0x28, 0xd4, 0x1e, 0x84, 0x49, 0x98, 0x28, 0xdb, 0xfb,
+ 0x73, 0x19, 0x5a, 0xfb, 0x05, 0xb7, 0xc7, 0x53, 0x16, 0xc5, 0x92, 0x7c, 0x0a, 0x26, 0x6a, 0xf9,
+ 0x51, 0xe0, 0x18, 0x6d, 0x63, 0xd3, 0xea, 0xb6, 0xf2, 0xcc, 0xad, 0x30, 0xda, 0x40, 0x6b, 0x2f,
+ 0x20, 0xb7, 0xa1, 0xf1, 0x82, 0x0b, 0x19, 0x25, 0x13, 0x67, 0x09, 0xe3, 0x9a, 0x79, 0xe6, 0x96,
+ 0x10, 0x2d, 0x0d, 0x72, 0x07, 0xac, 0x62, 0x73, 0x7f, 0xca, 0xd2, 0x33, 0xa7, 0x86, 0x81, 0xab,
+ 0x79, 0xe6, 0xce, 0x41, 0x6a, 0x16, 0xe6, 0x01, 0x4b, 0xcf, 0xc8, 0x17, 0x00, 0x53, 0x91, 0x8c,
+ 0xb8, 0x94, 0xc5, 0xee, 0x75, 0x0c, 0x5e, 0xcb, 0x33, 0x77, 0x01, 0xa5, 0x96, 0xb6, 0xf7, 0x02,
+ 0x72, 0x0f, 0x5a, 0xe5, 0x02, 0xaa, 0x2f, 0x23, 0xc1, 0xce, 0x33, 0xf7, 0x1c, 0x4e, 0x9b, 0xda,
+ 0x2b, 0xf7, 0x90, 0x29, 0x13, 0xa9, 0x9f, 0x46, 0x63, 0xee, 0xac, 0xb4, 0x8d, 0xcd, 0x9a, 0xda,
+ 0x63, 0x8e, 0x52, 0x0b, 0xed, 0x61, 0x34, 0xe6, 0xa4, 0x03, 0x37, 0x4f, 0x66, 0x51, 0x9c, 0xfa,
+ 0xa7, 0x22, 0x19, 0xfb, 0x32, 0x99, 0x89, 0x11, 0x77, 0x1a, 0x6d, 0x63, 0xd3, 0xec, 0x7e, 0x90,
+ 0x67, 0xee, 0xe5, 0x45, 0xba, 0x8e, 0xd0, 0x43, 0x91, 0x8c, 0x0f, 0x11, 0x20, 0x0f, 0xc0, 0x8e,
+ 0x13, 0x16, 0xb0, 0x93, 0x98, 0xfb, 0xe3, 0x24, 0x98, 0xc5, 0x5c, 0x3a, 0x66, 0xbb, 0xb6, 0x69,
+ 0x75, 0xdf, 0xcf, 0x33, 0xf7, 0xd2, 0x1a, 0x5d, 0x2f, 0x91, 0x27, 0x0a, 0x20, 0xf7, 0x61, 0x5d,
+ 0xcc, 0x26, 0xc5, 0x9b, 0x55, 0x7c, 0x0b, 0xf9, 0xef, 0xe5, 0x99, 0x7b, 0x71, 0x89, 0xae, 0x69,
+ 0xa0, 0x64, 0xef, 0x42, 0x7d, 0x1a, 0xcf, 0xa4, 0x03, 0x6d, 0x63, 0xb3, 0xb9, 0x73, 0x7b, 0xeb,
+ 0x72, 0xb3, 0x6c, 0x61, 0x03, 0x1c, 0xc4, 0x33, 0xf9, 0x84, 0xa7, 0xac, 0xc7, 0x52, 0xd6, 0x35,
+ 0xf3, 0xcc, 0x45, 0x1a, 0xc5, 0x27, 0x79, 0x00, 0x35, 0x29, 0x63, 0xa7, 0x89, 0x1a, 0x9f, 0x5c,
+ 0xab, 0x71, 0x28, 0xe3, 0x4a, 0xa2, 0x91, 0x67, 0x6e, 0x41, 0xa2, 0xc5, 0x43, 0x97, 0x3d, 0x9d,
+ 0x49, 0x7f, 0x26, 0x62, 0xa7, 0x35, 0x3f, 0xda, 0x39, 0x8a, 0x65, 0x4f, 0x67, 0xf2, 0x48, 0xc4,
+ 0xe4, 0x1b, 0x58, 0x53, 0x2d, 0x3b, 0x13, 0xdc, 0x67, 0x22, 0x94, 0xce, 0x2a, 0x66, 0x4c, 0xf2,
+ 0xcc, 0xbd, 0xb0, 0x42, 0x57, 0x2b, 0xbf, 0x23, 0x42, 0xe9, 0x31, 0xb8, 0x79, 0x29, 0x9f, 0xa2,
+ 0x59, 0xf9, 0xa4, 0xa8, 0xa9, 0x6a, 0x6a, 0x53, 0x35, 0xab, 0x86, 0x68, 0x69, 0x14, 0x61, 0x82,
+ 0xc7, 0x9c, 0x49, 0xbe, 0xd8, 0xd3, 0x1a, 0xa2, 0xa5, 0xe1, 0xfd, 0x6e, 0x80, 0x7d, 0x31, 0x5f,
+ 0x72, 0x0c, 0xa6, 0x94, 0xb1, 0x9f, 0xbe, 0x9a, 0x72, 0xdc, 0x63, 0x6d, 0xe7, 0xee, 0xbb, 0xd4,
+ 0xa9, 0x02, 0x86, 0xaf, 0xa6, 0x5c, 0xdd, 0xb5, 0x52, 0x86, 0x36, 0xa4, 0x82, 0x8b, 0xf7, 0x0a,
+ 0xd4, 0xfd, 0x74, 0x96, 0xb0, 0x0e, 0xf8, 0x5e, 0x1a, 0xa2, 0xa5, 0xe1, 0x79, 0xfa, 0x2e, 0x6b,
+ 0x35, 0x62, 0xc1, 0x72, 0xf7, 0x68, 0x6f, 0x30, 0xb4, 0x6f, 0x90, 0x06, 0xd4, 0xe8, 0xd1, 0xbe,
+ 0x6d, 0x78, 0xbf, 0x2c, 0x41, 0x13, 0x83, 0x1e, 0x71, 0x16, 0xa7, 0x67, 0xef, 0x7e, 0xdf, 0x7f,
+ 0x86, 0x96, 0x02, 0xd5, 0x29, 0x61, 0x81, 0xd6, 0x76, 0x3e, 0xbf, 0x36, 0x47, 0xa5, 0xaf, 0xd3,
+ 0x43, 0x8a, 0xba, 0x9a, 0x8b, 0x22, 0x54, 0xcd, 0x31, 0xb5, 0x5c, 0xf4, 0x79, 0xc0, 0x43, 0xc1,
+ 0x02, 0x1e, 0xf8, 0x82, 0x33, 0x99, 0x4c, 0xf4, 0xc0, 0xc0, 0x3e, 0xbf, 0xb0, 0x44, 0xd7, 0x4a,
+ 0x80, 0xa2, 0xef, 0x7d, 0xa9, 0xf3, 0xd2, 0x62, 0x4d, 0x68, 0x1c, 0xed, 0x3f, 0xde, 0x7f, 0xfa,
+ 0xc3, 0xbe, 0x7d, 0x83, 0x00, 0xac, 0x74, 0x76, 0x87, 0x7b, 0xcf, 0xfa, 0xb6, 0x41, 0x5a, 0x60,
+ 0xf6, 0xfa, 0xdf, 0xd3, 0x4e, 0xaf, 0xdf, 0xb3, 0x97, 0xbc, 0x7f, 0xea, 0x9a, 0xb6, 0x8b, 0x4d,
+ 0x44, 0xf6, 0x60, 0x85, 0x8d, 0xd2, 0x62, 0xa8, 0xa9, 0x33, 0xbc, 0xfe, 0xbe, 0x28, 0x42, 0x07,
+ 0x83, 0xbb, 0x90, 0x67, 0xae, 0x26, 0x52, 0xfd, 0x4b, 0x9e, 0x41, 0x53, 0x75, 0xa6, 0x1f, 0xb0,
+ 0x94, 0x61, 0xbd, 0xae, 0xb9, 0x3b, 0x4a, 0xaa, 0xc7, 0xe5, 0x48, 0x44, 0xd3, 0x34, 0x11, 0xdd,
+ 0xf5, 0x3c, 0x73, 0x17, 0xc9, 0x14, 0x94, 0x83, 0x8d, 0xd6, 0x87, 0xc6, 0x6b, 0xe5, 0x62, 0x79,
+ 0x9a, 0x3b, 0x1b, 0x57, 0x69, 0x1e, 0x47, 0xd3, 0x29, 0x0f, 0x1e, 0x46, 0x31, 0x57, 0xcd, 0xa2,
+ 0x29, 0xb4, 0x34, 0xc8, 0x7d, 0xa8, 0xbf, 0x66, 0xb3, 0x97, 0x38, 0x66, 0xdf, 0xae, 0x81, 0x03,
+ 0xa1, 0x88, 0xa7, 0xf8, 0x24, 0x07, 0xd0, 0x64, 0x23, 0x1c, 0xb1, 0x71, 0x12, 0x4a, 0x1c, 0xbd,
+ 0xd7, 0x88, 0x74, 0x30, 0x6c, 0x90, 0x84, 0x52, 0xa5, 0xb5, 0x40, 0xa3, 0xc0, 0xaa, 0x45, 0x32,
+ 0x00, 0xe0, 0x42, 0x24, 0x42, 0x09, 0xae, 0xa0, 0xe0, 0x47, 0x57, 0x09, 0xf6, 0x8b, 0x28, 0xd4,
+ 0xc3, 0x01, 0x32, 0x27, 0x51, 0x8b, 0x97, 0x4b, 0xe4, 0x3b, 0x35, 0xb0, 0x1a, 0x28, 0xf3, 0xf1,
+ 0x55, 0x32, 0x87, 0x32, 0xde, 0xe5, 0x22, 0x8d, 0x4e, 0xa3, 0x11, 0x4b, 0xb9, 0xbc, 0x30, 0xaf,
+ 0x7e, 0x84, 0xd5, 0x20, 0x12, 0x7c, 0x94, 0x26, 0xe2, 0x95, 0x3f, 0x66, 0x53, 0xc7, 0x44, 0xa5,
+ 0xf6, 0x55, 0x4a, 0xbd, 0x32, 0xf0, 0x09, 0x9b, 0x76, 0x6f, 0xe6, 0x99, 0x7b, 0x9e, 0x4a, 0x5b,
+ 0xc1, 0x42, 0x80, 0x77, 0x0c, 0xd0, 0x39, 0x97, 0xf5, 0xbc, 0x20, 0x8e, 0xd1, 0xae, 0x5d, 0x97,
+ 0x75, 0xc5, 0x51, 0x59, 0xcf, 0x49, 0xd4, 0xaa, 0x8a, 0xe8, 0xfd, 0x6a, 0x80, 0x55, 0x05, 0x92,
+ 0x5b, 0x50, 0x9f, 0xb0, 0x31, 0xd7, 0xd7, 0x1a, 0x4f, 0xb0, 0xf0, 0x29, 0x3e, 0x89, 0x07, 0x2b,
+ 0xa7, 0x89, 0x18, 0xb3, 0x54, 0x8f, 0x3a, 0x6c, 0x61, 0x85, 0x50, 0xfd, 0x4b, 0xee, 0x42, 0x73,
+ 0xca, 0xc5, 0x38, 0x92, 0xc5, 0xa7, 0x5c, 0xea, 0xdb, 0x88, 0xa7, 0xb8, 0x00, 0xd3, 0x45, 0x87,
+ 0x6c, 0x82, 0x29, 0xb8, 0xfa, 0x7e, 0x61, 0x6b, 0x99, 0x6a, 0x9e, 0x94, 0x18, 0xad, 0x2c, 0xef,
+ 0x08, 0xac, 0xea, 0x28, 0xc9, 0x23, 0xb0, 0xaa, 0x83, 0xd4, 0x65, 0xb8, 0xf5, 0x5f, 0x87, 0xaf,
+ 0xfe, 0x44, 0x54, 0x14, 0x6a, 0x96, 0x47, 0xef, 0xfd, 0x66, 0x80, 0x59, 0x46, 0xbd, 0xa5, 0x04,
+ 0x77, 0xc0, 0x8a, 0x93, 0xd0, 0x8f, 0xf9, 0x0b, 0x1e, 0xeb, 0x2a, 0xa0, 0x6c, 0x05, 0x52, 0x33,
+ 0x4e, 0xc2, 0x41, 0x61, 0xfd, 0xaf, 0xa5, 0xb8, 0x73, 0xac, 0xbf, 0x59, 0x8b, 0x33, 0xe5, 0xfc,
+ 0x04, 0xb3, 0x60, 0xb9, 0x73, 0x70, 0x30, 0xf8, 0xc9, 0x36, 0x88, 0x09, 0xf5, 0x61, 0xff, 0x70,
+ 0x68, 0x2f, 0x15, 0xa3, 0x8c, 0x3e, 0x1d, 0x0c, 0xba, 0x9d, 0xdd, 0xc7, 0x76, 0xad, 0x18, 0x72,
+ 0xb4, 0x3f, 0x3c, 0xa2, 0xfb, 0x76, 0xbd, 0x08, 0x7f, 0xf8, 0x94, 0xee, 0xf6, 0xed, 0xe5, 0xee,
+ 0xd7, 0x7f, 0xbc, 0xd9, 0x30, 0xfe, 0x7a, 0xb3, 0x61, 0xfc, 0xfd, 0x66, 0xc3, 0x38, 0xfe, 0x2c,
+ 0x8c, 0xd2, 0xb3, 0xd9, 0xc9, 0xd6, 0x28, 0x19, 0x6f, 0x63, 0x6d, 0xb7, 0xb1, 0xb6, 0xdb, 0x32,
+ 0x78, 0xbe, 0xfd, 0x62, 0x67, 0x1b, 0xff, 0x14, 0x7e, 0x8b, 0xcf, 0x93, 0x15, 0xfc, 0xb9, 0xf7,
+ 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x80, 0x5c, 0xfb, 0x6c, 0x0a, 0x00, 0x00,
}
func (m *NginxDetails) Marshal() (dAtA []byte, err error) {
@@ -1793,90 +1532,27 @@ func encodeVarintNginx(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return base
}
-func (m *PlusInfo) Size() (n int) {
+func (m *NginxDetails) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
- if m.Enabled {
- n += 2
+ l = len(m.NginxId)
+ if l > 0 {
+ n += 1 + l + sovNginx(uint64(l))
}
- l = len(m.Release)
+ l = len(m.Version)
if l > 0 {
n += 1 + l + sovNginx(uint64(l))
}
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
+ l = len(m.ConfPath)
+ if l > 0 {
+ n += 1 + l + sovNginx(uint64(l))
}
- return n
-}
-
-func (m *SSLInfo) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Built) > 0 {
- for _, s := range m.Built {
- l = len(s)
- n += 1 + l + sovNginx(uint64(l))
- }
- }
- if len(m.Run) > 0 {
- for _, s := range m.Run {
- l = len(s)
- n += 1 + l + sovNginx(uint64(l))
- }
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
-}
-
-func (m *PathInfo) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Bin)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
- }
- l = len(m.Conf)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
-}
-
-func (m *NginxDetails) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.NginxId)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
- }
- l = len(m.Version)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
- }
- l = len(m.ConfPath)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
- }
- l = len(m.ProcessId)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
+ l = len(m.ProcessId)
+ if l > 0 {
+ n += 1 + l + sovNginx(uint64(l))
}
l = len(m.ProcessPath)
if l > 0 {
@@ -2126,339 +1802,6 @@ func sovNginx(x uint64) (n int) {
func sozNginx(x uint64) (n int) {
return sovNginx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
-func (m *PlusInfo) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PlusInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PlusInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Enabled = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Release", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthNginx
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthNginx
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Release = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipNginx(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNginx
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SSLInfo) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SSLInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SSLInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Built", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthNginx
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthNginx
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Built = append(m.Built, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Run", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthNginx
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthNginx
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Run = append(m.Run, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipNginx(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNginx
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PathInfo) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PathInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PathInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Bin", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthNginx
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthNginx
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Bin = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conf", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthNginx
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthNginx
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conf = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipNginx(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNginx
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
func (m *NginxDetails) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
diff --git a/sdk/proto/nginx.proto b/sdk/proto/nginx.proto
index 305809568..7ac92921b 100644
--- a/sdk/proto/nginx.proto
+++ b/sdk/proto/nginx.proto
@@ -1,142 +1,170 @@
-
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-import "gogo.proto";
-import "config.proto";
-import "common.proto";
-
-message PlusInfo {
- bool enabled = 1 [(gogoproto.jsontag) = "enabled" ];
- string release = 2 [(gogoproto.jsontag) = "release" ];
-}
-message SSLInfo {
- repeated string built = 1 [(gogoproto.jsontag) = "built" ];
- repeated string run = 2 [(gogoproto.jsontag) = "run" ];
-}
+import "common.proto";
+import "config.proto";
+import "gogo.proto";
-message PathInfo {
- string bin = 1 [(gogoproto.jsontag) = "bin" ];
- string conf = 2 [(gogoproto.jsontag) = "conf" ];
-}
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
// swagger:model NginxDetails
-// Each NGINXDetails is associated with with a single NGINX instance.
+// Represents NGINX details about a single NGINX instance
message NginxDetails {
- // NGINX ID
- // example: b636d4376dea15405589692d3c5d3869ff3a9b26b0e7bb4bb1aa7e658ace1437
- string nginx_id = 1 [(gogoproto.jsontag) = "nginx_id" ];
- // Version of NGINX
- // example: 1.23.2
- string version = 2 [(gogoproto.jsontag) = "version" ];
- // Path to configuration file
- // example: /usr/local/nginx/conf/nginx.conf
- string conf_path = 3 [(gogoproto.jsontag) = "conf_path" ];
- // Process ID
- // example: 8
- string process_id = 4 [(gogoproto.jsontag) = "process_id" ];
- // Process Path
- // example: /usr/local/nginx/sbin/nginx
- string process_path = 5 [(gogoproto.jsontag) = "process_path" ];
- // Start Time
- // example: 1670429190000
- int64 start_time = 6 [(gogoproto.jsontag) = "start_time" ];
- // Was NGINX built from source
- // example: false
- bool built_from_source = 7 [(gogoproto.jsontag) = "built_from_source" ];
- // List of loadable modules
- // example: []
- repeated string loadable_modules = 8 [(gogoproto.jsontag) = "loadable_modules" ];
- // List of runtime modules
- // example: [ "http_stub_status_module" ]
- repeated string runtime_modules = 9 [(gogoproto.jsontag) = "runtime_modules" ];
- // NGINX plus metadata
- NginxPlusMetaData plus = 10 [(gogoproto.jsontag) = "plus" ];
- // SSL metadata
- NginxSslMetaData ssl = 11 [(gogoproto.jsontag) = "ssl" ];
- // Status URL
- // example: http://localhost:8080/api
- string status_url = 12 [(gogoproto.jsontag) = "status_url" ];
- // Configuration arguments
- // example: [ "", "with-http_stub_status_module" ]
- repeated string configure_args = 13 [(gogoproto.jsontag) = "configure_args" ];
+ // NGINX ID.
+ // Example: b636d4376dea15405589692d3c5d3869ff3a9b26b0e7bb4bb1aa7e658ace1437
+ string nginx_id = 1 [(gogoproto.jsontag) = "nginx_id"];
+ // NGINX version.
+ // Example: 1.23.2
+ string version = 2 [(gogoproto.jsontag) = "version"];
+ // Path to NGINX configuration.
+ // Example: /usr/local/nginx/conf/nginx.conf
+ string conf_path = 3 [(gogoproto.jsontag) = "conf_path"];
+ // Process ID of NGINX instance.
+ // Example: 8
+ string process_id = 4 [(gogoproto.jsontag) = "process_id"];
+ // The path to the NGINX executable.
+ // Example: /usr/local/nginx/sbin/nginx
+ string process_path = 5 [(gogoproto.jsontag) = "process_path"];
+ // The start time of the NGINX instance.
+ // Example: 1670429190000
+ int64 start_time = 6 [(gogoproto.jsontag) = "start_time"];
+ // Determines if the NGINX instance was built from the source code in github or not.
+ // Example: false
+ bool built_from_source = 7 [(gogoproto.jsontag) = "built_from_source"];
+ // List of NGINX loadable modules.
+ // Example: []
+ repeated string loadable_modules = 8 [(gogoproto.jsontag) = "loadable_modules"];
+ // List of NGINX runtime modules.
+ // Example: [ "http_stub_status_module" ]
+ repeated string runtime_modules = 9 [(gogoproto.jsontag) = "runtime_modules"];
+ // NGINX Plus metadata.
+ NginxPlusMetaData plus = 10 [(gogoproto.jsontag) = "plus"];
+ // NGINX SSL metadata.
+ NginxSslMetaData ssl = 11 [(gogoproto.jsontag) = "ssl"];
+ // Status URL.
+ // Example: http://localhost:8080/api
+ string status_url = 12 [(gogoproto.jsontag) = "status_url"];
+ // Command line arguments that were used when the NGINX instance was started.
+ // Example: [ "", "with-http_stub_status_module" ]
+ repeated string configure_args = 13 [(gogoproto.jsontag) = "configure_args"];
}
// swagger:model NginxPlusMetaData
+// Represents NGINX Plus metadata
message NginxPlusMetaData {
- // Is NGINX instance a plus instance
- // example: true
- bool enabled = 1 [(gogoproto.jsontag) = "enabled" ];
- // NGINX plus release
- // example: R27
- string release = 2 [(gogoproto.jsontag) = "release" ];
+ // Determines if its a plus instance or not.
+ // Example: true
+ bool enabled = 1 [(gogoproto.jsontag) = "enabled"];
+ // NGINX Plus version.
+ // Example: R27
+ string release = 2 [(gogoproto.jsontag) = "release"];
}
// swagger:model NginxSslMetaData
+// Represents NGINX SSL metadata
message NginxSslMetaData {
// SSL type enum
enum NginxSslType {
+ // SSL complied with NGINX
BUILT = 0;
+ // SSL not complied with NGINX
RUN = 1;
}
- // SSL type
- // example: 0
- NginxSslType ssl_type = 1 [(gogoproto.jsontag) = "ssl_type" ];
- // SSL details
- // example: null
- repeated string details = 2 [(gogoproto.jsontag) = "details" ];
+ // SSL Type.
+ // Example: 0
+ NginxSslType ssl_type = 1 [(gogoproto.jsontag) = "ssl_type"];
+ // List of SSL information (e.g. version, type, etc).
+ // Example: null
+ repeated string details = 2 [(gogoproto.jsontag) = "details"];
}
+// Represents the health of a NGINX instance
message NginxHealth {
+ // NGINX status enum
enum NginxStatus {
- UNKNOWN = 0;
- ACTIVE = 1;
- DEGRADED = 2;
- }
- string nginx_id = 1 [(gogoproto.jsontag) = "nginx_id" ];
- NginxStatus nginx_status = 2 [(gogoproto.jsontag) = "nginx_status" ];
- string degraded_reason = 3 [(gogoproto.jsontag) = "degraded_reason" ];
+ // Unknown status
+ UNKNOWN = 0;
+ // Active status
+ ACTIVE = 1;
+ // Degraded status
+ DEGRADED = 2;
+ }
+ // NGINX ID
+ string nginx_id = 1 [(gogoproto.jsontag) = "nginx_id"];
+ // NGINX status
+ NginxStatus nginx_status = 2 [(gogoproto.jsontag) = "nginx_status"];
+ // Provides an error message of why a NGINX instance is degraded
+ string degraded_reason = 3 [(gogoproto.jsontag) = "degraded_reason"];
}
+// NGINX config action enum
enum NginxConfigAction {
+ // Unknown action
UNKNOWN = 0;
+ // Apply config action
APPLY = 1;
+ // Test config action (This will be implemented in a future release)
TEST = 2;
+ // Rollback config action (This will be implemented in a future release)
ROLLBACK = 3;
+ // Return config action (This will be implemented in a future release)
RETURN = 4;
+ // Force config apply action
FORCE = 5;
}
+// Represents a NGINX config
message NginxConfig {
- NginxConfigAction action = 1 [(gogoproto.jsontag) = "action" ];
- ConfigDescriptor config_data = 2 [(gogoproto.jsontag) = "config_data" ];
- ZippedFile zconfig = 3 [(gogoproto.jsontag) = "zconfig" ];
- ZippedFile zaux = 4 [(gogoproto.jsontag) = "zaux" ];
- AccessLogs access_logs = 5 [(gogoproto.jsontag) = "access_logs" ];
- ErrorLogs error_logs = 6 [(gogoproto.jsontag) = "error_logs" ];
- SslCertificates ssl = 7 [(gogoproto.jsontag) = "ssl" ];
- DirectoryMap directory_map = 8 [(gogoproto.jsontag) = "directory_map" ];
+ // NGINX config action
+ NginxConfigAction action = 1 [(gogoproto.jsontag) = "action"];
+ // Metadata information about the configuration
+ ConfigDescriptor config_data = 2 [(gogoproto.jsontag) = "config_data"];
+ // Zipped file of all NGINX config files
+ ZippedFile zconfig = 3 [(gogoproto.jsontag) = "zconfig"];
+ // Zipped file of all auxiliary files
+ ZippedFile zaux = 4 [(gogoproto.jsontag) = "zaux"];
+ // Information about all access log files
+ AccessLogs access_logs = 5 [(gogoproto.jsontag) = "access_logs"];
+ // Information about all error log files
+ ErrorLogs error_logs = 6 [(gogoproto.jsontag) = "error_logs"];
+ // Information about all SSL certificates files
+ SslCertificates ssl = 7 [(gogoproto.jsontag) = "ssl"];
+ // Directory map of all config and aux files
+ DirectoryMap directory_map = 8 [(gogoproto.jsontag) = "directory_map"];
}
+// Represents access log files
message AccessLogs {
- repeated AccessLog access_log = 1 [(gogoproto.jsontag) = "access_log" ];
+ // List of access log files
+ repeated AccessLog access_log = 1 [(gogoproto.jsontag) = "access_log"];
}
+// Represents an access log file
message AccessLog {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- string format = 2 [(gogoproto.jsontag) = "format" ];
- string permissions = 3 [(gogoproto.jsontag) = "permissions" ];
- bool readable = 4 [(gogoproto.jsontag) = "readable" ];
+ // Name of file
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Format of the file
+ string format = 2 [(gogoproto.jsontag) = "format"];
+ // File Permissions
+ string permissions = 3 [(gogoproto.jsontag) = "permissions"];
+ // Determines if the file is readable or not
+ bool readable = 4 [(gogoproto.jsontag) = "readable"];
}
+// Represents error log files
message ErrorLogs {
- repeated ErrorLog error_log = 1 [(gogoproto.jsontag) = "error_log" ];
+ // List of error log files
+ repeated ErrorLog error_log = 1 [(gogoproto.jsontag) = "error_log"];
}
+// Represents an error log file
message ErrorLog {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- string log_level = 2 [(gogoproto.jsontag) = "log_level" ];
- string permissions = 3 [(gogoproto.jsontag) = "permissions" ];
- bool readable = 4 [(gogoproto.jsontag) = "readable" ];
+ // Name of file
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Log level
+ string log_level = 2 [(gogoproto.jsontag) = "log_level"];
+ // File Permissions
+ string permissions = 3 [(gogoproto.jsontag) = "permissions"];
+ // Determines if the file is readable or not
+ bool readable = 4 [(gogoproto.jsontag) = "readable"];
}
diff --git a/sdk/vendor/github.com/stretchr/objx/Taskfile.yml b/sdk/vendor/github.com/stretchr/objx/Taskfile.yml
index a749ac549..7746f516d 100644
--- a/sdk/vendor/github.com/stretchr/objx/Taskfile.yml
+++ b/sdk/vendor/github.com/stretchr/objx/Taskfile.yml
@@ -25,6 +25,6 @@ tasks:
- go test -race ./...
test-coverage:
- desc: Runs go tests and calucates test coverage
+ desc: Runs go tests and calculates test coverage
cmds:
- go test -race -coverprofile=c.out ./...
diff --git a/sdk/vendor/golang.org/x/net/http2/headermap.go b/sdk/vendor/golang.org/x/net/http2/headermap.go
index 9e12941da..149b3dd20 100644
--- a/sdk/vendor/golang.org/x/net/http2/headermap.go
+++ b/sdk/vendor/golang.org/x/net/http2/headermap.go
@@ -27,7 +27,14 @@ func buildCommonHeaderMaps() {
"accept-language",
"accept-ranges",
"age",
+ "access-control-allow-credentials",
+ "access-control-allow-headers",
+ "access-control-allow-methods",
"access-control-allow-origin",
+ "access-control-expose-headers",
+ "access-control-max-age",
+ "access-control-request-headers",
+ "access-control-request-method",
"allow",
"authorization",
"cache-control",
@@ -53,6 +60,7 @@ func buildCommonHeaderMaps() {
"link",
"location",
"max-forwards",
+ "origin",
"proxy-authenticate",
"proxy-authorization",
"range",
@@ -68,6 +76,8 @@ func buildCommonHeaderMaps() {
"vary",
"via",
"www-authenticate",
+ "x-forwarded-for",
+ "x-forwarded-proto",
}
commonLowerHeader = make(map[string]string, len(common))
commonCanonHeader = make(map[string]string, len(common))
@@ -85,3 +95,11 @@ func lowerHeader(v string) (lower string, ascii bool) {
}
return asciiToLower(v)
}
+
+func canonicalHeader(v string) string {
+ buildCommonHeaderMapsOnce()
+ if s, ok := commonCanonHeader[v]; ok {
+ return s
+ }
+ return http.CanonicalHeaderKey(v)
+}
diff --git a/sdk/vendor/golang.org/x/net/http2/hpack/encode.go b/sdk/vendor/golang.org/x/net/http2/hpack/encode.go
index 6886dc163..46219da2b 100644
--- a/sdk/vendor/golang.org/x/net/http2/hpack/encode.go
+++ b/sdk/vendor/golang.org/x/net/http2/hpack/encode.go
@@ -116,6 +116,11 @@ func (e *Encoder) SetMaxDynamicTableSize(v uint32) {
e.dynTab.setMaxSize(v)
}
+// MaxDynamicTableSize returns the current dynamic header table size.
+func (e *Encoder) MaxDynamicTableSize() (v uint32) {
+ return e.dynTab.maxSize
+}
+
// SetMaxDynamicTableSizeLimit changes the maximum value that can be
// specified in SetMaxDynamicTableSize to v. By default, it is set to
// 4096, which is the same size of the default dynamic header table
diff --git a/sdk/vendor/golang.org/x/net/http2/hpack/static_table.go b/sdk/vendor/golang.org/x/net/http2/hpack/static_table.go
new file mode 100644
index 000000000..754a1eb91
--- /dev/null
+++ b/sdk/vendor/golang.org/x/net/http2/hpack/static_table.go
@@ -0,0 +1,188 @@
+// go generate gen.go
+// Code generated by the command above; DO NOT EDIT.
+
+package hpack
+
+var staticTable = &headerFieldTable{
+ evictCount: 0,
+ byName: map[string]uint64{
+ ":authority": 1,
+ ":method": 3,
+ ":path": 5,
+ ":scheme": 7,
+ ":status": 14,
+ "accept-charset": 15,
+ "accept-encoding": 16,
+ "accept-language": 17,
+ "accept-ranges": 18,
+ "accept": 19,
+ "access-control-allow-origin": 20,
+ "age": 21,
+ "allow": 22,
+ "authorization": 23,
+ "cache-control": 24,
+ "content-disposition": 25,
+ "content-encoding": 26,
+ "content-language": 27,
+ "content-length": 28,
+ "content-location": 29,
+ "content-range": 30,
+ "content-type": 31,
+ "cookie": 32,
+ "date": 33,
+ "etag": 34,
+ "expect": 35,
+ "expires": 36,
+ "from": 37,
+ "host": 38,
+ "if-match": 39,
+ "if-modified-since": 40,
+ "if-none-match": 41,
+ "if-range": 42,
+ "if-unmodified-since": 43,
+ "last-modified": 44,
+ "link": 45,
+ "location": 46,
+ "max-forwards": 47,
+ "proxy-authenticate": 48,
+ "proxy-authorization": 49,
+ "range": 50,
+ "referer": 51,
+ "refresh": 52,
+ "retry-after": 53,
+ "server": 54,
+ "set-cookie": 55,
+ "strict-transport-security": 56,
+ "transfer-encoding": 57,
+ "user-agent": 58,
+ "vary": 59,
+ "via": 60,
+ "www-authenticate": 61,
+ },
+ byNameValue: map[pairNameValue]uint64{
+ {name: ":authority", value: ""}: 1,
+ {name: ":method", value: "GET"}: 2,
+ {name: ":method", value: "POST"}: 3,
+ {name: ":path", value: "/"}: 4,
+ {name: ":path", value: "/index.html"}: 5,
+ {name: ":scheme", value: "http"}: 6,
+ {name: ":scheme", value: "https"}: 7,
+ {name: ":status", value: "200"}: 8,
+ {name: ":status", value: "204"}: 9,
+ {name: ":status", value: "206"}: 10,
+ {name: ":status", value: "304"}: 11,
+ {name: ":status", value: "400"}: 12,
+ {name: ":status", value: "404"}: 13,
+ {name: ":status", value: "500"}: 14,
+ {name: "accept-charset", value: ""}: 15,
+ {name: "accept-encoding", value: "gzip, deflate"}: 16,
+ {name: "accept-language", value: ""}: 17,
+ {name: "accept-ranges", value: ""}: 18,
+ {name: "accept", value: ""}: 19,
+ {name: "access-control-allow-origin", value: ""}: 20,
+ {name: "age", value: ""}: 21,
+ {name: "allow", value: ""}: 22,
+ {name: "authorization", value: ""}: 23,
+ {name: "cache-control", value: ""}: 24,
+ {name: "content-disposition", value: ""}: 25,
+ {name: "content-encoding", value: ""}: 26,
+ {name: "content-language", value: ""}: 27,
+ {name: "content-length", value: ""}: 28,
+ {name: "content-location", value: ""}: 29,
+ {name: "content-range", value: ""}: 30,
+ {name: "content-type", value: ""}: 31,
+ {name: "cookie", value: ""}: 32,
+ {name: "date", value: ""}: 33,
+ {name: "etag", value: ""}: 34,
+ {name: "expect", value: ""}: 35,
+ {name: "expires", value: ""}: 36,
+ {name: "from", value: ""}: 37,
+ {name: "host", value: ""}: 38,
+ {name: "if-match", value: ""}: 39,
+ {name: "if-modified-since", value: ""}: 40,
+ {name: "if-none-match", value: ""}: 41,
+ {name: "if-range", value: ""}: 42,
+ {name: "if-unmodified-since", value: ""}: 43,
+ {name: "last-modified", value: ""}: 44,
+ {name: "link", value: ""}: 45,
+ {name: "location", value: ""}: 46,
+ {name: "max-forwards", value: ""}: 47,
+ {name: "proxy-authenticate", value: ""}: 48,
+ {name: "proxy-authorization", value: ""}: 49,
+ {name: "range", value: ""}: 50,
+ {name: "referer", value: ""}: 51,
+ {name: "refresh", value: ""}: 52,
+ {name: "retry-after", value: ""}: 53,
+ {name: "server", value: ""}: 54,
+ {name: "set-cookie", value: ""}: 55,
+ {name: "strict-transport-security", value: ""}: 56,
+ {name: "transfer-encoding", value: ""}: 57,
+ {name: "user-agent", value: ""}: 58,
+ {name: "vary", value: ""}: 59,
+ {name: "via", value: ""}: 60,
+ {name: "www-authenticate", value: ""}: 61,
+ },
+ ents: []HeaderField{
+ {Name: ":authority", Value: "", Sensitive: false},
+ {Name: ":method", Value: "GET", Sensitive: false},
+ {Name: ":method", Value: "POST", Sensitive: false},
+ {Name: ":path", Value: "/", Sensitive: false},
+ {Name: ":path", Value: "/index.html", Sensitive: false},
+ {Name: ":scheme", Value: "http", Sensitive: false},
+ {Name: ":scheme", Value: "https", Sensitive: false},
+ {Name: ":status", Value: "200", Sensitive: false},
+ {Name: ":status", Value: "204", Sensitive: false},
+ {Name: ":status", Value: "206", Sensitive: false},
+ {Name: ":status", Value: "304", Sensitive: false},
+ {Name: ":status", Value: "400", Sensitive: false},
+ {Name: ":status", Value: "404", Sensitive: false},
+ {Name: ":status", Value: "500", Sensitive: false},
+ {Name: "accept-charset", Value: "", Sensitive: false},
+ {Name: "accept-encoding", Value: "gzip, deflate", Sensitive: false},
+ {Name: "accept-language", Value: "", Sensitive: false},
+ {Name: "accept-ranges", Value: "", Sensitive: false},
+ {Name: "accept", Value: "", Sensitive: false},
+ {Name: "access-control-allow-origin", Value: "", Sensitive: false},
+ {Name: "age", Value: "", Sensitive: false},
+ {Name: "allow", Value: "", Sensitive: false},
+ {Name: "authorization", Value: "", Sensitive: false},
+ {Name: "cache-control", Value: "", Sensitive: false},
+ {Name: "content-disposition", Value: "", Sensitive: false},
+ {Name: "content-encoding", Value: "", Sensitive: false},
+ {Name: "content-language", Value: "", Sensitive: false},
+ {Name: "content-length", Value: "", Sensitive: false},
+ {Name: "content-location", Value: "", Sensitive: false},
+ {Name: "content-range", Value: "", Sensitive: false},
+ {Name: "content-type", Value: "", Sensitive: false},
+ {Name: "cookie", Value: "", Sensitive: false},
+ {Name: "date", Value: "", Sensitive: false},
+ {Name: "etag", Value: "", Sensitive: false},
+ {Name: "expect", Value: "", Sensitive: false},
+ {Name: "expires", Value: "", Sensitive: false},
+ {Name: "from", Value: "", Sensitive: false},
+ {Name: "host", Value: "", Sensitive: false},
+ {Name: "if-match", Value: "", Sensitive: false},
+ {Name: "if-modified-since", Value: "", Sensitive: false},
+ {Name: "if-none-match", Value: "", Sensitive: false},
+ {Name: "if-range", Value: "", Sensitive: false},
+ {Name: "if-unmodified-since", Value: "", Sensitive: false},
+ {Name: "last-modified", Value: "", Sensitive: false},
+ {Name: "link", Value: "", Sensitive: false},
+ {Name: "location", Value: "", Sensitive: false},
+ {Name: "max-forwards", Value: "", Sensitive: false},
+ {Name: "proxy-authenticate", Value: "", Sensitive: false},
+ {Name: "proxy-authorization", Value: "", Sensitive: false},
+ {Name: "range", Value: "", Sensitive: false},
+ {Name: "referer", Value: "", Sensitive: false},
+ {Name: "refresh", Value: "", Sensitive: false},
+ {Name: "retry-after", Value: "", Sensitive: false},
+ {Name: "server", Value: "", Sensitive: false},
+ {Name: "set-cookie", Value: "", Sensitive: false},
+ {Name: "strict-transport-security", Value: "", Sensitive: false},
+ {Name: "transfer-encoding", Value: "", Sensitive: false},
+ {Name: "user-agent", Value: "", Sensitive: false},
+ {Name: "vary", Value: "", Sensitive: false},
+ {Name: "via", Value: "", Sensitive: false},
+ {Name: "www-authenticate", Value: "", Sensitive: false},
+ },
+}
diff --git a/sdk/vendor/golang.org/x/net/http2/hpack/tables.go b/sdk/vendor/golang.org/x/net/http2/hpack/tables.go
index a66cfbea6..8cbdf3f01 100644
--- a/sdk/vendor/golang.org/x/net/http2/hpack/tables.go
+++ b/sdk/vendor/golang.org/x/net/http2/hpack/tables.go
@@ -96,8 +96,7 @@ func (t *headerFieldTable) evictOldest(n int) {
// meaning t.ents is reversed for dynamic tables. Hence, when t is a dynamic
// table, the return value i actually refers to the entry t.ents[t.len()-i].
//
-// All tables are assumed to be a dynamic tables except for the global
-// staticTable pointer.
+// All tables are assumed to be a dynamic tables except for the global staticTable.
//
// See Section 2.3.3.
func (t *headerFieldTable) search(f HeaderField) (i uint64, nameValueMatch bool) {
@@ -125,81 +124,6 @@ func (t *headerFieldTable) idToIndex(id uint64) uint64 {
return k + 1
}
-// http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07#appendix-B
-var staticTable = newStaticTable()
-var staticTableEntries = [...]HeaderField{
- {Name: ":authority"},
- {Name: ":method", Value: "GET"},
- {Name: ":method", Value: "POST"},
- {Name: ":path", Value: "/"},
- {Name: ":path", Value: "/index.html"},
- {Name: ":scheme", Value: "http"},
- {Name: ":scheme", Value: "https"},
- {Name: ":status", Value: "200"},
- {Name: ":status", Value: "204"},
- {Name: ":status", Value: "206"},
- {Name: ":status", Value: "304"},
- {Name: ":status", Value: "400"},
- {Name: ":status", Value: "404"},
- {Name: ":status", Value: "500"},
- {Name: "accept-charset"},
- {Name: "accept-encoding", Value: "gzip, deflate"},
- {Name: "accept-language"},
- {Name: "accept-ranges"},
- {Name: "accept"},
- {Name: "access-control-allow-origin"},
- {Name: "age"},
- {Name: "allow"},
- {Name: "authorization"},
- {Name: "cache-control"},
- {Name: "content-disposition"},
- {Name: "content-encoding"},
- {Name: "content-language"},
- {Name: "content-length"},
- {Name: "content-location"},
- {Name: "content-range"},
- {Name: "content-type"},
- {Name: "cookie"},
- {Name: "date"},
- {Name: "etag"},
- {Name: "expect"},
- {Name: "expires"},
- {Name: "from"},
- {Name: "host"},
- {Name: "if-match"},
- {Name: "if-modified-since"},
- {Name: "if-none-match"},
- {Name: "if-range"},
- {Name: "if-unmodified-since"},
- {Name: "last-modified"},
- {Name: "link"},
- {Name: "location"},
- {Name: "max-forwards"},
- {Name: "proxy-authenticate"},
- {Name: "proxy-authorization"},
- {Name: "range"},
- {Name: "referer"},
- {Name: "refresh"},
- {Name: "retry-after"},
- {Name: "server"},
- {Name: "set-cookie"},
- {Name: "strict-transport-security"},
- {Name: "transfer-encoding"},
- {Name: "user-agent"},
- {Name: "vary"},
- {Name: "via"},
- {Name: "www-authenticate"},
-}
-
-func newStaticTable() *headerFieldTable {
- t := &headerFieldTable{}
- t.init()
- for _, e := range staticTableEntries[:] {
- t.addEntry(e)
- }
- return t
-}
-
var huffmanCodes = [256]uint32{
0x1ff8,
0x7fffd8,
diff --git a/sdk/vendor/golang.org/x/net/http2/server.go b/sdk/vendor/golang.org/x/net/http2/server.go
index 47524a61a..4eb7617fa 100644
--- a/sdk/vendor/golang.org/x/net/http2/server.go
+++ b/sdk/vendor/golang.org/x/net/http2/server.go
@@ -98,6 +98,19 @@ type Server struct {
// the HTTP/2 spec's recommendations.
MaxConcurrentStreams uint32
+ // MaxDecoderHeaderTableSize optionally specifies the http2
+ // SETTINGS_HEADER_TABLE_SIZE to send in the initial settings frame. It
+ // informs the remote endpoint of the maximum size of the header compression
+ // table used to decode header blocks, in octets. If zero, the default value
+ // of 4096 is used.
+ MaxDecoderHeaderTableSize uint32
+
+ // MaxEncoderHeaderTableSize optionally specifies an upper limit for the
+ // header compression table used for encoding request headers. Received
+ // SETTINGS_HEADER_TABLE_SIZE settings are capped at this limit. If zero,
+ // the default value of 4096 is used.
+ MaxEncoderHeaderTableSize uint32
+
// MaxReadFrameSize optionally specifies the largest frame
// this server is willing to read. A valid value is between
// 16k and 16M, inclusive. If zero or otherwise invalid, a
@@ -143,7 +156,7 @@ type Server struct {
}
func (s *Server) initialConnRecvWindowSize() int32 {
- if s.MaxUploadBufferPerConnection > initialWindowSize {
+ if s.MaxUploadBufferPerConnection >= initialWindowSize {
return s.MaxUploadBufferPerConnection
}
return 1 << 20
@@ -170,6 +183,20 @@ func (s *Server) maxConcurrentStreams() uint32 {
return defaultMaxStreams
}
+func (s *Server) maxDecoderHeaderTableSize() uint32 {
+ if v := s.MaxDecoderHeaderTableSize; v > 0 {
+ return v
+ }
+ return initialHeaderTableSize
+}
+
+func (s *Server) maxEncoderHeaderTableSize() uint32 {
+ if v := s.MaxEncoderHeaderTableSize; v > 0 {
+ return v
+ }
+ return initialHeaderTableSize
+}
+
// maxQueuedControlFrames is the maximum number of control frames like
// SETTINGS, PING and RST_STREAM that will be queued for writing before
// the connection is closed to prevent memory exhaustion attacks.
@@ -394,7 +421,6 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
advMaxStreams: s.maxConcurrentStreams(),
initialStreamSendWindowSize: initialWindowSize,
maxFrameSize: initialMaxFrameSize,
- headerTableSize: initialHeaderTableSize,
serveG: newGoroutineLock(),
pushEnabled: true,
sawClientPreface: opts.SawClientPreface,
@@ -424,12 +450,13 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
sc.flow.add(initialWindowSize)
sc.inflow.add(initialWindowSize)
sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf)
+ sc.hpackEncoder.SetMaxDynamicTableSizeLimit(s.maxEncoderHeaderTableSize())
fr := NewFramer(sc.bw, c)
if s.CountError != nil {
fr.countError = s.CountError
}
- fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil)
+ fr.ReadMetaHeaders = hpack.NewDecoder(s.maxDecoderHeaderTableSize(), nil)
fr.MaxHeaderListSize = sc.maxHeaderListSize()
fr.SetMaxReadFrameSize(s.maxReadFrameSize())
sc.framer = fr
@@ -559,9 +586,9 @@ type serverConn struct {
streams map[uint32]*stream
initialStreamSendWindowSize int32
maxFrameSize int32
- headerTableSize uint32
peerMaxHeaderListSize uint32 // zero means unknown (default)
canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case
+ canonHeaderKeysSize int // canonHeader keys size in bytes
writingFrame bool // started writing a frame (on serve goroutine or separate)
writingFrameAsync bool // started a frame on its own goroutine but haven't heard back on wroteFrameCh
needsFrameFlush bool // last frame write wasn't a flush
@@ -622,7 +649,9 @@ type stream struct {
resetQueued bool // RST_STREAM queued for write; set by sc.resetStream
gotTrailerHeader bool // HEADER frame for trailers was seen
wroteHeaders bool // whether we wrote headers (not status 100)
+ readDeadline *time.Timer // nil if unused
writeDeadline *time.Timer // nil if unused
+ closeErr error // set before cw is closed
trailer http.Header // accumulated trailers
reqTrailer http.Header // handler's Request.Trailer
@@ -738,6 +767,13 @@ func (sc *serverConn) condlogf(err error, format string, args ...interface{}) {
}
}
+// maxCachedCanonicalHeadersKeysSize is an arbitrarily-chosen limit on the size
+// of the entries in the canonHeader cache.
+// This should be larger than the size of unique, uncommon header keys likely to
+// be sent by the peer, while not so high as to permit unreasonable memory usage
+// if the peer sends an unbounded number of unique header keys.
+const maxCachedCanonicalHeadersKeysSize = 2048
+
func (sc *serverConn) canonicalHeader(v string) string {
sc.serveG.check()
buildCommonHeaderMapsOnce()
@@ -753,14 +789,10 @@ func (sc *serverConn) canonicalHeader(v string) string {
sc.canonHeader = make(map[string]string)
}
cv = http.CanonicalHeaderKey(v)
- // maxCachedCanonicalHeaders is an arbitrarily-chosen limit on the number of
- // entries in the canonHeader cache. This should be larger than the number
- // of unique, uncommon header keys likely to be sent by the peer, while not
- // so high as to permit unreasonable memory usage if the peer sends an unbounded
- // number of unique header keys.
- const maxCachedCanonicalHeaders = 32
- if len(sc.canonHeader) < maxCachedCanonicalHeaders {
+ size := 100 + len(v)*2 // 100 bytes of map overhead + key + value
+ if sc.canonHeaderKeysSize+size <= maxCachedCanonicalHeadersKeysSize {
sc.canonHeader[v] = cv
+ sc.canonHeaderKeysSize += size
}
return cv
}
@@ -862,6 +894,7 @@ func (sc *serverConn) serve() {
{SettingMaxFrameSize, sc.srv.maxReadFrameSize()},
{SettingMaxConcurrentStreams, sc.advMaxStreams},
{SettingMaxHeaderListSize, sc.maxHeaderListSize()},
+ {SettingHeaderTableSize, sc.srv.maxDecoderHeaderTableSize()},
{SettingInitialWindowSize, uint32(sc.srv.initialStreamRecvWindowSize())},
},
})
@@ -948,6 +981,8 @@ func (sc *serverConn) serve() {
}
case *startPushRequest:
sc.startPush(v)
+ case func(*serverConn):
+ v(sc)
default:
panic(fmt.Sprintf("unexpected type %T", v))
}
@@ -1371,6 +1406,9 @@ func (sc *serverConn) startGracefulShutdownInternal() {
func (sc *serverConn) goAway(code ErrCode) {
sc.serveG.check()
if sc.inGoAway {
+ if sc.goAwayCode == ErrCodeNo {
+ sc.goAwayCode = code
+ }
return
}
sc.inGoAway = true
@@ -1458,6 +1496,21 @@ func (sc *serverConn) processFrame(f Frame) error {
sc.sawFirstSettings = true
}
+ // Discard frames for streams initiated after the identified last
+ // stream sent in a GOAWAY, or all frames after sending an error.
+ // We still need to return connection-level flow control for DATA frames.
+ // RFC 9113 Section 6.8.
+ if sc.inGoAway && (sc.goAwayCode != ErrCodeNo || f.Header().StreamID > sc.maxClientStreamID) {
+
+ if f, ok := f.(*DataFrame); ok {
+ if sc.inflow.available() < int32(f.Length) {
+ return sc.countError("data_flow", streamError(f.Header().StreamID, ErrCodeFlowControl))
+ }
+ sc.sendWindowUpdate(nil, int(f.Length)) // conn-level
+ }
+ return nil
+ }
+
switch f := f.(type) {
case *SettingsFrame:
return sc.processSettings(f)
@@ -1500,9 +1553,6 @@ func (sc *serverConn) processPing(f *PingFrame) error {
// PROTOCOL_ERROR."
return sc.countError("ping_on_stream", ConnectionError(ErrCodeProtocol))
}
- if sc.inGoAway && sc.goAwayCode != ErrCodeNo {
- return nil
- }
sc.writeFrame(FrameWriteRequest{write: writePingAck{f}})
return nil
}
@@ -1564,6 +1614,9 @@ func (sc *serverConn) closeStream(st *stream, err error) {
panic(fmt.Sprintf("invariant; can't close stream in state %v", st.state))
}
st.state = stateClosed
+ if st.readDeadline != nil {
+ st.readDeadline.Stop()
+ }
if st.writeDeadline != nil {
st.writeDeadline.Stop()
}
@@ -1589,6 +1642,14 @@ func (sc *serverConn) closeStream(st *stream, err error) {
p.CloseWithError(err)
}
+ if e, ok := err.(StreamError); ok {
+ if e.Cause != nil {
+ err = e.Cause
+ } else {
+ err = errStreamClosed
+ }
+ }
+ st.closeErr = err
st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc
sc.writeSched.CloseStream(st.id)
}
@@ -1631,7 +1692,6 @@ func (sc *serverConn) processSetting(s Setting) error {
}
switch s.ID {
case SettingHeaderTableSize:
- sc.headerTableSize = s.Val
sc.hpackEncoder.SetMaxDynamicTableSize(s.Val)
case SettingEnablePush:
sc.pushEnabled = s.Val != 0
@@ -1685,16 +1745,6 @@ func (sc *serverConn) processSettingInitialWindowSize(val uint32) error {
func (sc *serverConn) processData(f *DataFrame) error {
sc.serveG.check()
id := f.Header().StreamID
- if sc.inGoAway && (sc.goAwayCode != ErrCodeNo || id > sc.maxClientStreamID) {
- // Discard all DATA frames if the GOAWAY is due to an
- // error, or:
- //
- // Section 6.8: After sending a GOAWAY frame, the sender
- // can discard frames for streams initiated by the
- // receiver with identifiers higher than the identified
- // last stream.
- return nil
- }
data := f.Data()
state, st := sc.state(id)
@@ -1747,6 +1797,12 @@ func (sc *serverConn) processData(f *DataFrame) error {
// Sender sending more than they'd declared?
if st.declBodyBytes != -1 && st.bodyBytes+int64(len(data)) > st.declBodyBytes {
+ if sc.inflow.available() < int32(f.Length) {
+ return sc.countError("data_flow", streamError(id, ErrCodeFlowControl))
+ }
+ sc.inflow.take(int32(f.Length))
+ sc.sendWindowUpdate(nil, int(f.Length)) // conn-level
+
st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes))
// RFC 7540, sec 8.1.2.6: A request or response is also malformed if the
// value of a content-length header field does not equal the sum of the
@@ -1831,19 +1887,27 @@ func (st *stream) copyTrailersToHandlerRequest() {
}
}
+// onReadTimeout is run on its own goroutine (from time.AfterFunc)
+// when the stream's ReadTimeout has fired.
+func (st *stream) onReadTimeout() {
+ // Wrap the ErrDeadlineExceeded to avoid callers depending on us
+ // returning the bare error.
+ st.body.CloseWithError(fmt.Errorf("%w", os.ErrDeadlineExceeded))
+}
+
// onWriteTimeout is run on its own goroutine (from time.AfterFunc)
// when the stream's WriteTimeout has fired.
func (st *stream) onWriteTimeout() {
- st.sc.writeFrameFromHandler(FrameWriteRequest{write: streamError(st.id, ErrCodeInternal)})
+ st.sc.writeFrameFromHandler(FrameWriteRequest{write: StreamError{
+ StreamID: st.id,
+ Code: ErrCodeInternal,
+ Cause: os.ErrDeadlineExceeded,
+ }})
}
func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
sc.serveG.check()
id := f.StreamID
- if sc.inGoAway {
- // Ignore.
- return nil
- }
// http://tools.ietf.org/html/rfc7540#section-5.1.1
// Streams initiated by a client MUST use odd-numbered stream
// identifiers. [...] An endpoint that receives an unexpected
@@ -1946,6 +2010,9 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
// (in Go 1.8), though. That's a more sane option anyway.
if sc.hs.ReadTimeout != 0 {
sc.conn.SetReadDeadline(time.Time{})
+ if st.body != nil {
+ st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout)
+ }
}
go sc.runHandler(rw, req, handler)
@@ -2014,9 +2081,6 @@ func (sc *serverConn) checkPriority(streamID uint32, p PriorityParam) error {
}
func (sc *serverConn) processPriority(f *PriorityFrame) error {
- if sc.inGoAway {
- return nil
- }
if err := sc.checkPriority(f.StreamID, f.PriorityParam); err != nil {
return err
}
@@ -2090,12 +2154,6 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
return nil, nil, sc.countError("bad_path_method", streamError(f.StreamID, ErrCodeProtocol))
}
- bodyOpen := !f.StreamEnded()
- if rp.method == "HEAD" && bodyOpen {
- // HEAD requests can't have bodies
- return nil, nil, sc.countError("head_body", streamError(f.StreamID, ErrCodeProtocol))
- }
-
rp.header = make(http.Header)
for _, hf := range f.RegularFields() {
rp.header.Add(sc.canonicalHeader(hf.Name), hf.Value)
@@ -2108,6 +2166,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
if err != nil {
return nil, nil, err
}
+ bodyOpen := !f.StreamEnded()
if bodyOpen {
if vv, ok := rp.header["Content-Length"]; ok {
if cl, err := strconv.ParseUint(vv[0], 10, 63); err == nil {
@@ -2223,6 +2282,9 @@ func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler
didPanic := true
defer func() {
rw.rws.stream.cancelCtx()
+ if req.MultipartForm != nil {
+ req.MultipartForm.RemoveAll()
+ }
if didPanic {
e := recover()
sc.writeFrameFromHandler(FrameWriteRequest{
@@ -2334,7 +2396,7 @@ func (sc *serverConn) sendWindowUpdate(st *stream, n int) {
// a larger Read than this. Very unlikely, but we handle it here
// rather than elsewhere for now.
const maxUint31 = 1<<31 - 1
- for n >= maxUint31 {
+ for n > maxUint31 {
sc.sendWindowUpdate32(st, maxUint31)
n -= maxUint31
}
@@ -2454,7 +2516,15 @@ type responseWriterState struct {
type chunkWriter struct{ rws *responseWriterState }
-func (cw chunkWriter) Write(p []byte) (n int, err error) { return cw.rws.writeChunk(p) }
+func (cw chunkWriter) Write(p []byte) (n int, err error) {
+ n, err = cw.rws.writeChunk(p)
+ if err == errStreamClosed {
+ // If writing failed because the stream has been closed,
+ // return the reason it was closed.
+ err = cw.rws.stream.closeErr
+ }
+ return n, err
+}
func (rws *responseWriterState) hasTrailers() bool { return len(rws.trailers) > 0 }
@@ -2493,6 +2563,10 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
rws.writeHeader(200)
}
+ if rws.handlerDone {
+ rws.promoteUndeclaredTrailers()
+ }
+
isHeadResp := rws.req.Method == "HEAD"
if !rws.sentHeader {
rws.sentHeader = true
@@ -2564,10 +2638,6 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
return 0, nil
}
- if rws.handlerDone {
- rws.promoteUndeclaredTrailers()
- }
-
// only send trailers if they have actually been defined by the
// server handler.
hasNonemptyTrailers := rws.hasNonemptyTrailers()
@@ -2648,23 +2718,85 @@ func (rws *responseWriterState) promoteUndeclaredTrailers() {
}
}
+func (w *responseWriter) SetReadDeadline(deadline time.Time) error {
+ st := w.rws.stream
+ if !deadline.IsZero() && deadline.Before(time.Now()) {
+ // If we're setting a deadline in the past, reset the stream immediately
+ // so writes after SetWriteDeadline returns will fail.
+ st.onReadTimeout()
+ return nil
+ }
+ w.rws.conn.sendServeMsg(func(sc *serverConn) {
+ if st.readDeadline != nil {
+ if !st.readDeadline.Stop() {
+ // Deadline already exceeded, or stream has been closed.
+ return
+ }
+ }
+ if deadline.IsZero() {
+ st.readDeadline = nil
+ } else if st.readDeadline == nil {
+ st.readDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onReadTimeout)
+ } else {
+ st.readDeadline.Reset(deadline.Sub(time.Now()))
+ }
+ })
+ return nil
+}
+
+func (w *responseWriter) SetWriteDeadline(deadline time.Time) error {
+ st := w.rws.stream
+ if !deadline.IsZero() && deadline.Before(time.Now()) {
+ // If we're setting a deadline in the past, reset the stream immediately
+ // so writes after SetWriteDeadline returns will fail.
+ st.onWriteTimeout()
+ return nil
+ }
+ w.rws.conn.sendServeMsg(func(sc *serverConn) {
+ if st.writeDeadline != nil {
+ if !st.writeDeadline.Stop() {
+ // Deadline already exceeded, or stream has been closed.
+ return
+ }
+ }
+ if deadline.IsZero() {
+ st.writeDeadline = nil
+ } else if st.writeDeadline == nil {
+ st.writeDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onWriteTimeout)
+ } else {
+ st.writeDeadline.Reset(deadline.Sub(time.Now()))
+ }
+ })
+ return nil
+}
+
func (w *responseWriter) Flush() {
+ w.FlushError()
+}
+
+func (w *responseWriter) FlushError() error {
rws := w.rws
if rws == nil {
panic("Header called after Handler finished")
}
+ var err error
if rws.bw.Buffered() > 0 {
- if err := rws.bw.Flush(); err != nil {
- // Ignore the error. The frame writer already knows.
- return
- }
+ err = rws.bw.Flush()
} else {
// The bufio.Writer won't call chunkWriter.Write
// (writeChunk with zero bytes, so we have to do it
// ourselves to force the HTTP response header and/or
// final DATA frame (with END_STREAM) to be sent.
- rws.writeChunk(nil)
+ _, err = chunkWriter{rws}.Write(nil)
+ if err == nil {
+ select {
+ case <-rws.stream.cw:
+ err = rws.stream.closeErr
+ default:
+ }
+ }
}
+ return err
}
func (w *responseWriter) CloseNotify() <-chan bool {
diff --git a/sdk/vendor/golang.org/x/net/http2/transport.go b/sdk/vendor/golang.org/x/net/http2/transport.go
index 4ded4dfd5..30f706e6c 100644
--- a/sdk/vendor/golang.org/x/net/http2/transport.go
+++ b/sdk/vendor/golang.org/x/net/http2/transport.go
@@ -16,6 +16,7 @@ import (
"errors"
"fmt"
"io"
+ "io/fs"
"log"
"math"
mathrand "math/rand"
@@ -67,13 +68,23 @@ const (
// A Transport internally caches connections to servers. It is safe
// for concurrent use by multiple goroutines.
type Transport struct {
- // DialTLS specifies an optional dial function for creating
- // TLS connections for requests.
+ // DialTLSContext specifies an optional dial function with context for
+ // creating TLS connections for requests.
//
- // If DialTLS is nil, tls.Dial is used.
+ // If DialTLSContext and DialTLS is nil, tls.Dial is used.
//
// If the returned net.Conn has a ConnectionState method like tls.Conn,
// it will be used to set http.Response.TLS.
+ DialTLSContext func(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error)
+
+ // DialTLS specifies an optional dial function for creating
+ // TLS connections for requests.
+ //
+ // If DialTLSContext and DialTLS is nil, tls.Dial is used.
+ //
+ // Deprecated: Use DialTLSContext instead, which allows the transport
+ // to cancel dials as soon as they are no longer needed.
+ // If both are set, DialTLSContext takes priority.
DialTLS func(network, addr string, cfg *tls.Config) (net.Conn, error)
// TLSClientConfig specifies the TLS configuration to use with
@@ -107,6 +118,28 @@ type Transport struct {
// to mean no limit.
MaxHeaderListSize uint32
+ // MaxReadFrameSize is the http2 SETTINGS_MAX_FRAME_SIZE to send in the
+ // initial settings frame. It is the size in bytes of the largest frame
+ // payload that the sender is willing to receive. If 0, no setting is
+ // sent, and the value is provided by the peer, which should be 16384
+ // according to the spec:
+ // https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2.
+ // Values are bounded in the range 16k to 16M.
+ MaxReadFrameSize uint32
+
+ // MaxDecoderHeaderTableSize optionally specifies the http2
+ // SETTINGS_HEADER_TABLE_SIZE to send in the initial settings frame. It
+ // informs the remote endpoint of the maximum size of the header compression
+ // table used to decode header blocks, in octets. If zero, the default value
+ // of 4096 is used.
+ MaxDecoderHeaderTableSize uint32
+
+ // MaxEncoderHeaderTableSize optionally specifies an upper limit for the
+ // header compression table used for encoding request headers. Received
+ // SETTINGS_HEADER_TABLE_SIZE settings are capped at this limit. If zero,
+ // the default value of 4096 is used.
+ MaxEncoderHeaderTableSize uint32
+
// StrictMaxConcurrentStreams controls whether the server's
// SETTINGS_MAX_CONCURRENT_STREAMS should be respected
// globally. If false, new TCP connections are created to the
@@ -160,6 +193,19 @@ func (t *Transport) maxHeaderListSize() uint32 {
return t.MaxHeaderListSize
}
+func (t *Transport) maxFrameReadSize() uint32 {
+ if t.MaxReadFrameSize == 0 {
+ return 0 // use the default provided by the peer
+ }
+ if t.MaxReadFrameSize < minMaxFrameSize {
+ return minMaxFrameSize
+ }
+ if t.MaxReadFrameSize > maxFrameSize {
+ return maxFrameSize
+ }
+ return t.MaxReadFrameSize
+}
+
func (t *Transport) disableCompression() bool {
return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression)
}
@@ -248,7 +294,8 @@ func (t *Transport) initConnPool() {
// HTTP/2 server.
type ClientConn struct {
t *Transport
- tconn net.Conn // usually *tls.Conn, except specialized impls
+ tconn net.Conn // usually *tls.Conn, except specialized impls
+ tconnClosed bool
tlsState *tls.ConnectionState // nil only for specialized impls
reused uint32 // whether conn is being reused; atomic
singleUse bool // whether being used for a single http.Request
@@ -281,10 +328,11 @@ type ClientConn struct {
lastActive time.Time
lastIdle time.Time // time last idle
// Settings from peer: (also guarded by wmu)
- maxFrameSize uint32
- maxConcurrentStreams uint32
- peerMaxHeaderListSize uint64
- initialWindowSize uint32
+ maxFrameSize uint32
+ maxConcurrentStreams uint32
+ peerMaxHeaderListSize uint64
+ peerMaxHeaderTableSize uint32
+ initialWindowSize uint32
// reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests.
// Write to reqHeaderMu to lock it, read from it to unlock.
@@ -334,8 +382,8 @@ type clientStream struct {
readErr error // sticky read error; owned by transportResponseBody.Read
reqBody io.ReadCloser
- reqBodyContentLength int64 // -1 means unknown
- reqBodyClosed bool // body has been closed; guarded by cc.mu
+ reqBodyContentLength int64 // -1 means unknown
+ reqBodyClosed chan struct{} // guarded by cc.mu; non-nil on Close, closed when done
// owned by writeRequest:
sentEndStream bool // sent an END_STREAM flag to the peer
@@ -375,9 +423,8 @@ func (cs *clientStream) abortStreamLocked(err error) {
cs.abortErr = err
close(cs.abort)
})
- if cs.reqBody != nil && !cs.reqBodyClosed {
- cs.reqBody.Close()
- cs.reqBodyClosed = true
+ if cs.reqBody != nil {
+ cs.closeReqBodyLocked()
}
// TODO(dneil): Clean up tests where cs.cc.cond is nil.
if cs.cc.cond != nil {
@@ -390,13 +437,24 @@ func (cs *clientStream) abortRequestBodyWrite() {
cc := cs.cc
cc.mu.Lock()
defer cc.mu.Unlock()
- if cs.reqBody != nil && !cs.reqBodyClosed {
- cs.reqBody.Close()
- cs.reqBodyClosed = true
+ if cs.reqBody != nil && cs.reqBodyClosed == nil {
+ cs.closeReqBodyLocked()
cc.cond.Broadcast()
}
}
+func (cs *clientStream) closeReqBodyLocked() {
+ if cs.reqBodyClosed != nil {
+ return
+ }
+ cs.reqBodyClosed = make(chan struct{})
+ reqBodyClosed := cs.reqBodyClosed
+ go func() {
+ cs.reqBody.Close()
+ close(reqBodyClosed)
+ }()
+}
+
type stickyErrWriter struct {
conn net.Conn
timeout time.Duration
@@ -480,6 +538,15 @@ func authorityAddr(scheme string, authority string) (addr string) {
return net.JoinHostPort(host, port)
}
+var retryBackoffHook func(time.Duration) *time.Timer
+
+func backoffNewTimer(d time.Duration) *time.Timer {
+ if retryBackoffHook != nil {
+ return retryBackoffHook(d)
+ }
+ return time.NewTimer(d)
+}
+
// RoundTripOpt is like RoundTrip, but takes options.
func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) {
if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) {
@@ -505,11 +572,14 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
}
backoff := float64(uint(1) << (uint(retry) - 1))
backoff += backoff * (0.1 * mathrand.Float64())
+ d := time.Second * time.Duration(backoff)
+ timer := backoffNewTimer(d)
select {
- case <-time.After(time.Second * time.Duration(backoff)):
+ case <-timer.C:
t.vlogf("RoundTrip retrying after failure: %v", err)
continue
case <-req.Context().Done():
+ timer.Stop()
err = req.Context().Err()
}
}
@@ -592,7 +662,7 @@ func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse b
if err != nil {
return nil, err
}
- tconn, err := t.dialTLS(ctx)("tcp", addr, t.newTLSConfig(host))
+ tconn, err := t.dialTLS(ctx, "tcp", addr, t.newTLSConfig(host))
if err != nil {
return nil, err
}
@@ -613,24 +683,25 @@ func (t *Transport) newTLSConfig(host string) *tls.Config {
return cfg
}
-func (t *Transport) dialTLS(ctx context.Context) func(string, string, *tls.Config) (net.Conn, error) {
- if t.DialTLS != nil {
- return t.DialTLS
+func (t *Transport) dialTLS(ctx context.Context, network, addr string, tlsCfg *tls.Config) (net.Conn, error) {
+ if t.DialTLSContext != nil {
+ return t.DialTLSContext(ctx, network, addr, tlsCfg)
+ } else if t.DialTLS != nil {
+ return t.DialTLS(network, addr, tlsCfg)
}
- return func(network, addr string, cfg *tls.Config) (net.Conn, error) {
- tlsCn, err := t.dialTLSWithContext(ctx, network, addr, cfg)
- if err != nil {
- return nil, err
- }
- state := tlsCn.ConnectionState()
- if p := state.NegotiatedProtocol; p != NextProtoTLS {
- return nil, fmt.Errorf("http2: unexpected ALPN protocol %q; want %q", p, NextProtoTLS)
- }
- if !state.NegotiatedProtocolIsMutual {
- return nil, errors.New("http2: could not negotiate protocol mutually")
- }
- return tlsCn, nil
+
+ tlsCn, err := t.dialTLSWithContext(ctx, network, addr, tlsCfg)
+ if err != nil {
+ return nil, err
+ }
+ state := tlsCn.ConnectionState()
+ if p := state.NegotiatedProtocol; p != NextProtoTLS {
+ return nil, fmt.Errorf("http2: unexpected ALPN protocol %q; want %q", p, NextProtoTLS)
}
+ if !state.NegotiatedProtocolIsMutual {
+ return nil, errors.New("http2: could not negotiate protocol mutually")
+ }
+ return tlsCn, nil
}
// disableKeepAlives reports whether connections should be closed as
@@ -646,6 +717,20 @@ func (t *Transport) expectContinueTimeout() time.Duration {
return t.t1.ExpectContinueTimeout
}
+func (t *Transport) maxDecoderHeaderTableSize() uint32 {
+ if v := t.MaxDecoderHeaderTableSize; v > 0 {
+ return v
+ }
+ return initialHeaderTableSize
+}
+
+func (t *Transport) maxEncoderHeaderTableSize() uint32 {
+ if v := t.MaxEncoderHeaderTableSize; v > 0 {
+ return v
+ }
+ return initialHeaderTableSize
+}
+
func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) {
return t.newClientConn(c, t.disableKeepAlives())
}
@@ -686,15 +771,19 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
})
cc.br = bufio.NewReader(c)
cc.fr = NewFramer(cc.bw, cc.br)
+ if t.maxFrameReadSize() != 0 {
+ cc.fr.SetMaxReadFrameSize(t.maxFrameReadSize())
+ }
if t.CountError != nil {
cc.fr.countError = t.CountError
}
- cc.fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil)
+ maxHeaderTableSize := t.maxDecoderHeaderTableSize()
+ cc.fr.ReadMetaHeaders = hpack.NewDecoder(maxHeaderTableSize, nil)
cc.fr.MaxHeaderListSize = t.maxHeaderListSize()
- // TODO: SetMaxDynamicTableSize, SetMaxDynamicTableSizeLimit on
- // henc in response to SETTINGS frames?
cc.henc = hpack.NewEncoder(&cc.hbuf)
+ cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize())
+ cc.peerMaxHeaderTableSize = initialHeaderTableSize
if t.AllowHTTP {
cc.nextStreamID = 3
@@ -709,9 +798,15 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
{ID: SettingEnablePush, Val: 0},
{ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow},
}
+ if max := t.maxFrameReadSize(); max != 0 {
+ initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: max})
+ }
if max := t.maxHeaderListSize(); max != 0 {
initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max})
}
+ if maxHeaderTableSize != initialHeaderTableSize {
+ initialSettings = append(initialSettings, Setting{ID: SettingHeaderTableSize, Val: maxHeaderTableSize})
+ }
cc.bw.Write(clientPreface)
cc.fr.WriteSettings(initialSettings...)
@@ -910,10 +1005,10 @@ func (cc *ClientConn) onIdleTimeout() {
cc.closeIfIdle()
}
-func (cc *ClientConn) closeConn() error {
+func (cc *ClientConn) closeConn() {
t := time.AfterFunc(250*time.Millisecond, cc.forceCloseConn)
defer t.Stop()
- return cc.tconn.Close()
+ cc.tconn.Close()
}
// A tls.Conn.Close can hang for a long time if the peer is unresponsive.
@@ -979,7 +1074,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
shutdownEnterWaitStateHook()
select {
case <-done:
- return cc.closeConn()
+ cc.closeConn()
+ return nil
case <-ctx.Done():
cc.mu.Lock()
// Free the goroutine above
@@ -1016,7 +1112,7 @@ func (cc *ClientConn) sendGoAway() error {
// closes the client connection immediately. In-flight requests are interrupted.
// err is sent to streams.
-func (cc *ClientConn) closeForError(err error) error {
+func (cc *ClientConn) closeForError(err error) {
cc.mu.Lock()
cc.closed = true
for _, cs := range cc.streams {
@@ -1024,7 +1120,7 @@ func (cc *ClientConn) closeForError(err error) error {
}
cc.cond.Broadcast()
cc.mu.Unlock()
- return cc.closeConn()
+ cc.closeConn()
}
// Close closes the client connection immediately.
@@ -1032,16 +1128,17 @@ func (cc *ClientConn) closeForError(err error) error {
// In-flight requests are interrupted. For a graceful shutdown, use Shutdown instead.
func (cc *ClientConn) Close() error {
err := errors.New("http2: client connection force closed via ClientConn.Close")
- return cc.closeForError(err)
+ cc.closeForError(err)
+ return nil
}
// closes the client connection immediately. In-flight requests are interrupted.
-func (cc *ClientConn) closeForLostPing() error {
+func (cc *ClientConn) closeForLostPing() {
err := errors.New("http2: client connection lost")
if f := cc.t.CountError; f != nil {
f("conn_close_lost_ping")
}
- return cc.closeForError(err)
+ cc.closeForError(err)
}
// errRequestCanceled is a copy of net/http's errRequestCanceled because it's not
@@ -1051,7 +1148,7 @@ var errRequestCanceled = errors.New("net/http: request canceled")
func commaSeparatedTrailers(req *http.Request) (string, error) {
keys := make([]string, 0, len(req.Trailer))
for k := range req.Trailer {
- k = http.CanonicalHeaderKey(k)
+ k = canonicalHeader(k)
switch k {
case "Transfer-Encoding", "Trailer", "Content-Length":
return "", fmt.Errorf("invalid Trailer key %q", k)
@@ -1419,11 +1516,19 @@ func (cs *clientStream) cleanupWriteRequest(err error) {
// and in multiple cases: server replies <=299 and >299
// while still writing request body
cc.mu.Lock()
+ mustCloseBody := false
+ if cs.reqBody != nil && cs.reqBodyClosed == nil {
+ mustCloseBody = true
+ cs.reqBodyClosed = make(chan struct{})
+ }
bodyClosed := cs.reqBodyClosed
- cs.reqBodyClosed = true
cc.mu.Unlock()
- if !bodyClosed && cs.reqBody != nil {
+ if mustCloseBody {
cs.reqBody.Close()
+ close(bodyClosed)
+ }
+ if bodyClosed != nil {
+ <-bodyClosed
}
if err != nil && cs.sentEndStream {
@@ -1580,7 +1685,7 @@ func (cs *clientStream) writeRequestBody(req *http.Request) (err error) {
var sawEOF bool
for !sawEOF {
- n, err := body.Read(buf[:len(buf)])
+ n, err := body.Read(buf)
if hasContentLen {
remainLen -= int64(n)
if remainLen == 0 && err == nil {
@@ -1603,7 +1708,7 @@ func (cs *clientStream) writeRequestBody(req *http.Request) (err error) {
}
if err != nil {
cc.mu.Lock()
- bodyClosed := cs.reqBodyClosed
+ bodyClosed := cs.reqBodyClosed != nil
cc.mu.Unlock()
switch {
case bodyClosed:
@@ -1698,7 +1803,7 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
if cc.closed {
return 0, errClientConnClosed
}
- if cs.reqBodyClosed {
+ if cs.reqBodyClosed != nil {
return 0, errStopReqBodyWrite
}
select {
@@ -1883,7 +1988,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
// Header list size is ok. Write the headers.
enumerateHeaders(func(name, value string) {
- name, ascii := asciiToLower(name)
+ name, ascii := lowerHeader(name)
if !ascii {
// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
// field names have to be ASCII characters (just as in HTTP/1.x).
@@ -1936,7 +2041,7 @@ func (cc *ClientConn) encodeTrailers(trailer http.Header) ([]byte, error) {
}
for k, vv := range trailer {
- lowKey, ascii := asciiToLower(k)
+ lowKey, ascii := lowerHeader(k)
if !ascii {
// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
// field names have to be ASCII characters (just as in HTTP/1.x).
@@ -1994,7 +2099,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) {
// wake up RoundTrip if there is a pending request.
cc.cond.Broadcast()
- closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives()
+ closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil
if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 {
if VerboseLogs {
cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, cc.nextStreamID-2)
@@ -2070,6 +2175,7 @@ func (rl *clientConnReadLoop) cleanup() {
err = io.ErrUnexpectedEOF
}
cc.closed = true
+
for _, cs := range cc.streams {
select {
case <-cs.peerClosed:
@@ -2268,7 +2374,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
Status: status + " " + http.StatusText(statusCode),
}
for _, hf := range regularFields {
- key := http.CanonicalHeaderKey(hf.Name)
+ key := canonicalHeader(hf.Name)
if key == "Trailer" {
t := res.Trailer
if t == nil {
@@ -2276,7 +2382,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
res.Trailer = t
}
foreachHeaderElement(hf.Value, func(v string) {
- t[http.CanonicalHeaderKey(v)] = nil
+ t[canonicalHeader(v)] = nil
})
} else {
vv := header[key]
@@ -2381,7 +2487,7 @@ func (rl *clientConnReadLoop) processTrailers(cs *clientStream, f *MetaHeadersFr
trailer := make(http.Header)
for _, hf := range f.RegularFields() {
- key := http.CanonicalHeaderKey(hf.Name)
+ key := canonicalHeader(hf.Name)
trailer[key] = append(trailer[key], hf.Value)
}
cs.trailer = trailer
@@ -2663,7 +2769,6 @@ func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error {
if fn := cc.t.CountError; fn != nil {
fn("recv_goaway_" + f.ErrCode.stringToken())
}
-
}
cc.setGoAway(f)
return nil
@@ -2728,8 +2833,10 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error {
cc.cond.Broadcast()
cc.initialWindowSize = s.Val
+ case SettingHeaderTableSize:
+ cc.henc.SetMaxDynamicTableSize(s.Val)
+ cc.peerMaxHeaderTableSize = s.Val
default:
- // TODO(bradfitz): handle more settings? SETTINGS_HEADER_TABLE_SIZE probably.
cc.vlogf("Unhandled Setting: %v", s)
}
return nil
@@ -2953,7 +3060,11 @@ func (gz *gzipReader) Read(p []byte) (n int, err error) {
}
func (gz *gzipReader) Close() error {
- return gz.body.Close()
+ if err := gz.body.Close(); err != nil {
+ return err
+ }
+ gz.zerr = fs.ErrClosed
+ return nil
}
type errorReader struct{ err error }
@@ -3017,7 +3128,7 @@ func traceGotConn(req *http.Request, cc *ClientConn, reused bool) {
cc.mu.Lock()
ci.WasIdle = len(cc.streams) == 0 && reused
if ci.WasIdle && !cc.lastActive.IsZero() {
- ci.IdleTime = time.Now().Sub(cc.lastActive)
+ ci.IdleTime = time.Since(cc.lastActive)
}
cc.mu.Unlock()
diff --git a/sdk/vendor/golang.org/x/net/trace/trace.go b/sdk/vendor/golang.org/x/net/trace/trace.go
index 3ebf6f2da..eae2a99f5 100644
--- a/sdk/vendor/golang.org/x/net/trace/trace.go
+++ b/sdk/vendor/golang.org/x/net/trace/trace.go
@@ -395,7 +395,7 @@ func New(family, title string) Trace {
}
func (tr *trace) Finish() {
- elapsed := time.Now().Sub(tr.Start)
+ elapsed := time.Since(tr.Start)
tr.mu.Lock()
tr.Elapsed = elapsed
tr.mu.Unlock()
diff --git a/sdk/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s b/sdk/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s
new file mode 100644
index 000000000..e5b9a8489
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s
@@ -0,0 +1,31 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
+// +build darwin freebsd netbsd openbsd
+// +build gc
+
+#include "textflag.h"
+
+//
+// System call support for ppc64, BSD
+//
+
+// Just jump to package syscall's implementation for all these functions.
+// The runtime may know about them.
+
+TEXT ·Syscall(SB),NOSPLIT,$0-56
+ JMP syscall·Syscall(SB)
+
+TEXT ·Syscall6(SB),NOSPLIT,$0-80
+ JMP syscall·Syscall6(SB)
+
+TEXT ·Syscall9(SB),NOSPLIT,$0-104
+ JMP syscall·Syscall9(SB)
+
+TEXT ·RawSyscall(SB),NOSPLIT,$0-56
+ JMP syscall·RawSyscall(SB)
+
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
+ JMP syscall·RawSyscall6(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/dirent.go b/sdk/vendor/golang.org/x/sys/unix/dirent.go
index e74e5eaa3..2499f977b 100644
--- a/sdk/vendor/golang.org/x/sys/unix/dirent.go
+++ b/sdk/vendor/golang.org/x/sys/unix/dirent.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
diff --git a/sdk/vendor/golang.org/x/sys/unix/ioctl_linux.go b/sdk/vendor/golang.org/x/sys/unix/ioctl_linux.go
index 884430b81..0d12c0851 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ioctl_linux.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ioctl_linux.go
@@ -4,9 +4,7 @@
package unix
-import (
- "unsafe"
-)
+import "unsafe"
// IoctlRetInt performs an ioctl operation specified by req on a device
// associated with opened file descriptor fd, and returns a non-negative
@@ -217,3 +215,19 @@ func IoctlKCMAttach(fd int, info KCMAttach) error {
func IoctlKCMUnattach(fd int, info KCMUnattach) error {
return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
}
+
+// IoctlLoopGetStatus64 gets the status of the loop device associated with the
+// file descriptor fd using the LOOP_GET_STATUS64 operation.
+func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) {
+ var value LoopInfo64
+ if err := ioctlPtr(fd, LOOP_GET_STATUS64, unsafe.Pointer(&value)); err != nil {
+ return nil, err
+ }
+ return &value, nil
+}
+
+// IoctlLoopSetStatus64 sets the status of the loop device associated with the
+// file descriptor fd using the LOOP_SET_STATUS64 operation.
+func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error {
+ return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value))
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/mkall.sh b/sdk/vendor/golang.org/x/sys/unix/mkall.sh
index dcef4de6f..727cba212 100644
--- a/sdk/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/sdk/vendor/golang.org/x/sys/unix/mkall.sh
@@ -73,12 +73,12 @@ aix_ppc64)
darwin_amd64)
mkerrors="$mkerrors -m64"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- mkasm="go run mkasm_darwin.go"
+ mkasm="go run mkasm.go"
;;
darwin_arm64)
mkerrors="$mkerrors -m64"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- mkasm="go run mkasm_darwin.go"
+ mkasm="go run mkasm.go"
;;
dragonfly_amd64)
mkerrors="$mkerrors -m64"
@@ -142,33 +142,33 @@ netbsd_arm64)
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
openbsd_386)
+ mkasm="go run mkasm.go"
mkerrors="$mkerrors -m32"
- mksyscall="go run mksyscall.go -l32 -openbsd"
+ mksyscall="go run mksyscall.go -l32 -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go"
- mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
openbsd_amd64)
+ mkasm="go run mkasm.go"
mkerrors="$mkerrors -m64"
- mksyscall="go run mksyscall.go -openbsd"
+ mksyscall="go run mksyscall.go -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go"
- mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
openbsd_arm)
+ mkasm="go run mkasm.go"
mkerrors="$mkerrors"
- mksyscall="go run mksyscall.go -l32 -openbsd -arm"
+ mksyscall="go run mksyscall.go -l32 -openbsd -arm -libc"
mksysctl="go run mksysctl_openbsd.go"
- mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
# Let the type of C char be signed for making the bare syscall
# API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
openbsd_arm64)
+ mkasm="go run mkasm.go"
mkerrors="$mkerrors -m64"
- mksyscall="go run mksyscall.go -openbsd"
+ mksyscall="go run mksyscall.go -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go"
- mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
# Let the type of C char be signed for making the bare syscall
# API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
@@ -182,6 +182,24 @@ openbsd_mips64)
# API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
+openbsd_ppc64)
+ mkasm="go run mkasm.go"
+ mkerrors="$mkerrors -m64"
+ mksyscall="go run mksyscall.go -openbsd -libc"
+ mksysctl="go run mksysctl_openbsd.go"
+ # Let the type of C char be signed for making the bare syscall
+ # API consistent across platforms.
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
+ ;;
+openbsd_riscv64)
+ mkasm="go run mkasm.go"
+ mkerrors="$mkerrors -m64"
+ mksyscall="go run mksyscall.go -openbsd -libc"
+ mksysctl="go run mksysctl_openbsd.go"
+ # Let the type of C char be signed for making the bare syscall
+ # API consistent across platforms.
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
+ ;;
solaris_amd64)
mksyscall="go run mksyscall_solaris.go"
mkerrors="$mkerrors -m64"
@@ -214,11 +232,6 @@ esac
if [ "$GOOSARCH" == "aix_ppc64" ]; then
# aix/ppc64 script generates files instead of writing to stdin.
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
- elif [ "$GOOS" == "darwin" ]; then
- # 1.12 and later, syscalls via libSystem
- echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
- # 1.13 and later, syscalls via libSystem (including syscallPtr)
- echo "$mksyscall -tags $GOOS,$GOARCH,go1.13 syscall_darwin.1_13.go |gofmt >zsyscall_$GOOSARCH.1_13.go";
elif [ "$GOOS" == "illumos" ]; then
# illumos code generation requires a --illumos switch
echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go";
@@ -232,5 +245,5 @@ esac
if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go"; fi
- if [ -n "$mkasm" ]; then echo "$mkasm $GOARCH"; fi
+ if [ -n "$mkasm" ]; then echo "$mkasm $GOOS $GOARCH"; fi
) | $run
diff --git a/sdk/vendor/golang.org/x/sys/unix/mkerrors.sh b/sdk/vendor/golang.org/x/sys/unix/mkerrors.sh
index 2ab44aa65..7456d9ddd 100644
--- a/sdk/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/sdk/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -642,7 +642,7 @@ errors=$(
signals=$(
echo '#include ' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
+ grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
sort
)
@@ -652,7 +652,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags |
sort >_error.grep
echo '#include ' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
+ grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
sort >_signal.grep
echo '// mkerrors.sh' "$@"
diff --git a/sdk/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/sdk/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
index 453a942c5..3865943f6 100644
--- a/sdk/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
+++ b/sdk/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
@@ -52,6 +52,20 @@ func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {
return msgs, nil
}
+// ParseOneSocketControlMessage parses a single socket control message from b, returning the message header,
+// message data (a slice of b), and the remainder of b after that single message.
+// When there are no remaining messages, len(remainder) == 0.
+func ParseOneSocketControlMessage(b []byte) (hdr Cmsghdr, data []byte, remainder []byte, err error) {
+ h, dbuf, err := socketControlMessageHeaderAndData(b)
+ if err != nil {
+ return Cmsghdr{}, nil, nil, err
+ }
+ if i := cmsgAlignOf(int(h.Len)); i < len(b) {
+ remainder = b[i:]
+ }
+ return *h, dbuf, remainder, nil
+}
+
func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {
diff --git a/sdk/vendor/golang.org/x/sys/unix/str.go b/sdk/vendor/golang.org/x/sys/unix/str.go
deleted file mode 100644
index 8ba89ed86..000000000
--- a/sdk/vendor/golang.org/x/sys/unix/str.go
+++ /dev/null
@@ -1,27 +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.
-
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-func itoa(val int) string { // do it here rather than with fmt to avoid dependency
- if val < 0 {
- return "-" + uitoa(uint(-val))
- }
- return uitoa(uint(val))
-}
-
-func uitoa(val uint) string {
- var buf [32]byte // big enough for int64
- i := len(buf) - 1
- for val >= 10 {
- buf[i] = byte(val%10 + '0')
- i--
- val /= 10
- }
- buf[i] = byte(val + '0')
- return string(buf[i:])
-}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall.go b/sdk/vendor/golang.org/x/sys/unix/syscall.go
index 649fa8740..63e8c8383 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall.go
@@ -29,8 +29,6 @@ import (
"bytes"
"strings"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
@@ -82,13 +80,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
- var s []byte
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(s)
+ return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go b/sdk/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
deleted file mode 100644
index b0098607c..000000000
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
+++ /dev/null
@@ -1,32 +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 darwin && go1.12 && !go1.13
-// +build darwin,go1.12,!go1.13
-
-package unix
-
-import (
- "unsafe"
-)
-
-const _SYS_GETDIRENTRIES64 = 344
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- // To implement this using libSystem we'd need syscall_syscallPtr for
- // fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
- // back to raw syscalls for this func on Go 1.12.
- var p unsafe.Pointer
- if len(buf) > 0 {
- p = unsafe.Pointer(&buf[0])
- } else {
- p = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- return n, errnoErr(e1)
- }
- return n, nil
-}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go b/sdk/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
deleted file mode 100644
index 1596426b1..000000000
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
+++ /dev/null
@@ -1,108 +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 darwin && go1.13
-// +build darwin,go1.13
-
-package unix
-
-import (
- "unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
-)
-
-//sys closedir(dir uintptr) (err error)
-//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
-
-func fdopendir(fd int) (dir uintptr, err error) {
- r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
- dir = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_fdopendir_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- // Simulate Getdirentries using fdopendir/readdir_r/closedir.
- // We store the number of entries to skip in the seek
- // offset of fd. See issue #31368.
- // It's not the full required semantics, but should handle the case
- // of calling Getdirentries or ReadDirent repeatedly.
- // It won't handle assigning the results of lseek to *basep, or handle
- // the directory being edited underfoot.
- skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
- if err != nil {
- return 0, err
- }
-
- // We need to duplicate the incoming file descriptor
- // because the caller expects to retain control of it, but
- // fdopendir expects to take control of its argument.
- // Just Dup'ing the file descriptor is not enough, as the
- // result shares underlying state. Use Openat to make a really
- // new file descriptor referring to the same directory.
- fd2, err := Openat(fd, ".", O_RDONLY, 0)
- if err != nil {
- return 0, err
- }
- d, err := fdopendir(fd2)
- if err != nil {
- Close(fd2)
- return 0, err
- }
- defer closedir(d)
-
- var cnt int64
- for {
- var entry Dirent
- var entryp *Dirent
- e := readdir_r(d, &entry, &entryp)
- if e != 0 {
- return n, errnoErr(e)
- }
- if entryp == nil {
- break
- }
- if skip > 0 {
- skip--
- cnt++
- continue
- }
-
- reclen := int(entry.Reclen)
- if reclen > len(buf) {
- // Not enough room. Return for now.
- // The counter will let us know where we should start up again.
- // Note: this strategy for suspending in the middle and
- // restarting is O(n^2) in the length of the directory. Oh well.
- break
- }
-
- // Copy entry into return buffer.
- var s []byte
- hdr := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- hdr.Data = unsafe.Pointer(&entry)
- hdr.Cap = reclen
- hdr.Len = reclen
- copy(buf, s)
-
- buf = buf[reclen:]
- n += reclen
- cnt++
- }
- // Set the seek offset of the input fd to record
- // how many files we've already returned.
- _, err = Seek(fd, cnt, 0 /* SEEK_SET */)
- if err != nil {
- return n, err
- }
-
- return n, nil
-}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_darwin.go b/sdk/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 4f87f16ea..1f6338218 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -19,6 +19,96 @@ import (
"unsafe"
)
+//sys closedir(dir uintptr) (err error)
+//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
+
+func fdopendir(fd int) (dir uintptr, err error) {
+ r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
+ dir = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fdopendir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
+
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ // Simulate Getdirentries using fdopendir/readdir_r/closedir.
+ // We store the number of entries to skip in the seek
+ // offset of fd. See issue #31368.
+ // It's not the full required semantics, but should handle the case
+ // of calling Getdirentries or ReadDirent repeatedly.
+ // It won't handle assigning the results of lseek to *basep, or handle
+ // the directory being edited underfoot.
+ skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
+ if err != nil {
+ return 0, err
+ }
+
+ // We need to duplicate the incoming file descriptor
+ // because the caller expects to retain control of it, but
+ // fdopendir expects to take control of its argument.
+ // Just Dup'ing the file descriptor is not enough, as the
+ // result shares underlying state. Use Openat to make a really
+ // new file descriptor referring to the same directory.
+ fd2, err := Openat(fd, ".", O_RDONLY, 0)
+ if err != nil {
+ return 0, err
+ }
+ d, err := fdopendir(fd2)
+ if err != nil {
+ Close(fd2)
+ return 0, err
+ }
+ defer closedir(d)
+
+ var cnt int64
+ for {
+ var entry Dirent
+ var entryp *Dirent
+ e := readdir_r(d, &entry, &entryp)
+ if e != 0 {
+ return n, errnoErr(e)
+ }
+ if entryp == nil {
+ break
+ }
+ if skip > 0 {
+ skip--
+ cnt++
+ continue
+ }
+
+ reclen := int(entry.Reclen)
+ if reclen > len(buf) {
+ // Not enough room. Return for now.
+ // The counter will let us know where we should start up again.
+ // Note: this strategy for suspending in the middle and
+ // restarting is O(n^2) in the length of the directory. Oh well.
+ break
+ }
+
+ // Copy entry into return buffer.
+ s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
+ copy(buf, s)
+
+ buf = buf[reclen:]
+ n += reclen
+ cnt++
+ }
+ // Set the seek offset of the input fd to record
+ // how many files we've already returned.
+ _, err = Seek(fd, cnt, 0 /* SEEK_SET */)
+ if err != nil {
+ return n, err
+ }
+
+ return n, nil
+}
+
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
type SockaddrDatalink struct {
Len uint8
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
index c3c4c698e..b11ede89a 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
@@ -61,7 +61,7 @@ func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
}
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
- ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
+ ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
index 82be61a2f..9ed8eec6c 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
@@ -61,7 +61,7 @@ func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
}
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
- ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
+ ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
index cd58f1026..f8ac98247 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
@@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
- ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
+ ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go b/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
index d6f538f9e..8e932036e 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
@@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
- ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
+ ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
index 8ea6e9610..cbe122278 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
@@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
- ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
+ ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_illumos.go b/sdk/vendor/golang.org/x/sys/unix/syscall_illumos.go
index e48244a9c..87db5a6a8 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_illumos.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_illumos.go
@@ -10,8 +10,6 @@
package unix
import (
- "fmt"
- "runtime"
"unsafe"
)
@@ -79,107 +77,3 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
}
return
}
-
-//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
-
-func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
- var clp, datap *strbuf
- if len(cl) > 0 {
- clp = &strbuf{
- Len: int32(len(cl)),
- Buf: (*int8)(unsafe.Pointer(&cl[0])),
- }
- }
- if len(data) > 0 {
- datap = &strbuf{
- Len: int32(len(data)),
- Buf: (*int8)(unsafe.Pointer(&data[0])),
- }
- }
- return putmsg(fd, clp, datap, flags)
-}
-
-//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
-
-func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
- var clp, datap *strbuf
- if len(cl) > 0 {
- clp = &strbuf{
- Maxlen: int32(len(cl)),
- Buf: (*int8)(unsafe.Pointer(&cl[0])),
- }
- }
- if len(data) > 0 {
- datap = &strbuf{
- Maxlen: int32(len(data)),
- Buf: (*int8)(unsafe.Pointer(&data[0])),
- }
- }
-
- if err = getmsg(fd, clp, datap, &flags); err != nil {
- return nil, nil, 0, err
- }
-
- if len(cl) > 0 {
- retCl = cl[:clp.Len]
- }
- if len(data) > 0 {
- retData = data[:datap.Len]
- }
- return retCl, retData, flags, nil
-}
-
-func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
- return ioctlRet(fd, req, uintptr(arg))
-}
-
-func IoctlSetString(fd int, req uint, val string) error {
- bs := make([]byte, len(val)+1)
- copy(bs[:len(bs)-1], val)
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
- runtime.KeepAlive(&bs[0])
- return err
-}
-
-// Lifreq Helpers
-
-func (l *Lifreq) SetName(name string) error {
- if len(name) >= len(l.Name) {
- return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
- }
- for i := range name {
- l.Name[i] = int8(name[i])
- }
- return nil
-}
-
-func (l *Lifreq) SetLifruInt(d int) {
- *(*int)(unsafe.Pointer(&l.Lifru[0])) = d
-}
-
-func (l *Lifreq) GetLifruInt() int {
- return *(*int)(unsafe.Pointer(&l.Lifru[0]))
-}
-
-func (l *Lifreq) SetLifruUint(d uint) {
- *(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
-}
-
-func (l *Lifreq) GetLifruUint() uint {
- return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
-}
-
-func IoctlLifreq(fd int, req uint, l *Lifreq) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
-}
-
-// Strioctl Helpers
-
-func (s *Strioctl) SetInt(i int) {
- s.Len = int32(unsafe.Sizeof(i))
- s.Dp = (*int8)(unsafe.Pointer(&i))
-}
-
-func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
- return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
-}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux.go
index ecb0f27fb..c5a98440e 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -13,6 +13,7 @@ package unix
import (
"encoding/binary"
+ "strconv"
"syscall"
"time"
"unsafe"
@@ -233,7 +234,7 @@ func Futimesat(dirfd int, path string, tv []Timeval) error {
func Futimes(fd int, tv []Timeval) (err error) {
// Believe it or not, this is the best we can do on Linux
// (and is what glibc does).
- return Utimes("/proc/self/fd/"+itoa(fd), tv)
+ return Utimes("/proc/self/fd/"+strconv.Itoa(fd), tv)
}
const ImplementsGetwd = true
@@ -1553,6 +1554,7 @@ func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Sockle
var iova [1]Iovec
iova[0].Base = &dummy
iova[0].SetLen(1)
+ iov = iova[:]
}
}
msg.Control = &oob[0]
@@ -1891,17 +1893,28 @@ func PrctlRetInt(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uint
return int(ret), nil
}
-// issue 1435.
-// On linux Setuid and Setgid only affects the current thread, not the process.
-// This does not match what most callers expect so we must return an error
-// here rather than letting the caller think that the call succeeded.
-
func Setuid(uid int) (err error) {
- return EOPNOTSUPP
+ return syscall.Setuid(uid)
+}
+
+func Setgid(gid int) (err error) {
+ return syscall.Setgid(gid)
+}
+
+func Setreuid(ruid, euid int) (err error) {
+ return syscall.Setreuid(ruid, euid)
+}
+
+func Setregid(rgid, egid int) (err error) {
+ return syscall.Setregid(rgid, egid)
+}
+
+func Setresuid(ruid, euid, suid int) (err error) {
+ return syscall.Setresuid(ruid, euid, suid)
}
-func Setgid(uid int) (err error) {
- return EOPNOTSUPP
+func Setresgid(rgid, egid, sgid int) (err error) {
+ return syscall.Setresgid(rgid, egid, sgid)
}
// SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set.
@@ -2240,7 +2253,7 @@ func (fh *FileHandle) Bytes() []byte {
if n == 0 {
return nil
}
- return (*[1 << 30]byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type)) + 4))[:n:n]
+ return unsafe.Slice((*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type))+4)), n)
}
// NameToHandleAt wraps the name_to_handle_at system call; it obtains
@@ -2356,6 +2369,16 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
return prev, nil
}
+//sysnb rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) = SYS_RT_SIGPROCMASK
+
+func PthreadSigmask(how int, set, oldset *Sigset_t) error {
+ if oldset != nil {
+ // Explicitly clear in case Sigset_t is larger than _C__NSIG.
+ *oldset = Sigset_t{}
+ }
+ return rtSigprocmask(how, set, oldset, _C__NSIG/8)
+}
+
/*
* Unimplemented
*/
@@ -2414,7 +2437,6 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
// RestartSyscall
// RtSigaction
// RtSigpending
-// RtSigprocmask
// RtSigqueueinfo
// RtSigreturn
// RtSigsuspend
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index 518e476e6..ff5b5899d 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -41,10 +41,6 @@ func setTimeval(sec, usec int64) Timeval {
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index f5e9d6bef..9b2703532 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -46,11 +46,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index c1a7778f1..856ad1d63 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -62,10 +62,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index d83e2c657..6422704bc 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -39,11 +39,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
index 0b69c3eff..59dab510e 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
@@ -34,10 +34,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index 98a2660b9..bfef09a39 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -37,11 +37,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Statfs(path string, buf *Statfs_t) (err error)
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
index b8a18c0ad..ab3025096 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -32,10 +32,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
index 4ed9e67c6..eac1cf1ac 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
@@ -34,10 +34,6 @@ import (
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index db63d384c..4df56616b 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -34,11 +34,7 @@ package unix
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index 925a748a3..5f4243dea 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -38,11 +38,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index 6fcf277b0..d0a7d4066 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -34,11 +34,7 @@ import (
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, buf *Statfs_t) (err error)
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
index 02a45d9cc..f5c793be2 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -31,11 +31,7 @@ package unix
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go b/sdk/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go
new file mode 100644
index 000000000..e23c5394e
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go
@@ -0,0 +1,27 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build openbsd && !mips64
+// +build openbsd,!mips64
+
+package unix
+
+import _ "unsafe"
+
+// Implemented in the runtime package (runtime/sys_openbsd3.go)
+func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
+
+//go:linkname syscall_syscall syscall.syscall
+//go:linkname syscall_syscall6 syscall.syscall6
+//go:linkname syscall_syscall10 syscall.syscall10
+//go:linkname syscall_rawSyscall syscall.rawSyscall
+//go:linkname syscall_rawSyscall6 syscall.rawSyscall6
+
+func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) {
+ return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0)
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go b/sdk/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go
new file mode 100644
index 000000000..c2796139c
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go
@@ -0,0 +1,42 @@
+// 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 ppc64 && openbsd
+// +build ppc64,openbsd
+
+package unix
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: sec, Usec: usec}
+}
+
+func SetKevent(k *Kevent_t, fd, mode, flags int) {
+ k.Ident = uint64(fd)
+ k.Filter = int16(mode)
+ k.Flags = uint16(flags)
+}
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(length)
+}
+
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint32(length)
+}
+
+// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
+// of openbsd/ppc64 the syscall is called sysctl instead of __sysctl.
+const SYS___SYSCTL = SYS_SYSCTL
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go
new file mode 100644
index 000000000..23199a7ff
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go
@@ -0,0 +1,42 @@
+// 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 riscv64 && openbsd
+// +build riscv64,openbsd
+
+package unix
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: sec, Usec: usec}
+}
+
+func SetKevent(k *Kevent_t, fd, mode, flags int) {
+ k.Ident = uint64(fd)
+ k.Filter = int16(mode)
+ k.Flags = uint16(flags)
+}
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(length)
+}
+
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint32(length)
+}
+
+// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
+// of openbsd/riscv64 the syscall is called sysctl instead of __sysctl.
+const SYS___SYSCTL = SYS_SYSCTL
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_solaris.go b/sdk/vendor/golang.org/x/sys/unix/syscall_solaris.go
index b5ec457cd..2109e569c 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -750,8 +750,8 @@ type EventPort struct {
// we should handle things gracefully. To do so, we need to keep an extra
// reference to the cookie around until the event is processed
// thus the otherwise seemingly extraneous "cookies" map
- // The key of this map is a pointer to the corresponding &fCookie.cookie
- cookies map[*interface{}]*fileObjCookie
+ // The key of this map is a pointer to the corresponding fCookie
+ cookies map[*fileObjCookie]struct{}
}
// PortEvent is an abstraction of the port_event C struct.
@@ -778,7 +778,7 @@ func NewEventPort() (*EventPort, error) {
port: port,
fds: make(map[uintptr]*fileObjCookie),
paths: make(map[string]*fileObjCookie),
- cookies: make(map[*interface{}]*fileObjCookie),
+ cookies: make(map[*fileObjCookie]struct{}),
}
return e, nil
}
@@ -799,6 +799,7 @@ func (e *EventPort) Close() error {
}
e.fds = nil
e.paths = nil
+ e.cookies = nil
return nil
}
@@ -826,17 +827,16 @@ func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, coo
if _, found := e.paths[path]; found {
return fmt.Errorf("%v is already associated with this Event Port", path)
}
- fobj, err := createFileObj(path, stat)
+ fCookie, err := createFileObjCookie(path, stat, cookie)
if err != nil {
return err
}
- fCookie := &fileObjCookie{fobj, cookie}
- _, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fobj)), events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
+ _, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fCookie.fobj)), events, (*byte)(unsafe.Pointer(fCookie)))
if err != nil {
return err
}
e.paths[path] = fCookie
- e.cookies[&fCookie.cookie] = fCookie
+ e.cookies[fCookie] = struct{}{}
return nil
}
@@ -858,7 +858,7 @@ func (e *EventPort) DissociatePath(path string) error {
if err == nil {
// dissociate was successful, safe to delete the cookie
fCookie := e.paths[path]
- delete(e.cookies, &fCookie.cookie)
+ delete(e.cookies, fCookie)
}
delete(e.paths, path)
return err
@@ -871,13 +871,16 @@ func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) erro
if _, found := e.fds[fd]; found {
return fmt.Errorf("%v is already associated with this Event Port", fd)
}
- fCookie := &fileObjCookie{nil, cookie}
- _, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
+ fCookie, err := createFileObjCookie("", nil, cookie)
+ if err != nil {
+ return err
+ }
+ _, err = port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(fCookie)))
if err != nil {
return err
}
e.fds[fd] = fCookie
- e.cookies[&fCookie.cookie] = fCookie
+ e.cookies[fCookie] = struct{}{}
return nil
}
@@ -896,27 +899,31 @@ func (e *EventPort) DissociateFd(fd uintptr) error {
if err == nil {
// dissociate was successful, safe to delete the cookie
fCookie := e.fds[fd]
- delete(e.cookies, &fCookie.cookie)
+ delete(e.cookies, fCookie)
}
delete(e.fds, fd)
return err
}
-func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
- fobj := new(fileObj)
- bs, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
- fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
- s := stat.Sys().(*syscall.Stat_t)
- fobj.Atim.Sec = s.Atim.Sec
- fobj.Atim.Nsec = s.Atim.Nsec
- fobj.Mtim.Sec = s.Mtim.Sec
- fobj.Mtim.Nsec = s.Mtim.Nsec
- fobj.Ctim.Sec = s.Ctim.Sec
- fobj.Ctim.Nsec = s.Ctim.Nsec
- return fobj, nil
+func createFileObjCookie(name string, stat os.FileInfo, cookie interface{}) (*fileObjCookie, error) {
+ fCookie := new(fileObjCookie)
+ fCookie.cookie = cookie
+ if name != "" && stat != nil {
+ fCookie.fobj = new(fileObj)
+ bs, err := ByteSliceFromString(name)
+ if err != nil {
+ return nil, err
+ }
+ fCookie.fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
+ s := stat.Sys().(*syscall.Stat_t)
+ fCookie.fobj.Atim.Sec = s.Atim.Sec
+ fCookie.fobj.Atim.Nsec = s.Atim.Nsec
+ fCookie.fobj.Mtim.Sec = s.Mtim.Sec
+ fCookie.fobj.Mtim.Nsec = s.Mtim.Nsec
+ fCookie.fobj.Ctim.Sec = s.Ctim.Sec
+ fCookie.fobj.Ctim.Nsec = s.Ctim.Nsec
+ }
+ return fCookie, nil
}
// GetOne wraps port_get(3c) and returns a single PortEvent.
@@ -929,44 +936,50 @@ func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
p := new(PortEvent)
e.mu.Lock()
defer e.mu.Unlock()
- e.peIntToExt(pe, p)
+ err = e.peIntToExt(pe, p)
+ if err != nil {
+ return nil, err
+ }
return p, nil
}
// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent
// NOTE: Always call this function while holding the e.mu mutex
-func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) {
+func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) error {
+ if e.cookies == nil {
+ return fmt.Errorf("this EventPort is already closed")
+ }
peExt.Events = peInt.Events
peExt.Source = peInt.Source
- cookie := (*interface{})(unsafe.Pointer(peInt.User))
- peExt.Cookie = *cookie
+ fCookie := (*fileObjCookie)(unsafe.Pointer(peInt.User))
+ _, found := e.cookies[fCookie]
+
+ if !found {
+ panic("unexpected event port address; may be due to kernel bug; see https://go.dev/issue/54254")
+ }
+ peExt.Cookie = fCookie.cookie
+ delete(e.cookies, fCookie)
+
switch peInt.Source {
case PORT_SOURCE_FD:
- delete(e.cookies, cookie)
peExt.Fd = uintptr(peInt.Object)
// Only remove the fds entry if it exists and this cookie matches
if fobj, ok := e.fds[peExt.Fd]; ok {
- if &fobj.cookie == cookie {
+ if fobj == fCookie {
delete(e.fds, peExt.Fd)
}
}
case PORT_SOURCE_FILE:
- if fCookie, ok := e.cookies[cookie]; ok && uintptr(unsafe.Pointer(fCookie.fobj)) == uintptr(peInt.Object) {
- // Use our stashed reference rather than using unsafe on what we got back
- // the unsafe version would be (*fileObj)(unsafe.Pointer(uintptr(peInt.Object)))
- peExt.fobj = fCookie.fobj
- } else {
- panic("mismanaged memory")
- }
- delete(e.cookies, cookie)
+ peExt.fobj = fCookie.fobj
peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))
// Only remove the paths entry if it exists and this cookie matches
if fobj, ok := e.paths[peExt.Path]; ok {
- if &fobj.cookie == cookie {
+ if fobj == fCookie {
delete(e.paths, peExt.Path)
}
}
}
+ return nil
}
// Pending wraps port_getn(3c) and returns how many events are pending.
@@ -990,7 +1003,7 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
got := uint32(min)
max := uint32(len(s))
var err error
- ps := make([]portEvent, max, max)
+ ps := make([]portEvent, max)
_, err = port_getn(e.port, &ps[0], max, &got, timeout)
// got will be trustworthy with ETIME, but not any other error.
if err != nil && err != ETIME {
@@ -998,8 +1011,122 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
}
e.mu.Lock()
defer e.mu.Unlock()
+ valid := 0
for i := 0; i < int(got); i++ {
- e.peIntToExt(&ps[i], &s[i])
+ err2 := e.peIntToExt(&ps[i], &s[i])
+ if err2 != nil {
+ if valid == 0 && err == nil {
+ // If err2 is the only error and there are no valid events
+ // to return, return it to the caller.
+ err = err2
+ }
+ break
+ }
+ valid = i + 1
+ }
+ return valid, err
+}
+
+//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
+
+func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
+ var clp, datap *strbuf
+ if len(cl) > 0 {
+ clp = &strbuf{
+ Len: int32(len(cl)),
+ Buf: (*int8)(unsafe.Pointer(&cl[0])),
+ }
}
- return int(got), err
+ if len(data) > 0 {
+ datap = &strbuf{
+ Len: int32(len(data)),
+ Buf: (*int8)(unsafe.Pointer(&data[0])),
+ }
+ }
+ return putmsg(fd, clp, datap, flags)
+}
+
+//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
+
+func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
+ var clp, datap *strbuf
+ if len(cl) > 0 {
+ clp = &strbuf{
+ Maxlen: int32(len(cl)),
+ Buf: (*int8)(unsafe.Pointer(&cl[0])),
+ }
+ }
+ if len(data) > 0 {
+ datap = &strbuf{
+ Maxlen: int32(len(data)),
+ Buf: (*int8)(unsafe.Pointer(&data[0])),
+ }
+ }
+
+ if err = getmsg(fd, clp, datap, &flags); err != nil {
+ return nil, nil, 0, err
+ }
+
+ if len(cl) > 0 {
+ retCl = cl[:clp.Len]
+ }
+ if len(data) > 0 {
+ retData = data[:datap.Len]
+ }
+ return retCl, retData, flags, nil
+}
+
+func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
+ return ioctlRet(fd, req, uintptr(arg))
+}
+
+func IoctlSetString(fd int, req uint, val string) error {
+ bs := make([]byte, len(val)+1)
+ copy(bs[:len(bs)-1], val)
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
+ runtime.KeepAlive(&bs[0])
+ return err
+}
+
+// Lifreq Helpers
+
+func (l *Lifreq) SetName(name string) error {
+ if len(name) >= len(l.Name) {
+ return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
+ }
+ for i := range name {
+ l.Name[i] = int8(name[i])
+ }
+ return nil
+}
+
+func (l *Lifreq) SetLifruInt(d int) {
+ *(*int)(unsafe.Pointer(&l.Lifru[0])) = d
+}
+
+func (l *Lifreq) GetLifruInt() int {
+ return *(*int)(unsafe.Pointer(&l.Lifru[0]))
+}
+
+func (l *Lifreq) SetLifruUint(d uint) {
+ *(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
+}
+
+func (l *Lifreq) GetLifruUint() uint {
+ return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
+}
+
+func IoctlLifreq(fd int, req uint, l *Lifreq) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
+}
+
+// Strioctl Helpers
+
+func (s *Strioctl) SetInt(i int) {
+ s.Len = int32(unsafe.Sizeof(i))
+ s.Dp = (*int8)(unsafe.Pointer(&i))
+}
+
+func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
+ return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_unix.go b/sdk/vendor/golang.org/x/sys/unix/syscall_unix.go
index 1ff5060b5..00bafda86 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -13,8 +13,6 @@ import (
"sync"
"syscall"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
var (
@@ -117,11 +115,7 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
}
// Use unsafe to convert addr into a []byte.
- var b []byte
- hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
- hdr.Data = unsafe.Pointer(addr)
- hdr.Cap = length
- hdr.Len = length
+ b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length)
// Register mapping in m and return it.
p := &b[cap(b)-1]
@@ -429,11 +423,15 @@ func Send(s int, buf []byte, flags int) (err error) {
}
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
- ptr, n, err := to.sockaddr()
- if err != nil {
- return err
+ var ptr unsafe.Pointer
+ var salen _Socklen
+ if to != nil {
+ ptr, salen, err = to.sockaddr()
+ if err != nil {
+ return err
+ }
}
- return sendto(fd, p, flags, ptr, n)
+ return sendto(fd, p, flags, ptr, salen)
}
func SetsockoptByte(fd, level, opt int, value byte) (err error) {
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_unix_gc.go b/sdk/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
index 5898e9a52..b6919ca58 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
@@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
+// +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris
// +build gc
-// +build !ppc64le
-// +build !ppc64
package unix
diff --git a/sdk/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/sdk/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
index f8616f454..68b2f3e1c 100644
--- a/sdk/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
+++ b/sdk/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
@@ -9,8 +9,10 @@ package unix
import (
"bytes"
+ "fmt"
"runtime"
"sort"
+ "strings"
"sync"
"syscall"
"unsafe"
@@ -55,7 +57,13 @@ func (d *Dirent) NameString() string {
if d == nil {
return ""
}
- return string(d.Name[:d.Namlen])
+ s := string(d.Name[:])
+ idx := strings.IndexByte(s, 0)
+ if idx == -1 {
+ return s
+ } else {
+ return s[:idx]
+ }
}
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
@@ -1230,6 +1238,14 @@ func Readdir(dir uintptr) (*Dirent, error) {
return &ent, err
}
+func readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) {
+ r0, _, e1 := syscall_syscall(SYS___READDIR_R_A, dirp, uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ if int64(r0) == -1 {
+ err = errnoErr(Errno(e1))
+ }
+ return
+}
+
func Closedir(dir uintptr) error {
_, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0)
if e != 0 {
@@ -1821,3 +1837,158 @@ func Unmount(name string, mtm int) (err error) {
}
return err
}
+
+func fdToPath(dirfd int) (path string, err error) {
+ var buffer [1024]byte
+ // w_ctrl()
+ ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4,
+ []uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))})
+ if ret == 0 {
+ zb := bytes.IndexByte(buffer[:], 0)
+ if zb == -1 {
+ zb = len(buffer)
+ }
+ // __e2a_l()
+ runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4,
+ []uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)})
+ return string(buffer[:zb]), nil
+ }
+ // __errno()
+ errno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4,
+ []uintptr{}))))
+ // __errno2()
+ errno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4,
+ []uintptr{}))
+ // strerror_r()
+ ret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4,
+ []uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024})
+ if ret == 0 {
+ zb := bytes.IndexByte(buffer[:], 0)
+ if zb == -1 {
+ zb = len(buffer)
+ }
+ return "", fmt.Errorf("%s (errno2=0x%x)", buffer[:zb], errno2)
+ } else {
+ return "", fmt.Errorf("fdToPath errno %d (errno2=0x%x)", errno, errno2)
+ }
+}
+
+func direntLeToDirentUnix(dirent *direntLE, dir uintptr, path string) (Dirent, error) {
+ var d Dirent
+
+ d.Ino = uint64(dirent.Ino)
+ offset, err := Telldir(dir)
+ if err != nil {
+ return d, err
+ }
+
+ d.Off = int64(offset)
+ s := string(bytes.Split(dirent.Name[:], []byte{0})[0])
+ copy(d.Name[:], s)
+
+ d.Reclen = uint16(24 + len(d.NameString()))
+ var st Stat_t
+ path = path + "/" + s
+ err = Lstat(path, &st)
+ if err != nil {
+ return d, err
+ }
+
+ d.Type = uint8(st.Mode >> 24)
+ return d, err
+}
+
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ // Simulation of Getdirentries port from the Darwin implementation.
+ // COMMENTS FROM DARWIN:
+ // It's not the full required semantics, but should handle the case
+ // of calling Getdirentries or ReadDirent repeatedly.
+ // It won't handle assigning the results of lseek to *basep, or handle
+ // the directory being edited underfoot.
+
+ skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
+ if err != nil {
+ return 0, err
+ }
+
+ // Get path from fd to avoid unavailable call (fdopendir)
+ path, err := fdToPath(fd)
+ if err != nil {
+ return 0, err
+ }
+ d, err := Opendir(path)
+ if err != nil {
+ return 0, err
+ }
+ defer Closedir(d)
+
+ var cnt int64
+ for {
+ var entryLE direntLE
+ var entrypLE *direntLE
+ e := readdir_r(d, &entryLE, &entrypLE)
+ if e != nil {
+ return n, e
+ }
+ if entrypLE == nil {
+ break
+ }
+ if skip > 0 {
+ skip--
+ cnt++
+ continue
+ }
+
+ // Dirent on zos has a different structure
+ entry, e := direntLeToDirentUnix(&entryLE, d, path)
+ if e != nil {
+ return n, e
+ }
+
+ reclen := int(entry.Reclen)
+ if reclen > len(buf) {
+ // Not enough room. Return for now.
+ // The counter will let us know where we should start up again.
+ // Note: this strategy for suspending in the middle and
+ // restarting is O(n^2) in the length of the directory. Oh well.
+ break
+ }
+
+ // Copy entry into return buffer.
+ s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
+ copy(buf, s)
+
+ buf = buf[reclen:]
+ n += reclen
+ cnt++
+ }
+ // Set the seek offset of the input fd to record
+ // how many files we've already returned.
+ _, err = Seek(fd, cnt, 0 /* SEEK_SET */)
+ if err != nil {
+ return n, err
+ }
+
+ return n, nil
+}
+
+func ReadDirent(fd int, buf []byte) (n int, err error) {
+ var base = (*uintptr)(unsafe.Pointer(new(uint64)))
+ return Getdirentries(fd, buf, base)
+}
+
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
+}
+
+func direntReclen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ reclen, ok := direntReclen(buf)
+ if !ok {
+ return 0, false
+ }
+ return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/sysvshm_unix.go b/sdk/vendor/golang.org/x/sys/unix/sysvshm_unix.go
index 0bb4c8de5..5bb41d17b 100644
--- a/sdk/vendor/golang.org/x/sys/unix/sysvshm_unix.go
+++ b/sdk/vendor/golang.org/x/sys/unix/sysvshm_unix.go
@@ -7,11 +7,7 @@
package unix
-import (
- "unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
-)
+import "unsafe"
// SysvShmAttach attaches the Sysv shared memory segment associated with the
// shared memory identifier id.
@@ -34,12 +30,7 @@ func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
}
// Use unsafe to convert addr into a []byte.
- // TODO: convert to unsafe.Slice once we can assume Go 1.17
- var b []byte
- hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
- hdr.Data = unsafe.Pointer(addr)
- hdr.Cap = int(info.Segsz)
- hdr.Len = int(info.Segsz)
+ b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), int(info.Segsz))
return b, nil
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/xattr_bsd.go b/sdk/vendor/golang.org/x/sys/unix/xattr_bsd.go
index 25df1e378..663b3779d 100644
--- a/sdk/vendor/golang.org/x/sys/unix/xattr_bsd.go
+++ b/sdk/vendor/golang.org/x/sys/unix/xattr_bsd.go
@@ -160,13 +160,12 @@ func Lremovexattr(link string, attr string) (err error) {
}
func Listxattr(file string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
destsiz := len(dest)
// FreeBSD won't allow you to list xattrs from multiple namespaces
- s := 0
+ s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
+ stmp, e := ListxattrNS(file, nsid, dest[pos:])
/* Errors accessing system attrs are ignored so that
* we can implement the Linux-like behavior of omitting errors that
@@ -175,66 +174,102 @@ func Listxattr(file string, dest []byte) (sz int, err error) {
* Linux will still error if we ask for user attributes on a file that
* we don't have read permissions on, so don't ignore those errors
*/
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- continue
- } else if e != nil {
+ if e != nil {
+ if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+ continue
+ }
return s, e
}
s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
+ pos = s
+ if pos > destsiz {
+ pos = destsiz
}
- d = initxattrdest(dest, s)
}
return s, nil
}
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
+func ListxattrNS(file string, nsid int, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest)
- s := 0
+ s, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
+ if e != nil {
+ return 0, err
+ }
+
+ return s, nil
+}
+
+func Flistxattr(fd int, dest []byte) (sz int, err error) {
+ destsiz := len(dest)
+
+ s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- continue
- } else if e != nil {
+ stmp, e := FlistxattrNS(fd, nsid, dest[pos:])
+
+ if e != nil {
+ if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+ continue
+ }
return s, e
}
s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
+ pos = s
+ if pos > destsiz {
+ pos = destsiz
}
- d = initxattrdest(dest, s)
}
return s, nil
}
-func Llistxattr(link string, dest []byte) (sz int, err error) {
+func FlistxattrNS(fd int, nsid int, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest)
- s := 0
+ s, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
+ if e != nil {
+ return 0, err
+ }
+
+ return s, nil
+}
+
+func Llistxattr(link string, dest []byte) (sz int, err error) {
+ destsiz := len(dest)
+
+ s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- continue
- } else if e != nil {
+ stmp, e := LlistxattrNS(link, nsid, dest[pos:])
+
+ if e != nil {
+ if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+ continue
+ }
return s, e
}
s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
+ pos = s
+ if pos > destsiz {
+ pos = destsiz
}
- d = initxattrdest(dest, s)
+ }
+
+ return s, nil
+}
+
+func LlistxattrNS(link string, nsid int, dest []byte) (sz int, err error) {
+ d := initxattrdest(dest, 0)
+ destsiz := len(dest)
+
+ s, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
+ if e != nil {
+ return 0, err
}
return s, nil
diff --git a/sdk/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go b/sdk/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go
new file mode 100644
index 000000000..8e2c51b1e
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go
@@ -0,0 +1,1905 @@
+// mkerrors.sh -m64
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc64 && openbsd
+// +build ppc64,openbsd
+
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- -m64 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+ AF_APPLETALK = 0x10
+ AF_BLUETOOTH = 0x20
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_CNT = 0x15
+ AF_COIP = 0x14
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_E164 = 0x1a
+ AF_ECMA = 0x8
+ AF_ENCAP = 0x1c
+ AF_HYLINK = 0xf
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x18
+ AF_IPX = 0x17
+ AF_ISDN = 0x1a
+ AF_ISO = 0x7
+ AF_KEY = 0x1e
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x24
+ AF_MPLS = 0x21
+ AF_NATM = 0x1b
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PUP = 0x4
+ AF_ROUTE = 0x11
+ AF_SIP = 0x1d
+ AF_SNA = 0xb
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ ALTWERASE = 0x200
+ ARPHRD_ETHER = 0x1
+ ARPHRD_FRELAY = 0xf
+ ARPHRD_IEEE1394 = 0x18
+ ARPHRD_IEEE802 = 0x6
+ B0 = 0x0
+ B110 = 0x6e
+ B115200 = 0x1c200
+ B1200 = 0x4b0
+ B134 = 0x86
+ B14400 = 0x3840
+ B150 = 0x96
+ B1800 = 0x708
+ B19200 = 0x4b00
+ B200 = 0xc8
+ B230400 = 0x38400
+ B2400 = 0x960
+ B28800 = 0x7080
+ B300 = 0x12c
+ B38400 = 0x9600
+ B4800 = 0x12c0
+ B50 = 0x32
+ B57600 = 0xe100
+ B600 = 0x258
+ B7200 = 0x1c20
+ B75 = 0x4b
+ B76800 = 0x12c00
+ B9600 = 0x2580
+ BIOCFLUSH = 0x20004268
+ BIOCGBLEN = 0x40044266
+ BIOCGDIRFILT = 0x4004427c
+ BIOCGDLT = 0x4004426a
+ BIOCGDLTLIST = 0xc010427b
+ BIOCGETIF = 0x4020426b
+ BIOCGFILDROP = 0x40044278
+ BIOCGHDRCMPLT = 0x40044274
+ BIOCGRSIG = 0x40044273
+ BIOCGRTIMEOUT = 0x4010426e
+ BIOCGSTATS = 0x4008426f
+ BIOCIMMEDIATE = 0x80044270
+ BIOCLOCK = 0x20004276
+ BIOCPROMISC = 0x20004269
+ BIOCSBLEN = 0xc0044266
+ BIOCSDIRFILT = 0x8004427d
+ BIOCSDLT = 0x8004427a
+ BIOCSETF = 0x80104267
+ BIOCSETIF = 0x8020426c
+ BIOCSETWF = 0x80104277
+ BIOCSFILDROP = 0x80044279
+ BIOCSHDRCMPLT = 0x80044275
+ BIOCSRSIG = 0x80044272
+ BIOCSRTIMEOUT = 0x8010426d
+ BIOCVERSION = 0x40044271
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALIGNMENT = 0x4
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIRECTION_IN = 0x1
+ BPF_DIRECTION_OUT = 0x2
+ BPF_DIV = 0x30
+ BPF_FILDROP_CAPTURE = 0x1
+ BPF_FILDROP_DROP = 0x2
+ BPF_FILDROP_PASS = 0x0
+ BPF_F_DIR_IN = 0x10
+ BPF_F_DIR_MASK = 0x30
+ BPF_F_DIR_OUT = 0x20
+ BPF_F_DIR_SHIFT = 0x4
+ BPF_F_FLOWID = 0x8
+ BPF_F_PRI_MASK = 0x7
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXBUFSIZE = 0x200000
+ BPF_MAXINSNS = 0x200
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINBUFSIZE = 0x20
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_OR = 0x40
+ BPF_RELEASE = 0x30bb6
+ BPF_RET = 0x6
+ BPF_RND = 0xc0
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BRKINT = 0x2
+ CFLUSH = 0xf
+ CLOCAL = 0x8000
+ CLOCK_BOOTTIME = 0x6
+ CLOCK_MONOTONIC = 0x3
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x4
+ CLOCK_UPTIME = 0x5
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
+ CREAD = 0x800
+ CRTSCTS = 0x10000
+ CS5 = 0x0
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTART = 0x11
+ CSTATUS = 0xff
+ CSTOP = 0x13
+ CSTOPB = 0x400
+ CSUSP = 0x1a
+ CTL_HW = 0x6
+ CTL_KERN = 0x1
+ CTL_MAXNAME = 0xc
+ CTL_NET = 0x4
+ DIOCADDQUEUE = 0xc110445d
+ DIOCADDRULE = 0xcd604404
+ DIOCADDSTATE = 0xc1084425
+ DIOCCHANGERULE = 0xcd60441a
+ DIOCCLRIFFLAG = 0xc028445a
+ DIOCCLRSRCNODES = 0x20004455
+ DIOCCLRSTATES = 0xc0e04412
+ DIOCCLRSTATUS = 0xc0284416
+ DIOCGETLIMIT = 0xc0084427
+ DIOCGETQSTATS = 0xc1204460
+ DIOCGETQUEUE = 0xc110445f
+ DIOCGETQUEUES = 0xc110445e
+ DIOCGETRULE = 0xcd604407
+ DIOCGETRULES = 0xcd604406
+ DIOCGETRULESET = 0xc444443b
+ DIOCGETRULESETS = 0xc444443a
+ DIOCGETSRCNODES = 0xc0104454
+ DIOCGETSTATE = 0xc1084413
+ DIOCGETSTATES = 0xc0104419
+ DIOCGETSTATUS = 0xc1e84415
+ DIOCGETSYNFLWATS = 0xc0084463
+ DIOCGETTIMEOUT = 0xc008441e
+ DIOCIGETIFACES = 0xc0284457
+ DIOCKILLSRCNODES = 0xc080445b
+ DIOCKILLSTATES = 0xc0e04429
+ DIOCNATLOOK = 0xc0504417
+ DIOCOSFPADD = 0xc088444f
+ DIOCOSFPFLUSH = 0x2000444e
+ DIOCOSFPGET = 0xc0884450
+ DIOCRADDADDRS = 0xc4504443
+ DIOCRADDTABLES = 0xc450443d
+ DIOCRCLRADDRS = 0xc4504442
+ DIOCRCLRASTATS = 0xc4504448
+ DIOCRCLRTABLES = 0xc450443c
+ DIOCRCLRTSTATS = 0xc4504441
+ DIOCRDELADDRS = 0xc4504444
+ DIOCRDELTABLES = 0xc450443e
+ DIOCRGETADDRS = 0xc4504446
+ DIOCRGETASTATS = 0xc4504447
+ DIOCRGETTABLES = 0xc450443f
+ DIOCRGETTSTATS = 0xc4504440
+ DIOCRINADEFINE = 0xc450444d
+ DIOCRSETADDRS = 0xc4504445
+ DIOCRSETTFLAGS = 0xc450444a
+ DIOCRTSTADDRS = 0xc4504449
+ DIOCSETDEBUG = 0xc0044418
+ DIOCSETHOSTID = 0xc0044456
+ DIOCSETIFFLAG = 0xc0284459
+ DIOCSETLIMIT = 0xc0084428
+ DIOCSETREASS = 0xc004445c
+ DIOCSETSTATUSIF = 0xc0284414
+ DIOCSETSYNCOOKIES = 0xc0014462
+ DIOCSETSYNFLWATS = 0xc0084461
+ DIOCSETTIMEOUT = 0xc008441d
+ DIOCSTART = 0x20004401
+ DIOCSTOP = 0x20004402
+ DIOCXBEGIN = 0xc0104451
+ DIOCXCOMMIT = 0xc0104452
+ DIOCXROLLBACK = 0xc0104453
+ DLT_ARCNET = 0x7
+ DLT_ATM_RFC1483 = 0xb
+ DLT_AX25 = 0x3
+ DLT_CHAOS = 0x5
+ DLT_C_HDLC = 0x68
+ DLT_EN10MB = 0x1
+ DLT_EN3MB = 0x2
+ DLT_ENC = 0xd
+ DLT_FDDI = 0xa
+ DLT_IEEE802 = 0x6
+ DLT_IEEE802_11 = 0x69
+ DLT_IEEE802_11_RADIO = 0x7f
+ DLT_LOOP = 0xc
+ DLT_MPLS = 0xdb
+ DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
+ DLT_PFLOG = 0x75
+ DLT_PFSYNC = 0x12
+ DLT_PPP = 0x9
+ DLT_PPP_BSDOS = 0x10
+ DLT_PPP_ETHER = 0x33
+ DLT_PPP_SERIAL = 0x32
+ DLT_PRONET = 0x4
+ DLT_RAW = 0xe
+ DLT_SLIP = 0x8
+ DLT_SLIP_BSDOS = 0xf
+ DLT_USBPCAP = 0xf9
+ DLT_USER0 = 0x93
+ DLT_USER1 = 0x94
+ DLT_USER10 = 0x9d
+ DLT_USER11 = 0x9e
+ DLT_USER12 = 0x9f
+ DLT_USER13 = 0xa0
+ DLT_USER14 = 0xa1
+ DLT_USER15 = 0xa2
+ DLT_USER2 = 0x95
+ DLT_USER3 = 0x96
+ DLT_USER4 = 0x97
+ DLT_USER5 = 0x98
+ DLT_USER6 = 0x99
+ DLT_USER7 = 0x9a
+ DLT_USER8 = 0x9b
+ DLT_USER9 = 0x9c
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ ECHO = 0x8
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EMT_TAGOVF = 0x1
+ EMUL_ENABLED = 0x1
+ EMUL_NATIVE = 0x2
+ ENDRUNDISC = 0x9
+ ETH64_8021_RSVD_MASK = 0xfffffffffff0
+ ETH64_8021_RSVD_PREFIX = 0x180c2000000
+ ETHERMIN = 0x2e
+ ETHERMTU = 0x5dc
+ ETHERTYPE_8023 = 0x4
+ ETHERTYPE_AARP = 0x80f3
+ ETHERTYPE_ACCTON = 0x8390
+ ETHERTYPE_AEONIC = 0x8036
+ ETHERTYPE_ALPHA = 0x814a
+ ETHERTYPE_AMBER = 0x6008
+ ETHERTYPE_AMOEBA = 0x8145
+ ETHERTYPE_AOE = 0x88a2
+ ETHERTYPE_APOLLO = 0x80f7
+ ETHERTYPE_APOLLODOMAIN = 0x8019
+ ETHERTYPE_APPLETALK = 0x809b
+ ETHERTYPE_APPLITEK = 0x80c7
+ ETHERTYPE_ARGONAUT = 0x803a
+ ETHERTYPE_ARP = 0x806
+ ETHERTYPE_AT = 0x809b
+ ETHERTYPE_ATALK = 0x809b
+ ETHERTYPE_ATOMIC = 0x86df
+ ETHERTYPE_ATT = 0x8069
+ ETHERTYPE_ATTSTANFORD = 0x8008
+ ETHERTYPE_AUTOPHON = 0x806a
+ ETHERTYPE_AXIS = 0x8856
+ ETHERTYPE_BCLOOP = 0x9003
+ ETHERTYPE_BOFL = 0x8102
+ ETHERTYPE_CABLETRON = 0x7034
+ ETHERTYPE_CHAOS = 0x804
+ ETHERTYPE_COMDESIGN = 0x806c
+ ETHERTYPE_COMPUGRAPHIC = 0x806d
+ ETHERTYPE_COUNTERPOINT = 0x8062
+ ETHERTYPE_CRONUS = 0x8004
+ ETHERTYPE_CRONUSVLN = 0x8003
+ ETHERTYPE_DCA = 0x1234
+ ETHERTYPE_DDE = 0x807b
+ ETHERTYPE_DEBNI = 0xaaaa
+ ETHERTYPE_DECAM = 0x8048
+ ETHERTYPE_DECCUST = 0x6006
+ ETHERTYPE_DECDIAG = 0x6005
+ ETHERTYPE_DECDNS = 0x803c
+ ETHERTYPE_DECDTS = 0x803e
+ ETHERTYPE_DECEXPER = 0x6000
+ ETHERTYPE_DECLAST = 0x8041
+ ETHERTYPE_DECLTM = 0x803f
+ ETHERTYPE_DECMUMPS = 0x6009
+ ETHERTYPE_DECNETBIOS = 0x8040
+ ETHERTYPE_DELTACON = 0x86de
+ ETHERTYPE_DIDDLE = 0x4321
+ ETHERTYPE_DLOG1 = 0x660
+ ETHERTYPE_DLOG2 = 0x661
+ ETHERTYPE_DN = 0x6003
+ ETHERTYPE_DOGFIGHT = 0x1989
+ ETHERTYPE_DSMD = 0x8039
+ ETHERTYPE_EAPOL = 0x888e
+ ETHERTYPE_ECMA = 0x803
+ ETHERTYPE_ENCRYPT = 0x803d
+ ETHERTYPE_ES = 0x805d
+ ETHERTYPE_EXCELAN = 0x8010
+ ETHERTYPE_EXPERDATA = 0x8049
+ ETHERTYPE_FLIP = 0x8146
+ ETHERTYPE_FLOWCONTROL = 0x8808
+ ETHERTYPE_FRARP = 0x808
+ ETHERTYPE_GENDYN = 0x8068
+ ETHERTYPE_HAYES = 0x8130
+ ETHERTYPE_HIPPI_FP = 0x8180
+ ETHERTYPE_HITACHI = 0x8820
+ ETHERTYPE_HP = 0x8005
+ ETHERTYPE_IEEEPUP = 0xa00
+ ETHERTYPE_IEEEPUPAT = 0xa01
+ ETHERTYPE_IMLBL = 0x4c42
+ ETHERTYPE_IMLBLDIAG = 0x424c
+ ETHERTYPE_IP = 0x800
+ ETHERTYPE_IPAS = 0x876c
+ ETHERTYPE_IPV6 = 0x86dd
+ ETHERTYPE_IPX = 0x8137
+ ETHERTYPE_IPXNEW = 0x8037
+ ETHERTYPE_KALPANA = 0x8582
+ ETHERTYPE_LANBRIDGE = 0x8038
+ ETHERTYPE_LANPROBE = 0x8888
+ ETHERTYPE_LAT = 0x6004
+ ETHERTYPE_LBACK = 0x9000
+ ETHERTYPE_LITTLE = 0x8060
+ ETHERTYPE_LLDP = 0x88cc
+ ETHERTYPE_LOGICRAFT = 0x8148
+ ETHERTYPE_LOOPBACK = 0x9000
+ ETHERTYPE_MACSEC = 0x88e5
+ ETHERTYPE_MATRA = 0x807a
+ ETHERTYPE_MAX = 0xffff
+ ETHERTYPE_MERIT = 0x807c
+ ETHERTYPE_MICP = 0x873a
+ ETHERTYPE_MOPDL = 0x6001
+ ETHERTYPE_MOPRC = 0x6002
+ ETHERTYPE_MOTOROLA = 0x818d
+ ETHERTYPE_MPLS = 0x8847
+ ETHERTYPE_MPLS_MCAST = 0x8848
+ ETHERTYPE_MUMPS = 0x813f
+ ETHERTYPE_NBPCC = 0x3c04
+ ETHERTYPE_NBPCLAIM = 0x3c09
+ ETHERTYPE_NBPCLREQ = 0x3c05
+ ETHERTYPE_NBPCLRSP = 0x3c06
+ ETHERTYPE_NBPCREQ = 0x3c02
+ ETHERTYPE_NBPCRSP = 0x3c03
+ ETHERTYPE_NBPDG = 0x3c07
+ ETHERTYPE_NBPDGB = 0x3c08
+ ETHERTYPE_NBPDLTE = 0x3c0a
+ ETHERTYPE_NBPRAR = 0x3c0c
+ ETHERTYPE_NBPRAS = 0x3c0b
+ ETHERTYPE_NBPRST = 0x3c0d
+ ETHERTYPE_NBPSCD = 0x3c01
+ ETHERTYPE_NBPVCD = 0x3c00
+ ETHERTYPE_NBS = 0x802
+ ETHERTYPE_NCD = 0x8149
+ ETHERTYPE_NESTAR = 0x8006
+ ETHERTYPE_NETBEUI = 0x8191
+ ETHERTYPE_NHRP = 0x2001
+ ETHERTYPE_NOVELL = 0x8138
+ ETHERTYPE_NS = 0x600
+ ETHERTYPE_NSAT = 0x601
+ ETHERTYPE_NSCOMPAT = 0x807
+ ETHERTYPE_NSH = 0x984f
+ ETHERTYPE_NTRAILER = 0x10
+ ETHERTYPE_OS9 = 0x7007
+ ETHERTYPE_OS9NET = 0x7009
+ ETHERTYPE_PACER = 0x80c6
+ ETHERTYPE_PBB = 0x88e7
+ ETHERTYPE_PCS = 0x4242
+ ETHERTYPE_PLANNING = 0x8044
+ ETHERTYPE_PPP = 0x880b
+ ETHERTYPE_PPPOE = 0x8864
+ ETHERTYPE_PPPOEDISC = 0x8863
+ ETHERTYPE_PRIMENTS = 0x7031
+ ETHERTYPE_PUP = 0x200
+ ETHERTYPE_PUPAT = 0x200
+ ETHERTYPE_QINQ = 0x88a8
+ ETHERTYPE_RACAL = 0x7030
+ ETHERTYPE_RATIONAL = 0x8150
+ ETHERTYPE_RAWFR = 0x6559
+ ETHERTYPE_RCL = 0x1995
+ ETHERTYPE_RDP = 0x8739
+ ETHERTYPE_RETIX = 0x80f2
+ ETHERTYPE_REVARP = 0x8035
+ ETHERTYPE_SCA = 0x6007
+ ETHERTYPE_SECTRA = 0x86db
+ ETHERTYPE_SECUREDATA = 0x876d
+ ETHERTYPE_SGITW = 0x817e
+ ETHERTYPE_SG_BOUNCE = 0x8016
+ ETHERTYPE_SG_DIAG = 0x8013
+ ETHERTYPE_SG_NETGAMES = 0x8014
+ ETHERTYPE_SG_RESV = 0x8015
+ ETHERTYPE_SIMNET = 0x5208
+ ETHERTYPE_SLOW = 0x8809
+ ETHERTYPE_SNA = 0x80d5
+ ETHERTYPE_SNMP = 0x814c
+ ETHERTYPE_SONIX = 0xfaf5
+ ETHERTYPE_SPIDER = 0x809f
+ ETHERTYPE_SPRITE = 0x500
+ ETHERTYPE_STP = 0x8181
+ ETHERTYPE_TALARIS = 0x812b
+ ETHERTYPE_TALARISMC = 0x852b
+ ETHERTYPE_TCPCOMP = 0x876b
+ ETHERTYPE_TCPSM = 0x9002
+ ETHERTYPE_TEC = 0x814f
+ ETHERTYPE_TIGAN = 0x802f
+ ETHERTYPE_TRAIL = 0x1000
+ ETHERTYPE_TRANSETHER = 0x6558
+ ETHERTYPE_TYMSHARE = 0x802e
+ ETHERTYPE_UBBST = 0x7005
+ ETHERTYPE_UBDEBUG = 0x900
+ ETHERTYPE_UBDIAGLOOP = 0x7002
+ ETHERTYPE_UBDL = 0x7000
+ ETHERTYPE_UBNIU = 0x7001
+ ETHERTYPE_UBNMC = 0x7003
+ ETHERTYPE_VALID = 0x1600
+ ETHERTYPE_VARIAN = 0x80dd
+ ETHERTYPE_VAXELN = 0x803b
+ ETHERTYPE_VEECO = 0x8067
+ ETHERTYPE_VEXP = 0x805b
+ ETHERTYPE_VGLAB = 0x8131
+ ETHERTYPE_VINES = 0xbad
+ ETHERTYPE_VINESECHO = 0xbaf
+ ETHERTYPE_VINESLOOP = 0xbae
+ ETHERTYPE_VITAL = 0xff00
+ ETHERTYPE_VLAN = 0x8100
+ ETHERTYPE_VLTLMAN = 0x8080
+ ETHERTYPE_VPROD = 0x805c
+ ETHERTYPE_VURESERVED = 0x8147
+ ETHERTYPE_WATERLOO = 0x8130
+ ETHERTYPE_WELLFLEET = 0x8103
+ ETHERTYPE_X25 = 0x805
+ ETHERTYPE_X75 = 0x801
+ ETHERTYPE_XNSSM = 0x9001
+ ETHERTYPE_XTP = 0x817d
+ ETHER_ADDR_LEN = 0x6
+ ETHER_ALIGN = 0x2
+ ETHER_CRC_LEN = 0x4
+ ETHER_CRC_POLY_BE = 0x4c11db6
+ ETHER_CRC_POLY_LE = 0xedb88320
+ ETHER_HDR_LEN = 0xe
+ ETHER_MAX_DIX_LEN = 0x600
+ ETHER_MAX_HARDMTU_LEN = 0xff9b
+ ETHER_MAX_LEN = 0x5ee
+ ETHER_MIN_LEN = 0x40
+ ETHER_TYPE_LEN = 0x2
+ ETHER_VLAN_ENCAP_LEN = 0x4
+ EVFILT_AIO = -0x3
+ EVFILT_DEVICE = -0x8
+ EVFILT_EXCEPT = -0x9
+ EVFILT_PROC = -0x5
+ EVFILT_READ = -0x1
+ EVFILT_SIGNAL = -0x6
+ EVFILT_SYSCOUNT = 0x9
+ EVFILT_TIMER = -0x7
+ EVFILT_VNODE = -0x4
+ EVFILT_WRITE = -0x2
+ EVL_ENCAPLEN = 0x4
+ EVL_PRIO_BITS = 0xd
+ EVL_PRIO_MAX = 0x7
+ EVL_VLID_MASK = 0xfff
+ EVL_VLID_MAX = 0xffe
+ EVL_VLID_MIN = 0x1
+ EVL_VLID_NULL = 0x0
+ EV_ADD = 0x1
+ EV_CLEAR = 0x20
+ EV_DELETE = 0x2
+ EV_DISABLE = 0x8
+ EV_DISPATCH = 0x80
+ EV_ENABLE = 0x4
+ EV_EOF = 0x8000
+ EV_ERROR = 0x4000
+ EV_FLAG1 = 0x2000
+ EV_ONESHOT = 0x10
+ EV_RECEIPT = 0x40
+ EV_SYSFLAGS = 0xf800
+ EXTA = 0x4b00
+ EXTB = 0x9600
+ EXTPROC = 0x800
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FLUSHO = 0x800000
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0xa
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0x7
+ F_GETOWN = 0x5
+ F_ISATTY = 0xb
+ F_OK = 0x0
+ F_RDLCK = 0x1
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0x8
+ F_SETLKW = 0x9
+ F_SETOWN = 0x6
+ F_UNLCK = 0x2
+ F_WRLCK = 0x3
+ HUPCL = 0x4000
+ HW_MACHINE = 0x1
+ ICANON = 0x100
+ ICMP6_FILTER = 0x12
+ ICRNL = 0x100
+ IEXTEN = 0x400
+ IFAN_ARRIVAL = 0x0
+ IFAN_DEPARTURE = 0x1
+ IFF_ALLMULTI = 0x200
+ IFF_BROADCAST = 0x2
+ IFF_CANTCHANGE = 0x8e52
+ IFF_DEBUG = 0x4
+ IFF_LINK0 = 0x1000
+ IFF_LINK1 = 0x2000
+ IFF_LINK2 = 0x4000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x8000
+ IFF_NOARP = 0x80
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_STATICARP = 0x20
+ IFF_UP = 0x1
+ IFNAMSIZ = 0x10
+ IFT_1822 = 0x2
+ IFT_A12MPPSWITCH = 0x82
+ IFT_AAL2 = 0xbb
+ IFT_AAL5 = 0x31
+ IFT_ADSL = 0x5e
+ IFT_AFLANE8023 = 0x3b
+ IFT_AFLANE8025 = 0x3c
+ IFT_ARAP = 0x58
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ASYNC = 0x54
+ IFT_ATM = 0x25
+ IFT_ATMDXI = 0x69
+ IFT_ATMFUNI = 0x6a
+ IFT_ATMIMA = 0x6b
+ IFT_ATMLOGICAL = 0x50
+ IFT_ATMRADIO = 0xbd
+ IFT_ATMSUBINTERFACE = 0x86
+ IFT_ATMVCIENDPT = 0xc2
+ IFT_ATMVIRTUAL = 0x95
+ IFT_BGPPOLICYACCOUNTING = 0xa2
+ IFT_BLUETOOTH = 0xf8
+ IFT_BRIDGE = 0xd1
+ IFT_BSC = 0x53
+ IFT_CARP = 0xf7
+ IFT_CCTEMUL = 0x3d
+ IFT_CEPT = 0x13
+ IFT_CES = 0x85
+ IFT_CHANNEL = 0x46
+ IFT_CNR = 0x55
+ IFT_COFFEE = 0x84
+ IFT_COMPOSITELINK = 0x9b
+ IFT_DCN = 0x8d
+ IFT_DIGITALPOWERLINE = 0x8a
+ IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
+ IFT_DLSW = 0x4a
+ IFT_DOCSCABLEDOWNSTREAM = 0x80
+ IFT_DOCSCABLEMACLAYER = 0x7f
+ IFT_DOCSCABLEUPSTREAM = 0x81
+ IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
+ IFT_DS0 = 0x51
+ IFT_DS0BUNDLE = 0x52
+ IFT_DS1FDL = 0xaa
+ IFT_DS3 = 0x1e
+ IFT_DTM = 0x8c
+ IFT_DUMMY = 0xf1
+ IFT_DVBASILN = 0xac
+ IFT_DVBASIOUT = 0xad
+ IFT_DVBRCCDOWNSTREAM = 0x93
+ IFT_DVBRCCMACLAYER = 0x92
+ IFT_DVBRCCUPSTREAM = 0x94
+ IFT_ECONET = 0xce
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_EPLRS = 0x57
+ IFT_ESCON = 0x49
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0xf3
+ IFT_FAST = 0x7d
+ IFT_FASTETHER = 0x3e
+ IFT_FASTETHERFX = 0x45
+ IFT_FDDI = 0xf
+ IFT_FIBRECHANNEL = 0x38
+ IFT_FRAMERELAYINTERCONNECT = 0x3a
+ IFT_FRAMERELAYMPI = 0x5c
+ IFT_FRDLCIENDPT = 0xc1
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_FRF16MFRBUNDLE = 0xa3
+ IFT_FRFORWARD = 0x9e
+ IFT_G703AT2MB = 0x43
+ IFT_G703AT64K = 0x42
+ IFT_GIF = 0xf0
+ IFT_GIGABITETHERNET = 0x75
+ IFT_GR303IDT = 0xb2
+ IFT_GR303RDT = 0xb1
+ IFT_H323GATEKEEPER = 0xa4
+ IFT_H323PROXY = 0xa5
+ IFT_HDH1822 = 0x3
+ IFT_HDLC = 0x76
+ IFT_HDSL2 = 0xa8
+ IFT_HIPERLAN2 = 0xb7
+ IFT_HIPPI = 0x2f
+ IFT_HIPPIINTERFACE = 0x39
+ IFT_HOSTPAD = 0x5a
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IBM370PARCHAN = 0x48
+ IFT_IDSL = 0x9a
+ IFT_IEEE1394 = 0x90
+ IFT_IEEE80211 = 0x47
+ IFT_IEEE80212 = 0x37
+ IFT_IEEE8023ADLAG = 0xa1
+ IFT_IFGSN = 0x91
+ IFT_IMT = 0xbe
+ IFT_INFINIBAND = 0xc7
+ IFT_INTERLEAVE = 0x7c
+ IFT_IP = 0x7e
+ IFT_IPFORWARD = 0x8e
+ IFT_IPOVERATM = 0x72
+ IFT_IPOVERCDLC = 0x6d
+ IFT_IPOVERCLAW = 0x6e
+ IFT_IPSWITCH = 0x4e
+ IFT_ISDN = 0x3f
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISDNS = 0x4b
+ IFT_ISDNU = 0x4c
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88025CRFPINT = 0x62
+ IFT_ISO88025DTR = 0x56
+ IFT_ISO88025FIBER = 0x73
+ IFT_ISO88026 = 0xa
+ IFT_ISUP = 0xb3
+ IFT_L2VLAN = 0x87
+ IFT_L3IPVLAN = 0x88
+ IFT_L3IPXVLAN = 0x89
+ IFT_LAPB = 0x10
+ IFT_LAPD = 0x4d
+ IFT_LAPF = 0x77
+ IFT_LINEGROUP = 0xd2
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MBIM = 0xfa
+ IFT_MEDIAMAILOVERIP = 0x8b
+ IFT_MFSIGLINK = 0xa7
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_MPC = 0x71
+ IFT_MPLS = 0xa6
+ IFT_MPLSTUNNEL = 0x96
+ IFT_MSDSL = 0x8f
+ IFT_MVL = 0xbf
+ IFT_MYRINET = 0x63
+ IFT_NFAS = 0xaf
+ IFT_NSIP = 0x1b
+ IFT_OPTICALCHANNEL = 0xc3
+ IFT_OPTICALTRANSPORT = 0xc4
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PFLOG = 0xf5
+ IFT_PFLOW = 0xf9
+ IFT_PFSYNC = 0xf6
+ IFT_PLC = 0xae
+ IFT_PON155 = 0xcf
+ IFT_PON622 = 0xd0
+ IFT_POS = 0xab
+ IFT_PPP = 0x17
+ IFT_PPPMULTILINKBUNDLE = 0x6c
+ IFT_PROPATM = 0xc5
+ IFT_PROPBWAP2MP = 0xb8
+ IFT_PROPCNLS = 0x59
+ IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
+ IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
+ IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PROPWIRELESSP2P = 0x9d
+ IFT_PTPSERIAL = 0x16
+ IFT_PVC = 0xf2
+ IFT_Q2931 = 0xc9
+ IFT_QLLC = 0x44
+ IFT_RADIOMAC = 0xbc
+ IFT_RADSL = 0x5f
+ IFT_REACHDSL = 0xc0
+ IFT_RFC1483 = 0x9f
+ IFT_RS232 = 0x21
+ IFT_RSRB = 0x4f
+ IFT_SDLC = 0x11
+ IFT_SDSL = 0x60
+ IFT_SHDSL = 0xa9
+ IFT_SIP = 0x1f
+ IFT_SIPSIG = 0xcc
+ IFT_SIPTG = 0xcb
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETOVERHEADCHANNEL = 0xb9
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_SRP = 0x97
+ IFT_SS7SIGLINK = 0x9c
+ IFT_STACKTOSTACK = 0x6f
+ IFT_STARLAN = 0xb
+ IFT_T1 = 0x12
+ IFT_TDLC = 0x74
+ IFT_TELINK = 0xc8
+ IFT_TERMPAD = 0x5b
+ IFT_TR008 = 0xb0
+ IFT_TRANSPHDLC = 0x7b
+ IFT_TUNNEL = 0x83
+ IFT_ULTRA = 0x1d
+ IFT_USB = 0xa0
+ IFT_V11 = 0x40
+ IFT_V35 = 0x2d
+ IFT_V36 = 0x41
+ IFT_V37 = 0x78
+ IFT_VDSL = 0x61
+ IFT_VIRTUALIPADDRESS = 0x70
+ IFT_VIRTUALTG = 0xca
+ IFT_VOICEDID = 0xd5
+ IFT_VOICEEM = 0x64
+ IFT_VOICEEMFGD = 0xd3
+ IFT_VOICEENCAP = 0x67
+ IFT_VOICEFGDEANA = 0xd4
+ IFT_VOICEFXO = 0x65
+ IFT_VOICEFXS = 0x66
+ IFT_VOICEOVERATM = 0x98
+ IFT_VOICEOVERCABLE = 0xc6
+ IFT_VOICEOVERFRAMERELAY = 0x99
+ IFT_VOICEOVERIP = 0x68
+ IFT_WIREGUARD = 0xfb
+ IFT_X213 = 0x5d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25HUNTGROUP = 0x7a
+ IFT_X25MLP = 0x79
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LOOPBACKNET = 0x7f
+ IN_RFC3021_HOST = 0x1
+ IN_RFC3021_NET = 0xfffffffe
+ IN_RFC3021_NSHIFT = 0x1f
+ IPPROTO_AH = 0x33
+ IPPROTO_CARP = 0x70
+ IPPROTO_DIVERT = 0x102
+ IPPROTO_DONE = 0x101
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERIP = 0x61
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPCOMP = 0x6c
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV4 = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_MAX = 0x100
+ IPPROTO_MAXID = 0x103
+ IPPROTO_MOBILE = 0x37
+ IPPROTO_MPLS = 0x89
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PFSYNC = 0xf0
+ IPPROTO_PIM = 0x67
+ IPPROTO_PUP = 0xc
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPPROTO_UDPLITE = 0x88
+ IPV6_AUTH_LEVEL = 0x35
+ IPV6_AUTOFLOWLABEL = 0x3b
+ IPV6_CHECKSUM = 0x1a
+ IPV6_DEFAULT_MULTICAST_HOPS = 0x1
+ IPV6_DEFAULT_MULTICAST_LOOP = 0x1
+ IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
+ IPV6_ESP_NETWORK_LEVEL = 0x37
+ IPV6_ESP_TRANS_LEVEL = 0x36
+ IPV6_FAITH = 0x1d
+ IPV6_FLOWINFO_MASK = 0xfffffff
+ IPV6_FLOWLABEL_MASK = 0xfffff
+ IPV6_FRAGTTL = 0x78
+ IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
+ IPV6_IPCOMP_LEVEL = 0x3c
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MAXHLIM = 0xff
+ IPV6_MAXPACKET = 0xffff
+ IPV6_MINHOPCOUNT = 0x41
+ IPV6_MMTU = 0x500
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_OPTIONS = 0x1
+ IPV6_PATHMTU = 0x2c
+ IPV6_PIPEX = 0x3f
+ IPV6_PKTINFO = 0x2e
+ IPV6_PORTRANGE = 0xe
+ IPV6_PORTRANGE_DEFAULT = 0x0
+ IPV6_PORTRANGE_HIGH = 0x1
+ IPV6_PORTRANGE_LOW = 0x2
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVDSTPORT = 0x40
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x24
+ IPV6_RECVRTHDR = 0x26
+ IPV6_RECVTCLASS = 0x39
+ IPV6_RTABLE = 0x1021
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x23
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_SOCKOPT_RESERVED1 = 0x3
+ IPV6_TCLASS = 0x3d
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
+ IPV6_V6ONLY = 0x1b
+ IPV6_VERSION = 0x60
+ IPV6_VERSION_MASK = 0xf0
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_AUTH_LEVEL = 0x14
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_ESP_NETWORK_LEVEL = 0x16
+ IP_ESP_TRANS_LEVEL = 0x15
+ IP_HDRINCL = 0x2
+ IP_IPCOMP_LEVEL = 0x1d
+ IP_IPDEFTTL = 0x25
+ IP_IPSECFLOWINFO = 0x24
+ IP_IPSEC_LOCAL_AUTH = 0x1b
+ IP_IPSEC_LOCAL_CRED = 0x19
+ IP_IPSEC_LOCAL_ID = 0x17
+ IP_IPSEC_REMOTE_AUTH = 0x1c
+ IP_IPSEC_REMOTE_CRED = 0x1a
+ IP_IPSEC_REMOTE_ID = 0x18
+ IP_MAXPACKET = 0xffff
+ IP_MAX_MEMBERSHIPS = 0xfff
+ IP_MF = 0x2000
+ IP_MINTTL = 0x20
+ IP_MIN_MEMBERSHIPS = 0xf
+ IP_MSS = 0x240
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_OFFMASK = 0x1fff
+ IP_OPTIONS = 0x1
+ IP_PIPEX = 0x22
+ IP_PORTRANGE = 0x13
+ IP_PORTRANGE_DEFAULT = 0x0
+ IP_PORTRANGE_HIGH = 0x1
+ IP_PORTRANGE_LOW = 0x2
+ IP_RECVDSTADDR = 0x7
+ IP_RECVDSTPORT = 0x21
+ IP_RECVIF = 0x1e
+ IP_RECVOPTS = 0x5
+ IP_RECVRETOPTS = 0x6
+ IP_RECVRTABLE = 0x23
+ IP_RECVTTL = 0x1f
+ IP_RETOPTS = 0x8
+ IP_RF = 0x8000
+ IP_RTABLE = 0x1021
+ IP_SENDSRCADDR = 0x7
+ IP_TOS = 0x3
+ IP_TTL = 0x4
+ ISIG = 0x80
+ ISTRIP = 0x20
+ ITIMER_PROF = 0x2
+ ITIMER_REAL = 0x0
+ ITIMER_VIRTUAL = 0x1
+ IUCLC = 0x1000
+ IXANY = 0x800
+ IXOFF = 0x400
+ IXON = 0x200
+ KERN_HOSTNAME = 0xa
+ KERN_OSRELEASE = 0x2
+ KERN_OSTYPE = 0x1
+ KERN_VERSION = 0x4
+ LCNT_OVERLOAD_FLUSH = 0x6
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x6
+ MADV_NORMAL = 0x0
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_SPACEAVAIL = 0x5
+ MADV_WILLNEED = 0x3
+ MAP_ANON = 0x1000
+ MAP_ANONYMOUS = 0x1000
+ MAP_CONCEAL = 0x8000
+ MAP_COPY = 0x2
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_FLAGMASK = 0xfff7
+ MAP_HASSEMAPHORE = 0x0
+ MAP_INHERIT = 0x0
+ MAP_INHERIT_COPY = 0x1
+ MAP_INHERIT_NONE = 0x2
+ MAP_INHERIT_SHARE = 0x0
+ MAP_INHERIT_ZERO = 0x3
+ MAP_NOEXTEND = 0x0
+ MAP_NORESERVE = 0x0
+ MAP_PRIVATE = 0x2
+ MAP_RENAME = 0x0
+ MAP_SHARED = 0x1
+ MAP_STACK = 0x4000
+ MAP_TRYFIXED = 0x0
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_DEFEXPORTED = 0x200
+ MNT_DELEXPORT = 0x20000
+ MNT_DOOMED = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXRDONLY = 0x80
+ MNT_FORCE = 0x80000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_NOATIME = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOPERM = 0x20
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x4000000
+ MNT_STALLED = 0x100000
+ MNT_SWAPPABLE = 0x200000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0x400ffff
+ MNT_WAIT = 0x1
+ MNT_WANTRDWR = 0x2000000
+ MNT_WXALLOWED = 0x800
+ MOUNT_AFS = "afs"
+ MOUNT_CD9660 = "cd9660"
+ MOUNT_EXT2FS = "ext2fs"
+ MOUNT_FFS = "ffs"
+ MOUNT_FUSEFS = "fuse"
+ MOUNT_MFS = "mfs"
+ MOUNT_MSDOS = "msdos"
+ MOUNT_NCPFS = "ncpfs"
+ MOUNT_NFS = "nfs"
+ MOUNT_NTFS = "ntfs"
+ MOUNT_TMPFS = "tmpfs"
+ MOUNT_UDF = "udf"
+ MOUNT_UFS = "ffs"
+ MSG_BCAST = 0x100
+ MSG_CMSG_CLOEXEC = 0x800
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x80
+ MSG_EOR = 0x8
+ MSG_MCAST = 0x200
+ MSG_NOSIGNAL = 0x400
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MSG_WAITFORONE = 0x1000
+ MS_ASYNC = 0x1
+ MS_INVALIDATE = 0x4
+ MS_SYNC = 0x2
+ NAME_MAX = 0xff
+ NET_RT_DUMP = 0x1
+ NET_RT_FLAGS = 0x2
+ NET_RT_IFLIST = 0x3
+ NET_RT_IFNAMES = 0x6
+ NET_RT_MAXID = 0x8
+ NET_RT_SOURCE = 0x7
+ NET_RT_STATS = 0x4
+ NET_RT_TABLE = 0x5
+ NFDBITS = 0x20
+ NOFLSH = 0x80000000
+ NOKERNINFO = 0x2000000
+ NOTE_ATTRIB = 0x8
+ NOTE_CHANGE = 0x1
+ NOTE_CHILD = 0x4
+ NOTE_DELETE = 0x1
+ NOTE_EOF = 0x2
+ NOTE_EXEC = 0x20000000
+ NOTE_EXIT = 0x80000000
+ NOTE_EXTEND = 0x4
+ NOTE_FORK = 0x40000000
+ NOTE_LINK = 0x10
+ NOTE_LOWAT = 0x1
+ NOTE_OOB = 0x4
+ NOTE_PCTRLMASK = 0xf0000000
+ NOTE_PDATAMASK = 0xfffff
+ NOTE_RENAME = 0x20
+ NOTE_REVOKE = 0x40
+ NOTE_TRACK = 0x1
+ NOTE_TRACKERR = 0x2
+ NOTE_TRUNCATE = 0x80
+ NOTE_WRITE = 0x2
+ OCRNL = 0x10
+ OLCUC = 0x20
+ ONLCR = 0x2
+ ONLRET = 0x80
+ ONOCR = 0x40
+ ONOEOT = 0x8
+ OPOST = 0x1
+ OXTABS = 0x4
+ O_ACCMODE = 0x3
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x10000
+ O_CREAT = 0x200
+ O_DIRECTORY = 0x20000
+ O_DSYNC = 0x80
+ O_EXCL = 0x800
+ O_EXLOCK = 0x20
+ O_FSYNC = 0x80
+ O_NDELAY = 0x4
+ O_NOCTTY = 0x8000
+ O_NOFOLLOW = 0x100
+ O_NONBLOCK = 0x4
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_RSYNC = 0x80
+ O_SHLOCK = 0x10
+ O_SYNC = 0x80
+ O_TRUNC = 0x400
+ O_WRONLY = 0x1
+ PARENB = 0x1000
+ PARMRK = 0x8
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PF_FLUSH = 0x1
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
+ RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffffffffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BFD = 0xb
+ RTAX_BRD = 0x7
+ RTAX_DNS = 0xc
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_LABEL = 0xa
+ RTAX_MAX = 0xf
+ RTAX_NETMASK = 0x2
+ RTAX_SEARCH = 0xe
+ RTAX_SRC = 0x8
+ RTAX_SRCMASK = 0x9
+ RTAX_STATIC = 0xd
+ RTA_AUTHOR = 0x40
+ RTA_BFD = 0x800
+ RTA_BRD = 0x80
+ RTA_DNS = 0x1000
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_LABEL = 0x400
+ RTA_NETMASK = 0x4
+ RTA_SEARCH = 0x4000
+ RTA_SRC = 0x100
+ RTA_SRCMASK = 0x200
+ RTA_STATIC = 0x2000
+ RTF_ANNOUNCE = 0x4000
+ RTF_BFD = 0x1000000
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_CACHED = 0x20000
+ RTF_CLONED = 0x10000
+ RTF_CLONING = 0x100
+ RTF_CONNECTED = 0x800000
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_FMASK = 0x110fc08
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MODIFIED = 0x20
+ RTF_MPATH = 0x40000
+ RTF_MPLS = 0x100000
+ RTF_MULTICAST = 0x200
+ RTF_PERMANENT_ARP = 0x2000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x2000
+ RTF_REJECT = 0x8
+ RTF_STATIC = 0x800
+ RTF_UP = 0x1
+ RTF_USETRAILERS = 0x8000
+ RTM_80211INFO = 0x15
+ RTM_ADD = 0x1
+ RTM_BFD = 0x12
+ RTM_CHANGE = 0x3
+ RTM_CHGADDRATTR = 0x14
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_DESYNC = 0x10
+ RTM_GET = 0x4
+ RTM_IFANNOUNCE = 0xf
+ RTM_IFINFO = 0xe
+ RTM_INVALIDATE = 0x11
+ RTM_LOSING = 0x5
+ RTM_MAXSIZE = 0x800
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_PROPOSAL = 0x13
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_SOURCE = 0x16
+ RTM_VERSION = 0x5
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RT_TABLEID_BITS = 0x8
+ RT_TABLEID_MASK = 0xff
+ RT_TABLEID_MAX = 0xff
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x4
+ SEEK_CUR = 0x1
+ SEEK_END = 0x2
+ SEEK_SET = 0x0
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDMULTI = 0x80206931
+ SIOCAIFADDR = 0x8040691a
+ SIOCAIFGROUP = 0x80286987
+ SIOCATMARK = 0x40047307
+ SIOCBRDGADD = 0x8060693c
+ SIOCBRDGADDL = 0x80606949
+ SIOCBRDGADDS = 0x80606941
+ SIOCBRDGARL = 0x808c694d
+ SIOCBRDGDADDR = 0x81286947
+ SIOCBRDGDEL = 0x8060693d
+ SIOCBRDGDELS = 0x80606942
+ SIOCBRDGFLUSH = 0x80606948
+ SIOCBRDGFRL = 0x808c694e
+ SIOCBRDGGCACHE = 0xc0146941
+ SIOCBRDGGFD = 0xc0146952
+ SIOCBRDGGHT = 0xc0146951
+ SIOCBRDGGIFFLGS = 0xc060693e
+ SIOCBRDGGMA = 0xc0146953
+ SIOCBRDGGPARAM = 0xc0406958
+ SIOCBRDGGPRI = 0xc0146950
+ SIOCBRDGGRL = 0xc030694f
+ SIOCBRDGGTO = 0xc0146946
+ SIOCBRDGIFS = 0xc0606942
+ SIOCBRDGRTS = 0xc0206943
+ SIOCBRDGSADDR = 0xc1286944
+ SIOCBRDGSCACHE = 0x80146940
+ SIOCBRDGSFD = 0x80146952
+ SIOCBRDGSHT = 0x80146951
+ SIOCBRDGSIFCOST = 0x80606955
+ SIOCBRDGSIFFLGS = 0x8060693f
+ SIOCBRDGSIFPRIO = 0x80606954
+ SIOCBRDGSIFPROT = 0x8060694a
+ SIOCBRDGSMA = 0x80146953
+ SIOCBRDGSPRI = 0x80146950
+ SIOCBRDGSPROTO = 0x8014695a
+ SIOCBRDGSTO = 0x80146945
+ SIOCBRDGSTXHC = 0x80146959
+ SIOCDELLABEL = 0x80206997
+ SIOCDELMULTI = 0x80206932
+ SIOCDIFADDR = 0x80206919
+ SIOCDIFGROUP = 0x80286989
+ SIOCDIFPARENT = 0x802069b4
+ SIOCDIFPHYADDR = 0x80206949
+ SIOCDPWE3NEIGHBOR = 0x802069de
+ SIOCDVNETID = 0x802069af
+ SIOCGETKALIVE = 0xc01869a4
+ SIOCGETLABEL = 0x8020699a
+ SIOCGETMPWCFG = 0xc02069ae
+ SIOCGETPFLOW = 0xc02069fe
+ SIOCGETPFSYNC = 0xc02069f8
+ SIOCGETSGCNT = 0xc0207534
+ SIOCGETVIFCNT = 0xc0287533
+ SIOCGETVLAN = 0xc0206990
+ SIOCGIFADDR = 0xc0206921
+ SIOCGIFBRDADDR = 0xc0206923
+ SIOCGIFCONF = 0xc0106924
+ SIOCGIFDATA = 0xc020691b
+ SIOCGIFDESCR = 0xc0206981
+ SIOCGIFDSTADDR = 0xc0206922
+ SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFGATTR = 0xc028698b
+ SIOCGIFGENERIC = 0xc020693a
+ SIOCGIFGLIST = 0xc028698d
+ SIOCGIFGMEMB = 0xc028698a
+ SIOCGIFGROUP = 0xc0286988
+ SIOCGIFHARDMTU = 0xc02069a5
+ SIOCGIFLLPRIO = 0xc02069b6
+ SIOCGIFMEDIA = 0xc0406938
+ SIOCGIFMETRIC = 0xc0206917
+ SIOCGIFMTU = 0xc020697e
+ SIOCGIFNETMASK = 0xc0206925
+ SIOCGIFPAIR = 0xc02069b1
+ SIOCGIFPARENT = 0xc02069b3
+ SIOCGIFPRIORITY = 0xc020699c
+ SIOCGIFRDOMAIN = 0xc02069a0
+ SIOCGIFRTLABEL = 0xc0206983
+ SIOCGIFRXR = 0x802069aa
+ SIOCGIFSFFPAGE = 0xc1126939
+ SIOCGIFXFLAGS = 0xc020699e
+ SIOCGLIFPHYADDR = 0xc218694b
+ SIOCGLIFPHYDF = 0xc02069c2
+ SIOCGLIFPHYECN = 0xc02069c8
+ SIOCGLIFPHYRTABLE = 0xc02069a2
+ SIOCGLIFPHYTTL = 0xc02069a9
+ SIOCGPGRP = 0x40047309
+ SIOCGPWE3 = 0xc0206998
+ SIOCGPWE3CTRLWORD = 0xc02069dc
+ SIOCGPWE3FAT = 0xc02069dd
+ SIOCGPWE3NEIGHBOR = 0xc21869de
+ SIOCGRXHPRIO = 0xc02069db
+ SIOCGSPPPPARAMS = 0xc0206994
+ SIOCGTXHPRIO = 0xc02069c6
+ SIOCGUMBINFO = 0xc02069be
+ SIOCGUMBPARAM = 0xc02069c0
+ SIOCGVH = 0xc02069f6
+ SIOCGVNETFLOWID = 0xc02069c4
+ SIOCGVNETID = 0xc02069a7
+ SIOCIFAFATTACH = 0x801169ab
+ SIOCIFAFDETACH = 0x801169ac
+ SIOCIFCREATE = 0x8020697a
+ SIOCIFDESTROY = 0x80206979
+ SIOCIFGCLONERS = 0xc0106978
+ SIOCSETKALIVE = 0x801869a3
+ SIOCSETLABEL = 0x80206999
+ SIOCSETMPWCFG = 0x802069ad
+ SIOCSETPFLOW = 0x802069fd
+ SIOCSETPFSYNC = 0x802069f7
+ SIOCSETVLAN = 0x8020698f
+ SIOCSIFADDR = 0x8020690c
+ SIOCSIFBRDADDR = 0x80206913
+ SIOCSIFDESCR = 0x80206980
+ SIOCSIFDSTADDR = 0x8020690e
+ SIOCSIFFLAGS = 0x80206910
+ SIOCSIFGATTR = 0x8028698c
+ SIOCSIFGENERIC = 0x80206939
+ SIOCSIFLLADDR = 0x8020691f
+ SIOCSIFLLPRIO = 0x802069b5
+ SIOCSIFMEDIA = 0xc0206937
+ SIOCSIFMETRIC = 0x80206918
+ SIOCSIFMTU = 0x8020697f
+ SIOCSIFNETMASK = 0x80206916
+ SIOCSIFPAIR = 0x802069b0
+ SIOCSIFPARENT = 0x802069b2
+ SIOCSIFPRIORITY = 0x8020699b
+ SIOCSIFRDOMAIN = 0x8020699f
+ SIOCSIFRTLABEL = 0x80206982
+ SIOCSIFXFLAGS = 0x8020699d
+ SIOCSLIFPHYADDR = 0x8218694a
+ SIOCSLIFPHYDF = 0x802069c1
+ SIOCSLIFPHYECN = 0x802069c7
+ SIOCSLIFPHYRTABLE = 0x802069a1
+ SIOCSLIFPHYTTL = 0x802069a8
+ SIOCSPGRP = 0x80047308
+ SIOCSPWE3CTRLWORD = 0x802069dc
+ SIOCSPWE3FAT = 0x802069dd
+ SIOCSPWE3NEIGHBOR = 0x821869de
+ SIOCSRXHPRIO = 0x802069db
+ SIOCSSPPPPARAMS = 0x80206993
+ SIOCSTXHPRIO = 0x802069c5
+ SIOCSUMBPARAM = 0x802069bf
+ SIOCSVH = 0xc02069f5
+ SIOCSVNETFLOWID = 0x802069c3
+ SIOCSVNETID = 0x802069a6
+ SOCK_CLOEXEC = 0x8000
+ SOCK_DGRAM = 0x2
+ SOCK_DNS = 0x1000
+ SOCK_NONBLOCK = 0x4000
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x2
+ SO_BINDANY = 0x1000
+ SO_BROADCAST = 0x20
+ SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1024
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_NETPROC = 0x1020
+ SO_OOBINLINE = 0x100
+ SO_PEERCRED = 0x1022
+ SO_PROTOCOL = 0x1025
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RTABLE = 0x1021
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SPLICE = 0x1023
+ SO_TIMESTAMP = 0x800
+ SO_TYPE = 0x1008
+ SO_USELOOPBACK = 0x40
+ SO_ZEROIZE = 0x2000
+ S_BLKSIZE = 0x200
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISTXT = 0x200
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TCIFLUSH = 0x1
+ TCIOFF = 0x3
+ TCIOFLUSH = 0x3
+ TCION = 0x4
+ TCOFLUSH = 0x2
+ TCOOFF = 0x1
+ TCOON = 0x2
+ TCPOPT_EOL = 0x0
+ TCPOPT_MAXSEG = 0x2
+ TCPOPT_NOP = 0x1
+ TCPOPT_SACK = 0x5
+ TCPOPT_SACK_HDR = 0x1010500
+ TCPOPT_SACK_PERMITTED = 0x4
+ TCPOPT_SACK_PERMIT_HDR = 0x1010402
+ TCPOPT_SIGNATURE = 0x13
+ TCPOPT_TIMESTAMP = 0x8
+ TCPOPT_TSTAMP_HDR = 0x101080a
+ TCPOPT_WINDOW = 0x3
+ TCP_INFO = 0x9
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_SACK = 0x3
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MD5SIG = 0x4
+ TCP_MSS = 0x200
+ TCP_NODELAY = 0x1
+ TCP_NOPUSH = 0x10
+ TCP_SACKHOLE_LIMIT = 0x80
+ TCP_SACK_ENABLE = 0x8
+ TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCHKVERAUTH = 0x2000741e
+ TIOCCLRVERAUTH = 0x2000741d
+ TIOCCONS = 0x80047462
+ TIOCDRAIN = 0x2000745e
+ TIOCEXCL = 0x2000740d
+ TIOCEXT = 0x80047460
+ TIOCFLAG_CLOCAL = 0x2
+ TIOCFLAG_CRTSCTS = 0x4
+ TIOCFLAG_MDMBUF = 0x8
+ TIOCFLAG_PPS = 0x10
+ TIOCFLAG_SOFTCAR = 0x1
+ TIOCFLUSH = 0x80047410
+ TIOCGETA = 0x402c7413
+ TIOCGETD = 0x4004741a
+ TIOCGFLAGS = 0x4004745d
+ TIOCGPGRP = 0x40047477
+ TIOCGSID = 0x40047463
+ TIOCGTSTAMP = 0x4010745b
+ TIOCGWINSZ = 0x40087468
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGET = 0x4004746a
+ TIOCMODG = 0x4004746a
+ TIOCMODS = 0x8004746d
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCREMOTE = 0x80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSCTTY = 0x20007461
+ TIOCSDTR = 0x20007479
+ TIOCSETA = 0x802c7414
+ TIOCSETAF = 0x802c7416
+ TIOCSETAW = 0x802c7415
+ TIOCSETD = 0x8004741b
+ TIOCSETVERAUTH = 0x8004741c
+ TIOCSFLAGS = 0x8004745c
+ TIOCSIG = 0x8004745f
+ TIOCSPGRP = 0x80047476
+ TIOCSTART = 0x2000746e
+ TIOCSTAT = 0x20007465
+ TIOCSTOP = 0x2000746f
+ TIOCSTSTAMP = 0x8008745a
+ TIOCSWINSZ = 0x80087467
+ TIOCUCNTL = 0x80047466
+ TIOCUCNTL_CBRK = 0x7a
+ TIOCUCNTL_SBRK = 0x7b
+ TOSTOP = 0x400000
+ UTIME_NOW = -0x2
+ UTIME_OMIT = -0x1
+ VDISCARD = 0xf
+ VDSUSP = 0xb
+ VEOF = 0x0
+ VEOL = 0x1
+ VEOL2 = 0x2
+ VERASE = 0x3
+ VINTR = 0x8
+ VKILL = 0x5
+ VLNEXT = 0xe
+ VMIN = 0x10
+ VM_ANONMIN = 0x7
+ VM_LOADAVG = 0x2
+ VM_MALLOC_CONF = 0xc
+ VM_MAXID = 0xd
+ VM_MAXSLP = 0xa
+ VM_METER = 0x1
+ VM_NKMEMPAGES = 0x6
+ VM_PSSTRINGS = 0x3
+ VM_SWAPENCRYPT = 0x5
+ VM_USPACE = 0xb
+ VM_UVMEXP = 0x4
+ VM_VNODEMIN = 0x9
+ VM_VTEXTMIN = 0x8
+ VQUIT = 0x9
+ VREPRINT = 0x6
+ VSTART = 0xc
+ VSTATUS = 0x12
+ VSTOP = 0xd
+ VSUSP = 0xa
+ VTIME = 0x11
+ VWERASE = 0x4
+ WALTSIG = 0x4
+ WCONTINUED = 0x8
+ WCOREFLAG = 0x80
+ WNOHANG = 0x1
+ WUNTRACED = 0x2
+ XCASE = 0x1000000
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EADDRINUSE = syscall.Errno(0x30)
+ EADDRNOTAVAIL = syscall.Errno(0x31)
+ EAFNOSUPPORT = syscall.Errno(0x2f)
+ EAGAIN = syscall.Errno(0x23)
+ EALREADY = syscall.Errno(0x25)
+ EAUTH = syscall.Errno(0x50)
+ EBADF = syscall.Errno(0x9)
+ EBADMSG = syscall.Errno(0x5c)
+ EBADRPC = syscall.Errno(0x48)
+ EBUSY = syscall.Errno(0x10)
+ ECANCELED = syscall.Errno(0x58)
+ ECHILD = syscall.Errno(0xa)
+ ECONNABORTED = syscall.Errno(0x35)
+ ECONNREFUSED = syscall.Errno(0x3d)
+ ECONNRESET = syscall.Errno(0x36)
+ EDEADLK = syscall.Errno(0xb)
+ EDESTADDRREQ = syscall.Errno(0x27)
+ EDOM = syscall.Errno(0x21)
+ EDQUOT = syscall.Errno(0x45)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EFTYPE = syscall.Errno(0x4f)
+ EHOSTDOWN = syscall.Errno(0x40)
+ EHOSTUNREACH = syscall.Errno(0x41)
+ EIDRM = syscall.Errno(0x59)
+ EILSEQ = syscall.Errno(0x54)
+ EINPROGRESS = syscall.Errno(0x24)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EIPSEC = syscall.Errno(0x52)
+ EISCONN = syscall.Errno(0x38)
+ EISDIR = syscall.Errno(0x15)
+ ELAST = syscall.Errno(0x5f)
+ ELOOP = syscall.Errno(0x3e)
+ EMEDIUMTYPE = syscall.Errno(0x56)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ EMSGSIZE = syscall.Errno(0x28)
+ ENAMETOOLONG = syscall.Errno(0x3f)
+ ENEEDAUTH = syscall.Errno(0x51)
+ ENETDOWN = syscall.Errno(0x32)
+ ENETRESET = syscall.Errno(0x34)
+ ENETUNREACH = syscall.Errno(0x33)
+ ENFILE = syscall.Errno(0x17)
+ ENOATTR = syscall.Errno(0x53)
+ ENOBUFS = syscall.Errno(0x37)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOLCK = syscall.Errno(0x4d)
+ ENOMEDIUM = syscall.Errno(0x55)
+ ENOMEM = syscall.Errno(0xc)
+ ENOMSG = syscall.Errno(0x5a)
+ ENOPROTOOPT = syscall.Errno(0x2a)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOSYS = syscall.Errno(0x4e)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTCONN = syscall.Errno(0x39)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTEMPTY = syscall.Errno(0x42)
+ ENOTRECOVERABLE = syscall.Errno(0x5d)
+ ENOTSOCK = syscall.Errno(0x26)
+ ENOTSUP = syscall.Errno(0x5b)
+ ENOTTY = syscall.Errno(0x19)
+ ENXIO = syscall.Errno(0x6)
+ EOPNOTSUPP = syscall.Errno(0x2d)
+ EOVERFLOW = syscall.Errno(0x57)
+ EOWNERDEAD = syscall.Errno(0x5e)
+ EPERM = syscall.Errno(0x1)
+ EPFNOSUPPORT = syscall.Errno(0x2e)
+ EPIPE = syscall.Errno(0x20)
+ EPROCLIM = syscall.Errno(0x43)
+ EPROCUNAVAIL = syscall.Errno(0x4c)
+ EPROGMISMATCH = syscall.Errno(0x4b)
+ EPROGUNAVAIL = syscall.Errno(0x4a)
+ EPROTO = syscall.Errno(0x5f)
+ EPROTONOSUPPORT = syscall.Errno(0x2b)
+ EPROTOTYPE = syscall.Errno(0x29)
+ ERANGE = syscall.Errno(0x22)
+ EREMOTE = syscall.Errno(0x47)
+ EROFS = syscall.Errno(0x1e)
+ ERPCMISMATCH = syscall.Errno(0x49)
+ ESHUTDOWN = syscall.Errno(0x3a)
+ ESOCKTNOSUPPORT = syscall.Errno(0x2c)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ESTALE = syscall.Errno(0x46)
+ ETIMEDOUT = syscall.Errno(0x3c)
+ ETOOMANYREFS = syscall.Errno(0x3b)
+ ETXTBSY = syscall.Errno(0x1a)
+ EUSERS = syscall.Errno(0x44)
+ EWOULDBLOCK = syscall.Errno(0x23)
+ EXDEV = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGALRM = syscall.Signal(0xe)
+ SIGBUS = syscall.Signal(0xa)
+ SIGCHLD = syscall.Signal(0x14)
+ SIGCONT = syscall.Signal(0x13)
+ SIGEMT = syscall.Signal(0x7)
+ SIGFPE = syscall.Signal(0x8)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINFO = syscall.Signal(0x1d)
+ SIGINT = syscall.Signal(0x2)
+ SIGIO = syscall.Signal(0x17)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKILL = syscall.Signal(0x9)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGPROF = syscall.Signal(0x1b)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGSTOP = syscall.Signal(0x11)
+ SIGSYS = syscall.Signal(0xc)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTHR = syscall.Signal(0x20)
+ SIGTRAP = syscall.Signal(0x5)
+ SIGTSTP = syscall.Signal(0x12)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x10)
+ SIGUSR1 = syscall.Signal(0x1e)
+ SIGUSR2 = syscall.Signal(0x1f)
+ SIGVTALRM = syscall.Signal(0x1a)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "operation not permitted"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "input/output error"},
+ {6, "ENXIO", "device not configured"},
+ {7, "E2BIG", "argument list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file descriptor"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EDEADLK", "resource deadlock avoided"},
+ {12, "ENOMEM", "cannot allocate memory"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device busy"},
+ {17, "EEXIST", "file exists"},
+ {18, "EXDEV", "cross-device link"},
+ {19, "ENODEV", "operation not supported by device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "too many open files in system"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "inappropriate ioctl for device"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "numerical argument out of domain"},
+ {34, "ERANGE", "result too large"},
+ {35, "EAGAIN", "resource temporarily unavailable"},
+ {36, "EINPROGRESS", "operation now in progress"},
+ {37, "EALREADY", "operation already in progress"},
+ {38, "ENOTSOCK", "socket operation on non-socket"},
+ {39, "EDESTADDRREQ", "destination address required"},
+ {40, "EMSGSIZE", "message too long"},
+ {41, "EPROTOTYPE", "protocol wrong type for socket"},
+ {42, "ENOPROTOOPT", "protocol not available"},
+ {43, "EPROTONOSUPPORT", "protocol not supported"},
+ {44, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {45, "EOPNOTSUPP", "operation not supported"},
+ {46, "EPFNOSUPPORT", "protocol family not supported"},
+ {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
+ {48, "EADDRINUSE", "address already in use"},
+ {49, "EADDRNOTAVAIL", "can't assign requested address"},
+ {50, "ENETDOWN", "network is down"},
+ {51, "ENETUNREACH", "network is unreachable"},
+ {52, "ENETRESET", "network dropped connection on reset"},
+ {53, "ECONNABORTED", "software caused connection abort"},
+ {54, "ECONNRESET", "connection reset by peer"},
+ {55, "ENOBUFS", "no buffer space available"},
+ {56, "EISCONN", "socket is already connected"},
+ {57, "ENOTCONN", "socket is not connected"},
+ {58, "ESHUTDOWN", "can't send after socket shutdown"},
+ {59, "ETOOMANYREFS", "too many references: can't splice"},
+ {60, "ETIMEDOUT", "operation timed out"},
+ {61, "ECONNREFUSED", "connection refused"},
+ {62, "ELOOP", "too many levels of symbolic links"},
+ {63, "ENAMETOOLONG", "file name too long"},
+ {64, "EHOSTDOWN", "host is down"},
+ {65, "EHOSTUNREACH", "no route to host"},
+ {66, "ENOTEMPTY", "directory not empty"},
+ {67, "EPROCLIM", "too many processes"},
+ {68, "EUSERS", "too many users"},
+ {69, "EDQUOT", "disk quota exceeded"},
+ {70, "ESTALE", "stale NFS file handle"},
+ {71, "EREMOTE", "too many levels of remote in path"},
+ {72, "EBADRPC", "RPC struct is bad"},
+ {73, "ERPCMISMATCH", "RPC version wrong"},
+ {74, "EPROGUNAVAIL", "RPC program not available"},
+ {75, "EPROGMISMATCH", "program version wrong"},
+ {76, "EPROCUNAVAIL", "bad procedure for program"},
+ {77, "ENOLCK", "no locks available"},
+ {78, "ENOSYS", "function not implemented"},
+ {79, "EFTYPE", "inappropriate file type or format"},
+ {80, "EAUTH", "authentication error"},
+ {81, "ENEEDAUTH", "need authenticator"},
+ {82, "EIPSEC", "IPsec processing failure"},
+ {83, "ENOATTR", "attribute not found"},
+ {84, "EILSEQ", "illegal byte sequence"},
+ {85, "ENOMEDIUM", "no medium found"},
+ {86, "EMEDIUMTYPE", "wrong medium type"},
+ {87, "EOVERFLOW", "value too large to be stored in data type"},
+ {88, "ECANCELED", "operation canceled"},
+ {89, "EIDRM", "identifier removed"},
+ {90, "ENOMSG", "no message of desired type"},
+ {91, "ENOTSUP", "not supported"},
+ {92, "EBADMSG", "bad message"},
+ {93, "ENOTRECOVERABLE", "state not recoverable"},
+ {94, "EOWNERDEAD", "previous owner died"},
+ {95, "ELAST", "protocol error"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/BPT trap"},
+ {6, "SIGABRT", "abort trap"},
+ {7, "SIGEMT", "EMT trap"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGBUS", "bus error"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGSYS", "bad system call"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGURG", "urgent I/O condition"},
+ {17, "SIGSTOP", "suspended (signal)"},
+ {18, "SIGTSTP", "suspended"},
+ {19, "SIGCONT", "continued"},
+ {20, "SIGCHLD", "child exited"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGIO", "I/O possible"},
+ {24, "SIGXCPU", "cputime limit exceeded"},
+ {25, "SIGXFSZ", "filesize limit exceeded"},
+ {26, "SIGVTALRM", "virtual timer expired"},
+ {27, "SIGPROF", "profiling timer expired"},
+ {28, "SIGWINCH", "window size changes"},
+ {29, "SIGINFO", "information request"},
+ {30, "SIGUSR1", "user defined signal 1"},
+ {31, "SIGUSR2", "user defined signal 2"},
+ {32, "SIGTHR", "thread AST"},
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go
new file mode 100644
index 000000000..13d403031
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go
@@ -0,0 +1,1904 @@
+// mkerrors.sh -m64
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build riscv64 && openbsd
+// +build riscv64,openbsd
+
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- -m64 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+ AF_APPLETALK = 0x10
+ AF_BLUETOOTH = 0x20
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_CNT = 0x15
+ AF_COIP = 0x14
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_E164 = 0x1a
+ AF_ECMA = 0x8
+ AF_ENCAP = 0x1c
+ AF_HYLINK = 0xf
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x18
+ AF_IPX = 0x17
+ AF_ISDN = 0x1a
+ AF_ISO = 0x7
+ AF_KEY = 0x1e
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x24
+ AF_MPLS = 0x21
+ AF_NATM = 0x1b
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PUP = 0x4
+ AF_ROUTE = 0x11
+ AF_SIP = 0x1d
+ AF_SNA = 0xb
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ ALTWERASE = 0x200
+ ARPHRD_ETHER = 0x1
+ ARPHRD_FRELAY = 0xf
+ ARPHRD_IEEE1394 = 0x18
+ ARPHRD_IEEE802 = 0x6
+ B0 = 0x0
+ B110 = 0x6e
+ B115200 = 0x1c200
+ B1200 = 0x4b0
+ B134 = 0x86
+ B14400 = 0x3840
+ B150 = 0x96
+ B1800 = 0x708
+ B19200 = 0x4b00
+ B200 = 0xc8
+ B230400 = 0x38400
+ B2400 = 0x960
+ B28800 = 0x7080
+ B300 = 0x12c
+ B38400 = 0x9600
+ B4800 = 0x12c0
+ B50 = 0x32
+ B57600 = 0xe100
+ B600 = 0x258
+ B7200 = 0x1c20
+ B75 = 0x4b
+ B76800 = 0x12c00
+ B9600 = 0x2580
+ BIOCFLUSH = 0x20004268
+ BIOCGBLEN = 0x40044266
+ BIOCGDIRFILT = 0x4004427c
+ BIOCGDLT = 0x4004426a
+ BIOCGDLTLIST = 0xc010427b
+ BIOCGETIF = 0x4020426b
+ BIOCGFILDROP = 0x40044278
+ BIOCGHDRCMPLT = 0x40044274
+ BIOCGRSIG = 0x40044273
+ BIOCGRTIMEOUT = 0x4010426e
+ BIOCGSTATS = 0x4008426f
+ BIOCIMMEDIATE = 0x80044270
+ BIOCLOCK = 0x20004276
+ BIOCPROMISC = 0x20004269
+ BIOCSBLEN = 0xc0044266
+ BIOCSDIRFILT = 0x8004427d
+ BIOCSDLT = 0x8004427a
+ BIOCSETF = 0x80104267
+ BIOCSETIF = 0x8020426c
+ BIOCSETWF = 0x80104277
+ BIOCSFILDROP = 0x80044279
+ BIOCSHDRCMPLT = 0x80044275
+ BIOCSRSIG = 0x80044272
+ BIOCSRTIMEOUT = 0x8010426d
+ BIOCVERSION = 0x40044271
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALIGNMENT = 0x4
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIRECTION_IN = 0x1
+ BPF_DIRECTION_OUT = 0x2
+ BPF_DIV = 0x30
+ BPF_FILDROP_CAPTURE = 0x1
+ BPF_FILDROP_DROP = 0x2
+ BPF_FILDROP_PASS = 0x0
+ BPF_F_DIR_IN = 0x10
+ BPF_F_DIR_MASK = 0x30
+ BPF_F_DIR_OUT = 0x20
+ BPF_F_DIR_SHIFT = 0x4
+ BPF_F_FLOWID = 0x8
+ BPF_F_PRI_MASK = 0x7
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXBUFSIZE = 0x200000
+ BPF_MAXINSNS = 0x200
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINBUFSIZE = 0x20
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_OR = 0x40
+ BPF_RELEASE = 0x30bb6
+ BPF_RET = 0x6
+ BPF_RND = 0xc0
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BRKINT = 0x2
+ CFLUSH = 0xf
+ CLOCAL = 0x8000
+ CLOCK_BOOTTIME = 0x6
+ CLOCK_MONOTONIC = 0x3
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x4
+ CLOCK_UPTIME = 0x5
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
+ CREAD = 0x800
+ CRTSCTS = 0x10000
+ CS5 = 0x0
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTART = 0x11
+ CSTATUS = 0xff
+ CSTOP = 0x13
+ CSTOPB = 0x400
+ CSUSP = 0x1a
+ CTL_HW = 0x6
+ CTL_KERN = 0x1
+ CTL_MAXNAME = 0xc
+ CTL_NET = 0x4
+ DIOCADDQUEUE = 0xc110445d
+ DIOCADDRULE = 0xcd604404
+ DIOCADDSTATE = 0xc1084425
+ DIOCCHANGERULE = 0xcd60441a
+ DIOCCLRIFFLAG = 0xc028445a
+ DIOCCLRSRCNODES = 0x20004455
+ DIOCCLRSTATES = 0xc0e04412
+ DIOCCLRSTATUS = 0xc0284416
+ DIOCGETLIMIT = 0xc0084427
+ DIOCGETQSTATS = 0xc1204460
+ DIOCGETQUEUE = 0xc110445f
+ DIOCGETQUEUES = 0xc110445e
+ DIOCGETRULE = 0xcd604407
+ DIOCGETRULES = 0xcd604406
+ DIOCGETRULESET = 0xc444443b
+ DIOCGETRULESETS = 0xc444443a
+ DIOCGETSRCNODES = 0xc0104454
+ DIOCGETSTATE = 0xc1084413
+ DIOCGETSTATES = 0xc0104419
+ DIOCGETSTATUS = 0xc1e84415
+ DIOCGETSYNFLWATS = 0xc0084463
+ DIOCGETTIMEOUT = 0xc008441e
+ DIOCIGETIFACES = 0xc0284457
+ DIOCKILLSRCNODES = 0xc080445b
+ DIOCKILLSTATES = 0xc0e04429
+ DIOCNATLOOK = 0xc0504417
+ DIOCOSFPADD = 0xc088444f
+ DIOCOSFPFLUSH = 0x2000444e
+ DIOCOSFPGET = 0xc0884450
+ DIOCRADDADDRS = 0xc4504443
+ DIOCRADDTABLES = 0xc450443d
+ DIOCRCLRADDRS = 0xc4504442
+ DIOCRCLRASTATS = 0xc4504448
+ DIOCRCLRTABLES = 0xc450443c
+ DIOCRCLRTSTATS = 0xc4504441
+ DIOCRDELADDRS = 0xc4504444
+ DIOCRDELTABLES = 0xc450443e
+ DIOCRGETADDRS = 0xc4504446
+ DIOCRGETASTATS = 0xc4504447
+ DIOCRGETTABLES = 0xc450443f
+ DIOCRGETTSTATS = 0xc4504440
+ DIOCRINADEFINE = 0xc450444d
+ DIOCRSETADDRS = 0xc4504445
+ DIOCRSETTFLAGS = 0xc450444a
+ DIOCRTSTADDRS = 0xc4504449
+ DIOCSETDEBUG = 0xc0044418
+ DIOCSETHOSTID = 0xc0044456
+ DIOCSETIFFLAG = 0xc0284459
+ DIOCSETLIMIT = 0xc0084428
+ DIOCSETREASS = 0xc004445c
+ DIOCSETSTATUSIF = 0xc0284414
+ DIOCSETSYNCOOKIES = 0xc0014462
+ DIOCSETSYNFLWATS = 0xc0084461
+ DIOCSETTIMEOUT = 0xc008441d
+ DIOCSTART = 0x20004401
+ DIOCSTOP = 0x20004402
+ DIOCXBEGIN = 0xc0104451
+ DIOCXCOMMIT = 0xc0104452
+ DIOCXROLLBACK = 0xc0104453
+ DLT_ARCNET = 0x7
+ DLT_ATM_RFC1483 = 0xb
+ DLT_AX25 = 0x3
+ DLT_CHAOS = 0x5
+ DLT_C_HDLC = 0x68
+ DLT_EN10MB = 0x1
+ DLT_EN3MB = 0x2
+ DLT_ENC = 0xd
+ DLT_FDDI = 0xa
+ DLT_IEEE802 = 0x6
+ DLT_IEEE802_11 = 0x69
+ DLT_IEEE802_11_RADIO = 0x7f
+ DLT_LOOP = 0xc
+ DLT_MPLS = 0xdb
+ DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
+ DLT_PFLOG = 0x75
+ DLT_PFSYNC = 0x12
+ DLT_PPP = 0x9
+ DLT_PPP_BSDOS = 0x10
+ DLT_PPP_ETHER = 0x33
+ DLT_PPP_SERIAL = 0x32
+ DLT_PRONET = 0x4
+ DLT_RAW = 0xe
+ DLT_SLIP = 0x8
+ DLT_SLIP_BSDOS = 0xf
+ DLT_USBPCAP = 0xf9
+ DLT_USER0 = 0x93
+ DLT_USER1 = 0x94
+ DLT_USER10 = 0x9d
+ DLT_USER11 = 0x9e
+ DLT_USER12 = 0x9f
+ DLT_USER13 = 0xa0
+ DLT_USER14 = 0xa1
+ DLT_USER15 = 0xa2
+ DLT_USER2 = 0x95
+ DLT_USER3 = 0x96
+ DLT_USER4 = 0x97
+ DLT_USER5 = 0x98
+ DLT_USER6 = 0x99
+ DLT_USER7 = 0x9a
+ DLT_USER8 = 0x9b
+ DLT_USER9 = 0x9c
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ ECHO = 0x8
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EMT_TAGOVF = 0x1
+ EMUL_ENABLED = 0x1
+ EMUL_NATIVE = 0x2
+ ENDRUNDISC = 0x9
+ ETH64_8021_RSVD_MASK = 0xfffffffffff0
+ ETH64_8021_RSVD_PREFIX = 0x180c2000000
+ ETHERMIN = 0x2e
+ ETHERMTU = 0x5dc
+ ETHERTYPE_8023 = 0x4
+ ETHERTYPE_AARP = 0x80f3
+ ETHERTYPE_ACCTON = 0x8390
+ ETHERTYPE_AEONIC = 0x8036
+ ETHERTYPE_ALPHA = 0x814a
+ ETHERTYPE_AMBER = 0x6008
+ ETHERTYPE_AMOEBA = 0x8145
+ ETHERTYPE_AOE = 0x88a2
+ ETHERTYPE_APOLLO = 0x80f7
+ ETHERTYPE_APOLLODOMAIN = 0x8019
+ ETHERTYPE_APPLETALK = 0x809b
+ ETHERTYPE_APPLITEK = 0x80c7
+ ETHERTYPE_ARGONAUT = 0x803a
+ ETHERTYPE_ARP = 0x806
+ ETHERTYPE_AT = 0x809b
+ ETHERTYPE_ATALK = 0x809b
+ ETHERTYPE_ATOMIC = 0x86df
+ ETHERTYPE_ATT = 0x8069
+ ETHERTYPE_ATTSTANFORD = 0x8008
+ ETHERTYPE_AUTOPHON = 0x806a
+ ETHERTYPE_AXIS = 0x8856
+ ETHERTYPE_BCLOOP = 0x9003
+ ETHERTYPE_BOFL = 0x8102
+ ETHERTYPE_CABLETRON = 0x7034
+ ETHERTYPE_CHAOS = 0x804
+ ETHERTYPE_COMDESIGN = 0x806c
+ ETHERTYPE_COMPUGRAPHIC = 0x806d
+ ETHERTYPE_COUNTERPOINT = 0x8062
+ ETHERTYPE_CRONUS = 0x8004
+ ETHERTYPE_CRONUSVLN = 0x8003
+ ETHERTYPE_DCA = 0x1234
+ ETHERTYPE_DDE = 0x807b
+ ETHERTYPE_DEBNI = 0xaaaa
+ ETHERTYPE_DECAM = 0x8048
+ ETHERTYPE_DECCUST = 0x6006
+ ETHERTYPE_DECDIAG = 0x6005
+ ETHERTYPE_DECDNS = 0x803c
+ ETHERTYPE_DECDTS = 0x803e
+ ETHERTYPE_DECEXPER = 0x6000
+ ETHERTYPE_DECLAST = 0x8041
+ ETHERTYPE_DECLTM = 0x803f
+ ETHERTYPE_DECMUMPS = 0x6009
+ ETHERTYPE_DECNETBIOS = 0x8040
+ ETHERTYPE_DELTACON = 0x86de
+ ETHERTYPE_DIDDLE = 0x4321
+ ETHERTYPE_DLOG1 = 0x660
+ ETHERTYPE_DLOG2 = 0x661
+ ETHERTYPE_DN = 0x6003
+ ETHERTYPE_DOGFIGHT = 0x1989
+ ETHERTYPE_DSMD = 0x8039
+ ETHERTYPE_EAPOL = 0x888e
+ ETHERTYPE_ECMA = 0x803
+ ETHERTYPE_ENCRYPT = 0x803d
+ ETHERTYPE_ES = 0x805d
+ ETHERTYPE_EXCELAN = 0x8010
+ ETHERTYPE_EXPERDATA = 0x8049
+ ETHERTYPE_FLIP = 0x8146
+ ETHERTYPE_FLOWCONTROL = 0x8808
+ ETHERTYPE_FRARP = 0x808
+ ETHERTYPE_GENDYN = 0x8068
+ ETHERTYPE_HAYES = 0x8130
+ ETHERTYPE_HIPPI_FP = 0x8180
+ ETHERTYPE_HITACHI = 0x8820
+ ETHERTYPE_HP = 0x8005
+ ETHERTYPE_IEEEPUP = 0xa00
+ ETHERTYPE_IEEEPUPAT = 0xa01
+ ETHERTYPE_IMLBL = 0x4c42
+ ETHERTYPE_IMLBLDIAG = 0x424c
+ ETHERTYPE_IP = 0x800
+ ETHERTYPE_IPAS = 0x876c
+ ETHERTYPE_IPV6 = 0x86dd
+ ETHERTYPE_IPX = 0x8137
+ ETHERTYPE_IPXNEW = 0x8037
+ ETHERTYPE_KALPANA = 0x8582
+ ETHERTYPE_LANBRIDGE = 0x8038
+ ETHERTYPE_LANPROBE = 0x8888
+ ETHERTYPE_LAT = 0x6004
+ ETHERTYPE_LBACK = 0x9000
+ ETHERTYPE_LITTLE = 0x8060
+ ETHERTYPE_LLDP = 0x88cc
+ ETHERTYPE_LOGICRAFT = 0x8148
+ ETHERTYPE_LOOPBACK = 0x9000
+ ETHERTYPE_MACSEC = 0x88e5
+ ETHERTYPE_MATRA = 0x807a
+ ETHERTYPE_MAX = 0xffff
+ ETHERTYPE_MERIT = 0x807c
+ ETHERTYPE_MICP = 0x873a
+ ETHERTYPE_MOPDL = 0x6001
+ ETHERTYPE_MOPRC = 0x6002
+ ETHERTYPE_MOTOROLA = 0x818d
+ ETHERTYPE_MPLS = 0x8847
+ ETHERTYPE_MPLS_MCAST = 0x8848
+ ETHERTYPE_MUMPS = 0x813f
+ ETHERTYPE_NBPCC = 0x3c04
+ ETHERTYPE_NBPCLAIM = 0x3c09
+ ETHERTYPE_NBPCLREQ = 0x3c05
+ ETHERTYPE_NBPCLRSP = 0x3c06
+ ETHERTYPE_NBPCREQ = 0x3c02
+ ETHERTYPE_NBPCRSP = 0x3c03
+ ETHERTYPE_NBPDG = 0x3c07
+ ETHERTYPE_NBPDGB = 0x3c08
+ ETHERTYPE_NBPDLTE = 0x3c0a
+ ETHERTYPE_NBPRAR = 0x3c0c
+ ETHERTYPE_NBPRAS = 0x3c0b
+ ETHERTYPE_NBPRST = 0x3c0d
+ ETHERTYPE_NBPSCD = 0x3c01
+ ETHERTYPE_NBPVCD = 0x3c00
+ ETHERTYPE_NBS = 0x802
+ ETHERTYPE_NCD = 0x8149
+ ETHERTYPE_NESTAR = 0x8006
+ ETHERTYPE_NETBEUI = 0x8191
+ ETHERTYPE_NHRP = 0x2001
+ ETHERTYPE_NOVELL = 0x8138
+ ETHERTYPE_NS = 0x600
+ ETHERTYPE_NSAT = 0x601
+ ETHERTYPE_NSCOMPAT = 0x807
+ ETHERTYPE_NSH = 0x984f
+ ETHERTYPE_NTRAILER = 0x10
+ ETHERTYPE_OS9 = 0x7007
+ ETHERTYPE_OS9NET = 0x7009
+ ETHERTYPE_PACER = 0x80c6
+ ETHERTYPE_PBB = 0x88e7
+ ETHERTYPE_PCS = 0x4242
+ ETHERTYPE_PLANNING = 0x8044
+ ETHERTYPE_PPP = 0x880b
+ ETHERTYPE_PPPOE = 0x8864
+ ETHERTYPE_PPPOEDISC = 0x8863
+ ETHERTYPE_PRIMENTS = 0x7031
+ ETHERTYPE_PUP = 0x200
+ ETHERTYPE_PUPAT = 0x200
+ ETHERTYPE_QINQ = 0x88a8
+ ETHERTYPE_RACAL = 0x7030
+ ETHERTYPE_RATIONAL = 0x8150
+ ETHERTYPE_RAWFR = 0x6559
+ ETHERTYPE_RCL = 0x1995
+ ETHERTYPE_RDP = 0x8739
+ ETHERTYPE_RETIX = 0x80f2
+ ETHERTYPE_REVARP = 0x8035
+ ETHERTYPE_SCA = 0x6007
+ ETHERTYPE_SECTRA = 0x86db
+ ETHERTYPE_SECUREDATA = 0x876d
+ ETHERTYPE_SGITW = 0x817e
+ ETHERTYPE_SG_BOUNCE = 0x8016
+ ETHERTYPE_SG_DIAG = 0x8013
+ ETHERTYPE_SG_NETGAMES = 0x8014
+ ETHERTYPE_SG_RESV = 0x8015
+ ETHERTYPE_SIMNET = 0x5208
+ ETHERTYPE_SLOW = 0x8809
+ ETHERTYPE_SNA = 0x80d5
+ ETHERTYPE_SNMP = 0x814c
+ ETHERTYPE_SONIX = 0xfaf5
+ ETHERTYPE_SPIDER = 0x809f
+ ETHERTYPE_SPRITE = 0x500
+ ETHERTYPE_STP = 0x8181
+ ETHERTYPE_TALARIS = 0x812b
+ ETHERTYPE_TALARISMC = 0x852b
+ ETHERTYPE_TCPCOMP = 0x876b
+ ETHERTYPE_TCPSM = 0x9002
+ ETHERTYPE_TEC = 0x814f
+ ETHERTYPE_TIGAN = 0x802f
+ ETHERTYPE_TRAIL = 0x1000
+ ETHERTYPE_TRANSETHER = 0x6558
+ ETHERTYPE_TYMSHARE = 0x802e
+ ETHERTYPE_UBBST = 0x7005
+ ETHERTYPE_UBDEBUG = 0x900
+ ETHERTYPE_UBDIAGLOOP = 0x7002
+ ETHERTYPE_UBDL = 0x7000
+ ETHERTYPE_UBNIU = 0x7001
+ ETHERTYPE_UBNMC = 0x7003
+ ETHERTYPE_VALID = 0x1600
+ ETHERTYPE_VARIAN = 0x80dd
+ ETHERTYPE_VAXELN = 0x803b
+ ETHERTYPE_VEECO = 0x8067
+ ETHERTYPE_VEXP = 0x805b
+ ETHERTYPE_VGLAB = 0x8131
+ ETHERTYPE_VINES = 0xbad
+ ETHERTYPE_VINESECHO = 0xbaf
+ ETHERTYPE_VINESLOOP = 0xbae
+ ETHERTYPE_VITAL = 0xff00
+ ETHERTYPE_VLAN = 0x8100
+ ETHERTYPE_VLTLMAN = 0x8080
+ ETHERTYPE_VPROD = 0x805c
+ ETHERTYPE_VURESERVED = 0x8147
+ ETHERTYPE_WATERLOO = 0x8130
+ ETHERTYPE_WELLFLEET = 0x8103
+ ETHERTYPE_X25 = 0x805
+ ETHERTYPE_X75 = 0x801
+ ETHERTYPE_XNSSM = 0x9001
+ ETHERTYPE_XTP = 0x817d
+ ETHER_ADDR_LEN = 0x6
+ ETHER_ALIGN = 0x2
+ ETHER_CRC_LEN = 0x4
+ ETHER_CRC_POLY_BE = 0x4c11db6
+ ETHER_CRC_POLY_LE = 0xedb88320
+ ETHER_HDR_LEN = 0xe
+ ETHER_MAX_DIX_LEN = 0x600
+ ETHER_MAX_HARDMTU_LEN = 0xff9b
+ ETHER_MAX_LEN = 0x5ee
+ ETHER_MIN_LEN = 0x40
+ ETHER_TYPE_LEN = 0x2
+ ETHER_VLAN_ENCAP_LEN = 0x4
+ EVFILT_AIO = -0x3
+ EVFILT_DEVICE = -0x8
+ EVFILT_EXCEPT = -0x9
+ EVFILT_PROC = -0x5
+ EVFILT_READ = -0x1
+ EVFILT_SIGNAL = -0x6
+ EVFILT_SYSCOUNT = 0x9
+ EVFILT_TIMER = -0x7
+ EVFILT_VNODE = -0x4
+ EVFILT_WRITE = -0x2
+ EVL_ENCAPLEN = 0x4
+ EVL_PRIO_BITS = 0xd
+ EVL_PRIO_MAX = 0x7
+ EVL_VLID_MASK = 0xfff
+ EVL_VLID_MAX = 0xffe
+ EVL_VLID_MIN = 0x1
+ EVL_VLID_NULL = 0x0
+ EV_ADD = 0x1
+ EV_CLEAR = 0x20
+ EV_DELETE = 0x2
+ EV_DISABLE = 0x8
+ EV_DISPATCH = 0x80
+ EV_ENABLE = 0x4
+ EV_EOF = 0x8000
+ EV_ERROR = 0x4000
+ EV_FLAG1 = 0x2000
+ EV_ONESHOT = 0x10
+ EV_RECEIPT = 0x40
+ EV_SYSFLAGS = 0xf800
+ EXTA = 0x4b00
+ EXTB = 0x9600
+ EXTPROC = 0x800
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FLUSHO = 0x800000
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0xa
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0x7
+ F_GETOWN = 0x5
+ F_ISATTY = 0xb
+ F_OK = 0x0
+ F_RDLCK = 0x1
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0x8
+ F_SETLKW = 0x9
+ F_SETOWN = 0x6
+ F_UNLCK = 0x2
+ F_WRLCK = 0x3
+ HUPCL = 0x4000
+ HW_MACHINE = 0x1
+ ICANON = 0x100
+ ICMP6_FILTER = 0x12
+ ICRNL = 0x100
+ IEXTEN = 0x400
+ IFAN_ARRIVAL = 0x0
+ IFAN_DEPARTURE = 0x1
+ IFF_ALLMULTI = 0x200
+ IFF_BROADCAST = 0x2
+ IFF_CANTCHANGE = 0x8e52
+ IFF_DEBUG = 0x4
+ IFF_LINK0 = 0x1000
+ IFF_LINK1 = 0x2000
+ IFF_LINK2 = 0x4000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x8000
+ IFF_NOARP = 0x80
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_STATICARP = 0x20
+ IFF_UP = 0x1
+ IFNAMSIZ = 0x10
+ IFT_1822 = 0x2
+ IFT_A12MPPSWITCH = 0x82
+ IFT_AAL2 = 0xbb
+ IFT_AAL5 = 0x31
+ IFT_ADSL = 0x5e
+ IFT_AFLANE8023 = 0x3b
+ IFT_AFLANE8025 = 0x3c
+ IFT_ARAP = 0x58
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ASYNC = 0x54
+ IFT_ATM = 0x25
+ IFT_ATMDXI = 0x69
+ IFT_ATMFUNI = 0x6a
+ IFT_ATMIMA = 0x6b
+ IFT_ATMLOGICAL = 0x50
+ IFT_ATMRADIO = 0xbd
+ IFT_ATMSUBINTERFACE = 0x86
+ IFT_ATMVCIENDPT = 0xc2
+ IFT_ATMVIRTUAL = 0x95
+ IFT_BGPPOLICYACCOUNTING = 0xa2
+ IFT_BLUETOOTH = 0xf8
+ IFT_BRIDGE = 0xd1
+ IFT_BSC = 0x53
+ IFT_CARP = 0xf7
+ IFT_CCTEMUL = 0x3d
+ IFT_CEPT = 0x13
+ IFT_CES = 0x85
+ IFT_CHANNEL = 0x46
+ IFT_CNR = 0x55
+ IFT_COFFEE = 0x84
+ IFT_COMPOSITELINK = 0x9b
+ IFT_DCN = 0x8d
+ IFT_DIGITALPOWERLINE = 0x8a
+ IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
+ IFT_DLSW = 0x4a
+ IFT_DOCSCABLEDOWNSTREAM = 0x80
+ IFT_DOCSCABLEMACLAYER = 0x7f
+ IFT_DOCSCABLEUPSTREAM = 0x81
+ IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
+ IFT_DS0 = 0x51
+ IFT_DS0BUNDLE = 0x52
+ IFT_DS1FDL = 0xaa
+ IFT_DS3 = 0x1e
+ IFT_DTM = 0x8c
+ IFT_DUMMY = 0xf1
+ IFT_DVBASILN = 0xac
+ IFT_DVBASIOUT = 0xad
+ IFT_DVBRCCDOWNSTREAM = 0x93
+ IFT_DVBRCCMACLAYER = 0x92
+ IFT_DVBRCCUPSTREAM = 0x94
+ IFT_ECONET = 0xce
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_EPLRS = 0x57
+ IFT_ESCON = 0x49
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0xf3
+ IFT_FAST = 0x7d
+ IFT_FASTETHER = 0x3e
+ IFT_FASTETHERFX = 0x45
+ IFT_FDDI = 0xf
+ IFT_FIBRECHANNEL = 0x38
+ IFT_FRAMERELAYINTERCONNECT = 0x3a
+ IFT_FRAMERELAYMPI = 0x5c
+ IFT_FRDLCIENDPT = 0xc1
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_FRF16MFRBUNDLE = 0xa3
+ IFT_FRFORWARD = 0x9e
+ IFT_G703AT2MB = 0x43
+ IFT_G703AT64K = 0x42
+ IFT_GIF = 0xf0
+ IFT_GIGABITETHERNET = 0x75
+ IFT_GR303IDT = 0xb2
+ IFT_GR303RDT = 0xb1
+ IFT_H323GATEKEEPER = 0xa4
+ IFT_H323PROXY = 0xa5
+ IFT_HDH1822 = 0x3
+ IFT_HDLC = 0x76
+ IFT_HDSL2 = 0xa8
+ IFT_HIPERLAN2 = 0xb7
+ IFT_HIPPI = 0x2f
+ IFT_HIPPIINTERFACE = 0x39
+ IFT_HOSTPAD = 0x5a
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IBM370PARCHAN = 0x48
+ IFT_IDSL = 0x9a
+ IFT_IEEE1394 = 0x90
+ IFT_IEEE80211 = 0x47
+ IFT_IEEE80212 = 0x37
+ IFT_IEEE8023ADLAG = 0xa1
+ IFT_IFGSN = 0x91
+ IFT_IMT = 0xbe
+ IFT_INFINIBAND = 0xc7
+ IFT_INTERLEAVE = 0x7c
+ IFT_IP = 0x7e
+ IFT_IPFORWARD = 0x8e
+ IFT_IPOVERATM = 0x72
+ IFT_IPOVERCDLC = 0x6d
+ IFT_IPOVERCLAW = 0x6e
+ IFT_IPSWITCH = 0x4e
+ IFT_ISDN = 0x3f
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISDNS = 0x4b
+ IFT_ISDNU = 0x4c
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88025CRFPINT = 0x62
+ IFT_ISO88025DTR = 0x56
+ IFT_ISO88025FIBER = 0x73
+ IFT_ISO88026 = 0xa
+ IFT_ISUP = 0xb3
+ IFT_L2VLAN = 0x87
+ IFT_L3IPVLAN = 0x88
+ IFT_L3IPXVLAN = 0x89
+ IFT_LAPB = 0x10
+ IFT_LAPD = 0x4d
+ IFT_LAPF = 0x77
+ IFT_LINEGROUP = 0xd2
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MBIM = 0xfa
+ IFT_MEDIAMAILOVERIP = 0x8b
+ IFT_MFSIGLINK = 0xa7
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_MPC = 0x71
+ IFT_MPLS = 0xa6
+ IFT_MPLSTUNNEL = 0x96
+ IFT_MSDSL = 0x8f
+ IFT_MVL = 0xbf
+ IFT_MYRINET = 0x63
+ IFT_NFAS = 0xaf
+ IFT_NSIP = 0x1b
+ IFT_OPTICALCHANNEL = 0xc3
+ IFT_OPTICALTRANSPORT = 0xc4
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PFLOG = 0xf5
+ IFT_PFLOW = 0xf9
+ IFT_PFSYNC = 0xf6
+ IFT_PLC = 0xae
+ IFT_PON155 = 0xcf
+ IFT_PON622 = 0xd0
+ IFT_POS = 0xab
+ IFT_PPP = 0x17
+ IFT_PPPMULTILINKBUNDLE = 0x6c
+ IFT_PROPATM = 0xc5
+ IFT_PROPBWAP2MP = 0xb8
+ IFT_PROPCNLS = 0x59
+ IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
+ IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
+ IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PROPWIRELESSP2P = 0x9d
+ IFT_PTPSERIAL = 0x16
+ IFT_PVC = 0xf2
+ IFT_Q2931 = 0xc9
+ IFT_QLLC = 0x44
+ IFT_RADIOMAC = 0xbc
+ IFT_RADSL = 0x5f
+ IFT_REACHDSL = 0xc0
+ IFT_RFC1483 = 0x9f
+ IFT_RS232 = 0x21
+ IFT_RSRB = 0x4f
+ IFT_SDLC = 0x11
+ IFT_SDSL = 0x60
+ IFT_SHDSL = 0xa9
+ IFT_SIP = 0x1f
+ IFT_SIPSIG = 0xcc
+ IFT_SIPTG = 0xcb
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETOVERHEADCHANNEL = 0xb9
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_SRP = 0x97
+ IFT_SS7SIGLINK = 0x9c
+ IFT_STACKTOSTACK = 0x6f
+ IFT_STARLAN = 0xb
+ IFT_T1 = 0x12
+ IFT_TDLC = 0x74
+ IFT_TELINK = 0xc8
+ IFT_TERMPAD = 0x5b
+ IFT_TR008 = 0xb0
+ IFT_TRANSPHDLC = 0x7b
+ IFT_TUNNEL = 0x83
+ IFT_ULTRA = 0x1d
+ IFT_USB = 0xa0
+ IFT_V11 = 0x40
+ IFT_V35 = 0x2d
+ IFT_V36 = 0x41
+ IFT_V37 = 0x78
+ IFT_VDSL = 0x61
+ IFT_VIRTUALIPADDRESS = 0x70
+ IFT_VIRTUALTG = 0xca
+ IFT_VOICEDID = 0xd5
+ IFT_VOICEEM = 0x64
+ IFT_VOICEEMFGD = 0xd3
+ IFT_VOICEENCAP = 0x67
+ IFT_VOICEFGDEANA = 0xd4
+ IFT_VOICEFXO = 0x65
+ IFT_VOICEFXS = 0x66
+ IFT_VOICEOVERATM = 0x98
+ IFT_VOICEOVERCABLE = 0xc6
+ IFT_VOICEOVERFRAMERELAY = 0x99
+ IFT_VOICEOVERIP = 0x68
+ IFT_WIREGUARD = 0xfb
+ IFT_X213 = 0x5d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25HUNTGROUP = 0x7a
+ IFT_X25MLP = 0x79
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LOOPBACKNET = 0x7f
+ IN_RFC3021_HOST = 0x1
+ IN_RFC3021_NET = 0xfffffffe
+ IN_RFC3021_NSHIFT = 0x1f
+ IPPROTO_AH = 0x33
+ IPPROTO_CARP = 0x70
+ IPPROTO_DIVERT = 0x102
+ IPPROTO_DONE = 0x101
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERIP = 0x61
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPCOMP = 0x6c
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV4 = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_MAX = 0x100
+ IPPROTO_MAXID = 0x103
+ IPPROTO_MOBILE = 0x37
+ IPPROTO_MPLS = 0x89
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PFSYNC = 0xf0
+ IPPROTO_PIM = 0x67
+ IPPROTO_PUP = 0xc
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPPROTO_UDPLITE = 0x88
+ IPV6_AUTH_LEVEL = 0x35
+ IPV6_AUTOFLOWLABEL = 0x3b
+ IPV6_CHECKSUM = 0x1a
+ IPV6_DEFAULT_MULTICAST_HOPS = 0x1
+ IPV6_DEFAULT_MULTICAST_LOOP = 0x1
+ IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
+ IPV6_ESP_NETWORK_LEVEL = 0x37
+ IPV6_ESP_TRANS_LEVEL = 0x36
+ IPV6_FAITH = 0x1d
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
+ IPV6_FRAGTTL = 0x78
+ IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
+ IPV6_IPCOMP_LEVEL = 0x3c
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MAXHLIM = 0xff
+ IPV6_MAXPACKET = 0xffff
+ IPV6_MINHOPCOUNT = 0x41
+ IPV6_MMTU = 0x500
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_OPTIONS = 0x1
+ IPV6_PATHMTU = 0x2c
+ IPV6_PIPEX = 0x3f
+ IPV6_PKTINFO = 0x2e
+ IPV6_PORTRANGE = 0xe
+ IPV6_PORTRANGE_DEFAULT = 0x0
+ IPV6_PORTRANGE_HIGH = 0x1
+ IPV6_PORTRANGE_LOW = 0x2
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVDSTPORT = 0x40
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x24
+ IPV6_RECVRTHDR = 0x26
+ IPV6_RECVTCLASS = 0x39
+ IPV6_RTABLE = 0x1021
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x23
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_SOCKOPT_RESERVED1 = 0x3
+ IPV6_TCLASS = 0x3d
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
+ IPV6_V6ONLY = 0x1b
+ IPV6_VERSION = 0x60
+ IPV6_VERSION_MASK = 0xf0
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_AUTH_LEVEL = 0x14
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_ESP_NETWORK_LEVEL = 0x16
+ IP_ESP_TRANS_LEVEL = 0x15
+ IP_HDRINCL = 0x2
+ IP_IPCOMP_LEVEL = 0x1d
+ IP_IPDEFTTL = 0x25
+ IP_IPSECFLOWINFO = 0x24
+ IP_IPSEC_LOCAL_AUTH = 0x1b
+ IP_IPSEC_LOCAL_CRED = 0x19
+ IP_IPSEC_LOCAL_ID = 0x17
+ IP_IPSEC_REMOTE_AUTH = 0x1c
+ IP_IPSEC_REMOTE_CRED = 0x1a
+ IP_IPSEC_REMOTE_ID = 0x18
+ IP_MAXPACKET = 0xffff
+ IP_MAX_MEMBERSHIPS = 0xfff
+ IP_MF = 0x2000
+ IP_MINTTL = 0x20
+ IP_MIN_MEMBERSHIPS = 0xf
+ IP_MSS = 0x240
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_OFFMASK = 0x1fff
+ IP_OPTIONS = 0x1
+ IP_PIPEX = 0x22
+ IP_PORTRANGE = 0x13
+ IP_PORTRANGE_DEFAULT = 0x0
+ IP_PORTRANGE_HIGH = 0x1
+ IP_PORTRANGE_LOW = 0x2
+ IP_RECVDSTADDR = 0x7
+ IP_RECVDSTPORT = 0x21
+ IP_RECVIF = 0x1e
+ IP_RECVOPTS = 0x5
+ IP_RECVRETOPTS = 0x6
+ IP_RECVRTABLE = 0x23
+ IP_RECVTTL = 0x1f
+ IP_RETOPTS = 0x8
+ IP_RF = 0x8000
+ IP_RTABLE = 0x1021
+ IP_SENDSRCADDR = 0x7
+ IP_TOS = 0x3
+ IP_TTL = 0x4
+ ISIG = 0x80
+ ISTRIP = 0x20
+ ITIMER_PROF = 0x2
+ ITIMER_REAL = 0x0
+ ITIMER_VIRTUAL = 0x1
+ IUCLC = 0x1000
+ IXANY = 0x800
+ IXOFF = 0x400
+ IXON = 0x200
+ KERN_HOSTNAME = 0xa
+ KERN_OSRELEASE = 0x2
+ KERN_OSTYPE = 0x1
+ KERN_VERSION = 0x4
+ LCNT_OVERLOAD_FLUSH = 0x6
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x6
+ MADV_NORMAL = 0x0
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_SPACEAVAIL = 0x5
+ MADV_WILLNEED = 0x3
+ MAP_ANON = 0x1000
+ MAP_ANONYMOUS = 0x1000
+ MAP_CONCEAL = 0x8000
+ MAP_COPY = 0x2
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_FLAGMASK = 0xfff7
+ MAP_HASSEMAPHORE = 0x0
+ MAP_INHERIT = 0x0
+ MAP_INHERIT_COPY = 0x1
+ MAP_INHERIT_NONE = 0x2
+ MAP_INHERIT_SHARE = 0x0
+ MAP_INHERIT_ZERO = 0x3
+ MAP_NOEXTEND = 0x0
+ MAP_NORESERVE = 0x0
+ MAP_PRIVATE = 0x2
+ MAP_RENAME = 0x0
+ MAP_SHARED = 0x1
+ MAP_STACK = 0x4000
+ MAP_TRYFIXED = 0x0
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_DEFEXPORTED = 0x200
+ MNT_DELEXPORT = 0x20000
+ MNT_DOOMED = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXRDONLY = 0x80
+ MNT_FORCE = 0x80000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_NOATIME = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOPERM = 0x20
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x4000000
+ MNT_STALLED = 0x100000
+ MNT_SWAPPABLE = 0x200000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0x400ffff
+ MNT_WAIT = 0x1
+ MNT_WANTRDWR = 0x2000000
+ MNT_WXALLOWED = 0x800
+ MOUNT_AFS = "afs"
+ MOUNT_CD9660 = "cd9660"
+ MOUNT_EXT2FS = "ext2fs"
+ MOUNT_FFS = "ffs"
+ MOUNT_FUSEFS = "fuse"
+ MOUNT_MFS = "mfs"
+ MOUNT_MSDOS = "msdos"
+ MOUNT_NCPFS = "ncpfs"
+ MOUNT_NFS = "nfs"
+ MOUNT_NTFS = "ntfs"
+ MOUNT_TMPFS = "tmpfs"
+ MOUNT_UDF = "udf"
+ MOUNT_UFS = "ffs"
+ MSG_BCAST = 0x100
+ MSG_CMSG_CLOEXEC = 0x800
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x80
+ MSG_EOR = 0x8
+ MSG_MCAST = 0x200
+ MSG_NOSIGNAL = 0x400
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MS_ASYNC = 0x1
+ MS_INVALIDATE = 0x4
+ MS_SYNC = 0x2
+ NAME_MAX = 0xff
+ NET_RT_DUMP = 0x1
+ NET_RT_FLAGS = 0x2
+ NET_RT_IFLIST = 0x3
+ NET_RT_IFNAMES = 0x6
+ NET_RT_MAXID = 0x8
+ NET_RT_SOURCE = 0x7
+ NET_RT_STATS = 0x4
+ NET_RT_TABLE = 0x5
+ NFDBITS = 0x20
+ NOFLSH = 0x80000000
+ NOKERNINFO = 0x2000000
+ NOTE_ATTRIB = 0x8
+ NOTE_CHANGE = 0x1
+ NOTE_CHILD = 0x4
+ NOTE_DELETE = 0x1
+ NOTE_EOF = 0x2
+ NOTE_EXEC = 0x20000000
+ NOTE_EXIT = 0x80000000
+ NOTE_EXTEND = 0x4
+ NOTE_FORK = 0x40000000
+ NOTE_LINK = 0x10
+ NOTE_LOWAT = 0x1
+ NOTE_OOB = 0x4
+ NOTE_PCTRLMASK = 0xf0000000
+ NOTE_PDATAMASK = 0xfffff
+ NOTE_RENAME = 0x20
+ NOTE_REVOKE = 0x40
+ NOTE_TRACK = 0x1
+ NOTE_TRACKERR = 0x2
+ NOTE_TRUNCATE = 0x80
+ NOTE_WRITE = 0x2
+ OCRNL = 0x10
+ OLCUC = 0x20
+ ONLCR = 0x2
+ ONLRET = 0x80
+ ONOCR = 0x40
+ ONOEOT = 0x8
+ OPOST = 0x1
+ OXTABS = 0x4
+ O_ACCMODE = 0x3
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x10000
+ O_CREAT = 0x200
+ O_DIRECTORY = 0x20000
+ O_DSYNC = 0x80
+ O_EXCL = 0x800
+ O_EXLOCK = 0x20
+ O_FSYNC = 0x80
+ O_NDELAY = 0x4
+ O_NOCTTY = 0x8000
+ O_NOFOLLOW = 0x100
+ O_NONBLOCK = 0x4
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_RSYNC = 0x80
+ O_SHLOCK = 0x10
+ O_SYNC = 0x80
+ O_TRUNC = 0x400
+ O_WRONLY = 0x1
+ PARENB = 0x1000
+ PARMRK = 0x8
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PF_FLUSH = 0x1
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
+ RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffffffffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BFD = 0xb
+ RTAX_BRD = 0x7
+ RTAX_DNS = 0xc
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_LABEL = 0xa
+ RTAX_MAX = 0xf
+ RTAX_NETMASK = 0x2
+ RTAX_SEARCH = 0xe
+ RTAX_SRC = 0x8
+ RTAX_SRCMASK = 0x9
+ RTAX_STATIC = 0xd
+ RTA_AUTHOR = 0x40
+ RTA_BFD = 0x800
+ RTA_BRD = 0x80
+ RTA_DNS = 0x1000
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_LABEL = 0x400
+ RTA_NETMASK = 0x4
+ RTA_SEARCH = 0x4000
+ RTA_SRC = 0x100
+ RTA_SRCMASK = 0x200
+ RTA_STATIC = 0x2000
+ RTF_ANNOUNCE = 0x4000
+ RTF_BFD = 0x1000000
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_CACHED = 0x20000
+ RTF_CLONED = 0x10000
+ RTF_CLONING = 0x100
+ RTF_CONNECTED = 0x800000
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_FMASK = 0x110fc08
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MODIFIED = 0x20
+ RTF_MPATH = 0x40000
+ RTF_MPLS = 0x100000
+ RTF_MULTICAST = 0x200
+ RTF_PERMANENT_ARP = 0x2000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x2000
+ RTF_REJECT = 0x8
+ RTF_STATIC = 0x800
+ RTF_UP = 0x1
+ RTF_USETRAILERS = 0x8000
+ RTM_80211INFO = 0x15
+ RTM_ADD = 0x1
+ RTM_BFD = 0x12
+ RTM_CHANGE = 0x3
+ RTM_CHGADDRATTR = 0x14
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_DESYNC = 0x10
+ RTM_GET = 0x4
+ RTM_IFANNOUNCE = 0xf
+ RTM_IFINFO = 0xe
+ RTM_INVALIDATE = 0x11
+ RTM_LOSING = 0x5
+ RTM_MAXSIZE = 0x800
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_PROPOSAL = 0x13
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_SOURCE = 0x16
+ RTM_VERSION = 0x5
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RT_TABLEID_BITS = 0x8
+ RT_TABLEID_MASK = 0xff
+ RT_TABLEID_MAX = 0xff
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x4
+ SEEK_CUR = 0x1
+ SEEK_END = 0x2
+ SEEK_SET = 0x0
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDMULTI = 0x80206931
+ SIOCAIFADDR = 0x8040691a
+ SIOCAIFGROUP = 0x80286987
+ SIOCATMARK = 0x40047307
+ SIOCBRDGADD = 0x8060693c
+ SIOCBRDGADDL = 0x80606949
+ SIOCBRDGADDS = 0x80606941
+ SIOCBRDGARL = 0x808c694d
+ SIOCBRDGDADDR = 0x81286947
+ SIOCBRDGDEL = 0x8060693d
+ SIOCBRDGDELS = 0x80606942
+ SIOCBRDGFLUSH = 0x80606948
+ SIOCBRDGFRL = 0x808c694e
+ SIOCBRDGGCACHE = 0xc0146941
+ SIOCBRDGGFD = 0xc0146952
+ SIOCBRDGGHT = 0xc0146951
+ SIOCBRDGGIFFLGS = 0xc060693e
+ SIOCBRDGGMA = 0xc0146953
+ SIOCBRDGGPARAM = 0xc0406958
+ SIOCBRDGGPRI = 0xc0146950
+ SIOCBRDGGRL = 0xc030694f
+ SIOCBRDGGTO = 0xc0146946
+ SIOCBRDGIFS = 0xc0606942
+ SIOCBRDGRTS = 0xc0206943
+ SIOCBRDGSADDR = 0xc1286944
+ SIOCBRDGSCACHE = 0x80146940
+ SIOCBRDGSFD = 0x80146952
+ SIOCBRDGSHT = 0x80146951
+ SIOCBRDGSIFCOST = 0x80606955
+ SIOCBRDGSIFFLGS = 0x8060693f
+ SIOCBRDGSIFPRIO = 0x80606954
+ SIOCBRDGSIFPROT = 0x8060694a
+ SIOCBRDGSMA = 0x80146953
+ SIOCBRDGSPRI = 0x80146950
+ SIOCBRDGSPROTO = 0x8014695a
+ SIOCBRDGSTO = 0x80146945
+ SIOCBRDGSTXHC = 0x80146959
+ SIOCDELLABEL = 0x80206997
+ SIOCDELMULTI = 0x80206932
+ SIOCDIFADDR = 0x80206919
+ SIOCDIFGROUP = 0x80286989
+ SIOCDIFPARENT = 0x802069b4
+ SIOCDIFPHYADDR = 0x80206949
+ SIOCDPWE3NEIGHBOR = 0x802069de
+ SIOCDVNETID = 0x802069af
+ SIOCGETKALIVE = 0xc01869a4
+ SIOCGETLABEL = 0x8020699a
+ SIOCGETMPWCFG = 0xc02069ae
+ SIOCGETPFLOW = 0xc02069fe
+ SIOCGETPFSYNC = 0xc02069f8
+ SIOCGETSGCNT = 0xc0207534
+ SIOCGETVIFCNT = 0xc0287533
+ SIOCGETVLAN = 0xc0206990
+ SIOCGIFADDR = 0xc0206921
+ SIOCGIFBRDADDR = 0xc0206923
+ SIOCGIFCONF = 0xc0106924
+ SIOCGIFDATA = 0xc020691b
+ SIOCGIFDESCR = 0xc0206981
+ SIOCGIFDSTADDR = 0xc0206922
+ SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFGATTR = 0xc028698b
+ SIOCGIFGENERIC = 0xc020693a
+ SIOCGIFGLIST = 0xc028698d
+ SIOCGIFGMEMB = 0xc028698a
+ SIOCGIFGROUP = 0xc0286988
+ SIOCGIFHARDMTU = 0xc02069a5
+ SIOCGIFLLPRIO = 0xc02069b6
+ SIOCGIFMEDIA = 0xc0406938
+ SIOCGIFMETRIC = 0xc0206917
+ SIOCGIFMTU = 0xc020697e
+ SIOCGIFNETMASK = 0xc0206925
+ SIOCGIFPAIR = 0xc02069b1
+ SIOCGIFPARENT = 0xc02069b3
+ SIOCGIFPRIORITY = 0xc020699c
+ SIOCGIFRDOMAIN = 0xc02069a0
+ SIOCGIFRTLABEL = 0xc0206983
+ SIOCGIFRXR = 0x802069aa
+ SIOCGIFSFFPAGE = 0xc1126939
+ SIOCGIFXFLAGS = 0xc020699e
+ SIOCGLIFPHYADDR = 0xc218694b
+ SIOCGLIFPHYDF = 0xc02069c2
+ SIOCGLIFPHYECN = 0xc02069c8
+ SIOCGLIFPHYRTABLE = 0xc02069a2
+ SIOCGLIFPHYTTL = 0xc02069a9
+ SIOCGPGRP = 0x40047309
+ SIOCGPWE3 = 0xc0206998
+ SIOCGPWE3CTRLWORD = 0xc02069dc
+ SIOCGPWE3FAT = 0xc02069dd
+ SIOCGPWE3NEIGHBOR = 0xc21869de
+ SIOCGRXHPRIO = 0xc02069db
+ SIOCGSPPPPARAMS = 0xc0206994
+ SIOCGTXHPRIO = 0xc02069c6
+ SIOCGUMBINFO = 0xc02069be
+ SIOCGUMBPARAM = 0xc02069c0
+ SIOCGVH = 0xc02069f6
+ SIOCGVNETFLOWID = 0xc02069c4
+ SIOCGVNETID = 0xc02069a7
+ SIOCIFAFATTACH = 0x801169ab
+ SIOCIFAFDETACH = 0x801169ac
+ SIOCIFCREATE = 0x8020697a
+ SIOCIFDESTROY = 0x80206979
+ SIOCIFGCLONERS = 0xc0106978
+ SIOCSETKALIVE = 0x801869a3
+ SIOCSETLABEL = 0x80206999
+ SIOCSETMPWCFG = 0x802069ad
+ SIOCSETPFLOW = 0x802069fd
+ SIOCSETPFSYNC = 0x802069f7
+ SIOCSETVLAN = 0x8020698f
+ SIOCSIFADDR = 0x8020690c
+ SIOCSIFBRDADDR = 0x80206913
+ SIOCSIFDESCR = 0x80206980
+ SIOCSIFDSTADDR = 0x8020690e
+ SIOCSIFFLAGS = 0x80206910
+ SIOCSIFGATTR = 0x8028698c
+ SIOCSIFGENERIC = 0x80206939
+ SIOCSIFLLADDR = 0x8020691f
+ SIOCSIFLLPRIO = 0x802069b5
+ SIOCSIFMEDIA = 0xc0206937
+ SIOCSIFMETRIC = 0x80206918
+ SIOCSIFMTU = 0x8020697f
+ SIOCSIFNETMASK = 0x80206916
+ SIOCSIFPAIR = 0x802069b0
+ SIOCSIFPARENT = 0x802069b2
+ SIOCSIFPRIORITY = 0x8020699b
+ SIOCSIFRDOMAIN = 0x8020699f
+ SIOCSIFRTLABEL = 0x80206982
+ SIOCSIFXFLAGS = 0x8020699d
+ SIOCSLIFPHYADDR = 0x8218694a
+ SIOCSLIFPHYDF = 0x802069c1
+ SIOCSLIFPHYECN = 0x802069c7
+ SIOCSLIFPHYRTABLE = 0x802069a1
+ SIOCSLIFPHYTTL = 0x802069a8
+ SIOCSPGRP = 0x80047308
+ SIOCSPWE3CTRLWORD = 0x802069dc
+ SIOCSPWE3FAT = 0x802069dd
+ SIOCSPWE3NEIGHBOR = 0x821869de
+ SIOCSRXHPRIO = 0x802069db
+ SIOCSSPPPPARAMS = 0x80206993
+ SIOCSTXHPRIO = 0x802069c5
+ SIOCSUMBPARAM = 0x802069bf
+ SIOCSVH = 0xc02069f5
+ SIOCSVNETFLOWID = 0x802069c3
+ SIOCSVNETID = 0x802069a6
+ SOCK_CLOEXEC = 0x8000
+ SOCK_DGRAM = 0x2
+ SOCK_DNS = 0x1000
+ SOCK_NONBLOCK = 0x4000
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x2
+ SO_BINDANY = 0x1000
+ SO_BROADCAST = 0x20
+ SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1024
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_NETPROC = 0x1020
+ SO_OOBINLINE = 0x100
+ SO_PEERCRED = 0x1022
+ SO_PROTOCOL = 0x1025
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RTABLE = 0x1021
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SPLICE = 0x1023
+ SO_TIMESTAMP = 0x800
+ SO_TYPE = 0x1008
+ SO_USELOOPBACK = 0x40
+ SO_ZEROIZE = 0x2000
+ S_BLKSIZE = 0x200
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISTXT = 0x200
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TCIFLUSH = 0x1
+ TCIOFF = 0x3
+ TCIOFLUSH = 0x3
+ TCION = 0x4
+ TCOFLUSH = 0x2
+ TCOOFF = 0x1
+ TCOON = 0x2
+ TCPOPT_EOL = 0x0
+ TCPOPT_MAXSEG = 0x2
+ TCPOPT_NOP = 0x1
+ TCPOPT_SACK = 0x5
+ TCPOPT_SACK_HDR = 0x1010500
+ TCPOPT_SACK_PERMITTED = 0x4
+ TCPOPT_SACK_PERMIT_HDR = 0x1010402
+ TCPOPT_SIGNATURE = 0x13
+ TCPOPT_TIMESTAMP = 0x8
+ TCPOPT_TSTAMP_HDR = 0x101080a
+ TCPOPT_WINDOW = 0x3
+ TCP_INFO = 0x9
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_SACK = 0x3
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MD5SIG = 0x4
+ TCP_MSS = 0x200
+ TCP_NODELAY = 0x1
+ TCP_NOPUSH = 0x10
+ TCP_SACKHOLE_LIMIT = 0x80
+ TCP_SACK_ENABLE = 0x8
+ TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCHKVERAUTH = 0x2000741e
+ TIOCCLRVERAUTH = 0x2000741d
+ TIOCCONS = 0x80047462
+ TIOCDRAIN = 0x2000745e
+ TIOCEXCL = 0x2000740d
+ TIOCEXT = 0x80047460
+ TIOCFLAG_CLOCAL = 0x2
+ TIOCFLAG_CRTSCTS = 0x4
+ TIOCFLAG_MDMBUF = 0x8
+ TIOCFLAG_PPS = 0x10
+ TIOCFLAG_SOFTCAR = 0x1
+ TIOCFLUSH = 0x80047410
+ TIOCGETA = 0x402c7413
+ TIOCGETD = 0x4004741a
+ TIOCGFLAGS = 0x4004745d
+ TIOCGPGRP = 0x40047477
+ TIOCGSID = 0x40047463
+ TIOCGTSTAMP = 0x4010745b
+ TIOCGWINSZ = 0x40087468
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGET = 0x4004746a
+ TIOCMODG = 0x4004746a
+ TIOCMODS = 0x8004746d
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCREMOTE = 0x80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSCTTY = 0x20007461
+ TIOCSDTR = 0x20007479
+ TIOCSETA = 0x802c7414
+ TIOCSETAF = 0x802c7416
+ TIOCSETAW = 0x802c7415
+ TIOCSETD = 0x8004741b
+ TIOCSETVERAUTH = 0x8004741c
+ TIOCSFLAGS = 0x8004745c
+ TIOCSIG = 0x8004745f
+ TIOCSPGRP = 0x80047476
+ TIOCSTART = 0x2000746e
+ TIOCSTAT = 0x20007465
+ TIOCSTOP = 0x2000746f
+ TIOCSTSTAMP = 0x8008745a
+ TIOCSWINSZ = 0x80087467
+ TIOCUCNTL = 0x80047466
+ TIOCUCNTL_CBRK = 0x7a
+ TIOCUCNTL_SBRK = 0x7b
+ TOSTOP = 0x400000
+ UTIME_NOW = -0x2
+ UTIME_OMIT = -0x1
+ VDISCARD = 0xf
+ VDSUSP = 0xb
+ VEOF = 0x0
+ VEOL = 0x1
+ VEOL2 = 0x2
+ VERASE = 0x3
+ VINTR = 0x8
+ VKILL = 0x5
+ VLNEXT = 0xe
+ VMIN = 0x10
+ VM_ANONMIN = 0x7
+ VM_LOADAVG = 0x2
+ VM_MALLOC_CONF = 0xc
+ VM_MAXID = 0xd
+ VM_MAXSLP = 0xa
+ VM_METER = 0x1
+ VM_NKMEMPAGES = 0x6
+ VM_PSSTRINGS = 0x3
+ VM_SWAPENCRYPT = 0x5
+ VM_USPACE = 0xb
+ VM_UVMEXP = 0x4
+ VM_VNODEMIN = 0x9
+ VM_VTEXTMIN = 0x8
+ VQUIT = 0x9
+ VREPRINT = 0x6
+ VSTART = 0xc
+ VSTATUS = 0x12
+ VSTOP = 0xd
+ VSUSP = 0xa
+ VTIME = 0x11
+ VWERASE = 0x4
+ WALTSIG = 0x4
+ WCONTINUED = 0x8
+ WCOREFLAG = 0x80
+ WNOHANG = 0x1
+ WUNTRACED = 0x2
+ XCASE = 0x1000000
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EADDRINUSE = syscall.Errno(0x30)
+ EADDRNOTAVAIL = syscall.Errno(0x31)
+ EAFNOSUPPORT = syscall.Errno(0x2f)
+ EAGAIN = syscall.Errno(0x23)
+ EALREADY = syscall.Errno(0x25)
+ EAUTH = syscall.Errno(0x50)
+ EBADF = syscall.Errno(0x9)
+ EBADMSG = syscall.Errno(0x5c)
+ EBADRPC = syscall.Errno(0x48)
+ EBUSY = syscall.Errno(0x10)
+ ECANCELED = syscall.Errno(0x58)
+ ECHILD = syscall.Errno(0xa)
+ ECONNABORTED = syscall.Errno(0x35)
+ ECONNREFUSED = syscall.Errno(0x3d)
+ ECONNRESET = syscall.Errno(0x36)
+ EDEADLK = syscall.Errno(0xb)
+ EDESTADDRREQ = syscall.Errno(0x27)
+ EDOM = syscall.Errno(0x21)
+ EDQUOT = syscall.Errno(0x45)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EFTYPE = syscall.Errno(0x4f)
+ EHOSTDOWN = syscall.Errno(0x40)
+ EHOSTUNREACH = syscall.Errno(0x41)
+ EIDRM = syscall.Errno(0x59)
+ EILSEQ = syscall.Errno(0x54)
+ EINPROGRESS = syscall.Errno(0x24)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EIPSEC = syscall.Errno(0x52)
+ EISCONN = syscall.Errno(0x38)
+ EISDIR = syscall.Errno(0x15)
+ ELAST = syscall.Errno(0x5f)
+ ELOOP = syscall.Errno(0x3e)
+ EMEDIUMTYPE = syscall.Errno(0x56)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ EMSGSIZE = syscall.Errno(0x28)
+ ENAMETOOLONG = syscall.Errno(0x3f)
+ ENEEDAUTH = syscall.Errno(0x51)
+ ENETDOWN = syscall.Errno(0x32)
+ ENETRESET = syscall.Errno(0x34)
+ ENETUNREACH = syscall.Errno(0x33)
+ ENFILE = syscall.Errno(0x17)
+ ENOATTR = syscall.Errno(0x53)
+ ENOBUFS = syscall.Errno(0x37)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOLCK = syscall.Errno(0x4d)
+ ENOMEDIUM = syscall.Errno(0x55)
+ ENOMEM = syscall.Errno(0xc)
+ ENOMSG = syscall.Errno(0x5a)
+ ENOPROTOOPT = syscall.Errno(0x2a)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOSYS = syscall.Errno(0x4e)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTCONN = syscall.Errno(0x39)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTEMPTY = syscall.Errno(0x42)
+ ENOTRECOVERABLE = syscall.Errno(0x5d)
+ ENOTSOCK = syscall.Errno(0x26)
+ ENOTSUP = syscall.Errno(0x5b)
+ ENOTTY = syscall.Errno(0x19)
+ ENXIO = syscall.Errno(0x6)
+ EOPNOTSUPP = syscall.Errno(0x2d)
+ EOVERFLOW = syscall.Errno(0x57)
+ EOWNERDEAD = syscall.Errno(0x5e)
+ EPERM = syscall.Errno(0x1)
+ EPFNOSUPPORT = syscall.Errno(0x2e)
+ EPIPE = syscall.Errno(0x20)
+ EPROCLIM = syscall.Errno(0x43)
+ EPROCUNAVAIL = syscall.Errno(0x4c)
+ EPROGMISMATCH = syscall.Errno(0x4b)
+ EPROGUNAVAIL = syscall.Errno(0x4a)
+ EPROTO = syscall.Errno(0x5f)
+ EPROTONOSUPPORT = syscall.Errno(0x2b)
+ EPROTOTYPE = syscall.Errno(0x29)
+ ERANGE = syscall.Errno(0x22)
+ EREMOTE = syscall.Errno(0x47)
+ EROFS = syscall.Errno(0x1e)
+ ERPCMISMATCH = syscall.Errno(0x49)
+ ESHUTDOWN = syscall.Errno(0x3a)
+ ESOCKTNOSUPPORT = syscall.Errno(0x2c)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ESTALE = syscall.Errno(0x46)
+ ETIMEDOUT = syscall.Errno(0x3c)
+ ETOOMANYREFS = syscall.Errno(0x3b)
+ ETXTBSY = syscall.Errno(0x1a)
+ EUSERS = syscall.Errno(0x44)
+ EWOULDBLOCK = syscall.Errno(0x23)
+ EXDEV = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGALRM = syscall.Signal(0xe)
+ SIGBUS = syscall.Signal(0xa)
+ SIGCHLD = syscall.Signal(0x14)
+ SIGCONT = syscall.Signal(0x13)
+ SIGEMT = syscall.Signal(0x7)
+ SIGFPE = syscall.Signal(0x8)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINFO = syscall.Signal(0x1d)
+ SIGINT = syscall.Signal(0x2)
+ SIGIO = syscall.Signal(0x17)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKILL = syscall.Signal(0x9)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGPROF = syscall.Signal(0x1b)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGSTOP = syscall.Signal(0x11)
+ SIGSYS = syscall.Signal(0xc)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTHR = syscall.Signal(0x20)
+ SIGTRAP = syscall.Signal(0x5)
+ SIGTSTP = syscall.Signal(0x12)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x10)
+ SIGUSR1 = syscall.Signal(0x1e)
+ SIGUSR2 = syscall.Signal(0x1f)
+ SIGVTALRM = syscall.Signal(0x1a)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "operation not permitted"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "input/output error"},
+ {6, "ENXIO", "device not configured"},
+ {7, "E2BIG", "argument list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file descriptor"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EDEADLK", "resource deadlock avoided"},
+ {12, "ENOMEM", "cannot allocate memory"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device busy"},
+ {17, "EEXIST", "file exists"},
+ {18, "EXDEV", "cross-device link"},
+ {19, "ENODEV", "operation not supported by device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "too many open files in system"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "inappropriate ioctl for device"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "numerical argument out of domain"},
+ {34, "ERANGE", "result too large"},
+ {35, "EAGAIN", "resource temporarily unavailable"},
+ {36, "EINPROGRESS", "operation now in progress"},
+ {37, "EALREADY", "operation already in progress"},
+ {38, "ENOTSOCK", "socket operation on non-socket"},
+ {39, "EDESTADDRREQ", "destination address required"},
+ {40, "EMSGSIZE", "message too long"},
+ {41, "EPROTOTYPE", "protocol wrong type for socket"},
+ {42, "ENOPROTOOPT", "protocol not available"},
+ {43, "EPROTONOSUPPORT", "protocol not supported"},
+ {44, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {45, "EOPNOTSUPP", "operation not supported"},
+ {46, "EPFNOSUPPORT", "protocol family not supported"},
+ {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
+ {48, "EADDRINUSE", "address already in use"},
+ {49, "EADDRNOTAVAIL", "can't assign requested address"},
+ {50, "ENETDOWN", "network is down"},
+ {51, "ENETUNREACH", "network is unreachable"},
+ {52, "ENETRESET", "network dropped connection on reset"},
+ {53, "ECONNABORTED", "software caused connection abort"},
+ {54, "ECONNRESET", "connection reset by peer"},
+ {55, "ENOBUFS", "no buffer space available"},
+ {56, "EISCONN", "socket is already connected"},
+ {57, "ENOTCONN", "socket is not connected"},
+ {58, "ESHUTDOWN", "can't send after socket shutdown"},
+ {59, "ETOOMANYREFS", "too many references: can't splice"},
+ {60, "ETIMEDOUT", "operation timed out"},
+ {61, "ECONNREFUSED", "connection refused"},
+ {62, "ELOOP", "too many levels of symbolic links"},
+ {63, "ENAMETOOLONG", "file name too long"},
+ {64, "EHOSTDOWN", "host is down"},
+ {65, "EHOSTUNREACH", "no route to host"},
+ {66, "ENOTEMPTY", "directory not empty"},
+ {67, "EPROCLIM", "too many processes"},
+ {68, "EUSERS", "too many users"},
+ {69, "EDQUOT", "disk quota exceeded"},
+ {70, "ESTALE", "stale NFS file handle"},
+ {71, "EREMOTE", "too many levels of remote in path"},
+ {72, "EBADRPC", "RPC struct is bad"},
+ {73, "ERPCMISMATCH", "RPC version wrong"},
+ {74, "EPROGUNAVAIL", "RPC program not available"},
+ {75, "EPROGMISMATCH", "program version wrong"},
+ {76, "EPROCUNAVAIL", "bad procedure for program"},
+ {77, "ENOLCK", "no locks available"},
+ {78, "ENOSYS", "function not implemented"},
+ {79, "EFTYPE", "inappropriate file type or format"},
+ {80, "EAUTH", "authentication error"},
+ {81, "ENEEDAUTH", "need authenticator"},
+ {82, "EIPSEC", "IPsec processing failure"},
+ {83, "ENOATTR", "attribute not found"},
+ {84, "EILSEQ", "illegal byte sequence"},
+ {85, "ENOMEDIUM", "no medium found"},
+ {86, "EMEDIUMTYPE", "wrong medium type"},
+ {87, "EOVERFLOW", "value too large to be stored in data type"},
+ {88, "ECANCELED", "operation canceled"},
+ {89, "EIDRM", "identifier removed"},
+ {90, "ENOMSG", "no message of desired type"},
+ {91, "ENOTSUP", "not supported"},
+ {92, "EBADMSG", "bad message"},
+ {93, "ENOTRECOVERABLE", "state not recoverable"},
+ {94, "EOWNERDEAD", "previous owner died"},
+ {95, "ELAST", "protocol error"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/BPT trap"},
+ {6, "SIGABRT", "abort trap"},
+ {7, "SIGEMT", "EMT trap"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGBUS", "bus error"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGSYS", "bad system call"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGURG", "urgent I/O condition"},
+ {17, "SIGSTOP", "suspended (signal)"},
+ {18, "SIGTSTP", "suspended"},
+ {19, "SIGCONT", "continued"},
+ {20, "SIGCHLD", "child exited"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGIO", "I/O possible"},
+ {24, "SIGXCPU", "cputime limit exceeded"},
+ {25, "SIGXFSZ", "filesize limit exceeded"},
+ {26, "SIGVTALRM", "virtual timer expired"},
+ {27, "SIGPROF", "profiling timer expired"},
+ {28, "SIGWINCH", "window size changes"},
+ {29, "SIGINFO", "information request"},
+ {30, "SIGUSR1", "user defined signal 1"},
+ {31, "SIGUSR2", "user defined signal 2"},
+ {32, "SIGTHR", "thread AST"},
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
deleted file mode 100644
index a06eb0932..000000000
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-//go:build darwin && amd64 && go1.13
-// +build darwin,amd64,go1.13
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func closedir(dir uintptr) (err error) {
- _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_closedir_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
- r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
- res = Errno(r0)
- return
-}
-
-var libc_readdir_r_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
deleted file mode 100644
index d6c3e25c0..000000000
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
+++ /dev/null
@@ -1,25 +0,0 @@
-// go run mkasm_darwin.go amd64
-// Code generated by the command above; DO NOT EDIT.
-
-//go:build go1.13
-// +build go1.13
-
-#include "textflag.h"
-
-TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_fdopendir(SB)
-
-GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
-
-TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_closedir(SB)
-
-GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
-
-TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_readdir_r(SB)
-
-GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
-DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index 467deed76..c2461c496 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -1,8 +1,8 @@
-// go run mksyscall.go -tags darwin,amd64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
+// go run mksyscall.go -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-//go:build darwin && amd64 && go1.12
-// +build darwin,amd64,go1.12
+//go:build darwin && amd64
+// +build darwin,amd64
package unix
@@ -463,6 +463,32 @@ var libc_munlockall_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func closedir(dir uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_closedir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
+ r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ res = Errno(r0)
+ return
+}
+
+var libc_readdir_r_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe(p *[2]int32) (err error) {
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index 7e308a476..95fe4c0eb 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -1,11 +1,14 @@
-// go run mkasm_darwin.go amd64
+// go run mkasm.go darwin amd64
// Code generated by the command above; DO NOT EDIT.
-//go:build go1.12
-// +build go1.12
-
#include "textflag.h"
+TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fdopendir(SB)
+
+GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
+
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgroups(SB)
@@ -174,6 +177,18 @@ TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_closedir(SB)
+
+GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
+
+TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readdir_r(SB)
+
+GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
+
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
deleted file mode 100644
index cec595d55..000000000
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-//go:build darwin && arm64 && go1.13
-// +build darwin,arm64,go1.13
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func closedir(dir uintptr) (err error) {
- _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_closedir_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
- r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
- res = Errno(r0)
- return
-}
-
-var libc_readdir_r_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
deleted file mode 100644
index 357989722..000000000
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
+++ /dev/null
@@ -1,25 +0,0 @@
-// go run mkasm_darwin.go arm64
-// Code generated by the command above; DO NOT EDIT.
-
-//go:build go1.13
-// +build go1.13
-
-#include "textflag.h"
-
-TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_fdopendir(SB)
-
-GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
-
-TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_closedir(SB)
-
-GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
-
-TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_readdir_r(SB)
-
-GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
-DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index 35938d34f..26a0fdc50 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -1,8 +1,8 @@
-// go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
+// go run mksyscall.go -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-//go:build darwin && arm64 && go1.12
-// +build darwin,arm64,go1.12
+//go:build darwin && arm64
+// +build darwin,arm64
package unix
@@ -463,6 +463,32 @@ var libc_munlockall_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func closedir(dir uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_closedir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
+ r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ res = Errno(r0)
+ return
+}
+
+var libc_readdir_r_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe(p *[2]int32) (err error) {
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index b09e5bb0e..efa5b4c98 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -1,11 +1,14 @@
-// go run mkasm_darwin.go arm64
+// go run mkasm.go darwin arm64
// Code generated by the command above; DO NOT EDIT.
-//go:build go1.12
-// +build go1.12
-
#include "textflag.h"
+TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fdopendir(SB)
+
+GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
+
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgroups(SB)
@@ -174,6 +177,18 @@ TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_closedir(SB)
+
+GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
+
+TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readdir_r(SB)
+
+GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
+
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
index af5cb064e..b57c7050d 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
@@ -15,25 +15,19 @@ import (
//go:cgo_import_dynamic libc_writev writev "libc.so"
//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
//go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
-//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
-//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
//go:linkname procreadv libc_readv
//go:linkname procpreadv libc_preadv
//go:linkname procwritev libc_writev
//go:linkname procpwritev libc_pwritev
//go:linkname procaccept4 libc_accept4
-//go:linkname procputmsg libc_putmsg
-//go:linkname procgetmsg libc_getmsg
var (
procreadv,
procpreadv,
procwritev,
procpwritev,
- procaccept4,
- procputmsg,
- procgetmsg syscallFunc
+ procaccept4 syscallFunc
)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -106,23 +100,3 @@ func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int,
}
return
}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index bc4a27531..293cf3680 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -2151,3 +2151,13 @@ func setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error)
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) {
+ _, _, e1 := RawSyscall6(SYS_RT_SIGPROCMASK, uintptr(how), uintptr(unsafe.Pointer(set)), uintptr(unsafe.Pointer(oldset)), uintptr(sigsetsize), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index 88af526b7..c81b0ad47 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -287,46 +287,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
n = int(r0)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index 2a0c4aa6a..2206bce7f 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -334,36 +334,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -374,16 +344,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index 4882bde3a..edf6b39f1 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -412,46 +412,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
index 9f8c24e43..190609f21 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -289,36 +289,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -329,16 +299,6 @@ func setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
index 523f2ba03..806ffd1e1 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
@@ -223,46 +223,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
index d7d6f4244..5f984cbb1 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -248,46 +248,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index 7f1f8e653..46fc380a4 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -278,36 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -318,16 +288,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index f933d0f51..cbd0d4dad 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -278,36 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -318,16 +288,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
index 297d0a998..0c13d15f0 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -248,46 +248,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
index 2e32e7a44..e01432aed 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
@@ -308,46 +308,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index 3c5317046..13c7ee7ba 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -349,36 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -389,16 +359,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index a00c6744e..02d0c0fd6 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -349,36 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -389,16 +359,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
index 1239cc2de..9fee3b1d2 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
@@ -269,36 +269,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -309,16 +279,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index e0dabc602..647bbfecd 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -319,36 +319,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -359,16 +329,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
n = int64(r0)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
index 368623c0f..ada057f89 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -329,36 +329,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -369,16 +339,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index a057fc5d3..2925fe0a7 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
+// go run mksyscall.go -l32 -openbsd -libc -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && 386
@@ -16,7 +16,7 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -24,20 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
return
}
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -45,10 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
return
}
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -56,30 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
return
}
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -87,66 +111,94 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
return
}
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
@@ -156,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -164,6 +216,10 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
return
}
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
@@ -173,17 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -191,10 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -202,10 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -213,6 +281,10 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
return
}
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
@@ -221,27 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -249,6 +329,10 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
return
}
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
@@ -258,13 +342,17 @@ func Madvise(b []byte, behav int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
@@ -274,23 +362,31 @@ func Mlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
@@ -300,13 +396,17 @@ func Mprotect(b []byte, prot int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
@@ -316,13 +416,17 @@ func Msync(b []byte, flags int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
@@ -332,33 +436,45 @@ func Munlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) {
@@ -368,7 +484,7 @@ func Getdents(fd int, buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -376,6 +492,10 @@ func Getdents(fd int, buf []byte) (n int, err error) {
return
}
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getcwd(buf []byte) (n int, err error) {
@@ -385,7 +505,7 @@ func Getcwd(buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -393,16 +513,24 @@ func Getcwd(buf []byte) (n int, err error) {
return
}
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
@@ -412,17 +540,21 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -430,6 +562,10 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
return
}
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
@@ -438,23 +574,31 @@ func Access(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
@@ -463,13 +607,17 @@ func Chdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
@@ -478,13 +626,17 @@ func Chflags(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
@@ -493,13 +645,17 @@ func Chmod(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
@@ -508,13 +664,17 @@ func Chown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
@@ -523,27 +683,35 @@ func Chroot(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -551,33 +719,49 @@ func Dup(fd int) (nfd int, err error) {
return
}
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup3(from int, to int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
return
}
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -586,43 +770,59 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -631,23 +831,31 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
@@ -656,27 +864,35 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -684,16 +900,24 @@ func Fpathconf(fd int, name int) (val int, err error) {
return
}
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
@@ -702,71 +926,99 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), uintptr(length>>32))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
egid = int(r0)
return
}
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
gid = int(r0)
return
}
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -774,34 +1026,50 @@ func Getpgid(pid int) (pgid int, err error) {
return
}
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
pgrp = int(r0)
return
}
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
pid = int(r0)
return
}
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
ppid = int(r0)
return
}
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -809,20 +1077,28 @@ func Getpriority(which int, who int) (prio int, err error) {
return
}
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -830,20 +1106,28 @@ func Getrtable() (rtable int, err error) {
return
}
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -851,46 +1135,66 @@ func Getsid(pid int) (sid int, err error) {
return
}
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -898,6 +1202,10 @@ func Kqueue() (fd int, err error) {
return
}
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
@@ -906,13 +1214,17 @@ func Lchown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
@@ -926,13 +1238,17 @@ func Link(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
@@ -946,23 +1262,31 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
@@ -971,13 +1295,17 @@ func Lstat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
@@ -986,13 +1314,17 @@ func Mkdir(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
@@ -1001,13 +1333,17 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
@@ -1016,13 +1352,17 @@ func Mkfifo(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
@@ -1031,13 +1371,17 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
@@ -1046,13 +1390,17 @@ func Mknod(path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
@@ -1061,23 +1409,31 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
@@ -1086,7 +1442,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1094,6 +1450,10 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
@@ -1102,7 +1462,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1110,6 +1470,10 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
@@ -1118,7 +1482,7 @@ func Pathconf(path string, name int) (val int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1126,6 +1490,10 @@ func Pathconf(path string, name int) (val int, err error) {
return
}
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pread(fd int, p []byte, offset int64) (n int, err error) {
@@ -1135,7 +1503,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1143,6 +1511,10 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
@@ -1152,7 +1524,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1160,6 +1532,10 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
@@ -1169,7 +1545,7 @@ func read(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1177,6 +1553,10 @@ func read(fd int, p []byte) (n int, err error) {
return
}
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
@@ -1191,7 +1571,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1199,6 +1579,10 @@ func Readlink(path string, buf []byte) (n int, err error) {
return
}
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
@@ -1213,7 +1597,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1221,6 +1605,10 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
return
}
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
@@ -1234,13 +1622,17 @@ func Rename(from string, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
@@ -1254,13 +1646,17 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
@@ -1269,13 +1665,17 @@ func Revoke(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
@@ -1284,17 +1684,21 @@ func Rmdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
+ r0, r1, e1 := syscall_syscall6(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
newoffset = int64(int64(r1)<<32 | int64(r0))
if e1 != 0 {
err = errnoErr(e1)
@@ -1302,10 +1706,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return
}
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1313,36 +1721,52 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
return
}
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
@@ -1351,97 +1775,133 @@ func Setlogin(name string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1449,26 +1909,38 @@ func Setsid() (pid int, err error) {
return
}
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
@@ -1477,13 +1949,17 @@ func Stat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
@@ -1492,13 +1968,17 @@ func Statfs(path string, stat *Statfs_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
@@ -1512,13 +1992,17 @@ func Symlink(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
@@ -1532,23 +2016,31 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
@@ -1557,21 +2049,29 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
@@ -1580,13 +2080,17 @@ func Unlink(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
@@ -1595,13 +2099,17 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
@@ -1610,13 +2118,17 @@ func Unmount(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
@@ -1626,7 +2138,7 @@ func write(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1634,10 +2146,14 @@ func write(fd int, p []byte) (n int, err error) {
return
}
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
+ r0, _, e1 := syscall_syscall9(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1645,20 +2161,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
return
}
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1669,7 +2193,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1685,9 +2209,13 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
new file mode 100644
index 000000000..75eb2f5f3
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd 386
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgroups(SB)
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgroups(SB)
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_wait4(SB)
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4
+DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_accept(SB)
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4
+DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_bind(SB)
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4
+DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connect(SB)
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4
+DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socket(SB)
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4
+DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockopt(SB)
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsockopt(SB)
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpeername(SB)
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockname(SB)
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shutdown(SB)
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socketpair(SB)
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4
+DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvfrom(SB)
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4
+DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendto(SB)
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvmsg(SB)
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4
+DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendmsg(SB)
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kevent(SB)
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimes(SB)
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4
+DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_futimes(SB)
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4
+DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_poll(SB)
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4
+DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_madvise(SB)
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4
+DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlock(SB)
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlockall(SB)
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mprotect(SB)
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_msync(SB)
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlock(SB)
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlockall(SB)
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pipe2(SB)
+
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getdents(SB)
+
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ioctl(SB)
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ppoll(SB)
+
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_access(SB)
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4
+DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_adjtime(SB)
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4
+DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chdir(SB)
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chflags(SB)
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chmod(SB)
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chown(SB)
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chroot(SB)
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_close(SB)
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4
+DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup(SB)
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup2(SB)
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup3(SB)
+
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_exit(SB)
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_faccessat(SB)
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchdir(SB)
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchflags(SB)
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmod(SB)
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmodat(SB)
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchown(SB)
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchownat(SB)
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_flock(SB)
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fpathconf(SB)
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstat(SB)
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatat(SB)
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatfs(SB)
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fsync(SB)
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ftruncate(SB)
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getegid(SB)
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_geteuid(SB)
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgid(SB)
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgid(SB)
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgrp(SB)
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpid(SB)
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getppid(SB)
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpriority(SB)
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrlimit(SB)
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrtable(SB)
+
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrusage(SB)
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsid(SB)
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4
+DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getuid(SB)
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_issetugid(SB)
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kill(SB)
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kqueue(SB)
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lchown(SB)
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_link(SB)
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4
+DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_linkat(SB)
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_listen(SB)
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4
+DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lstat(SB)
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdir(SB)
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdirat(SB)
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifo(SB)
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifoat(SB)
+
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknod(SB)
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknodat(SB)
+
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_nanosleep(SB)
+
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
+DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_open(SB)
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4
+DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_openat(SB)
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pathconf(SB)
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pread(SB)
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwrite(SB)
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_read(SB)
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4
+DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlink(SB)
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlinkat(SB)
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rename(SB)
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4
+DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameat(SB)
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_revoke(SB)
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4
+DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rmdir(SB)
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lseek(SB)
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_select(SB)
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4
+DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setegid(SB)
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_seteuid(SB)
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgid(SB)
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setlogin(SB)
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpgid(SB)
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpriority(SB)
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setregid(SB)
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setreuid(SB)
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresgid(SB)
+
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresuid(SB)
+
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrlimit(SB)
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrtable(SB)
+
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsid(SB)
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_settimeofday(SB)
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4
+DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setuid(SB)
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_stat(SB)
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4
+DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlink(SB)
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlinkat(SB)
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sync(SB)
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_truncate(SB)
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4
+DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_umask(SB)
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4
+DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlink(SB)
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlinkat(SB)
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unmount(SB)
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_write(SB)
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4
+DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mmap(SB)
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munmap(SB)
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
+
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 04db8fa2f..98446d2b9 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
+// go run mksyscall.go -openbsd -libc -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && amd64
@@ -16,7 +16,7 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -24,20 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
return
}
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -45,10 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
return
}
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -56,30 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
return
}
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -87,66 +111,94 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
return
}
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
@@ -156,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -164,6 +216,10 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
return
}
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
@@ -173,17 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -191,10 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -202,10 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -213,6 +281,10 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
return
}
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
@@ -221,27 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -249,6 +329,10 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
return
}
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
@@ -258,13 +342,17 @@ func Madvise(b []byte, behav int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
@@ -274,23 +362,31 @@ func Mlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
@@ -300,13 +396,17 @@ func Mprotect(b []byte, prot int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
@@ -316,13 +416,17 @@ func Msync(b []byte, flags int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
@@ -332,33 +436,45 @@ func Munlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) {
@@ -368,7 +484,7 @@ func Getdents(fd int, buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -376,6 +492,10 @@ func Getdents(fd int, buf []byte) (n int, err error) {
return
}
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getcwd(buf []byte) (n int, err error) {
@@ -385,7 +505,7 @@ func Getcwd(buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -393,16 +513,24 @@ func Getcwd(buf []byte) (n int, err error) {
return
}
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
@@ -412,17 +540,21 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -430,6 +562,10 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
return
}
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
@@ -438,23 +574,31 @@ func Access(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
@@ -463,13 +607,17 @@ func Chdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
@@ -478,13 +626,17 @@ func Chflags(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
@@ -493,13 +645,17 @@ func Chmod(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
@@ -508,13 +664,17 @@ func Chown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
@@ -523,27 +683,35 @@ func Chroot(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -551,33 +719,49 @@ func Dup(fd int) (nfd int, err error) {
return
}
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup3(from int, to int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
return
}
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -586,43 +770,59 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -631,23 +831,31 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
@@ -656,27 +864,35 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -684,16 +900,24 @@ func Fpathconf(fd int, name int) (val int, err error) {
return
}
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
@@ -702,71 +926,99 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
egid = int(r0)
return
}
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
gid = int(r0)
return
}
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -774,34 +1026,50 @@ func Getpgid(pid int) (pgid int, err error) {
return
}
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
pgrp = int(r0)
return
}
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
pid = int(r0)
return
}
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
ppid = int(r0)
return
}
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -809,20 +1077,28 @@ func Getpriority(which int, who int) (prio int, err error) {
return
}
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -830,20 +1106,28 @@ func Getrtable() (rtable int, err error) {
return
}
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -851,46 +1135,66 @@ func Getsid(pid int) (sid int, err error) {
return
}
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -898,6 +1202,10 @@ func Kqueue() (fd int, err error) {
return
}
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
@@ -906,13 +1214,17 @@ func Lchown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
@@ -926,13 +1238,17 @@ func Link(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
@@ -946,23 +1262,31 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
@@ -971,13 +1295,17 @@ func Lstat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
@@ -986,13 +1314,17 @@ func Mkdir(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
@@ -1001,13 +1333,17 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
@@ -1016,13 +1352,17 @@ func Mkfifo(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
@@ -1031,13 +1371,17 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
@@ -1046,13 +1390,17 @@ func Mknod(path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
@@ -1061,23 +1409,31 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
@@ -1086,7 +1442,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1094,6 +1450,10 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
@@ -1102,7 +1462,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1110,6 +1470,10 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
@@ -1118,7 +1482,7 @@ func Pathconf(path string, name int) (val int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1126,6 +1490,10 @@ func Pathconf(path string, name int) (val int, err error) {
return
}
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pread(fd int, p []byte, offset int64) (n int, err error) {
@@ -1135,7 +1503,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1143,6 +1511,10 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
@@ -1152,7 +1524,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1160,6 +1532,10 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
@@ -1169,7 +1545,7 @@ func read(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1177,6 +1553,10 @@ func read(fd int, p []byte) (n int, err error) {
return
}
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
@@ -1191,7 +1571,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1199,6 +1579,10 @@ func Readlink(path string, buf []byte) (n int, err error) {
return
}
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
@@ -1213,7 +1597,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1221,6 +1605,10 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
return
}
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
@@ -1234,13 +1622,17 @@ func Rename(from string, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
@@ -1254,13 +1646,17 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
@@ -1269,13 +1665,17 @@ func Revoke(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
@@ -1284,17 +1684,21 @@ func Rmdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
newoffset = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1302,10 +1706,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return
}
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1313,36 +1721,52 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
return
}
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
@@ -1351,97 +1775,133 @@ func Setlogin(name string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1449,26 +1909,38 @@ func Setsid() (pid int, err error) {
return
}
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
@@ -1477,13 +1949,17 @@ func Stat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
@@ -1492,13 +1968,17 @@ func Statfs(path string, stat *Statfs_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
@@ -1512,13 +1992,17 @@ func Symlink(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
@@ -1532,23 +2016,31 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
@@ -1557,21 +2049,29 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
@@ -1580,13 +2080,17 @@ func Unlink(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
@@ -1595,13 +2099,17 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
@@ -1610,13 +2118,17 @@ func Unmount(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
@@ -1626,7 +2138,7 @@ func write(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1634,10 +2146,14 @@ func write(fd int, p []byte) (n int, err error) {
return
}
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1645,20 +2161,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
return
}
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1669,7 +2193,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1685,9 +2209,13 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
new file mode 100644
index 000000000..243a6663c
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd amd64
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgroups(SB)
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgroups(SB)
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_wait4(SB)
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
+DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_accept(SB)
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
+DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_bind(SB)
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
+DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connect(SB)
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socket(SB)
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockopt(SB)
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsockopt(SB)
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpeername(SB)
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockname(SB)
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shutdown(SB)
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socketpair(SB)
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvfrom(SB)
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendto(SB)
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvmsg(SB)
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendmsg(SB)
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kevent(SB)
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimes(SB)
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_futimes(SB)
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_poll(SB)
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_madvise(SB)
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
+DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlock(SB)
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlockall(SB)
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mprotect(SB)
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_msync(SB)
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlock(SB)
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlockall(SB)
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pipe2(SB)
+
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getdents(SB)
+
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ioctl(SB)
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ppoll(SB)
+
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_access(SB)
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
+DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_adjtime(SB)
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chdir(SB)
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chflags(SB)
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chmod(SB)
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chown(SB)
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chroot(SB)
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_close(SB)
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
+DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup(SB)
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup2(SB)
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup3(SB)
+
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_exit(SB)
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_faccessat(SB)
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchdir(SB)
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchflags(SB)
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmod(SB)
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmodat(SB)
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchown(SB)
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchownat(SB)
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_flock(SB)
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fpathconf(SB)
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstat(SB)
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatat(SB)
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatfs(SB)
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fsync(SB)
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ftruncate(SB)
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getegid(SB)
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_geteuid(SB)
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgid(SB)
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgid(SB)
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgrp(SB)
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpid(SB)
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getppid(SB)
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpriority(SB)
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrlimit(SB)
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrtable(SB)
+
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrusage(SB)
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsid(SB)
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getuid(SB)
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_issetugid(SB)
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kill(SB)
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kqueue(SB)
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lchown(SB)
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_link(SB)
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
+DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_linkat(SB)
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_listen(SB)
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lstat(SB)
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdir(SB)
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdirat(SB)
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifo(SB)
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifoat(SB)
+
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknod(SB)
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknodat(SB)
+
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_nanosleep(SB)
+
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
+DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_open(SB)
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
+DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_openat(SB)
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pathconf(SB)
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pread(SB)
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwrite(SB)
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_read(SB)
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
+DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlink(SB)
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlinkat(SB)
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rename(SB)
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameat(SB)
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_revoke(SB)
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
+DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rmdir(SB)
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lseek(SB)
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_select(SB)
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
+DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setegid(SB)
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_seteuid(SB)
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgid(SB)
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setlogin(SB)
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpgid(SB)
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpriority(SB)
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setregid(SB)
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setreuid(SB)
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresgid(SB)
+
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresuid(SB)
+
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrlimit(SB)
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrtable(SB)
+
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsid(SB)
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_settimeofday(SB)
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setuid(SB)
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_stat(SB)
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlink(SB)
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlinkat(SB)
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sync(SB)
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_truncate(SB)
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_umask(SB)
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
+DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlink(SB)
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlinkat(SB)
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unmount(SB)
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_write(SB)
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
+DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mmap(SB)
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munmap(SB)
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
+
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index 69f803006..8da6791d1 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
+// go run mksyscall.go -l32 -openbsd -arm -libc -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && arm
@@ -16,7 +16,7 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -24,20 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
return
}
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -45,10 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
return
}
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -56,30 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
return
}
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -87,66 +111,94 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
return
}
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
@@ -156,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -164,6 +216,10 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
return
}
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
@@ -173,17 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -191,10 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -202,10 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -213,6 +281,10 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
return
}
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
@@ -221,27 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -249,6 +329,10 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
return
}
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
@@ -258,13 +342,17 @@ func Madvise(b []byte, behav int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
@@ -274,23 +362,31 @@ func Mlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
@@ -300,13 +396,17 @@ func Mprotect(b []byte, prot int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
@@ -316,13 +416,17 @@ func Msync(b []byte, flags int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
@@ -332,33 +436,45 @@ func Munlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) {
@@ -368,7 +484,7 @@ func Getdents(fd int, buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -376,6 +492,10 @@ func Getdents(fd int, buf []byte) (n int, err error) {
return
}
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getcwd(buf []byte) (n int, err error) {
@@ -385,7 +505,7 @@ func Getcwd(buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -393,16 +513,24 @@ func Getcwd(buf []byte) (n int, err error) {
return
}
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
@@ -412,17 +540,21 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -430,6 +562,10 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
return
}
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
@@ -438,23 +574,31 @@ func Access(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
@@ -463,13 +607,17 @@ func Chdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
@@ -478,13 +626,17 @@ func Chflags(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
@@ -493,13 +645,17 @@ func Chmod(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
@@ -508,13 +664,17 @@ func Chown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
@@ -523,27 +683,35 @@ func Chroot(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -551,33 +719,49 @@ func Dup(fd int) (nfd int, err error) {
return
}
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup3(from int, to int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
return
}
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -586,43 +770,59 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -631,23 +831,31 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
@@ -656,27 +864,35 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -684,16 +900,24 @@ func Fpathconf(fd int, name int) (val int, err error) {
return
}
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
@@ -702,71 +926,99 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_ftruncate_trampoline_addr, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
egid = int(r0)
return
}
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
gid = int(r0)
return
}
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -774,34 +1026,50 @@ func Getpgid(pid int) (pgid int, err error) {
return
}
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
pgrp = int(r0)
return
}
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
pid = int(r0)
return
}
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
ppid = int(r0)
return
}
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -809,20 +1077,28 @@ func Getpriority(which int, who int) (prio int, err error) {
return
}
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -830,20 +1106,28 @@ func Getrtable() (rtable int, err error) {
return
}
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -851,46 +1135,66 @@ func Getsid(pid int) (sid int, err error) {
return
}
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -898,6 +1202,10 @@ func Kqueue() (fd int, err error) {
return
}
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
@@ -906,13 +1214,17 @@ func Lchown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
@@ -926,13 +1238,17 @@ func Link(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
@@ -946,23 +1262,31 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
@@ -971,13 +1295,17 @@ func Lstat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
@@ -986,13 +1314,17 @@ func Mkdir(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
@@ -1001,13 +1333,17 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
@@ -1016,13 +1352,17 @@ func Mkfifo(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
@@ -1031,13 +1371,17 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
@@ -1046,13 +1390,17 @@ func Mknod(path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
@@ -1061,23 +1409,31 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
@@ -1086,7 +1442,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1094,6 +1450,10 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
@@ -1102,7 +1462,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1110,6 +1470,10 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
@@ -1118,7 +1482,7 @@ func Pathconf(path string, name int) (val int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1126,6 +1490,10 @@ func Pathconf(path string, name int) (val int, err error) {
return
}
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pread(fd int, p []byte, offset int64) (n int, err error) {
@@ -1135,7 +1503,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1143,6 +1511,10 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
@@ -1152,7 +1524,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1160,6 +1532,10 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
@@ -1169,7 +1545,7 @@ func read(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1177,6 +1553,10 @@ func read(fd int, p []byte) (n int, err error) {
return
}
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
@@ -1191,7 +1571,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1199,6 +1579,10 @@ func Readlink(path string, buf []byte) (n int, err error) {
return
}
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
@@ -1213,7 +1597,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1221,6 +1605,10 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
return
}
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
@@ -1234,13 +1622,17 @@ func Rename(from string, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
@@ -1254,13 +1646,17 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
@@ -1269,13 +1665,17 @@ func Revoke(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
@@ -1284,17 +1684,21 @@ func Rmdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
+ r0, r1, e1 := syscall_syscall6(libc_lseek_trampoline_addr, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
newoffset = int64(int64(r1)<<32 | int64(r0))
if e1 != 0 {
err = errnoErr(e1)
@@ -1302,10 +1706,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return
}
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1313,36 +1721,52 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
return
}
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
@@ -1351,97 +1775,133 @@ func Setlogin(name string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1449,26 +1909,38 @@ func Setsid() (pid int, err error) {
return
}
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
@@ -1477,13 +1949,17 @@ func Stat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
@@ -1492,13 +1968,17 @@ func Statfs(path string, stat *Statfs_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
@@ -1512,13 +1992,17 @@ func Symlink(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
@@ -1532,23 +2016,31 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
@@ -1557,21 +2049,29 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
@@ -1580,13 +2080,17 @@ func Unlink(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
@@ -1595,13 +2099,17 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
@@ -1610,13 +2118,17 @@ func Unmount(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
@@ -1626,7 +2138,7 @@ func write(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1634,10 +2146,14 @@ func write(fd int, p []byte) (n int, err error) {
return
}
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
+ r0, _, e1 := syscall_syscall9(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1645,20 +2161,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
return
}
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1669,7 +2193,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1685,9 +2209,13 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
new file mode 100644
index 000000000..9ad116d9f
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd arm
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgroups(SB)
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgroups(SB)
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_wait4(SB)
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4
+DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_accept(SB)
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4
+DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_bind(SB)
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4
+DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connect(SB)
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4
+DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socket(SB)
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4
+DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockopt(SB)
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsockopt(SB)
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpeername(SB)
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockname(SB)
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shutdown(SB)
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socketpair(SB)
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4
+DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvfrom(SB)
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4
+DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendto(SB)
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvmsg(SB)
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4
+DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendmsg(SB)
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kevent(SB)
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimes(SB)
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4
+DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_futimes(SB)
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4
+DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_poll(SB)
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4
+DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_madvise(SB)
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4
+DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlock(SB)
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlockall(SB)
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mprotect(SB)
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_msync(SB)
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlock(SB)
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlockall(SB)
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pipe2(SB)
+
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getdents(SB)
+
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ioctl(SB)
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ppoll(SB)
+
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_access(SB)
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4
+DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_adjtime(SB)
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4
+DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chdir(SB)
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chflags(SB)
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chmod(SB)
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chown(SB)
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chroot(SB)
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_close(SB)
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4
+DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup(SB)
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup2(SB)
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup3(SB)
+
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_exit(SB)
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_faccessat(SB)
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchdir(SB)
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchflags(SB)
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmod(SB)
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmodat(SB)
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchown(SB)
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchownat(SB)
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_flock(SB)
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fpathconf(SB)
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstat(SB)
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatat(SB)
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatfs(SB)
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fsync(SB)
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ftruncate(SB)
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getegid(SB)
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_geteuid(SB)
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgid(SB)
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgid(SB)
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgrp(SB)
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpid(SB)
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getppid(SB)
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpriority(SB)
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrlimit(SB)
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrtable(SB)
+
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrusage(SB)
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsid(SB)
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4
+DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getuid(SB)
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_issetugid(SB)
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kill(SB)
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kqueue(SB)
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lchown(SB)
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_link(SB)
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4
+DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_linkat(SB)
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_listen(SB)
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4
+DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lstat(SB)
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdir(SB)
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdirat(SB)
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifo(SB)
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifoat(SB)
+
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknod(SB)
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknodat(SB)
+
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_nanosleep(SB)
+
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
+DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_open(SB)
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4
+DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_openat(SB)
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pathconf(SB)
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pread(SB)
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwrite(SB)
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_read(SB)
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4
+DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlink(SB)
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlinkat(SB)
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rename(SB)
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4
+DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameat(SB)
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_revoke(SB)
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4
+DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rmdir(SB)
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lseek(SB)
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_select(SB)
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4
+DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setegid(SB)
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_seteuid(SB)
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgid(SB)
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setlogin(SB)
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpgid(SB)
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpriority(SB)
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setregid(SB)
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setreuid(SB)
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresgid(SB)
+
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresuid(SB)
+
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrlimit(SB)
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrtable(SB)
+
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsid(SB)
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_settimeofday(SB)
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4
+DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setuid(SB)
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_stat(SB)
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4
+DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlink(SB)
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlinkat(SB)
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sync(SB)
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_truncate(SB)
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4
+DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_umask(SB)
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4
+DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlink(SB)
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlinkat(SB)
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unmount(SB)
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_write(SB)
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4
+DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mmap(SB)
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munmap(SB)
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
+
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index c96a50517..800aab6e3 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -openbsd -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go
+// go run mksyscall.go -openbsd -libc -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && arm64
@@ -16,7 +16,7 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -24,20 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
return
}
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -45,10 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
return
}
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -56,30 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
return
}
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -87,66 +111,94 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
return
}
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
@@ -156,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -164,6 +216,10 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
return
}
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
@@ -173,17 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -191,10 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -202,10 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -213,6 +281,10 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
return
}
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
@@ -221,27 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -249,6 +329,10 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
return
}
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
@@ -258,13 +342,17 @@ func Madvise(b []byte, behav int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
@@ -274,23 +362,31 @@ func Mlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
@@ -300,13 +396,17 @@ func Mprotect(b []byte, prot int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
@@ -316,13 +416,17 @@ func Msync(b []byte, flags int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
@@ -332,33 +436,45 @@ func Munlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) {
@@ -368,7 +484,7 @@ func Getdents(fd int, buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -376,6 +492,10 @@ func Getdents(fd int, buf []byte) (n int, err error) {
return
}
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getcwd(buf []byte) (n int, err error) {
@@ -385,7 +505,7 @@ func Getcwd(buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -393,16 +513,24 @@ func Getcwd(buf []byte) (n int, err error) {
return
}
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
@@ -412,17 +540,21 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -430,6 +562,10 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
return
}
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
@@ -438,23 +574,31 @@ func Access(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
@@ -463,13 +607,17 @@ func Chdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
@@ -478,13 +626,17 @@ func Chflags(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
@@ -493,13 +645,17 @@ func Chmod(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
@@ -508,13 +664,17 @@ func Chown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
@@ -523,27 +683,35 @@ func Chroot(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -551,33 +719,49 @@ func Dup(fd int) (nfd int, err error) {
return
}
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup3(from int, to int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
return
}
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -586,43 +770,59 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -631,23 +831,31 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
@@ -656,27 +864,35 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -684,16 +900,24 @@ func Fpathconf(fd int, name int) (val int, err error) {
return
}
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
@@ -702,71 +926,99 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
egid = int(r0)
return
}
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
gid = int(r0)
return
}
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -774,34 +1026,50 @@ func Getpgid(pid int) (pgid int, err error) {
return
}
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
pgrp = int(r0)
return
}
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
pid = int(r0)
return
}
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
ppid = int(r0)
return
}
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -809,20 +1077,28 @@ func Getpriority(which int, who int) (prio int, err error) {
return
}
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -830,20 +1106,28 @@ func Getrtable() (rtable int, err error) {
return
}
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -851,46 +1135,66 @@ func Getsid(pid int) (sid int, err error) {
return
}
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -898,6 +1202,10 @@ func Kqueue() (fd int, err error) {
return
}
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
@@ -906,13 +1214,17 @@ func Lchown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
@@ -926,13 +1238,17 @@ func Link(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
@@ -946,23 +1262,31 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
@@ -971,13 +1295,17 @@ func Lstat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
@@ -986,13 +1314,17 @@ func Mkdir(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
@@ -1001,13 +1333,17 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
@@ -1016,13 +1352,17 @@ func Mkfifo(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
@@ -1031,13 +1371,17 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
@@ -1046,13 +1390,17 @@ func Mknod(path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
@@ -1061,23 +1409,31 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
@@ -1086,7 +1442,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1094,6 +1450,10 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
@@ -1102,7 +1462,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1110,6 +1470,10 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
@@ -1118,7 +1482,7 @@ func Pathconf(path string, name int) (val int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1126,6 +1490,10 @@ func Pathconf(path string, name int) (val int, err error) {
return
}
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pread(fd int, p []byte, offset int64) (n int, err error) {
@@ -1135,7 +1503,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1143,6 +1511,10 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
@@ -1152,7 +1524,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1160,6 +1532,10 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
@@ -1169,7 +1545,7 @@ func read(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1177,6 +1553,10 @@ func read(fd int, p []byte) (n int, err error) {
return
}
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
@@ -1191,7 +1571,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1199,6 +1579,10 @@ func Readlink(path string, buf []byte) (n int, err error) {
return
}
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
@@ -1213,7 +1597,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1221,6 +1605,10 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
return
}
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
@@ -1234,13 +1622,17 @@ func Rename(from string, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
@@ -1254,13 +1646,17 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
@@ -1269,13 +1665,17 @@ func Revoke(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
@@ -1284,17 +1684,21 @@ func Rmdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
newoffset = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1302,10 +1706,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return
}
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1313,36 +1721,52 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
return
}
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
@@ -1351,97 +1775,133 @@ func Setlogin(name string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1449,26 +1909,38 @@ func Setsid() (pid int, err error) {
return
}
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
@@ -1477,13 +1949,17 @@ func Stat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
@@ -1492,13 +1968,17 @@ func Statfs(path string, stat *Statfs_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
@@ -1512,13 +1992,17 @@ func Symlink(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
@@ -1532,23 +2016,31 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
@@ -1557,21 +2049,29 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
@@ -1580,13 +2080,17 @@ func Unlink(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
@@ -1595,13 +2099,17 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
@@ -1610,13 +2118,17 @@ func Unmount(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
@@ -1626,7 +2138,7 @@ func write(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1634,10 +2146,14 @@ func write(fd int, p []byte) (n int, err error) {
return
}
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1645,20 +2161,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
return
}
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1669,7 +2193,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1685,9 +2209,13 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
new file mode 100644
index 000000000..4efeff9ab
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd arm64
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgroups(SB)
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgroups(SB)
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_wait4(SB)
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
+DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_accept(SB)
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
+DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_bind(SB)
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
+DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connect(SB)
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socket(SB)
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockopt(SB)
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsockopt(SB)
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpeername(SB)
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockname(SB)
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shutdown(SB)
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socketpair(SB)
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvfrom(SB)
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendto(SB)
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvmsg(SB)
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendmsg(SB)
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kevent(SB)
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimes(SB)
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_futimes(SB)
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_poll(SB)
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_madvise(SB)
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
+DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlock(SB)
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlockall(SB)
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mprotect(SB)
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_msync(SB)
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlock(SB)
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlockall(SB)
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pipe2(SB)
+
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getdents(SB)
+
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ioctl(SB)
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ppoll(SB)
+
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_access(SB)
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
+DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_adjtime(SB)
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chdir(SB)
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chflags(SB)
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chmod(SB)
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chown(SB)
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chroot(SB)
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_close(SB)
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
+DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup(SB)
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup2(SB)
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup3(SB)
+
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_exit(SB)
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_faccessat(SB)
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchdir(SB)
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchflags(SB)
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmod(SB)
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmodat(SB)
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchown(SB)
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchownat(SB)
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_flock(SB)
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fpathconf(SB)
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstat(SB)
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatat(SB)
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatfs(SB)
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fsync(SB)
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ftruncate(SB)
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getegid(SB)
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_geteuid(SB)
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgid(SB)
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgid(SB)
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgrp(SB)
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpid(SB)
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getppid(SB)
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpriority(SB)
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrlimit(SB)
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrtable(SB)
+
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrusage(SB)
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsid(SB)
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getuid(SB)
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_issetugid(SB)
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kill(SB)
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kqueue(SB)
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lchown(SB)
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_link(SB)
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
+DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_linkat(SB)
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_listen(SB)
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lstat(SB)
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdir(SB)
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdirat(SB)
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifo(SB)
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifoat(SB)
+
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknod(SB)
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknodat(SB)
+
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_nanosleep(SB)
+
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
+DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_open(SB)
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
+DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_openat(SB)
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pathconf(SB)
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pread(SB)
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwrite(SB)
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_read(SB)
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
+DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlink(SB)
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlinkat(SB)
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rename(SB)
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameat(SB)
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_revoke(SB)
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
+DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rmdir(SB)
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lseek(SB)
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_select(SB)
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
+DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setegid(SB)
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_seteuid(SB)
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgid(SB)
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setlogin(SB)
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpgid(SB)
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpriority(SB)
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setregid(SB)
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setreuid(SB)
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresgid(SB)
+
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresuid(SB)
+
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrlimit(SB)
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrtable(SB)
+
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsid(SB)
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_settimeofday(SB)
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setuid(SB)
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_stat(SB)
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlink(SB)
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlinkat(SB)
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sync(SB)
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_truncate(SB)
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_umask(SB)
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
+DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlink(SB)
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlinkat(SB)
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unmount(SB)
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_write(SB)
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
+DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mmap(SB)
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munmap(SB)
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
+
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
new file mode 100644
index 000000000..c85de2d97
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
@@ -0,0 +1,2221 @@
+// go run mksyscall.go -openbsd -libc -tags openbsd,ppc64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_ppc64.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build openbsd && ppc64
+// +build openbsd,ppc64
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(ngid int, gid *_Gid_t) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ wpid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(s int, how int) (err error) {
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, timeval *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func futimes(fd int, timeval *[2]Timeval) (err error) {
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Madvise(b []byte, behav int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlockall(flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Msync(b []byte, flags int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlockall() (err error) {
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Access(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chflags(path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chmod(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Close(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup(fd int) (nfd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
+ nfd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup2(from int, to int) (err error) {
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup3(from int, to int, flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
+ return
+}
+
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchflags(fd int, flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Flock(fd int, how int) (err error) {
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fpathconf(fd int, name int) (val int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (uid int) {
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
+ pgid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgrp() (pgrp int) {
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
+ pgrp = int(r0)
+ return
+}
+
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (ppid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
+ ppid = int(r0)
+ return
+}
+
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
+ prio = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(which int, lim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrtable() (rtable int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
+ rtable = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getsid(pid int) (sid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
+ sid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Issetugid() (tainted bool) {
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
+ tainted = bool(r0 != 0)
+ return
+}
+
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, signum syscall.Signal) (err error) {
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kqueue() (fd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lchown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Link(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, backlog int) (err error) {
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdir(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdirat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifo(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknod(path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Open(path string, mode int, perm uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pathconf(path string, name int) (val int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlink(path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rename(from string, to string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(fromfd int, from string, tofd int, to string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Revoke(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rmdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
+ r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
+ newoffset = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setegid(egid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seteuid(euid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setgid(gid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setlogin(name string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(which int, lim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrtable(rtable int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
+ pid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Settimeofday(tp *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setuid(uid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Stat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, stat *Statfs_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlink(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() (err error) {
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(newmask int) (oldmask int) {
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
+ oldmask = int(r0)
+ return
+}
+
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlink(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unmount(path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
+ r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
new file mode 100644
index 000000000..7c9223b64
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd ppc64
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getgroups(SB)
+ RET
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setgroups(SB)
+ RET
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_wait4(SB)
+ RET
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
+DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_accept(SB)
+ RET
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
+DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_bind(SB)
+ RET
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
+DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_connect(SB)
+ RET
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_socket(SB)
+ RET
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getsockopt(SB)
+ RET
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setsockopt(SB)
+ RET
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getpeername(SB)
+ RET
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getsockname(SB)
+ RET
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_shutdown(SB)
+ RET
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_socketpair(SB)
+ RET
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_recvfrom(SB)
+ RET
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_sendto(SB)
+ RET
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_recvmsg(SB)
+ RET
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_sendmsg(SB)
+ RET
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_kevent(SB)
+ RET
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_utimes(SB)
+ RET
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_futimes(SB)
+ RET
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_poll(SB)
+ RET
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_madvise(SB)
+ RET
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
+DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mlock(SB)
+ RET
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mlockall(SB)
+ RET
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mprotect(SB)
+ RET
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_msync(SB)
+ RET
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_munlock(SB)
+ RET
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_munlockall(SB)
+ RET
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_pipe2(SB)
+ RET
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getdents(SB)
+ RET
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getcwd(SB)
+ RET
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_ioctl(SB)
+ RET
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_sysctl(SB)
+ RET
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_ppoll(SB)
+ RET
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_access(SB)
+ RET
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
+DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_adjtime(SB)
+ RET
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_chdir(SB)
+ RET
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_chflags(SB)
+ RET
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_chmod(SB)
+ RET
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_chown(SB)
+ RET
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_chroot(SB)
+ RET
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_close(SB)
+ RET
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
+DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_dup(SB)
+ RET
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_dup2(SB)
+ RET
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_dup3(SB)
+ RET
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_exit(SB)
+ RET
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_faccessat(SB)
+ RET
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchdir(SB)
+ RET
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchflags(SB)
+ RET
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchmod(SB)
+ RET
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchmodat(SB)
+ RET
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchown(SB)
+ RET
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchownat(SB)
+ RET
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_flock(SB)
+ RET
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fpathconf(SB)
+ RET
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fstat(SB)
+ RET
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fstatat(SB)
+ RET
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fstatfs(SB)
+ RET
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fsync(SB)
+ RET
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_ftruncate(SB)
+ RET
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getegid(SB)
+ RET
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_geteuid(SB)
+ RET
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getgid(SB)
+ RET
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getpgid(SB)
+ RET
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getpgrp(SB)
+ RET
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getpid(SB)
+ RET
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getppid(SB)
+ RET
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getpriority(SB)
+ RET
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getrlimit(SB)
+ RET
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getrtable(SB)
+ RET
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getrusage(SB)
+ RET
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getsid(SB)
+ RET
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_gettimeofday(SB)
+ RET
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getuid(SB)
+ RET
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_issetugid(SB)
+ RET
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_kill(SB)
+ RET
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_kqueue(SB)
+ RET
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_lchown(SB)
+ RET
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_link(SB)
+ RET
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
+DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_linkat(SB)
+ RET
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_listen(SB)
+ RET
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_lstat(SB)
+ RET
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mkdir(SB)
+ RET
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mkdirat(SB)
+ RET
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mkfifo(SB)
+ RET
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mkfifoat(SB)
+ RET
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mknod(SB)
+ RET
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mknodat(SB)
+ RET
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_nanosleep(SB)
+ RET
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
+DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_open(SB)
+ RET
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
+DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_openat(SB)
+ RET
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_pathconf(SB)
+ RET
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_pread(SB)
+ RET
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_pwrite(SB)
+ RET
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_read(SB)
+ RET
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
+DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_readlink(SB)
+ RET
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_readlinkat(SB)
+ RET
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_rename(SB)
+ RET
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_renameat(SB)
+ RET
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_revoke(SB)
+ RET
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
+DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_rmdir(SB)
+ RET
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_lseek(SB)
+ RET
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_select(SB)
+ RET
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
+DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setegid(SB)
+ RET
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_seteuid(SB)
+ RET
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setgid(SB)
+ RET
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setlogin(SB)
+ RET
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setpgid(SB)
+ RET
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setpriority(SB)
+ RET
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setregid(SB)
+ RET
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setreuid(SB)
+ RET
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setresgid(SB)
+ RET
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setresuid(SB)
+ RET
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setrlimit(SB)
+ RET
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setrtable(SB)
+ RET
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setsid(SB)
+ RET
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_settimeofday(SB)
+ RET
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setuid(SB)
+ RET
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_stat(SB)
+ RET
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_statfs(SB)
+ RET
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_symlink(SB)
+ RET
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_symlinkat(SB)
+ RET
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_sync(SB)
+ RET
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_truncate(SB)
+ RET
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_umask(SB)
+ RET
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
+DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_unlink(SB)
+ RET
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_unlinkat(SB)
+ RET
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_unmount(SB)
+ RET
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_write(SB)
+ RET
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
+DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mmap(SB)
+ RET
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_munmap(SB)
+ RET
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_utimensat(SB)
+ RET
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
new file mode 100644
index 000000000..8e3e7873f
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
@@ -0,0 +1,2221 @@
+// go run mksyscall.go -openbsd -libc -tags openbsd,riscv64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_riscv64.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build openbsd && riscv64
+// +build openbsd,riscv64
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(ngid int, gid *_Gid_t) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ wpid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(s int, how int) (err error) {
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, timeval *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func futimes(fd int, timeval *[2]Timeval) (err error) {
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Madvise(b []byte, behav int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlockall(flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Msync(b []byte, flags int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlockall() (err error) {
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Access(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chflags(path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chmod(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Close(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup(fd int) (nfd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
+ nfd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup2(from int, to int) (err error) {
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup3(from int, to int, flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
+ return
+}
+
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchflags(fd int, flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Flock(fd int, how int) (err error) {
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fpathconf(fd int, name int) (val int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (uid int) {
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
+ pgid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgrp() (pgrp int) {
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
+ pgrp = int(r0)
+ return
+}
+
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (ppid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
+ ppid = int(r0)
+ return
+}
+
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
+ prio = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(which int, lim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrtable() (rtable int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
+ rtable = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getsid(pid int) (sid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
+ sid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Issetugid() (tainted bool) {
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
+ tainted = bool(r0 != 0)
+ return
+}
+
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, signum syscall.Signal) (err error) {
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kqueue() (fd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lchown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Link(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, backlog int) (err error) {
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdir(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdirat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifo(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknod(path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Open(path string, mode int, perm uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pathconf(path string, name int) (val int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlink(path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rename(from string, to string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(fromfd int, from string, tofd int, to string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Revoke(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rmdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
+ r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
+ newoffset = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setegid(egid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seteuid(euid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setgid(gid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setlogin(name string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(which int, lim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrtable(rtable int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
+ pid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Settimeofday(tp *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setuid(uid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Stat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, stat *Statfs_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlink(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() (err error) {
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(newmask int) (oldmask int) {
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
+ oldmask = int(r0)
+ return
+}
+
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlink(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unmount(path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
+ r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
new file mode 100644
index 000000000..7dba78927
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd riscv64
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgroups(SB)
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgroups(SB)
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_wait4(SB)
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
+DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_accept(SB)
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
+DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_bind(SB)
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
+DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connect(SB)
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socket(SB)
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockopt(SB)
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsockopt(SB)
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpeername(SB)
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockname(SB)
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shutdown(SB)
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socketpair(SB)
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvfrom(SB)
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendto(SB)
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvmsg(SB)
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendmsg(SB)
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kevent(SB)
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimes(SB)
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_futimes(SB)
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_poll(SB)
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_madvise(SB)
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
+DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlock(SB)
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlockall(SB)
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mprotect(SB)
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_msync(SB)
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlock(SB)
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlockall(SB)
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pipe2(SB)
+
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getdents(SB)
+
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ioctl(SB)
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ppoll(SB)
+
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_access(SB)
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
+DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_adjtime(SB)
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chdir(SB)
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chflags(SB)
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chmod(SB)
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chown(SB)
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chroot(SB)
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_close(SB)
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
+DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup(SB)
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup2(SB)
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup3(SB)
+
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_exit(SB)
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_faccessat(SB)
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchdir(SB)
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchflags(SB)
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmod(SB)
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmodat(SB)
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchown(SB)
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchownat(SB)
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_flock(SB)
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fpathconf(SB)
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstat(SB)
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatat(SB)
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatfs(SB)
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fsync(SB)
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ftruncate(SB)
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getegid(SB)
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_geteuid(SB)
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgid(SB)
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgid(SB)
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgrp(SB)
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpid(SB)
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getppid(SB)
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpriority(SB)
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrlimit(SB)
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrtable(SB)
+
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrusage(SB)
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsid(SB)
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getuid(SB)
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_issetugid(SB)
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kill(SB)
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kqueue(SB)
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lchown(SB)
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_link(SB)
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
+DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_linkat(SB)
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_listen(SB)
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lstat(SB)
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdir(SB)
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdirat(SB)
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifo(SB)
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifoat(SB)
+
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknod(SB)
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknodat(SB)
+
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_nanosleep(SB)
+
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
+DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_open(SB)
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
+DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_openat(SB)
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pathconf(SB)
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pread(SB)
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwrite(SB)
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_read(SB)
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
+DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlink(SB)
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlinkat(SB)
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rename(SB)
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameat(SB)
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_revoke(SB)
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
+DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rmdir(SB)
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lseek(SB)
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_select(SB)
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
+DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setegid(SB)
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_seteuid(SB)
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgid(SB)
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setlogin(SB)
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpgid(SB)
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpriority(SB)
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setregid(SB)
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setreuid(SB)
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresgid(SB)
+
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresuid(SB)
+
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrlimit(SB)
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrtable(SB)
+
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsid(SB)
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_settimeofday(SB)
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setuid(SB)
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_stat(SB)
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlink(SB)
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlinkat(SB)
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sync(SB)
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_truncate(SB)
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_umask(SB)
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
+DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlink(SB)
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlinkat(SB)
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unmount(SB)
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_write(SB)
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
+DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mmap(SB)
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munmap(SB)
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
+
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/sdk/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index fdf53f8da..91f5a2bde 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -147,6 +147,8 @@ import (
//go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so"
//go:cgo_import_dynamic libc_port_get port_get "libc.so"
//go:cgo_import_dynamic libc_port_getn port_getn "libc.so"
+//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
+//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
//go:linkname procpipe libc_pipe
//go:linkname procpipe2 libc_pipe2
@@ -284,6 +286,8 @@ import (
//go:linkname procport_dissociate libc_port_dissociate
//go:linkname procport_get libc_port_get
//go:linkname procport_getn libc_port_getn
+//go:linkname procputmsg libc_putmsg
+//go:linkname procgetmsg libc_getmsg
var (
procpipe,
@@ -421,7 +425,9 @@ var (
procport_associate,
procport_dissociate,
procport_get,
- procport_getn syscallFunc
+ procport_getn,
+ procputmsg,
+ procgetmsg syscallFunc
)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2065,3 +2071,23 @@ func port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Times
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go b/sdk/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go
new file mode 100644
index 000000000..e44054470
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go
@@ -0,0 +1,281 @@
+// go run mksysctl_openbsd.go
+// Code generated by the command above; DO NOT EDIT.
+
+//go:build ppc64 && openbsd
+// +build ppc64,openbsd
+
+package unix
+
+type mibentry struct {
+ ctlname string
+ ctloid []_C_int
+}
+
+var sysctlMib = []mibentry{
+ {"ddb.console", []_C_int{9, 6}},
+ {"ddb.log", []_C_int{9, 7}},
+ {"ddb.max_line", []_C_int{9, 3}},
+ {"ddb.max_width", []_C_int{9, 2}},
+ {"ddb.panic", []_C_int{9, 5}},
+ {"ddb.profile", []_C_int{9, 9}},
+ {"ddb.radix", []_C_int{9, 1}},
+ {"ddb.tab_stop_width", []_C_int{9, 4}},
+ {"ddb.trigger", []_C_int{9, 8}},
+ {"fs.posix.setuid", []_C_int{3, 1, 1}},
+ {"hw.allowpowerdown", []_C_int{6, 22}},
+ {"hw.byteorder", []_C_int{6, 4}},
+ {"hw.cpuspeed", []_C_int{6, 12}},
+ {"hw.diskcount", []_C_int{6, 10}},
+ {"hw.disknames", []_C_int{6, 8}},
+ {"hw.diskstats", []_C_int{6, 9}},
+ {"hw.machine", []_C_int{6, 1}},
+ {"hw.model", []_C_int{6, 2}},
+ {"hw.ncpu", []_C_int{6, 3}},
+ {"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
+ {"hw.pagesize", []_C_int{6, 7}},
+ {"hw.perfpolicy", []_C_int{6, 23}},
+ {"hw.physmem", []_C_int{6, 19}},
+ {"hw.power", []_C_int{6, 26}},
+ {"hw.product", []_C_int{6, 15}},
+ {"hw.serialno", []_C_int{6, 17}},
+ {"hw.setperf", []_C_int{6, 13}},
+ {"hw.smt", []_C_int{6, 24}},
+ {"hw.usermem", []_C_int{6, 20}},
+ {"hw.uuid", []_C_int{6, 18}},
+ {"hw.vendor", []_C_int{6, 14}},
+ {"hw.version", []_C_int{6, 16}},
+ {"kern.allowdt", []_C_int{1, 65}},
+ {"kern.allowkmem", []_C_int{1, 52}},
+ {"kern.argmax", []_C_int{1, 8}},
+ {"kern.audio", []_C_int{1, 84}},
+ {"kern.boottime", []_C_int{1, 21}},
+ {"kern.bufcachepercent", []_C_int{1, 72}},
+ {"kern.ccpu", []_C_int{1, 45}},
+ {"kern.clockrate", []_C_int{1, 12}},
+ {"kern.consbuf", []_C_int{1, 83}},
+ {"kern.consbufsize", []_C_int{1, 82}},
+ {"kern.consdev", []_C_int{1, 75}},
+ {"kern.cp_time", []_C_int{1, 40}},
+ {"kern.cp_time2", []_C_int{1, 71}},
+ {"kern.cpustats", []_C_int{1, 85}},
+ {"kern.domainname", []_C_int{1, 22}},
+ {"kern.file", []_C_int{1, 73}},
+ {"kern.forkstat", []_C_int{1, 42}},
+ {"kern.fscale", []_C_int{1, 46}},
+ {"kern.fsync", []_C_int{1, 33}},
+ {"kern.global_ptrace", []_C_int{1, 81}},
+ {"kern.hostid", []_C_int{1, 11}},
+ {"kern.hostname", []_C_int{1, 10}},
+ {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
+ {"kern.job_control", []_C_int{1, 19}},
+ {"kern.malloc.buckets", []_C_int{1, 39, 1}},
+ {"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
+ {"kern.maxclusters", []_C_int{1, 67}},
+ {"kern.maxfiles", []_C_int{1, 7}},
+ {"kern.maxlocksperuid", []_C_int{1, 70}},
+ {"kern.maxpartitions", []_C_int{1, 23}},
+ {"kern.maxproc", []_C_int{1, 6}},
+ {"kern.maxthread", []_C_int{1, 25}},
+ {"kern.maxvnodes", []_C_int{1, 5}},
+ {"kern.mbstat", []_C_int{1, 59}},
+ {"kern.msgbuf", []_C_int{1, 48}},
+ {"kern.msgbufsize", []_C_int{1, 38}},
+ {"kern.nchstats", []_C_int{1, 41}},
+ {"kern.netlivelocks", []_C_int{1, 76}},
+ {"kern.nfiles", []_C_int{1, 56}},
+ {"kern.ngroups", []_C_int{1, 18}},
+ {"kern.nosuidcoredump", []_C_int{1, 32}},
+ {"kern.nprocs", []_C_int{1, 47}},
+ {"kern.nthreads", []_C_int{1, 26}},
+ {"kern.numvnodes", []_C_int{1, 58}},
+ {"kern.osrelease", []_C_int{1, 2}},
+ {"kern.osrevision", []_C_int{1, 3}},
+ {"kern.ostype", []_C_int{1, 1}},
+ {"kern.osversion", []_C_int{1, 27}},
+ {"kern.pfstatus", []_C_int{1, 86}},
+ {"kern.pool_debug", []_C_int{1, 77}},
+ {"kern.posix1version", []_C_int{1, 17}},
+ {"kern.proc", []_C_int{1, 66}},
+ {"kern.rawpartition", []_C_int{1, 24}},
+ {"kern.saved_ids", []_C_int{1, 20}},
+ {"kern.securelevel", []_C_int{1, 9}},
+ {"kern.seminfo", []_C_int{1, 61}},
+ {"kern.shminfo", []_C_int{1, 62}},
+ {"kern.somaxconn", []_C_int{1, 28}},
+ {"kern.sominconn", []_C_int{1, 29}},
+ {"kern.splassert", []_C_int{1, 54}},
+ {"kern.stackgap_random", []_C_int{1, 50}},
+ {"kern.sysvipc_info", []_C_int{1, 51}},
+ {"kern.sysvmsg", []_C_int{1, 34}},
+ {"kern.sysvsem", []_C_int{1, 35}},
+ {"kern.sysvshm", []_C_int{1, 36}},
+ {"kern.timecounter.choice", []_C_int{1, 69, 4}},
+ {"kern.timecounter.hardware", []_C_int{1, 69, 3}},
+ {"kern.timecounter.tick", []_C_int{1, 69, 1}},
+ {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
+ {"kern.timeout_stats", []_C_int{1, 87}},
+ {"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
+ {"kern.tty.tk_nin", []_C_int{1, 44, 1}},
+ {"kern.tty.tk_nout", []_C_int{1, 44, 2}},
+ {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
+ {"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
+ {"kern.ttycount", []_C_int{1, 57}},
+ {"kern.utc_offset", []_C_int{1, 88}},
+ {"kern.version", []_C_int{1, 4}},
+ {"kern.video", []_C_int{1, 89}},
+ {"kern.watchdog.auto", []_C_int{1, 64, 2}},
+ {"kern.watchdog.period", []_C_int{1, 64, 1}},
+ {"kern.witnesswatch", []_C_int{1, 53}},
+ {"kern.wxabort", []_C_int{1, 74}},
+ {"net.bpf.bufsize", []_C_int{4, 31, 1}},
+ {"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
+ {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
+ {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
+ {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
+ {"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
+ {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
+ {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
+ {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
+ {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
+ {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
+ {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
+ {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
+ {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
+ {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
+ {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
+ {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
+ {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
+ {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
+ {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
+ {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
+ {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
+ {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
+ {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
+ {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
+ {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
+ {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
+ {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
+ {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
+ {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
+ {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
+ {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
+ {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
+ {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
+ {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
+ {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
+ {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
+ {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
+ {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
+ {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
+ {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
+ {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
+ {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
+ {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
+ {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
+ {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
+ {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
+ {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
+ {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
+ {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
+ {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
+ {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
+ {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
+ {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
+ {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
+ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
+ {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
+ {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
+ {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
+ {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
+ {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
+ {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
+ {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
+ {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
+ {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
+ {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
+ {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
+ {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
+ {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
+ {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
+ {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
+ {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
+ {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
+ {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
+ {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
+ {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
+ {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
+ {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
+ {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
+ {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
+ {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
+ {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
+ {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
+ {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
+ {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
+ {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
+ {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
+ {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
+ {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
+ {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
+ {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
+ {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
+ {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
+ {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
+ {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
+ {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
+ {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
+ {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
+ {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
+ {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
+ {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
+ {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
+ {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
+ {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
+ {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
+ {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
+ {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
+ {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
+ {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
+ {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
+ {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
+ {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
+ {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
+ {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
+ {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
+ {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
+ {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
+ {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
+ {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
+ {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
+ {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
+ {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
+ {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
+ {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
+ {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
+ {"net.key.sadb_dump", []_C_int{4, 30, 1}},
+ {"net.key.spd_dump", []_C_int{4, 30, 2}},
+ {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
+ {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
+ {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
+ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
+ {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
+ {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
+ {"net.mpls.ttl", []_C_int{4, 33, 2}},
+ {"net.pflow.stats", []_C_int{4, 34, 1}},
+ {"net.pipex.enable", []_C_int{4, 35, 1}},
+ {"vm.anonmin", []_C_int{2, 7}},
+ {"vm.loadavg", []_C_int{2, 2}},
+ {"vm.malloc_conf", []_C_int{2, 12}},
+ {"vm.maxslp", []_C_int{2, 10}},
+ {"vm.nkmempages", []_C_int{2, 6}},
+ {"vm.psstrings", []_C_int{2, 3}},
+ {"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
+ {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
+ {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
+ {"vm.uspace", []_C_int{2, 11}},
+ {"vm.uvmexp", []_C_int{2, 4}},
+ {"vm.vmmeter", []_C_int{2, 1}},
+ {"vm.vnodemin", []_C_int{2, 9}},
+ {"vm.vtextmin", []_C_int{2, 8}},
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go
new file mode 100644
index 000000000..a0db82fce
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go
@@ -0,0 +1,282 @@
+// go run mksysctl_openbsd.go
+// Code generated by the command above; DO NOT EDIT.
+
+//go:build riscv64 && openbsd
+// +build riscv64,openbsd
+
+package unix
+
+type mibentry struct {
+ ctlname string
+ ctloid []_C_int
+}
+
+var sysctlMib = []mibentry{
+ {"ddb.console", []_C_int{9, 6}},
+ {"ddb.log", []_C_int{9, 7}},
+ {"ddb.max_line", []_C_int{9, 3}},
+ {"ddb.max_width", []_C_int{9, 2}},
+ {"ddb.panic", []_C_int{9, 5}},
+ {"ddb.profile", []_C_int{9, 9}},
+ {"ddb.radix", []_C_int{9, 1}},
+ {"ddb.tab_stop_width", []_C_int{9, 4}},
+ {"ddb.trigger", []_C_int{9, 8}},
+ {"fs.posix.setuid", []_C_int{3, 1, 1}},
+ {"hw.allowpowerdown", []_C_int{6, 22}},
+ {"hw.byteorder", []_C_int{6, 4}},
+ {"hw.cpuspeed", []_C_int{6, 12}},
+ {"hw.diskcount", []_C_int{6, 10}},
+ {"hw.disknames", []_C_int{6, 8}},
+ {"hw.diskstats", []_C_int{6, 9}},
+ {"hw.machine", []_C_int{6, 1}},
+ {"hw.model", []_C_int{6, 2}},
+ {"hw.ncpu", []_C_int{6, 3}},
+ {"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
+ {"hw.pagesize", []_C_int{6, 7}},
+ {"hw.perfpolicy", []_C_int{6, 23}},
+ {"hw.physmem", []_C_int{6, 19}},
+ {"hw.power", []_C_int{6, 26}},
+ {"hw.product", []_C_int{6, 15}},
+ {"hw.serialno", []_C_int{6, 17}},
+ {"hw.setperf", []_C_int{6, 13}},
+ {"hw.smt", []_C_int{6, 24}},
+ {"hw.usermem", []_C_int{6, 20}},
+ {"hw.uuid", []_C_int{6, 18}},
+ {"hw.vendor", []_C_int{6, 14}},
+ {"hw.version", []_C_int{6, 16}},
+ {"kern.allowdt", []_C_int{1, 65}},
+ {"kern.allowkmem", []_C_int{1, 52}},
+ {"kern.argmax", []_C_int{1, 8}},
+ {"kern.audio", []_C_int{1, 84}},
+ {"kern.boottime", []_C_int{1, 21}},
+ {"kern.bufcachepercent", []_C_int{1, 72}},
+ {"kern.ccpu", []_C_int{1, 45}},
+ {"kern.clockrate", []_C_int{1, 12}},
+ {"kern.consbuf", []_C_int{1, 83}},
+ {"kern.consbufsize", []_C_int{1, 82}},
+ {"kern.consdev", []_C_int{1, 75}},
+ {"kern.cp_time", []_C_int{1, 40}},
+ {"kern.cp_time2", []_C_int{1, 71}},
+ {"kern.cpustats", []_C_int{1, 85}},
+ {"kern.domainname", []_C_int{1, 22}},
+ {"kern.file", []_C_int{1, 73}},
+ {"kern.forkstat", []_C_int{1, 42}},
+ {"kern.fscale", []_C_int{1, 46}},
+ {"kern.fsync", []_C_int{1, 33}},
+ {"kern.global_ptrace", []_C_int{1, 81}},
+ {"kern.hostid", []_C_int{1, 11}},
+ {"kern.hostname", []_C_int{1, 10}},
+ {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
+ {"kern.job_control", []_C_int{1, 19}},
+ {"kern.malloc.buckets", []_C_int{1, 39, 1}},
+ {"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
+ {"kern.maxclusters", []_C_int{1, 67}},
+ {"kern.maxfiles", []_C_int{1, 7}},
+ {"kern.maxlocksperuid", []_C_int{1, 70}},
+ {"kern.maxpartitions", []_C_int{1, 23}},
+ {"kern.maxproc", []_C_int{1, 6}},
+ {"kern.maxthread", []_C_int{1, 25}},
+ {"kern.maxvnodes", []_C_int{1, 5}},
+ {"kern.mbstat", []_C_int{1, 59}},
+ {"kern.msgbuf", []_C_int{1, 48}},
+ {"kern.msgbufsize", []_C_int{1, 38}},
+ {"kern.nchstats", []_C_int{1, 41}},
+ {"kern.netlivelocks", []_C_int{1, 76}},
+ {"kern.nfiles", []_C_int{1, 56}},
+ {"kern.ngroups", []_C_int{1, 18}},
+ {"kern.nosuidcoredump", []_C_int{1, 32}},
+ {"kern.nprocs", []_C_int{1, 47}},
+ {"kern.nselcoll", []_C_int{1, 43}},
+ {"kern.nthreads", []_C_int{1, 26}},
+ {"kern.numvnodes", []_C_int{1, 58}},
+ {"kern.osrelease", []_C_int{1, 2}},
+ {"kern.osrevision", []_C_int{1, 3}},
+ {"kern.ostype", []_C_int{1, 1}},
+ {"kern.osversion", []_C_int{1, 27}},
+ {"kern.pfstatus", []_C_int{1, 86}},
+ {"kern.pool_debug", []_C_int{1, 77}},
+ {"kern.posix1version", []_C_int{1, 17}},
+ {"kern.proc", []_C_int{1, 66}},
+ {"kern.rawpartition", []_C_int{1, 24}},
+ {"kern.saved_ids", []_C_int{1, 20}},
+ {"kern.securelevel", []_C_int{1, 9}},
+ {"kern.seminfo", []_C_int{1, 61}},
+ {"kern.shminfo", []_C_int{1, 62}},
+ {"kern.somaxconn", []_C_int{1, 28}},
+ {"kern.sominconn", []_C_int{1, 29}},
+ {"kern.splassert", []_C_int{1, 54}},
+ {"kern.stackgap_random", []_C_int{1, 50}},
+ {"kern.sysvipc_info", []_C_int{1, 51}},
+ {"kern.sysvmsg", []_C_int{1, 34}},
+ {"kern.sysvsem", []_C_int{1, 35}},
+ {"kern.sysvshm", []_C_int{1, 36}},
+ {"kern.timecounter.choice", []_C_int{1, 69, 4}},
+ {"kern.timecounter.hardware", []_C_int{1, 69, 3}},
+ {"kern.timecounter.tick", []_C_int{1, 69, 1}},
+ {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
+ {"kern.timeout_stats", []_C_int{1, 87}},
+ {"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
+ {"kern.tty.tk_nin", []_C_int{1, 44, 1}},
+ {"kern.tty.tk_nout", []_C_int{1, 44, 2}},
+ {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
+ {"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
+ {"kern.ttycount", []_C_int{1, 57}},
+ {"kern.utc_offset", []_C_int{1, 88}},
+ {"kern.version", []_C_int{1, 4}},
+ {"kern.video", []_C_int{1, 89}},
+ {"kern.watchdog.auto", []_C_int{1, 64, 2}},
+ {"kern.watchdog.period", []_C_int{1, 64, 1}},
+ {"kern.witnesswatch", []_C_int{1, 53}},
+ {"kern.wxabort", []_C_int{1, 74}},
+ {"net.bpf.bufsize", []_C_int{4, 31, 1}},
+ {"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
+ {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
+ {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
+ {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
+ {"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
+ {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
+ {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
+ {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
+ {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
+ {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
+ {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
+ {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
+ {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
+ {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
+ {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
+ {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
+ {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
+ {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
+ {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
+ {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
+ {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
+ {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
+ {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
+ {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
+ {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
+ {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
+ {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
+ {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
+ {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
+ {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
+ {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
+ {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
+ {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
+ {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
+ {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
+ {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
+ {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
+ {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
+ {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
+ {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
+ {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
+ {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
+ {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
+ {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
+ {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
+ {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
+ {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
+ {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
+ {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
+ {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
+ {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
+ {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
+ {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
+ {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
+ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
+ {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
+ {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
+ {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
+ {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
+ {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
+ {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
+ {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
+ {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
+ {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
+ {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
+ {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
+ {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
+ {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
+ {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
+ {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
+ {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
+ {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
+ {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
+ {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
+ {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
+ {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
+ {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
+ {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
+ {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
+ {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
+ {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
+ {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
+ {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
+ {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
+ {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
+ {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
+ {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
+ {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
+ {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
+ {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
+ {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
+ {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
+ {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
+ {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
+ {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
+ {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
+ {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
+ {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
+ {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
+ {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
+ {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
+ {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
+ {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
+ {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
+ {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
+ {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
+ {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
+ {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
+ {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
+ {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
+ {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
+ {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
+ {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
+ {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
+ {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
+ {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
+ {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
+ {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
+ {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
+ {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
+ {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
+ {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
+ {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
+ {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
+ {"net.key.sadb_dump", []_C_int{4, 30, 1}},
+ {"net.key.spd_dump", []_C_int{4, 30, 2}},
+ {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
+ {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
+ {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
+ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
+ {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
+ {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
+ {"net.mpls.ttl", []_C_int{4, 33, 2}},
+ {"net.pflow.stats", []_C_int{4, 34, 1}},
+ {"net.pipex.enable", []_C_int{4, 35, 1}},
+ {"vm.anonmin", []_C_int{2, 7}},
+ {"vm.loadavg", []_C_int{2, 2}},
+ {"vm.malloc_conf", []_C_int{2, 12}},
+ {"vm.maxslp", []_C_int{2, 10}},
+ {"vm.nkmempages", []_C_int{2, 6}},
+ {"vm.psstrings", []_C_int{2, 3}},
+ {"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
+ {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
+ {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
+ {"vm.uspace", []_C_int{2, 11}},
+ {"vm.uvmexp", []_C_int{2, 4}},
+ {"vm.vmmeter", []_C_int{2, 1}},
+ {"vm.vnodemin", []_C_int{2, 9}},
+ {"vm.vtextmin", []_C_int{2, 8}},
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
index 817edbf95..597733813 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
@@ -6,6 +6,7 @@
package unix
+// Deprecated: Use libc wrappers instead of direct syscalls.
const (
SYS_EXIT = 1 // { void sys_exit(int rval); }
SYS_FORK = 2 // { int sys_fork(void); }
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
index ea453614e..16af29189 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
@@ -6,6 +6,7 @@
package unix
+// Deprecated: Use libc wrappers instead of direct syscalls.
const (
SYS_EXIT = 1 // { void sys_exit(int rval); }
SYS_FORK = 2 // { int sys_fork(void); }
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
index 467971eed..f59b18a97 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
@@ -6,6 +6,7 @@
package unix
+// Deprecated: Use libc wrappers instead of direct syscalls.
const (
SYS_EXIT = 1 // { void sys_exit(int rval); }
SYS_FORK = 2 // { int sys_fork(void); }
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
index 32eec5ed5..721ef5910 100644
--- a/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
@@ -6,6 +6,7 @@
package unix
+// Deprecated: Use libc wrappers instead of direct syscalls.
const (
SYS_EXIT = 1 // { void sys_exit(int rval); }
SYS_FORK = 2 // { int sys_fork(void); }
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go
new file mode 100644
index 000000000..f258cfa24
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go
@@ -0,0 +1,218 @@
+// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc64 && openbsd
+// +build ppc64,openbsd
+
+package unix
+
+const (
+ SYS_EXIT = 1 // { void sys_exit(int rval); }
+ SYS_FORK = 2 // { int sys_fork(void); }
+ SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
+ SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
+ SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
+ SYS_CLOSE = 6 // { int sys_close(int fd); }
+ SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
+ SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
+ SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
+ SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
+ SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
+ SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
+ SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
+ SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
+ SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
+ SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
+ SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
+ SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
+ SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
+ SYS_GETPID = 20 // { pid_t sys_getpid(void); }
+ SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
+ SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
+ SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
+ SYS_GETUID = 24 // { uid_t sys_getuid(void); }
+ SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
+ SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
+ SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
+ SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
+ SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
+ SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
+ SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
+ SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
+ SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
+ SYS_SYNC = 36 // { void sys_sync(void); }
+ SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
+ SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
+ SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
+ SYS_DUP = 41 // { int sys_dup(int fd); }
+ SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
+ SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
+ SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
+ SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
+ SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
+ SYS_GETGID = 47 // { gid_t sys_getgid(void); }
+ SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
+ SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
+ SYS_ACCT = 51 // { int sys_acct(const char *path); }
+ SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
+ SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
+ SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
+ SYS_REBOOT = 55 // { int sys_reboot(int opt); }
+ SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
+ SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
+ SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
+ SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
+ SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
+ SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
+ SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
+ SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
+ SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
+ SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
+ SYS_VFORK = 66 // { int sys_vfork(void); }
+ SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
+ SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
+ SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
+ SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
+ SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
+ SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+ SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
+ SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
+ SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
+ SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
+ SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
+ SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
+ SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
+ SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
+ SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
+ SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
+ SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
+ SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
+ SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
+ SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
+ SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
+ SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
+ SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
+ SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
+ SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
+ SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
+ SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
+ SYS_FSYNC = 95 // { int sys_fsync(int fd); }
+ SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
+ SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
+ SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
+ SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
+ SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
+ SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
+ SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
+ SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
+ SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
+ SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
+ SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
+ SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
+ SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
+ SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
+ SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
+ SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
+ SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
+ SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
+ SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
+ SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
+ SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
+ SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
+ SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
+ SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
+ SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
+ SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
+ SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
+ SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
+ SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
+ SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
+ SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
+ SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
+ SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
+ SYS_SETSID = 147 // { int sys_setsid(void); }
+ SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
+ SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
+ SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
+ SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
+ SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
+ SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
+ SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
+ SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
+ SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
+ SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
+ SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
+ SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
+ SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
+ SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
+ SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
+ SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+ SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
+ SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
+ SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
+ SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
+ SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
+ SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
+ SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
+ SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+ SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
+ SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
+ SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
+ SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
+ SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
+ SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
+ SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
+ SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
+ SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
+ SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
+ SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_KQUEUE = 269 // { int sys_kqueue(void); }
+ SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
+ SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
+ SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
+ SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
+ SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
+ SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
+ SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
+ SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
+ SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
+ SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
+ SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
+ SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
+ SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
+ SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
+ SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
+ SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
+ SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
+ SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
+ SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
+ SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
+ SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
+ SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
+ SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
+ SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
+ SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
+ SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
+ SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
+ SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
+ SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
+ SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
+ SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
+ SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
+ SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
+ SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
+ SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
+ SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
+ SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
+)
diff --git a/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go
new file mode 100644
index 000000000..07919e0ec
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go
@@ -0,0 +1,219 @@
+// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build riscv64 && openbsd
+// +build riscv64,openbsd
+
+package unix
+
+// Deprecated: Use libc wrappers instead of direct syscalls.
+const (
+ SYS_EXIT = 1 // { void sys_exit(int rval); }
+ SYS_FORK = 2 // { int sys_fork(void); }
+ SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
+ SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
+ SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
+ SYS_CLOSE = 6 // { int sys_close(int fd); }
+ SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
+ SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
+ SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
+ SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
+ SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
+ SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
+ SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
+ SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
+ SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
+ SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
+ SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
+ SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
+ SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
+ SYS_GETPID = 20 // { pid_t sys_getpid(void); }
+ SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
+ SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
+ SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
+ SYS_GETUID = 24 // { uid_t sys_getuid(void); }
+ SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
+ SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
+ SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
+ SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
+ SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
+ SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
+ SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
+ SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
+ SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
+ SYS_SYNC = 36 // { void sys_sync(void); }
+ SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
+ SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
+ SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
+ SYS_DUP = 41 // { int sys_dup(int fd); }
+ SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
+ SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
+ SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
+ SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
+ SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
+ SYS_GETGID = 47 // { gid_t sys_getgid(void); }
+ SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
+ SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
+ SYS_ACCT = 51 // { int sys_acct(const char *path); }
+ SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
+ SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
+ SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
+ SYS_REBOOT = 55 // { int sys_reboot(int opt); }
+ SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
+ SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
+ SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
+ SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
+ SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
+ SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
+ SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
+ SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
+ SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
+ SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
+ SYS_VFORK = 66 // { int sys_vfork(void); }
+ SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
+ SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
+ SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
+ SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
+ SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
+ SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+ SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
+ SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
+ SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
+ SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
+ SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
+ SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
+ SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
+ SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
+ SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
+ SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
+ SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
+ SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
+ SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
+ SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
+ SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
+ SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
+ SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
+ SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
+ SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
+ SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
+ SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
+ SYS_FSYNC = 95 // { int sys_fsync(int fd); }
+ SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
+ SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
+ SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
+ SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
+ SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
+ SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
+ SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
+ SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
+ SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
+ SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
+ SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
+ SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
+ SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
+ SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
+ SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
+ SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
+ SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
+ SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
+ SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
+ SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
+ SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
+ SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
+ SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
+ SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
+ SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
+ SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
+ SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
+ SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
+ SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
+ SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
+ SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
+ SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
+ SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
+ SYS_SETSID = 147 // { int sys_setsid(void); }
+ SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
+ SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
+ SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
+ SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
+ SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
+ SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
+ SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
+ SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
+ SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
+ SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
+ SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
+ SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
+ SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
+ SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
+ SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
+ SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+ SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
+ SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
+ SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
+ SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
+ SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
+ SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
+ SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
+ SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+ SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
+ SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
+ SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
+ SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
+ SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
+ SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
+ SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
+ SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
+ SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
+ SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
+ SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_KQUEUE = 269 // { int sys_kqueue(void); }
+ SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
+ SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
+ SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
+ SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
+ SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
+ SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
+ SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
+ SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
+ SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
+ SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
+ SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
+ SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
+ SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
+ SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
+ SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
+ SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
+ SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
+ SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
+ SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
+ SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
+ SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
+ SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
+ SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
+ SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
+ SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
+ SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
+ SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
+ SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
+ SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
+ SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
+ SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
+ SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
+ SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
+ SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
+ SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
+ SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
+ SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
+)
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
index dea0c9a60..d9c78cdcb 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
@@ -294,7 +294,7 @@ type PtraceLwpInfoStruct struct {
Flags int32
Sigmask Sigset_t
Siglist Sigset_t
- Siginfo __Siginfo
+ Siginfo __PtraceSiginfo
Tdname [20]int8
Child_pid int32
Syscall_code uint32
@@ -312,6 +312,17 @@ type __Siginfo struct {
Value [4]byte
_ [32]byte
}
+type __PtraceSiginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr uintptr
+ Value [4]byte
+ _ [32]byte
+}
type Sigset_t struct {
Val [4]uint32
@@ -350,8 +361,8 @@ type FpExtendedPrecision struct{}
type PtraceIoDesc struct {
Op int32
- Offs *byte
- Addr *byte
+ Offs uintptr
+ Addr uintptr
Len uint32
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
index da0ea0d60..26991b165 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
@@ -291,7 +291,7 @@ type PtraceLwpInfoStruct struct {
Flags int32
Sigmask Sigset_t
Siglist Sigset_t
- Siginfo __Siginfo
+ Siginfo __PtraceSiginfo
Tdname [20]int8
Child_pid int32
Syscall_code uint32
@@ -310,6 +310,18 @@ type __Siginfo struct {
_ [40]byte
}
+type __PtraceSiginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr uintptr
+ Value [8]byte
+ _ [40]byte
+}
+
type Sigset_t struct {
Val [4]uint32
}
@@ -354,8 +366,8 @@ type FpExtendedPrecision struct{}
type PtraceIoDesc struct {
Op int32
- Offs *byte
- Addr *byte
+ Offs uintptr
+ Addr uintptr
Len uint64
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
index da8f74045..f8324e7e7 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
@@ -293,7 +293,7 @@ type PtraceLwpInfoStruct struct {
Flags int32
Sigmask Sigset_t
Siglist Sigset_t
- Siginfo __Siginfo
+ Siginfo __PtraceSiginfo
Tdname [20]int8
Child_pid int32
Syscall_code uint32
@@ -312,6 +312,18 @@ type __Siginfo struct {
_ [32]byte
}
+type __PtraceSiginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr uintptr
+ Value [4]byte
+ _ [32]byte
+}
+
type Sigset_t struct {
Val [4]uint32
}
@@ -337,8 +349,8 @@ type FpExtendedPrecision struct {
type PtraceIoDesc struct {
Op int32
- Offs *byte
- Addr *byte
+ Offs uintptr
+ Addr uintptr
Len uint32
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
index d69988e5e..4220411f3 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
@@ -291,7 +291,7 @@ type PtraceLwpInfoStruct struct {
Flags int32
Sigmask Sigset_t
Siglist Sigset_t
- Siginfo __Siginfo
+ Siginfo __PtraceSiginfo
Tdname [20]int8
Child_pid int32
Syscall_code uint32
@@ -310,6 +310,18 @@ type __Siginfo struct {
_ [40]byte
}
+type __PtraceSiginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr uintptr
+ Value [8]byte
+ _ [40]byte
+}
+
type Sigset_t struct {
Val [4]uint32
}
@@ -334,8 +346,8 @@ type FpExtendedPrecision struct{}
type PtraceIoDesc struct {
Op int32
- Offs *byte
- Addr *byte
+ Offs uintptr
+ Addr uintptr
Len uint64
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
index d6fd9e883..0660fd45c 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
@@ -291,7 +291,7 @@ type PtraceLwpInfoStruct struct {
Flags int32
Sigmask Sigset_t
Siglist Sigset_t
- Siginfo __Siginfo
+ Siginfo __PtraceSiginfo
Tdname [20]int8
Child_pid int32
Syscall_code uint32
@@ -310,6 +310,18 @@ type __Siginfo struct {
_ [40]byte
}
+type __PtraceSiginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr uintptr
+ Value [8]byte
+ _ [40]byte
+}
+
type Sigset_t struct {
Val [4]uint32
}
@@ -335,8 +347,8 @@ type FpExtendedPrecision struct{}
type PtraceIoDesc struct {
Op int32
- Offs *byte
- Addr *byte
+ Offs uintptr
+ Addr uintptr
Len uint64
}
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
deleted file mode 100644
index 4c485261d..000000000
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// cgo -godefs types_illumos.go | go run mkpost.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-//go:build amd64 && illumos
-// +build amd64,illumos
-
-package unix
-
-const (
- TUNNEWPPA = 0x540001
- TUNSETPPA = 0x540002
-
- I_STR = 0x5308
- I_POP = 0x5303
- I_PUSH = 0x5302
- I_LINK = 0x530c
- I_UNLINK = 0x530d
- I_PLINK = 0x5316
- I_PUNLINK = 0x5317
-
- IF_UNITSEL = -0x7ffb8cca
-)
-
-type strbuf struct {
- Maxlen int32
- Len int32
- Buf *int8
-}
-
-type Strioctl struct {
- Cmd int32
- Timout int32
- Len int32
- Dp *int8
-}
-
-type Lifreq struct {
- Name [32]int8
- Lifru1 [4]byte
- Type uint32
- Lifru [336]byte
-}
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index 263604401..89c516a29 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -254,6 +254,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index 8187489d1..62b4fb269 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -269,6 +269,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index d1612335f..e86b35893 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -245,6 +245,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index c28e5556b..6c6be4c91 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -248,6 +248,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
index 187061f9f..4982ea355 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
@@ -249,6 +249,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 369129917..173141a67 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -250,6 +250,12 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+const (
+ SIG_BLOCK = 0x1
+ SIG_UNBLOCK = 0x2
+ SIG_SETMASK = 0x3
+)
+
type Siginfo struct {
Signo int32
Code int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index 7473468d7..93ae4c516 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -251,6 +251,12 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+const (
+ SIG_BLOCK = 0x1
+ SIG_UNBLOCK = 0x2
+ SIG_SETMASK = 0x3
+)
+
type Siginfo struct {
Signo int32
Code int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index ed9448524..4e4e510ca 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -251,6 +251,12 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+const (
+ SIG_BLOCK = 0x1
+ SIG_UNBLOCK = 0x2
+ SIG_SETMASK = 0x3
+)
+
type Siginfo struct {
Signo int32
Code int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index 0892a73a4..3f5ba013d 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -250,6 +250,12 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+const (
+ SIG_BLOCK = 0x1
+ SIG_UNBLOCK = 0x2
+ SIG_SETMASK = 0x3
+)
+
type Siginfo struct {
Signo int32
Code int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
index e1dd48333..71dfe7cdb 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -257,6 +257,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index d9f654c7b..3a2b7f0a6 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -258,6 +258,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 74acda9fe..a52d62756 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -258,6 +258,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index 50ebe69eb..dfc007d8a 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -276,6 +276,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index 75b34c259..b53cb9103 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -271,6 +271,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 429c3bf7d..fe0aa3547 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -253,6 +253,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x1
+ SIG_UNBLOCK = 0x2
+ SIG_SETMASK = 0x4
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go
new file mode 100644
index 000000000..d6724c010
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go
@@ -0,0 +1,571 @@
+// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc64 && openbsd
+// +build ppc64,openbsd
+
+package unix
+
+const (
+ SizeofPtr = 0x8
+ SizeofShort = 0x2
+ SizeofInt = 0x4
+ SizeofLong = 0x8
+ SizeofLongLong = 0x8
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type _Gid_t uint32
+
+type Stat_t struct {
+ Mode uint32
+ Dev int32
+ Ino uint64
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev int32
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ Size int64
+ Blocks int64
+ Blksize int32
+ Flags uint32
+ Gen uint32
+ _ Timespec
+}
+
+type Statfs_t struct {
+ F_flags uint32
+ F_bsize uint32
+ F_iosize uint32
+ F_blocks uint64
+ F_bfree uint64
+ F_bavail int64
+ F_files uint64
+ F_ffree uint64
+ F_favail int64
+ F_syncwrites uint64
+ F_syncreads uint64
+ F_asyncwrites uint64
+ F_asyncreads uint64
+ F_fsid Fsid
+ F_namemax uint32
+ F_owner uint32
+ F_ctime uint64
+ F_fstypename [16]byte
+ F_mntonname [90]byte
+ F_mntfromname [90]byte
+ F_mntfromspec [90]byte
+ _ [2]byte
+ Mount_info [160]byte
+}
+
+type Flock_t struct {
+ Start int64
+ Len int64
+ Pid int32
+ Type int16
+ Whence int16
+}
+
+type Dirent struct {
+ Fileno uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Namlen uint8
+ _ [4]uint8
+ Name [256]int8
+}
+
+type Fsid struct {
+ Val [2]int32
+}
+
+const (
+ PathMax = 0x400
+)
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [104]int8
+}
+
+type RawSockaddrDatalink struct {
+ Len uint8
+ Family uint8
+ Index uint16
+ Type uint8
+ Nlen uint8
+ Alen uint8
+ Slen uint8
+ Data [24]int8
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]int8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [92]int8
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *Iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type Cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Filt [8]uint32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x6c
+ SizeofSockaddrUnix = 0x6a
+ SizeofSockaddrDatalink = 0x20
+ SizeofLinger = 0x8
+ SizeofIovec = 0x10
+ SizeofIPMreq = 0x8
+ SizeofIPv6Mreq = 0x14
+ SizeofMsghdr = 0x30
+ SizeofCmsghdr = 0xc
+ SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
+)
+
+const (
+ PTRACE_TRACEME = 0x0
+ PTRACE_CONT = 0x7
+ PTRACE_KILL = 0x8
+)
+
+type Kevent_t struct {
+ Ident uint64
+ Filter int16
+ Flags uint16
+ Fflags uint32
+ Data int64
+ Udata *byte
+}
+
+type FdSet struct {
+ Bits [32]uint32
+}
+
+const (
+ SizeofIfMsghdr = 0xa8
+ SizeofIfData = 0x90
+ SizeofIfaMsghdr = 0x18
+ SizeofIfAnnounceMsghdr = 0x1a
+ SizeofRtMsghdr = 0x60
+ SizeofRtMetrics = 0x38
+)
+
+type IfMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Xflags int32
+ Data IfData
+}
+
+type IfData struct {
+ Type uint8
+ Addrlen uint8
+ Hdrlen uint8
+ Link_state uint8
+ Mtu uint32
+ Metric uint32
+ Rdomain uint32
+ Baudrate uint64
+ Ipackets uint64
+ Ierrors uint64
+ Opackets uint64
+ Oerrors uint64
+ Collisions uint64
+ Ibytes uint64
+ Obytes uint64
+ Imcasts uint64
+ Omcasts uint64
+ Iqdrops uint64
+ Oqdrops uint64
+ Noproto uint64
+ Capabilities uint32
+ Lastchange Timeval
+}
+
+type IfaMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Metric int32
+}
+
+type IfAnnounceMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ What uint16
+ Name [16]int8
+}
+
+type RtMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Priority uint8
+ Mpls uint8
+ Addrs int32
+ Flags int32
+ Fmask int32
+ Pid int32
+ Seq int32
+ Errno int32
+ Inits uint32
+ Rmx RtMetrics
+}
+
+type RtMetrics struct {
+ Pksent uint64
+ Expire int64
+ Locks uint32
+ Mtu uint32
+ Refcnt uint32
+ Hopcount uint32
+ Recvpipe uint32
+ Sendpipe uint32
+ Ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Pad uint32
+}
+
+type Mclpool struct{}
+
+const (
+ SizeofBpfVersion = 0x4
+ SizeofBpfStat = 0x8
+ SizeofBpfProgram = 0x10
+ SizeofBpfInsn = 0x8
+ SizeofBpfHdr = 0x18
+)
+
+type BpfVersion struct {
+ Major uint16
+ Minor uint16
+}
+
+type BpfStat struct {
+ Recv uint32
+ Drop uint32
+}
+
+type BpfProgram struct {
+ Len uint32
+ Insns *BpfInsn
+}
+
+type BpfInsn struct {
+ Code uint16
+ Jt uint8
+ Jf uint8
+ K uint32
+}
+
+type BpfHdr struct {
+ Tstamp BpfTimeval
+ Caplen uint32
+ Datalen uint32
+ Hdrlen uint16
+ Ifidx uint16
+ Flowid uint16
+ Flags uint8
+ Drops uint8
+}
+
+type BpfTimeval struct {
+ Sec uint32
+ Usec uint32
+}
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]uint8
+ Ispeed int32
+ Ospeed int32
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+const (
+ AT_FDCWD = -0x64
+ AT_EACCESS = 0x1
+ AT_SYMLINK_NOFOLLOW = 0x2
+ AT_SYMLINK_FOLLOW = 0x4
+ AT_REMOVEDIR = 0x8
+)
+
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+const (
+ POLLERR = 0x8
+ POLLHUP = 0x10
+ POLLIN = 0x1
+ POLLNVAL = 0x20
+ POLLOUT = 0x4
+ POLLPRI = 0x2
+ POLLRDBAND = 0x80
+ POLLRDNORM = 0x40
+ POLLWRBAND = 0x100
+ POLLWRNORM = 0x4
+)
+
+type Sigset_t uint32
+
+type Utsname struct {
+ Sysname [256]byte
+ Nodename [256]byte
+ Release [256]byte
+ Version [256]byte
+ Machine [256]byte
+}
+
+const SizeofUvmexp = 0x158
+
+type Uvmexp struct {
+ Pagesize int32
+ Pagemask int32
+ Pageshift int32
+ Npages int32
+ Free int32
+ Active int32
+ Inactive int32
+ Paging int32
+ Wired int32
+ Zeropages int32
+ Reserve_pagedaemon int32
+ Reserve_kernel int32
+ Unused01 int32
+ Vnodepages int32
+ Vtextpages int32
+ Freemin int32
+ Freetarg int32
+ Inactarg int32
+ Wiredmax int32
+ Anonmin int32
+ Vtextmin int32
+ Vnodemin int32
+ Anonminpct int32
+ Vtextminpct int32
+ Vnodeminpct int32
+ Nswapdev int32
+ Swpages int32
+ Swpginuse int32
+ Swpgonly int32
+ Nswget int32
+ Nanon int32
+ Unused05 int32
+ Unused06 int32
+ Faults int32
+ Traps int32
+ Intrs int32
+ Swtch int32
+ Softs int32
+ Syscalls int32
+ Pageins int32
+ Unused07 int32
+ Unused08 int32
+ Pgswapin int32
+ Pgswapout int32
+ Forks int32
+ Forks_ppwait int32
+ Forks_sharevm int32
+ Pga_zerohit int32
+ Pga_zeromiss int32
+ Unused09 int32
+ Fltnoram int32
+ Fltnoanon int32
+ Fltnoamap int32
+ Fltpgwait int32
+ Fltpgrele int32
+ Fltrelck int32
+ Fltrelckok int32
+ Fltanget int32
+ Fltanretry int32
+ Fltamcopy int32
+ Fltnamap int32
+ Fltnomap int32
+ Fltlget int32
+ Fltget int32
+ Flt_anon int32
+ Flt_acow int32
+ Flt_obj int32
+ Flt_prcopy int32
+ Flt_przero int32
+ Pdwoke int32
+ Pdrevs int32
+ Pdswout int32
+ Pdfreed int32
+ Pdscans int32
+ Pdanscan int32
+ Pdobscan int32
+ Pdreact int32
+ Pdbusy int32
+ Pdpageouts int32
+ Pdpending int32
+ Pddeact int32
+ Unused11 int32
+ Unused12 int32
+ Unused13 int32
+ Fpswtch int32
+ Kmapent int32
+}
+
+const SizeofClockinfo = 0x10
+
+type Clockinfo struct {
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go
new file mode 100644
index 000000000..ddfd27a43
--- /dev/null
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go
@@ -0,0 +1,571 @@
+// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build riscv64 && openbsd
+// +build riscv64,openbsd
+
+package unix
+
+const (
+ SizeofPtr = 0x8
+ SizeofShort = 0x2
+ SizeofInt = 0x4
+ SizeofLong = 0x8
+ SizeofLongLong = 0x8
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type _Gid_t uint32
+
+type Stat_t struct {
+ Mode uint32
+ Dev int32
+ Ino uint64
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev int32
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ Size int64
+ Blocks int64
+ Blksize int32
+ Flags uint32
+ Gen uint32
+ _ Timespec
+}
+
+type Statfs_t struct {
+ F_flags uint32
+ F_bsize uint32
+ F_iosize uint32
+ F_blocks uint64
+ F_bfree uint64
+ F_bavail int64
+ F_files uint64
+ F_ffree uint64
+ F_favail int64
+ F_syncwrites uint64
+ F_syncreads uint64
+ F_asyncwrites uint64
+ F_asyncreads uint64
+ F_fsid Fsid
+ F_namemax uint32
+ F_owner uint32
+ F_ctime uint64
+ F_fstypename [16]byte
+ F_mntonname [90]byte
+ F_mntfromname [90]byte
+ F_mntfromspec [90]byte
+ _ [2]byte
+ Mount_info [160]byte
+}
+
+type Flock_t struct {
+ Start int64
+ Len int64
+ Pid int32
+ Type int16
+ Whence int16
+}
+
+type Dirent struct {
+ Fileno uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Namlen uint8
+ _ [4]uint8
+ Name [256]int8
+}
+
+type Fsid struct {
+ Val [2]int32
+}
+
+const (
+ PathMax = 0x400
+)
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [104]int8
+}
+
+type RawSockaddrDatalink struct {
+ Len uint8
+ Family uint8
+ Index uint16
+ Type uint8
+ Nlen uint8
+ Alen uint8
+ Slen uint8
+ Data [24]int8
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]int8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [92]int8
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *Iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type Cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Filt [8]uint32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x6c
+ SizeofSockaddrUnix = 0x6a
+ SizeofSockaddrDatalink = 0x20
+ SizeofLinger = 0x8
+ SizeofIovec = 0x10
+ SizeofIPMreq = 0x8
+ SizeofIPv6Mreq = 0x14
+ SizeofMsghdr = 0x30
+ SizeofCmsghdr = 0xc
+ SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
+)
+
+const (
+ PTRACE_TRACEME = 0x0
+ PTRACE_CONT = 0x7
+ PTRACE_KILL = 0x8
+)
+
+type Kevent_t struct {
+ Ident uint64
+ Filter int16
+ Flags uint16
+ Fflags uint32
+ Data int64
+ Udata *byte
+}
+
+type FdSet struct {
+ Bits [32]uint32
+}
+
+const (
+ SizeofIfMsghdr = 0xa8
+ SizeofIfData = 0x90
+ SizeofIfaMsghdr = 0x18
+ SizeofIfAnnounceMsghdr = 0x1a
+ SizeofRtMsghdr = 0x60
+ SizeofRtMetrics = 0x38
+)
+
+type IfMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Xflags int32
+ Data IfData
+}
+
+type IfData struct {
+ Type uint8
+ Addrlen uint8
+ Hdrlen uint8
+ Link_state uint8
+ Mtu uint32
+ Metric uint32
+ Rdomain uint32
+ Baudrate uint64
+ Ipackets uint64
+ Ierrors uint64
+ Opackets uint64
+ Oerrors uint64
+ Collisions uint64
+ Ibytes uint64
+ Obytes uint64
+ Imcasts uint64
+ Omcasts uint64
+ Iqdrops uint64
+ Oqdrops uint64
+ Noproto uint64
+ Capabilities uint32
+ Lastchange Timeval
+}
+
+type IfaMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Metric int32
+}
+
+type IfAnnounceMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ What uint16
+ Name [16]int8
+}
+
+type RtMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Priority uint8
+ Mpls uint8
+ Addrs int32
+ Flags int32
+ Fmask int32
+ Pid int32
+ Seq int32
+ Errno int32
+ Inits uint32
+ Rmx RtMetrics
+}
+
+type RtMetrics struct {
+ Pksent uint64
+ Expire int64
+ Locks uint32
+ Mtu uint32
+ Refcnt uint32
+ Hopcount uint32
+ Recvpipe uint32
+ Sendpipe uint32
+ Ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Pad uint32
+}
+
+type Mclpool struct{}
+
+const (
+ SizeofBpfVersion = 0x4
+ SizeofBpfStat = 0x8
+ SizeofBpfProgram = 0x10
+ SizeofBpfInsn = 0x8
+ SizeofBpfHdr = 0x18
+)
+
+type BpfVersion struct {
+ Major uint16
+ Minor uint16
+}
+
+type BpfStat struct {
+ Recv uint32
+ Drop uint32
+}
+
+type BpfProgram struct {
+ Len uint32
+ Insns *BpfInsn
+}
+
+type BpfInsn struct {
+ Code uint16
+ Jt uint8
+ Jf uint8
+ K uint32
+}
+
+type BpfHdr struct {
+ Tstamp BpfTimeval
+ Caplen uint32
+ Datalen uint32
+ Hdrlen uint16
+ Ifidx uint16
+ Flowid uint16
+ Flags uint8
+ Drops uint8
+}
+
+type BpfTimeval struct {
+ Sec uint32
+ Usec uint32
+}
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]uint8
+ Ispeed int32
+ Ospeed int32
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+const (
+ AT_FDCWD = -0x64
+ AT_EACCESS = 0x1
+ AT_SYMLINK_NOFOLLOW = 0x2
+ AT_SYMLINK_FOLLOW = 0x4
+ AT_REMOVEDIR = 0x8
+)
+
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+const (
+ POLLERR = 0x8
+ POLLHUP = 0x10
+ POLLIN = 0x1
+ POLLNVAL = 0x20
+ POLLOUT = 0x4
+ POLLPRI = 0x2
+ POLLRDBAND = 0x80
+ POLLRDNORM = 0x40
+ POLLWRBAND = 0x100
+ POLLWRNORM = 0x4
+)
+
+type Sigset_t uint32
+
+type Utsname struct {
+ Sysname [256]byte
+ Nodename [256]byte
+ Release [256]byte
+ Version [256]byte
+ Machine [256]byte
+}
+
+const SizeofUvmexp = 0x158
+
+type Uvmexp struct {
+ Pagesize int32
+ Pagemask int32
+ Pageshift int32
+ Npages int32
+ Free int32
+ Active int32
+ Inactive int32
+ Paging int32
+ Wired int32
+ Zeropages int32
+ Reserve_pagedaemon int32
+ Reserve_kernel int32
+ Unused01 int32
+ Vnodepages int32
+ Vtextpages int32
+ Freemin int32
+ Freetarg int32
+ Inactarg int32
+ Wiredmax int32
+ Anonmin int32
+ Vtextmin int32
+ Vnodemin int32
+ Anonminpct int32
+ Vtextminpct int32
+ Vnodeminpct int32
+ Nswapdev int32
+ Swpages int32
+ Swpginuse int32
+ Swpgonly int32
+ Nswget int32
+ Nanon int32
+ Unused05 int32
+ Unused06 int32
+ Faults int32
+ Traps int32
+ Intrs int32
+ Swtch int32
+ Softs int32
+ Syscalls int32
+ Pageins int32
+ Unused07 int32
+ Unused08 int32
+ Pgswapin int32
+ Pgswapout int32
+ Forks int32
+ Forks_ppwait int32
+ Forks_sharevm int32
+ Pga_zerohit int32
+ Pga_zeromiss int32
+ Unused09 int32
+ Fltnoram int32
+ Fltnoanon int32
+ Fltnoamap int32
+ Fltpgwait int32
+ Fltpgrele int32
+ Fltrelck int32
+ Fltrelckok int32
+ Fltanget int32
+ Fltanretry int32
+ Fltamcopy int32
+ Fltnamap int32
+ Fltnomap int32
+ Fltlget int32
+ Fltget int32
+ Flt_anon int32
+ Flt_acow int32
+ Flt_obj int32
+ Flt_prcopy int32
+ Flt_przero int32
+ Pdwoke int32
+ Pdrevs int32
+ Pdswout int32
+ Pdfreed int32
+ Pdscans int32
+ Pdanscan int32
+ Pdobscan int32
+ Pdreact int32
+ Pdbusy int32
+ Pdpageouts int32
+ Pdpending int32
+ Pddeact int32
+ Unused11 int32
+ Unused12 int32
+ Unused13 int32
+ Fpswtch int32
+ Kmapent int32
+}
+
+const SizeofClockinfo = 0x10
+
+type Clockinfo struct {
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
index c1a9b83ad..0400747c6 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
@@ -480,3 +480,38 @@ const (
MOUNTEDOVER = 0x40000000
FILE_EXCEPTION = 0x60000070
)
+
+const (
+ TUNNEWPPA = 0x540001
+ TUNSETPPA = 0x540002
+
+ I_STR = 0x5308
+ I_POP = 0x5303
+ I_PUSH = 0x5302
+ I_LINK = 0x530c
+ I_UNLINK = 0x530d
+ I_PLINK = 0x5316
+ I_PUNLINK = 0x5317
+
+ IF_UNITSEL = -0x7ffb8cca
+)
+
+type strbuf struct {
+ Maxlen int32
+ Len int32
+ Buf *int8
+}
+
+type Strioctl struct {
+ Cmd int32
+ Timout int32
+ Len int32
+ Dp *int8
+}
+
+type Lifreq struct {
+ Name [32]int8
+ Lifru1 [4]byte
+ Type uint32
+ Lifru [336]byte
+}
diff --git a/sdk/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/sdk/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
index 4ab638cb9..aec1efcb3 100644
--- a/sdk/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
+++ b/sdk/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
@@ -339,7 +339,7 @@ type Statfs_t struct {
Flags uint64
}
-type Dirent struct {
+type direntLE struct {
Reclen uint16
Namlen uint16
Ino uint32
@@ -347,6 +347,15 @@ type Dirent struct {
Name [256]byte
}
+type Dirent struct {
+ Ino uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Name [256]uint8
+ _ [5]byte
+}
+
type FdSet struct {
Bits [64]int32
}
diff --git a/sdk/vendor/golang.org/x/sys/windows/setupapi_windows.go b/sdk/vendor/golang.org/x/sys/windows/setupapi_windows.go
index 14027da3f..f8126482f 100644
--- a/sdk/vendor/golang.org/x/sys/windows/setupapi_windows.go
+++ b/sdk/vendor/golang.org/x/sys/windows/setupapi_windows.go
@@ -296,7 +296,7 @@ const (
// Flag to indicate that the sorting from the INF file should be used.
DI_INF_IS_SORTED DI_FLAGS = 0x00008000
- // Flag to indicate that only the the INF specified by SP_DEVINSTALL_PARAMS.DriverPath should be searched.
+ // Flag to indicate that only the INF specified by SP_DEVINSTALL_PARAMS.DriverPath should be searched.
DI_ENUMSINGLEINF DI_FLAGS = 0x00010000
// Flag that prevents ConfigMgr from removing/re-enumerating devices during device
diff --git a/sdk/vendor/golang.org/x/sys/windows/syscall.go b/sdk/vendor/golang.org/x/sys/windows/syscall.go
index 72074d582..8732cdb95 100644
--- a/sdk/vendor/golang.org/x/sys/windows/syscall.go
+++ b/sdk/vendor/golang.org/x/sys/windows/syscall.go
@@ -30,8 +30,6 @@ import (
"strings"
"syscall"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
@@ -83,13 +81,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
- var s []byte
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(s)
+ return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.
diff --git a/sdk/vendor/golang.org/x/sys/windows/syscall_windows.go b/sdk/vendor/golang.org/x/sys/windows/syscall_windows.go
index e27913817..a49853e9d 100644
--- a/sdk/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/sdk/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -138,13 +138,7 @@ func UTF16PtrToString(p *uint16) string {
ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))
}
- var s []uint16
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(utf16.Decode(s))
+ return string(utf16.Decode(unsafe.Slice(p, n)))
}
func Getpagesize() int { return 4096 }
@@ -364,6 +358,16 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
//sys GetActiveProcessorCount(groupNumber uint16) (ret uint32)
//sys GetMaximumProcessorCount(groupNumber uint16) (ret uint32)
+//sys EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) = user32.EnumWindows
+//sys EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) = user32.EnumChildWindows
+//sys GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) = user32.GetClassNameW
+//sys GetDesktopWindow() (hwnd HWND) = user32.GetDesktopWindow
+//sys GetForegroundWindow() (hwnd HWND) = user32.GetForegroundWindow
+//sys IsWindow(hwnd HWND) (isWindow bool) = user32.IsWindow
+//sys IsWindowUnicode(hwnd HWND) (isUnicode bool) = user32.IsWindowUnicode
+//sys IsWindowVisible(hwnd HWND) (isVisible bool) = user32.IsWindowVisible
+//sys GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) = user32.GetGUIThreadInfo
+//sys GetLargePageMinimum() (size uintptr)
// Volume Management Functions
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
@@ -439,6 +443,10 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
//sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
+// Desktop Window Manager API (Dwmapi)
+//sys DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmGetWindowAttribute
+//sys DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmSetWindowAttribute
+
// syscall interface implementation for other packages
// GetCurrentProcess returns the handle for the current process.
@@ -748,7 +756,7 @@ func Utimes(path string, tv []Timeval) (err error) {
if e != nil {
return e
}
- defer Close(h)
+ defer CloseHandle(h)
a := NsecToFiletime(tv[0].Nanoseconds())
w := NsecToFiletime(tv[1].Nanoseconds())
return SetFileTime(h, nil, &a, &w)
@@ -768,7 +776,7 @@ func UtimesNano(path string, ts []Timespec) (err error) {
if e != nil {
return e
}
- defer Close(h)
+ defer CloseHandle(h)
a := NsecToFiletime(TimespecToNsec(ts[0]))
w := NsecToFiletime(TimespecToNsec(ts[1]))
return SetFileTime(h, nil, &a, &w)
@@ -1108,9 +1116,13 @@ func Shutdown(fd Handle, how int) (err error) {
}
func WSASendto(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to Sockaddr, overlapped *Overlapped, croutine *byte) (err error) {
- rsa, l, err := to.sockaddr()
- if err != nil {
- return err
+ var rsa unsafe.Pointer
+ var l int32
+ if to != nil {
+ rsa, l, err = to.sockaddr()
+ if err != nil {
+ return err
+ }
}
return WSASendTo(s, bufs, bufcnt, sent, flags, (*RawSockaddrAny)(unsafe.Pointer(rsa)), l, overlapped, croutine)
}
diff --git a/sdk/vendor/golang.org/x/sys/windows/types_windows.go b/sdk/vendor/golang.org/x/sys/windows/types_windows.go
index f9eaca528..0c4add974 100644
--- a/sdk/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/sdk/vendor/golang.org/x/sys/windows/types_windows.go
@@ -3213,3 +3213,48 @@ type ModuleInfo struct {
}
const ALL_PROCESSOR_GROUPS = 0xFFFF
+
+type Rect struct {
+ Left int32
+ Top int32
+ Right int32
+ Bottom int32
+}
+
+type GUIThreadInfo struct {
+ Size uint32
+ Flags uint32
+ Active HWND
+ Focus HWND
+ Capture HWND
+ MenuOwner HWND
+ MoveSize HWND
+ CaretHandle HWND
+ CaretRect Rect
+}
+
+const (
+ DWMWA_NCRENDERING_ENABLED = 1
+ DWMWA_NCRENDERING_POLICY = 2
+ DWMWA_TRANSITIONS_FORCEDISABLED = 3
+ DWMWA_ALLOW_NCPAINT = 4
+ DWMWA_CAPTION_BUTTON_BOUNDS = 5
+ DWMWA_NONCLIENT_RTL_LAYOUT = 6
+ DWMWA_FORCE_ICONIC_REPRESENTATION = 7
+ DWMWA_FLIP3D_POLICY = 8
+ DWMWA_EXTENDED_FRAME_BOUNDS = 9
+ DWMWA_HAS_ICONIC_BITMAP = 10
+ DWMWA_DISALLOW_PEEK = 11
+ DWMWA_EXCLUDED_FROM_PEEK = 12
+ DWMWA_CLOAK = 13
+ DWMWA_CLOAKED = 14
+ DWMWA_FREEZE_REPRESENTATION = 15
+ DWMWA_PASSIVE_UPDATE_MODE = 16
+ DWMWA_USE_HOSTBACKDROPBRUSH = 17
+ DWMWA_USE_IMMERSIVE_DARK_MODE = 20
+ DWMWA_WINDOW_CORNER_PREFERENCE = 33
+ DWMWA_BORDER_COLOR = 34
+ DWMWA_CAPTION_COLOR = 35
+ DWMWA_TEXT_COLOR = 36
+ DWMWA_VISIBLE_FRAME_BORDER_THICKNESS = 37
+)
diff --git a/sdk/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/sdk/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 52d4742cb..ac60052e4 100644
--- a/sdk/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/sdk/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -40,6 +40,7 @@ var (
modadvapi32 = NewLazySystemDLL("advapi32.dll")
modcrypt32 = NewLazySystemDLL("crypt32.dll")
moddnsapi = NewLazySystemDLL("dnsapi.dll")
+ moddwmapi = NewLazySystemDLL("dwmapi.dll")
modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
modkernel32 = NewLazySystemDLL("kernel32.dll")
modmswsock = NewLazySystemDLL("mswsock.dll")
@@ -175,6 +176,8 @@ var (
procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
+ procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute")
+ procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute")
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
@@ -249,6 +252,7 @@ var (
procGetFileType = modkernel32.NewProc("GetFileType")
procGetFinalPathNameByHandleW = modkernel32.NewProc("GetFinalPathNameByHandleW")
procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
+ procGetLargePageMinimum = modkernel32.NewProc("GetLargePageMinimum")
procGetLastError = modkernel32.NewProc("GetLastError")
procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
@@ -444,9 +448,18 @@ var (
procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
procShellExecuteW = modshell32.NewProc("ShellExecuteW")
+ procEnumChildWindows = moduser32.NewProc("EnumChildWindows")
+ procEnumWindows = moduser32.NewProc("EnumWindows")
procExitWindowsEx = moduser32.NewProc("ExitWindowsEx")
+ procGetClassNameW = moduser32.NewProc("GetClassNameW")
+ procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow")
+ procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow")
+ procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo")
procGetShellWindow = moduser32.NewProc("GetShellWindow")
procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId")
+ procIsWindow = moduser32.NewProc("IsWindow")
+ procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode")
+ procIsWindowVisible = moduser32.NewProc("IsWindowVisible")
procMessageBoxW = moduser32.NewProc("MessageBoxW")
procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
@@ -1525,6 +1538,22 @@ func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
return
}
+func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
+ r0, _, _ := syscall.Syscall6(procDwmGetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
+ r0, _, _ := syscall.Syscall6(procDwmSetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
if r0 != 0 {
@@ -2152,6 +2181,12 @@ func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (
return
}
+func GetLargePageMinimum() (size uintptr) {
+ r0, _, _ := syscall.Syscall(procGetLargePageMinimum.Addr(), 0, 0, 0, 0)
+ size = uintptr(r0)
+ return
+}
+
func GetLastError() (lasterr error) {
r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0)
if r0 != 0 {
@@ -3802,6 +3837,19 @@ func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *ui
return
}
+func EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) {
+ syscall.Syscall(procEnumChildWindows.Addr(), 3, uintptr(hwnd), uintptr(enumFunc), uintptr(param))
+ return
+}
+
+func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) {
+ r1, _, e1 := syscall.Syscall(procEnumWindows.Addr(), 2, uintptr(enumFunc), uintptr(param), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func ExitWindowsEx(flags uint32, reason uint32) (err error) {
r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0)
if r1 == 0 {
@@ -3810,6 +3858,35 @@ func ExitWindowsEx(flags uint32, reason uint32) (err error) {
return
}
+func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetClassNameW.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount))
+ copied = int32(r0)
+ if copied == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetDesktopWindow() (hwnd HWND) {
+ r0, _, _ := syscall.Syscall(procGetDesktopWindow.Addr(), 0, 0, 0, 0)
+ hwnd = HWND(r0)
+ return
+}
+
+func GetForegroundWindow() (hwnd HWND) {
+ r0, _, _ := syscall.Syscall(procGetForegroundWindow.Addr(), 0, 0, 0, 0)
+ hwnd = HWND(r0)
+ return
+}
+
+func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetGUIThreadInfo.Addr(), 2, uintptr(thread), uintptr(unsafe.Pointer(info)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func GetShellWindow() (shellWindow HWND) {
r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0)
shellWindow = HWND(r0)
@@ -3825,6 +3902,24 @@ func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
return
}
+func IsWindow(hwnd HWND) (isWindow bool) {
+ r0, _, _ := syscall.Syscall(procIsWindow.Addr(), 1, uintptr(hwnd), 0, 0)
+ isWindow = r0 != 0
+ return
+}
+
+func IsWindowUnicode(hwnd HWND) (isUnicode bool) {
+ r0, _, _ := syscall.Syscall(procIsWindowUnicode.Addr(), 1, uintptr(hwnd), 0, 0)
+ isUnicode = r0 != 0
+ return
+}
+
+func IsWindowVisible(hwnd HWND) (isVisible bool) {
+ r0, _, _ := syscall.Syscall(procIsWindowVisible.Addr(), 1, uintptr(hwnd), 0, 0)
+ isVisible = r0 != 0
+ return
+}
+
func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
ret = int32(r0)
diff --git a/sdk/vendor/golang.org/x/text/unicode/bidi/trieval.go b/sdk/vendor/golang.org/x/text/unicode/bidi/trieval.go
index 4c459c4b7..6a796e221 100644
--- a/sdk/vendor/golang.org/x/text/unicode/bidi/trieval.go
+++ b/sdk/vendor/golang.org/x/text/unicode/bidi/trieval.go
@@ -37,18 +37,6 @@ const (
unknownClass = ^Class(0)
)
-var controlToClass = map[rune]Class{
- 0x202D: LRO, // LeftToRightOverride,
- 0x202E: RLO, // RightToLeftOverride,
- 0x202A: LRE, // LeftToRightEmbedding,
- 0x202B: RLE, // RightToLeftEmbedding,
- 0x202C: PDF, // PopDirectionalFormat,
- 0x2066: LRI, // LeftToRightIsolate,
- 0x2067: RLI, // RightToLeftIsolate,
- 0x2068: FSI, // FirstStrongIsolate,
- 0x2069: PDI, // PopDirectionalIsolate,
-}
-
// A trie entry has the following bits:
// 7..5 XOR mask for brackets
// 4 1: Bracket open, 0: Bracket close
diff --git a/sdk/vendor/google.golang.org/grpc/attributes/attributes.go b/sdk/vendor/google.golang.org/grpc/attributes/attributes.go
index ae13ddac1..02f5dc531 100644
--- a/sdk/vendor/google.golang.org/grpc/attributes/attributes.go
+++ b/sdk/vendor/google.golang.org/grpc/attributes/attributes.go
@@ -19,7 +19,7 @@
// Package attributes defines a generic key/value store used in various gRPC
// components.
//
-// Experimental
+// # Experimental
//
// Notice: This package is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/sdk/vendor/google.golang.org/grpc/backoff.go b/sdk/vendor/google.golang.org/grpc/backoff.go
index 542594f5c..29475e31c 100644
--- a/sdk/vendor/google.golang.org/grpc/backoff.go
+++ b/sdk/vendor/google.golang.org/grpc/backoff.go
@@ -48,7 +48,7 @@ type BackoffConfig struct {
// here for more details:
// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/sdk/vendor/google.golang.org/grpc/balancer/balancer.go b/sdk/vendor/google.golang.org/grpc/balancer/balancer.go
index f7a7697ca..392b21fb2 100644
--- a/sdk/vendor/google.golang.org/grpc/balancer/balancer.go
+++ b/sdk/vendor/google.golang.org/grpc/balancer/balancer.go
@@ -110,6 +110,11 @@ type SubConn interface {
UpdateAddresses([]resolver.Address)
// Connect starts the connecting for this SubConn.
Connect()
+ // GetOrBuildProducer returns a reference to the existing Producer for this
+ // ProducerBuilder in this SubConn, or, if one does not currently exist,
+ // creates a new one and returns it. Returns a close function which must
+ // be called when the Producer is no longer needed.
+ GetOrBuildProducer(ProducerBuilder) (p Producer, close func())
}
// NewSubConnOptions contains options to create new SubConn.
@@ -244,7 +249,7 @@ type DoneInfo struct {
// ServerLoad is the load received from server. It's usually sent as part of
// trailing metadata.
//
- // The only supported type now is *orca_v1.LoadReport.
+ // The only supported type now is *orca_v3.LoadReport.
ServerLoad interface{}
}
@@ -372,55 +377,20 @@ type ClientConnState struct {
// problem with the provided name resolver data.
var ErrBadResolverState = errors.New("bad resolver state")
-// ConnectivityStateEvaluator takes the connectivity states of multiple SubConns
-// and returns one aggregated connectivity state.
-//
-// It's not thread safe.
-type ConnectivityStateEvaluator struct {
- numReady uint64 // Number of addrConns in ready state.
- numConnecting uint64 // Number of addrConns in connecting state.
- numTransientFailure uint64 // Number of addrConns in transient failure state.
- numIdle uint64 // Number of addrConns in idle state.
+// A ProducerBuilder is a simple constructor for a Producer. It is used by the
+// SubConn to create producers when needed.
+type ProducerBuilder interface {
+ // Build creates a Producer. The first parameter is always a
+ // grpc.ClientConnInterface (a type to allow creating RPCs/streams on the
+ // associated SubConn), but is declared as interface{} to avoid a
+ // dependency cycle. Should also return a close function that will be
+ // called when all references to the Producer have been given up.
+ Build(grpcClientConnInterface interface{}) (p Producer, close func())
}
-// RecordTransition records state change happening in subConn and based on that
-// it evaluates what aggregated state should be.
-//
-// - If at least one SubConn in Ready, the aggregated state is Ready;
-// - Else if at least one SubConn in Connecting, the aggregated state is Connecting;
-// - Else if at least one SubConn is TransientFailure, the aggregated state is Transient Failure;
-// - Else if at least one SubConn is Idle, the aggregated state is Idle;
-// - Else there are no subconns and the aggregated state is Transient Failure
-//
-// Shutdown is not considered.
-func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState connectivity.State) connectivity.State {
- // Update counters.
- for idx, state := range []connectivity.State{oldState, newState} {
- updateVal := 2*uint64(idx) - 1 // -1 for oldState and +1 for new.
- switch state {
- case connectivity.Ready:
- cse.numReady += updateVal
- case connectivity.Connecting:
- cse.numConnecting += updateVal
- case connectivity.TransientFailure:
- cse.numTransientFailure += updateVal
- case connectivity.Idle:
- cse.numIdle += updateVal
- }
- }
-
- // Evaluate.
- if cse.numReady > 0 {
- return connectivity.Ready
- }
- if cse.numConnecting > 0 {
- return connectivity.Connecting
- }
- if cse.numTransientFailure > 0 {
- return connectivity.TransientFailure
- }
- if cse.numIdle > 0 {
- return connectivity.Idle
- }
- return connectivity.TransientFailure
+// A Producer is a type shared among potentially many consumers. It is
+// associated with a SubConn, and an implementation will typically contain
+// other methods to provide additional functionality, e.g. configuration or
+// subscription registration.
+type Producer interface {
}
diff --git a/sdk/vendor/google.golang.org/grpc/balancer/base/balancer.go b/sdk/vendor/google.golang.org/grpc/balancer/base/balancer.go
index e8dfc828a..3929c26d3 100644
--- a/sdk/vendor/google.golang.org/grpc/balancer/base/balancer.go
+++ b/sdk/vendor/google.golang.org/grpc/balancer/base/balancer.go
@@ -157,8 +157,8 @@ func (b *baseBalancer) mergeErrors() error {
// regeneratePicker takes a snapshot of the balancer, and generates a picker
// from it. The picker is
-// - errPicker if the balancer is in TransientFailure,
-// - built by the pickerBuilder with all READY SubConns otherwise.
+// - errPicker if the balancer is in TransientFailure,
+// - built by the pickerBuilder with all READY SubConns otherwise.
func (b *baseBalancer) regeneratePicker() {
if b.state == connectivity.TransientFailure {
b.picker = NewErrPicker(b.mergeErrors())
diff --git a/sdk/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go b/sdk/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go
new file mode 100644
index 000000000..c33413581
--- /dev/null
+++ b/sdk/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go
@@ -0,0 +1,74 @@
+/*
+ *
+ * Copyright 2022 gRPC 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 balancer
+
+import "google.golang.org/grpc/connectivity"
+
+// ConnectivityStateEvaluator takes the connectivity states of multiple SubConns
+// and returns one aggregated connectivity state.
+//
+// It's not thread safe.
+type ConnectivityStateEvaluator struct {
+ numReady uint64 // Number of addrConns in ready state.
+ numConnecting uint64 // Number of addrConns in connecting state.
+ numTransientFailure uint64 // Number of addrConns in transient failure state.
+ numIdle uint64 // Number of addrConns in idle state.
+}
+
+// RecordTransition records state change happening in subConn and based on that
+// it evaluates what aggregated state should be.
+//
+// - If at least one SubConn in Ready, the aggregated state is Ready;
+// - Else if at least one SubConn in Connecting, the aggregated state is Connecting;
+// - Else if at least one SubConn is Idle, the aggregated state is Idle;
+// - Else if at least one SubConn is TransientFailure (or there are no SubConns), the aggregated state is Transient Failure.
+//
+// Shutdown is not considered.
+func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState connectivity.State) connectivity.State {
+ // Update counters.
+ for idx, state := range []connectivity.State{oldState, newState} {
+ updateVal := 2*uint64(idx) - 1 // -1 for oldState and +1 for new.
+ switch state {
+ case connectivity.Ready:
+ cse.numReady += updateVal
+ case connectivity.Connecting:
+ cse.numConnecting += updateVal
+ case connectivity.TransientFailure:
+ cse.numTransientFailure += updateVal
+ case connectivity.Idle:
+ cse.numIdle += updateVal
+ }
+ }
+ return cse.CurrentState()
+}
+
+// CurrentState returns the current aggregate conn state by evaluating the counters
+func (cse *ConnectivityStateEvaluator) CurrentState() connectivity.State {
+ // Evaluate.
+ if cse.numReady > 0 {
+ return connectivity.Ready
+ }
+ if cse.numConnecting > 0 {
+ return connectivity.Connecting
+ }
+ if cse.numIdle > 0 {
+ return connectivity.Idle
+ }
+ return connectivity.TransientFailure
+}
diff --git a/sdk/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go b/sdk/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
index 274eb2f85..f7031ad22 100644
--- a/sdk/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
+++ b/sdk/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
@@ -22,7 +22,7 @@
package roundrobin
import (
- "sync"
+ "sync/atomic"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/balancer/base"
@@ -60,7 +60,7 @@ func (*rrPickerBuilder) Build(info base.PickerBuildInfo) balancer.Picker {
// Start at a random index, as the same RR balancer rebuilds a new
// picker when SubConn states change, and we don't want to apply excess
// load to the first server in the list.
- next: grpcrand.Intn(len(scs)),
+ next: uint32(grpcrand.Intn(len(scs))),
}
}
@@ -69,15 +69,13 @@ type rrPicker struct {
// created. The slice is immutable. Each Get() will do a round robin
// selection from it and return the selected SubConn.
subConns []balancer.SubConn
-
- mu sync.Mutex
- next int
+ next uint32
}
func (p *rrPicker) Pick(balancer.PickInfo) (balancer.PickResult, error) {
- p.mu.Lock()
- sc := p.subConns[p.next]
- p.next = (p.next + 1) % len(p.subConns)
- p.mu.Unlock()
+ subConnsLen := uint32(len(p.subConns))
+ nextIndex := atomic.AddUint32(&p.next, 1)
+
+ sc := p.subConns[nextIndex%subConnsLen]
return balancer.PickResult{SubConn: sc}, nil
}
diff --git a/sdk/vendor/google.golang.org/grpc/balancer_conn_wrappers.go b/sdk/vendor/google.golang.org/grpc/balancer_conn_wrappers.go
index b1c23eaae..0359956d3 100644
--- a/sdk/vendor/google.golang.org/grpc/balancer_conn_wrappers.go
+++ b/sdk/vendor/google.golang.org/grpc/balancer_conn_wrappers.go
@@ -19,17 +19,20 @@
package grpc
import (
+ "context"
"fmt"
"strings"
"sync"
"google.golang.org/grpc/balancer"
+ "google.golang.org/grpc/codes"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/internal/balancer/gracefulswitch"
"google.golang.org/grpc/internal/buffer"
"google.golang.org/grpc/internal/channelz"
"google.golang.org/grpc/internal/grpcsync"
"google.golang.org/grpc/resolver"
+ "google.golang.org/grpc/status"
)
// ccBalancerWrapper sits between the ClientConn and the Balancer.
@@ -305,7 +308,7 @@ func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer
channelz.Warningf(logger, ccb.cc.channelzID, "acBalancerWrapper: NewSubConn: failed to newAddrConn: %v", err)
return nil, err
}
- acbw := &acBalancerWrapper{ac: ac}
+ acbw := &acBalancerWrapper{ac: ac, producers: make(map[balancer.ProducerBuilder]*refCountedProducer)}
acbw.ac.mu.Lock()
ac.acbw = acbw
acbw.ac.mu.Unlock()
@@ -359,8 +362,9 @@ func (ccb *ccBalancerWrapper) Target() string {
// acBalancerWrapper is a wrapper on top of ac for balancers.
// It implements balancer.SubConn interface.
type acBalancerWrapper struct {
- mu sync.Mutex
- ac *addrConn
+ mu sync.Mutex
+ ac *addrConn
+ producers map[balancer.ProducerBuilder]*refCountedProducer
}
func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) {
@@ -414,3 +418,64 @@ func (acbw *acBalancerWrapper) getAddrConn() *addrConn {
defer acbw.mu.Unlock()
return acbw.ac
}
+
+var errSubConnNotReady = status.Error(codes.Unavailable, "SubConn not currently connected")
+
+// NewStream begins a streaming RPC on the addrConn. If the addrConn is not
+// ready, returns errSubConnNotReady.
+func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) {
+ transport := acbw.ac.getReadyTransport()
+ if transport == nil {
+ return nil, errSubConnNotReady
+ }
+ return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...)
+}
+
+// Invoke performs a unary RPC. If the addrConn is not ready, returns
+// errSubConnNotReady.
+func (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...CallOption) error {
+ cs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...)
+ if err != nil {
+ return err
+ }
+ if err := cs.SendMsg(args); err != nil {
+ return err
+ }
+ return cs.RecvMsg(reply)
+}
+
+type refCountedProducer struct {
+ producer balancer.Producer
+ refs int // number of current refs to the producer
+ close func() // underlying producer's close function
+}
+
+func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) (balancer.Producer, func()) {
+ acbw.mu.Lock()
+ defer acbw.mu.Unlock()
+
+ // Look up existing producer from this builder.
+ pData := acbw.producers[pb]
+ if pData == nil {
+ // Not found; create a new one and add it to the producers map.
+ p, close := pb.Build(acbw)
+ pData = &refCountedProducer{producer: p, close: close}
+ acbw.producers[pb] = pData
+ }
+ // Account for this new reference.
+ pData.refs++
+
+ // Return a cleanup function wrapped in a OnceFunc to remove this reference
+ // and delete the refCountedProducer from the map if the total reference
+ // count goes to zero.
+ unref := func() {
+ acbw.mu.Lock()
+ pData.refs--
+ if pData.refs == 0 {
+ defer pData.close() // Run outside the acbw mutex
+ delete(acbw.producers, pb)
+ }
+ acbw.mu.Unlock()
+ }
+ return pData.producer, grpcsync.OnceFunc(unref)
+}
diff --git a/sdk/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/sdk/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
index ed75290cd..64a232f28 100644
--- a/sdk/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
+++ b/sdk/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
@@ -261,6 +261,7 @@ type GrpcLogEntry struct {
// according to the type of the log entry.
//
// Types that are assignable to Payload:
+ //
// *GrpcLogEntry_ClientHeader
// *GrpcLogEntry_ServerHeader
// *GrpcLogEntry_Message
@@ -694,12 +695,12 @@ func (x *Message) GetData() []byte {
// Header keys added by gRPC are omitted. To be more specific,
// implementations will not log the following entries, and this is
// not to be treated as a truncation:
-// - entries handled by grpc that are not user visible, such as those
-// that begin with 'grpc-' (with exception of grpc-trace-bin)
-// or keys like 'lb-token'
-// - transport specific entries, including but not limited to:
-// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc
-// - entries added for call credentials
+// - entries handled by grpc that are not user visible, such as those
+// that begin with 'grpc-' (with exception of grpc-trace-bin)
+// or keys like 'lb-token'
+// - transport specific entries, including but not limited to:
+// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc
+// - entries added for call credentials
//
// Implementations must always log grpc-trace-bin if it is present.
// Practically speaking it will only be visible on server side because
diff --git a/sdk/vendor/google.golang.org/grpc/channelz/channelz.go b/sdk/vendor/google.golang.org/grpc/channelz/channelz.go
index a220c47c5..32b7fa579 100644
--- a/sdk/vendor/google.golang.org/grpc/channelz/channelz.go
+++ b/sdk/vendor/google.golang.org/grpc/channelz/channelz.go
@@ -23,7 +23,7 @@
// https://github.com/grpc/proposal/blob/master/A14-channelz.md, is provided by
// the `internal/channelz` package.
//
-// Experimental
+// # Experimental
//
// Notice: All APIs in this package are experimental and may be removed in a
// later release.
diff --git a/sdk/vendor/google.golang.org/grpc/clientconn.go b/sdk/vendor/google.golang.org/grpc/clientconn.go
index 0d21f2210..422639c79 100644
--- a/sdk/vendor/google.golang.org/grpc/clientconn.go
+++ b/sdk/vendor/google.golang.org/grpc/clientconn.go
@@ -503,7 +503,7 @@ type ClientConn struct {
// WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or
// ctx expires. A true value is returned in former case and false in latter.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -522,7 +522,7 @@ func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connec
// GetState returns the connectivity.State of ClientConn.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a later
// release.
@@ -534,7 +534,7 @@ func (cc *ClientConn) GetState() connectivity.State {
// the channel is idle. Does not wait for the connection attempts to begin
// before returning.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a later
// release.
@@ -712,8 +712,8 @@ func (cc *ClientConn) newAddrConn(addrs []resolver.Address, opts balancer.NewSub
ac.ctx, ac.cancel = context.WithCancel(cc.ctx)
// Track ac in cc. This needs to be done before any getTransport(...) is called.
cc.mu.Lock()
+ defer cc.mu.Unlock()
if cc.conns == nil {
- cc.mu.Unlock()
return nil, ErrClientConnClosing
}
@@ -732,7 +732,6 @@ func (cc *ClientConn) newAddrConn(addrs []resolver.Address, opts balancer.NewSub
})
cc.conns[ac] = struct{}{}
- cc.mu.Unlock()
return ac, nil
}
@@ -762,7 +761,7 @@ func (cc *ClientConn) channelzMetric() *channelz.ChannelInternalMetric {
// Target returns the target string of the ClientConn.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -832,9 +831,9 @@ func equalAddresses(a, b []resolver.Address) bool {
//
// If ac is Ready, it checks whether current connected address of ac is in the
// new addrs list.
-// - If true, it updates ac.addrs and returns true. The ac will keep using
-// the existing connection.
-// - If false, it does nothing and returns false.
+// - If true, it updates ac.addrs and returns true. The ac will keep using
+// the existing connection.
+// - If false, it does nothing and returns false.
func (ac *addrConn) tryUpdateAddrs(addrs []resolver.Address) bool {
ac.mu.Lock()
defer ac.mu.Unlock()
@@ -999,7 +998,7 @@ func (cc *ClientConn) resolveNow(o resolver.ResolveNowOptions) {
// However, if a previously unavailable network becomes available, this may be
// used to trigger an immediate reconnect.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -1229,38 +1228,33 @@ func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.T
// address was not successfully connected, or updates ac appropriately with the
// new transport.
func (ac *addrConn) createTransport(addr resolver.Address, copts transport.ConnectOptions, connectDeadline time.Time) error {
- // TODO: Delete prefaceReceived and move the logic to wait for it into the
- // transport.
- prefaceReceived := grpcsync.NewEvent()
- connClosed := grpcsync.NewEvent()
-
addr.ServerName = ac.cc.getServerName(addr)
hctx, hcancel := context.WithCancel(ac.ctx)
- hcStarted := false // protected by ac.mu
- onClose := func() {
+ onClose := grpcsync.OnceFunc(func() {
ac.mu.Lock()
defer ac.mu.Unlock()
- defer connClosed.Fire()
- defer hcancel()
- if !hcStarted || hctx.Err() != nil {
- // We didn't start the health check or set the state to READY, so
- // no need to do anything else here.
- //
- // OR, we have already cancelled the health check context, meaning
- // we have already called onClose once for this transport. In this
- // case it would be dangerous to clear the transport and update the
- // state, since there may be a new transport in this addrConn.
+ if ac.state == connectivity.Shutdown {
+ // Already shut down. tearDown() already cleared the transport and
+ // canceled hctx via ac.ctx, and we expected this connection to be
+ // closed, so do nothing here.
+ return
+ }
+ hcancel()
+ if ac.transport == nil {
+ // We're still connecting to this address, which could error. Do
+ // not update the connectivity state or resolve; these will happen
+ // at the end of the tryAllAddrs connection loop in the event of an
+ // error.
return
}
ac.transport = nil
- // Refresh the name resolver
+ // Refresh the name resolver on any connection loss.
ac.cc.resolveNow(resolver.ResolveNowOptions{})
- if ac.state != connectivity.Shutdown {
- ac.updateConnectivityState(connectivity.Idle, nil)
- }
- }
-
+ // Always go idle and wait for the LB policy to initiate a new
+ // connection attempt.
+ ac.updateConnectivityState(connectivity.Idle, nil)
+ })
onGoAway := func(r transport.GoAwayReason) {
ac.mu.Lock()
ac.adjustParams(r)
@@ -1272,7 +1266,7 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne
defer cancel()
copts.ChannelzParentID = ac.channelzID
- newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, func() { prefaceReceived.Fire() }, onGoAway, onClose)
+ newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onGoAway, onClose)
if err != nil {
// newTr is either nil, or closed.
hcancel()
@@ -1280,60 +1274,34 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne
return err
}
- select {
- case <-connectCtx.Done():
- // We didn't get the preface in time.
+ ac.mu.Lock()
+ defer ac.mu.Unlock()
+ if ac.state == connectivity.Shutdown {
+ // This can happen if the subConn was removed while in `Connecting`
+ // state. tearDown() would have set the state to `Shutdown`, but
+ // would not have closed the transport since ac.transport would not
+ // have been set at that point.
+ //
+ // We run this in a goroutine because newTr.Close() calls onClose()
+ // inline, which requires locking ac.mu.
+ //
// The error we pass to Close() is immaterial since there are no open
// streams at this point, so no trailers with error details will be sent
// out. We just need to pass a non-nil error.
- newTr.Close(transport.ErrConnClosing)
- if connectCtx.Err() == context.DeadlineExceeded {
- err := errors.New("failed to receive server preface within timeout")
- channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %s: %v", addr, err)
- return err
- }
+ go newTr.Close(transport.ErrConnClosing)
return nil
- case <-prefaceReceived.Done():
- // We got the preface - huzzah! things are good.
- ac.mu.Lock()
- defer ac.mu.Unlock()
- if connClosed.HasFired() {
- // onClose called first; go idle but do nothing else.
- if ac.state != connectivity.Shutdown {
- ac.updateConnectivityState(connectivity.Idle, nil)
- }
- return nil
- }
- if ac.state == connectivity.Shutdown {
- // This can happen if the subConn was removed while in `Connecting`
- // state. tearDown() would have set the state to `Shutdown`, but
- // would not have closed the transport since ac.transport would not
- // been set at that point.
- //
- // We run this in a goroutine because newTr.Close() calls onClose()
- // inline, which requires locking ac.mu.
- //
- // The error we pass to Close() is immaterial since there are no open
- // streams at this point, so no trailers with error details will be sent
- // out. We just need to pass a non-nil error.
- go newTr.Close(transport.ErrConnClosing)
- return nil
- }
- ac.curAddr = addr
- ac.transport = newTr
- hcStarted = true
- ac.startHealthCheck(hctx) // Will set state to READY if appropriate.
+ }
+ if hctx.Err() != nil {
+ // onClose was already called for this connection, but the connection
+ // was successfully established first. Consider it a success and set
+ // the new state to Idle.
+ ac.updateConnectivityState(connectivity.Idle, nil)
return nil
- case <-connClosed.Done():
- // The transport has already closed. If we received the preface, too,
- // this is not an error.
- select {
- case <-prefaceReceived.Done():
- return nil
- default:
- return errors.New("connection closed before server preface received")
- }
}
+ ac.curAddr = addr
+ ac.transport = newTr
+ ac.startHealthCheck(hctx) // Will set state to READY if appropriate.
+ return nil
}
// startHealthCheck starts the health checking stream (RPC) to watch the health
@@ -1584,7 +1552,7 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) {
channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", cc.target, err)
} else {
channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget)
- rb = cc.getResolver(parsedTarget.Scheme)
+ rb = cc.getResolver(parsedTarget.URL.Scheme)
if rb != nil {
cc.parsedTarget = parsedTarget
return rb, nil
@@ -1605,9 +1573,9 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) {
return nil, err
}
channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget)
- rb = cc.getResolver(parsedTarget.Scheme)
+ rb = cc.getResolver(parsedTarget.URL.Scheme)
if rb == nil {
- return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.Scheme)
+ return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.URL.Scheme)
}
cc.parsedTarget = parsedTarget
return rb, nil
diff --git a/sdk/vendor/google.golang.org/grpc/credentials/credentials.go b/sdk/vendor/google.golang.org/grpc/credentials/credentials.go
index 96ff1877e..5feac3aa0 100644
--- a/sdk/vendor/google.golang.org/grpc/credentials/credentials.go
+++ b/sdk/vendor/google.golang.org/grpc/credentials/credentials.go
@@ -36,16 +36,16 @@ import (
// PerRPCCredentials defines the common interface for the credentials which need to
// attach security information to every RPC (e.g., oauth2).
type PerRPCCredentials interface {
- // GetRequestMetadata gets the current request metadata, refreshing
- // tokens if required. This should be called by the transport layer on
- // each request, and the data should be populated in headers or other
- // context. If a status code is returned, it will be used as the status
- // for the RPC. uri is the URI of the entry point for the request.
- // When supported by the underlying implementation, ctx can be used for
- // timeout and cancellation. Additionally, RequestInfo data will be
- // available via ctx to this call.
- // TODO(zhaoq): Define the set of the qualified keys instead of leaving
- // it as an arbitrary string.
+ // GetRequestMetadata gets the current request metadata, refreshing tokens
+ // if required. This should be called by the transport layer on each
+ // request, and the data should be populated in headers or other
+ // context. If a status code is returned, it will be used as the status for
+ // the RPC (restricted to an allowable set of codes as defined by gRFC
+ // A54). uri is the URI of the entry point for the request. When supported
+ // by the underlying implementation, ctx can be used for timeout and
+ // cancellation. Additionally, RequestInfo data will be available via ctx
+ // to this call. TODO(zhaoq): Define the set of the qualified keys instead
+ // of leaving it as an arbitrary string.
GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
// RequireTransportSecurity indicates whether the credentials requires
// transport security.
diff --git a/sdk/vendor/google.golang.org/grpc/credentials/tls.go b/sdk/vendor/google.golang.org/grpc/credentials/tls.go
index 784822d05..ce2bbc10a 100644
--- a/sdk/vendor/google.golang.org/grpc/credentials/tls.go
+++ b/sdk/vendor/google.golang.org/grpc/credentials/tls.go
@@ -195,7 +195,7 @@ func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error
// TLSChannelzSecurityValue defines the struct that TLS protocol should return
// from GetSecurityValue(), containing security info like cipher and certificate used.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/sdk/vendor/google.golang.org/grpc/dialoptions.go b/sdk/vendor/google.golang.org/grpc/dialoptions.go
index 75d01ba77..9372dc322 100644
--- a/sdk/vendor/google.golang.org/grpc/dialoptions.go
+++ b/sdk/vendor/google.golang.org/grpc/dialoptions.go
@@ -29,6 +29,7 @@ import (
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/internal"
internalbackoff "google.golang.org/grpc/internal/backoff"
+ "google.golang.org/grpc/internal/binarylog"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/resolver"
@@ -36,12 +37,13 @@ import (
)
func init() {
- internal.AddExtraDialOptions = func(opt ...DialOption) {
+ internal.AddGlobalDialOptions = func(opt ...DialOption) {
extraDialOptions = append(extraDialOptions, opt...)
}
- internal.ClearExtraDialOptions = func() {
+ internal.ClearGlobalDialOptions = func() {
extraDialOptions = nil
}
+ internal.WithBinaryLogger = withBinaryLogger
}
// dialOptions configure a Dial call. dialOptions are set by the DialOption
@@ -61,6 +63,7 @@ type dialOptions struct {
timeout time.Duration
scChan <-chan ServiceConfig
authority string
+ binaryLogger binarylog.Logger
copts transport.ConnectOptions
callOptions []CallOption
channelzParentID *channelz.Identifier
@@ -84,7 +87,7 @@ var extraDialOptions []DialOption
// EmptyDialOption does not alter the dial configuration. It can be embedded in
// another structure to build custom dial options.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -275,7 +278,7 @@ func WithBlock() DialOption {
// the context.DeadlineExceeded error.
// Implies WithBlock()
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -304,7 +307,7 @@ func WithInsecure() DialOption {
// WithNoProxy returns a DialOption which disables the use of proxies for this
// ClientConn. This is ignored if WithDialer or WithContextDialer are used.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -335,7 +338,7 @@ func WithPerRPCCredentials(creds credentials.PerRPCCredentials) DialOption {
// the ClientConn.WithCreds. This should not be used together with
// WithTransportCredentials.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -391,10 +394,24 @@ func WithDialer(f func(string, time.Duration) (net.Conn, error)) DialOption {
// all the RPCs and underlying network connections in this ClientConn.
func WithStatsHandler(h stats.Handler) DialOption {
return newFuncDialOption(func(o *dialOptions) {
+ if h == nil {
+ logger.Error("ignoring nil parameter in grpc.WithStatsHandler ClientOption")
+ // Do not allow a nil stats handler, which would otherwise cause
+ // panics.
+ return
+ }
o.copts.StatsHandlers = append(o.copts.StatsHandlers, h)
})
}
+// withBinaryLogger returns a DialOption that specifies the binary logger for
+// this ClientConn.
+func withBinaryLogger(bl binarylog.Logger) DialOption {
+ return newFuncDialOption(func(o *dialOptions) {
+ o.binaryLogger = bl
+ })
+}
+
// FailOnNonTempDialError returns a DialOption that specifies if gRPC fails on
// non-temporary dial errors. If f is true, and dialer returns a non-temporary
// error, gRPC will fail the connection to the network address and won't try to
@@ -403,7 +420,7 @@ func WithStatsHandler(h stats.Handler) DialOption {
// FailOnNonTempDialError only affects the initial dial, and does not do
// anything useful unless you are also using WithBlock().
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -483,7 +500,7 @@ func WithAuthority(a string) DialOption {
// current ClientConn's parent. This function is used in nested channel creation
// (e.g. grpclb dial).
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -528,9 +545,6 @@ func WithDefaultServiceConfig(s string) DialOption {
// service config enables them. This does not impact transparent retries, which
// will happen automatically if no data is written to the wire or if the RPC is
// unprocessed by the remote server.
-//
-// Retry support is currently enabled by default, but may be disabled by
-// setting the environment variable "GRPC_GO_RETRY" to "off".
func WithDisableRetry() DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.disableRetry = true
@@ -548,7 +562,7 @@ func WithMaxHeaderListSize(s uint32) DialOption {
// WithDisableHealthCheck disables the LB channel health checking for all
// SubConns of this ClientConn.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -595,7 +609,7 @@ func withMinConnectDeadline(f func() time.Duration) DialOption {
// resolver.Register. They will be matched against the scheme used for the
// current Dial only, and will take precedence over the global registry.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/sdk/vendor/google.golang.org/grpc/encoding/encoding.go b/sdk/vendor/google.golang.org/grpc/encoding/encoding.go
index 18e530fc9..711763d54 100644
--- a/sdk/vendor/google.golang.org/grpc/encoding/encoding.go
+++ b/sdk/vendor/google.golang.org/grpc/encoding/encoding.go
@@ -19,7 +19,7 @@
// Package encoding defines the interface for the compressor and codec, and
// functions to register and retrieve compressors and codecs.
//
-// Experimental
+// # Experimental
//
// Notice: This package is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -28,6 +28,8 @@ package encoding
import (
"io"
"strings"
+
+ "google.golang.org/grpc/internal/grpcutil"
)
// Identity specifies the optional encoding for uncompressed streams.
@@ -73,6 +75,7 @@ var registeredCompressor = make(map[string]Compressor)
// registered with the same name, the one registered last will take effect.
func RegisterCompressor(c Compressor) {
registeredCompressor[c.Name()] = c
+ grpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name())
}
// GetCompressor returns Compressor for the given compressor name.
diff --git a/sdk/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/sdk/vendor/google.golang.org/grpc/grpclog/loggerv2.go
index 7c1f66409..b5560b47e 100644
--- a/sdk/vendor/google.golang.org/grpc/grpclog/loggerv2.go
+++ b/sdk/vendor/google.golang.org/grpc/grpclog/loggerv2.go
@@ -242,7 +242,7 @@ func (g *loggerT) V(l int) bool {
// DepthLoggerV2, the below functions will be called with the appropriate stack
// depth set for trivial functions the logger may ignore.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/sdk/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go b/sdk/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go
index e3dfe204f..809d73cca 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go
@@ -37,7 +37,7 @@ type Logger interface {
// binLogger is the global binary logger for the binary. One of this should be
// built at init time from the configuration (environment variable or flags).
//
-// It is used to get a methodLogger for each individual method.
+// It is used to get a MethodLogger for each individual method.
var binLogger Logger
var grpclogLogger = grpclog.Component("binarylog")
@@ -56,11 +56,11 @@ func GetLogger() Logger {
return binLogger
}
-// GetMethodLogger returns the methodLogger for the given methodName.
+// GetMethodLogger returns the MethodLogger for the given methodName.
//
// methodName should be in the format of "/service/method".
//
-// Each methodLogger returned by this method is a new instance. This is to
+// Each MethodLogger returned by this method is a new instance. This is to
// generate sequence id within the call.
func GetMethodLogger(methodName string) MethodLogger {
if binLogger == nil {
@@ -117,7 +117,7 @@ func (l *logger) setDefaultMethodLogger(ml *MethodLoggerConfig) error {
// Set method logger for "service/*".
//
-// New methodLogger with same service overrides the old one.
+// New MethodLogger with same service overrides the old one.
func (l *logger) setServiceMethodLogger(service string, ml *MethodLoggerConfig) error {
if _, ok := l.config.Services[service]; ok {
return fmt.Errorf("conflicting service rules for service %v found", service)
@@ -131,7 +131,7 @@ func (l *logger) setServiceMethodLogger(service string, ml *MethodLoggerConfig)
// Set method logger for "service/method".
//
-// New methodLogger with same method overrides the old one.
+// New MethodLogger with same method overrides the old one.
func (l *logger) setMethodMethodLogger(method string, ml *MethodLoggerConfig) error {
if _, ok := l.config.Blacklist[method]; ok {
return fmt.Errorf("conflicting blacklist rules for method %v found", method)
@@ -161,11 +161,11 @@ func (l *logger) setBlacklist(method string) error {
return nil
}
-// getMethodLogger returns the methodLogger for the given methodName.
+// getMethodLogger returns the MethodLogger for the given methodName.
//
// methodName should be in the format of "/service/method".
//
-// Each methodLogger returned by this method is a new instance. This is to
+// Each MethodLogger returned by this method is a new instance. This is to
// generate sequence id within the call.
func (l *logger) GetMethodLogger(methodName string) MethodLogger {
s, m, err := grpcutil.ParseMethod(methodName)
@@ -174,16 +174,16 @@ func (l *logger) GetMethodLogger(methodName string) MethodLogger {
return nil
}
if ml, ok := l.config.Methods[s+"/"+m]; ok {
- return newMethodLogger(ml.Header, ml.Message)
+ return NewTruncatingMethodLogger(ml.Header, ml.Message)
}
if _, ok := l.config.Blacklist[s+"/"+m]; ok {
return nil
}
if ml, ok := l.config.Services[s]; ok {
- return newMethodLogger(ml.Header, ml.Message)
+ return NewTruncatingMethodLogger(ml.Header, ml.Message)
}
if l.config.All == nil {
return nil
}
- return newMethodLogger(l.config.All.Header, l.config.All.Message)
+ return NewTruncatingMethodLogger(l.config.All.Header, l.config.All.Message)
}
diff --git a/sdk/vendor/google.golang.org/grpc/internal/binarylog/env_config.go b/sdk/vendor/google.golang.org/grpc/internal/binarylog/env_config.go
index ab589a76b..f9e80e27a 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/binarylog/env_config.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/binarylog/env_config.go
@@ -30,15 +30,15 @@ import (
// to build a new logger and assign it to binarylog.Logger.
//
// Example filter config strings:
-// - "" Nothing will be logged
-// - "*" All headers and messages will be fully logged.
-// - "*{h}" Only headers will be logged.
-// - "*{m:256}" Only the first 256 bytes of each message will be logged.
-// - "Foo/*" Logs every method in service Foo
-// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar
-// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method
-// /Foo/Bar, logs all headers and messages in every other method in service
-// Foo.
+// - "" Nothing will be logged
+// - "*" All headers and messages will be fully logged.
+// - "*{h}" Only headers will be logged.
+// - "*{m:256}" Only the first 256 bytes of each message will be logged.
+// - "Foo/*" Logs every method in service Foo
+// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar
+// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method
+// /Foo/Bar, logs all headers and messages in every other method in service
+// Foo.
//
// If two configs exist for one certain method or service, the one specified
// later overrides the previous config.
@@ -57,7 +57,7 @@ func NewLoggerFromConfigString(s string) Logger {
return l
}
-// fillMethodLoggerWithConfigString parses config, creates methodLogger and adds
+// fillMethodLoggerWithConfigString parses config, creates TruncatingMethodLogger and adds
// it to the right map in the logger.
func (l *logger) fillMethodLoggerWithConfigString(config string) error {
// "" is invalid.
diff --git a/sdk/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/sdk/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go
index 24df0a1a0..179f4a26d 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go
@@ -52,7 +52,9 @@ type MethodLogger interface {
Log(LogEntryConfig)
}
-type methodLogger struct {
+// TruncatingMethodLogger is a method logger that truncates headers and messages
+// based on configured fields.
+type TruncatingMethodLogger struct {
headerMaxLen, messageMaxLen uint64
callID uint64
@@ -61,8 +63,9 @@ type methodLogger struct {
sink Sink // TODO(blog): make this plugable.
}
-func newMethodLogger(h, m uint64) *methodLogger {
- return &methodLogger{
+// NewTruncatingMethodLogger returns a new truncating method logger.
+func NewTruncatingMethodLogger(h, m uint64) *TruncatingMethodLogger {
+ return &TruncatingMethodLogger{
headerMaxLen: h,
messageMaxLen: m,
@@ -75,8 +78,8 @@ func newMethodLogger(h, m uint64) *methodLogger {
// Build is an internal only method for building the proto message out of the
// input event. It's made public to enable other library to reuse as much logic
-// in methodLogger as possible.
-func (ml *methodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry {
+// in TruncatingMethodLogger as possible.
+func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry {
m := c.toProto()
timestamp, _ := ptypes.TimestampProto(time.Now())
m.Timestamp = timestamp
@@ -95,11 +98,11 @@ func (ml *methodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry {
}
// Log creates a proto binary log entry, and logs it to the sink.
-func (ml *methodLogger) Log(c LogEntryConfig) {
+func (ml *TruncatingMethodLogger) Log(c LogEntryConfig) {
ml.sink.Write(ml.Build(c))
}
-func (ml *methodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) {
+func (ml *TruncatingMethodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) {
if ml.headerMaxLen == maxUInt {
return false
}
@@ -129,7 +132,7 @@ func (ml *methodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) {
return truncated
}
-func (ml *methodLogger) truncateMessage(msgPb *pb.Message) (truncated bool) {
+func (ml *TruncatingMethodLogger) truncateMessage(msgPb *pb.Message) (truncated bool) {
if ml.messageMaxLen == maxUInt {
return false
}
diff --git a/sdk/vendor/google.golang.org/grpc/internal/channelz/types.go b/sdk/vendor/google.golang.org/grpc/internal/channelz/types.go
index ad0ce4dab..7b2f350e2 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/channelz/types.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/channelz/types.go
@@ -273,10 +273,10 @@ func (c *channel) deleteSelfFromMap() (delete bool) {
// deleteSelfIfReady tries to delete the channel itself from the channelz database.
// The delete process includes two steps:
-// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its
-// parent's child list.
-// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id
-// will return entry not found error.
+// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its
+// parent's child list.
+// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id
+// will return entry not found error.
func (c *channel) deleteSelfIfReady() {
if !c.deleteSelfFromTree() {
return
@@ -381,10 +381,10 @@ func (sc *subChannel) deleteSelfFromMap() (delete bool) {
// deleteSelfIfReady tries to delete the subchannel itself from the channelz database.
// The delete process includes two steps:
-// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from
-// its parent's child list.
-// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup
-// by id will return entry not found error.
+// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from
+// its parent's child list.
+// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup
+// by id will return entry not found error.
func (sc *subChannel) deleteSelfIfReady() {
if !sc.deleteSelfFromTree() {
return
diff --git a/sdk/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/sdk/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
index 6f0272543..7edd196bd 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
@@ -25,11 +25,15 @@ import (
)
const (
- prefix = "GRPC_GO_"
- txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS"
+ prefix = "GRPC_GO_"
+ txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS"
+ advertiseCompressorsStr = prefix + "ADVERTISE_COMPRESSORS"
)
var (
// TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false").
TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false")
+ // AdvertiseCompressors is set if registered compressor should be advertised
+ // ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false").
+ AdvertiseCompressors = !strings.EqualFold(os.Getenv(advertiseCompressorsStr), "false")
)
diff --git a/sdk/vendor/google.golang.org/grpc/internal/envconfig/observability.go b/sdk/vendor/google.golang.org/grpc/internal/envconfig/observability.go
new file mode 100644
index 000000000..821dd0a7c
--- /dev/null
+++ b/sdk/vendor/google.golang.org/grpc/internal/envconfig/observability.go
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright 2022 gRPC 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 envconfig
+
+import "os"
+
+const (
+ envObservabilityConfig = "GRPC_GCP_OBSERVABILITY_CONFIG"
+ envObservabilityConfigFile = "GRPC_GCP_OBSERVABILITY_CONFIG_FILE"
+)
+
+var (
+ // ObservabilityConfig is the json configuration for the gcp/observability
+ // package specified directly in the envObservabilityConfig env var.
+ ObservabilityConfig = os.Getenv(envObservabilityConfig)
+ // ObservabilityConfigFile is the json configuration for the
+ // gcp/observability specified in a file with the location specified in
+ // envObservabilityConfigFile env var.
+ ObservabilityConfigFile = os.Getenv(envObservabilityConfigFile)
+)
diff --git a/sdk/vendor/google.golang.org/grpc/internal/envconfig/xds.go b/sdk/vendor/google.golang.org/grpc/internal/envconfig/xds.go
index 55aaeea8b..af09711a3 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/envconfig/xds.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/envconfig/xds.go
@@ -84,9 +84,9 @@ var (
// "GRPC_XDS_EXPERIMENTAL_RBAC" to "false".
XDSRBAC = !strings.EqualFold(os.Getenv(rbacSupportEnv), "false")
// XDSOutlierDetection indicates whether outlier detection support is
- // enabled, which can be enabled by setting the environment variable
- // "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "true".
- XDSOutlierDetection = strings.EqualFold(os.Getenv(outlierDetectionSupportEnv), "true")
+ // enabled, which can be disabled by setting the environment variable
+ // "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "false".
+ XDSOutlierDetection = !strings.EqualFold(os.Getenv(outlierDetectionSupportEnv), "false")
// XDSFederation indicates whether federation support is enabled.
XDSFederation = strings.EqualFold(os.Getenv(federationEnv), "true")
diff --git a/sdk/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go b/sdk/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go
index 30a3b4258..b68e26a36 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go
@@ -110,7 +110,7 @@ type LoggerV2 interface {
// This is a copy of the DepthLoggerV2 defined in the external grpclog package.
// It is defined here to avoid a circular dependency.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/sdk/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go b/sdk/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go
index 740f83c2b..517ea7064 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go
@@ -52,6 +52,13 @@ func Intn(n int) int {
return r.Intn(n)
}
+// Int31n implements rand.Int31n on the grpcrand global source.
+func Int31n(n int32) int32 {
+ mu.Lock()
+ defer mu.Unlock()
+ return r.Int31n(n)
+}
+
// Float64 implements rand.Float64 on the grpcrand global source.
func Float64() float64 {
mu.Lock()
diff --git a/sdk/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go b/sdk/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go
new file mode 100644
index 000000000..6635f7bca
--- /dev/null
+++ b/sdk/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go
@@ -0,0 +1,32 @@
+/*
+ *
+ * Copyright 2022 gRPC 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 grpcsync
+
+import (
+ "sync"
+)
+
+// OnceFunc returns a function wrapping f which ensures f is only executed
+// once even if the returned function is executed multiple times.
+func OnceFunc(f func()) func() {
+ var once sync.Once
+ return func() {
+ once.Do(f)
+ }
+}
diff --git a/sdk/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go b/sdk/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go
new file mode 100644
index 000000000..9f4090967
--- /dev/null
+++ b/sdk/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go
@@ -0,0 +1,47 @@
+/*
+ *
+ * Copyright 2022 gRPC 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 grpcutil
+
+import (
+ "strings"
+
+ "google.golang.org/grpc/internal/envconfig"
+)
+
+// RegisteredCompressorNames holds names of the registered compressors.
+var RegisteredCompressorNames []string
+
+// IsCompressorNameRegistered returns true when name is available in registry.
+func IsCompressorNameRegistered(name string) bool {
+ for _, compressor := range RegisteredCompressorNames {
+ if compressor == name {
+ return true
+ }
+ }
+ return false
+}
+
+// RegisteredCompressors returns a string of registered compressor names
+// separated by comma.
+func RegisteredCompressors() string {
+ if !envconfig.AdvertiseCompressors {
+ return ""
+ }
+ return strings.Join(RegisteredCompressorNames, ",")
+}
diff --git a/sdk/vendor/google.golang.org/grpc/internal/grpcutil/method.go b/sdk/vendor/google.golang.org/grpc/internal/grpcutil/method.go
index 4e7475060..ec62b4775 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/grpcutil/method.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/grpcutil/method.go
@@ -25,7 +25,6 @@ import (
// ParseMethod splits service and method from the input. It expects format
// "/service/method".
-//
func ParseMethod(methodName string) (service, method string, _ error) {
if !strings.HasPrefix(methodName, "/") {
return "", "", errors.New("invalid method name: should start with /")
@@ -39,6 +38,11 @@ func ParseMethod(methodName string) (service, method string, _ error) {
return methodName[:pos], methodName[pos+1:], nil
}
+// baseContentType is the base content-type for gRPC. This is a valid
+// content-type on it's own, but can also include a content-subtype such as
+// "proto" as a suffix after "+" or ";". See
+// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests
+// for more details.
const baseContentType = "application/grpc"
// ContentSubtype returns the content-subtype for the given content-type. The
diff --git a/sdk/vendor/google.golang.org/grpc/internal/internal.go b/sdk/vendor/google.golang.org/grpc/internal/internal.go
index 83018be7c..fd0ee3dca 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/internal.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/internal.go
@@ -63,20 +63,30 @@ var (
// xDS-enabled server invokes this method on a grpc.Server when a particular
// listener moves to "not-serving" mode.
DrainServerTransports interface{} // func(*grpc.Server, string)
- // AddExtraServerOptions adds an array of ServerOption that will be
+ // AddGlobalServerOptions adds an array of ServerOption that will be
// effective globally for newly created servers. The priority will be: 1.
// user-provided; 2. this method; 3. default values.
- AddExtraServerOptions interface{} // func(opt ...ServerOption)
- // ClearExtraServerOptions clears the array of extra ServerOption. This
+ AddGlobalServerOptions interface{} // func(opt ...ServerOption)
+ // ClearGlobalServerOptions clears the array of extra ServerOption. This
// method is useful in testing and benchmarking.
- ClearExtraServerOptions func()
- // AddExtraDialOptions adds an array of DialOption that will be effective
+ ClearGlobalServerOptions func()
+ // AddGlobalDialOptions adds an array of DialOption that will be effective
// globally for newly created client channels. The priority will be: 1.
// user-provided; 2. this method; 3. default values.
- AddExtraDialOptions interface{} // func(opt ...DialOption)
- // ClearExtraDialOptions clears the array of extra DialOption. This
+ AddGlobalDialOptions interface{} // func(opt ...DialOption)
+ // ClearGlobalDialOptions clears the array of extra DialOption. This
// method is useful in testing and benchmarking.
- ClearExtraDialOptions func()
+ ClearGlobalDialOptions func()
+ // JoinServerOptions combines the server options passed as arguments into a
+ // single server option.
+ JoinServerOptions interface{} // func(...grpc.ServerOption) grpc.ServerOption
+
+ // WithBinaryLogger returns a DialOption that specifies the binary logger
+ // for a ClientConn.
+ WithBinaryLogger interface{} // func(binarylog.Logger) grpc.DialOption
+ // BinaryLogger returns a ServerOption that can set the binary logger for a
+ // server.
+ BinaryLogger interface{} // func(binarylog.Logger) grpc.ServerOption
// NewXDSResolverWithConfigForTesting creates a new xds resolver builder using
// the provided xds bootstrap config instead of the global configuration from
@@ -117,22 +127,6 @@ var (
//
// TODO: Remove this function once the RBAC env var is removed.
UnregisterRBACHTTPFilterForTesting func()
-
- // RegisterOutlierDetectionBalancerForTesting registers the Outlier
- // Detection Balancer for testing purposes, regardless of the Outlier
- // Detection environment variable.
- //
- // TODO: Remove this function once the Outlier Detection env var is removed.
- RegisterOutlierDetectionBalancerForTesting func()
-
- // UnregisterOutlierDetectionBalancerForTesting unregisters the Outlier
- // Detection Balancer for testing purposes. This is needed because there is
- // no way to unregister the Outlier Detection Balancer after registering it
- // solely for testing purposes using
- // RegisterOutlierDetectionBalancerForTesting().
- //
- // TODO: Remove this function once the Outlier Detection env var is removed.
- UnregisterOutlierDetectionBalancerForTesting func()
)
// HealthChecker defines the signature of the client-side LB channel health checking function.
diff --git a/sdk/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go b/sdk/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
index 20852e59d..7f1a702ca 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
@@ -49,8 +49,9 @@ func (b *builder) Build(target resolver.Target, cc resolver.ClientConn, _ resolv
}
addr := resolver.Address{Addr: endpoint}
if b.scheme == unixAbstractScheme {
- // prepend "\x00" to address for unix-abstract
- addr.Addr = "\x00" + addr.Addr
+ // We can not prepend \0 as c++ gRPC does, as in Golang '@' is used to signify we do
+ // not want trailing \0 in address.
+ addr.Addr = "@" + addr.Addr
}
cc.UpdateState(resolver.State{Addresses: []resolver.Address{networktype.Set(addr, "unix")}})
return &nopResolver{}, nil
diff --git a/sdk/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go b/sdk/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go
index badbdbf59..51e733e49 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go
@@ -67,10 +67,10 @@ func (bc *BalancerConfig) MarshalJSON() ([]byte, error) {
// ServiceConfig contains a list of loadBalancingConfigs, each with a name and
// config. This method iterates through that list in order, and stops at the
// first policy that is supported.
-// - If the config for the first supported policy is invalid, the whole service
-// config is invalid.
-// - If the list doesn't contain any supported policy, the whole service config
-// is invalid.
+// - If the config for the first supported policy is invalid, the whole service
+// config is invalid.
+// - If the list doesn't contain any supported policy, the whole service config
+// is invalid.
func (bc *BalancerConfig) UnmarshalJSON(b []byte) error {
var ir intermediateBalancerConfig
err := json.Unmarshal(b, &ir)
diff --git a/sdk/vendor/google.golang.org/grpc/internal/status/status.go b/sdk/vendor/google.golang.org/grpc/internal/status/status.go
index e5c6513ed..b0ead4f54 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/status/status.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/status/status.go
@@ -164,3 +164,13 @@ func (e *Error) Is(target error) bool {
}
return proto.Equal(e.s.s, tse.s.s)
}
+
+// IsRestrictedControlPlaneCode returns whether the status includes a code
+// restricted for control plane usage as defined by gRFC A54.
+func IsRestrictedControlPlaneCode(s *Status) bool {
+ switch s.Code() {
+ case codes.InvalidArgument, codes.NotFound, codes.AlreadyExists, codes.FailedPrecondition, codes.Aborted, codes.OutOfRange, codes.DataLoss:
+ return true
+ }
+ return false
+}
diff --git a/sdk/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/sdk/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
index 244f4b081..409769f48 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
@@ -886,9 +886,9 @@ func (l *loopyWriter) processData() (bool, error) {
dataItem := str.itl.peek().(*dataFrame) // Peek at the first data item this stream.
// A data item is represented by a dataFrame, since it later translates into
// multiple HTTP2 data frames.
- // Every dataFrame has two buffers; h that keeps grpc-message header and d that is acutal data.
+ // Every dataFrame has two buffers; h that keeps grpc-message header and d that is actual data.
// As an optimization to keep wire traffic low, data from d is copied to h to make as big as the
- // maximum possilbe HTTP2 frame size.
+ // maximum possible HTTP2 frame size.
if len(dataItem.h) == 0 && len(dataItem.d) == 0 { // Empty data frame
// Client sends out empty data frame with endStream = true
diff --git a/sdk/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/sdk/vendor/google.golang.org/grpc/internal/transport/handler_server.go
index 090120925..fb272235d 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/transport/handler_server.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/transport/handler_server.go
@@ -442,10 +442,10 @@ func (ht *serverHandlerTransport) Drain() {
// mapRecvMsgError returns the non-nil err into the appropriate
// error value as expected by callers of *grpc.parser.recvMsg.
// In particular, in can only be:
-// * io.EOF
-// * io.ErrUnexpectedEOF
-// * of type transport.ConnectionError
-// * an error from the status package
+// - io.EOF
+// - io.ErrUnexpectedEOF
+// - of type transport.ConnectionError
+// - an error from the status package
func mapRecvMsgError(err error) error {
if err == io.EOF || err == io.ErrUnexpectedEOF {
return err
diff --git a/sdk/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/sdk/vendor/google.golang.org/grpc/internal/transport/http2_client.go
index be371c6e0..d518b07e1 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/transport/http2_client.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/transport/http2_client.go
@@ -38,8 +38,10 @@ import (
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/internal/channelz"
icredentials "google.golang.org/grpc/internal/credentials"
+ "google.golang.org/grpc/internal/grpcsync"
"google.golang.org/grpc/internal/grpcutil"
imetadata "google.golang.org/grpc/internal/metadata"
+ istatus "google.golang.org/grpc/internal/status"
"google.golang.org/grpc/internal/syscall"
"google.golang.org/grpc/internal/transport/networktype"
"google.golang.org/grpc/keepalive"
@@ -78,6 +80,7 @@ type http2Client struct {
framer *framer
// controlBuf delivers all the control related tasks (e.g., window
// updates, reset streams, and various settings) to the controller.
+ // Do not access controlBuf with mu held.
controlBuf *controlBuffer
fc *trInFlow
// The scheme used: https if TLS is on, http otherwise.
@@ -98,17 +101,15 @@ type http2Client struct {
maxSendHeaderListSize *uint32
bdpEst *bdpEstimator
- // onPrefaceReceipt is a callback that client transport calls upon
- // receiving server preface to signal that a succefull HTTP2
- // connection was established.
- onPrefaceReceipt func()
maxConcurrentStreams uint32
streamQuota int64
streamsQuotaAvailable chan struct{}
waitingStreams uint32
nextID uint32
+ registeredCompressors string
+ // Do not access controlBuf with mu held.
mu sync.Mutex // guard the following variables
state transportState
activeStreams map[uint32]*Stream
@@ -192,7 +193,7 @@ func isTemporary(err error) bool {
// newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2
// and starts to receive messages on it. Non-nil error returns if construction
// fails.
-func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) {
+func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) {
scheme := "http"
ctx, cancel := context.WithCancel(ctx)
defer func() {
@@ -214,12 +215,35 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
}
return nil, connectionErrorf(true, err, "transport: Error while dialing %v", err)
}
+
// Any further errors will close the underlying connection
defer func(conn net.Conn) {
if err != nil {
conn.Close()
}
}(conn)
+
+ // The following defer and goroutine monitor the connectCtx for cancelation
+ // and deadline. On context expiration, the connection is hard closed and
+ // this function will naturally fail as a result. Otherwise, the defer
+ // waits for the goroutine to exit to prevent the context from being
+ // monitored (and to prevent the connection from ever being closed) after
+ // returning from this function.
+ ctxMonitorDone := grpcsync.NewEvent()
+ newClientCtx, newClientDone := context.WithCancel(connectCtx)
+ defer func() {
+ newClientDone() // Awaken the goroutine below if connectCtx hasn't expired.
+ <-ctxMonitorDone.Done() // Wait for the goroutine below to exit.
+ }()
+ go func(conn net.Conn) {
+ defer ctxMonitorDone.Fire() // Signal this goroutine has exited.
+ <-newClientCtx.Done() // Block until connectCtx expires or the defer above executes.
+ if connectCtx.Err() != nil {
+ // connectCtx expired before exiting the function. Hard close the connection.
+ conn.Close()
+ }
+ }(conn)
+
kp := opts.KeepaliveParams
// Validate keepalive parameters.
if kp.Time == 0 {
@@ -251,15 +275,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
}
}
if transportCreds != nil {
- rawConn := conn
- // Pull the deadline from the connectCtx, which will be used for
- // timeouts in the authentication protocol handshake. Can ignore the
- // boolean as the deadline will return the zero value, which will make
- // the conn not timeout on I/O operations.
- deadline, _ := connectCtx.Deadline()
- rawConn.SetDeadline(deadline)
- conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, rawConn)
- rawConn.SetDeadline(time.Time{})
+ conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, conn)
if err != nil {
return nil, connectionErrorf(isTemporary(err), err, "transport: authentication handshake failed: %v", err)
}
@@ -297,6 +313,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
ctxDone: ctx.Done(), // Cache Done chan.
cancel: cancel,
userAgent: opts.UserAgent,
+ registeredCompressors: grpcutil.RegisteredCompressors(),
conn: conn,
remoteAddr: conn.RemoteAddr(),
localAddr: conn.LocalAddr(),
@@ -313,17 +330,18 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
kp: kp,
statsHandlers: opts.StatsHandlers,
initialWindowSize: initialWindowSize,
- onPrefaceReceipt: onPrefaceReceipt,
nextID: 1,
maxConcurrentStreams: defaultMaxStreamsClient,
streamQuota: defaultMaxStreamsClient,
streamsQuotaAvailable: make(chan struct{}, 1),
czData: new(channelzData),
onGoAway: onGoAway,
- onClose: onClose,
keepaliveEnabled: keepaliveEnabled,
bufferPool: newBufferPool(),
+ onClose: onClose,
}
+ // Add peer information to the http2client context.
+ t.ctx = peer.NewContext(t.ctx, t.getPeer())
if md, ok := addr.Metadata.(*metadata.MD); ok {
t.md = *md
@@ -359,21 +377,32 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
t.kpDormancyCond = sync.NewCond(&t.mu)
go t.keepalive()
}
- // Start the reader goroutine for incoming message. Each transport has
- // a dedicated goroutine which reads HTTP2 frame from network. Then it
- // dispatches the frame to the corresponding stream entity.
- go t.reader()
+
+ // Start the reader goroutine for incoming messages. Each transport has a
+ // dedicated goroutine which reads HTTP2 frames from the network. Then it
+ // dispatches the frame to the corresponding stream entity. When the
+ // server preface is received, readerErrCh is closed. If an error occurs
+ // first, an error is pushed to the channel. This must be checked before
+ // returning from this function.
+ readerErrCh := make(chan error, 1)
+ go t.reader(readerErrCh)
+ defer func() {
+ if err == nil {
+ err = <-readerErrCh
+ }
+ if err != nil {
+ t.Close(err)
+ }
+ }()
// Send connection preface to server.
n, err := t.conn.Write(clientPreface)
if err != nil {
err = connectionErrorf(true, err, "transport: failed to write client preface: %v", err)
- t.Close(err)
return nil, err
}
if n != len(clientPreface) {
err = connectionErrorf(true, nil, "transport: preface mismatch, wrote %d bytes; want %d", n, len(clientPreface))
- t.Close(err)
return nil, err
}
var ss []http2.Setting
@@ -393,14 +422,12 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
err = t.framer.fr.WriteSettings(ss...)
if err != nil {
err = connectionErrorf(true, err, "transport: failed to write initial settings frame: %v", err)
- t.Close(err)
return nil, err
}
// Adjust the connection flow control window if needed.
if delta := uint32(icwz - defaultWindowSize); delta > 0 {
if err := t.framer.fr.WriteWindowUpdate(0, delta); err != nil {
err = connectionErrorf(true, err, "transport: failed to write window update: %v", err)
- t.Close(err)
return nil, err
}
}
@@ -467,7 +494,7 @@ func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream {
func (t *http2Client) getPeer() *peer.Peer {
return &peer.Peer{
Addr: t.remoteAddr,
- AuthInfo: t.authInfo,
+ AuthInfo: t.authInfo, // Can be nil
}
}
@@ -503,9 +530,22 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr)
headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-previous-rpc-attempts", Value: strconv.Itoa(callHdr.PreviousAttempts)})
}
+ registeredCompressors := t.registeredCompressors
if callHdr.SendCompress != "" {
headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-encoding", Value: callHdr.SendCompress})
- headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: callHdr.SendCompress})
+ // Include the outgoing compressor name when compressor is not registered
+ // via encoding.RegisterCompressor. This is possible when client uses
+ // WithCompressor dial option.
+ if !grpcutil.IsCompressorNameRegistered(callHdr.SendCompress) {
+ if registeredCompressors != "" {
+ registeredCompressors += ","
+ }
+ registeredCompressors += callHdr.SendCompress
+ }
+ }
+
+ if registeredCompressors != "" {
+ headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: registeredCompressors})
}
if dl, ok := ctx.Deadline(); ok {
// Send out timeout regardless its value. The server can detect timeout context by itself.
@@ -585,7 +625,11 @@ func (t *http2Client) getTrAuthData(ctx context.Context, audience string) (map[s
for _, c := range t.perRPCCreds {
data, err := c.GetRequestMetadata(ctx, audience)
if err != nil {
- if _, ok := status.FromError(err); ok {
+ if st, ok := status.FromError(err); ok {
+ // Restrict the code to the list allowed by gRFC A54.
+ if istatus.IsRestrictedControlPlaneCode(st) {
+ err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err)
+ }
return nil, err
}
@@ -614,7 +658,14 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call
}
data, err := callCreds.GetRequestMetadata(ctx, audience)
if err != nil {
- return nil, status.Errorf(codes.Internal, "transport: %v", err)
+ if st, ok := status.FromError(err); ok {
+ // Restrict the code to the list allowed by gRFC A54.
+ if istatus.IsRestrictedControlPlaneCode(st) {
+ err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err)
+ }
+ return nil, err
+ }
+ return nil, status.Errorf(codes.Internal, "transport: per-RPC creds failed due to error: %v", err)
}
callAuthData = make(map[string]string, len(data))
for k, v := range data {
@@ -630,13 +681,13 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call
// NewStream errors result in transparent retry, as they mean nothing went onto
// the wire. However, there are two notable exceptions:
//
-// 1. If the stream headers violate the max header list size allowed by the
-// server. It's possible this could succeed on another transport, even if
-// it's unlikely, but do not transparently retry.
-// 2. If the credentials errored when requesting their headers. In this case,
-// it's possible a retry can fix the problem, but indefinitely transparently
-// retrying is not appropriate as it is likely the credentials, if they can
-// eventually succeed, would need I/O to do so.
+// 1. If the stream headers violate the max header list size allowed by the
+// server. It's possible this could succeed on another transport, even if
+// it's unlikely, but do not transparently retry.
+// 2. If the credentials errored when requesting their headers. In this case,
+// it's possible a retry can fix the problem, but indefinitely transparently
+// retrying is not appropriate as it is likely the credentials, if they can
+// eventually succeed, would need I/O to do so.
type NewStreamError struct {
Err error
@@ -685,7 +736,6 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream,
cleanup(err)
return err
}
- t.activeStreams[id] = s
if channelz.IsOn() {
atomic.AddInt64(&t.czData.streamsStarted, 1)
atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano())
@@ -719,6 +769,13 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream,
t.nextID += 2
s.id = h.streamID
s.fc = &inFlow{limit: uint32(t.initialWindowSize)}
+ t.mu.Lock()
+ if t.activeStreams == nil { // Can be niled from Close().
+ t.mu.Unlock()
+ return false // Don't create a stream if the transport is already closed.
+ }
+ t.activeStreams[s.id] = s
+ t.mu.Unlock()
if t.streamQuota > 0 && t.waitingStreams > 0 {
select {
case t.streamsQuotaAvailable <- struct{}{}:
@@ -744,13 +801,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream,
}
for {
success, err := t.controlBuf.executeAndPut(func(it interface{}) bool {
- if !checkForStreamQuota(it) {
- return false
- }
- if !checkForHeaderListSize(it) {
- return false
- }
- return true
+ return checkForHeaderListSize(it) && checkForStreamQuota(it)
}, hdr)
if err != nil {
// Connection closed.
@@ -876,19 +927,15 @@ func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2.
// Close kicks off the shutdown process of the transport. This should be called
// only once on a transport. Once it is called, the transport should not be
// accessed any more.
-//
-// This method blocks until the addrConn that initiated this transport is
-// re-connected. This happens because t.onClose() begins reconnect logic at the
-// addrConn level and blocks until the addrConn is successfully connected.
func (t *http2Client) Close(err error) {
t.mu.Lock()
- // Make sure we only Close once.
+ // Make sure we only close once.
if t.state == closing {
t.mu.Unlock()
return
}
- // Call t.onClose before setting the state to closing to prevent the client
- // from attempting to create new streams ASAP.
+ // Call t.onClose ASAP to prevent the client from attempting to create new
+ // streams.
t.onClose()
t.state = closing
streams := t.activeStreams
@@ -1003,13 +1050,13 @@ func (t *http2Client) updateWindow(s *Stream, n uint32) {
// for the transport and the stream based on the current bdp
// estimation.
func (t *http2Client) updateFlowControl(n uint32) {
- t.mu.Lock()
- for _, s := range t.activeStreams {
- s.fc.newLimit(n)
- }
- t.mu.Unlock()
updateIWS := func(interface{}) bool {
t.initialWindowSize = int32(n)
+ t.mu.Lock()
+ for _, s := range t.activeStreams {
+ s.fc.newLimit(n)
+ }
+ t.mu.Unlock()
return true
}
t.controlBuf.executeAndPut(updateIWS, &outgoingWindowUpdate{streamID: 0, increment: t.fc.newLimit(n)})
@@ -1215,7 +1262,7 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) {
default:
t.setGoAwayReason(f)
close(t.goAway)
- t.controlBuf.put(&incomingGoAway{})
+ defer t.controlBuf.put(&incomingGoAway{}) // Defer as t.mu is currently held.
// Notify the clientconn about the GOAWAY before we set the state to
// draining, to allow the client to stop attempting to create streams
// before disallowing new streams on this connection.
@@ -1228,18 +1275,29 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) {
if upperLimit == 0 { // This is the first GoAway Frame.
upperLimit = math.MaxUint32 // Kill all streams after the GoAway ID.
}
+
+ t.prevGoAwayID = id
+ if len(t.activeStreams) == 0 {
+ t.mu.Unlock()
+ t.Close(connectionErrorf(true, nil, "received goaway and there are no active streams"))
+ return
+ }
+
+ streamsToClose := make([]*Stream, 0)
for streamID, stream := range t.activeStreams {
if streamID > id && streamID <= upperLimit {
// The stream was unprocessed by the server.
- atomic.StoreUint32(&stream.unprocessed, 1)
- t.closeStream(stream, errStreamDrain, false, http2.ErrCodeNo, statusGoAway, nil, false)
+ if streamID > id && streamID <= upperLimit {
+ atomic.StoreUint32(&stream.unprocessed, 1)
+ streamsToClose = append(streamsToClose, stream)
+ }
}
}
- t.prevGoAwayID = id
- active := len(t.activeStreams)
t.mu.Unlock()
- if active == 0 {
- t.Close(connectionErrorf(true, nil, "received goaway and there are no active streams"))
+ // Called outside t.mu because closeStream can take controlBuf's mu, which
+ // could induce deadlock and is not allowed.
+ for _, stream := range streamsToClose {
+ t.closeStream(stream, errStreamDrain, false, http2.ErrCodeNo, statusGoAway, nil, false)
}
}
@@ -1467,33 +1525,35 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
t.closeStream(s, io.EOF, rst, http2.ErrCodeNo, statusGen, mdata, true)
}
-// reader runs as a separate goroutine in charge of reading data from network
-// connection.
-//
-// TODO(zhaoq): currently one reader per transport. Investigate whether this is
-// optimal.
-// TODO(zhaoq): Check the validity of the incoming frame sequence.
-func (t *http2Client) reader() {
- defer close(t.readerDone)
- // Check the validity of server preface.
+// readServerPreface reads and handles the initial settings frame from the
+// server.
+func (t *http2Client) readServerPreface() error {
frame, err := t.framer.fr.ReadFrame()
if err != nil {
- err = connectionErrorf(true, err, "error reading server preface: %v", err)
- t.Close(err) // this kicks off resetTransport, so must be last before return
- return
- }
- t.conn.SetReadDeadline(time.Time{}) // reset deadline once we get the settings frame (we didn't time out, yay!)
- if t.keepaliveEnabled {
- atomic.StoreInt64(&t.lastRead, time.Now().UnixNano())
+ return connectionErrorf(true, err, "error reading server preface: %v", err)
}
sf, ok := frame.(*http2.SettingsFrame)
if !ok {
- // this kicks off resetTransport, so must be last before return
- t.Close(connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame))
- return
+ return connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame)
}
- t.onPrefaceReceipt()
t.handleSettings(sf, true)
+ return nil
+}
+
+// reader verifies the server preface and reads all subsequent data from
+// network connection. If the server preface is not read successfully, an
+// error is pushed to errCh; otherwise errCh is closed with no error.
+func (t *http2Client) reader(errCh chan<- error) {
+ defer close(t.readerDone)
+
+ if err := t.readServerPreface(); err != nil {
+ errCh <- err
+ return
+ }
+ close(errCh)
+ if t.keepaliveEnabled {
+ atomic.StoreInt64(&t.lastRead, time.Now().UnixNano())
+ }
// loop to keep reading incoming messages on this transport.
for {
diff --git a/sdk/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/sdk/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index 2b0fde334..3dd15647b 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -265,6 +265,9 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
czData: new(channelzData),
bufferPool: newBufferPool(),
}
+ // Add peer information to the http2server context.
+ t.ctx = peer.NewContext(t.ctx, t.getPeer())
+
t.controlBuf = newControlBuffer(t.done)
if dynamicWindow {
t.bdpEst = &bdpEstimator{
@@ -485,14 +488,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
} else {
s.ctx, s.cancel = context.WithCancel(t.ctx)
}
- pr := &peer.Peer{
- Addr: t.remoteAddr,
- }
- // Attach Auth info if there is any.
- if t.authInfo != nil {
- pr.AuthInfo = t.authInfo
- }
- s.ctx = peer.NewContext(s.ctx, pr)
+
// Attach the received metadata to the context.
if len(mdata) > 0 {
s.ctx = metadata.NewIncomingContext(s.ctx, mdata)
@@ -945,15 +941,16 @@ func (t *http2Server) streamContextErr(s *Stream) error {
// WriteHeader sends the header metadata md back to the client.
func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error {
- if s.updateHeaderSent() {
- return ErrIllegalHeaderWrite
- }
-
+ s.hdrMu.Lock()
+ defer s.hdrMu.Unlock()
if s.getState() == streamDone {
return t.streamContextErr(s)
}
- s.hdrMu.Lock()
+ if s.updateHeaderSent() {
+ return ErrIllegalHeaderWrite
+ }
+
if md.Len() > 0 {
if s.header.Len() > 0 {
s.header = metadata.Join(s.header, md)
@@ -962,10 +959,8 @@ func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error {
}
}
if err := t.writeHeaderLocked(s); err != nil {
- s.hdrMu.Unlock()
return status.Convert(err).Err()
}
- s.hdrMu.Unlock()
return nil
}
@@ -1013,17 +1008,19 @@ func (t *http2Server) writeHeaderLocked(s *Stream) error {
// TODO(zhaoq): Now it indicates the end of entire stream. Revisit if early
// OK is adopted.
func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error {
+ s.hdrMu.Lock()
+ defer s.hdrMu.Unlock()
+
if s.getState() == streamDone {
return nil
}
- s.hdrMu.Lock()
+
// TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields
// first and create a slice of that exact size.
headerFields := make([]hpack.HeaderField, 0, 2) // grpc-status and grpc-message will be there if none else.
if !s.updateHeaderSent() { // No headers have been sent.
if len(s.header) > 0 { // Send a separate header frame.
if err := t.writeHeaderLocked(s); err != nil {
- s.hdrMu.Unlock()
return err
}
} else { // Send a trailer only response.
@@ -1052,7 +1049,7 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error {
endStream: true,
onWrite: t.setResetPingStrikes,
}
- s.hdrMu.Unlock()
+
success, err := t.controlBuf.execute(t.checkForHeaderListSize, trailingHeader)
if !success {
if err != nil {
@@ -1415,6 +1412,13 @@ func (t *http2Server) getOutFlowWindow() int64 {
}
}
+func (t *http2Server) getPeer() *peer.Peer {
+ return &peer.Peer{
+ Addr: t.remoteAddr,
+ AuthInfo: t.authInfo, // Can be nil
+ }
+}
+
func getJitter(v time.Duration) time.Duration {
if v == infinity {
return 0
diff --git a/sdk/vendor/google.golang.org/grpc/internal/transport/http_util.go b/sdk/vendor/google.golang.org/grpc/internal/transport/http_util.go
index b77513068..2c601a864 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/transport/http_util.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/transport/http_util.go
@@ -20,7 +20,6 @@ package transport
import (
"bufio"
- "bytes"
"encoding/base64"
"fmt"
"io"
@@ -45,14 +44,8 @@ import (
const (
// http2MaxFrameLen specifies the max length of a HTTP2 frame.
http2MaxFrameLen = 16384 // 16KB frame
- // http://http2.github.io/http2-spec/#SettingValues
+ // https://httpwg.org/specs/rfc7540.html#SettingValues
http2InitHeaderTableSize = 4096
- // baseContentType is the base content-type for gRPC. This is a valid
- // content-type on it's own, but can also include a content-subtype such as
- // "proto" as a suffix after "+" or ";". See
- // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests
- // for more details.
-
)
var (
@@ -257,13 +250,13 @@ func encodeGrpcMessage(msg string) string {
}
func encodeGrpcMessageUnchecked(msg string) string {
- var buf bytes.Buffer
+ var sb strings.Builder
for len(msg) > 0 {
r, size := utf8.DecodeRuneInString(msg)
for _, b := range []byte(string(r)) {
if size > 1 {
// If size > 1, r is not ascii. Always do percent encoding.
- buf.WriteString(fmt.Sprintf("%%%02X", b))
+ fmt.Fprintf(&sb, "%%%02X", b)
continue
}
@@ -272,14 +265,14 @@ func encodeGrpcMessageUnchecked(msg string) string {
//
// fmt.Sprintf("%%%02X", utf8.RuneError) gives "%FFFD".
if b >= spaceByte && b <= tildeByte && b != percentByte {
- buf.WriteByte(b)
+ sb.WriteByte(b)
} else {
- buf.WriteString(fmt.Sprintf("%%%02X", b))
+ fmt.Fprintf(&sb, "%%%02X", b)
}
}
msg = msg[size:]
}
- return buf.String()
+ return sb.String()
}
// decodeGrpcMessage decodes the msg encoded by encodeGrpcMessage.
@@ -297,23 +290,23 @@ func decodeGrpcMessage(msg string) string {
}
func decodeGrpcMessageUnchecked(msg string) string {
- var buf bytes.Buffer
+ var sb strings.Builder
lenMsg := len(msg)
for i := 0; i < lenMsg; i++ {
c := msg[i]
if c == percentByte && i+2 < lenMsg {
parsed, err := strconv.ParseUint(msg[i+1:i+3], 16, 8)
if err != nil {
- buf.WriteByte(c)
+ sb.WriteByte(c)
} else {
- buf.WriteByte(byte(parsed))
+ sb.WriteByte(byte(parsed))
i += 2
}
} else {
- buf.WriteByte(c)
+ sb.WriteByte(c)
}
}
- return buf.String()
+ return sb.String()
}
type bufWriter struct {
diff --git a/sdk/vendor/google.golang.org/grpc/internal/transport/transport.go b/sdk/vendor/google.golang.org/grpc/internal/transport/transport.go
index 6c3ba8515..2e615ee20 100644
--- a/sdk/vendor/google.golang.org/grpc/internal/transport/transport.go
+++ b/sdk/vendor/google.golang.org/grpc/internal/transport/transport.go
@@ -43,6 +43,10 @@ import (
"google.golang.org/grpc/tap"
)
+// ErrNoHeaders is used as a signal that a trailers only response was received,
+// and is not a real error.
+var ErrNoHeaders = errors.New("stream has no headers")
+
const logLevel = 2
type bufferPool struct {
@@ -366,9 +370,15 @@ func (s *Stream) Header() (metadata.MD, error) {
return s.header.Copy(), nil
}
s.waitOnHeader()
+
if !s.headerValid {
return nil, s.status.Err()
}
+
+ if s.noHeaders {
+ return nil, ErrNoHeaders
+ }
+
return s.header.Copy(), nil
}
@@ -573,8 +583,8 @@ type ConnectOptions struct {
// NewClientTransport establishes the transport with the required ConnectOptions
// and returns it to the caller.
-func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) {
- return newHTTP2Client(connectCtx, ctx, addr, opts, onPrefaceReceipt, onGoAway, onClose)
+func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) {
+ return newHTTP2Client(connectCtx, ctx, addr, opts, onGoAway, onClose)
}
// Options provides additional hints and information for message
diff --git a/sdk/vendor/google.golang.org/grpc/metadata/metadata.go b/sdk/vendor/google.golang.org/grpc/metadata/metadata.go
index 8e0f6abe8..fb4a88f59 100644
--- a/sdk/vendor/google.golang.org/grpc/metadata/metadata.go
+++ b/sdk/vendor/google.golang.org/grpc/metadata/metadata.go
@@ -41,16 +41,17 @@ type MD map[string][]string
// New creates an MD from a given key-value map.
//
// Only the following ASCII characters are allowed in keys:
-// - digits: 0-9
-// - uppercase letters: A-Z (normalized to lower)
-// - lowercase letters: a-z
-// - special characters: -_.
+// - digits: 0-9
+// - uppercase letters: A-Z (normalized to lower)
+// - lowercase letters: a-z
+// - special characters: -_.
+//
// Uppercase letters are automatically converted to lowercase.
//
// Keys beginning with "grpc-" are reserved for grpc-internal use only and may
// result in errors if set in metadata.
func New(m map[string]string) MD {
- md := MD{}
+ md := make(MD, len(m))
for k, val := range m {
key := strings.ToLower(k)
md[key] = append(md[key], val)
@@ -62,10 +63,11 @@ func New(m map[string]string) MD {
// Pairs panics if len(kv) is odd.
//
// Only the following ASCII characters are allowed in keys:
-// - digits: 0-9
-// - uppercase letters: A-Z (normalized to lower)
-// - lowercase letters: a-z
-// - special characters: -_.
+// - digits: 0-9
+// - uppercase letters: A-Z (normalized to lower)
+// - lowercase letters: a-z
+// - special characters: -_.
+//
// Uppercase letters are automatically converted to lowercase.
//
// Keys beginning with "grpc-" are reserved for grpc-internal use only and may
@@ -74,7 +76,7 @@ func Pairs(kv ...string) MD {
if len(kv)%2 == 1 {
panic(fmt.Sprintf("metadata: Pairs got the odd number of input pairs for metadata: %d", len(kv)))
}
- md := MD{}
+ md := make(MD, len(kv)/2)
for i := 0; i < len(kv); i += 2 {
key := strings.ToLower(kv[i])
md[key] = append(md[key], kv[i+1])
@@ -182,19 +184,51 @@ func FromIncomingContext(ctx context.Context) (MD, bool) {
if !ok {
return nil, false
}
- out := MD{}
+ out := make(MD, len(md))
for k, v := range md {
// We need to manually convert all keys to lower case, because MD is a
// map, and there's no guarantee that the MD attached to the context is
// created using our helper functions.
key := strings.ToLower(k)
- s := make([]string, len(v))
- copy(s, v)
- out[key] = s
+ out[key] = copyOf(v)
}
return out, true
}
+// ValueFromIncomingContext returns the metadata value corresponding to the metadata
+// key from the incoming metadata if it exists. Key must be lower-case.
+//
+// # Experimental
+//
+// Notice: This API is EXPERIMENTAL and may be changed or removed in a
+// later release.
+func ValueFromIncomingContext(ctx context.Context, key string) []string {
+ md, ok := ctx.Value(mdIncomingKey{}).(MD)
+ if !ok {
+ return nil
+ }
+
+ if v, ok := md[key]; ok {
+ return copyOf(v)
+ }
+ for k, v := range md {
+ // We need to manually convert all keys to lower case, because MD is a
+ // map, and there's no guarantee that the MD attached to the context is
+ // created using our helper functions.
+ if strings.ToLower(k) == key {
+ return copyOf(v)
+ }
+ }
+ return nil
+}
+
+// the returned slice must not be modified in place
+func copyOf(v []string) []string {
+ vals := make([]string, len(v))
+ copy(vals, v)
+ return vals
+}
+
// FromOutgoingContextRaw returns the un-merged, intermediary contents of rawMD.
//
// Remember to perform strings.ToLower on the keys, for both the returned MD (MD
@@ -222,15 +256,18 @@ func FromOutgoingContext(ctx context.Context) (MD, bool) {
return nil, false
}
- out := MD{}
+ mdSize := len(raw.md)
+ for i := range raw.added {
+ mdSize += len(raw.added[i]) / 2
+ }
+
+ out := make(MD, mdSize)
for k, v := range raw.md {
// We need to manually convert all keys to lower case, because MD is a
// map, and there's no guarantee that the MD attached to the context is
// created using our helper functions.
key := strings.ToLower(k)
- s := make([]string, len(v))
- copy(s, v)
- out[key] = s
+ out[key] = copyOf(v)
}
for _, added := range raw.added {
if len(added)%2 == 1 {
diff --git a/sdk/vendor/google.golang.org/grpc/picker_wrapper.go b/sdk/vendor/google.golang.org/grpc/picker_wrapper.go
index 843633c91..a5d5516ee 100644
--- a/sdk/vendor/google.golang.org/grpc/picker_wrapper.go
+++ b/sdk/vendor/google.golang.org/grpc/picker_wrapper.go
@@ -26,6 +26,7 @@ import (
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/internal/channelz"
+ istatus "google.golang.org/grpc/internal/status"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/status"
)
@@ -129,8 +130,12 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
if err == balancer.ErrNoSubConnAvailable {
continue
}
- if _, ok := status.FromError(err); ok {
+ if st, ok := status.FromError(err); ok {
// Status error: end the RPC unconditionally with this status.
+ // First restrict the code to the list allowed by gRFC A54.
+ if istatus.IsRestrictedControlPlaneCode(st) {
+ err = status.Errorf(codes.Internal, "received picker error with illegal status: %v", err)
+ }
return nil, nil, dropError{error: err}
}
// For all other errors, wait for ready RPCs should block and other
diff --git a/sdk/vendor/google.golang.org/grpc/preloader.go b/sdk/vendor/google.golang.org/grpc/preloader.go
index 0a1e975ad..cd4554785 100644
--- a/sdk/vendor/google.golang.org/grpc/preloader.go
+++ b/sdk/vendor/google.golang.org/grpc/preloader.go
@@ -25,7 +25,7 @@ import (
// PreparedMsg is responsible for creating a Marshalled and Compressed object.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/sdk/vendor/google.golang.org/grpc/resolver/resolver.go b/sdk/vendor/google.golang.org/grpc/resolver/resolver.go
index ca2e35a35..967cbc737 100644
--- a/sdk/vendor/google.golang.org/grpc/resolver/resolver.go
+++ b/sdk/vendor/google.golang.org/grpc/resolver/resolver.go
@@ -96,7 +96,7 @@ const (
// Address represents a server the client connects to.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -236,12 +236,12 @@ type ClientConn interface {
//
// Examples:
//
-// - "dns://some_authority/foo.bar"
-// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"}
-// - "foo.bar"
-// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"}
-// - "unknown_scheme://authority/endpoint"
-// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"}
+// - "dns://some_authority/foo.bar"
+// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"}
+// - "foo.bar"
+// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"}
+// - "unknown_scheme://authority/endpoint"
+// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"}
type Target struct {
// Deprecated: use URL.Scheme instead.
Scheme string
diff --git a/sdk/vendor/google.golang.org/grpc/rpc_util.go b/sdk/vendor/google.golang.org/grpc/rpc_util.go
index 5d407b004..934fc1aa0 100644
--- a/sdk/vendor/google.golang.org/grpc/rpc_util.go
+++ b/sdk/vendor/google.golang.org/grpc/rpc_util.go
@@ -198,7 +198,7 @@ func Header(md *metadata.MD) CallOption {
// HeaderCallOption is a CallOption for collecting response header metadata.
// The metadata field will be populated *after* the RPC completes.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -220,7 +220,7 @@ func Trailer(md *metadata.MD) CallOption {
// TrailerCallOption is a CallOption for collecting response trailer metadata.
// The metadata field will be populated *after* the RPC completes.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -242,7 +242,7 @@ func Peer(p *peer.Peer) CallOption {
// PeerCallOption is a CallOption for collecting the identity of the remote
// peer. The peer field will be populated *after* the RPC completes.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -282,7 +282,7 @@ func FailFast(failFast bool) CallOption {
// FailFastCallOption is a CallOption for indicating whether an RPC should fail
// fast or not.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -305,7 +305,7 @@ func MaxCallRecvMsgSize(bytes int) CallOption {
// MaxRecvMsgSizeCallOption is a CallOption that indicates the maximum message
// size in bytes the client can receive.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -328,7 +328,7 @@ func MaxCallSendMsgSize(bytes int) CallOption {
// MaxSendMsgSizeCallOption is a CallOption that indicates the maximum message
// size in bytes the client can send.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -351,7 +351,7 @@ func PerRPCCredentials(creds credentials.PerRPCCredentials) CallOption {
// PerRPCCredsCallOption is a CallOption that indicates the per-RPC
// credentials to use for the call.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -369,7 +369,7 @@ func (o PerRPCCredsCallOption) after(c *callInfo, attempt *csAttempt) {}
// sending the request. If WithCompressor is also set, UseCompressor has
// higher priority.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -379,7 +379,7 @@ func UseCompressor(name string) CallOption {
// CompressorCallOption is a CallOption that indicates the compressor to use.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -416,7 +416,7 @@ func CallContentSubtype(contentSubtype string) CallOption {
// ContentSubtypeCallOption is a CallOption that indicates the content-subtype
// used for marshaling messages.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -444,7 +444,7 @@ func (o ContentSubtypeCallOption) after(c *callInfo, attempt *csAttempt) {}
// This function is provided for advanced users; prefer to use only
// CallContentSubtype to select a registered codec instead.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -455,7 +455,7 @@ func ForceCodec(codec encoding.Codec) CallOption {
// ForceCodecCallOption is a CallOption that indicates the codec used for
// marshaling messages.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -480,7 +480,7 @@ func CallCustomCodec(codec Codec) CallOption {
// CustomCodecCallOption is a CallOption that indicates the codec used for
// marshaling messages.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -497,7 +497,7 @@ func (o CustomCodecCallOption) after(c *callInfo, attempt *csAttempt) {}
// MaxRetryRPCBufferSize returns a CallOption that limits the amount of memory
// used for buffering this RPC's requests for retry purposes.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -508,7 +508,7 @@ func MaxRetryRPCBufferSize(bytes int) CallOption {
// MaxRetryRPCBufferSizeCallOption is a CallOption indicating the amount of
// memory to be used for caching this RPC for retry purposes.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -548,10 +548,11 @@ type parser struct {
// format. The caller owns the returned msg memory.
//
// If there is an error, possible values are:
-// * io.EOF, when no messages remain
-// * io.ErrUnexpectedEOF
-// * of type transport.ConnectionError
-// * an error from the status package
+// - io.EOF, when no messages remain
+// - io.ErrUnexpectedEOF
+// - of type transport.ConnectionError
+// - an error from the status package
+//
// No other error values or types must be returned, which also means
// that the underlying io.Reader must not return an incompatible
// error.
diff --git a/sdk/vendor/google.golang.org/grpc/server.go b/sdk/vendor/google.golang.org/grpc/server.go
index b54f5bb57..f4dde72b4 100644
--- a/sdk/vendor/google.golang.org/grpc/server.go
+++ b/sdk/vendor/google.golang.org/grpc/server.go
@@ -73,12 +73,14 @@ func init() {
internal.DrainServerTransports = func(srv *Server, addr string) {
srv.drainServerTransports(addr)
}
- internal.AddExtraServerOptions = func(opt ...ServerOption) {
- extraServerOptions = opt
+ internal.AddGlobalServerOptions = func(opt ...ServerOption) {
+ extraServerOptions = append(extraServerOptions, opt...)
}
- internal.ClearExtraServerOptions = func() {
+ internal.ClearGlobalServerOptions = func() {
extraServerOptions = nil
}
+ internal.BinaryLogger = binaryLogger
+ internal.JoinServerOptions = newJoinServerOption
}
var statusOK = status.New(codes.OK, "")
@@ -155,6 +157,7 @@ type serverOptions struct {
streamInt StreamServerInterceptor
chainUnaryInts []UnaryServerInterceptor
chainStreamInts []StreamServerInterceptor
+ binaryLogger binarylog.Logger
inTapHandle tap.ServerInHandle
statsHandlers []stats.Handler
maxConcurrentStreams uint32
@@ -190,7 +193,7 @@ type ServerOption interface {
// EmptyServerOption does not alter the server configuration. It can be embedded
// in another structure to build custom server options.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -214,6 +217,22 @@ func newFuncServerOption(f func(*serverOptions)) *funcServerOption {
}
}
+// joinServerOption provides a way to combine arbitrary number of server
+// options into one.
+type joinServerOption struct {
+ opts []ServerOption
+}
+
+func (mdo *joinServerOption) apply(do *serverOptions) {
+ for _, opt := range mdo.opts {
+ opt.apply(do)
+ }
+}
+
+func newJoinServerOption(opts ...ServerOption) ServerOption {
+ return &joinServerOption{opts: opts}
+}
+
// WriteBufferSize determines how much data can be batched before doing a write on the wire.
// The corresponding memory allocation for this buffer will be twice the size to keep syscalls low.
// The default value for this buffer is 32KB.
@@ -305,7 +324,7 @@ func CustomCodec(codec Codec) ServerOption {
// https://github.com/grpc/grpc-go/blob/master/Documentation/encoding.md#using-a-codec.
// Will be supported throughout 1.x.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -426,7 +445,7 @@ func ChainStreamInterceptor(interceptors ...StreamServerInterceptor) ServerOptio
// InTapHandle returns a ServerOption that sets the tap handle for all the server
// transport to be created. Only one can be installed.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -442,10 +461,24 @@ func InTapHandle(h tap.ServerInHandle) ServerOption {
// StatsHandler returns a ServerOption that sets the stats handler for the server.
func StatsHandler(h stats.Handler) ServerOption {
return newFuncServerOption(func(o *serverOptions) {
+ if h == nil {
+ logger.Error("ignoring nil parameter in grpc.StatsHandler ServerOption")
+ // Do not allow a nil stats handler, which would otherwise cause
+ // panics.
+ return
+ }
o.statsHandlers = append(o.statsHandlers, h)
})
}
+// binaryLogger returns a ServerOption that can set the binary logger for the
+// server.
+func binaryLogger(bl binarylog.Logger) ServerOption {
+ return newFuncServerOption(func(o *serverOptions) {
+ o.binaryLogger = bl
+ })
+}
+
// UnknownServiceHandler returns a ServerOption that allows for adding a custom
// unknown service handler. The provided method is a bidi-streaming RPC service
// handler that will be invoked instead of returning the "unimplemented" gRPC
@@ -469,7 +502,7 @@ func UnknownServiceHandler(streamHandler StreamHandler) ServerOption {
// new connections. If this is not set, the default is 120 seconds. A zero or
// negative value will result in an immediate timeout.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -490,7 +523,7 @@ func MaxHeaderListSize(s uint32) ServerOption {
// HeaderTableSize returns a ServerOption that sets the size of dynamic
// header table for stream.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -505,7 +538,7 @@ func HeaderTableSize(s uint32) ServerOption {
// zero (default) will disable workers and spawn a new goroutine for each
// stream.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -898,7 +931,7 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport {
if err != credentials.ErrConnDispatched {
// Don't log on ErrConnDispatched and io.EOF to prevent log spam.
if err != io.EOF {
- channelz.Warning(logger, s.channelzID, "grpc: Server.Serve failed to create ServerTransport: ", err)
+ channelz.Info(logger, s.channelzID, "grpc: Server.Serve failed to create ServerTransport: ", err)
}
c.Close()
}
@@ -956,19 +989,19 @@ var _ http.Handler = (*Server)(nil)
// To share one port (such as 443 for https) between gRPC and an
// existing http.Handler, use a root http.Handler such as:
//
-// if r.ProtoMajor == 2 && strings.HasPrefix(
-// r.Header.Get("Content-Type"), "application/grpc") {
-// grpcServer.ServeHTTP(w, r)
-// } else {
-// yourMux.ServeHTTP(w, r)
-// }
+// if r.ProtoMajor == 2 && strings.HasPrefix(
+// r.Header.Get("Content-Type"), "application/grpc") {
+// grpcServer.ServeHTTP(w, r)
+// } else {
+// yourMux.ServeHTTP(w, r)
+// }
//
// Note that ServeHTTP uses Go's HTTP/2 server implementation which is totally
// separate from grpc-go's HTTP/2 server. Performance and features may vary
// between the two paths. ServeHTTP does not support some gRPC features
// available through grpc-go's HTTP/2 server.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -1193,9 +1226,16 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
}
}()
}
-
- binlog := binarylog.GetMethodLogger(stream.Method())
- if binlog != nil {
+ var binlogs []binarylog.MethodLogger
+ if ml := binarylog.GetMethodLogger(stream.Method()); ml != nil {
+ binlogs = append(binlogs, ml)
+ }
+ if s.opts.binaryLogger != nil {
+ if ml := s.opts.binaryLogger.GetMethodLogger(stream.Method()); ml != nil {
+ binlogs = append(binlogs, ml)
+ }
+ }
+ if len(binlogs) != 0 {
ctx := stream.Context()
md, _ := metadata.FromIncomingContext(ctx)
logEntry := &binarylog.ClientHeader{
@@ -1215,7 +1255,9 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
if peer, ok := peer.FromContext(ctx); ok {
logEntry.PeerAddr = peer.Addr
}
- binlog.Log(logEntry)
+ for _, binlog := range binlogs {
+ binlog.Log(logEntry)
+ }
}
// comp and cp are used for compression. decomp and dc are used for
@@ -1255,7 +1297,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
}
var payInfo *payloadInfo
- if len(shs) != 0 || binlog != nil {
+ if len(shs) != 0 || len(binlogs) != 0 {
payInfo = &payloadInfo{}
}
d, err := recvAndDecompress(&parser{r: stream}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp)
@@ -1281,10 +1323,13 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
Length: len(d),
})
}
- if binlog != nil {
- binlog.Log(&binarylog.ClientMessage{
+ if len(binlogs) != 0 {
+ cm := &binarylog.ClientMessage{
Message: d,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(cm)
+ }
}
if trInfo != nil {
trInfo.tr.LazyLog(&payload{sent: false, msg: v}, true)
@@ -1308,18 +1353,24 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
if e := t.WriteStatus(stream, appStatus); e != nil {
channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status: %v", e)
}
- if binlog != nil {
+ if len(binlogs) != 0 {
if h, _ := stream.Header(); h.Len() > 0 {
// Only log serverHeader if there was header. Otherwise it can
// be trailer only.
- binlog.Log(&binarylog.ServerHeader{
+ sh := &binarylog.ServerHeader{
Header: h,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(sh)
+ }
}
- binlog.Log(&binarylog.ServerTrailer{
+ st := &binarylog.ServerTrailer{
Trailer: stream.Trailer(),
Err: appErr,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(st)
+ }
}
return appErr
}
@@ -1345,26 +1396,34 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
panic(fmt.Sprintf("grpc: Unexpected error (%T) from sendResponse: %v", st, st))
}
}
- if binlog != nil {
+ if len(binlogs) != 0 {
h, _ := stream.Header()
- binlog.Log(&binarylog.ServerHeader{
+ sh := &binarylog.ServerHeader{
Header: h,
- })
- binlog.Log(&binarylog.ServerTrailer{
+ }
+ st := &binarylog.ServerTrailer{
Trailer: stream.Trailer(),
Err: appErr,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(sh)
+ binlog.Log(st)
+ }
}
return err
}
- if binlog != nil {
+ if len(binlogs) != 0 {
h, _ := stream.Header()
- binlog.Log(&binarylog.ServerHeader{
+ sh := &binarylog.ServerHeader{
Header: h,
- })
- binlog.Log(&binarylog.ServerMessage{
+ }
+ sm := &binarylog.ServerMessage{
Message: reply,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(sh)
+ binlog.Log(sm)
+ }
}
if channelz.IsOn() {
t.IncrMsgSent()
@@ -1376,11 +1435,14 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
// Should the logging be in WriteStatus? Should we ignore the WriteStatus
// error or allow the stats handler to see it?
err = t.WriteStatus(stream, statusOK)
- if binlog != nil {
- binlog.Log(&binarylog.ServerTrailer{
+ if len(binlogs) != 0 {
+ st := &binarylog.ServerTrailer{
Trailer: stream.Trailer(),
Err: appErr,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(st)
+ }
}
return err
}
@@ -1493,8 +1555,15 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
}()
}
- ss.binlog = binarylog.GetMethodLogger(stream.Method())
- if ss.binlog != nil {
+ if ml := binarylog.GetMethodLogger(stream.Method()); ml != nil {
+ ss.binlogs = append(ss.binlogs, ml)
+ }
+ if s.opts.binaryLogger != nil {
+ if ml := s.opts.binaryLogger.GetMethodLogger(stream.Method()); ml != nil {
+ ss.binlogs = append(ss.binlogs, ml)
+ }
+ }
+ if len(ss.binlogs) != 0 {
md, _ := metadata.FromIncomingContext(ctx)
logEntry := &binarylog.ClientHeader{
Header: md,
@@ -1513,7 +1582,9 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
if peer, ok := peer.FromContext(ss.Context()); ok {
logEntry.PeerAddr = peer.Addr
}
- ss.binlog.Log(logEntry)
+ for _, binlog := range ss.binlogs {
+ binlog.Log(logEntry)
+ }
}
// If dc is set and matches the stream's compression, use it. Otherwise, try
@@ -1579,11 +1650,14 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
ss.mu.Unlock()
}
t.WriteStatus(ss.s, appStatus)
- if ss.binlog != nil {
- ss.binlog.Log(&binarylog.ServerTrailer{
+ if len(ss.binlogs) != 0 {
+ st := &binarylog.ServerTrailer{
Trailer: ss.s.Trailer(),
Err: appErr,
- })
+ }
+ for _, binlog := range ss.binlogs {
+ binlog.Log(st)
+ }
}
// TODO: Should we log an error from WriteStatus here and below?
return appErr
@@ -1594,11 +1668,14 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
ss.mu.Unlock()
}
err = t.WriteStatus(ss.s, statusOK)
- if ss.binlog != nil {
- ss.binlog.Log(&binarylog.ServerTrailer{
+ if len(ss.binlogs) != 0 {
+ st := &binarylog.ServerTrailer{
Trailer: ss.s.Trailer(),
Err: appErr,
- })
+ }
+ for _, binlog := range ss.binlogs {
+ binlog.Log(st)
+ }
}
return err
}
@@ -1674,7 +1751,7 @@ type streamKey struct{}
// NewContextWithServerTransportStream creates a new context from ctx and
// attaches stream to it.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -1689,7 +1766,7 @@ func NewContextWithServerTransportStream(ctx context.Context, stream ServerTrans
//
// See also NewContextWithServerTransportStream.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -1704,7 +1781,7 @@ type ServerTransportStream interface {
// ctx. Returns nil if the given context has no stream associated with it
// (which implies it is not an RPC invocation context).
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -1825,12 +1902,12 @@ func (s *Server) getCodec(contentSubtype string) baseCodec {
// When called multiple times, all the provided metadata will be merged. All
// the metadata will be sent out when one of the following happens:
//
-// - grpc.SendHeader is called, or for streaming handlers, stream.SendHeader.
-// - The first response message is sent. For unary handlers, this occurs when
-// the handler returns; for streaming handlers, this can happen when stream's
-// SendMsg method is called.
-// - An RPC status is sent out (error or success). This occurs when the handler
-// returns.
+// - grpc.SendHeader is called, or for streaming handlers, stream.SendHeader.
+// - The first response message is sent. For unary handlers, this occurs when
+// the handler returns; for streaming handlers, this can happen when stream's
+// SendMsg method is called.
+// - An RPC status is sent out (error or success). This occurs when the handler
+// returns.
//
// SetHeader will fail if called after any of the events above.
//
diff --git a/sdk/vendor/google.golang.org/grpc/service_config.go b/sdk/vendor/google.golang.org/grpc/service_config.go
index b01c548bb..01bbb2025 100644
--- a/sdk/vendor/google.golang.org/grpc/service_config.go
+++ b/sdk/vendor/google.golang.org/grpc/service_config.go
@@ -57,10 +57,9 @@ type lbConfig struct {
type ServiceConfig struct {
serviceconfig.Config
- // LB is the load balancer the service providers recommends. The balancer
- // specified via grpc.WithBalancerName will override this. This is deprecated;
- // lbConfigs is preferred. If lbConfig and LB are both present, lbConfig
- // will be used.
+ // LB is the load balancer the service providers recommends. This is
+ // deprecated; lbConfigs is preferred. If lbConfig and LB are both present,
+ // lbConfig will be used.
LB *string
// lbConfig is the service config's load balancing configuration. If
diff --git a/sdk/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go b/sdk/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go
index 73a2f9266..35e7a20a0 100644
--- a/sdk/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go
+++ b/sdk/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go
@@ -19,7 +19,7 @@
// Package serviceconfig defines types and methods for operating on gRPC
// service configs.
//
-// Experimental
+// # Experimental
//
// Notice: This package is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/sdk/vendor/google.golang.org/grpc/status/status.go b/sdk/vendor/google.golang.org/grpc/status/status.go
index 6d163b6e3..623be39f2 100644
--- a/sdk/vendor/google.golang.org/grpc/status/status.go
+++ b/sdk/vendor/google.golang.org/grpc/status/status.go
@@ -76,14 +76,14 @@ func FromProto(s *spb.Status) *Status {
// FromError returns a Status representation of err.
//
-// - If err was produced by this package or implements the method `GRPCStatus()
-// *Status`, the appropriate Status is returned.
+// - If err was produced by this package or implements the method `GRPCStatus()
+// *Status`, the appropriate Status is returned.
//
-// - If err is nil, a Status is returned with codes.OK and no message.
+// - If err is nil, a Status is returned with codes.OK and no message.
//
-// - Otherwise, err is an error not compatible with this package. In this
-// case, a Status is returned with codes.Unknown and err's Error() message,
-// and ok is false.
+// - Otherwise, err is an error not compatible with this package. In this
+// case, a Status is returned with codes.Unknown and err's Error() message,
+// and ok is false.
func FromError(err error) (s *Status, ok bool) {
if err == nil {
return nil, true
diff --git a/sdk/vendor/google.golang.org/grpc/stream.go b/sdk/vendor/google.golang.org/grpc/stream.go
index 6d82e0d7c..960c3e33d 100644
--- a/sdk/vendor/google.golang.org/grpc/stream.go
+++ b/sdk/vendor/google.golang.org/grpc/stream.go
@@ -39,6 +39,7 @@ import (
imetadata "google.golang.org/grpc/internal/metadata"
iresolver "google.golang.org/grpc/internal/resolver"
"google.golang.org/grpc/internal/serviceconfig"
+ istatus "google.golang.org/grpc/internal/status"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/peer"
@@ -140,13 +141,13 @@ type ClientStream interface {
// To ensure resources are not leaked due to the stream returned, one of the following
// actions must be performed:
//
-// 1. Call Close on the ClientConn.
-// 2. Cancel the context provided.
-// 3. Call RecvMsg until a non-nil error is returned. A protobuf-generated
-// client-streaming RPC, for instance, might use the helper function
-// CloseAndRecv (note that CloseSend does not Recv, therefore is not
-// guaranteed to release all resources).
-// 4. Receive a non-nil, non-io.EOF error from Header or SendMsg.
+// 1. Call Close on the ClientConn.
+// 2. Cancel the context provided.
+// 3. Call RecvMsg until a non-nil error is returned. A protobuf-generated
+// client-streaming RPC, for instance, might use the helper function
+// CloseAndRecv (note that CloseSend does not Recv, therefore is not
+// guaranteed to release all resources).
+// 4. Receive a non-nil, non-io.EOF error from Header or SendMsg.
//
// If none of the above happen, a goroutine and a context will be leaked, and grpc
// will not call the optionally-configured stats handler with a stats.End message.
@@ -195,6 +196,13 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth
rpcInfo := iresolver.RPCInfo{Context: ctx, Method: method}
rpcConfig, err := cc.safeConfigSelector.SelectConfig(rpcInfo)
if err != nil {
+ if st, ok := status.FromError(err); ok {
+ // Restrict the code to the list allowed by gRFC A54.
+ if istatus.IsRestrictedControlPlaneCode(st) {
+ err = status.Errorf(codes.Internal, "config selector returned illegal status: %v", err)
+ }
+ return nil, err
+ }
return nil, toRPCErr(err)
}
@@ -301,12 +309,13 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
if !cc.dopts.disableRetry {
cs.retryThrottler = cc.retryThrottler.Load().(*retryThrottler)
}
- cs.binlog = binarylog.GetMethodLogger(method)
-
- cs.attempt, err = cs.newAttemptLocked(false /* isTransparent */)
- if err != nil {
- cs.finish(err)
- return nil, err
+ if ml := binarylog.GetMethodLogger(method); ml != nil {
+ cs.binlogs = append(cs.binlogs, ml)
+ }
+ if cc.dopts.binaryLogger != nil {
+ if ml := cc.dopts.binaryLogger.GetMethodLogger(method); ml != nil {
+ cs.binlogs = append(cs.binlogs, ml)
+ }
}
// Pick the transport to use and create a new stream on the transport.
@@ -328,7 +337,7 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
return nil, err
}
- if cs.binlog != nil {
+ if len(cs.binlogs) != 0 {
md, _ := metadata.FromOutgoingContext(ctx)
logEntry := &binarylog.ClientHeader{
OnClientSide: true,
@@ -342,7 +351,9 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
logEntry.Timeout = 0
}
}
- cs.binlog.Log(logEntry)
+ for _, binlog := range cs.binlogs {
+ binlog.Log(logEntry)
+ }
}
if desc != unaryStreamDesc {
@@ -486,7 +497,7 @@ type clientStream struct {
retryThrottler *retryThrottler // The throttler active when the RPC began.
- binlog binarylog.MethodLogger // Binary logger, can be nil.
+ binlogs []binarylog.MethodLogger
// serverHeaderBinlogged is a boolean for whether server header has been
// logged. Server header will be logged when the first time one of those
// happens: stream.Header(), stream.Recv().
@@ -704,6 +715,18 @@ func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func())
// already be status errors.
return toRPCErr(op(cs.attempt))
}
+ if len(cs.buffer) == 0 {
+ // For the first op, which controls creation of the stream and
+ // assigns cs.attempt, we need to create a new attempt inline
+ // before executing the first op. On subsequent ops, the attempt
+ // is created immediately before replaying the ops.
+ var err error
+ if cs.attempt, err = cs.newAttemptLocked(false /* isTransparent */); err != nil {
+ cs.mu.Unlock()
+ cs.finish(err)
+ return err
+ }
+ }
a := cs.attempt
cs.mu.Unlock()
err := op(a)
@@ -729,17 +752,25 @@ func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func())
func (cs *clientStream) Header() (metadata.MD, error) {
var m metadata.MD
+ noHeader := false
err := cs.withRetry(func(a *csAttempt) error {
var err error
m, err = a.s.Header()
+ if err == transport.ErrNoHeaders {
+ noHeader = true
+ return nil
+ }
return toRPCErr(err)
}, cs.commitAttemptLocked)
+
if err != nil {
cs.finish(err)
return nil, err
}
- if cs.binlog != nil && !cs.serverHeaderBinlogged {
- // Only log if binary log is on and header has not been logged.
+
+ if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged && !noHeader {
+ // Only log if binary log is on and header has not been logged, and
+ // there is actually headers to log.
logEntry := &binarylog.ServerHeader{
OnClientSide: true,
Header: m,
@@ -748,8 +779,10 @@ func (cs *clientStream) Header() (metadata.MD, error) {
if peer, ok := peer.FromContext(cs.Context()); ok {
logEntry.PeerAddr = peer.Addr
}
- cs.binlog.Log(logEntry)
cs.serverHeaderBinlogged = true
+ for _, binlog := range cs.binlogs {
+ binlog.Log(logEntry)
+ }
}
return m, nil
}
@@ -823,38 +856,44 @@ func (cs *clientStream) SendMsg(m interface{}) (err error) {
return a.sendMsg(m, hdr, payload, data)
}
err = cs.withRetry(op, func() { cs.bufferForRetryLocked(len(hdr)+len(payload), op) })
- if cs.binlog != nil && err == nil {
- cs.binlog.Log(&binarylog.ClientMessage{
+ if len(cs.binlogs) != 0 && err == nil {
+ cm := &binarylog.ClientMessage{
OnClientSide: true,
Message: data,
- })
+ }
+ for _, binlog := range cs.binlogs {
+ binlog.Log(cm)
+ }
}
return err
}
func (cs *clientStream) RecvMsg(m interface{}) error {
- if cs.binlog != nil && !cs.serverHeaderBinlogged {
+ if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged {
// Call Header() to binary log header if it's not already logged.
cs.Header()
}
var recvInfo *payloadInfo
- if cs.binlog != nil {
+ if len(cs.binlogs) != 0 {
recvInfo = &payloadInfo{}
}
err := cs.withRetry(func(a *csAttempt) error {
return a.recvMsg(m, recvInfo)
}, cs.commitAttemptLocked)
- if cs.binlog != nil && err == nil {
- cs.binlog.Log(&binarylog.ServerMessage{
+ if len(cs.binlogs) != 0 && err == nil {
+ sm := &binarylog.ServerMessage{
OnClientSide: true,
Message: recvInfo.uncompressedBytes,
- })
+ }
+ for _, binlog := range cs.binlogs {
+ binlog.Log(sm)
+ }
}
if err != nil || !cs.desc.ServerStreams {
// err != nil or non-server-streaming indicates end of stream.
cs.finish(err)
- if cs.binlog != nil {
+ if len(cs.binlogs) != 0 {
// finish will not log Trailer. Log Trailer here.
logEntry := &binarylog.ServerTrailer{
OnClientSide: true,
@@ -867,7 +906,9 @@ func (cs *clientStream) RecvMsg(m interface{}) error {
if peer, ok := peer.FromContext(cs.Context()); ok {
logEntry.PeerAddr = peer.Addr
}
- cs.binlog.Log(logEntry)
+ for _, binlog := range cs.binlogs {
+ binlog.Log(logEntry)
+ }
}
}
return err
@@ -888,10 +929,13 @@ func (cs *clientStream) CloseSend() error {
return nil
}
cs.withRetry(op, func() { cs.bufferForRetryLocked(0, op) })
- if cs.binlog != nil {
- cs.binlog.Log(&binarylog.ClientHalfClose{
+ if len(cs.binlogs) != 0 {
+ chc := &binarylog.ClientHalfClose{
OnClientSide: true,
- })
+ }
+ for _, binlog := range cs.binlogs {
+ binlog.Log(chc)
+ }
}
// We never returned an error here for reasons.
return nil
@@ -924,10 +968,13 @@ func (cs *clientStream) finish(err error) {
//
// Only one of cancel or trailer needs to be logged. In the cases where
// users don't call RecvMsg, users must have already canceled the RPC.
- if cs.binlog != nil && status.Code(err) == codes.Canceled {
- cs.binlog.Log(&binarylog.Cancel{
+ if len(cs.binlogs) != 0 && status.Code(err) == codes.Canceled {
+ c := &binarylog.Cancel{
OnClientSide: true,
- })
+ }
+ for _, binlog := range cs.binlogs {
+ binlog.Log(c)
+ }
}
if err == nil {
cs.retryThrottler.successfulRPC()
@@ -999,6 +1046,7 @@ func (a *csAttempt) recvMsg(m interface{}, payInfo *payloadInfo) (err error) {
}
return io.EOF // indicates successful end of stream.
}
+
return toRPCErr(err)
}
if a.trInfo != nil {
@@ -1447,7 +1495,7 @@ type serverStream struct {
statsHandler []stats.Handler
- binlog binarylog.MethodLogger
+ binlogs []binarylog.MethodLogger
// serverHeaderBinlogged indicates whether server header has been logged. It
// will happen when one of the following two happens: stream.SendHeader(),
// stream.Send().
@@ -1481,12 +1529,15 @@ func (ss *serverStream) SendHeader(md metadata.MD) error {
}
err = ss.t.WriteHeader(ss.s, md)
- if ss.binlog != nil && !ss.serverHeaderBinlogged {
+ if len(ss.binlogs) != 0 && !ss.serverHeaderBinlogged {
h, _ := ss.s.Header()
- ss.binlog.Log(&binarylog.ServerHeader{
+ sh := &binarylog.ServerHeader{
Header: h,
- })
+ }
ss.serverHeaderBinlogged = true
+ for _, binlog := range ss.binlogs {
+ binlog.Log(sh)
+ }
}
return err
}
@@ -1543,17 +1594,23 @@ func (ss *serverStream) SendMsg(m interface{}) (err error) {
if err := ss.t.Write(ss.s, hdr, payload, &transport.Options{Last: false}); err != nil {
return toRPCErr(err)
}
- if ss.binlog != nil {
+ if len(ss.binlogs) != 0 {
if !ss.serverHeaderBinlogged {
h, _ := ss.s.Header()
- ss.binlog.Log(&binarylog.ServerHeader{
+ sh := &binarylog.ServerHeader{
Header: h,
- })
+ }
ss.serverHeaderBinlogged = true
+ for _, binlog := range ss.binlogs {
+ binlog.Log(sh)
+ }
}
- ss.binlog.Log(&binarylog.ServerMessage{
+ sm := &binarylog.ServerMessage{
Message: data,
- })
+ }
+ for _, binlog := range ss.binlogs {
+ binlog.Log(sm)
+ }
}
if len(ss.statsHandler) != 0 {
for _, sh := range ss.statsHandler {
@@ -1592,13 +1649,16 @@ func (ss *serverStream) RecvMsg(m interface{}) (err error) {
}
}()
var payInfo *payloadInfo
- if len(ss.statsHandler) != 0 || ss.binlog != nil {
+ if len(ss.statsHandler) != 0 || len(ss.binlogs) != 0 {
payInfo = &payloadInfo{}
}
if err := recv(ss.p, ss.codec, ss.s, ss.dc, m, ss.maxReceiveMessageSize, payInfo, ss.decomp); err != nil {
if err == io.EOF {
- if ss.binlog != nil {
- ss.binlog.Log(&binarylog.ClientHalfClose{})
+ if len(ss.binlogs) != 0 {
+ chc := &binarylog.ClientHalfClose{}
+ for _, binlog := range ss.binlogs {
+ binlog.Log(chc)
+ }
}
return err
}
@@ -1619,10 +1679,13 @@ func (ss *serverStream) RecvMsg(m interface{}) (err error) {
})
}
}
- if ss.binlog != nil {
- ss.binlog.Log(&binarylog.ClientMessage{
+ if len(ss.binlogs) != 0 {
+ cm := &binarylog.ClientMessage{
Message: payInfo.uncompressedBytes,
- })
+ }
+ for _, binlog := range ss.binlogs {
+ binlog.Log(cm)
+ }
}
return nil
}
diff --git a/sdk/vendor/google.golang.org/grpc/tap/tap.go b/sdk/vendor/google.golang.org/grpc/tap/tap.go
index dbf34e6bb..bfa5dfa40 100644
--- a/sdk/vendor/google.golang.org/grpc/tap/tap.go
+++ b/sdk/vendor/google.golang.org/grpc/tap/tap.go
@@ -19,7 +19,7 @@
// Package tap defines the function handles which are executed on the transport
// layer of gRPC-Go and related information.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/sdk/vendor/google.golang.org/grpc/version.go b/sdk/vendor/google.golang.org/grpc/version.go
index 0eb2998cb..2198e7098 100644
--- a/sdk/vendor/google.golang.org/grpc/version.go
+++ b/sdk/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.48.0"
+const Version = "1.51.0"
diff --git a/sdk/vendor/google.golang.org/grpc/vet.sh b/sdk/vendor/google.golang.org/grpc/vet.sh
index ceb436c6c..bd8e0cdb3 100644
--- a/sdk/vendor/google.golang.org/grpc/vet.sh
+++ b/sdk/vendor/google.golang.org/grpc/vet.sh
@@ -67,7 +67,9 @@ elif [[ "$#" -ne 0 ]]; then
fi
# - Ensure all source files contain a copyright message.
-not git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" -- '*.go'
+# (Done in two parts because Darwin "git grep" has broken support for compound
+# exclusion matches.)
+(grep -L "DO NOT EDIT" $(git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)" -- '*.go') || true) | fail_on_output
# - Make sure all tests in grpc and grpc/test use leakcheck via Teardown.
not grep 'func Test[^(]' *_test.go
@@ -81,7 +83,7 @@ not git grep -l 'x/net/context' -- "*.go"
git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test'
# - Do not call grpclog directly. Use grpclog.Component instead.
-git grep -l 'grpclog.I\|grpclog.W\|grpclog.E\|grpclog.F\|grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go'
+git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpclog.F' --or -e 'grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go'
# - Ensure all ptypes proto packages are renamed when importing.
not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go"
@@ -147,7 +149,6 @@ grpc.NewGZIPDecompressor
grpc.RPCCompressor
grpc.RPCDecompressor
grpc.ServiceConfig
-grpc.WithBalancerName
grpc.WithCompressor
grpc.WithDecompressor
grpc.WithDialer
diff --git a/sdk/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go b/sdk/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
index c85f84694..6c37d4174 100644
--- a/sdk/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
+++ b/sdk/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
@@ -814,16 +814,22 @@ func (d decoder) unmarshalTimestamp(m protoreflect.Message) error {
return d.unexpectedTokenError(tok)
}
- t, err := time.Parse(time.RFC3339Nano, tok.ParsedString())
+ s := tok.ParsedString()
+ t, err := time.Parse(time.RFC3339Nano, s)
if err != nil {
return d.newError(tok.Pos(), "invalid %v value %v", genid.Timestamp_message_fullname, tok.RawString())
}
- // Validate seconds. No need to validate nanos because time.Parse would have
- // covered that already.
+ // Validate seconds.
secs := t.Unix()
if secs < minTimestampSeconds || secs > maxTimestampSeconds {
return d.newError(tok.Pos(), "%v value out of range: %v", genid.Timestamp_message_fullname, tok.RawString())
}
+ // Validate subseconds.
+ i := strings.LastIndexByte(s, '.') // start of subsecond field
+ j := strings.LastIndexAny(s, "Z-+") // start of timezone field
+ if i >= 0 && j >= i && j-i > len(".999999999") {
+ return d.newError(tok.Pos(), "invalid %v value %v", genid.Timestamp_message_fullname, tok.RawString())
+ }
fds := m.Descriptor().Fields()
fdSeconds := fds.ByNumber(genid.Timestamp_Seconds_field_number)
diff --git a/sdk/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/sdk/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
index e3cdf1c20..e7e65f509 100644
--- a/sdk/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
+++ b/sdk/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
@@ -528,6 +528,7 @@ const (
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_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
@@ -536,6 +537,7 @@ const (
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_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.uninterpreted_option"
@@ -547,6 +549,7 @@ const (
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_UninterpretedOption_field_number protoreflect.FieldNumber = 999
diff --git a/sdk/vendor/google.golang.org/protobuf/internal/version/version.go b/sdk/vendor/google.golang.org/protobuf/internal/version/version.go
index b480c5010..6c25e588e 100644
--- a/sdk/vendor/google.golang.org/protobuf/internal/version/version.go
+++ b/sdk/vendor/google.golang.org/protobuf/internal/version/version.go
@@ -53,7 +53,7 @@ const (
Major = 1
Minor = 28
Patch = 1
- PreRelease = ""
+ PreRelease = "devel"
)
// String formats the version string for this module in semver format.
diff --git a/sdk/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/sdk/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
index b03c1223c..74d0ce9b2 100644
--- a/sdk/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
+++ b/sdk/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
@@ -345,6 +345,8 @@ func (p *SourcePath) appendFieldOptions(b []byte) []byte {
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:
diff --git a/sdk/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/sdk/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
index abe4ab511..c62f27ad0 100644
--- a/sdk/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
+++ b/sdk/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
@@ -860,7 +860,6 @@ type FieldDescriptorProto struct {
// 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.
- // TODO(kenton): Base-64 encode?
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.
@@ -1382,16 +1381,16 @@ type FileOptions struct {
// 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"`
- // If set, all the classes from the .proto file are wrapped in a single
- // outer class with the given name. This applies to both Proto1
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
- // a .proto always translates to a single class, but you may want to
- // explicitly choose the class name).
+ // 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 set true, then the Java code generator will generate a separate .java
+ // 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 outer class
- // named by java_outer_classname. However, the outer class will still be
+ // 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"`
@@ -1849,7 +1848,17 @@ type FieldOptions struct {
// 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 2021, lazy does no correctness checks on the byte stream during
+ // parsing. This may lead to crashes if and when an invalid byte stream is
+ // finally parsed upon access.
+ //
+ // TODO(b/211906113): Enable validation on lazy fields.
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
@@ -1863,11 +1872,12 @@ type FieldOptions struct {
// Default values for FieldOptions fields.
const (
- Default_FieldOptions_Ctype = FieldOptions_STRING
- Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL
- Default_FieldOptions_Lazy = bool(false)
- Default_FieldOptions_Deprecated = bool(false)
- Default_FieldOptions_Weak = bool(false)
+ 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)
)
func (x *FieldOptions) Reset() {
@@ -1930,6 +1940,13 @@ func (x *FieldOptions) GetLazy() bool {
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
@@ -2715,8 +2732,8 @@ func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 {
// 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], ["qux", false] } represents
-// "foo.(bar.baz).qux".
+// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
+// "foo.(bar.baz).moo".
type UninterpretedOption_NamePart struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2781,8 +2798,8 @@ type SourceCodeInfo_Location struct {
// location.
//
// Each element is a field number or an index. They form a path from
- // the root FileDescriptorProto to the place where the definition. For
- // example, this path:
+ // 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
@@ -2834,13 +2851,13 @@ type SourceCodeInfo_Location struct {
// // Comment attached to baz.
// // Another line attached to baz.
//
- // // Comment attached to qux.
+ // // Comment attached to moo.
// //
- // // Another line attached to qux.
- // optional double qux = 4;
+ // // Another line attached to moo.
+ // optional double moo = 4;
//
// // Detached comment for corge. This is not leading or trailing comments
- // // to qux or corge because there are blank lines separating it from
+ // // to moo or corge because there are blank lines separating it from
// // both.
//
// // Detached comment for corge paragraph 2.
@@ -3304,7 +3321,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{
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, 0xd1, 0x02, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70,
+ 0x10, 0x27, 0x22, 0xe3, 0x02, 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,
@@ -3324,166 +3341,170 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{
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, 0x08, 0x10, 0x09,
- 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xe2, 0x03, 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, 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, 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, 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, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10,
- 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x73, 0x0a, 0x0c, 0x4f,
- 0x6e, 0x65, 0x6f, 0x66, 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, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02,
- 0x22, 0xc0, 0x01, 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, 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, 0x9e, 0x01, 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,
+ 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, 0x92, 0x04, 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,
- 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, 0x9c, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 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, 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, 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, 0x2a, 0x09, 0x08, 0xe8,
+ 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x73, 0x0a,
+ 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 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, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80,
+ 0x80, 0x02, 0x22, 0xc0, 0x01, 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, 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, 0x9e, 0x01, 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, 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, 0x9c, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 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, 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, 0xe0, 0x02, 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, 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, 0xe0, 0x02, 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,
+ 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, 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,
- 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,
+ 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, 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, 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, 0xd1, 0x01,
- 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, 0x6d, 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, 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,
+ 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, 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,
+ 0xd1, 0x01, 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, 0x6d, 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, 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 (
diff --git a/sdk/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/sdk/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
index 8c10797b9..cc8449757 100644
--- a/sdk/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
+++ b/sdk/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
@@ -153,7 +153,7 @@ import (
// foo = any.unpack(Foo.class);
// }
//
-// Example 3: Pack and unpack a message in Python.
+// Example 3: Pack and unpack a message in Python.
//
// foo = Foo(...)
// any = Any()
@@ -163,7 +163,7 @@ import (
// any.Unpack(foo)
// ...
//
-// Example 4: Pack and unpack a message in Go
+// Example 4: Pack and unpack a message in Go
//
// foo := &pb.Foo{...}
// any, err := anypb.New(foo)
@@ -184,7 +184,7 @@ import (
//
//
// JSON
-// ====
+//
// The JSON representation of an `Any` value uses the regular
// representation of the deserialized, embedded message, with an
// additional field `@type` which contains the type URL. Example:
diff --git a/sdk/vendor/modules.txt b/sdk/vendor/modules.txt
index 12ddc642d..8691cf0eb 100644
--- a/sdk/vendor/modules.txt
+++ b/sdk/vendor/modules.txt
@@ -19,7 +19,7 @@ github.com/golang/protobuf/ptypes
github.com/golang/protobuf/ptypes/any
github.com/golang/protobuf/ptypes/duration
github.com/golang/protobuf/ptypes/timestamp
-# github.com/google/go-cmp v0.5.8
+# github.com/google/go-cmp v0.5.9
## explicit; go 1.13
# github.com/grpc-ecosystem/go-grpc-middleware v1.3.0
## explicit; go 1.14
@@ -38,15 +38,15 @@ github.com/pmezard/go-difflib/difflib
# github.com/sirupsen/logrus v1.9.0
## explicit; go 1.13
github.com/sirupsen/logrus
-# github.com/stretchr/objx v0.4.0
+# github.com/stretchr/objx v0.5.0
## explicit; go 1.12
github.com/stretchr/objx
-# github.com/stretchr/testify v1.8.0
+# github.com/stretchr/testify v1.8.1
## explicit; go 1.13
github.com/stretchr/testify/assert
github.com/stretchr/testify/mock
github.com/stretchr/testify/require
-# golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48
+# golang.org/x/net v0.4.0
## explicit; go 1.17
golang.org/x/net/http/httpguts
golang.org/x/net/http2
@@ -54,22 +54,22 @@ golang.org/x/net/http2/hpack
golang.org/x/net/idna
golang.org/x/net/internal/timeseries
golang.org/x/net/trace
-# golang.org/x/sys v0.0.0-20220804214406-8e32c043e418
+# golang.org/x/sys v0.3.0
## explicit; go 1.17
golang.org/x/sys/internal/unsafeheader
golang.org/x/sys/unix
golang.org/x/sys/windows
-# golang.org/x/text v0.4.0
+# golang.org/x/text v0.5.0
## explicit; go 1.17
golang.org/x/text/secure/bidirule
golang.org/x/text/transform
golang.org/x/text/unicode/bidi
golang.org/x/text/unicode/norm
-# google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58
-## explicit; go 1.18
+# google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37
+## explicit; go 1.19
google.golang.org/genproto/googleapis/rpc/status
-# google.golang.org/grpc v1.48.0
-## explicit; go 1.14
+# google.golang.org/grpc v1.51.0
+## explicit; go 1.17
google.golang.org/grpc
google.golang.org/grpc/attributes
google.golang.org/grpc/backoff
@@ -119,7 +119,7 @@ google.golang.org/grpc/stats
google.golang.org/grpc/status
google.golang.org/grpc/tap
google.golang.org/grpc/test/bufconn
-# google.golang.org/protobuf v1.28.1
+# google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8
## explicit; go 1.11
google.golang.org/protobuf/encoding/protojson
google.golang.org/protobuf/encoding/prototext
diff --git a/test/performance/go.mod b/test/performance/go.mod
index 4042ab27c..3a54fc420 100644
--- a/test/performance/go.mod
+++ b/test/performance/go.mod
@@ -13,9 +13,9 @@ require (
github.com/prometheus/client_golang v1.13.0
github.com/sanity-io/litter v1.5.5
github.com/sirupsen/logrus v1.9.0
- github.com/stretchr/testify v1.8.0
- go.uber.org/atomic v1.9.0
- google.golang.org/grpc v1.48.0
+ github.com/stretchr/testify v1.8.1
+ go.uber.org/atomic v1.10.0
+ google.golang.org/grpc v1.51.0
)
require (
@@ -26,11 +26,11 @@ require (
github.com/fsnotify/fsnotify v1.5.4 // indirect
github.com/go-ole/go-ole v1.2.6 // indirect
github.com/golang/protobuf v1.5.2 // indirect
- github.com/google/go-cmp v0.5.8 // indirect
+ github.com/google/go-cmp v0.5.9 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
- github.com/inconshreveable/mousetrap v1.0.1 // indirect
- github.com/klauspost/compress v1.15.9 // indirect
+ github.com/inconshreveable/mousetrap v1.1.0 // indirect
+ github.com/klauspost/compress v1.15.13 // indirect
github.com/klauspost/cpuid/v2 v2.1.0 // indirect
github.com/lufia/plan9stats v0.0.0-20220517141722-cf486979b281 // indirect
github.com/magiconair/properties v1.8.6 // indirect
@@ -57,11 +57,11 @@ require (
github.com/shirou/gopsutil/v3 v3.22.7 // indirect
github.com/spf13/afero v1.9.2 // indirect
github.com/spf13/cast v1.5.0 // indirect
- github.com/spf13/cobra v1.5.0 // indirect
+ github.com/spf13/cobra v1.6.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/spf13/viper v1.12.0 // indirect
- github.com/stretchr/objx v0.4.0 // indirect
+ github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.4.0 // indirect
github.com/tklauser/go-sysconf v0.3.10 // indirect
github.com/tklauser/numcpus v0.5.0 // indirect
@@ -69,13 +69,13 @@ require (
github.com/vardius/message-bus v1.1.5 // indirect
github.com/yusufpapurcu/wmi v1.2.2 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
- golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 // indirect
- golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 // indirect
- golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 // indirect
- golang.org/x/text v0.4.0 // indirect
+ golang.org/x/net v0.4.0 // indirect
+ golang.org/x/sync v0.1.0 // indirect
+ golang.org/x/sys v0.3.0 // indirect
+ golang.org/x/text v0.5.0 // indirect
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
- google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 // indirect
- google.golang.org/protobuf v1.28.1 // indirect
+ google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 // indirect
+ google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 // indirect
gopkg.in/ini.v1 v1.66.6 // indirect
gopkg.in/mcuadros/go-syslog.v2 v2.3.0 // indirect
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 // indirect
diff --git a/test/performance/go.sum b/test/performance/go.sum
index 50581e3f9..460946c6f 100644
--- a/test/performance/go.sum
+++ b/test/performance/go.sum
@@ -43,7 +43,6 @@ github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuy
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190717042225-c3de453c63f4/go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0=
github.com/alecthomas/units v0.0.0-20190924025748-f65c72e2690d/go.mod h1:rBZYJk541a8SKzHPHnH3zbiI+7dagKZ0cgpgrD7Fyho=
-github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q=
github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8=
github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM=
@@ -61,10 +60,6 @@ github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDk
github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f/go.mod h1:M8M6+tZqaGXZJjfX53e64911xZQV5JYwmTeXPW+k8Sc=
github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk=
-github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
-github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
-github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -75,14 +70,12 @@ github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.m
github.com/envoyproxy/go-control-plane v0.9.4/go.mod h1:6rpuAdCZL397s3pYoYcLgu1mIlRU8Am5FuJP05cCM98=
github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po=
github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk=
-github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c=
github.com/frankban/quicktest v1.14.3 h1:FJKSZTDHjyhriyC81FLQ0LY93eSai0ZyR/ZIkd3ZUKE=
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
github.com/fsnotify/fsnotify v1.5.4 h1:jRbGcIw6P2Meqdwuo0H1p6JVLbL5DHKAKlYndzMwVZI=
github.com/fsnotify/fsnotify v1.5.4/go.mod h1:OVB6XrOHzAwXMpEM7uPOzcehqUV2UqJxmVXmkdnm1bU=
-github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8=
@@ -144,8 +137,9 @@ github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/
github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
-github.com/google/go-cmp v0.5.8 h1:e6P7q2lk1O+qJJb4BtCQXlK8vWEO8V1ZeuEdJNOqZyg=
github.com/google/go-cmp v0.5.8/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
+github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
+github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY=
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@@ -170,7 +164,6 @@ github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5m
github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 h1:+9834+KizmvFV7pXQGSXQTsaWhq2GjuNUt0aUU0YBYw=
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0/go.mod h1:z0ButlSOZa5vEBq9m2m2hlwIgKw+rp3sdCBRoJY+30Y=
-github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4=
@@ -178,9 +171,9 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
-github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
-github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
+github.com/inconshreveable/mousetrap v1.1.0 h1:wN+x4NVGpMsO7ErUn/mUI3vEoE6Jt13X2s0bqwp9tc8=
+github.com/inconshreveable/mousetrap v1.1.0/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4=
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
@@ -195,8 +188,8 @@ github.com/kelseyhightower/envconfig v1.4.0 h1:Im6hONhd3pLkfDFsbRgu68RDNkGF1r3dv
github.com/kelseyhightower/envconfig v1.4.0/go.mod h1:cccZRl6mQpaq41TPp5QxidR+Sa3axMbJDNb//FQX6Gg=
github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
-github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
-github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
+github.com/klauspost/compress v1.15.13 h1:NFn1Wr8cfnenSJSA46lLq4wHCcBzKTSjnBIexDMMOV0=
+github.com/klauspost/compress v1.15.13/go.mod h1:QPwzmACJjUTFsnSHH934V6woptycfrDDJnH7hvFVbGM=
github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0=
github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
@@ -297,7 +290,6 @@ github.com/prometheus/procfs v0.6.0/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1
github.com/prometheus/procfs v0.7.3/go.mod h1:cz+aTbrPOrUb4q7XlbU9ygM+/jj0fzG6c1xBZuNvfVA=
github.com/prometheus/procfs v0.8.0 h1:ODq8ZFEaYeCaZOJlZZdJA2AbQR98dSHSM1KW/You5mo=
github.com/prometheus/procfs v0.8.0/go.mod h1:z7EfXMXOkbkqb9IINtpCn86r/to3BnA0uaxHdg830/4=
-github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
github.com/rogpeppe/go-internal v1.6.1 h1:/FiVV8dS/e+YqF2JvO3yXRFbBLTIuSDkuC7aBOAvL+k=
github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
@@ -319,8 +311,8 @@ github.com/spf13/afero v1.9.2 h1:j49Hj62F0n+DaZ1dDCvhABaPNSGNkt32oRFxI33IEMw=
github.com/spf13/afero v1.9.2/go.mod h1:iUV7ddyEEZPO5gA3zD4fJt6iStLlL+Lg4m2cihcDf8Y=
github.com/spf13/cast v1.5.0 h1:rj3WzYc11XZaIZMPKmwP96zkFEnnAmV8s6XbB2aY32w=
github.com/spf13/cast v1.5.0/go.mod h1:SpXXQ5YoyJw6s3/6cMTQuxvgRl3PCJiyaX9p6b155UU=
-github.com/spf13/cobra v1.5.0 h1:X+jTBEBqF0bHN+9cSMgmfuvv2VHJ9ezmFNf9Y/XstYU=
-github.com/spf13/cobra v1.5.0/go.mod h1:dWXEIy2H428czQCjInthrTRUg7yKbok+2Qi/yBIJoUM=
+github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
+github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
github.com/spf13/jwalterweatherman v1.1.0 h1:ue6voC5bR5F8YxI5S67j9i582FU4Qvo2bmqnqMYADFk=
github.com/spf13/jwalterweatherman v1.1.0/go.mod h1:aNWZUN0dPAAO/Ljvb5BEdw96iTZ0EXowPYD95IqWIGo=
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
@@ -329,8 +321,9 @@ github.com/spf13/viper v1.12.0 h1:CZ7eSOd3kZoaYDLbXnmzgQI5RlciuXBMA+18HwHRfZQ=
github.com/spf13/viper v1.12.0/go.mod h1:b6COn30jlNxbm/V2IqWiNWkJ+vZNiMNksliPCiuKtSI=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
-github.com/stretchr/objx v0.4.0 h1:M2gUjqZET1qApGOWNSnZ49BAIMX4F/1plDv3+l31EJ4=
github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
+github.com/stretchr/objx v0.5.0 h1:1zr/of2m5FGMsad5YfcqgdqdWrIhu+EBEJRhR1U7z/c=
+github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
github.com/stretchr/testify v0.0.0-20161117074351-18a02ba4a312/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
@@ -339,8 +332,9 @@ github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
github.com/stretchr/testify v1.7.2/go.mod h1:R6va5+xMeoiuVRoj+gSkQ7d3FALtqAAGI1FQKckRals=
-github.com/stretchr/testify v1.8.0 h1:pSgiaMZlXftHpm5L7V1+rVB+AZJydKsMxsQBIJw4PKk=
github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU=
+github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
+github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
github.com/subosito/gotenv v1.4.0 h1:yAzM1+SmVcz5R4tXGsNMu1jUl2aOJXoiWUCEwwnGrvs=
github.com/subosito/gotenv v1.4.0/go.mod h1:mZd6rFysKEcUhUHXJk0C/08wAgyDBFuwEYL7vWWGaGo=
github.com/tklauser/go-sysconf v0.3.10 h1:IJ1AZGZRWbY8T5Vfk04D9WOA5WSejdflXxP03OUqALw=
@@ -366,10 +360,9 @@ go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw=
go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk=
-go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
-go.uber.org/atomic v1.9.0 h1:ECmE8Bn/WFTYwEW/bpKD3M8VtR/zQVbavAoalC1PYyE=
-go.uber.org/atomic v1.9.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc=
+go.uber.org/atomic v1.10.0 h1:9qC72Qh0+3MqyJbAn8YU5xVq1frD8bn3JtD2oXtafVQ=
+go.uber.org/atomic v1.10.0/go.mod h1:LUxbIzbOniOlMKjJjyPfpl4v+PKK2cNJn91OQbhoJI0=
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
@@ -458,8 +451,8 @@ golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qx
golang.org/x/net v0.0.0-20211015210444-4f30a5c0130f/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
-golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48 h1:N9Vc/rorQUDes6B9CNdIxAn5jODGj2wzfrei2x4wNj4=
-golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
+golang.org/x/net v0.4.0 h1:Q5QPcMlvfxFTAPV0+07Xz/MpK9NTXu2VDUuy0FeMfaU=
+golang.org/x/net v0.4.0/go.mod h1:MBQ8lrhLObU/6UmLb4fmbmk5OcyYmqtbGd/9yIeKjEE=
golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U=
golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw=
@@ -482,8 +475,8 @@ golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJ
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
-golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 h1:uVc8UZUe6tr40fFVnUP5Oj+veunVezqYl9z7DYw9xzw=
-golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sync v0.1.0 h1:wsuoTGHzEhffawBOhz5CYhcrV4IdKZbEyZjBMuTp12o=
+golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
golang.org/x/sys v0.0.0-20180830151530-49385e6e1522/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
@@ -545,8 +538,8 @@ golang.org/x/sys v0.0.0-20220503163025-988cb79eb6c6/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
-golang.org/x/sys v0.0.0-20220804214406-8e32c043e418 h1:9vYwv7OjYaky/tlAeD7C4oC9EsPTlaFl1H2jS++V+ME=
-golang.org/x/sys v0.0.0-20220804214406-8e32c043e418/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.3.0 h1:w8ZOecv6NaNa/zC8944JTU3vz4u6Lagfk4RPQxv92NQ=
+golang.org/x/sys v0.3.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
@@ -557,8 +550,8 @@ golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
-golang.org/x/text v0.4.0 h1:BrVqGRd7+k1DiOgtnFvAkoQEWQvBc25ouMJM6429SFg=
-golang.org/x/text v0.4.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
+golang.org/x/text v0.5.0 h1:OLmvp0KP+FVG99Ct/qFiL/Fhk4zp4QQnZ7b2U+5piUM=
+golang.org/x/text v0.5.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ=
@@ -669,7 +662,6 @@ google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfG
google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
-google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U=
google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo=
google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA=
@@ -683,8 +675,8 @@ google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6D
google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
-google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58 h1:sRT5xdTkj1Kbk30qbYC7VyMj73N5pZYsw6v+Nrzdhno=
-google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58/go.mod h1:iHe1svFLAZg9VWz891+QbRMwUv9O/1Ww+/mngYeThbc=
+google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37 h1:jmIfw8+gSvXcZSgaFAGyInDXeWzUhvYH57G/5GKMn70=
+google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37/go.mod h1:RGgjbofJ8xD9Sq1VVhDM1Vok1vRONV+rg+CjzG4SZKM=
google.golang.org/grpc v1.19.0/go.mod h1:mqu4LbDTu4XGKhr4mRzUsmM4RtVoemTSY81AxZiDr8c=
google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38=
google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM=
@@ -698,13 +690,11 @@ google.golang.org/grpc v1.29.1/go.mod h1:itym6AZVZYACWQqET3MqgPpjcuV5QH3BxFS3Iji
google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
-google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
-google.golang.org/grpc v1.48.0 h1:rQOsyJ/8+ufEDJd/Gdsz7HG220Mh9HAhFHRGnIjda0w=
-google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.51.0 h1:E1eGv1FTqoLIdnBCZufiSHgKjlqG6fKFf6pPWtMTh8U=
+google.golang.org/grpc v1.51.0/go.mod h1:wgNDFcnuBGmxLKI/qn4T+m5BtEBYXJPvibbUPsAIPww=
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
@@ -717,9 +707,8 @@ google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGj
google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c=
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
-google.golang.org/protobuf v1.28.1 h1:d0NfwRgPtno5B1Wa6L2DAG+KivqkdutMf1UhdNx175w=
-google.golang.org/protobuf v1.28.1/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8 h1:KR8+MyP7/qOlV+8Af01LtjL04bu7on42eVsxT4EyBQk=
+google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw=
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
@@ -736,7 +725,6 @@ gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkep
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
gopkg.in/yaml.v2 v2.2.1/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
-gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.2.5/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/test/performance/vendor/github.com/google/go-cmp/cmp/compare.go b/test/performance/vendor/github.com/google/go-cmp/cmp/compare.go
index fd2b3a42b..087320da7 100644
--- a/test/performance/vendor/github.com/google/go-cmp/cmp/compare.go
+++ b/test/performance/vendor/github.com/google/go-cmp/cmp/compare.go
@@ -13,21 +13,21 @@
//
// The primary features of cmp are:
//
-// • When the default behavior of equality does not suit the needs of the test,
-// custom equality functions can override the equality operation.
-// For example, an equality function may report floats as equal so long as they
-// are within some tolerance of each other.
+// - When the default behavior of equality does not suit the test's needs,
+// custom equality functions can override the equality operation.
+// For example, an equality function may report floats as equal so long as
+// they are within some tolerance of each other.
//
-// • Types that have an Equal method may use that method to determine equality.
-// This allows package authors to determine the equality operation for the types
-// that they define.
+// - Types with an Equal method may use that method to determine equality.
+// This allows package authors to determine the equality operation
+// for the types that they define.
//
-// • If no custom equality functions are used and no Equal method is defined,
-// equality is determined by recursively comparing the primitive kinds on both
-// values, much like reflect.DeepEqual. Unlike reflect.DeepEqual, unexported
-// fields are not compared by default; they result in panics unless suppressed
-// by using an Ignore option (see cmpopts.IgnoreUnexported) or explicitly
-// compared using the Exporter option.
+// - If no custom equality functions are used and no Equal method is defined,
+// equality is determined by recursively comparing the primitive kinds on
+// both values, much like reflect.DeepEqual. Unlike reflect.DeepEqual,
+// unexported fields are not compared by default; they result in panics
+// unless suppressed by using an Ignore option (see cmpopts.IgnoreUnexported)
+// or explicitly compared using the Exporter option.
package cmp
import (
@@ -45,25 +45,25 @@ import (
// Equal reports whether x and y are equal by recursively applying the
// following rules in the given order to x and y and all of their sub-values:
//
-// • Let S be the set of all Ignore, Transformer, and Comparer options that
-// remain after applying all path filters, value filters, and type filters.
-// If at least one Ignore exists in S, then the comparison is ignored.
-// If the number of Transformer and Comparer options in S is greater than one,
-// then Equal panics because it is ambiguous which option to use.
-// If S contains a single Transformer, then use that to transform the current
-// values and recursively call Equal on the output values.
-// If S contains a single Comparer, then use that to compare the current values.
-// Otherwise, evaluation proceeds to the next rule.
+// - Let S be the set of all Ignore, Transformer, and Comparer options that
+// remain after applying all path filters, value filters, and type filters.
+// If at least one Ignore exists in S, then the comparison is ignored.
+// If the number of Transformer and Comparer options in S is non-zero,
+// then Equal panics because it is ambiguous which option to use.
+// If S contains a single Transformer, then use that to transform
+// the current values and recursively call Equal on the output values.
+// If S contains a single Comparer, then use that to compare the current values.
+// Otherwise, evaluation proceeds to the next rule.
//
-// • If the values have an Equal method of the form "(T) Equal(T) bool" or
-// "(T) Equal(I) bool" where T is assignable to I, then use the result of
-// x.Equal(y) even if x or y is nil. Otherwise, no such method exists and
-// evaluation proceeds to the next rule.
+// - If the values have an Equal method of the form "(T) Equal(T) bool" or
+// "(T) Equal(I) bool" where T is assignable to I, then use the result of
+// x.Equal(y) even if x or y is nil. Otherwise, no such method exists and
+// evaluation proceeds to the next rule.
//
-// • Lastly, try to compare x and y based on their basic kinds.
-// Simple kinds like booleans, integers, floats, complex numbers, strings, and
-// channels are compared using the equivalent of the == operator in Go.
-// Functions are only equal if they are both nil, otherwise they are unequal.
+// - Lastly, try to compare x and y based on their basic kinds.
+// Simple kinds like booleans, integers, floats, complex numbers, strings,
+// and channels are compared using the equivalent of the == operator in Go.
+// Functions are only equal if they are both nil, otherwise they are unequal.
//
// Structs are equal if recursively calling Equal on all fields report equal.
// If a struct contains unexported fields, Equal panics unless an Ignore option
@@ -144,7 +144,7 @@ func rootStep(x, y interface{}) PathStep {
// so that they have the same parent type.
var t reflect.Type
if !vx.IsValid() || !vy.IsValid() || vx.Type() != vy.Type() {
- t = reflect.TypeOf((*interface{})(nil)).Elem()
+ t = anyType
if vx.IsValid() {
vvx := reflect.New(t).Elem()
vvx.Set(vx)
@@ -639,7 +639,9 @@ type dynChecker struct{ curr, next int }
// Next increments the state and reports whether a check should be performed.
//
// Checks occur every Nth function call, where N is a triangular number:
+//
// 0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 171 190 ...
+//
// See https://en.wikipedia.org/wiki/Triangular_number
//
// This sequence ensures that the cost of checks drops significantly as
diff --git a/test/performance/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go b/test/performance/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go
index bc196b16c..a248e5436 100644
--- a/test/performance/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go
+++ b/test/performance/vendor/github.com/google/go-cmp/cmp/internal/diff/diff.go
@@ -127,9 +127,9 @@ var randBool = rand.New(rand.NewSource(time.Now().Unix())).Intn(2) == 0
// This function returns an edit-script, which is a sequence of operations
// needed to convert one list into the other. The following invariants for
// the edit-script are maintained:
-// • eq == (es.Dist()==0)
-// • nx == es.LenX()
-// • ny == es.LenY()
+// - eq == (es.Dist()==0)
+// - nx == es.LenX()
+// - ny == es.LenY()
//
// This algorithm is not guaranteed to be an optimal solution (i.e., one that
// produces an edit-script with a minimal Levenshtein distance). This algorithm
@@ -169,12 +169,13 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) {
// A diagonal edge is equivalent to a matching symbol between both X and Y.
// Invariants:
- // • 0 ≤ fwdPath.X ≤ (fwdFrontier.X, revFrontier.X) ≤ revPath.X ≤ nx
- // • 0 ≤ fwdPath.Y ≤ (fwdFrontier.Y, revFrontier.Y) ≤ revPath.Y ≤ ny
+ // - 0 ≤ fwdPath.X ≤ (fwdFrontier.X, revFrontier.X) ≤ revPath.X ≤ nx
+ // - 0 ≤ fwdPath.Y ≤ (fwdFrontier.Y, revFrontier.Y) ≤ revPath.Y ≤ ny
//
// In general:
- // • fwdFrontier.X < revFrontier.X
- // • fwdFrontier.Y < revFrontier.Y
+ // - fwdFrontier.X < revFrontier.X
+ // - fwdFrontier.Y < revFrontier.Y
+ //
// Unless, it is time for the algorithm to terminate.
fwdPath := path{+1, point{0, 0}, make(EditScript, 0, (nx+ny)/2)}
revPath := path{-1, point{nx, ny}, make(EditScript, 0)}
@@ -195,19 +196,21 @@ func Difference(nx, ny int, f EqualFunc) (es EditScript) {
// computing sub-optimal edit-scripts between two lists.
//
// The algorithm is approximately as follows:
- // • Searching for differences switches back-and-forth between
- // a search that starts at the beginning (the top-left corner), and
- // a search that starts at the end (the bottom-right corner). The goal of
- // the search is connect with the search from the opposite corner.
- // • As we search, we build a path in a greedy manner, where the first
- // match seen is added to the path (this is sub-optimal, but provides a
- // decent result in practice). When matches are found, we try the next pair
- // of symbols in the lists and follow all matches as far as possible.
- // • When searching for matches, we search along a diagonal going through
- // through the "frontier" point. If no matches are found, we advance the
- // frontier towards the opposite corner.
- // • This algorithm terminates when either the X coordinates or the
- // Y coordinates of the forward and reverse frontier points ever intersect.
+ // - Searching for differences switches back-and-forth between
+ // a search that starts at the beginning (the top-left corner), and
+ // a search that starts at the end (the bottom-right corner).
+ // The goal of the search is connect with the search
+ // from the opposite corner.
+ // - As we search, we build a path in a greedy manner,
+ // where the first match seen is added to the path (this is sub-optimal,
+ // but provides a decent result in practice). When matches are found,
+ // we try the next pair of symbols in the lists and follow all matches
+ // as far as possible.
+ // - When searching for matches, we search along a diagonal going through
+ // through the "frontier" point. If no matches are found,
+ // we advance the frontier towards the opposite corner.
+ // - This algorithm terminates when either the X coordinates or the
+ // Y coordinates of the forward and reverse frontier points ever intersect.
// This algorithm is correct even if searching only in the forward direction
// or in the reverse direction. We do both because it is commonly observed
@@ -389,6 +392,7 @@ type point struct{ X, Y int }
func (p *point) add(dx, dy int) { p.X += dx; p.Y += dy }
// zigzag maps a consecutive sequence of integers to a zig-zag sequence.
+//
// [0 1 2 3 4 5 ...] => [0 -1 +1 -2 +2 ...]
func zigzag(x int) int {
if x&1 != 0 {
diff --git a/test/performance/vendor/github.com/google/go-cmp/cmp/internal/value/zero.go b/test/performance/vendor/github.com/google/go-cmp/cmp/internal/value/zero.go
deleted file mode 100644
index 9147a2997..000000000
--- a/test/performance/vendor/github.com/google/go-cmp/cmp/internal/value/zero.go
+++ /dev/null
@@ -1,48 +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 value
-
-import (
- "math"
- "reflect"
-)
-
-// IsZero reports whether v is the zero value.
-// This does not rely on Interface and so can be used on unexported fields.
-func IsZero(v reflect.Value) bool {
- switch v.Kind() {
- case reflect.Bool:
- return v.Bool() == false
- 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:
- return math.Float64bits(real(v.Complex())) == 0 && math.Float64bits(imag(v.Complex())) == 0
- case reflect.String:
- return v.String() == ""
- case reflect.UnsafePointer:
- return v.Pointer() == 0
- case reflect.Chan, reflect.Func, reflect.Interface, reflect.Ptr, reflect.Map, reflect.Slice:
- return v.IsNil()
- case reflect.Array:
- for i := 0; i < v.Len(); i++ {
- if !IsZero(v.Index(i)) {
- return false
- }
- }
- return true
- case reflect.Struct:
- for i := 0; i < v.NumField(); i++ {
- if !IsZero(v.Field(i)) {
- return false
- }
- }
- return true
- }
- return false
-}
diff --git a/test/performance/vendor/github.com/google/go-cmp/cmp/options.go b/test/performance/vendor/github.com/google/go-cmp/cmp/options.go
index e57b9eb53..1f9ca9c48 100644
--- a/test/performance/vendor/github.com/google/go-cmp/cmp/options.go
+++ b/test/performance/vendor/github.com/google/go-cmp/cmp/options.go
@@ -33,6 +33,7 @@ type Option interface {
}
// applicableOption represents the following types:
+//
// Fundamental: ignore | validator | *comparer | *transformer
// Grouping: Options
type applicableOption interface {
@@ -43,6 +44,7 @@ type applicableOption interface {
}
// coreOption represents the following types:
+//
// Fundamental: ignore | validator | *comparer | *transformer
// Filters: *pathFilter | *valuesFilter
type coreOption interface {
@@ -336,9 +338,9 @@ func (tr transformer) String() string {
// both implement T.
//
// The equality function must be:
-// • Symmetric: equal(x, y) == equal(y, x)
-// • Deterministic: equal(x, y) == equal(x, y)
-// • Pure: equal(x, y) does not modify x or y
+// - Symmetric: equal(x, y) == equal(y, x)
+// - Deterministic: equal(x, y) == equal(x, y)
+// - Pure: equal(x, y) does not modify x or y
func Comparer(f interface{}) Option {
v := reflect.ValueOf(f)
if !function.IsType(v.Type(), function.Equal) || v.IsNil() {
@@ -430,7 +432,7 @@ func AllowUnexported(types ...interface{}) Option {
}
// Result represents the comparison result for a single node and
-// is provided by cmp when calling Result (see Reporter).
+// is provided by cmp when calling Report (see Reporter).
type Result struct {
_ [0]func() // Make Result incomparable
flags resultFlags
diff --git a/test/performance/vendor/github.com/google/go-cmp/cmp/path.go b/test/performance/vendor/github.com/google/go-cmp/cmp/path.go
index c71003463..a0a588502 100644
--- a/test/performance/vendor/github.com/google/go-cmp/cmp/path.go
+++ b/test/performance/vendor/github.com/google/go-cmp/cmp/path.go
@@ -41,13 +41,13 @@ type PathStep interface {
// The type of each valid value is guaranteed to be identical to Type.
//
// In some cases, one or both may be invalid or have restrictions:
- // • For StructField, both are not interface-able if the current field
- // is unexported and the struct type is not explicitly permitted by
- // an Exporter to traverse unexported fields.
- // • For SliceIndex, one may be invalid if an element is missing from
- // either the x or y slice.
- // • For MapIndex, one may be invalid if an entry is missing from
- // either the x or y map.
+ // - For StructField, both are not interface-able if the current field
+ // is unexported and the struct type is not explicitly permitted by
+ // an Exporter to traverse unexported fields.
+ // - For SliceIndex, one may be invalid if an element is missing from
+ // either the x or y slice.
+ // - For MapIndex, one may be invalid if an entry is missing from
+ // either the x or y map.
//
// The provided values must not be mutated.
Values() (vx, vy reflect.Value)
@@ -94,6 +94,7 @@ func (pa Path) Index(i int) PathStep {
// The simplified path only contains struct field accesses.
//
// For example:
+//
// MyMap.MySlices.MyField
func (pa Path) String() string {
var ss []string
@@ -108,6 +109,7 @@ func (pa Path) String() string {
// GoString returns the path to a specific node using Go syntax.
//
// For example:
+//
// (*root.MyMap["key"].(*mypkg.MyStruct).MySlices)[2][3].MyField
func (pa Path) GoString() string {
var ssPre, ssPost []string
@@ -159,7 +161,7 @@ func (ps pathStep) String() string {
if ps.typ == nil {
return ""
}
- s := ps.typ.String()
+ s := value.TypeString(ps.typ, false)
if s == "" || strings.ContainsAny(s, "{}\n") {
return "root" // Type too simple or complex to print
}
@@ -282,7 +284,7 @@ type typeAssertion struct {
func (ta TypeAssertion) Type() reflect.Type { return ta.typ }
func (ta TypeAssertion) Values() (vx, vy reflect.Value) { return ta.vx, ta.vy }
-func (ta TypeAssertion) String() string { return fmt.Sprintf(".(%v)", ta.typ) }
+func (ta TypeAssertion) String() string { return fmt.Sprintf(".(%v)", value.TypeString(ta.typ, false)) }
// Transform is a transformation from the parent type to the current type.
type Transform struct{ *transform }
diff --git a/test/performance/vendor/github.com/google/go-cmp/cmp/report_compare.go b/test/performance/vendor/github.com/google/go-cmp/cmp/report_compare.go
index 1ef65ac1d..2050bf6b4 100644
--- a/test/performance/vendor/github.com/google/go-cmp/cmp/report_compare.go
+++ b/test/performance/vendor/github.com/google/go-cmp/cmp/report_compare.go
@@ -7,8 +7,6 @@ package cmp
import (
"fmt"
"reflect"
-
- "github.com/google/go-cmp/cmp/internal/value"
)
// numContextRecords is the number of surrounding equal records to print.
@@ -117,7 +115,7 @@ func (opts formatOptions) FormatDiff(v *valueNode, ptrs *pointerReferences) (out
// For leaf nodes, format the value based on the reflect.Values alone.
// As a special case, treat equal []byte as a leaf nodes.
- isBytes := v.Type.Kind() == reflect.Slice && v.Type.Elem() == reflect.TypeOf(byte(0))
+ isBytes := v.Type.Kind() == reflect.Slice && v.Type.Elem() == byteType
isEqualBytes := isBytes && v.NumDiff+v.NumIgnored+v.NumTransformed == 0
if v.MaxDepth == 0 || isEqualBytes {
switch opts.DiffMode {
@@ -248,11 +246,11 @@ func (opts formatOptions) formatDiffList(recs []reportRecord, k reflect.Kind, pt
var isZero bool
switch opts.DiffMode {
case diffIdentical:
- isZero = value.IsZero(r.Value.ValueX) || value.IsZero(r.Value.ValueY)
+ isZero = r.Value.ValueX.IsZero() || r.Value.ValueY.IsZero()
case diffRemoved:
- isZero = value.IsZero(r.Value.ValueX)
+ isZero = r.Value.ValueX.IsZero()
case diffInserted:
- isZero = value.IsZero(r.Value.ValueY)
+ isZero = r.Value.ValueY.IsZero()
}
if isZero {
continue
diff --git a/test/performance/vendor/github.com/google/go-cmp/cmp/report_reflect.go b/test/performance/vendor/github.com/google/go-cmp/cmp/report_reflect.go
index 287b89358..2ab41fad3 100644
--- a/test/performance/vendor/github.com/google/go-cmp/cmp/report_reflect.go
+++ b/test/performance/vendor/github.com/google/go-cmp/cmp/report_reflect.go
@@ -16,6 +16,13 @@ import (
"github.com/google/go-cmp/cmp/internal/value"
)
+var (
+ anyType = reflect.TypeOf((*interface{})(nil)).Elem()
+ stringType = reflect.TypeOf((*string)(nil)).Elem()
+ bytesType = reflect.TypeOf((*[]byte)(nil)).Elem()
+ byteType = reflect.TypeOf((*byte)(nil)).Elem()
+)
+
type formatValueOptions struct {
// AvoidStringer controls whether to avoid calling custom stringer
// methods like error.Error or fmt.Stringer.String.
@@ -184,7 +191,7 @@ func (opts formatOptions) FormatValue(v reflect.Value, parentKind reflect.Kind,
}
for i := 0; i < v.NumField(); i++ {
vv := v.Field(i)
- if value.IsZero(vv) {
+ if vv.IsZero() {
continue // Elide fields with zero values
}
if len(list) == maxLen {
@@ -205,7 +212,7 @@ func (opts formatOptions) FormatValue(v reflect.Value, parentKind reflect.Kind,
}
// Check whether this is a []byte of text data.
- if t.Elem() == reflect.TypeOf(byte(0)) {
+ if t.Elem() == byteType {
b := v.Bytes()
isPrintSpace := func(r rune) bool { return unicode.IsPrint(r) || unicode.IsSpace(r) }
if len(b) > 0 && utf8.Valid(b) && len(bytes.TrimFunc(b, isPrintSpace)) == 0 {
diff --git a/test/performance/vendor/github.com/google/go-cmp/cmp/report_slices.go b/test/performance/vendor/github.com/google/go-cmp/cmp/report_slices.go
index 68b5c1ae1..23e444f62 100644
--- a/test/performance/vendor/github.com/google/go-cmp/cmp/report_slices.go
+++ b/test/performance/vendor/github.com/google/go-cmp/cmp/report_slices.go
@@ -104,7 +104,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
case t.Kind() == reflect.String:
sx, sy = vx.String(), vy.String()
isString = true
- case t.Kind() == reflect.Slice && t.Elem() == reflect.TypeOf(byte(0)):
+ case t.Kind() == reflect.Slice && t.Elem() == byteType:
sx, sy = string(vx.Bytes()), string(vy.Bytes())
isString = true
case t.Kind() == reflect.Array:
@@ -147,7 +147,10 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
})
efficiencyLines := float64(esLines.Dist()) / float64(len(esLines))
efficiencyBytes := float64(esBytes.Dist()) / float64(len(esBytes))
- isPureLinedText = efficiencyLines < 4*efficiencyBytes
+ quotedLength := len(strconv.Quote(sx + sy))
+ unquotedLength := len(sx) + len(sy)
+ escapeExpansionRatio := float64(quotedLength) / float64(unquotedLength)
+ isPureLinedText = efficiencyLines < 4*efficiencyBytes || escapeExpansionRatio > 1.1
}
}
@@ -171,12 +174,13 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
// differences in a string literal. This format is more readable,
// but has edge-cases where differences are visually indistinguishable.
// This format is avoided under the following conditions:
- // • A line starts with `"""`
- // • A line starts with "..."
- // • A line contains non-printable characters
- // • Adjacent different lines differ only by whitespace
+ // - A line starts with `"""`
+ // - A line starts with "..."
+ // - A line contains non-printable characters
+ // - Adjacent different lines differ only by whitespace
//
// For example:
+ //
// """
// ... // 3 identical lines
// foo
@@ -231,7 +235,7 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
var out textNode = &textWrap{Prefix: "(", Value: list2, Suffix: ")"}
switch t.Kind() {
case reflect.String:
- if t != reflect.TypeOf(string("")) {
+ if t != stringType {
out = opts.FormatType(t, out)
}
case reflect.Slice:
@@ -326,12 +330,12 @@ func (opts formatOptions) FormatDiffSlice(v *valueNode) textNode {
switch t.Kind() {
case reflect.String:
out = &textWrap{Prefix: "strings.Join(", Value: out, Suffix: fmt.Sprintf(", %q)", delim)}
- if t != reflect.TypeOf(string("")) {
+ if t != stringType {
out = opts.FormatType(t, out)
}
case reflect.Slice:
out = &textWrap{Prefix: "bytes.Join(", Value: out, Suffix: fmt.Sprintf(", %q)", delim)}
- if t != reflect.TypeOf([]byte(nil)) {
+ if t != bytesType {
out = opts.FormatType(t, out)
}
}
@@ -446,7 +450,6 @@ func (opts formatOptions) formatDiffSlice(
// {NumIdentical: 3},
// {NumInserted: 1},
// ]
-//
func coalesceAdjacentEdits(name string, es diff.EditScript) (groups []diffStats) {
var prevMode byte
lastStats := func(mode byte) *diffStats {
@@ -503,7 +506,6 @@ func coalesceAdjacentEdits(name string, es diff.EditScript) (groups []diffStats)
// {NumIdentical: 8, NumRemoved: 12, NumInserted: 3},
// {NumIdentical: 63},
// ]
-//
func coalesceInterveningIdentical(groups []diffStats, windowSize int) []diffStats {
groups, groupsOrig := groups[:0], groups
for i, ds := range groupsOrig {
@@ -548,7 +550,6 @@ func coalesceInterveningIdentical(groups []diffStats, windowSize int) []diffStat
// {NumRemoved: 9},
// {NumIdentical: 64}, // incremented by 10
// ]
-//
func cleanupSurroundingIdentical(groups []diffStats, eq func(i, j int) bool) []diffStats {
var ix, iy int // indexes into sequence x and y
for i, ds := range groups {
diff --git a/test/performance/vendor/github.com/google/go-cmp/cmp/report_text.go b/test/performance/vendor/github.com/google/go-cmp/cmp/report_text.go
index 0fd46d7ff..388fcf571 100644
--- a/test/performance/vendor/github.com/google/go-cmp/cmp/report_text.go
+++ b/test/performance/vendor/github.com/google/go-cmp/cmp/report_text.go
@@ -393,6 +393,7 @@ func (s diffStats) Append(ds diffStats) diffStats {
// String prints a humanly-readable summary of coalesced records.
//
// Example:
+//
// diffStats{Name: "Field", NumIgnored: 5}.String() => "5 ignored fields"
func (s diffStats) String() string {
var ss []string
diff --git a/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_others.go b/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_others.go
index 9d2d8a4ba..06a91f086 100644
--- a/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_others.go
+++ b/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_others.go
@@ -1,3 +1,4 @@
+//go:build !windows
// +build !windows
package mousetrap
diff --git a/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_windows.go b/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_windows.go
index 336142a5e..0c5688021 100644
--- a/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_windows.go
+++ b/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_windows.go
@@ -1,81 +1,32 @@
-// +build windows
-// +build !go1.4
-
package mousetrap
import (
- "fmt"
- "os"
"syscall"
"unsafe"
)
-const (
- // defined by the Win32 API
- th32cs_snapprocess uintptr = 0x2
-)
-
-var (
- kernel = syscall.MustLoadDLL("kernel32.dll")
- CreateToolhelp32Snapshot = kernel.MustFindProc("CreateToolhelp32Snapshot")
- Process32First = kernel.MustFindProc("Process32FirstW")
- Process32Next = kernel.MustFindProc("Process32NextW")
-)
-
-// ProcessEntry32 structure defined by the Win32 API
-type processEntry32 struct {
- dwSize uint32
- cntUsage uint32
- th32ProcessID uint32
- th32DefaultHeapID int
- th32ModuleID uint32
- cntThreads uint32
- th32ParentProcessID uint32
- pcPriClassBase int32
- dwFlags uint32
- szExeFile [syscall.MAX_PATH]uint16
-}
-
-func getProcessEntry(pid int) (pe *processEntry32, err error) {
- snapshot, _, e1 := CreateToolhelp32Snapshot.Call(th32cs_snapprocess, uintptr(0))
- if snapshot == uintptr(syscall.InvalidHandle) {
- err = fmt.Errorf("CreateToolhelp32Snapshot: %v", e1)
- return
+func getProcessEntry(pid int) (*syscall.ProcessEntry32, error) {
+ snapshot, err := syscall.CreateToolhelp32Snapshot(syscall.TH32CS_SNAPPROCESS, 0)
+ if err != nil {
+ return nil, err
}
- defer syscall.CloseHandle(syscall.Handle(snapshot))
-
- var processEntry processEntry32
- processEntry.dwSize = uint32(unsafe.Sizeof(processEntry))
- ok, _, e1 := Process32First.Call(snapshot, uintptr(unsafe.Pointer(&processEntry)))
- if ok == 0 {
- err = fmt.Errorf("Process32First: %v", e1)
- return
+ 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 processEntry.th32ProcessID == uint32(pid) {
- pe = &processEntry
- return
+ if procEntry.ProcessID == uint32(pid) {
+ return &procEntry, nil
}
-
- ok, _, e1 = Process32Next.Call(snapshot, uintptr(unsafe.Pointer(&processEntry)))
- if ok == 0 {
- err = fmt.Errorf("Process32Next: %v", e1)
- return
+ err = syscall.Process32Next(snapshot, &procEntry)
+ if err != nil {
+ return nil, err
}
}
}
-func getppid() (pid int, err error) {
- pe, err := getProcessEntry(os.Getpid())
- if err != nil {
- return
- }
-
- pid = int(pe.th32ParentProcessID)
- return
-}
-
// StartedByExplorer returns true if the program was invoked by the user double-clicking
// on the executable from explorer.exe
//
@@ -83,16 +34,9 @@ func getppid() (pid int, err error) {
// 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 {
- ppid, err := getppid()
+ pe, err := getProcessEntry(syscall.Getppid())
if err != nil {
return false
}
-
- pe, err := getProcessEntry(ppid)
- if err != nil {
- return false
- }
-
- name := syscall.UTF16ToString(pe.szExeFile[:])
- return name == "explorer.exe"
+ return "explorer.exe" == syscall.UTF16ToString(pe.ExeFile[:])
}
diff --git a/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go b/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go
deleted file mode 100644
index 9a28e57c3..000000000
--- a/test/performance/vendor/github.com/inconshreveable/mousetrap/trap_windows_1.4.go
+++ /dev/null
@@ -1,46 +0,0 @@
-// +build windows
-// +build go1.4
-
-package mousetrap
-
-import (
- "os"
- "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(os.Getppid())
- if err != nil {
- return false
- }
- return "explorer.exe" == syscall.UTF16ToString(pe.ExeFile[:])
-}
diff --git a/test/performance/vendor/github.com/klauspost/compress/s2/README.md b/test/performance/vendor/github.com/klauspost/compress/s2/README.md
index 73c0c462d..1d80c42a5 100644
--- a/test/performance/vendor/github.com/klauspost/compress/s2/README.md
+++ b/test/performance/vendor/github.com/klauspost/compress/s2/README.md
@@ -325,35 +325,35 @@ The content compressed in this mode is fully compatible with the standard decode
Snappy vs S2 **compression** speed on 16 core (32 thread) computer, using all threads and a single thread (1 CPU):
-| File | S2 speed | S2 Throughput | S2 % smaller | S2 "better" | "better" throughput | "better" % smaller |
-|-----------------------------------------------------------------------------------------------------|----------|---------------|--------------|-------------|---------------------|--------------------|
-| [rawstudio-mint14.tar](https://files.klauspost.com/compress/rawstudio-mint14.7z) | 12.70x | 10556 MB/s | 7.35% | 4.15x | 3455 MB/s | 12.79% |
-| (1 CPU) | 1.14x | 948 MB/s | - | 0.42x | 349 MB/s | - |
-| [github-june-2days-2019.json](https://files.klauspost.com/compress/github-june-2days-2019.json.zst) | 17.13x | 14484 MB/s | 31.60% | 10.09x | 8533 MB/s | 37.71% |
-| (1 CPU) | 1.33x | 1127 MB/s | - | 0.70x | 589 MB/s | - |
-| [github-ranks-backup.bin](https://files.klauspost.com/compress/github-ranks-backup.bin.zst) | 15.14x | 12000 MB/s | -5.79% | 6.59x | 5223 MB/s | 5.80% |
-| (1 CPU) | 1.11x | 877 MB/s | - | 0.47x | 370 MB/s | - |
-| [consensus.db.10gb](https://files.klauspost.com/compress/consensus.db.10gb.zst) | 14.62x | 12116 MB/s | 15.90% | 5.35x | 4430 MB/s | 16.08% |
-| (1 CPU) | 1.38x | 1146 MB/s | - | 0.38x | 312 MB/s | - |
-| [adresser.json](https://files.klauspost.com/compress/adresser.json.zst) | 8.83x | 17579 MB/s | 43.86% | 6.54x | 13011 MB/s | 47.23% |
-| (1 CPU) | 1.14x | 2259 MB/s | - | 0.74x | 1475 MB/s | - |
-| [gob-stream](https://files.klauspost.com/compress/gob-stream.7z) | 16.72x | 14019 MB/s | 24.02% | 10.11x | 8477 MB/s | 30.48% |
-| (1 CPU) | 1.24x | 1043 MB/s | - | 0.70x | 586 MB/s | - |
-| [10gb.tar](http://mattmahoney.net/dc/10gb.html) | 13.33x | 9254 MB/s | 1.84% | 6.75x | 4686 MB/s | 6.72% |
-| (1 CPU) | 0.97x | 672 MB/s | - | 0.53x | 366 MB/s | - |
-| sharnd.out.2gb | 2.11x | 12639 MB/s | 0.01% | 1.98x | 11833 MB/s | 0.01% |
-| (1 CPU) | 0.93x | 5594 MB/s | - | 1.34x | 8030 MB/s | - |
-| [enwik9](http://mattmahoney.net/dc/textdata.html) | 19.34x | 8220 MB/s | 3.98% | 7.87x | 3345 MB/s | 15.82% |
-| (1 CPU) | 1.06x | 452 MB/s | - | 0.50x | 213 MB/s | - |
-| [silesia.tar](http://sun.aei.polsl.pl/~sdeor/corpus/silesia.zip) | 10.48x | 6124 MB/s | 5.67% | 3.76x | 2197 MB/s | 12.60% |
-| (1 CPU) | 0.97x | 568 MB/s | - | 0.46x | 271 MB/s | - |
-| [enwik10](https://encode.su/threads/3315-enwik10-benchmark-results) | 21.07x | 9020 MB/s | 6.36% | 6.91x | 2959 MB/s | 16.95% |
-| (1 CPU) | 1.07x | 460 MB/s | - | 0.51x | 220 MB/s | - |
+| File | S2 Speed | S2 Throughput | S2 % smaller | S2 "better" | "better" throughput | "better" % smaller |
+|---------------------------------------------------------------------------------------------------------|----------|---------------|--------------|-------------|---------------------|--------------------|
+| [rawstudio-mint14.tar](https://files.klauspost.com/compress/rawstudio-mint14.7z) | 16.33x | 10556 MB/s | 8.0% | 6.04x | 5252 MB/s | 14.7% |
+| (1 CPU) | 1.08x | 940 MB/s | - | 0.46x | 400 MB/s | - |
+| [github-june-2days-2019.json](https://files.klauspost.com/compress/github-june-2days-2019.json.zst) | 16.51x | 15224 MB/s | 31.70% | 9.47x | 8734 MB/s | 37.71% |
+| (1 CPU) | 1.26x | 1157 MB/s | - | 0.60x | 556 MB/s | - |
+| [github-ranks-backup.bin](https://files.klauspost.com/compress/github-ranks-backup.bin.zst) | 15.14x | 12598 MB/s | -5.76% | 6.23x | 5675 MB/s | 3.62% |
+| (1 CPU) | 1.02x | 932 MB/s | - | 0.47x | 432 MB/s | - |
+| [consensus.db.10gb](https://files.klauspost.com/compress/consensus.db.10gb.zst) | 11.21x | 12116 MB/s | 15.95% | 3.24x | 3500 MB/s | 18.00% |
+| (1 CPU) | 1.05x | 1135 MB/s | - | 0.27x | 292 MB/s | - |
+| [apache.log](https://files.klauspost.com/compress/apache.log.zst) | 8.55x | 16673 MB/s | 20.54% | 5.85x | 11420 MB/s | 24.97% |
+| (1 CPU) | 1.91x | 1771 MB/s | - | 0.53x | 1041 MB/s | - |
+| [gob-stream](https://files.klauspost.com/compress/gob-stream.7z) | 15.76x | 14357 MB/s | 24.01% | 8.67x | 7891 MB/s | 33.68% |
+| (1 CPU) | 1.17x | 1064 MB/s | - | 0.65x | 595 MB/s | - |
+| [10gb.tar](http://mattmahoney.net/dc/10gb.html) | 13.33x | 9835 MB/s | 2.34% | 6.85x | 4863 MB/s | 9.96% |
+| (1 CPU) | 0.97x | 689 MB/s | - | 0.55x | 387 MB/s | - |
+| sharnd.out.2gb | 9.11x | 13213 MB/s | 0.01% | 1.49x | 9184 MB/s | 0.01% |
+| (1 CPU) | 0.88x | 5418 MB/s | - | 0.77x | 5417 MB/s | - |
+| [sofia-air-quality-dataset csv](https://files.klauspost.com/compress/sofia-air-quality-dataset.tar.zst) | 22.00x | 11477 MB/s | 18.73% | 11.15x | 5817 MB/s | 27.88% |
+| (1 CPU) | 1.23x | 642 MB/s | - | 0.71x | 642 MB/s | - |
+| [silesia.tar](http://sun.aei.polsl.pl/~sdeor/corpus/silesia.zip) | 11.23x | 6520 MB/s | 5.9% | 5.35x | 3109 MB/s | 15.88% |
+| (1 CPU) | 1.05x | 607 MB/s | - | 0.52x | 304 MB/s | - |
+| [enwik9](https://files.klauspost.com/compress/enwik9.zst) | 19.28x | 8440 MB/s | 4.04% | 9.31x | 4076 MB/s | 18.04% |
+| (1 CPU) | 1.12x | 488 MB/s | - | 0.57x | 250 MB/s | - |
### Legend
-* `S2 speed`: Speed of S2 compared to Snappy, using 16 cores and 1 core.
-* `S2 throughput`: Throughput of S2 in MB/s.
+* `S2 Speed`: Speed of S2 compared to Snappy, using 16 cores and 1 core.
+* `S2 Throughput`: Throughput of S2 in MB/s.
* `S2 % smaller`: How many percent of the Snappy output size is S2 better.
* `S2 "better"`: Speed when enabling "better" compression mode in S2 compared to Snappy.
* `"better" throughput`: Speed when enabling "better" compression mode in S2 compared to Snappy.
@@ -361,7 +361,7 @@ Snappy vs S2 **compression** speed on 16 core (32 thread) computer, using all th
There is a good speedup across the board when using a single thread and a significant speedup when using multiple threads.
-Machine generated data gets by far the biggest compression boost, with size being being reduced by up to 45% of Snappy size.
+Machine generated data gets by far the biggest compression boost, with size being reduced by up to 35% of Snappy size.
The "better" compression mode sees a good improvement in all cases, but usually at a performance cost.
@@ -404,15 +404,15 @@ The "better" compression mode will actively look for shorter matches, which is w
Without assembly decompression is also very fast; single goroutine decompression speed. No assembly:
| File | S2 Throughput | S2 throughput |
-|--------------------------------|--------------|---------------|
-| consensus.db.10gb.s2 | 1.84x | 2289.8 MB/s |
-| 10gb.tar.s2 | 1.30x | 867.07 MB/s |
-| rawstudio-mint14.tar.s2 | 1.66x | 1329.65 MB/s |
-| github-june-2days-2019.json.s2 | 2.36x | 1831.59 MB/s |
-| github-ranks-backup.bin.s2 | 1.73x | 1390.7 MB/s |
-| enwik9.s2 | 1.67x | 681.53 MB/s |
-| adresser.json.s2 | 3.41x | 4230.53 MB/s |
-| silesia.tar.s2 | 1.52x | 811.58 |
+|--------------------------------|---------------|---------------|
+| consensus.db.10gb.s2 | 1.84x | 2289.8 MB/s |
+| 10gb.tar.s2 | 1.30x | 867.07 MB/s |
+| rawstudio-mint14.tar.s2 | 1.66x | 1329.65 MB/s |
+| github-june-2days-2019.json.s2 | 2.36x | 1831.59 MB/s |
+| github-ranks-backup.bin.s2 | 1.73x | 1390.7 MB/s |
+| enwik9.s2 | 1.67x | 681.53 MB/s |
+| adresser.json.s2 | 3.41x | 4230.53 MB/s |
+| silesia.tar.s2 | 1.52x | 811.58 |
Even though S2 typically compresses better than Snappy, decompression speed is always better.
@@ -450,14 +450,14 @@ The most reliable is a wide dataset.
For this we use [`webdevdata.org-2015-01-07-subset`](https://files.klauspost.com/compress/webdevdata.org-2015-01-07-4GB-subset.7z),
53927 files, total input size: 4,014,735,833 bytes. Single goroutine used.
-| * | Input | Output | Reduction | MB/s |
-|-------------------|------------|------------|-----------|--------|
-| S2 | 4014735833 | 1059723369 | 73.60% | **934.34** |
-| S2 Better | 4014735833 | 969670507 | 75.85% | 532.70 |
-| S2 Best | 4014735833 | 906625668 | **77.85%** | 46.84 |
-| Snappy | 4014735833 | 1128706759 | 71.89% | 762.59 |
-| S2, Snappy Output | 4014735833 | 1093821420 | 72.75% | 908.60 |
-| LZ4 | 4014735833 | 1079259294 | 73.12% | 526.94 |
+| * | Input | Output | Reduction | MB/s |
+|-------------------|------------|------------|------------|------------|
+| S2 | 4014735833 | 1059723369 | 73.60% | **936.73** |
+| S2 Better | 4014735833 | 961580539 | 76.05% | 451.10 |
+| S2 Best | 4014735833 | 899182886 | **77.60%** | 46.84 |
+| Snappy | 4014735833 | 1128706759 | 71.89% | 790.15 |
+| S2, Snappy Output | 4014735833 | 1093823291 | 72.75% | 936.60 |
+| LZ4 | 4014735833 | 1063768713 | 73.50% | 452.02 |
S2 delivers both the best single threaded throughput with regular mode and the best compression rate with "best".
"Better" mode provides the same compression speed as LZ4 with better compression ratio.
@@ -489,42 +489,23 @@ AMD64 assembly is use for both S2 and Snappy.
| Absolute Perf | Snappy size | S2 Size | Snappy Speed | S2 Speed | Snappy dec | S2 dec |
|-----------------------|-------------|---------|--------------|-------------|-------------|-------------|
-| html | 22843 | 21111 | 16246 MB/s | 17438 MB/s | 40972 MB/s | 49263 MB/s |
-| urls.10K | 335492 | 287326 | 7943 MB/s | 9693 MB/s | 22523 MB/s | 26484 MB/s |
-| fireworks.jpeg | 123034 | 123100 | 349544 MB/s | 273889 MB/s | 718321 MB/s | 827552 MB/s |
-| fireworks.jpeg (200B) | 146 | 155 | 8869 MB/s | 17773 MB/s | 33691 MB/s | 52421 MB/s |
-| paper-100k.pdf | 85304 | 84459 | 167546 MB/s | 101263 MB/s | 326905 MB/s | 291944 MB/s |
-| html_x_4 | 92234 | 21113 | 15194 MB/s | 50670 MB/s | 30843 MB/s | 32217 MB/s |
-| alice29.txt | 88034 | 85975 | 5936 MB/s | 6139 MB/s | 12882 MB/s | 20044 MB/s |
-| asyoulik.txt | 77503 | 79650 | 5517 MB/s | 6366 MB/s | 12735 MB/s | 22806 MB/s |
-| lcet10.txt | 234661 | 220670 | 6235 MB/s | 6067 MB/s | 14519 MB/s | 18697 MB/s |
-| plrabn12.txt | 319267 | 317985 | 5159 MB/s | 5726 MB/s | 11923 MB/s | 19901 MB/s |
-| geo.protodata | 23335 | 18690 | 21220 MB/s | 26529 MB/s | 56271 MB/s | 62540 MB/s |
-| kppkn.gtb | 69526 | 65312 | 9732 MB/s | 8559 MB/s | 18491 MB/s | 18969 MB/s |
-| alice29.txt (128B) | 80 | 82 | 6691 MB/s | 15489 MB/s | 31883 MB/s | 38874 MB/s |
-| alice29.txt (1000B) | 774 | 774 | 12204 MB/s | 13000 MB/s | 48056 MB/s | 52341 MB/s |
-| alice29.txt (10000B) | 6648 | 6933 | 10044 MB/s | 12806 MB/s | 32378 MB/s | 46322 MB/s |
-| alice29.txt (20000B) | 12686 | 13574 | 7733 MB/s | 11210 MB/s | 30566 MB/s | 58969 MB/s |
-
-
-| Relative Perf | Snappy size | S2 size improved | S2 Speed | S2 Dec Speed |
-|-----------------------|-------------|------------------|----------|--------------|
-| html | 22.31% | 7.58% | 1.07x | 1.20x |
-| urls.10K | 47.78% | 14.36% | 1.22x | 1.18x |
-| fireworks.jpeg | 99.95% | -0.05% | 0.78x | 1.15x |
-| fireworks.jpeg (200B) | 73.00% | -6.16% | 2.00x | 1.56x |
-| paper-100k.pdf | 83.30% | 0.99% | 0.60x | 0.89x |
-| html_x_4 | 22.52% | 77.11% | 3.33x | 1.04x |
-| alice29.txt | 57.88% | 2.34% | 1.03x | 1.56x |
-| asyoulik.txt | 61.91% | -2.77% | 1.15x | 1.79x |
-| lcet10.txt | 54.99% | 5.96% | 0.97x | 1.29x |
-| plrabn12.txt | 66.26% | 0.40% | 1.11x | 1.67x |
-| geo.protodata | 19.68% | 19.91% | 1.25x | 1.11x |
-| kppkn.gtb | 37.72% | 6.06% | 0.88x | 1.03x |
-| alice29.txt (128B) | 62.50% | -2.50% | 2.31x | 1.22x |
-| alice29.txt (1000B) | 77.40% | 0.00% | 1.07x | 1.09x |
-| alice29.txt (10000B) | 66.48% | -4.29% | 1.27x | 1.43x |
-| alice29.txt (20000B) | 63.43% | -7.00% | 1.45x | 1.93x |
+| html | 22843 | 20868 | 16246 MB/s | 18617 MB/s | 40972 MB/s | 49263 MB/s |
+| urls.10K | 335492 | 286541 | 7943 MB/s | 10201 MB/s | 22523 MB/s | 26484 MB/s |
+| fireworks.jpeg | 123034 | 123100 | 349544 MB/s | 303228 MB/s | 718321 MB/s | 827552 MB/s |
+| fireworks.jpeg (200B) | 146 | 155 | 8869 MB/s | 20180 MB/s | 33691 MB/s | 52421 MB/s |
+| paper-100k.pdf | 85304 | 84202 | 167546 MB/s | 112988 MB/s | 326905 MB/s | 291944 MB/s |
+| html_x_4 | 92234 | 20870 | 15194 MB/s | 54457 MB/s | 30843 MB/s | 32217 MB/s |
+| alice29.txt | 88034 | 85934 | 5936 MB/s | 6540 MB/s | 12882 MB/s | 20044 MB/s |
+| asyoulik.txt | 77503 | 79575 | 5517 MB/s | 6657 MB/s | 12735 MB/s | 22806 MB/s |
+| lcet10.txt | 234661 | 220383 | 6235 MB/s | 6303 MB/s | 14519 MB/s | 18697 MB/s |
+| plrabn12.txt | 319267 | 318196 | 5159 MB/s | 6074 MB/s | 11923 MB/s | 19901 MB/s |
+| geo.protodata | 23335 | 18606 | 21220 MB/s | 25432 MB/s | 56271 MB/s | 62540 MB/s |
+| kppkn.gtb | 69526 | 65019 | 9732 MB/s | 8905 MB/s | 18491 MB/s | 18969 MB/s |
+| alice29.txt (128B) | 80 | 82 | 6691 MB/s | 17179 MB/s | 31883 MB/s | 38874 MB/s |
+| alice29.txt (1000B) | 774 | 774 | 12204 MB/s | 13273 MB/s | 48056 MB/s | 52341 MB/s |
+| alice29.txt (10000B) | 6648 | 6933 | 10044 MB/s | 12824 MB/s | 32378 MB/s | 46322 MB/s |
+| alice29.txt (20000B) | 12686 | 13516 | 7733 MB/s | 12160 MB/s | 30566 MB/s | 58969 MB/s |
+
Speed is generally at or above Snappy. Small blocks gets a significant speedup, although at the expense of size.
@@ -543,42 +524,23 @@ So individual benchmarks should only be seen as a guideline and the overall pict
| Absolute Perf | Snappy size | Better Size | Snappy Speed | Better Speed | Snappy dec | Better dec |
|-----------------------|-------------|-------------|--------------|--------------|-------------|-------------|
-| html | 22843 | 19833 | 16246 MB/s | 7731 MB/s | 40972 MB/s | 40292 MB/s |
-| urls.10K | 335492 | 253529 | 7943 MB/s | 3980 MB/s | 22523 MB/s | 20981 MB/s |
-| fireworks.jpeg | 123034 | 123100 | 349544 MB/s | 9760 MB/s | 718321 MB/s | 823698 MB/s |
-| fireworks.jpeg (200B) | 146 | 142 | 8869 MB/s | 594 MB/s | 33691 MB/s | 30101 MB/s |
-| paper-100k.pdf | 85304 | 82915 | 167546 MB/s | 7470 MB/s | 326905 MB/s | 198869 MB/s |
-| html_x_4 | 92234 | 19841 | 15194 MB/s | 23403 MB/s | 30843 MB/s | 30937 MB/s |
-| alice29.txt | 88034 | 73218 | 5936 MB/s | 2945 MB/s | 12882 MB/s | 16611 MB/s |
-| asyoulik.txt | 77503 | 66844 | 5517 MB/s | 2739 MB/s | 12735 MB/s | 14975 MB/s |
-| lcet10.txt | 234661 | 190589 | 6235 MB/s | 3099 MB/s | 14519 MB/s | 16634 MB/s |
-| plrabn12.txt | 319267 | 270828 | 5159 MB/s | 2600 MB/s | 11923 MB/s | 13382 MB/s |
-| geo.protodata | 23335 | 18278 | 21220 MB/s | 11208 MB/s | 56271 MB/s | 57961 MB/s |
-| kppkn.gtb | 69526 | 61851 | 9732 MB/s | 4556 MB/s | 18491 MB/s | 16524 MB/s |
-| alice29.txt (128B) | 80 | 81 | 6691 MB/s | 529 MB/s | 31883 MB/s | 34225 MB/s |
-| alice29.txt (1000B) | 774 | 748 | 12204 MB/s | 1943 MB/s | 48056 MB/s | 42068 MB/s |
-| alice29.txt (10000B) | 6648 | 6234 | 10044 MB/s | 2949 MB/s | 32378 MB/s | 28813 MB/s |
-| alice29.txt (20000B) | 12686 | 11584 | 7733 MB/s | 2822 MB/s | 30566 MB/s | 27315 MB/s |
-
-
-| Relative Perf | Snappy size | Better size | Better Speed | Better dec |
-|-----------------------|-------------|-------------|--------------|------------|
-| html | 22.31% | 13.18% | 0.48x | 0.98x |
-| urls.10K | 47.78% | 24.43% | 0.50x | 0.93x |
-| fireworks.jpeg | 99.95% | -0.05% | 0.03x | 1.15x |
-| fireworks.jpeg (200B) | 73.00% | 2.74% | 0.07x | 0.89x |
-| paper-100k.pdf | 83.30% | 2.80% | 0.07x | 0.61x |
-| html_x_4 | 22.52% | 78.49% | 0.04x | 1.00x |
-| alice29.txt | 57.88% | 16.83% | 1.54x | 1.29x |
-| asyoulik.txt | 61.91% | 13.75% | 0.50x | 1.18x |
-| lcet10.txt | 54.99% | 18.78% | 0.50x | 1.15x |
-| plrabn12.txt | 66.26% | 15.17% | 0.50x | 1.12x |
-| geo.protodata | 19.68% | 21.67% | 0.50x | 1.03x |
-| kppkn.gtb | 37.72% | 11.04% | 0.53x | 0.89x |
-| alice29.txt (128B) | 62.50% | -1.25% | 0.47x | 1.07x |
-| alice29.txt (1000B) | 77.40% | 3.36% | 0.08x | 0.88x |
-| alice29.txt (10000B) | 66.48% | 6.23% | 0.16x | 0.89x |
-| alice29.txt (20000B) | 63.43% | 8.69% | 0.29x | 0.89x |
+| html | 22843 | 18972 | 16246 MB/s | 8621 MB/s | 40972 MB/s | 40292 MB/s |
+| urls.10K | 335492 | 248079 | 7943 MB/s | 5104 MB/s | 22523 MB/s | 20981 MB/s |
+| fireworks.jpeg | 123034 | 123100 | 349544 MB/s | 84429 MB/s | 718321 MB/s | 823698 MB/s |
+| fireworks.jpeg (200B) | 146 | 149 | 8869 MB/s | 7125 MB/s | 33691 MB/s | 30101 MB/s |
+| paper-100k.pdf | 85304 | 82887 | 167546 MB/s | 11087 MB/s | 326905 MB/s | 198869 MB/s |
+| html_x_4 | 92234 | 18982 | 15194 MB/s | 29316 MB/s | 30843 MB/s | 30937 MB/s |
+| alice29.txt | 88034 | 71611 | 5936 MB/s | 3709 MB/s | 12882 MB/s | 16611 MB/s |
+| asyoulik.txt | 77503 | 65941 | 5517 MB/s | 3380 MB/s | 12735 MB/s | 14975 MB/s |
+| lcet10.txt | 234661 | 184939 | 6235 MB/s | 3537 MB/s | 14519 MB/s | 16634 MB/s |
+| plrabn12.txt | 319267 | 264990 | 5159 MB/s | 2960 MB/s | 11923 MB/s | 13382 MB/s |
+| geo.protodata | 23335 | 17689 | 21220 MB/s | 10859 MB/s | 56271 MB/s | 57961 MB/s |
+| kppkn.gtb | 69526 | 55398 | 9732 MB/s | 5206 MB/s | 18491 MB/s | 16524 MB/s |
+| alice29.txt (128B) | 80 | 78 | 6691 MB/s | 7422 MB/s | 31883 MB/s | 34225 MB/s |
+| alice29.txt (1000B) | 774 | 746 | 12204 MB/s | 5734 MB/s | 48056 MB/s | 42068 MB/s |
+| alice29.txt (10000B) | 6648 | 6218 | 10044 MB/s | 6055 MB/s | 32378 MB/s | 28813 MB/s |
+| alice29.txt (20000B) | 12686 | 11492 | 7733 MB/s | 3143 MB/s | 30566 MB/s | 27315 MB/s |
+
Except for the mostly incompressible JPEG image compression is better and usually in the
double digits in terms of percentage reduction over Snappy.
@@ -605,29 +567,29 @@ Some examples compared on 16 core CPU, amd64 assembly used:
```
* enwik10
-Default... 10000000000 -> 4761467548 [47.61%]; 1.098s, 8685.6MB/s
-Better... 10000000000 -> 4219438251 [42.19%]; 1.925s, 4954.2MB/s
-Best... 10000000000 -> 3627364337 [36.27%]; 43.051s, 221.5MB/s
+Default... 10000000000 -> 4759950115 [47.60%]; 1.03s, 9263.0MB/s
+Better... 10000000000 -> 4084706676 [40.85%]; 2.16s, 4415.4MB/s
+Best... 10000000000 -> 3615520079 [36.16%]; 42.259s, 225.7MB/s
* github-june-2days-2019.json
-Default... 6273951764 -> 1043196283 [16.63%]; 431ms, 13882.3MB/s
-Better... 6273951764 -> 949146808 [15.13%]; 547ms, 10938.4MB/s
-Best... 6273951764 -> 832855506 [13.27%]; 9.455s, 632.8MB/s
+Default... 6273951764 -> 1041700255 [16.60%]; 431ms, 13882.3MB/s
+Better... 6273951764 -> 945841238 [15.08%]; 547ms, 10938.4MB/s
+Best... 6273951764 -> 826392576 [13.17%]; 9.455s, 632.8MB/s
* nyc-taxi-data-10M.csv
-Default... 3325605752 -> 1095998837 [32.96%]; 324ms, 9788.7MB/s
-Better... 3325605752 -> 954776589 [28.71%]; 491ms, 6459.4MB/s
-Best... 3325605752 -> 779098746 [23.43%]; 8.29s, 382.6MB/s
+Default... 3325605752 -> 1093516949 [32.88%]; 324ms, 9788.7MB/s
+Better... 3325605752 -> 885394158 [26.62%]; 491ms, 6459.4MB/s
+Best... 3325605752 -> 773681257 [23.26%]; 8.29s, 412.0MB/s
* 10gb.tar
-Default... 10065157632 -> 5916578242 [58.78%]; 1.028s, 9337.4MB/s
-Better... 10065157632 -> 5649207485 [56.13%]; 1.597s, 6010.6MB/s
-Best... 10065157632 -> 5208719802 [51.75%]; 32.78s, 292.8MB/
+Default... 10065157632 -> 5915541066 [58.77%]; 1.028s, 9337.4MB/s
+Better... 10065157632 -> 5453844650 [54.19%]; 1.597s, 4862.7MB/s
+Best... 10065157632 -> 5192495021 [51.59%]; 32.78s, 308.2MB/
* consensus.db.10gb
-Default... 10737418240 -> 4562648848 [42.49%]; 882ms, 11610.0MB/s
-Better... 10737418240 -> 4542428129 [42.30%]; 1.533s, 6679.7MB/s
-Best... 10737418240 -> 4244773384 [39.53%]; 42.96s, 238.4MB/s
+Default... 10737418240 -> 4549762344 [42.37%]; 882ms, 12118.4MB/s
+Better... 10737418240 -> 4438535064 [41.34%]; 1.533s, 3500.9MB/s
+Best... 10737418240 -> 4210602774 [39.21%]; 42.96s, 254.4MB/s
```
Decompression speed should be around the same as using the 'better' compression mode.
@@ -648,10 +610,10 @@ If you would like more control, you can use the s2 package as described below:
Snappy compatible blocks can be generated with the S2 encoder.
Compression and speed is typically a bit better `MaxEncodedLen` is also smaller for smaller memory usage. Replace
-| Snappy | S2 replacement |
-|----------------------------|-------------------------|
-| snappy.Encode(...) | s2.EncodeSnappy(...) |
-| snappy.MaxEncodedLen(...) | s2.MaxEncodedLen(...) |
+| Snappy | S2 replacement |
+|---------------------------|-----------------------|
+| snappy.Encode(...) | s2.EncodeSnappy(...) |
+| snappy.MaxEncodedLen(...) | s2.MaxEncodedLen(...) |
`s2.EncodeSnappy` can be replaced with `s2.EncodeSnappyBetter` or `s2.EncodeSnappyBest` to get more efficiently compressed snappy compatible output.
@@ -660,12 +622,12 @@ Compression and speed is typically a bit better `MaxEncodedLen` is also smaller
Comparison of [`webdevdata.org-2015-01-07-subset`](https://files.klauspost.com/compress/webdevdata.org-2015-01-07-4GB-subset.7z),
53927 files, total input size: 4,014,735,833 bytes. amd64, single goroutine used:
-| Encoder | Size | MB/s | Reduction |
-|-----------------------|------------|------------|------------
-| snappy.Encode | 1128706759 | 725.59 | 71.89% |
-| s2.EncodeSnappy | 1093823291 | **899.16** | 72.75% |
-| s2.EncodeSnappyBetter | 1001158548 | 578.49 | 75.06% |
-| s2.EncodeSnappyBest | 944507998 | 66.00 | **76.47%**|
+| Encoder | Size | MB/s | Reduction |
+|-----------------------|------------|------------|------------|
+| snappy.Encode | 1128706759 | 725.59 | 71.89% |
+| s2.EncodeSnappy | 1093823291 | **899.16** | 72.75% |
+| s2.EncodeSnappyBetter | 1001158548 | 578.49 | 75.06% |
+| s2.EncodeSnappyBest | 944507998 | 66.00 | **76.47%** |
## Streams
@@ -835,6 +797,13 @@ This is done using the regular "Skip" function:
This will ensure that we are at exactly the offset we want, and reading from `dec` will start at the requested offset.
+# Compact storage
+
+For compact storage [RemoveIndexHeaders](https://pkg.go.dev/github.com/klauspost/compress/s2#RemoveIndexHeaders) can be used to remove any redundant info from
+a serialized index. If you remove the header it must be restored before [Loading](https://pkg.go.dev/github.com/klauspost/compress/s2#Index.Load).
+
+This is expected to save 20 bytes. These can be restored using [RestoreIndexHeaders](https://pkg.go.dev/github.com/klauspost/compress/s2#RestoreIndexHeaders). This removes a layer of security, but is the most compact representation. Returns nil if headers contains errors.
+
## Index Format:
Each block is structured as a snappy skippable block, with the chunk ID 0x99.
@@ -844,20 +813,20 @@ The block can be read from the front, but contains information so it can be read
Numbers are stored as fixed size little endian values or [zigzag encoded](https://developers.google.com/protocol-buffers/docs/encoding#signed_integers) [base 128 varints](https://developers.google.com/protocol-buffers/docs/encoding),
with un-encoded value length of 64 bits, unless other limits are specified.
-| Content | Format |
-|---------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------|
-| ID, `[1]byte` | Always 0x99. |
-| Data Length, `[3]byte` | 3 byte little-endian length of the chunk in bytes, following this. |
-| Header `[6]byte` | Header, must be `[115, 50, 105, 100, 120, 0]` or in text: "s2idx\x00". |
-| UncompressedSize, Varint | Total Uncompressed size. |
-| CompressedSize, Varint | Total Compressed size if known. Should be -1 if unknown. |
-| EstBlockSize, Varint | Block Size, used for guessing uncompressed offsets. Must be >= 0. |
-| Entries, Varint | Number of Entries in index, must be < 65536 and >=0. |
-| HasUncompressedOffsets `byte` | 0 if no uncompressed offsets are present, 1 if present. Other values are invalid. |
-| UncompressedOffsets, [Entries]VarInt | Uncompressed offsets. See below how to decode. |
-| CompressedOffsets, [Entries]VarInt | Compressed offsets. See below how to decode. |
-| Block Size, `[4]byte` | Little Endian total encoded size (including header and trailer). Can be used for searching backwards to start of block. |
-| Trailer `[6]byte` | Trailer, must be `[0, 120, 100, 105, 50, 115]` or in text: "\x00xdi2s". Can be used for identifying block from end of stream. |
+| Content | Format |
+|--------------------------------------|-------------------------------------------------------------------------------------------------------------------------------|
+| ID, `[1]byte` | Always 0x99. |
+| Data Length, `[3]byte` | 3 byte little-endian length of the chunk in bytes, following this. |
+| Header `[6]byte` | Header, must be `[115, 50, 105, 100, 120, 0]` or in text: "s2idx\x00". |
+| UncompressedSize, Varint | Total Uncompressed size. |
+| CompressedSize, Varint | Total Compressed size if known. Should be -1 if unknown. |
+| EstBlockSize, Varint | Block Size, used for guessing uncompressed offsets. Must be >= 0. |
+| Entries, Varint | Number of Entries in index, must be < 65536 and >=0. |
+| HasUncompressedOffsets `byte` | 0 if no uncompressed offsets are present, 1 if present. Other values are invalid. |
+| UncompressedOffsets, [Entries]VarInt | Uncompressed offsets. See below how to decode. |
+| CompressedOffsets, [Entries]VarInt | Compressed offsets. See below how to decode. |
+| Block Size, `[4]byte` | Little Endian total encoded size (including header and trailer). Can be used for searching backwards to start of block. |
+| Trailer `[6]byte` | Trailer, must be `[0, 120, 100, 105, 50, 115]` or in text: "\x00xdi2s". Can be used for identifying block from end of stream. |
For regular streams the uncompressed offsets are fully predictable,
so `HasUncompressedOffsets` allows to specify that compressed blocks all have
@@ -929,6 +898,7 @@ To decode from any given uncompressed offset `(wantOffset)`:
See [using indexes](https://github.com/klauspost/compress/tree/master/s2#using-indexes) for functions that perform the operations with a simpler interface.
+
# Format Extensions
* Frame [Stream identifier](https://github.com/google/snappy/blob/master/framing_format.txt#L68) changed from `sNaPpY` to `S2sTwO`.
@@ -951,10 +921,11 @@ The length is specified by reading the 3-bit length specified in the tag and dec
| 7 | 65540 + read 3 bytes |
This allows any repeat offset + length to be represented by 2 to 5 bytes.
+It also allows to emit matches longer than 64 bytes with one copy + one repeat instead of several 64 byte copies.
Lengths are stored as little endian values.
-The first copy of a block cannot be a repeat offset and the offset is not carried across blocks in streams.
+The first copy of a block cannot be a repeat offset and the offset is reset on every block in streams.
Default streaming block size is 1MB.
diff --git a/test/performance/vendor/github.com/klauspost/compress/s2/decode_other.go b/test/performance/vendor/github.com/klauspost/compress/s2/decode_other.go
index 1074ebd21..11300c3a8 100644
--- a/test/performance/vendor/github.com/klauspost/compress/s2/decode_other.go
+++ b/test/performance/vendor/github.com/klauspost/compress/s2/decode_other.go
@@ -28,6 +28,9 @@ func s2Decode(dst, src []byte) int {
// As long as we can read at least 5 bytes...
for s < len(src)-5 {
+ // Removing bounds checks is SLOWER, when if doing
+ // in := src[s:s+5]
+ // Checked on Go 1.18
switch src[s] & 0x03 {
case tagLiteral:
x := uint32(src[s] >> 2)
@@ -38,14 +41,19 @@ func s2Decode(dst, src []byte) int {
s += 2
x = uint32(src[s-1])
case x == 61:
+ in := src[s : s+3]
+ x = uint32(in[1]) | uint32(in[2])<<8
s += 3
- x = uint32(src[s-2]) | uint32(src[s-1])<<8
case x == 62:
+ in := src[s : s+4]
+ // Load as 32 bit and shift down.
+ x = uint32(in[0]) | uint32(in[1])<<8 | uint32(in[2])<<16 | uint32(in[3])<<24
+ x >>= 8
s += 4
- x = uint32(src[s-3]) | uint32(src[s-2])<<8 | uint32(src[s-1])<<16
case x == 63:
+ in := src[s : s+5]
+ x = uint32(in[1]) | uint32(in[2])<<8 | uint32(in[3])<<16 | uint32(in[4])<<24
s += 5
- x = uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24
}
length = int(x) + 1
if length > len(dst)-d || length > len(src)-s || (strconv.IntSize == 32 && length <= 0) {
@@ -62,8 +70,8 @@ func s2Decode(dst, src []byte) int {
case tagCopy1:
s += 2
- length = int(src[s-2]) >> 2 & 0x7
toffset := int(uint32(src[s-2])&0xe0<<3 | uint32(src[s-1]))
+ length = int(src[s-2]) >> 2 & 0x7
if toffset == 0 {
if debug {
fmt.Print("(repeat) ")
@@ -71,14 +79,16 @@ func s2Decode(dst, src []byte) int {
// keep last offset
switch length {
case 5:
+ length = int(src[s]) + 4
s += 1
- length = int(uint32(src[s-1])) + 4
case 6:
+ in := src[s : s+2]
+ length = int(uint32(in[0])|(uint32(in[1])<<8)) + (1 << 8)
s += 2
- length = int(uint32(src[s-2])|(uint32(src[s-1])<<8)) + (1 << 8)
case 7:
+ in := src[s : s+3]
+ length = int((uint32(in[2])<<16)|(uint32(in[1])<<8)|uint32(in[0])) + (1 << 16)
s += 3
- length = int(uint32(src[s-3])|(uint32(src[s-2])<<8)|(uint32(src[s-1])<<16)) + (1 << 16)
default: // 0-> 4
}
} else {
@@ -86,14 +96,16 @@ func s2Decode(dst, src []byte) int {
}
length += 4
case tagCopy2:
+ in := src[s : s+3]
+ offset = int(uint32(in[1]) | uint32(in[2])<<8)
+ length = 1 + int(in[0])>>2
s += 3
- length = 1 + int(src[s-3])>>2
- offset = int(uint32(src[s-2]) | uint32(src[s-1])<<8)
case tagCopy4:
+ in := src[s : s+5]
+ offset = int(uint32(in[1]) | uint32(in[2])<<8 | uint32(in[3])<<16 | uint32(in[4])<<24)
+ length = 1 + int(in[0])>>2
s += 5
- length = 1 + int(src[s-5])>>2
- offset = int(uint32(src[s-4]) | uint32(src[s-3])<<8 | uint32(src[s-2])<<16 | uint32(src[s-1])<<24)
}
if offset <= 0 || d < offset || length > len(dst)-d {
diff --git a/test/performance/vendor/github.com/klauspost/compress/s2/encode_all.go b/test/performance/vendor/github.com/klauspost/compress/s2/encode_all.go
index 8b16c38a6..54c71d3b5 100644
--- a/test/performance/vendor/github.com/klauspost/compress/s2/encode_all.go
+++ b/test/performance/vendor/github.com/klauspost/compress/s2/encode_all.go
@@ -58,8 +58,9 @@ func encodeGo(dst, src []byte) []byte {
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
func encodeBlockGo(dst, src []byte) (d int) {
// Initialize the hash table.
const (
diff --git a/test/performance/vendor/github.com/klauspost/compress/s2/encode_amd64.go b/test/performance/vendor/github.com/klauspost/compress/s2/encode_amd64.go
index e612225f4..6b93daa5a 100644
--- a/test/performance/vendor/github.com/klauspost/compress/s2/encode_amd64.go
+++ b/test/performance/vendor/github.com/klauspost/compress/s2/encode_amd64.go
@@ -8,8 +8,9 @@ package s2
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
func encodeBlock(dst, src []byte) (d int) {
const (
// Use 12 bit table when less than...
@@ -43,8 +44,9 @@ func encodeBlock(dst, src []byte) (d int) {
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
func encodeBlockBetter(dst, src []byte) (d int) {
const (
// Use 12 bit table when less than...
@@ -78,8 +80,9 @@ func encodeBlockBetter(dst, src []byte) (d int) {
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
func encodeBlockSnappy(dst, src []byte) (d int) {
const (
// Use 12 bit table when less than...
@@ -112,8 +115,9 @@ func encodeBlockSnappy(dst, src []byte) (d int) {
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
func encodeBlockBetterSnappy(dst, src []byte) (d int) {
const (
// Use 12 bit table when less than...
diff --git a/test/performance/vendor/github.com/klauspost/compress/s2/encode_best.go b/test/performance/vendor/github.com/klauspost/compress/s2/encode_best.go
index 4bc80bc6a..1b7ea394f 100644
--- a/test/performance/vendor/github.com/klauspost/compress/s2/encode_best.go
+++ b/test/performance/vendor/github.com/klauspost/compress/s2/encode_best.go
@@ -15,8 +15,9 @@ import (
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
func encodeBlockBest(dst, src []byte) (d int) {
// Initialize the hash tables.
const (
@@ -176,14 +177,21 @@ func encodeBlockBest(dst, src []byte) (d int) {
best = bestOf(best, matchAt(getPrev(nextLong), s, uint32(cv), false))
}
// Search for a match at best match end, see if that is better.
- if sAt := best.s + best.length; sAt < sLimit {
- sBack := best.s
- backL := best.length
+ // Allow some bytes at the beginning to mismatch.
+ // Sweet spot is around 1-2 bytes, but depends on input.
+ // The skipped bytes are tested in Extend backwards,
+ // and still picked up as part of the match if they do.
+ const skipBeginning = 2
+ const skipEnd = 1
+ if sAt := best.s + best.length - skipEnd; sAt < sLimit {
+
+ sBack := best.s + skipBeginning - skipEnd
+ backL := best.length - skipBeginning
// Load initial values
cv = load64(src, sBack)
- // Search for mismatch
+
+ // Grab candidates...
next := lTable[hash8(load64(src, sAt), lTableBits)]
- //next := sTable[hash4(load64(src, sAt), sTableBits)]
if checkAt := getCur(next) - backL; checkAt > 0 {
best = bestOf(best, matchAt(checkAt, sBack, uint32(cv), false))
@@ -191,6 +199,16 @@ func encodeBlockBest(dst, src []byte) (d int) {
if checkAt := getPrev(next) - backL; checkAt > 0 {
best = bestOf(best, matchAt(checkAt, sBack, uint32(cv), false))
}
+ // Disabled: Extremely small gain
+ if false {
+ next = sTable[hash4(load64(src, sAt), sTableBits)]
+ if checkAt := getCur(next) - backL; checkAt > 0 {
+ best = bestOf(best, matchAt(checkAt, sBack, uint32(cv), false))
+ }
+ if checkAt := getPrev(next) - backL; checkAt > 0 {
+ best = bestOf(best, matchAt(checkAt, sBack, uint32(cv), false))
+ }
+ }
}
}
}
@@ -288,8 +306,9 @@ emitRemainder:
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
func encodeBlockBestSnappy(dst, src []byte) (d int) {
// Initialize the hash tables.
const (
@@ -546,6 +565,7 @@ emitRemainder:
// emitCopySize returns the size to encode the offset+length
//
// It assumes that:
+//
// 1 <= offset && offset <= math.MaxUint32
// 4 <= length && length <= 1 << 24
func emitCopySize(offset, length int) int {
@@ -584,6 +604,7 @@ func emitCopySize(offset, length int) int {
// emitCopyNoRepeatSize returns the size to encode the offset+length
//
// It assumes that:
+//
// 1 <= offset && offset <= math.MaxUint32
// 4 <= length && length <= 1 << 24
func emitCopyNoRepeatSize(offset, length int) int {
diff --git a/test/performance/vendor/github.com/klauspost/compress/s2/encode_better.go b/test/performance/vendor/github.com/klauspost/compress/s2/encode_better.go
index 943215b8a..3b66ba42b 100644
--- a/test/performance/vendor/github.com/klauspost/compress/s2/encode_better.go
+++ b/test/performance/vendor/github.com/klauspost/compress/s2/encode_better.go
@@ -42,8 +42,9 @@ func hash8(u uint64, h uint8) uint32 {
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
func encodeBlockBetterGo(dst, src []byte) (d int) {
// sLimit is when to stop looking for offset/length copies. The inputMargin
// lets us use a fast path for emitLiteral in the main loop, while we are
@@ -56,7 +57,7 @@ func encodeBlockBetterGo(dst, src []byte) (d int) {
// Initialize the hash tables.
const (
// Long hash matches.
- lTableBits = 16
+ lTableBits = 17
maxLTableSize = 1 << lTableBits
// Short hash matches.
@@ -97,9 +98,26 @@ func encodeBlockBetterGo(dst, src []byte) (d int) {
lTable[hashL] = uint32(s)
sTable[hashS] = uint32(s)
+ valLong := load64(src, candidateL)
+ valShort := load64(src, candidateS)
+
+ // If long matches at least 8 bytes, use that.
+ if cv == valLong {
+ break
+ }
+ if cv == valShort {
+ candidateL = candidateS
+ break
+ }
+
// Check repeat at offset checkRep.
const checkRep = 1
- if false && uint32(cv>>(checkRep*8)) == load32(src, s-repeat+checkRep) {
+ // Minimum length of a repeat. Tested with various values.
+ // While 4-5 offers improvements in some, 6 reduces
+ // regressions significantly.
+ const wantRepeatBytes = 6
+ const repeatMask = ((1 << (wantRepeatBytes * 8)) - 1) << (8 * checkRep)
+ if false && repeat > 0 && cv&repeatMask == load64(src, s-repeat)&repeatMask {
base := s + checkRep
// Extend back
for i := base - repeat; base > nextEmit && i > 0 && src[i-1] == src[base-1]; {
@@ -109,8 +127,8 @@ func encodeBlockBetterGo(dst, src []byte) (d int) {
d += emitLiteral(dst[d:], src[nextEmit:base])
// Extend forward
- candidate := s - repeat + 4 + checkRep
- s += 4 + checkRep
+ candidate := s - repeat + wantRepeatBytes + checkRep
+ s += wantRepeatBytes + checkRep
for s < len(src) {
if len(src)-s < 8 {
if src[s] == src[candidate] {
@@ -127,28 +145,40 @@ func encodeBlockBetterGo(dst, src []byte) (d int) {
s += 8
candidate += 8
}
- if nextEmit > 0 {
- // same as `add := emitCopy(dst[d:], repeat, s-base)` but skips storing offset.
- d += emitRepeat(dst[d:], repeat, s-base)
- } else {
- // First match, cannot be repeat.
- d += emitCopy(dst[d:], repeat, s-base)
- }
+ // same as `add := emitCopy(dst[d:], repeat, s-base)` but skips storing offset.
+ d += emitRepeat(dst[d:], repeat, s-base)
nextEmit = s
if s >= sLimit {
goto emitRemainder
}
+ // Index in-between
+ index0 := base + 1
+ index1 := s - 2
+
+ cv = load64(src, s)
+ for index0 < index1 {
+ cv0 := load64(src, index0)
+ cv1 := load64(src, index1)
+ lTable[hash7(cv0, lTableBits)] = uint32(index0)
+ sTable[hash4(cv0>>8, sTableBits)] = uint32(index0 + 1)
+
+ lTable[hash7(cv1, lTableBits)] = uint32(index1)
+ sTable[hash4(cv1>>8, sTableBits)] = uint32(index1 + 1)
+ index0 += 2
+ index1 -= 2
+ }
cv = load64(src, s)
continue
}
- if uint32(cv) == load32(src, candidateL) {
+ // Long likely matches 7, so take that.
+ if uint32(cv) == uint32(valLong) {
break
}
// Check our short candidate
- if uint32(cv) == load32(src, candidateS) {
+ if uint32(cv) == uint32(valShort) {
// Try a long candidate at s+1
hashL = hash7(cv>>8, lTableBits)
candidateL = int(lTable[hashL])
@@ -227,21 +257,29 @@ func encodeBlockBetterGo(dst, src []byte) (d int) {
// Do we have space for more, if not bail.
return 0
}
- // Index match start+1 (long) and start+2 (short)
+
+ // Index short & long
index0 := base + 1
- // Index match end-2 (long) and end-1 (short)
index1 := s - 2
cv0 := load64(src, index0)
cv1 := load64(src, index1)
- cv = load64(src, s)
lTable[hash7(cv0, lTableBits)] = uint32(index0)
- lTable[hash7(cv0>>8, lTableBits)] = uint32(index0 + 1)
- lTable[hash7(cv1, lTableBits)] = uint32(index1)
- lTable[hash7(cv1>>8, lTableBits)] = uint32(index1 + 1)
sTable[hash4(cv0>>8, sTableBits)] = uint32(index0 + 1)
- sTable[hash4(cv0>>16, sTableBits)] = uint32(index0 + 2)
+
+ lTable[hash7(cv1, lTableBits)] = uint32(index1)
sTable[hash4(cv1>>8, sTableBits)] = uint32(index1 + 1)
+ index0 += 1
+ index1 -= 1
+ cv = load64(src, s)
+
+ // index every second long in between.
+ for index0 < index1 {
+ lTable[hash7(load64(src, index0), lTableBits)] = uint32(index0)
+ lTable[hash7(load64(src, index1), lTableBits)] = uint32(index1)
+ index0 += 2
+ index1 -= 2
+ }
}
emitRemainder:
@@ -260,8 +298,9 @@ emitRemainder:
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src)) &&
-// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
+// minNonLiteralBlockSize <= len(src) && len(src) <= maxBlockSize
func encodeBlockBetterSnappyGo(dst, src []byte) (d int) {
// sLimit is when to stop looking for offset/length copies. The inputMargin
// lets us use a fast path for emitLiteral in the main loop, while we are
@@ -402,21 +441,29 @@ func encodeBlockBetterSnappyGo(dst, src []byte) (d int) {
// Do we have space for more, if not bail.
return 0
}
- // Index match start+1 (long) and start+2 (short)
+
+ // Index short & long
index0 := base + 1
- // Index match end-2 (long) and end-1 (short)
index1 := s - 2
cv0 := load64(src, index0)
cv1 := load64(src, index1)
- cv = load64(src, s)
lTable[hash7(cv0, lTableBits)] = uint32(index0)
- lTable[hash7(cv0>>8, lTableBits)] = uint32(index0 + 1)
- lTable[hash7(cv1, lTableBits)] = uint32(index1)
- lTable[hash7(cv1>>8, lTableBits)] = uint32(index1 + 1)
sTable[hash4(cv0>>8, sTableBits)] = uint32(index0 + 1)
- sTable[hash4(cv0>>16, sTableBits)] = uint32(index0 + 2)
+
+ lTable[hash7(cv1, lTableBits)] = uint32(index1)
sTable[hash4(cv1>>8, sTableBits)] = uint32(index1 + 1)
+ index0 += 1
+ index1 -= 1
+ cv = load64(src, s)
+
+ // index every second long in between.
+ for index0 < index1 {
+ lTable[hash7(load64(src, index0), lTableBits)] = uint32(index0)
+ lTable[hash7(load64(src, index1), lTableBits)] = uint32(index1)
+ index0 += 2
+ index1 -= 2
+ }
}
emitRemainder:
diff --git a/test/performance/vendor/github.com/klauspost/compress/s2/encode_go.go b/test/performance/vendor/github.com/klauspost/compress/s2/encode_go.go
index 94784b82a..db08fc355 100644
--- a/test/performance/vendor/github.com/klauspost/compress/s2/encode_go.go
+++ b/test/performance/vendor/github.com/klauspost/compress/s2/encode_go.go
@@ -12,6 +12,7 @@ import (
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src))
func encodeBlock(dst, src []byte) (d int) {
if len(src) < minNonLiteralBlockSize {
@@ -25,6 +26,7 @@ func encodeBlock(dst, src []byte) (d int) {
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src))
func encodeBlockBetter(dst, src []byte) (d int) {
return encodeBlockBetterGo(dst, src)
@@ -35,6 +37,7 @@ func encodeBlockBetter(dst, src []byte) (d int) {
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src))
func encodeBlockBetterSnappy(dst, src []byte) (d int) {
return encodeBlockBetterSnappyGo(dst, src)
@@ -45,6 +48,7 @@ func encodeBlockBetterSnappy(dst, src []byte) (d int) {
// been written.
//
// It also assumes that:
+//
// len(dst) >= MaxEncodedLen(len(src))
func encodeBlockSnappy(dst, src []byte) (d int) {
if len(src) < minNonLiteralBlockSize {
@@ -56,6 +60,7 @@ func encodeBlockSnappy(dst, src []byte) (d int) {
// emitLiteral writes a literal chunk and returns the number of bytes written.
//
// It assumes that:
+//
// dst is long enough to hold the encoded bytes
// 0 <= len(lit) && len(lit) <= math.MaxUint32
func emitLiteral(dst, lit []byte) int {
@@ -146,6 +151,7 @@ func emitRepeat(dst []byte, offset, length int) int {
// emitCopy writes a copy chunk and returns the number of bytes written.
//
// It assumes that:
+//
// dst is long enough to hold the encoded bytes
// 1 <= offset && offset <= math.MaxUint32
// 4 <= length && length <= 1 << 24
@@ -214,6 +220,7 @@ func emitCopy(dst []byte, offset, length int) int {
// emitCopyNoRepeat writes a copy chunk and returns the number of bytes written.
//
// It assumes that:
+//
// dst is long enough to hold the encoded bytes
// 1 <= offset && offset <= math.MaxUint32
// 4 <= length && length <= 1 << 24
@@ -273,8 +280,8 @@ func emitCopyNoRepeat(dst []byte, offset, length int) int {
// matchLen returns how many bytes match in a and b
//
// It assumes that:
-// len(a) <= len(b)
//
+// len(a) <= len(b)
func matchLen(a []byte, b []byte) int {
b = b[:len(a)]
var checked int
diff --git a/test/performance/vendor/github.com/klauspost/compress/s2/encodeblock_amd64.go b/test/performance/vendor/github.com/klauspost/compress/s2/encodeblock_amd64.go
index 88f27c099..7e00bac3e 100644
--- a/test/performance/vendor/github.com/klauspost/compress/s2/encodeblock_amd64.go
+++ b/test/performance/vendor/github.com/klauspost/compress/s2/encodeblock_amd64.go
@@ -1,7 +1,6 @@
// Code generated by command: go run gen.go -out ../encodeblock_amd64.s -stubs ../encodeblock_amd64.go -pkg=s2. DO NOT EDIT.
//go:build !appengine && !noasm && gc && !noasm
-// +build !appengine,!noasm,gc,!noasm
package s2
@@ -150,8 +149,9 @@ func encodeSnappyBetterBlockAsm8B(dst []byte, src []byte) int
// emitLiteral writes a literal chunk and returns the number of bytes written.
//
// It assumes that:
-// dst is long enough to hold the encoded bytes with margin of 0 bytes
-// 0 <= len(lit) && len(lit) <= math.MaxUint32
+//
+// dst is long enough to hold the encoded bytes with margin of 0 bytes
+// 0 <= len(lit) && len(lit) <= math.MaxUint32
//
//go:noescape
func emitLiteral(dst []byte, lit []byte) int
@@ -165,9 +165,10 @@ func emitRepeat(dst []byte, offset int, length int) int
// emitCopy writes a copy chunk and returns the number of bytes written.
//
// It assumes that:
-// dst is long enough to hold the encoded bytes
-// 1 <= offset && offset <= math.MaxUint32
-// 4 <= length && length <= 1 << 24
+//
+// dst is long enough to hold the encoded bytes
+// 1 <= offset && offset <= math.MaxUint32
+// 4 <= length && length <= 1 << 24
//
//go:noescape
func emitCopy(dst []byte, offset int, length int) int
@@ -175,9 +176,10 @@ func emitCopy(dst []byte, offset int, length int) int
// emitCopyNoRepeat writes a copy chunk and returns the number of bytes written.
//
// It assumes that:
-// dst is long enough to hold the encoded bytes
-// 1 <= offset && offset <= math.MaxUint32
-// 4 <= length && length <= 1 << 24
+//
+// dst is long enough to hold the encoded bytes
+// 1 <= offset && offset <= math.MaxUint32
+// 4 <= length && length <= 1 << 24
//
//go:noescape
func emitCopyNoRepeat(dst []byte, offset int, length int) int
@@ -185,7 +187,8 @@ func emitCopyNoRepeat(dst []byte, offset int, length int) int
// matchLen returns how many bytes match in a and b
//
// It assumes that:
-// len(a) <= len(b)
+//
+// len(a) <= len(b)
//
//go:noescape
func matchLen(a []byte, b []byte) int
diff --git a/test/performance/vendor/github.com/klauspost/compress/s2/encodeblock_amd64.s b/test/performance/vendor/github.com/klauspost/compress/s2/encodeblock_amd64.s
index 36915d949..81a487d6d 100644
--- a/test/performance/vendor/github.com/klauspost/compress/s2/encodeblock_amd64.s
+++ b/test/performance/vendor/github.com/klauspost/compress/s2/encodeblock_amd64.s
@@ -1,7 +1,6 @@
// Code generated by command: go run gen.go -out ../encodeblock_amd64.s -stubs ../encodeblock_amd64.go -pkg=s2. DO NOT EDIT.
//go:build !appengine && !noasm && gc && !noasm
-// +build !appengine,!noasm,gc,!noasm
#include "textflag.h"
@@ -5743,9 +5742,9 @@ emit_literal_done_emit_remainder_encodeBlockAsm8B:
// func encodeBetterBlockAsm(dst []byte, src []byte) int
// Requires: BMI, SSE2
-TEXT ·encodeBetterBlockAsm(SB), $327704-56
+TEXT ·encodeBetterBlockAsm(SB), $589848-56
MOVQ dst_base+0(FP), AX
- MOVQ $0x00000a00, CX
+ MOVQ $0x00001200, CX
LEAQ 24(SP), DX
PXOR X0, X0
@@ -5797,27 +5796,37 @@ check_maxskip_cont_encodeBetterBlockAsm:
MOVQ DI, R11
SHLQ $0x08, R10
IMULQ R9, R10
- SHRQ $0x30, R10
+ SHRQ $0x2f, R10
SHLQ $0x20, R11
IMULQ SI, R11
SHRQ $0x32, R11
MOVL 24(SP)(R10*4), SI
- MOVL 262168(SP)(R11*4), R8
+ MOVL 524312(SP)(R11*4), R8
MOVL CX, 24(SP)(R10*4)
- MOVL CX, 262168(SP)(R11*4)
- CMPL (DX)(SI*1), DI
+ MOVL CX, 524312(SP)(R11*4)
+ MOVQ (DX)(SI*1), R10
+ MOVQ (DX)(R8*1), R11
+ CMPQ R10, DI
JEQ candidate_match_encodeBetterBlockAsm
- CMPL (DX)(R8*1), DI
- JEQ candidateS_match_encodeBetterBlockAsm
- MOVL 20(SP), CX
- JMP search_loop_encodeBetterBlockAsm
+ CMPQ R11, DI
+ JNE no_short_found_encodeBetterBlockAsm
+ MOVL R8, SI
+ JMP candidate_match_encodeBetterBlockAsm
+
+no_short_found_encodeBetterBlockAsm:
+ CMPL R10, DI
+ JEQ candidate_match_encodeBetterBlockAsm
+ CMPL R11, DI
+ JEQ candidateS_match_encodeBetterBlockAsm
+ MOVL 20(SP), CX
+ JMP search_loop_encodeBetterBlockAsm
candidateS_match_encodeBetterBlockAsm:
SHRQ $0x08, DI
MOVQ DI, R10
SHLQ $0x08, R10
IMULQ R9, R10
- SHRQ $0x30, R10
+ SHRQ $0x2f, R10
MOVL 24(SP)(R10*4), SI
INCL CX
MOVL CX, 24(SP)(R10*4)
@@ -6590,52 +6599,49 @@ match_nolit_emitcopy_end_encodeBetterBlockAsm:
match_nolit_dst_ok_encodeBetterBlockAsm:
MOVQ $0x00cf1bbcdcbfa563, SI
MOVQ $0x9e3779b1, R8
- INCL DI
- MOVQ (DX)(DI*1), R9
- MOVQ R9, R10
- MOVQ R9, R11
- MOVQ R9, R12
- SHRQ $0x08, R11
- MOVQ R11, R13
- SHRQ $0x10, R12
- LEAL 1(DI), R14
- LEAL 2(DI), R15
- MOVQ -2(DX)(CX*1), R9
+ LEAQ 1(DI), DI
+ LEAQ -2(CX), R9
+ MOVQ (DX)(DI*1), R10
+ MOVQ 1(DX)(DI*1), R11
+ MOVQ (DX)(R9*1), R12
+ MOVQ 1(DX)(R9*1), R13
SHLQ $0x08, R10
IMULQ SI, R10
- SHRQ $0x30, R10
- SHLQ $0x08, R13
- IMULQ SI, R13
- SHRQ $0x30, R13
+ SHRQ $0x2f, R10
SHLQ $0x20, R11
IMULQ R8, R11
SHRQ $0x32, R11
- SHLQ $0x20, R12
- IMULQ R8, R12
- SHRQ $0x32, R12
+ SHLQ $0x08, R12
+ IMULQ SI, R12
+ SHRQ $0x2f, R12
+ SHLQ $0x20, R13
+ IMULQ R8, R13
+ SHRQ $0x32, R13
+ LEAQ 1(DI), R8
+ LEAQ 1(R9), R14
MOVL DI, 24(SP)(R10*4)
- MOVL R14, 24(SP)(R13*4)
- MOVL R14, 262168(SP)(R11*4)
- MOVL R15, 262168(SP)(R12*4)
- MOVQ R9, R10
- MOVQ R9, R11
- SHRQ $0x08, R11
- MOVQ R11, R13
- LEAL -2(CX), R9
- LEAL -1(CX), DI
+ MOVL R9, 24(SP)(R12*4)
+ MOVL R8, 524312(SP)(R11*4)
+ MOVL R14, 524312(SP)(R13*4)
+ ADDQ $0x01, DI
+ SUBQ $0x01, R9
+
+index_loop_encodeBetterBlockAsm:
+ CMPQ DI, R9
+ JAE search_loop_encodeBetterBlockAsm
+ MOVQ (DX)(DI*1), R8
+ MOVQ (DX)(R9*1), R10
+ SHLQ $0x08, R8
+ IMULQ SI, R8
+ SHRQ $0x2f, R8
SHLQ $0x08, R10
IMULQ SI, R10
- SHRQ $0x30, R10
- SHLQ $0x20, R11
- IMULQ R8, R11
- SHRQ $0x32, R11
- SHLQ $0x08, R13
- IMULQ SI, R13
- SHRQ $0x30, R13
+ SHRQ $0x2f, R10
+ MOVL DI, 24(SP)(R8*4)
MOVL R9, 24(SP)(R10*4)
- MOVL DI, 262168(SP)(R11*4)
- MOVL DI, 24(SP)(R13*4)
- JMP search_loop_encodeBetterBlockAsm
+ ADDQ $0x02, DI
+ SUBQ $0x02, R9
+ JMP index_loop_encodeBetterBlockAsm
emit_remainder_encodeBetterBlockAsm:
MOVQ src_len+32(FP), CX
@@ -6815,9 +6821,9 @@ emit_literal_done_emit_remainder_encodeBetterBlockAsm:
// func encodeBetterBlockAsm4MB(dst []byte, src []byte) int
// Requires: BMI, SSE2
-TEXT ·encodeBetterBlockAsm4MB(SB), $327704-56
+TEXT ·encodeBetterBlockAsm4MB(SB), $589848-56
MOVQ dst_base+0(FP), AX
- MOVQ $0x00000a00, CX
+ MOVQ $0x00001200, CX
LEAQ 24(SP), DX
PXOR X0, X0
@@ -6869,27 +6875,37 @@ check_maxskip_cont_encodeBetterBlockAsm4MB:
MOVQ DI, R11
SHLQ $0x08, R10
IMULQ R9, R10
- SHRQ $0x30, R10
+ SHRQ $0x2f, R10
SHLQ $0x20, R11
IMULQ SI, R11
SHRQ $0x32, R11
MOVL 24(SP)(R10*4), SI
- MOVL 262168(SP)(R11*4), R8
+ MOVL 524312(SP)(R11*4), R8
MOVL CX, 24(SP)(R10*4)
- MOVL CX, 262168(SP)(R11*4)
- CMPL (DX)(SI*1), DI
+ MOVL CX, 524312(SP)(R11*4)
+ MOVQ (DX)(SI*1), R10
+ MOVQ (DX)(R8*1), R11
+ CMPQ R10, DI
JEQ candidate_match_encodeBetterBlockAsm4MB
- CMPL (DX)(R8*1), DI
- JEQ candidateS_match_encodeBetterBlockAsm4MB
- MOVL 20(SP), CX
- JMP search_loop_encodeBetterBlockAsm4MB
+ CMPQ R11, DI
+ JNE no_short_found_encodeBetterBlockAsm4MB
+ MOVL R8, SI
+ JMP candidate_match_encodeBetterBlockAsm4MB
+
+no_short_found_encodeBetterBlockAsm4MB:
+ CMPL R10, DI
+ JEQ candidate_match_encodeBetterBlockAsm4MB
+ CMPL R11, DI
+ JEQ candidateS_match_encodeBetterBlockAsm4MB
+ MOVL 20(SP), CX
+ JMP search_loop_encodeBetterBlockAsm4MB
candidateS_match_encodeBetterBlockAsm4MB:
SHRQ $0x08, DI
MOVQ DI, R10
SHLQ $0x08, R10
IMULQ R9, R10
- SHRQ $0x30, R10
+ SHRQ $0x2f, R10
MOVL 24(SP)(R10*4), SI
INCL CX
MOVL CX, 24(SP)(R10*4)
@@ -7600,52 +7616,49 @@ match_nolit_emitcopy_end_encodeBetterBlockAsm4MB:
match_nolit_dst_ok_encodeBetterBlockAsm4MB:
MOVQ $0x00cf1bbcdcbfa563, SI
MOVQ $0x9e3779b1, R8
- INCL DI
- MOVQ (DX)(DI*1), R9
- MOVQ R9, R10
- MOVQ R9, R11
- MOVQ R9, R12
- SHRQ $0x08, R11
- MOVQ R11, R13
- SHRQ $0x10, R12
- LEAL 1(DI), R14
- LEAL 2(DI), R15
- MOVQ -2(DX)(CX*1), R9
+ LEAQ 1(DI), DI
+ LEAQ -2(CX), R9
+ MOVQ (DX)(DI*1), R10
+ MOVQ 1(DX)(DI*1), R11
+ MOVQ (DX)(R9*1), R12
+ MOVQ 1(DX)(R9*1), R13
SHLQ $0x08, R10
IMULQ SI, R10
- SHRQ $0x30, R10
- SHLQ $0x08, R13
- IMULQ SI, R13
- SHRQ $0x30, R13
+ SHRQ $0x2f, R10
SHLQ $0x20, R11
IMULQ R8, R11
SHRQ $0x32, R11
- SHLQ $0x20, R12
- IMULQ R8, R12
- SHRQ $0x32, R12
+ SHLQ $0x08, R12
+ IMULQ SI, R12
+ SHRQ $0x2f, R12
+ SHLQ $0x20, R13
+ IMULQ R8, R13
+ SHRQ $0x32, R13
+ LEAQ 1(DI), R8
+ LEAQ 1(R9), R14
MOVL DI, 24(SP)(R10*4)
- MOVL R14, 24(SP)(R13*4)
- MOVL R14, 262168(SP)(R11*4)
- MOVL R15, 262168(SP)(R12*4)
- MOVQ R9, R10
- MOVQ R9, R11
- SHRQ $0x08, R11
- MOVQ R11, R13
- LEAL -2(CX), R9
- LEAL -1(CX), DI
+ MOVL R9, 24(SP)(R12*4)
+ MOVL R8, 524312(SP)(R11*4)
+ MOVL R14, 524312(SP)(R13*4)
+ ADDQ $0x01, DI
+ SUBQ $0x01, R9
+
+index_loop_encodeBetterBlockAsm4MB:
+ CMPQ DI, R9
+ JAE search_loop_encodeBetterBlockAsm4MB
+ MOVQ (DX)(DI*1), R8
+ MOVQ (DX)(R9*1), R10
+ SHLQ $0x08, R8
+ IMULQ SI, R8
+ SHRQ $0x2f, R8
SHLQ $0x08, R10
IMULQ SI, R10
- SHRQ $0x30, R10
- SHLQ $0x20, R11
- IMULQ R8, R11
- SHRQ $0x32, R11
- SHLQ $0x08, R13
- IMULQ SI, R13
- SHRQ $0x30, R13
+ SHRQ $0x2f, R10
+ MOVL DI, 24(SP)(R8*4)
MOVL R9, 24(SP)(R10*4)
- MOVL DI, 262168(SP)(R11*4)
- MOVL DI, 24(SP)(R13*4)
- JMP search_loop_encodeBetterBlockAsm4MB
+ ADDQ $0x02, DI
+ SUBQ $0x02, R9
+ JMP index_loop_encodeBetterBlockAsm4MB
emit_remainder_encodeBetterBlockAsm4MB:
MOVQ src_len+32(FP), CX
@@ -7871,12 +7884,22 @@ search_loop_encodeBetterBlockAsm12B:
MOVL 65560(SP)(R11*4), R8
MOVL CX, 24(SP)(R10*4)
MOVL CX, 65560(SP)(R11*4)
- CMPL (DX)(SI*1), DI
+ MOVQ (DX)(SI*1), R10
+ MOVQ (DX)(R8*1), R11
+ CMPQ R10, DI
JEQ candidate_match_encodeBetterBlockAsm12B
- CMPL (DX)(R8*1), DI
- JEQ candidateS_match_encodeBetterBlockAsm12B
- MOVL 20(SP), CX
- JMP search_loop_encodeBetterBlockAsm12B
+ CMPQ R11, DI
+ JNE no_short_found_encodeBetterBlockAsm12B
+ MOVL R8, SI
+ JMP candidate_match_encodeBetterBlockAsm12B
+
+no_short_found_encodeBetterBlockAsm12B:
+ CMPL R10, DI
+ JEQ candidate_match_encodeBetterBlockAsm12B
+ CMPL R11, DI
+ JEQ candidateS_match_encodeBetterBlockAsm12B
+ MOVL 20(SP), CX
+ JMP search_loop_encodeBetterBlockAsm12B
candidateS_match_encodeBetterBlockAsm12B:
SHRQ $0x08, DI
@@ -8447,52 +8470,49 @@ match_nolit_emitcopy_end_encodeBetterBlockAsm12B:
match_nolit_dst_ok_encodeBetterBlockAsm12B:
MOVQ $0x0000cf1bbcdcbf9b, SI
MOVQ $0x9e3779b1, R8
- INCL DI
- MOVQ (DX)(DI*1), R9
- MOVQ R9, R10
- MOVQ R9, R11
- MOVQ R9, R12
- SHRQ $0x08, R11
- MOVQ R11, R13
- SHRQ $0x10, R12
- LEAL 1(DI), R14
- LEAL 2(DI), R15
- MOVQ -2(DX)(CX*1), R9
+ LEAQ 1(DI), DI
+ LEAQ -2(CX), R9
+ MOVQ (DX)(DI*1), R10
+ MOVQ 1(DX)(DI*1), R11
+ MOVQ (DX)(R9*1), R12
+ MOVQ 1(DX)(R9*1), R13
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x32, R10
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x32, R13
SHLQ $0x20, R11
IMULQ R8, R11
SHRQ $0x34, R11
- SHLQ $0x20, R12
- IMULQ R8, R12
- SHRQ $0x34, R12
+ SHLQ $0x10, R12
+ IMULQ SI, R12
+ SHRQ $0x32, R12
+ SHLQ $0x20, R13
+ IMULQ R8, R13
+ SHRQ $0x34, R13
+ LEAQ 1(DI), R8
+ LEAQ 1(R9), R14
MOVL DI, 24(SP)(R10*4)
- MOVL R14, 24(SP)(R13*4)
- MOVL R14, 65560(SP)(R11*4)
- MOVL R15, 65560(SP)(R12*4)
- MOVQ R9, R10
- MOVQ R9, R11
- SHRQ $0x08, R11
- MOVQ R11, R13
- LEAL -2(CX), R9
- LEAL -1(CX), DI
+ MOVL R9, 24(SP)(R12*4)
+ MOVL R8, 65560(SP)(R11*4)
+ MOVL R14, 65560(SP)(R13*4)
+ ADDQ $0x01, DI
+ SUBQ $0x01, R9
+
+index_loop_encodeBetterBlockAsm12B:
+ CMPQ DI, R9
+ JAE search_loop_encodeBetterBlockAsm12B
+ MOVQ (DX)(DI*1), R8
+ MOVQ (DX)(R9*1), R10
+ SHLQ $0x10, R8
+ IMULQ SI, R8
+ SHRQ $0x32, R8
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x32, R10
- SHLQ $0x20, R11
- IMULQ R8, R11
- SHRQ $0x34, R11
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x32, R13
+ MOVL DI, 24(SP)(R8*4)
MOVL R9, 24(SP)(R10*4)
- MOVL DI, 65560(SP)(R11*4)
- MOVL DI, 24(SP)(R13*4)
- JMP search_loop_encodeBetterBlockAsm12B
+ ADDQ $0x02, DI
+ SUBQ $0x02, R9
+ JMP index_loop_encodeBetterBlockAsm12B
emit_remainder_encodeBetterBlockAsm12B:
MOVQ src_len+32(FP), CX
@@ -8707,12 +8727,22 @@ search_loop_encodeBetterBlockAsm10B:
MOVL 16408(SP)(R11*4), R8
MOVL CX, 24(SP)(R10*4)
MOVL CX, 16408(SP)(R11*4)
- CMPL (DX)(SI*1), DI
+ MOVQ (DX)(SI*1), R10
+ MOVQ (DX)(R8*1), R11
+ CMPQ R10, DI
JEQ candidate_match_encodeBetterBlockAsm10B
- CMPL (DX)(R8*1), DI
- JEQ candidateS_match_encodeBetterBlockAsm10B
- MOVL 20(SP), CX
- JMP search_loop_encodeBetterBlockAsm10B
+ CMPQ R11, DI
+ JNE no_short_found_encodeBetterBlockAsm10B
+ MOVL R8, SI
+ JMP candidate_match_encodeBetterBlockAsm10B
+
+no_short_found_encodeBetterBlockAsm10B:
+ CMPL R10, DI
+ JEQ candidate_match_encodeBetterBlockAsm10B
+ CMPL R11, DI
+ JEQ candidateS_match_encodeBetterBlockAsm10B
+ MOVL 20(SP), CX
+ JMP search_loop_encodeBetterBlockAsm10B
candidateS_match_encodeBetterBlockAsm10B:
SHRQ $0x08, DI
@@ -9283,52 +9313,49 @@ match_nolit_emitcopy_end_encodeBetterBlockAsm10B:
match_nolit_dst_ok_encodeBetterBlockAsm10B:
MOVQ $0x0000cf1bbcdcbf9b, SI
MOVQ $0x9e3779b1, R8
- INCL DI
- MOVQ (DX)(DI*1), R9
- MOVQ R9, R10
- MOVQ R9, R11
- MOVQ R9, R12
- SHRQ $0x08, R11
- MOVQ R11, R13
- SHRQ $0x10, R12
- LEAL 1(DI), R14
- LEAL 2(DI), R15
- MOVQ -2(DX)(CX*1), R9
+ LEAQ 1(DI), DI
+ LEAQ -2(CX), R9
+ MOVQ (DX)(DI*1), R10
+ MOVQ 1(DX)(DI*1), R11
+ MOVQ (DX)(R9*1), R12
+ MOVQ 1(DX)(R9*1), R13
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x34, R10
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x34, R13
SHLQ $0x20, R11
IMULQ R8, R11
SHRQ $0x36, R11
- SHLQ $0x20, R12
- IMULQ R8, R12
- SHRQ $0x36, R12
+ SHLQ $0x10, R12
+ IMULQ SI, R12
+ SHRQ $0x34, R12
+ SHLQ $0x20, R13
+ IMULQ R8, R13
+ SHRQ $0x36, R13
+ LEAQ 1(DI), R8
+ LEAQ 1(R9), R14
MOVL DI, 24(SP)(R10*4)
- MOVL R14, 24(SP)(R13*4)
- MOVL R14, 16408(SP)(R11*4)
- MOVL R15, 16408(SP)(R12*4)
- MOVQ R9, R10
- MOVQ R9, R11
- SHRQ $0x08, R11
- MOVQ R11, R13
- LEAL -2(CX), R9
- LEAL -1(CX), DI
+ MOVL R9, 24(SP)(R12*4)
+ MOVL R8, 16408(SP)(R11*4)
+ MOVL R14, 16408(SP)(R13*4)
+ ADDQ $0x01, DI
+ SUBQ $0x01, R9
+
+index_loop_encodeBetterBlockAsm10B:
+ CMPQ DI, R9
+ JAE search_loop_encodeBetterBlockAsm10B
+ MOVQ (DX)(DI*1), R8
+ MOVQ (DX)(R9*1), R10
+ SHLQ $0x10, R8
+ IMULQ SI, R8
+ SHRQ $0x34, R8
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x34, R10
- SHLQ $0x20, R11
- IMULQ R8, R11
- SHRQ $0x36, R11
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x34, R13
+ MOVL DI, 24(SP)(R8*4)
MOVL R9, 24(SP)(R10*4)
- MOVL DI, 16408(SP)(R11*4)
- MOVL DI, 24(SP)(R13*4)
- JMP search_loop_encodeBetterBlockAsm10B
+ ADDQ $0x02, DI
+ SUBQ $0x02, R9
+ JMP index_loop_encodeBetterBlockAsm10B
emit_remainder_encodeBetterBlockAsm10B:
MOVQ src_len+32(FP), CX
@@ -9543,12 +9570,22 @@ search_loop_encodeBetterBlockAsm8B:
MOVL 4120(SP)(R11*4), R8
MOVL CX, 24(SP)(R10*4)
MOVL CX, 4120(SP)(R11*4)
- CMPL (DX)(SI*1), DI
+ MOVQ (DX)(SI*1), R10
+ MOVQ (DX)(R8*1), R11
+ CMPQ R10, DI
JEQ candidate_match_encodeBetterBlockAsm8B
- CMPL (DX)(R8*1), DI
- JEQ candidateS_match_encodeBetterBlockAsm8B
- MOVL 20(SP), CX
- JMP search_loop_encodeBetterBlockAsm8B
+ CMPQ R11, DI
+ JNE no_short_found_encodeBetterBlockAsm8B
+ MOVL R8, SI
+ JMP candidate_match_encodeBetterBlockAsm8B
+
+no_short_found_encodeBetterBlockAsm8B:
+ CMPL R10, DI
+ JEQ candidate_match_encodeBetterBlockAsm8B
+ CMPL R11, DI
+ JEQ candidateS_match_encodeBetterBlockAsm8B
+ MOVL 20(SP), CX
+ JMP search_loop_encodeBetterBlockAsm8B
candidateS_match_encodeBetterBlockAsm8B:
SHRQ $0x08, DI
@@ -10105,52 +10142,49 @@ match_nolit_emitcopy_end_encodeBetterBlockAsm8B:
match_nolit_dst_ok_encodeBetterBlockAsm8B:
MOVQ $0x0000cf1bbcdcbf9b, SI
MOVQ $0x9e3779b1, R8
- INCL DI
- MOVQ (DX)(DI*1), R9
- MOVQ R9, R10
- MOVQ R9, R11
- MOVQ R9, R12
- SHRQ $0x08, R11
- MOVQ R11, R13
- SHRQ $0x10, R12
- LEAL 1(DI), R14
- LEAL 2(DI), R15
- MOVQ -2(DX)(CX*1), R9
+ LEAQ 1(DI), DI
+ LEAQ -2(CX), R9
+ MOVQ (DX)(DI*1), R10
+ MOVQ 1(DX)(DI*1), R11
+ MOVQ (DX)(R9*1), R12
+ MOVQ 1(DX)(R9*1), R13
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x36, R10
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x36, R13
SHLQ $0x20, R11
IMULQ R8, R11
SHRQ $0x38, R11
- SHLQ $0x20, R12
- IMULQ R8, R12
- SHRQ $0x38, R12
+ SHLQ $0x10, R12
+ IMULQ SI, R12
+ SHRQ $0x36, R12
+ SHLQ $0x20, R13
+ IMULQ R8, R13
+ SHRQ $0x38, R13
+ LEAQ 1(DI), R8
+ LEAQ 1(R9), R14
MOVL DI, 24(SP)(R10*4)
- MOVL R14, 24(SP)(R13*4)
- MOVL R14, 4120(SP)(R11*4)
- MOVL R15, 4120(SP)(R12*4)
- MOVQ R9, R10
- MOVQ R9, R11
- SHRQ $0x08, R11
- MOVQ R11, R13
- LEAL -2(CX), R9
- LEAL -1(CX), DI
+ MOVL R9, 24(SP)(R12*4)
+ MOVL R8, 4120(SP)(R11*4)
+ MOVL R14, 4120(SP)(R13*4)
+ ADDQ $0x01, DI
+ SUBQ $0x01, R9
+
+index_loop_encodeBetterBlockAsm8B:
+ CMPQ DI, R9
+ JAE search_loop_encodeBetterBlockAsm8B
+ MOVQ (DX)(DI*1), R8
+ MOVQ (DX)(R9*1), R10
+ SHLQ $0x10, R8
+ IMULQ SI, R8
+ SHRQ $0x36, R8
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x36, R10
- SHLQ $0x20, R11
- IMULQ R8, R11
- SHRQ $0x38, R11
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x36, R13
+ MOVL DI, 24(SP)(R8*4)
MOVL R9, 24(SP)(R10*4)
- MOVL DI, 4120(SP)(R11*4)
- MOVL DI, 24(SP)(R13*4)
- JMP search_loop_encodeBetterBlockAsm8B
+ ADDQ $0x02, DI
+ SUBQ $0x02, R9
+ JMP index_loop_encodeBetterBlockAsm8B
emit_remainder_encodeBetterBlockAsm8B:
MOVQ src_len+32(FP), CX
@@ -14287,9 +14321,9 @@ emit_literal_done_emit_remainder_encodeSnappyBlockAsm8B:
// func encodeSnappyBetterBlockAsm(dst []byte, src []byte) int
// Requires: BMI, SSE2
-TEXT ·encodeSnappyBetterBlockAsm(SB), $327704-56
+TEXT ·encodeSnappyBetterBlockAsm(SB), $589848-56
MOVQ dst_base+0(FP), AX
- MOVQ $0x00000a00, CX
+ MOVQ $0x00001200, CX
LEAQ 24(SP), DX
PXOR X0, X0
@@ -14341,27 +14375,37 @@ check_maxskip_cont_encodeSnappyBetterBlockAsm:
MOVQ DI, R11
SHLQ $0x08, R10
IMULQ R9, R10
- SHRQ $0x30, R10
+ SHRQ $0x2f, R10
SHLQ $0x20, R11
IMULQ SI, R11
SHRQ $0x32, R11
MOVL 24(SP)(R10*4), SI
- MOVL 262168(SP)(R11*4), R8
+ MOVL 524312(SP)(R11*4), R8
MOVL CX, 24(SP)(R10*4)
- MOVL CX, 262168(SP)(R11*4)
- CMPL (DX)(SI*1), DI
+ MOVL CX, 524312(SP)(R11*4)
+ MOVQ (DX)(SI*1), R10
+ MOVQ (DX)(R8*1), R11
+ CMPQ R10, DI
JEQ candidate_match_encodeSnappyBetterBlockAsm
- CMPL (DX)(R8*1), DI
- JEQ candidateS_match_encodeSnappyBetterBlockAsm
- MOVL 20(SP), CX
- JMP search_loop_encodeSnappyBetterBlockAsm
+ CMPQ R11, DI
+ JNE no_short_found_encodeSnappyBetterBlockAsm
+ MOVL R8, SI
+ JMP candidate_match_encodeSnappyBetterBlockAsm
+
+no_short_found_encodeSnappyBetterBlockAsm:
+ CMPL R10, DI
+ JEQ candidate_match_encodeSnappyBetterBlockAsm
+ CMPL R11, DI
+ JEQ candidateS_match_encodeSnappyBetterBlockAsm
+ MOVL 20(SP), CX
+ JMP search_loop_encodeSnappyBetterBlockAsm
candidateS_match_encodeSnappyBetterBlockAsm:
SHRQ $0x08, DI
MOVQ DI, R10
SHLQ $0x08, R10
IMULQ R9, R10
- SHRQ $0x30, R10
+ SHRQ $0x2f, R10
MOVL 24(SP)(R10*4), SI
INCL CX
MOVL CX, 24(SP)(R10*4)
@@ -14685,52 +14729,49 @@ match_nolit_emitcopy_end_encodeSnappyBetterBlockAsm:
match_nolit_dst_ok_encodeSnappyBetterBlockAsm:
MOVQ $0x00cf1bbcdcbfa563, SI
MOVQ $0x9e3779b1, R8
- INCL DI
- MOVQ (DX)(DI*1), R9
- MOVQ R9, R10
- MOVQ R9, R11
- MOVQ R9, R12
- SHRQ $0x08, R11
- MOVQ R11, R13
- SHRQ $0x10, R12
- LEAL 1(DI), R14
- LEAL 2(DI), R15
- MOVQ -2(DX)(CX*1), R9
+ LEAQ 1(DI), DI
+ LEAQ -2(CX), R9
+ MOVQ (DX)(DI*1), R10
+ MOVQ 1(DX)(DI*1), R11
+ MOVQ (DX)(R9*1), R12
+ MOVQ 1(DX)(R9*1), R13
SHLQ $0x08, R10
IMULQ SI, R10
- SHRQ $0x30, R10
- SHLQ $0x08, R13
- IMULQ SI, R13
- SHRQ $0x30, R13
+ SHRQ $0x2f, R10
SHLQ $0x20, R11
IMULQ R8, R11
SHRQ $0x32, R11
- SHLQ $0x20, R12
- IMULQ R8, R12
- SHRQ $0x32, R12
+ SHLQ $0x08, R12
+ IMULQ SI, R12
+ SHRQ $0x2f, R12
+ SHLQ $0x20, R13
+ IMULQ R8, R13
+ SHRQ $0x32, R13
+ LEAQ 1(DI), R8
+ LEAQ 1(R9), R14
MOVL DI, 24(SP)(R10*4)
- MOVL R14, 24(SP)(R13*4)
- MOVL R14, 262168(SP)(R11*4)
- MOVL R15, 262168(SP)(R12*4)
- MOVQ R9, R10
- MOVQ R9, R11
- SHRQ $0x08, R11
- MOVQ R11, R13
- LEAL -2(CX), R9
- LEAL -1(CX), DI
+ MOVL R9, 24(SP)(R12*4)
+ MOVL R8, 524312(SP)(R11*4)
+ MOVL R14, 524312(SP)(R13*4)
+ ADDQ $0x01, DI
+ SUBQ $0x01, R9
+
+index_loop_encodeSnappyBetterBlockAsm:
+ CMPQ DI, R9
+ JAE search_loop_encodeSnappyBetterBlockAsm
+ MOVQ (DX)(DI*1), R8
+ MOVQ (DX)(R9*1), R10
+ SHLQ $0x08, R8
+ IMULQ SI, R8
+ SHRQ $0x2f, R8
SHLQ $0x08, R10
IMULQ SI, R10
- SHRQ $0x30, R10
- SHLQ $0x20, R11
- IMULQ R8, R11
- SHRQ $0x32, R11
- SHLQ $0x08, R13
- IMULQ SI, R13
- SHRQ $0x30, R13
+ SHRQ $0x2f, R10
+ MOVL DI, 24(SP)(R8*4)
MOVL R9, 24(SP)(R10*4)
- MOVL DI, 262168(SP)(R11*4)
- MOVL DI, 24(SP)(R13*4)
- JMP search_loop_encodeSnappyBetterBlockAsm
+ ADDQ $0x02, DI
+ SUBQ $0x02, R9
+ JMP index_loop_encodeSnappyBetterBlockAsm
emit_remainder_encodeSnappyBetterBlockAsm:
MOVQ src_len+32(FP), CX
@@ -14964,12 +15005,22 @@ search_loop_encodeSnappyBetterBlockAsm64K:
MOVL 262168(SP)(R11*4), R8
MOVL CX, 24(SP)(R10*4)
MOVL CX, 262168(SP)(R11*4)
- CMPL (DX)(SI*1), DI
+ MOVQ (DX)(SI*1), R10
+ MOVQ (DX)(R8*1), R11
+ CMPQ R10, DI
JEQ candidate_match_encodeSnappyBetterBlockAsm64K
- CMPL (DX)(R8*1), DI
- JEQ candidateS_match_encodeSnappyBetterBlockAsm64K
- MOVL 20(SP), CX
- JMP search_loop_encodeSnappyBetterBlockAsm64K
+ CMPQ R11, DI
+ JNE no_short_found_encodeSnappyBetterBlockAsm64K
+ MOVL R8, SI
+ JMP candidate_match_encodeSnappyBetterBlockAsm64K
+
+no_short_found_encodeSnappyBetterBlockAsm64K:
+ CMPL R10, DI
+ JEQ candidate_match_encodeSnappyBetterBlockAsm64K
+ CMPL R11, DI
+ JEQ candidateS_match_encodeSnappyBetterBlockAsm64K
+ MOVL 20(SP), CX
+ JMP search_loop_encodeSnappyBetterBlockAsm64K
candidateS_match_encodeSnappyBetterBlockAsm64K:
SHRQ $0x08, DI
@@ -15248,52 +15299,49 @@ match_nolit_emitcopy_end_encodeSnappyBetterBlockAsm64K:
match_nolit_dst_ok_encodeSnappyBetterBlockAsm64K:
MOVQ $0x00cf1bbcdcbfa563, SI
MOVQ $0x9e3779b1, R8
- INCL DI
- MOVQ (DX)(DI*1), R9
- MOVQ R9, R10
- MOVQ R9, R11
- MOVQ R9, R12
- SHRQ $0x08, R11
- MOVQ R11, R13
- SHRQ $0x10, R12
- LEAL 1(DI), R14
- LEAL 2(DI), R15
- MOVQ -2(DX)(CX*1), R9
+ LEAQ 1(DI), DI
+ LEAQ -2(CX), R9
+ MOVQ (DX)(DI*1), R10
+ MOVQ 1(DX)(DI*1), R11
+ MOVQ (DX)(R9*1), R12
+ MOVQ 1(DX)(R9*1), R13
SHLQ $0x08, R10
IMULQ SI, R10
SHRQ $0x30, R10
- SHLQ $0x08, R13
- IMULQ SI, R13
- SHRQ $0x30, R13
SHLQ $0x20, R11
IMULQ R8, R11
SHRQ $0x32, R11
- SHLQ $0x20, R12
- IMULQ R8, R12
- SHRQ $0x32, R12
+ SHLQ $0x08, R12
+ IMULQ SI, R12
+ SHRQ $0x30, R12
+ SHLQ $0x20, R13
+ IMULQ R8, R13
+ SHRQ $0x32, R13
+ LEAQ 1(DI), R8
+ LEAQ 1(R9), R14
MOVL DI, 24(SP)(R10*4)
- MOVL R14, 24(SP)(R13*4)
- MOVL R14, 262168(SP)(R11*4)
- MOVL R15, 262168(SP)(R12*4)
- MOVQ R9, R10
- MOVQ R9, R11
- SHRQ $0x08, R11
- MOVQ R11, R13
- LEAL -2(CX), R9
- LEAL -1(CX), DI
+ MOVL R9, 24(SP)(R12*4)
+ MOVL R8, 262168(SP)(R11*4)
+ MOVL R14, 262168(SP)(R13*4)
+ ADDQ $0x01, DI
+ SUBQ $0x01, R9
+
+index_loop_encodeSnappyBetterBlockAsm64K:
+ CMPQ DI, R9
+ JAE search_loop_encodeSnappyBetterBlockAsm64K
+ MOVQ (DX)(DI*1), R8
+ MOVQ (DX)(R9*1), R10
+ SHLQ $0x08, R8
+ IMULQ SI, R8
+ SHRQ $0x30, R8
SHLQ $0x08, R10
IMULQ SI, R10
SHRQ $0x30, R10
- SHLQ $0x20, R11
- IMULQ R8, R11
- SHRQ $0x32, R11
- SHLQ $0x08, R13
- IMULQ SI, R13
- SHRQ $0x30, R13
+ MOVL DI, 24(SP)(R8*4)
MOVL R9, 24(SP)(R10*4)
- MOVL DI, 262168(SP)(R11*4)
- MOVL DI, 24(SP)(R13*4)
- JMP search_loop_encodeSnappyBetterBlockAsm64K
+ ADDQ $0x02, DI
+ SUBQ $0x02, R9
+ JMP index_loop_encodeSnappyBetterBlockAsm64K
emit_remainder_encodeSnappyBetterBlockAsm64K:
MOVQ src_len+32(FP), CX
@@ -15508,12 +15556,22 @@ search_loop_encodeSnappyBetterBlockAsm12B:
MOVL 65560(SP)(R11*4), R8
MOVL CX, 24(SP)(R10*4)
MOVL CX, 65560(SP)(R11*4)
- CMPL (DX)(SI*1), DI
+ MOVQ (DX)(SI*1), R10
+ MOVQ (DX)(R8*1), R11
+ CMPQ R10, DI
JEQ candidate_match_encodeSnappyBetterBlockAsm12B
- CMPL (DX)(R8*1), DI
- JEQ candidateS_match_encodeSnappyBetterBlockAsm12B
- MOVL 20(SP), CX
- JMP search_loop_encodeSnappyBetterBlockAsm12B
+ CMPQ R11, DI
+ JNE no_short_found_encodeSnappyBetterBlockAsm12B
+ MOVL R8, SI
+ JMP candidate_match_encodeSnappyBetterBlockAsm12B
+
+no_short_found_encodeSnappyBetterBlockAsm12B:
+ CMPL R10, DI
+ JEQ candidate_match_encodeSnappyBetterBlockAsm12B
+ CMPL R11, DI
+ JEQ candidateS_match_encodeSnappyBetterBlockAsm12B
+ MOVL 20(SP), CX
+ JMP search_loop_encodeSnappyBetterBlockAsm12B
candidateS_match_encodeSnappyBetterBlockAsm12B:
SHRQ $0x08, DI
@@ -15792,52 +15850,49 @@ match_nolit_emitcopy_end_encodeSnappyBetterBlockAsm12B:
match_nolit_dst_ok_encodeSnappyBetterBlockAsm12B:
MOVQ $0x0000cf1bbcdcbf9b, SI
MOVQ $0x9e3779b1, R8
- INCL DI
- MOVQ (DX)(DI*1), R9
- MOVQ R9, R10
- MOVQ R9, R11
- MOVQ R9, R12
- SHRQ $0x08, R11
- MOVQ R11, R13
- SHRQ $0x10, R12
- LEAL 1(DI), R14
- LEAL 2(DI), R15
- MOVQ -2(DX)(CX*1), R9
+ LEAQ 1(DI), DI
+ LEAQ -2(CX), R9
+ MOVQ (DX)(DI*1), R10
+ MOVQ 1(DX)(DI*1), R11
+ MOVQ (DX)(R9*1), R12
+ MOVQ 1(DX)(R9*1), R13
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x32, R10
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x32, R13
SHLQ $0x20, R11
IMULQ R8, R11
SHRQ $0x34, R11
- SHLQ $0x20, R12
- IMULQ R8, R12
- SHRQ $0x34, R12
+ SHLQ $0x10, R12
+ IMULQ SI, R12
+ SHRQ $0x32, R12
+ SHLQ $0x20, R13
+ IMULQ R8, R13
+ SHRQ $0x34, R13
+ LEAQ 1(DI), R8
+ LEAQ 1(R9), R14
MOVL DI, 24(SP)(R10*4)
- MOVL R14, 24(SP)(R13*4)
- MOVL R14, 65560(SP)(R11*4)
- MOVL R15, 65560(SP)(R12*4)
- MOVQ R9, R10
- MOVQ R9, R11
- SHRQ $0x08, R11
- MOVQ R11, R13
- LEAL -2(CX), R9
- LEAL -1(CX), DI
+ MOVL R9, 24(SP)(R12*4)
+ MOVL R8, 65560(SP)(R11*4)
+ MOVL R14, 65560(SP)(R13*4)
+ ADDQ $0x01, DI
+ SUBQ $0x01, R9
+
+index_loop_encodeSnappyBetterBlockAsm12B:
+ CMPQ DI, R9
+ JAE search_loop_encodeSnappyBetterBlockAsm12B
+ MOVQ (DX)(DI*1), R8
+ MOVQ (DX)(R9*1), R10
+ SHLQ $0x10, R8
+ IMULQ SI, R8
+ SHRQ $0x32, R8
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x32, R10
- SHLQ $0x20, R11
- IMULQ R8, R11
- SHRQ $0x34, R11
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x32, R13
+ MOVL DI, 24(SP)(R8*4)
MOVL R9, 24(SP)(R10*4)
- MOVL DI, 65560(SP)(R11*4)
- MOVL DI, 24(SP)(R13*4)
- JMP search_loop_encodeSnappyBetterBlockAsm12B
+ ADDQ $0x02, DI
+ SUBQ $0x02, R9
+ JMP index_loop_encodeSnappyBetterBlockAsm12B
emit_remainder_encodeSnappyBetterBlockAsm12B:
MOVQ src_len+32(FP), CX
@@ -16052,12 +16107,22 @@ search_loop_encodeSnappyBetterBlockAsm10B:
MOVL 16408(SP)(R11*4), R8
MOVL CX, 24(SP)(R10*4)
MOVL CX, 16408(SP)(R11*4)
- CMPL (DX)(SI*1), DI
+ MOVQ (DX)(SI*1), R10
+ MOVQ (DX)(R8*1), R11
+ CMPQ R10, DI
JEQ candidate_match_encodeSnappyBetterBlockAsm10B
- CMPL (DX)(R8*1), DI
- JEQ candidateS_match_encodeSnappyBetterBlockAsm10B
- MOVL 20(SP), CX
- JMP search_loop_encodeSnappyBetterBlockAsm10B
+ CMPQ R11, DI
+ JNE no_short_found_encodeSnappyBetterBlockAsm10B
+ MOVL R8, SI
+ JMP candidate_match_encodeSnappyBetterBlockAsm10B
+
+no_short_found_encodeSnappyBetterBlockAsm10B:
+ CMPL R10, DI
+ JEQ candidate_match_encodeSnappyBetterBlockAsm10B
+ CMPL R11, DI
+ JEQ candidateS_match_encodeSnappyBetterBlockAsm10B
+ MOVL 20(SP), CX
+ JMP search_loop_encodeSnappyBetterBlockAsm10B
candidateS_match_encodeSnappyBetterBlockAsm10B:
SHRQ $0x08, DI
@@ -16336,52 +16401,49 @@ match_nolit_emitcopy_end_encodeSnappyBetterBlockAsm10B:
match_nolit_dst_ok_encodeSnappyBetterBlockAsm10B:
MOVQ $0x0000cf1bbcdcbf9b, SI
MOVQ $0x9e3779b1, R8
- INCL DI
- MOVQ (DX)(DI*1), R9
- MOVQ R9, R10
- MOVQ R9, R11
- MOVQ R9, R12
- SHRQ $0x08, R11
- MOVQ R11, R13
- SHRQ $0x10, R12
- LEAL 1(DI), R14
- LEAL 2(DI), R15
- MOVQ -2(DX)(CX*1), R9
+ LEAQ 1(DI), DI
+ LEAQ -2(CX), R9
+ MOVQ (DX)(DI*1), R10
+ MOVQ 1(DX)(DI*1), R11
+ MOVQ (DX)(R9*1), R12
+ MOVQ 1(DX)(R9*1), R13
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x34, R10
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x34, R13
SHLQ $0x20, R11
IMULQ R8, R11
SHRQ $0x36, R11
- SHLQ $0x20, R12
- IMULQ R8, R12
- SHRQ $0x36, R12
+ SHLQ $0x10, R12
+ IMULQ SI, R12
+ SHRQ $0x34, R12
+ SHLQ $0x20, R13
+ IMULQ R8, R13
+ SHRQ $0x36, R13
+ LEAQ 1(DI), R8
+ LEAQ 1(R9), R14
MOVL DI, 24(SP)(R10*4)
- MOVL R14, 24(SP)(R13*4)
- MOVL R14, 16408(SP)(R11*4)
- MOVL R15, 16408(SP)(R12*4)
- MOVQ R9, R10
- MOVQ R9, R11
- SHRQ $0x08, R11
- MOVQ R11, R13
- LEAL -2(CX), R9
- LEAL -1(CX), DI
+ MOVL R9, 24(SP)(R12*4)
+ MOVL R8, 16408(SP)(R11*4)
+ MOVL R14, 16408(SP)(R13*4)
+ ADDQ $0x01, DI
+ SUBQ $0x01, R9
+
+index_loop_encodeSnappyBetterBlockAsm10B:
+ CMPQ DI, R9
+ JAE search_loop_encodeSnappyBetterBlockAsm10B
+ MOVQ (DX)(DI*1), R8
+ MOVQ (DX)(R9*1), R10
+ SHLQ $0x10, R8
+ IMULQ SI, R8
+ SHRQ $0x34, R8
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x34, R10
- SHLQ $0x20, R11
- IMULQ R8, R11
- SHRQ $0x36, R11
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x34, R13
+ MOVL DI, 24(SP)(R8*4)
MOVL R9, 24(SP)(R10*4)
- MOVL DI, 16408(SP)(R11*4)
- MOVL DI, 24(SP)(R13*4)
- JMP search_loop_encodeSnappyBetterBlockAsm10B
+ ADDQ $0x02, DI
+ SUBQ $0x02, R9
+ JMP index_loop_encodeSnappyBetterBlockAsm10B
emit_remainder_encodeSnappyBetterBlockAsm10B:
MOVQ src_len+32(FP), CX
@@ -16596,12 +16658,22 @@ search_loop_encodeSnappyBetterBlockAsm8B:
MOVL 4120(SP)(R11*4), R8
MOVL CX, 24(SP)(R10*4)
MOVL CX, 4120(SP)(R11*4)
- CMPL (DX)(SI*1), DI
+ MOVQ (DX)(SI*1), R10
+ MOVQ (DX)(R8*1), R11
+ CMPQ R10, DI
JEQ candidate_match_encodeSnappyBetterBlockAsm8B
- CMPL (DX)(R8*1), DI
- JEQ candidateS_match_encodeSnappyBetterBlockAsm8B
- MOVL 20(SP), CX
- JMP search_loop_encodeSnappyBetterBlockAsm8B
+ CMPQ R11, DI
+ JNE no_short_found_encodeSnappyBetterBlockAsm8B
+ MOVL R8, SI
+ JMP candidate_match_encodeSnappyBetterBlockAsm8B
+
+no_short_found_encodeSnappyBetterBlockAsm8B:
+ CMPL R10, DI
+ JEQ candidate_match_encodeSnappyBetterBlockAsm8B
+ CMPL R11, DI
+ JEQ candidateS_match_encodeSnappyBetterBlockAsm8B
+ MOVL 20(SP), CX
+ JMP search_loop_encodeSnappyBetterBlockAsm8B
candidateS_match_encodeSnappyBetterBlockAsm8B:
SHRQ $0x08, DI
@@ -16878,52 +16950,49 @@ match_nolit_emitcopy_end_encodeSnappyBetterBlockAsm8B:
match_nolit_dst_ok_encodeSnappyBetterBlockAsm8B:
MOVQ $0x0000cf1bbcdcbf9b, SI
MOVQ $0x9e3779b1, R8
- INCL DI
- MOVQ (DX)(DI*1), R9
- MOVQ R9, R10
- MOVQ R9, R11
- MOVQ R9, R12
- SHRQ $0x08, R11
- MOVQ R11, R13
- SHRQ $0x10, R12
- LEAL 1(DI), R14
- LEAL 2(DI), R15
- MOVQ -2(DX)(CX*1), R9
+ LEAQ 1(DI), DI
+ LEAQ -2(CX), R9
+ MOVQ (DX)(DI*1), R10
+ MOVQ 1(DX)(DI*1), R11
+ MOVQ (DX)(R9*1), R12
+ MOVQ 1(DX)(R9*1), R13
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x36, R10
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x36, R13
SHLQ $0x20, R11
IMULQ R8, R11
SHRQ $0x38, R11
- SHLQ $0x20, R12
- IMULQ R8, R12
- SHRQ $0x38, R12
+ SHLQ $0x10, R12
+ IMULQ SI, R12
+ SHRQ $0x36, R12
+ SHLQ $0x20, R13
+ IMULQ R8, R13
+ SHRQ $0x38, R13
+ LEAQ 1(DI), R8
+ LEAQ 1(R9), R14
MOVL DI, 24(SP)(R10*4)
- MOVL R14, 24(SP)(R13*4)
- MOVL R14, 4120(SP)(R11*4)
- MOVL R15, 4120(SP)(R12*4)
- MOVQ R9, R10
- MOVQ R9, R11
- SHRQ $0x08, R11
- MOVQ R11, R13
- LEAL -2(CX), R9
- LEAL -1(CX), DI
+ MOVL R9, 24(SP)(R12*4)
+ MOVL R8, 4120(SP)(R11*4)
+ MOVL R14, 4120(SP)(R13*4)
+ ADDQ $0x01, DI
+ SUBQ $0x01, R9
+
+index_loop_encodeSnappyBetterBlockAsm8B:
+ CMPQ DI, R9
+ JAE search_loop_encodeSnappyBetterBlockAsm8B
+ MOVQ (DX)(DI*1), R8
+ MOVQ (DX)(R9*1), R10
+ SHLQ $0x10, R8
+ IMULQ SI, R8
+ SHRQ $0x36, R8
SHLQ $0x10, R10
IMULQ SI, R10
SHRQ $0x36, R10
- SHLQ $0x20, R11
- IMULQ R8, R11
- SHRQ $0x38, R11
- SHLQ $0x10, R13
- IMULQ SI, R13
- SHRQ $0x36, R13
+ MOVL DI, 24(SP)(R8*4)
MOVL R9, 24(SP)(R10*4)
- MOVL DI, 4120(SP)(R11*4)
- MOVL DI, 24(SP)(R13*4)
- JMP search_loop_encodeSnappyBetterBlockAsm8B
+ ADDQ $0x02, DI
+ SUBQ $0x02, R9
+ JMP index_loop_encodeSnappyBetterBlockAsm8B
emit_remainder_encodeSnappyBetterBlockAsm8B:
MOVQ src_len+32(FP), CX
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/Makefile b/test/performance/vendor/github.com/nginx/agent/sdk/v2/Makefile
index 8403a85e6..8df31cf4c 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/Makefile
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/Makefile
@@ -23,7 +23,10 @@ Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\
Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\
Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:\
./proto/$$packageName/ \
+ --doc_out=./../docs/proto/ \
+ --doc_opt=markdown,$$packageName.md \
proto/$$packageName/*.proto;\
+ grep -v '^swagger:' ./../docs/proto/$$packageName.md > ./../docs/proto/tmp-$$packageName.md && mv ./../docs/proto/tmp-$$packageName.md ./../docs/proto/$$packageName.md;\
done
protoc \
@@ -40,7 +43,10 @@ Mgoogle/protobuf/empty.proto=github.com/gogo/protobuf/types,\
Mgoogle/api/annotations.proto=github.com/gogo/googleapis/google/api,\
Mgoogle/protobuf/field_mask.proto=github.com/gogo/protobuf/types:\
./proto/ \
- proto/*.proto
+ --doc_out=./../docs/proto/ \
+ --doc_opt=markdown,proto.md \
+ proto/*.proto; \
+ grep -v '^swagger:' ./../docs/proto/proto.md > ./../docs/proto/tmp-proto.md && mv ./../docs/proto/tmp-proto.md ./../docs/proto/proto.md
go generate ./sdk/...
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/agent.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/agent.pb.go
index f0335e02e..ca50f0ae9 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/agent.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/agent.pb.go
@@ -24,12 +24,17 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Different status codes for agent connect response
type AgentConnectStatus_StatusCode int32
const (
- AgentConnectStatus_CONNECT_UNKNOWN AgentConnectStatus_StatusCode = 0
- AgentConnectStatus_CONNECT_OK AgentConnectStatus_StatusCode = 1
- AgentConnectStatus_CONNECT_REJECTED_OTHER AgentConnectStatus_StatusCode = 2
+ // Unknown status of the agent connect request
+ AgentConnectStatus_CONNECT_UNKNOWN AgentConnectStatus_StatusCode = 0
+ // Agent connect request was successful
+ AgentConnectStatus_CONNECT_OK AgentConnectStatus_StatusCode = 1
+ // Agent connect request was rejected
+ AgentConnectStatus_CONNECT_REJECTED_OTHER AgentConnectStatus_StatusCode = 2
+ // Agent connect request was rejected because an agent with the same ID is already registered
AgentConnectStatus_CONNECT_REJECTED_DUP_ID AgentConnectStatus_StatusCode = 3
)
@@ -55,13 +60,19 @@ func (AgentConnectStatus_StatusCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_56ede974c0020f77, []int{1, 0}
}
+// Log level enum
type AgentLogging_Level int32
const (
- AgentLogging_INFO AgentLogging_Level = 0
+ // info level
+ AgentLogging_INFO AgentLogging_Level = 0
+ // debug level
AgentLogging_DEBUG AgentLogging_Level = 1
- AgentLogging_WARN AgentLogging_Level = 2
+ // warn level
+ AgentLogging_WARN AgentLogging_Level = 2
+ // error level
AgentLogging_ERROR AgentLogging_Level = 3
+ // fatal level
AgentLogging_FATAL AgentLogging_Level = 4
)
@@ -89,10 +100,16 @@ func (AgentLogging_Level) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_56ede974c0020f77, []int{6, 0}
}
+// Represents an agent connect request that is sent from the agent to the management server
type AgentConnectRequest struct {
- Meta *AgentMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
- Details []*NginxDetails `protobuf:"bytes,3,rep,name=details,proto3" json:"details"`
- Host *HostInfo `protobuf:"bytes,4,opt,name=host,proto3" json:"host"`
+ // Provides meta information about the agent
+ Meta *AgentMeta `protobuf:"bytes,2,opt,name=meta,proto3" json:"meta"`
+ // Provides information about the NGINX instances that are present.
+ // This data will be moving to dataplane_software_details in a future release
+ Details []*NginxDetails `protobuf:"bytes,3,rep,name=details,proto3" json:"details"`
+ // Provides information about the host system
+ Host *HostInfo `protobuf:"bytes,4,opt,name=host,proto3" json:"host"`
+ // Provides information about software installed in the system (e.g. App Protect WAF, NGINX, etc.)
DataplaneSoftwareDetails []*DataplaneSoftwareDetails `protobuf:"bytes,5,rep,name=dataplane_software_details,json=dataplaneSoftwareDetails,proto3" json:"dataplane_software_details"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -160,13 +177,17 @@ func (m *AgentConnectRequest) GetDataplaneSoftwareDetails() []*DataplaneSoftware
return nil
}
+// Represents an agent connect status
type AgentConnectStatus struct {
- StatusCode AgentConnectStatus_StatusCode `protobuf:"varint,1,opt,name=statusCode,proto3,enum=f5.nginx.agent.sdk.AgentConnectStatus_StatusCode" json:"status_code"`
- Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message"`
- Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Provides a status of the agent connect response
+ StatusCode AgentConnectStatus_StatusCode `protobuf:"varint,1,opt,name=statusCode,proto3,enum=f5.nginx.agent.sdk.AgentConnectStatus_StatusCode" json:"status_code"`
+ // Provides a user friendly message to describe the response
+ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message"`
+ // Provides an error message of why the agent connect request was rejected
+ Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *AgentConnectStatus) Reset() { *m = AgentConnectStatus{} }
@@ -223,8 +244,11 @@ func (m *AgentConnectStatus) GetError() string {
return ""
}
+// Represents an agent connect response that is sent from the management server to the agent
type AgentConnectResponse struct {
- AgentConfig *AgentConfig `protobuf:"bytes,1,opt,name=agent_config,json=agentConfig,proto3" json:"agent_config"`
+ // Agent configuration
+ AgentConfig *AgentConfig `protobuf:"bytes,1,opt,name=agent_config,json=agentConfig,proto3" json:"agent_config"`
+ // Agent connect request status
Status *AgentConnectStatus `protobuf:"bytes,2,opt,name=status,proto3" json:"status"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -278,6 +302,8 @@ func (m *AgentConnectResponse) GetStatus() *AgentConnectStatus {
return nil
}
+// Represents an agent config request that is sent from the agent to the management server.
+// This is used by the agent to request the agent configuration from the management server.
type AgentConfigRequest struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -317,9 +343,14 @@ func (m *AgentConfigRequest) XXX_DiscardUnknown() {
var xxx_messageInfo_AgentConfigRequest proto.InternalMessageInfo
+// Represents an agent's configuration. The message is sent from the management server to the agent.
type AgentConfig struct {
- Details *AgentDetails `protobuf:"bytes,1,opt,name=details,proto3" json:"details"`
- Loggers *AgentLogging `protobuf:"bytes,2,opt,name=loggers,proto3" json:"loggers"`
+ // Provides information about the agent
+ Details *AgentDetails `protobuf:"bytes,1,opt,name=details,proto3" json:"details"`
+ // Provides information about the agent logging.
+ // This is will be implemented in a future release.
+ Loggers *AgentLogging `protobuf:"bytes,2,opt,name=loggers,proto3" json:"loggers"`
+ // Provides meta information about the nginx configurations
Configs *ConfigReport `protobuf:"bytes,3,opt,name=configs,proto3" json:"configs"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -380,10 +411,15 @@ func (m *AgentConfig) GetConfigs() *ConfigReport {
return nil
}
+// Represents agent details. This message is sent from the management server to the agent.
type AgentDetails struct {
- Features []string `protobuf:"bytes,1,rep,name=features,proto3" json:"features"`
- Extensions []string `protobuf:"bytes,2,rep,name=extensions,proto3" json:"extensions"`
- Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags"`
+ // List of agent feature that are enabled
+ Features []string `protobuf:"bytes,1,rep,name=features,proto3" json:"features"`
+ // List of agent extensions that are enabled
+ Extensions []string `protobuf:"bytes,2,rep,name=extensions,proto3" json:"extensions"`
+ // List of tags
+ Tags []string `protobuf:"bytes,3,rep,name=tags,proto3" json:"tags"`
+ // Alias name for the agent
Alias string `protobuf:"bytes,4,opt,name=alias,proto3" json:"alias"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -451,17 +487,25 @@ func (m *AgentDetails) GetAlias() string {
return ""
}
+// Represents agent logging details
type AgentLogging struct {
- Level AgentLogging_Level `protobuf:"varint,1,opt,name=level,proto3,enum=f5.nginx.agent.sdk.AgentLogging_Level" json:"level"`
- Dir string `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir"`
- File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file"`
- MaxSize uint32 `protobuf:"varint,4,opt,name=max_size,json=maxSize,proto3" json:"max_size"`
- MaxBackups uint32 `protobuf:"varint,5,opt,name=max_backups,json=maxBackups,proto3" json:"max_backups"`
- MaxAge uint32 `protobuf:"varint,6,opt,name=max_age,json=maxAge,proto3" json:"max_age"`
- Compress bool `protobuf:"varint,7,opt,name=compress,proto3" json:"compress"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Log level
+ Level AgentLogging_Level `protobuf:"varint,1,opt,name=level,proto3,enum=f5.nginx.agent.sdk.AgentLogging_Level" json:"level"`
+ // Directory where the logs are located
+ Dir string `protobuf:"bytes,2,opt,name=dir,proto3" json:"dir"`
+ // Name of the log file
+ File string `protobuf:"bytes,3,opt,name=file,proto3" json:"file"`
+ // Max size of the log file in MB
+ MaxSize uint32 `protobuf:"varint,4,opt,name=max_size,json=maxSize,proto3" json:"max_size"`
+ // Max number of backups
+ MaxBackups uint32 `protobuf:"varint,5,opt,name=max_backups,json=maxBackups,proto3" json:"max_backups"`
+ // Max age of a log file in days
+ MaxAge uint32 `protobuf:"varint,6,opt,name=max_age,json=maxAge,proto3" json:"max_age"`
+ // Is the log file compressed
+ Compress bool `protobuf:"varint,7,opt,name=compress,proto3" json:"compress"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *AgentLogging) Reset() { *m = AgentLogging{} }
@@ -546,17 +590,25 @@ func (m *AgentLogging) GetCompress() bool {
return false
}
+// Represents agent metadata
type AgentMeta struct {
- Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
- DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name"`
- Tag []string `protobuf:"bytes,3,rep,name=tag,proto3" json:"tag"`
- InstanceGroup string `protobuf:"bytes,5,opt,name=instance_group,json=instanceGroup,proto3" json:"instance_group"`
- Updated *types.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated"`
- SystemUid string `protobuf:"bytes,7,opt,name=system_uid,json=systemUid,proto3" json:"system_uid"`
- AgentDetails *AgentDetails `protobuf:"bytes,8,opt,name=agent_details,json=agentDetails,proto3" json:"agent_details"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Version of the agent
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version"`
+ // User friendly name for the agent
+ DisplayName string `protobuf:"bytes,2,opt,name=display_name,json=displayName,proto3" json:"display_name"`
+ // List of tags
+ Tag []string `protobuf:"bytes,3,rep,name=tag,proto3" json:"tag"`
+ // Instance group name used to group NGINX instances
+ InstanceGroup string `protobuf:"bytes,5,opt,name=instance_group,json=instanceGroup,proto3" json:"instance_group"`
+ // Last time agent was updated
+ Updated *types.Timestamp `protobuf:"bytes,6,opt,name=updated,proto3" json:"updated"`
+ // ID of the system where the agent is installed
+ SystemUid string `protobuf:"bytes,7,opt,name=system_uid,json=systemUid,proto3" json:"system_uid"`
+ // Provides other agent information
+ AgentDetails *AgentDetails `protobuf:"bytes,8,opt,name=agent_details,json=agentDetails,proto3" json:"agent_details"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *AgentMeta) Reset() { *m = AgentMeta{} }
@@ -663,69 +715,69 @@ var fileDescriptor_56ede974c0020f77 = []byte{
0x88, 0x2a, 0x58, 0x81, 0x52, 0x14, 0x05, 0xe1, 0x22, 0x59, 0x8a, 0x63, 0xc7, 0x48, 0xd4, 0x58,
0xae, 0x50, 0x5c, 0xb6, 0xc6, 0xda, 0xd1, 0x66, 0xb1, 0x76, 0x57, 0xec, 0x8c, 0x8c, 0x9c, 0x47,
0xe0, 0x21, 0xb8, 0x72, 0xe1, 0x01, 0x78, 0x04, 0x8e, 0x3c, 0xc1, 0x16, 0xe5, 0x13, 0xb5, 0x67,
- 0x2e, 0xdc, 0xa8, 0xf9, 0x59, 0x5b, 0xc6, 0x3f, 0xc9, 0x65, 0xb6, 0xfb, 0x9b, 0xee, 0x9e, 0x9e,
+ 0x2e, 0xdc, 0xa8, 0xf9, 0x59, 0x5b, 0xc6, 0x3f, 0xc9, 0x65, 0xa6, 0xfb, 0xdb, 0xee, 0x9e, 0x9e,
0x6f, 0xa6, 0x7b, 0x16, 0xaa, 0xc4, 0xa3, 0x21, 0xb7, 0xe7, 0x71, 0xc4, 0x23, 0x84, 0xa6, 0x9f,
- 0xdb, 0xa1, 0xe7, 0x87, 0x4b, 0x5b, 0xa1, 0xcc, 0x3d, 0xae, 0x83, 0x17, 0x79, 0x91, 0x9a, 0xaf,
- 0xc3, 0xcb, 0x88, 0x69, 0xdb, 0xfa, 0xfa, 0x24, 0x0a, 0xa7, 0xbe, 0xa7, 0xb5, 0xaa, 0x72, 0x53,
- 0x8a, 0xe5, 0x45, 0x91, 0x37, 0xa3, 0x6d, 0xa9, 0x1d, 0x2d, 0xa6, 0x6d, 0xee, 0x07, 0x94, 0x71,
- 0x12, 0xcc, 0xb5, 0xc1, 0x03, 0x77, 0xee, 0xb0, 0x68, 0xca, 0x7f, 0x22, 0x31, 0x75, 0x5c, 0xca,
- 0x89, 0x3f, 0x63, 0x6a, 0xaa, 0xf9, 0x4f, 0x0e, 0xee, 0x75, 0xc5, 0xe2, 0xdb, 0x51, 0x18, 0xd2,
- 0x09, 0xc7, 0xf4, 0xc7, 0x05, 0x65, 0x1c, 0x3d, 0x81, 0x42, 0x40, 0x39, 0xa9, 0xe5, 0x1a, 0x46,
- 0xab, 0xda, 0x79, 0xcf, 0xbe, 0x9a, 0xa9, 0x2d, 0xdd, 0xbe, 0xa1, 0x9c, 0xf4, 0xca, 0x69, 0x62,
- 0x49, 0x73, 0x2c, 0x47, 0xb4, 0x03, 0x25, 0xbd, 0x4a, 0x2d, 0xdf, 0xc8, 0xb7, 0xaa, 0x9d, 0xc6,
- 0x75, 0xfe, 0x43, 0xa1, 0xf7, 0x95, 0x5d, 0xaf, 0x9a, 0x26, 0x56, 0xe6, 0x84, 0x33, 0x01, 0x7d,
- 0x05, 0x05, 0x41, 0x41, 0xad, 0x20, 0xb3, 0x78, 0x78, 0x5d, 0x94, 0x67, 0x11, 0xe3, 0xbb, 0xe1,
- 0x34, 0x52, 0x49, 0x08, 0x6b, 0x2c, 0x47, 0xf4, 0xb3, 0x01, 0x75, 0x97, 0x70, 0x32, 0x9f, 0x91,
- 0x90, 0x5e, 0xd9, 0x7e, 0xad, 0x28, 0x13, 0xfb, 0xf8, 0xba, 0x90, 0xfd, 0xcc, 0xeb, 0x40, 0x3b,
- 0x65, 0x49, 0x6e, 0xa5, 0x89, 0x75, 0x4b, 0x4c, 0x5c, 0x73, 0x6f, 0xf0, 0xdc, 0x2b, 0x94, 0x0d,
- 0x33, 0x87, 0xcb, 0xbe, 0x4b, 0x43, 0xee, 0xf3, 0xd3, 0xe6, 0x6f, 0x39, 0x40, 0xab, 0xb4, 0x1f,
- 0x70, 0xc2, 0x17, 0x0c, 0x1d, 0x01, 0x30, 0x29, 0x6d, 0x47, 0x2e, 0xad, 0x19, 0x0d, 0xa3, 0xb5,
- 0xd9, 0xf9, 0xec, 0x46, 0xee, 0x2f, 0xf9, 0xda, 0x07, 0xe7, 0x8e, 0xbd, 0xbb, 0x69, 0x62, 0x55,
- 0x55, 0x20, 0x67, 0x12, 0xb9, 0x14, 0xaf, 0x44, 0x45, 0x1f, 0x40, 0x29, 0xa0, 0x8c, 0x11, 0x8f,
- 0xca, 0xc3, 0xad, 0x28, 0xea, 0x35, 0x84, 0x33, 0x01, 0x59, 0x50, 0xa4, 0x71, 0x1c, 0xc5, 0xb5,
- 0xbc, 0x34, 0xaa, 0xa4, 0x89, 0xa5, 0x00, 0xac, 0x3e, 0xcd, 0x1f, 0x00, 0x2e, 0x96, 0x44, 0xf7,
+ 0xdb, 0xa1, 0xe7, 0x87, 0x4b, 0x5b, 0xa1, 0xcc, 0x3d, 0xae, 0xaf, 0x4f, 0xa2, 0x70, 0xea, 0x7b,
+ 0xca, 0xa2, 0xfe, 0xc0, 0x9d, 0x3b, 0x2c, 0x9a, 0xf2, 0x9f, 0x48, 0x4c, 0x1d, 0x97, 0x72, 0xe2,
+ 0xcf, 0x98, 0xfe, 0x04, 0x5e, 0xe4, 0x45, 0x5a, 0xb6, 0xbc, 0x28, 0xf2, 0x66, 0xb4, 0x2d, 0xb5,
+ 0xa3, 0xc5, 0xb4, 0xcd, 0xfd, 0x80, 0x32, 0x4e, 0x82, 0x79, 0x66, 0xfc, 0x32, 0x62, 0x7a, 0xd5,
+ 0x7a, 0x55, 0x2d, 0x29, 0x95, 0xe6, 0x3f, 0x39, 0xb8, 0xd7, 0x15, 0x8b, 0x6f, 0x47, 0x61, 0x48,
+ 0x27, 0x1c, 0xd3, 0x1f, 0x17, 0x94, 0x71, 0xf4, 0x04, 0x0a, 0x01, 0xe5, 0xa4, 0x96, 0x6b, 0x18,
+ 0xad, 0x6a, 0xe7, 0x3d, 0xfb, 0x6a, 0xa6, 0xb6, 0x74, 0xfb, 0x86, 0x72, 0xd2, 0x2b, 0xa7, 0x89,
+ 0x25, 0xcd, 0xb1, 0x1c, 0xd1, 0x0e, 0x94, 0x74, 0xae, 0xb5, 0x7c, 0x23, 0xdf, 0xaa, 0x76, 0x1a,
+ 0xd7, 0xf9, 0x0f, 0x85, 0xde, 0x57, 0x76, 0xbd, 0x6a, 0x9a, 0x58, 0x99, 0x13, 0xce, 0x04, 0xf4,
+ 0x15, 0x14, 0x44, 0xe2, 0xb5, 0x82, 0xcc, 0xe2, 0xe1, 0x75, 0x51, 0x9e, 0x45, 0x8c, 0xef, 0x86,
+ 0xd3, 0x48, 0x25, 0x21, 0xac, 0xb1, 0x1c, 0xd1, 0xcf, 0x06, 0xd4, 0x5d, 0xc2, 0xc9, 0x7c, 0x46,
+ 0x42, 0x7a, 0x85, 0xc4, 0x5a, 0x51, 0x26, 0xf6, 0xf1, 0x75, 0x21, 0xfb, 0x99, 0xd7, 0x81, 0x76,
+ 0xca, 0x92, 0xdc, 0x4a, 0x13, 0xeb, 0x96, 0x98, 0xb8, 0xe6, 0xde, 0xe0, 0xb9, 0x57, 0x28, 0x1b,
+ 0x66, 0x0e, 0x97, 0x7d, 0x97, 0x86, 0xdc, 0xe7, 0xa7, 0xcd, 0xdf, 0x72, 0x80, 0x56, 0x69, 0x3f,
+ 0xe0, 0x84, 0x2f, 0x18, 0x3a, 0x02, 0x60, 0x52, 0xda, 0x8e, 0x5c, 0x5a, 0x33, 0x1a, 0x46, 0x6b,
+ 0xb3, 0xf3, 0xd9, 0x8d, 0xdc, 0x5f, 0xf2, 0xb5, 0x0f, 0xce, 0x1d, 0x7b, 0x77, 0xd3, 0xc4, 0xaa,
+ 0xaa, 0x40, 0xce, 0x24, 0x72, 0x29, 0x5e, 0x89, 0x8a, 0x3e, 0x80, 0x52, 0x40, 0x19, 0x23, 0x1e,
+ 0x95, 0x87, 0x5b, 0x51, 0xd4, 0x6b, 0x08, 0x67, 0x02, 0xb2, 0xa0, 0x48, 0xe3, 0x38, 0x8a, 0x6b,
+ 0x79, 0x69, 0x54, 0x49, 0x13, 0x4b, 0x01, 0x58, 0x4d, 0xcd, 0x1f, 0x00, 0x2e, 0x96, 0x44, 0xf7,
0xe0, 0xee, 0xf6, 0x68, 0x38, 0x1c, 0x6c, 0x8f, 0x9d, 0xc3, 0xe1, 0xf3, 0xe1, 0xe8, 0xc5, 0xd0,
0xbc, 0x83, 0x36, 0x01, 0x32, 0x70, 0xf4, 0xdc, 0x34, 0x50, 0x1d, 0xde, 0xce, 0x74, 0x3c, 0xd8,
0x1b, 0x6c, 0x8f, 0x07, 0x7d, 0x67, 0x34, 0x7e, 0x36, 0xc0, 0x66, 0x0e, 0xbd, 0x0b, 0xef, 0x5c,
- 0x99, 0xeb, 0x1f, 0x7e, 0xeb, 0xec, 0xf6, 0xcd, 0x7c, 0xf3, 0x77, 0x03, 0xee, 0x5f, 0xbe, 0xa5,
- 0x6c, 0x1e, 0x85, 0x8c, 0xa2, 0x31, 0xac, 0x4b, 0x52, 0x1c, 0x55, 0x1d, 0x92, 0xb2, 0x6a, 0xc7,
- 0xba, 0x8d, 0xb2, 0xa9, 0xef, 0xf5, 0xcc, 0x34, 0xb1, 0x2e, 0x39, 0x62, 0x55, 0x97, 0x6a, 0x1a,
- 0xed, 0xc1, 0x9a, 0x22, 0x4c, 0x5f, 0xff, 0x47, 0x6f, 0x76, 0x04, 0x3d, 0x48, 0x13, 0x4b, 0x7b,
- 0x62, 0xfd, 0x6d, 0xde, 0xbf, 0x38, 0x68, 0xb1, 0x8e, 0x2a, 0xaf, 0xe6, 0xdf, 0x06, 0x54, 0x57,
- 0xe0, 0xd5, 0x8a, 0x51, 0x5b, 0x68, 0xdc, 0xb8, 0xe4, 0xed, 0x15, 0xb3, 0x03, 0xa5, 0x59, 0xe4,
- 0x79, 0x34, 0xce, 0x72, 0xbf, 0x39, 0xd0, 0x7e, 0xe4, 0x79, 0x7e, 0xe8, 0xa9, 0x40, 0xda, 0x09,
- 0x67, 0x82, 0x08, 0xa4, 0xa8, 0x61, 0xf2, 0x06, 0xdc, 0x10, 0x28, 0xdb, 0xd5, 0x3c, 0x8a, 0xb9,
- 0x0a, 0xa4, 0x9d, 0x70, 0x26, 0x34, 0x7f, 0x35, 0x60, 0x7d, 0x35, 0x71, 0xd4, 0x82, 0xf2, 0x94,
- 0x12, 0xbe, 0x88, 0xa9, 0xd8, 0x6c, 0xbe, 0x55, 0xe9, 0xad, 0xa7, 0x89, 0x75, 0x8e, 0xe1, 0x73,
- 0x09, 0xd9, 0x00, 0x74, 0xc9, 0x69, 0xc8, 0xfc, 0x28, 0x14, 0xfb, 0x11, 0xb6, 0x9b, 0x69, 0x62,
- 0xad, 0xa0, 0x78, 0x45, 0x46, 0x0f, 0xa1, 0xc0, 0x89, 0xa7, 0x9a, 0x4e, 0x45, 0x35, 0x04, 0xa1,
- 0x63, 0x39, 0x8a, 0x1b, 0x4d, 0x66, 0x3e, 0x61, 0xb2, 0x9b, 0xe8, 0x1b, 0x2d, 0x01, 0xac, 0x3e,
+ 0xf9, 0xd6, 0x3f, 0xfc, 0xd6, 0xd9, 0xed, 0x9b, 0xf9, 0xe6, 0xef, 0x06, 0xdc, 0xbf, 0x7c, 0x4b,
+ 0xd9, 0x3c, 0x0a, 0x19, 0x45, 0x63, 0x58, 0x97, 0xa4, 0x38, 0xaa, 0x6a, 0x24, 0x65, 0xd5, 0x8e,
+ 0x75, 0x1b, 0x65, 0x53, 0xdf, 0xeb, 0x99, 0x69, 0x62, 0x5d, 0x72, 0xc4, 0xaa, 0x2e, 0xd5, 0x67,
+ 0xb4, 0x07, 0x6b, 0x8a, 0x30, 0x7d, 0xfd, 0x1f, 0xbd, 0xd9, 0x11, 0xf4, 0x20, 0x4d, 0x2c, 0xed,
+ 0x89, 0xf5, 0xdc, 0xbc, 0x7f, 0x71, 0xd0, 0x62, 0x1d, 0x55, 0x5e, 0xcd, 0xbf, 0x0d, 0xa8, 0xae,
+ 0xc0, 0xab, 0x15, 0xa3, 0xb6, 0xd0, 0xb8, 0x71, 0xc9, 0xdb, 0x2b, 0x66, 0x07, 0x4a, 0xb3, 0xc8,
+ 0xf3, 0x68, 0x9c, 0xe5, 0x7e, 0x73, 0xa0, 0xfd, 0xc8, 0xf3, 0xfc, 0xd0, 0x53, 0x81, 0xb4, 0x13,
+ 0xce, 0x04, 0x11, 0x48, 0x51, 0xc3, 0xe4, 0x0d, 0xb8, 0x21, 0x50, 0xb6, 0xab, 0x79, 0x14, 0x73,
+ 0x15, 0x48, 0x3b, 0xe1, 0x4c, 0x68, 0xfe, 0x6a, 0xc0, 0xfa, 0x6a, 0xe2, 0xa8, 0x05, 0xe5, 0x29,
+ 0x25, 0x7c, 0x11, 0x53, 0xb1, 0xd9, 0x7c, 0xab, 0xd2, 0x5b, 0x4f, 0x13, 0xeb, 0x1c, 0xc3, 0xe7,
+ 0x12, 0xb2, 0x01, 0xe8, 0x92, 0xd3, 0x90, 0xf9, 0x51, 0x28, 0xf6, 0x23, 0x6c, 0x37, 0xd3, 0xc4,
+ 0x5a, 0x41, 0xf1, 0x8a, 0x8c, 0x1e, 0x42, 0x81, 0x13, 0x4f, 0x35, 0x9d, 0x8a, 0x6a, 0x08, 0x42,
+ 0xc7, 0x72, 0x14, 0x37, 0x9a, 0xcc, 0x7c, 0xc2, 0x64, 0x37, 0xd1, 0x37, 0x5a, 0x02, 0x58, 0x4d,
0xcd, 0x7f, 0x73, 0x3a, 0x53, 0xcd, 0x0c, 0xda, 0x81, 0xe2, 0x8c, 0x9e, 0xd0, 0x99, 0xae, 0xc4,
- 0x47, 0xaf, 0xa3, 0xd2, 0xde, 0x17, 0xd6, 0x2a, 0xb2, 0x74, 0xc4, 0xea, 0x83, 0x1e, 0x40, 0xde,
- 0xf5, 0x63, 0x5d, 0x6f, 0xa5, 0x34, 0xb1, 0x84, 0x8a, 0xc5, 0x20, 0x72, 0x9e, 0xfa, 0x33, 0xaa,
- 0xcb, 0x4c, 0xe6, 0x2c, 0x74, 0x2c, 0x47, 0xf4, 0x21, 0x94, 0x03, 0xb2, 0x74, 0x98, 0xff, 0x8a,
- 0xca, 0xb4, 0x37, 0x14, 0x57, 0x19, 0x86, 0x4b, 0x01, 0x59, 0x1e, 0xf8, 0xaf, 0x28, 0xfa, 0x14,
- 0xaa, 0x02, 0x3c, 0x22, 0x93, 0xe3, 0xc5, 0x5c, 0x74, 0x37, 0x61, 0x2b, 0xfb, 0xc0, 0x0a, 0x8c,
- 0x21, 0x20, 0xcb, 0x9e, 0x92, 0xd1, 0xfb, 0x20, 0x9c, 0x1d, 0xd1, 0x07, 0xd6, 0xa4, 0xb5, 0xea,
- 0x03, 0x0a, 0xc2, 0x6b, 0x01, 0x59, 0x76, 0x3d, 0x2a, 0x0e, 0x6b, 0x12, 0x05, 0xf3, 0x98, 0x32,
- 0x56, 0x2b, 0x35, 0x8c, 0x56, 0x59, 0x25, 0x90, 0x61, 0xf8, 0x5c, 0x6a, 0x7e, 0x0d, 0x45, 0xb9,
- 0x7d, 0x54, 0x86, 0xc2, 0xee, 0xf0, 0xe9, 0xc8, 0xbc, 0x83, 0x2a, 0x50, 0xec, 0x0f, 0x7a, 0x87,
- 0x3b, 0xa6, 0x21, 0xc0, 0x17, 0x5d, 0x3c, 0x34, 0x73, 0x02, 0x1c, 0x60, 0x3c, 0xc2, 0x66, 0x5e,
- 0x88, 0x4f, 0xbb, 0xe3, 0xee, 0xbe, 0x59, 0x68, 0xfe, 0x92, 0x87, 0xca, 0xf9, 0x83, 0x22, 0x7a,
- 0xd4, 0x09, 0x8d, 0xc5, 0xa1, 0x4a, 0xea, 0x75, 0x8f, 0xd2, 0x10, 0xce, 0x04, 0xf4, 0x18, 0xd6,
- 0x5d, 0x9f, 0xcd, 0x67, 0xe4, 0xd4, 0x09, 0x49, 0x90, 0xf5, 0x33, 0x59, 0xdc, 0xab, 0x38, 0xae,
- 0x6a, 0x6d, 0x48, 0x02, 0x2a, 0xce, 0x82, 0x13, 0x4f, 0xdf, 0x11, 0x79, 0x16, 0x9c, 0x78, 0x58,
- 0x0c, 0xe8, 0x4b, 0xd8, 0xf4, 0x43, 0xc6, 0x49, 0x38, 0xa1, 0x8e, 0x17, 0x47, 0x8b, 0xb9, 0xe4,
- 0xb1, 0xd2, 0x43, 0x69, 0x62, 0xfd, 0x6f, 0x06, 0x6f, 0x64, 0xfa, 0x8e, 0x50, 0x51, 0x17, 0x4a,
- 0x8b, 0xb9, 0x4b, 0x38, 0x75, 0x25, 0x9b, 0xd5, 0x4e, 0xdd, 0x56, 0xaf, 0xb2, 0x9d, 0xbd, 0xca,
- 0xf6, 0x38, 0x7b, 0x95, 0xd5, 0x6e, 0xb4, 0x39, 0xce, 0x04, 0xf4, 0x09, 0x00, 0x3b, 0x65, 0x9c,
+ 0x47, 0xaf, 0xa3, 0xd2, 0xde, 0x17, 0xd6, 0x2a, 0xb2, 0x74, 0xc4, 0x6a, 0x42, 0x0f, 0x20, 0xef,
+ 0xfa, 0xb1, 0xae, 0xb7, 0x52, 0x9a, 0x58, 0x42, 0xc5, 0x62, 0x10, 0x39, 0x4f, 0xfd, 0x19, 0xd5,
+ 0x65, 0x26, 0x73, 0x16, 0x3a, 0x96, 0x23, 0xfa, 0x10, 0xca, 0x01, 0x59, 0x3a, 0xcc, 0x7f, 0x45,
+ 0x65, 0xda, 0x1b, 0x8a, 0xab, 0x0c, 0xc3, 0xa5, 0x80, 0x2c, 0x0f, 0xfc, 0x57, 0x14, 0x7d, 0x0a,
+ 0x55, 0x01, 0x1e, 0x91, 0xc9, 0xf1, 0x62, 0x2e, 0xba, 0x9b, 0xb0, 0x95, 0x7d, 0x60, 0x05, 0xc6,
+ 0x10, 0x90, 0x65, 0x4f, 0xc9, 0xe8, 0x7d, 0x10, 0xce, 0x8e, 0xe8, 0x03, 0x6b, 0xd2, 0x5a, 0xf5,
+ 0x01, 0x05, 0xe1, 0xb5, 0x80, 0x2c, 0xbb, 0x1e, 0x15, 0x87, 0x35, 0x89, 0x82, 0x79, 0x4c, 0x19,
+ 0xab, 0x95, 0x1a, 0x46, 0xab, 0xac, 0x12, 0xc8, 0x30, 0x7c, 0x2e, 0x35, 0xbf, 0x86, 0xa2, 0xdc,
+ 0x3e, 0x2a, 0x43, 0x61, 0x77, 0xf8, 0x74, 0x64, 0xde, 0x41, 0x15, 0x28, 0xf6, 0x07, 0xbd, 0xc3,
+ 0x1d, 0xd3, 0x10, 0xe0, 0x8b, 0x2e, 0x1e, 0x9a, 0x39, 0x01, 0x0e, 0x30, 0x1e, 0x61, 0x33, 0x2f,
+ 0xc4, 0xa7, 0xdd, 0x71, 0x77, 0xdf, 0x2c, 0x34, 0x7f, 0xc9, 0x43, 0xe5, 0xfc, 0x41, 0x11, 0x3d,
+ 0xea, 0x84, 0xc6, 0xe2, 0x50, 0x25, 0xf5, 0xba, 0x47, 0x69, 0x08, 0x67, 0x02, 0x7a, 0x0c, 0xeb,
+ 0xae, 0xcf, 0xe6, 0x33, 0x72, 0xea, 0x84, 0x24, 0xc8, 0xfa, 0x99, 0x2c, 0xee, 0x55, 0x1c, 0x57,
+ 0xb5, 0x36, 0x24, 0x01, 0x15, 0x67, 0xc1, 0x89, 0xa7, 0xef, 0x88, 0x3c, 0x0b, 0x4e, 0x3c, 0x2c,
+ 0x06, 0xf4, 0x25, 0x6c, 0xfa, 0x21, 0xe3, 0x24, 0x9c, 0x50, 0xc7, 0x8b, 0xa3, 0xc5, 0x5c, 0xf2,
+ 0x58, 0xe9, 0xa1, 0x34, 0xb1, 0xfe, 0xf7, 0x05, 0x6f, 0x64, 0xfa, 0x8e, 0x50, 0x51, 0x17, 0x4a,
+ 0x8b, 0xb9, 0x4b, 0x38, 0x75, 0x25, 0x9b, 0xd5, 0x4e, 0xdd, 0x56, 0x6f, 0xb2, 0x9d, 0xbd, 0xc9,
+ 0xf6, 0x38, 0x7b, 0x93, 0xd5, 0x6e, 0xb4, 0x39, 0xce, 0x04, 0xf4, 0x09, 0x00, 0x3b, 0x65, 0x9c,
0x06, 0xce, 0xc2, 0x77, 0x25, 0xd9, 0xfa, 0xb6, 0x5f, 0xa0, 0xb8, 0xa2, 0xe4, 0x43, 0xdf, 0x45,
0xdf, 0xc1, 0x86, 0xea, 0x60, 0x59, 0xe3, 0x28, 0xbf, 0x61, 0xe3, 0x78, 0x2b, 0x4d, 0xac, 0xcb,
0xae, 0x58, 0xf5, 0xc2, 0x8b, 0xc7, 0xaa, 0x60, 0x16, 0x2f, 0x36, 0x28, 0x39, 0xec, 0x7d, 0xf1,
0xc7, 0xd9, 0x96, 0xf1, 0xe7, 0xd9, 0x96, 0xf1, 0xd7, 0xd9, 0x96, 0xf1, 0xfd, 0x47, 0x9e, 0xcf,
0x5f, 0x2e, 0x8e, 0xec, 0x49, 0x14, 0xb4, 0xe5, 0x62, 0x6d, 0x19, 0xa1, 0xcd, 0xdc, 0xe3, 0xf6,
- 0x49, 0x47, 0xfd, 0x89, 0x3c, 0x51, 0x3b, 0x5f, 0x93, 0x9f, 0xc7, 0xff, 0x05, 0x00, 0x00, 0xff,
- 0xff, 0xb4, 0x95, 0x5a, 0x2d, 0xfa, 0x08, 0x00, 0x00,
+ 0x49, 0x47, 0xfd, 0x87, 0x3c, 0x51, 0x3b, 0x5f, 0x93, 0xd3, 0xe3, 0xff, 0x02, 0x00, 0x00, 0xff,
+ 0xff, 0x01, 0x6e, 0xed, 0x83, 0xfa, 0x08, 0x00, 0x00,
}
func (m *AgentConnectRequest) Marshal() (dAtA []byte, err error) {
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/agent.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/agent.proto
index 7aa32e2e0..ef7d6b720 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/agent.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/agent.proto
@@ -1,82 +1,135 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+import "config.proto";
+import "dp_software_details.proto";
import "gogo.proto";
+import "google/protobuf/timestamp.proto";
import "host.proto";
-import "config.proto";
import "nginx.proto";
-import "google/protobuf/timestamp.proto";
-import "dp_software_details.proto";
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents an agent connect request that is sent from the agent to the management server
message AgentConnectRequest {
- // DEPRECATED
- reserved 1;
- reserved "identity";
- AgentMeta meta = 2 [(gogoproto.jsontag) = "meta"];
- repeated NginxDetails details = 3 [(gogoproto.jsontag) = "details"]; // moving to dataplane_software_details
- HostInfo host = 4 [(gogoproto.jsontag) = "host"];
- repeated DataplaneSoftwareDetails dataplane_software_details = 5 [(gogoproto.jsontag) = "dataplane_software_details"];
+ // DEPRECATED
+ reserved 1;
+ reserved "identity";
+ // Provides meta information about the agent
+ AgentMeta meta = 2 [(gogoproto.jsontag) = "meta"];
+ // Provides information about the NGINX instances that are present.
+ // This data will be moving to dataplane_software_details in a future release
+ repeated NginxDetails details = 3 [(gogoproto.jsontag) = "details"];
+ // Provides information about the host system
+ HostInfo host = 4 [(gogoproto.jsontag) = "host"];
+ // Provides information about software installed in the system (e.g. App Protect WAF, NGINX, etc.)
+ repeated DataplaneSoftwareDetails dataplane_software_details = 5 [(gogoproto.jsontag) = "dataplane_software_details"];
}
+// Represents an agent connect status
message AgentConnectStatus {
- enum StatusCode {
- CONNECT_UNKNOWN = 0;
- CONNECT_OK = 1;
- CONNECT_REJECTED_OTHER = 2;
- CONNECT_REJECTED_DUP_ID = 3;
- }
- StatusCode statusCode = 1 [(gogoproto.jsontag) = "status_code"];
- string message = 2 [(gogoproto.jsontag) = "message"];
- string error = 3 [(gogoproto.jsontag) = "error"];
+ // Different status codes for agent connect response
+ enum StatusCode {
+ // Unknown status of the agent connect request
+ CONNECT_UNKNOWN = 0;
+ // Agent connect request was successful
+ CONNECT_OK = 1;
+ // Agent connect request was rejected
+ CONNECT_REJECTED_OTHER = 2;
+ // Agent connect request was rejected because an agent with the same ID is already registered
+ CONNECT_REJECTED_DUP_ID = 3;
+ }
+ // Provides a status of the agent connect response
+ StatusCode statusCode = 1 [(gogoproto.jsontag) = "status_code"];
+ // Provides a user friendly message to describe the response
+ string message = 2 [(gogoproto.jsontag) = "message"];
+ // Provides an error message of why the agent connect request was rejected
+ string error = 3 [(gogoproto.jsontag) = "error"];
}
+// Represents an agent connect response that is sent from the management server to the agent
message AgentConnectResponse {
- AgentConfig agent_config = 1 [(gogoproto.jsontag) = "agent_config"];
- AgentConnectStatus status = 2 [(gogoproto.jsontag) = "status"];
+ // Agent configuration
+ AgentConfig agent_config = 1 [(gogoproto.jsontag) = "agent_config"];
+ // Agent connect request status
+ AgentConnectStatus status = 2 [(gogoproto.jsontag) = "status"];
}
+// Represents an agent config request that is sent from the agent to the management server.
+// This is used by the agent to request the agent configuration from the management server.
message AgentConfigRequest {}
+// Represents an agent's configuration. The message is sent from the management server to the agent.
message AgentConfig {
- AgentDetails details = 1 [(gogoproto.jsontag) = "details"];
- AgentLogging loggers = 2 [(gogoproto.jsontag) = "loggers"];
- ConfigReport configs = 3 [(gogoproto.jsontag) = "configs"];
+ // Provides information about the agent
+ AgentDetails details = 1 [(gogoproto.jsontag) = "details"];
+ // Provides information about the agent logging.
+ // This is will be implemented in a future release.
+ AgentLogging loggers = 2 [(gogoproto.jsontag) = "loggers"];
+ // Provides meta information about the nginx configurations
+ ConfigReport configs = 3 [(gogoproto.jsontag) = "configs"];
}
+// Represents agent details. This message is sent from the management server to the agent.
message AgentDetails {
- repeated string features = 1 [(gogoproto.jsontag) = "features"];
- repeated string extensions = 2 [(gogoproto.jsontag) = "extensions"];
- repeated string tags = 3 [(gogoproto.jsontag) = "tags"];
- string alias = 4 [(gogoproto.jsontag) = "alias"];
+ // List of agent feature that are enabled
+ repeated string features = 1 [(gogoproto.jsontag) = "features"];
+ // List of agent extensions that are enabled
+ repeated string extensions = 2 [(gogoproto.jsontag) = "extensions"];
+ // List of tags
+ repeated string tags = 3 [(gogoproto.jsontag) = "tags"];
+ // Alias name for the agent
+ string alias = 4 [(gogoproto.jsontag) = "alias"];
}
+// Represents agent logging details
message AgentLogging {
- enum Level {
- INFO = 0;
- DEBUG = 1;
- WARN = 2;
- ERROR = 3;
- FATAL = 4;
- }
- Level level = 1 [(gogoproto.jsontag) = "level"];
- string dir = 2 [(gogoproto.jsontag) = "dir"];
- string file = 3 [(gogoproto.jsontag) = "file"];
- uint32 max_size = 4 [(gogoproto.jsontag) = "max_size"]; // max size in MB
- uint32 max_backups = 5 [(gogoproto.jsontag) = "max_backups"];
- uint32 max_age = 6 [(gogoproto.jsontag) = "max_age"]; // age in days
- bool compress = 7 [(gogoproto.jsontag) = "compress"];
+ // Log level enum
+ enum Level {
+ // info level
+ INFO = 0;
+ // debug level
+ DEBUG = 1;
+ // warn level
+ WARN = 2;
+ // error level
+ ERROR = 3;
+ // fatal level
+ FATAL = 4;
+ }
+ // Log level
+ Level level = 1 [(gogoproto.jsontag) = "level"];
+ // Directory where the logs are located
+ string dir = 2 [(gogoproto.jsontag) = "dir"];
+ // Name of the log file
+ string file = 3 [(gogoproto.jsontag) = "file"];
+ // Max size of the log file in MB
+ uint32 max_size = 4 [(gogoproto.jsontag) = "max_size"];
+ // Max number of backups
+ uint32 max_backups = 5 [(gogoproto.jsontag) = "max_backups"];
+ // Max age of a log file in days
+ uint32 max_age = 6 [(gogoproto.jsontag) = "max_age"];
+ // Is the log file compressed
+ bool compress = 7 [(gogoproto.jsontag) = "compress"];
}
+// Represents agent metadata
message AgentMeta {
- string version = 1 [(gogoproto.jsontag) = "version"];
- string display_name = 2 [(gogoproto.jsontag) = "display_name"];
- repeated string tag = 3 [(gogoproto.jsontag) = "tag"];
- // DEPRECATED
- reserved 4;
- reserved "instance_name";
- string instance_group = 5 [(gogoproto.jsontag) = "instance_group"];
- google.protobuf.Timestamp updated = 6 [(gogoproto.jsontag) = "updated"];
- string system_uid = 7 [(gogoproto.jsontag) = "system_uid"];
- AgentDetails agent_details = 8 [(gogoproto.jsontag) = "agent_details"];
+ // Version of the agent
+ string version = 1 [(gogoproto.jsontag) = "version"];
+ // User friendly name for the agent
+ string display_name = 2 [(gogoproto.jsontag) = "display_name"];
+ // List of tags
+ repeated string tag = 3 [(gogoproto.jsontag) = "tag"];
+ // DEPRECATED
+ reserved 4;
+ reserved "instance_name";
+ // Instance group name used to group NGINX instances
+ string instance_group = 5 [(gogoproto.jsontag) = "instance_group"];
+ // Last time agent was updated
+ google.protobuf.Timestamp updated = 6 [(gogoproto.jsontag) = "updated"];
+ // ID of the system where the agent is installed
+ string system_uid = 7 [(gogoproto.jsontag) = "system_uid"];
+ // Provides other agent information
+ AgentDetails agent_details = 8 [(gogoproto.jsontag) = "agent_details"];
}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command.pb.go
index 1eb5da172..e53ccbf5e 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command.pb.go
@@ -24,12 +24,19 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Command type enum
type Command_CommandType int32
const (
- Command_NORMAL Command_CommandType = 0
+ // All commands default to normal
+ Command_NORMAL Command_CommandType = 0
+ // The download type is used when sending NginxConfig from the management server to the agent.
+ // It is used to instruct the agent to download the NGINX config from the management server.
Command_DOWNLOAD Command_CommandType = 1
- Command_UPLOAD Command_CommandType = 2
+ // The upload type is used when sending NginxConfig from the agent to the management server.
+ // It is used to instruct the agent to upload the NGINX config from the agent.
+ // This will be implemented in a future release.
+ Command_UPLOAD Command_CommandType = 2
)
var Command_CommandType_name = map[int32]string{
@@ -52,12 +59,16 @@ func (Command_CommandType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{0, 0}
}
+// Command status enum
type CommandStatusResponse_CommandStatus int32
const (
+ // Unknown status of command
CommandStatusResponse_CMD_UNKNOWN CommandStatusResponse_CommandStatus = 0
- CommandStatusResponse_CMD_OK CommandStatusResponse_CommandStatus = 1
- CommandStatusResponse_CMD_ERROR CommandStatusResponse_CommandStatus = 2
+ // Command was successful
+ CommandStatusResponse_CMD_OK CommandStatusResponse_CommandStatus = 1
+ // Command failed
+ CommandStatusResponse_CMD_ERROR CommandStatusResponse_CommandStatus = 2
)
var CommandStatusResponse_CommandStatus_name = map[int32]string{
@@ -80,10 +91,13 @@ func (CommandStatusResponse_CommandStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{1, 0}
}
+// Command error code enum
type CommandStatusResponse_CommandErrorCode int32
const (
- CommandStatusResponse_ERR_OK CommandStatusResponse_CommandErrorCode = 0
+ // No Error (This is the default value)
+ CommandStatusResponse_ERR_OK CommandStatusResponse_CommandErrorCode = 0
+ // Unknown error
CommandStatusResponse_ERR_UNKNOWN CommandStatusResponse_CommandErrorCode = 1
)
@@ -105,12 +119,16 @@ func (CommandStatusResponse_CommandErrorCode) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{1, 1}
}
+// NGINX configuration status enum
type NginxConfigStatus_Status int32
const (
+ // The configuration is still in the process of being applied.
NginxConfigStatus_PENDING NginxConfigStatus_Status = 0
- NginxConfigStatus_OK NginxConfigStatus_Status = 1
- NginxConfigStatus_ERROR NginxConfigStatus_Status = 2
+ // The configuration has being successfully applied.
+ NginxConfigStatus_OK NginxConfigStatus_Status = 1
+ // The configuration has failed to be applied
+ NginxConfigStatus_ERROR NginxConfigStatus_Status = 2
)
var NginxConfigStatus_Status_name = map[int32]string{
@@ -133,12 +151,16 @@ func (NginxConfigStatus_Status) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{4, 0}
}
+// Transfer status enum
type UploadStatus_TransferStatus int32
const (
+ // Unknown status
UploadStatus_UNKNOWN UploadStatus_TransferStatus = 0
- UploadStatus_OK UploadStatus_TransferStatus = 1
- UploadStatus_FAILED UploadStatus_TransferStatus = 2
+ // Upload was successful
+ UploadStatus_OK UploadStatus_TransferStatus = 1
+ // Upload failed
+ UploadStatus_FAILED UploadStatus_TransferStatus = 2
)
var UploadStatus_TransferStatus_name = map[int32]string{
@@ -161,11 +183,11 @@ func (UploadStatus_TransferStatus) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_213c0bb044472049, []int{9, 0}
}
-// Command is the envelope sent between the management plane and the data plane, requesting some action or reporting a response
+// Represents a command message, which is used for communication between the management server and the agent.
type Command struct {
+ // Provides metadata information associated with the command
Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- // used as a dispatch flag to quickly send the command to the correct base processor that will then further sort
- // based on the actual data type
+ // Used to determine the type of command
Type Command_CommandType `protobuf:"varint,2,opt,name=type,proto3,enum=f5.nginx.agent.sdk.Command_CommandType" json:"type"`
// Types that are valid to be assigned to Data:
// *Command_CmdStatus
@@ -385,14 +407,19 @@ func (*Command) XXX_OneofWrappers() []interface{} {
}
}
+// Represents a command status response
type CommandStatusResponse struct {
- Status CommandStatusResponse_CommandStatus `protobuf:"varint,1,opt,name=status,proto3,enum=f5.nginx.agent.sdk.CommandStatusResponse_CommandStatus" json:"status"`
- ErrorCode CommandStatusResponse_CommandErrorCode `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3,enum=f5.nginx.agent.sdk.CommandStatusResponse_CommandErrorCode" json:"error_code"`
- Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
- Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Command status
+ Status CommandStatusResponse_CommandStatus `protobuf:"varint,1,opt,name=status,proto3,enum=f5.nginx.agent.sdk.CommandStatusResponse_CommandStatus" json:"status"`
+ // Error code
+ ErrorCode CommandStatusResponse_CommandErrorCode `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3,enum=f5.nginx.agent.sdk.CommandStatusResponse_CommandErrorCode" json:"error_code"`
+ // Provides a user friendly message to describe the response
+ Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
+ // Provides an error message of why the command failed
+ Error string `protobuf:"bytes,4,opt,name=error,proto3" json:"error"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *CommandStatusResponse) Reset() { *m = CommandStatusResponse{} }
@@ -456,18 +483,25 @@ func (m *CommandStatusResponse) GetError() string {
return ""
}
-// DataplaneStatus reports Dataplane metrics the Agent is aware of
+// Represents a dataplane status, which is used by the agent to periodically report the status of NGINX, agent activities and other dataplane software activities.
type DataplaneStatus struct {
- SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
- Details []*NginxDetails `protobuf:"bytes,2,rep,name=details,proto3" json:"details"`
- Host *HostInfo `protobuf:"bytes,3,opt,name=host,proto3" json:"host"`
- Healths []*NginxHealth `protobuf:"bytes,5,rep,name=healths,proto3" json:"healths"`
+ // System ID
+ SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
+ // List of NGINX details. This field will be moving to DataplaneSoftwareDetails in a future release.
+ Details []*NginxDetails `protobuf:"bytes,2,rep,name=details,proto3" json:"details"`
+ // Host information
+ Host *HostInfo `protobuf:"bytes,3,opt,name=host,proto3" json:"host"`
+ // List of NGINX health information. This field will be moving to DataplaneSoftwareHealth in a future release.
+ Healths []*NginxHealth `protobuf:"bytes,5,rep,name=healths,proto3" json:"healths"`
+ // List of software details. This includes details about NGINX and any other software installed in the system that the agent is interested in.
DataplaneSoftwareDetails []*DataplaneSoftwareDetails `protobuf:"bytes,6,rep,name=dataplane_software_details,json=dataplaneSoftwareDetails,proto3" json:"dataplane_software_details"`
- DataplaneSoftwareHealths []*DataplaneSoftwareHealth `protobuf:"bytes,7,rep,name=dataplane_software_healths,json=dataplaneSoftwareHealths,proto3" json:"dataplane_software_healths"`
- AgentActivityStatus []*AgentActivityStatus `protobuf:"bytes,8,rep,name=agent_activity_status,json=agentActivityStatus,proto3" json:"agent_activity_status"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // List of software health statues. This includes the health of NGINX and any other software installed in the system that the agent is interested in.
+ DataplaneSoftwareHealths []*DataplaneSoftwareHealth `protobuf:"bytes,7,rep,name=dataplane_software_healths,json=dataplaneSoftwareHealths,proto3" json:"dataplane_software_healths"`
+ // List of activity statuses. Reports on the status of activities that the agent is currently executing.
+ AgentActivityStatus []*AgentActivityStatus `protobuf:"bytes,8,rep,name=agent_activity_status,json=agentActivityStatus,proto3" json:"agent_activity_status"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *DataplaneStatus) Reset() { *m = DataplaneStatus{} }
@@ -552,6 +586,7 @@ func (m *DataplaneStatus) GetAgentActivityStatus() []*AgentActivityStatus {
return nil
}
+// Represent an agent activity status
type AgentActivityStatus struct {
// Types that are valid to be assigned to Status:
// *AgentActivityStatus_NginxConfigStatus
@@ -627,14 +662,19 @@ func (*AgentActivityStatus) XXX_OneofWrappers() []interface{} {
}
}
+// Represents a NGINX configuration status
type NginxConfigStatus struct {
- CorrelationId string `protobuf:"bytes,1,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id"`
- Status NginxConfigStatus_Status `protobuf:"varint,2,opt,name=status,proto3,enum=f5.nginx.agent.sdk.NginxConfigStatus_Status" json:"status"`
- Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
- NginxId string `protobuf:"bytes,4,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // CorrelationID is an ID used by the producer of the message to track the flow of events
+ CorrelationId string `protobuf:"bytes,1,opt,name=correlation_id,json=correlationId,proto3" json:"correlation_id"`
+ // Provides a status for the NGINX configuration
+ Status NginxConfigStatus_Status `protobuf:"varint,2,opt,name=status,proto3,enum=f5.nginx.agent.sdk.NginxConfigStatus_Status" json:"status"`
+ // Provides a user friendly message to describe the current state of the NGINX configuration.
+ Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`
+ // NGINX ID
+ NginxId string `protobuf:"bytes,4,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *NginxConfigStatus) Reset() { *m = NginxConfigStatus{} }
@@ -698,6 +738,7 @@ func (m *NginxConfigStatus) GetNginxId() string {
return ""
}
+// Represents a dataplane software health
type DataplaneSoftwareHealth struct {
// Types that are valid to be assigned to Health:
// *DataplaneSoftwareHealth_NginxHealth
@@ -786,8 +827,11 @@ func (*DataplaneSoftwareHealth) XXX_OneofWrappers() []interface{} {
}
}
+// Represents a dataplane update
type DataplaneUpdate struct {
- Host *HostInfo `protobuf:"bytes,1,opt,name=host,proto3" json:"host"`
+ // Host information
+ Host *HostInfo `protobuf:"bytes,1,opt,name=host,proto3" json:"host"`
+ // List of software details. This includes details about NGINX and any other software installed in the system that the agent is interested in.
DataplaneSoftwareDetails []*DataplaneSoftwareDetails `protobuf:"bytes,2,rep,name=dataplane_software_details,json=dataplaneSoftwareDetails,proto3" json:"dataplane_software_details"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -841,7 +885,9 @@ func (m *DataplaneUpdate) GetDataplaneSoftwareDetails() []*DataplaneSoftwareDeta
return nil
}
+// Represents a download request
type DownloadRequest struct {
+ // Metadata information
Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -888,13 +934,17 @@ func (m *DownloadRequest) GetMeta() *Metadata {
return nil
}
+// Represents a NGINX config response
type NginxConfigResponse struct {
- Status *CommandStatusResponse `protobuf:"bytes,1,opt,name=status,proto3" json:"status"`
- Action NginxConfigAction `protobuf:"varint,2,opt,name=action,proto3,enum=f5.nginx.agent.sdk.NginxConfigAction" json:"action"`
- ConfigData *ConfigDescriptor `protobuf:"bytes,3,opt,name=config_data,json=configData,proto3" json:"config_data"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Command status
+ Status *CommandStatusResponse `protobuf:"bytes,1,opt,name=status,proto3" json:"status"`
+ // NGINX config action
+ Action NginxConfigAction `protobuf:"varint,2,opt,name=action,proto3,enum=f5.nginx.agent.sdk.NginxConfigAction" json:"action"`
+ // NGINX config description
+ ConfigData *ConfigDescriptor `protobuf:"bytes,3,opt,name=config_data,json=configData,proto3" json:"config_data"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *NginxConfigResponse) Reset() { *m = NginxConfigResponse{} }
@@ -951,13 +1001,17 @@ func (m *NginxConfigResponse) GetConfigData() *ConfigDescriptor {
return nil
}
+// Represents an upload status
type UploadStatus struct {
- Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- Status UploadStatus_TransferStatus `protobuf:"varint,2,opt,name=status,proto3,enum=f5.nginx.agent.sdk.UploadStatus_TransferStatus" json:"status"`
- Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Metadata information
+ Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
+ // Transfer status
+ Status UploadStatus_TransferStatus `protobuf:"varint,2,opt,name=status,proto3,enum=f5.nginx.agent.sdk.UploadStatus_TransferStatus" json:"status"`
+ // Provides an error message of why the upload failed
+ Reason string `protobuf:"bytes,3,opt,name=reason,proto3" json:"reason"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *UploadStatus) Reset() { *m = UploadStatus{} }
@@ -1014,6 +1068,7 @@ func (m *UploadStatus) GetReason() string {
return ""
}
+// Represents a data chunck
type DataChunk struct {
// Types that are valid to be assigned to Chunk:
// *DataChunk_Header
@@ -1102,11 +1157,15 @@ func (*DataChunk) XXX_OneofWrappers() []interface{} {
}
}
+// Represents a chunked resource Header
type ChunkedResourceHeader struct {
+ // Metadata information
Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- // number of chunks expected in this transfer
- Chunks int32 `protobuf:"varint,2,opt,name=chunks,proto3" json:"chunks"`
- Checksum string `protobuf:"bytes,3,opt,name=checksum,proto3" json:"checksum"`
+ // Number of chunks expected in the transfer
+ Chunks int32 `protobuf:"varint,2,opt,name=chunks,proto3" json:"chunks"`
+ // Chunk checksum
+ Checksum string `protobuf:"bytes,3,opt,name=checksum,proto3" json:"checksum"`
+ // Chunk size
ChunkSize int32 `protobuf:"varint,4,opt,name=chunk_size,json=chunkSize,proto3" json:"chunk_size"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -1174,13 +1233,17 @@ func (m *ChunkedResourceHeader) GetChunkSize() int32 {
return 0
}
+// Represents a chunked resource chunk
type ChunkedResourceChunk struct {
- Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- ChunkId int32 `protobuf:"varint,2,opt,name=chunk_id,json=chunkId,proto3" json:"chunk_id"`
- Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Metadata information
+ Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
+ // Chunk ID
+ ChunkId int32 `protobuf:"varint,2,opt,name=chunk_id,json=chunkId,proto3" json:"chunk_id"`
+ // Chunk data
+ Data []byte `protobuf:"bytes,3,opt,name=data,proto3" json:"data"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *ChunkedResourceChunk) Reset() { *m = ChunkedResourceChunk{} }
@@ -1261,7 +1324,7 @@ func init() {
func init() { proto.RegisterFile("command.proto", fileDescriptor_213c0bb044472049) }
var fileDescriptor_213c0bb044472049 = []byte{
- // 1535 bytes of a gzipped FileDescriptorProto
+ // 1534 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x6e, 0xdb, 0x46,
0x17, 0x26, 0x15, 0xeb, 0x76, 0x24, 0xdb, 0xca, 0xd8, 0x49, 0x14, 0x23, 0x30, 0x0d, 0xfe, 0x7f,
0x6a, 0xa7, 0x4d, 0x25, 0xd4, 0x41, 0x11, 0x34, 0x59, 0x59, 0x96, 0x13, 0x0a, 0x89, 0x65, 0x63,
@@ -1270,94 +1333,94 @@ var fileDescriptor_213c0bb044472049 = []byte{
0x64, 0xc9, 0x07, 0x68, 0x17, 0xdd, 0x14, 0x73, 0xa1, 0x44, 0x49, 0x94, 0xec, 0xd4, 0x45, 0x37,
0x9a, 0xe1, 0xf0, 0x3b, 0xdf, 0xb9, 0xcc, 0xcc, 0x37, 0x43, 0xc1, 0x7c, 0xdb, 0xee, 0xf5, 0x74,
0xcb, 0xa8, 0x38, 0xae, 0xed, 0xdb, 0x08, 0x75, 0x3e, 0xad, 0x58, 0x5d, 0xd3, 0x7a, 0x5d, 0xd1,
- 0xbb, 0xc4, 0xf2, 0x2b, 0x9e, 0x71, 0xb4, 0x02, 0x5d, 0xbb, 0x6b, 0xf3, 0xf7, 0x2b, 0x45, 0x0a,
- 0xb7, 0x2d, 0xf1, 0x54, 0xe0, 0x20, 0xfe, 0x00, 0x87, 0xb6, 0x17, 0xf5, 0x0b, 0x9c, 0x63, 0x60,
- 0x63, 0x75, 0xcc, 0xae, 0x78, 0x42, 0xe4, 0x84, 0x58, 0xbe, 0x57, 0x65, 0x8d, 0x18, 0xbb, 0x6e,
- 0x38, 0x2d, 0xcf, 0xee, 0xf8, 0xaf, 0x74, 0x97, 0xb4, 0x0c, 0xe2, 0xeb, 0xe6, 0xb1, 0x27, 0x5e,
- 0xe5, 0x2d, 0xdd, 0xe1, 0x5d, 0xf5, 0x2f, 0x80, 0xec, 0x36, 0x8f, 0x16, 0xdd, 0x83, 0xb9, 0x1e,
- 0xf1, 0xf5, 0xb2, 0xbc, 0x26, 0x6f, 0x14, 0x36, 0x6f, 0x54, 0x26, 0xc3, 0xae, 0xec, 0x12, 0x5f,
- 0x37, 0x74, 0x5f, 0xaf, 0xe5, 0xc2, 0x40, 0x61, 0x68, 0xcc, 0x7e, 0xd1, 0x0e, 0xcc, 0xf9, 0xa7,
- 0x0e, 0x29, 0xa7, 0xd6, 0xe4, 0x8d, 0x85, 0xcd, 0xf5, 0x24, 0x5b, 0xe1, 0x26, 0x6a, 0x9f, 0x9e,
- 0x3a, 0x84, 0xd3, 0x50, 0x43, 0xcc, 0x7e, 0xd1, 0x0b, 0x80, 0x76, 0xcf, 0x68, 0x79, 0xbe, 0xee,
- 0xf7, 0xbd, 0xf2, 0x25, 0x16, 0xc8, 0xad, 0x19, 0x64, 0x4f, 0x18, 0x10, 0x13, 0xcf, 0xb1, 0x2d,
- 0x8f, 0xd4, 0x16, 0xc2, 0x40, 0x89, 0x11, 0x68, 0x12, 0xce, 0xb7, 0x7b, 0x02, 0x84, 0x9e, 0x41,
- 0x91, 0xb1, 0xb4, 0x78, 0xe9, 0xca, 0x73, 0x8c, 0x5d, 0x49, 0x62, 0x6f, 0xd2, 0xe7, 0x6d, 0x06,
- 0xab, 0x95, 0xc2, 0x40, 0x19, 0x31, 0xd4, 0x24, 0xcc, 0xa7, 0x82, 0x03, 0xd0, 0x6b, 0xb8, 0x12,
- 0x7f, 0xdd, 0x72, 0x45, 0x34, 0xe5, 0x34, 0x73, 0xb0, 0x7e, 0x86, 0x83, 0x41, 0xf0, 0xd7, 0xc3,
- 0x40, 0x49, 0x66, 0xd2, 0x24, 0xbc, 0x64, 0x4d, 0x5a, 0x50, 0xcf, 0x8c, 0x92, 0xe2, 0x2d, 0xd2,
- 0xf6, 0x5b, 0x2e, 0xf9, 0xb2, 0x4f, 0x3c, 0xbf, 0x9c, 0x99, 0xee, 0x79, 0x8b, 0xf6, 0xb6, 0x39,
- 0x1e, 0x73, 0x38, 0xf7, 0x9c, 0xc8, 0x44, 0x3d, 0xeb, 0x93, 0x16, 0xe8, 0x2b, 0xb8, 0x3a, 0x8e,
- 0x17, 0x49, 0x67, 0x99, 0xeb, 0x8d, 0xb3, 0x5d, 0x8b, 0xac, 0x57, 0xc2, 0x40, 0x99, 0xc2, 0xa5,
- 0x49, 0x78, 0x59, 0x4f, 0xb0, 0x41, 0x3e, 0x2c, 0x0f, 0x2c, 0x78, 0x9d, 0x78, 0xda, 0x39, 0xe6,
- 0xfb, 0x83, 0x59, 0xbe, 0x59, 0xf9, 0x78, 0xd6, 0xe5, 0x30, 0x50, 0x12, 0x79, 0x34, 0x09, 0x23,
- 0x7d, 0x02, 0x4f, 0xd7, 0x4f, 0x1c, 0x5d, 0xce, 0x4f, 0x5f, 0x3f, 0x31, 0x6f, 0x7c, 0xfd, 0xc4,
- 0x0d, 0xe9, 0xfa, 0x89, 0xd1, 0xa3, 0x0e, 0x94, 0xe8, 0x96, 0x72, 0x8e, 0x75, 0x8b, 0x44, 0x2b,
- 0xbf, 0xc0, 0xb8, 0xff, 0x97, 0xc4, 0x5d, 0x8f, 0xb0, 0x7c, 0x59, 0xd7, 0x96, 0xc3, 0x40, 0x99,
- 0x20, 0xd0, 0x24, 0xbc, 0x68, 0x8c, 0x02, 0xd1, 0x17, 0x50, 0x64, 0xfa, 0xd0, 0x72, 0x89, 0x63,
- 0xbb, 0x7e, 0xb9, 0x38, 0xbd, 0x5a, 0x5c, 0x4e, 0x2a, 0x3b, 0xb4, 0xc1, 0x0c, 0xcd, 0xd3, 0x88,
- 0xdb, 0xd3, 0x34, 0xc8, 0x10, 0x80, 0xbe, 0x93, 0x61, 0x25, 0x16, 0xc6, 0x98, 0xf2, 0x94, 0xe7,
- 0x99, 0xb7, 0xdb, 0xb3, 0x33, 0x12, 0x46, 0x75, 0x6e, 0x53, 0x5b, 0x0d, 0x03, 0x65, 0x06, 0xa7,
- 0x26, 0xe1, 0xb2, 0x31, 0xc5, 0x76, 0xb4, 0xaa, 0x7d, 0xc7, 0xd0, 0x7d, 0x52, 0x5e, 0x38, 0x47,
- 0x55, 0x0f, 0x18, 0x74, 0xbc, 0xaa, 0x9c, 0x60, 0xa4, 0xaa, 0x1c, 0xa8, 0xde, 0x81, 0x42, 0x4c,
- 0xd0, 0x10, 0x40, 0xa6, 0xb9, 0x87, 0x77, 0xb7, 0x1e, 0x97, 0x24, 0x54, 0x84, 0x5c, 0x7d, 0xef,
- 0x79, 0xf3, 0xf1, 0xde, 0x56, 0xbd, 0x24, 0xd3, 0x37, 0x07, 0xfb, 0xac, 0x9f, 0xaa, 0x65, 0x60,
- 0x8e, 0xf2, 0xa8, 0x3f, 0x5c, 0x82, 0x2b, 0x89, 0x4a, 0x86, 0x3e, 0x87, 0x8c, 0x58, 0x0a, 0x32,
- 0x53, 0xd4, 0xbb, 0xe7, 0x16, 0xc1, 0xd1, 0xd1, 0x1a, 0x84, 0x81, 0x22, 0xa8, 0xb0, 0x68, 0x91,
- 0x09, 0x40, 0x5c, 0xd7, 0x76, 0x5b, 0x6d, 0xdb, 0x88, 0x24, 0xfb, 0xde, 0x7b, 0x3b, 0xd8, 0xa1,
- 0x14, 0xdb, 0xb6, 0x21, 0x64, 0x77, 0xc8, 0x88, 0xf3, 0x24, 0x7a, 0x85, 0x6e, 0x42, 0xb6, 0x47,
- 0x3c, 0x4f, 0xef, 0x12, 0xa6, 0xe6, 0xf9, 0x5a, 0x21, 0x0c, 0x94, 0x68, 0x08, 0x47, 0x1d, 0xa4,
- 0x40, 0x9a, 0xd9, 0x30, 0x51, 0xce, 0xd7, 0xf2, 0x61, 0xa0, 0xf0, 0x01, 0xcc, 0x1b, 0xf5, 0x3e,
- 0xcc, 0x8f, 0x04, 0x83, 0x16, 0xa1, 0xb0, 0xbd, 0x5b, 0x6f, 0x1d, 0x34, 0x1f, 0x35, 0xf7, 0x9e,
- 0x37, 0x4b, 0x12, 0xad, 0x2f, 0x1d, 0xd8, 0x7b, 0x54, 0x92, 0xd1, 0x3c, 0xe4, 0x69, 0x7f, 0x07,
- 0xe3, 0x3d, 0x5c, 0x4a, 0xa9, 0x55, 0x28, 0x8d, 0xc7, 0x4c, 0xe1, 0x3b, 0x18, 0x53, 0xb8, 0x44,
- 0xb9, 0x68, 0x3f, 0xe2, 0x92, 0xd5, 0x9f, 0xd3, 0xb0, 0x38, 0xb6, 0xcf, 0xd0, 0x87, 0x90, 0xf7,
- 0x4e, 0x3d, 0x9f, 0xf4, 0x5a, 0xa6, 0xc1, 0x26, 0x25, 0x5f, 0x9b, 0x0f, 0x03, 0x65, 0x38, 0x88,
- 0x73, 0xbc, 0xdb, 0x30, 0xd0, 0x43, 0xc8, 0x46, 0xeb, 0x3e, 0xb5, 0x76, 0x69, 0xa3, 0xb0, 0xb9,
- 0x36, 0xf5, 0x10, 0x88, 0xd6, 0x3a, 0xab, 0x8b, 0x30, 0xc2, 0x51, 0x87, 0x1e, 0xc9, 0xf4, 0x06,
- 0x20, 0x4e, 0xc2, 0xc4, 0x23, 0x59, 0xb3, 0x3d, 0xbf, 0x61, 0x75, 0x6c, 0x7e, 0x96, 0x52, 0x34,
- 0x66, 0xbf, 0xe8, 0x01, 0x64, 0x0f, 0x89, 0x7e, 0xec, 0x1f, 0x7a, 0xe5, 0x34, 0x0b, 0x62, 0xfa,
- 0x51, 0xa7, 0x31, 0x1c, 0x8f, 0x41, 0xd8, 0xe0, 0xa8, 0x83, 0xbe, 0x9d, 0xbd, 0xb1, 0x33, 0x8c,
- 0xfb, 0x5f, 0xdd, 0xd8, 0x33, 0xb6, 0xf5, 0x37, 0xc9, 0xc1, 0x44, 0x89, 0x66, 0x59, 0x30, 0x1f,
- 0x9d, 0x2b, 0x18, 0x91, 0xf4, 0xb4, 0x58, 0xa2, 0x3a, 0x4c, 0xc6, 0xa2, 0x89, 0xc2, 0x9c, 0x44,
- 0xc7, 0xaf, 0xde, 0xf6, 0xcd, 0x13, 0xd3, 0x3f, 0x8d, 0xd4, 0x3b, 0xc7, 0xa2, 0x98, 0x7e, 0xfc,
- 0x6e, 0x09, 0xbc, 0xd8, 0xa2, 0xb1, 0xe3, 0x77, 0x8c, 0x49, 0x1c, 0xbe, 0xa3, 0x78, 0xf5, 0x7b,
- 0x19, 0x96, 0x12, 0x78, 0x90, 0x03, 0x4b, 0x23, 0xd7, 0x87, 0x98, 0x80, 0x14, 0x36, 0x6f, 0x9e,
- 0x71, 0x0d, 0x11, 0xb1, 0x5c, 0x0b, 0x03, 0x25, 0x89, 0x45, 0x93, 0xf0, 0x65, 0x6b, 0x02, 0x9d,
- 0x83, 0x8c, 0x88, 0xe9, 0xa7, 0x14, 0x5c, 0x9e, 0x60, 0x43, 0x9f, 0xc1, 0x42, 0xdb, 0x76, 0x5d,
- 0x72, 0xac, 0xfb, 0xa6, 0x6d, 0x0d, 0x37, 0x0e, 0x0a, 0x03, 0x65, 0xec, 0x0d, 0x9e, 0x8f, 0x3d,
- 0x37, 0x0c, 0xb4, 0x3f, 0x10, 0x40, 0xae, 0x4f, 0xb7, 0xcf, 0x15, 0x7f, 0x65, 0x86, 0xea, 0x9d,
- 0x53, 0x8a, 0xd6, 0x21, 0xc7, 0xf3, 0x37, 0x0d, 0xa1, 0x46, 0xc5, 0x30, 0x50, 0x06, 0x63, 0x38,
- 0xcb, 0x7a, 0x0d, 0x43, 0xdd, 0x88, 0x92, 0x47, 0x05, 0xc8, 0xee, 0xef, 0x34, 0xeb, 0x8d, 0xe6,
- 0xc3, 0x92, 0x84, 0x32, 0x90, 0x62, 0x1a, 0x94, 0x87, 0x74, 0xa4, 0x3f, 0x7f, 0xca, 0x70, 0x6d,
- 0xca, 0xf2, 0x1b, 0xde, 0x4a, 0xf9, 0x7a, 0x13, 0xb3, 0x75, 0xe6, 0x56, 0x8d, 0xdd, 0x4a, 0xb9,
- 0xe1, 0xe0, 0x56, 0x2a, 0x78, 0xdf, 0xc0, 0x55, 0xdd, 0x71, 0x5a, 0xf4, 0x96, 0x4f, 0xef, 0x54,
- 0xaf, 0xf4, 0x4e, 0xe4, 0x21, 0x35, 0xe3, 0x72, 0xe8, 0x38, 0xfb, 0xdc, 0xe0, 0xf9, 0xd6, 0x03,
- 0xe1, 0x89, 0x5f, 0xd0, 0x12, 0xa9, 0xd8, 0xed, 0x70, 0x68, 0xa2, 0x77, 0x84, 0x49, 0x0e, 0x32,
- 0x1c, 0xa0, 0xfe, 0x26, 0xc7, 0x84, 0x94, 0x9f, 0x98, 0x03, 0x4d, 0x93, 0xff, 0x81, 0xa6, 0x9d,
- 0xa1, 0x45, 0xa9, 0xff, 0x52, 0x8b, 0xd4, 0x5d, 0x58, 0xac, 0xdb, 0xaf, 0xac, 0x63, 0x5b, 0x37,
- 0xa2, 0x3b, 0xe2, 0x05, 0x3e, 0xa1, 0xd4, 0xaf, 0x53, 0xb0, 0x94, 0xf0, 0x5d, 0x80, 0x76, 0x47,
- 0xae, 0x02, 0xef, 0xf5, 0x3d, 0x94, 0xb4, 0x0d, 0x1a, 0x90, 0xa1, 0x2a, 0x63, 0x5b, 0x62, 0x63,
- 0x9d, 0x25, 0x0c, 0x5b, 0x0c, 0xcc, 0xa9, 0xb8, 0x21, 0x16, 0x2d, 0x7a, 0x06, 0x05, 0x21, 0x12,
- 0x34, 0x21, 0x71, 0x48, 0xfd, 0x3f, 0x39, 0x3c, 0x0a, 0xab, 0x13, 0xaf, 0xed, 0x9a, 0x8e, 0x6f,
- 0xbb, 0xb5, 0xc5, 0x30, 0x50, 0xe2, 0xc6, 0x18, 0xf8, 0x03, 0x9d, 0x26, 0xf5, 0x0f, 0x19, 0x8a,
- 0x07, 0x0e, 0xad, 0xab, 0xd8, 0x60, 0x17, 0xf9, 0x32, 0x7d, 0x32, 0x26, 0x24, 0xd5, 0x24, 0xeb,
- 0xb8, 0xb7, 0xca, 0x53, 0x57, 0xb7, 0xbc, 0x0e, 0x71, 0x67, 0x68, 0x89, 0x0a, 0x19, 0x97, 0xe8,
- 0x9e, 0x6d, 0x09, 0x29, 0x61, 0x18, 0x3e, 0x82, 0x45, 0xab, 0x7e, 0x02, 0x0b, 0xa3, 0x4c, 0x54,
- 0x27, 0x86, 0xf7, 0x95, 0x48, 0x27, 0x00, 0x32, 0x0f, 0xb6, 0x1a, 0x8f, 0x77, 0xea, 0xa5, 0x94,
- 0xfa, 0x8b, 0x0c, 0x79, 0x5a, 0x81, 0xed, 0xc3, 0xbe, 0x75, 0x84, 0xf6, 0xd8, 0x36, 0x32, 0x88,
- 0x3b, 0x73, 0xe2, 0x29, 0x94, 0x18, 0x98, 0x78, 0x76, 0xdf, 0x6d, 0x53, 0x55, 0x31, 0x88, 0xcb,
- 0xe3, 0xe1, 0xc6, 0x9a, 0x84, 0x45, 0x0f, 0x69, 0xfc, 0xda, 0x29, 0x14, 0x60, 0xe3, 0x1c, 0x74,
- 0xec, 0x91, 0x97, 0x94, 0x5a, 0x6a, 0x12, 0x66, 0x6d, 0x2d, 0x0b, 0xe9, 0x36, 0x7d, 0xa5, 0xbe,
- 0x95, 0xe1, 0x4a, 0x62, 0x08, 0x17, 0x9a, 0x33, 0x15, 0x32, 0x8c, 0x9e, 0xcf, 0x59, 0x9a, 0xa7,
- 0xc3, 0x47, 0xb0, 0x68, 0xd1, 0x06, 0xe4, 0xda, 0x87, 0xa4, 0x7d, 0xe4, 0xf5, 0x7b, 0x62, 0x12,
- 0x98, 0x4e, 0x47, 0x63, 0x78, 0xd0, 0x43, 0x1f, 0x03, 0x30, 0x9b, 0x96, 0x67, 0xbe, 0x21, 0x4c,
- 0xd3, 0xd3, 0xe2, 0x9f, 0x82, 0xc1, 0x28, 0xce, 0xb3, 0xfe, 0x13, 0xf3, 0x0d, 0x51, 0x7f, 0x94,
- 0x61, 0x39, 0xa9, 0x0c, 0x17, 0xca, 0x68, 0x9d, 0x46, 0x4b, 0xbd, 0x99, 0x86, 0xc8, 0x49, 0x44,
- 0xcb, 0xc7, 0x70, 0x96, 0xf5, 0x1a, 0x06, 0xba, 0x21, 0xe6, 0x88, 0xa6, 0x54, 0x1c, 0x56, 0x5e,
- 0xd4, 0xfd, 0xee, 0xaf, 0xef, 0x56, 0xe5, 0xb7, 0xef, 0x56, 0xe5, 0xdf, 0xdf, 0xad, 0xca, 0x2f,
- 0x6e, 0x75, 0x4d, 0xff, 0xb0, 0xff, 0xb2, 0xd2, 0xb6, 0x7b, 0x55, 0x16, 0x49, 0x95, 0x45, 0x52,
- 0xf5, 0x8c, 0xa3, 0xea, 0xc9, 0x66, 0x95, 0xfd, 0xc3, 0x73, 0x9f, 0xfd, 0xbe, 0xcc, 0xb0, 0xe6,
- 0xce, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xc1, 0x1f, 0x57, 0x17, 0x9b, 0x12, 0x00, 0x00,
+ 0xbb, 0xc4, 0xf2, 0x2b, 0x9e, 0x71, 0xb4, 0x52, 0xe0, 0x5d, 0x06, 0x58, 0x29, 0x52, 0xbc, 0x6d,
+ 0x0d, 0x9f, 0xac, 0x8e, 0xd9, 0x15, 0x4f, 0xd7, 0x0d, 0xa7, 0xe5, 0xd9, 0x1d, 0xff, 0x95, 0xee,
+ 0x92, 0x96, 0x41, 0x7c, 0xdd, 0x3c, 0xf6, 0xc4, 0x2b, 0x44, 0x4e, 0x88, 0xe5, 0x7b, 0x55, 0xd6,
+ 0x88, 0x31, 0xe8, 0xda, 0x5d, 0x3b, 0xea, 0x1f, 0xda, 0x5e, 0x34, 0x9e, 0xb7, 0x74, 0x47, 0x74,
+ 0x0b, 0x3c, 0x16, 0xf6, 0xa0, 0xfe, 0x05, 0x90, 0xdd, 0xe6, 0xd1, 0xa2, 0x7b, 0x30, 0xd7, 0x23,
+ 0xbe, 0x5e, 0x96, 0xd7, 0xe4, 0x8d, 0xc2, 0xe6, 0x8d, 0xca, 0x64, 0xd8, 0x95, 0x5d, 0xe2, 0xeb,
+ 0x86, 0xee, 0xeb, 0xb5, 0x5c, 0x18, 0x28, 0x0c, 0x8d, 0xd9, 0x2f, 0xda, 0x81, 0x39, 0xff, 0xd4,
+ 0x21, 0xe5, 0xd4, 0x9a, 0xbc, 0xb1, 0xb0, 0xb9, 0x9e, 0x64, 0x2b, 0xdc, 0x44, 0xed, 0xd3, 0x53,
+ 0x87, 0x70, 0x1a, 0x6a, 0x88, 0xd9, 0x2f, 0x7a, 0x01, 0xd0, 0xee, 0x19, 0x2d, 0xcf, 0xd7, 0xfd,
+ 0xbe, 0x57, 0xbe, 0xc4, 0x02, 0xb9, 0x35, 0x83, 0xec, 0x09, 0x03, 0x62, 0xe2, 0x39, 0xb6, 0xe5,
+ 0x91, 0xda, 0x42, 0x18, 0x28, 0x31, 0x02, 0x4d, 0xc2, 0xf9, 0x76, 0x4f, 0x80, 0xd0, 0x33, 0x28,
+ 0x32, 0x96, 0x16, 0xaf, 0x6f, 0x79, 0x8e, 0xb1, 0x2b, 0x49, 0xec, 0x4d, 0xfa, 0xbc, 0xcd, 0x60,
+ 0xb5, 0x52, 0x18, 0x28, 0x23, 0x86, 0x9a, 0x84, 0x79, 0x09, 0x39, 0x00, 0xbd, 0x86, 0x2b, 0xf1,
+ 0xd7, 0x2d, 0x57, 0x44, 0x53, 0x4e, 0x33, 0x07, 0xeb, 0x67, 0x38, 0x18, 0x04, 0x7f, 0x3d, 0x0c,
+ 0x94, 0x64, 0x26, 0x4d, 0xc2, 0x4b, 0xd6, 0xa4, 0x05, 0xf5, 0xcc, 0x28, 0x29, 0xde, 0x22, 0x6d,
+ 0xbf, 0xe5, 0x92, 0x2f, 0xfb, 0xc4, 0xf3, 0xcb, 0x99, 0xe9, 0x9e, 0xb7, 0x68, 0x6f, 0x9b, 0xe3,
+ 0x31, 0x87, 0x73, 0xcf, 0x89, 0x4c, 0xd4, 0xb3, 0x3e, 0x69, 0x81, 0xbe, 0x82, 0xab, 0xe3, 0x78,
+ 0x91, 0x74, 0x96, 0xb9, 0xde, 0x38, 0xdb, 0xb5, 0xc8, 0x7a, 0x25, 0x0c, 0x94, 0x29, 0x5c, 0x9a,
+ 0x84, 0x97, 0xf5, 0x04, 0x1b, 0xe4, 0xc3, 0xf2, 0xc0, 0x82, 0xd7, 0x89, 0xa7, 0x9d, 0x63, 0xbe,
+ 0x3f, 0x98, 0xe5, 0x9b, 0x95, 0x8f, 0x67, 0x5d, 0x0e, 0x03, 0x25, 0x91, 0x47, 0x93, 0x30, 0xd2,
+ 0x27, 0xf0, 0x74, 0xfd, 0xc4, 0xd1, 0xe5, 0xfc, 0xf4, 0xf5, 0x13, 0xf3, 0xc6, 0xd7, 0x4f, 0xdc,
+ 0x90, 0xae, 0x9f, 0x18, 0x3d, 0xea, 0x40, 0x89, 0x6e, 0x29, 0xe7, 0x58, 0xb7, 0x48, 0xb4, 0xf2,
+ 0x0b, 0x8c, 0xfb, 0x7f, 0x49, 0xdc, 0xf5, 0x08, 0xcb, 0x97, 0x75, 0x6d, 0x39, 0x0c, 0x94, 0x09,
+ 0x02, 0x4d, 0xc2, 0x8b, 0xc6, 0x28, 0x10, 0x7d, 0x01, 0x45, 0xa6, 0x14, 0x2d, 0x97, 0x38, 0xb6,
+ 0xeb, 0x97, 0x8b, 0xd3, 0xab, 0xc5, 0x85, 0xa5, 0xb2, 0x43, 0x1b, 0xcc, 0xd0, 0x3c, 0x8d, 0xb8,
+ 0x3d, 0x4d, 0x83, 0x0c, 0x01, 0xe8, 0x3b, 0x19, 0x56, 0x62, 0x61, 0x8c, 0x49, 0x56, 0x79, 0x9e,
+ 0x79, 0xbb, 0x3d, 0x3b, 0x23, 0x61, 0x54, 0xe7, 0x36, 0xb5, 0xd5, 0x30, 0x50, 0x66, 0x70, 0x6a,
+ 0x12, 0x2e, 0x1b, 0x53, 0x6c, 0x47, 0xab, 0xda, 0x77, 0x0c, 0xdd, 0x27, 0xe5, 0x85, 0x73, 0x54,
+ 0xf5, 0x80, 0x41, 0xc7, 0xab, 0xca, 0x09, 0x46, 0xaa, 0xca, 0x81, 0xea, 0x1d, 0x28, 0xc4, 0x04,
+ 0x0d, 0x01, 0x64, 0x9a, 0x7b, 0x78, 0x77, 0xeb, 0x71, 0x49, 0x42, 0x45, 0xc8, 0xd5, 0xf7, 0x9e,
+ 0x37, 0x1f, 0xef, 0x6d, 0xd5, 0x4b, 0x32, 0x7d, 0x73, 0xb0, 0xcf, 0xfa, 0xa9, 0x5a, 0x06, 0xe6,
+ 0x28, 0x8f, 0xfa, 0xc3, 0x25, 0xb8, 0x92, 0xa8, 0x64, 0xe8, 0x73, 0xc8, 0x88, 0xa5, 0x20, 0x33,
+ 0x45, 0xbd, 0x7b, 0x6e, 0x11, 0x1c, 0x1d, 0xad, 0x41, 0x18, 0x28, 0x82, 0x0a, 0x8b, 0x16, 0x99,
+ 0x00, 0xc4, 0x75, 0x6d, 0xb7, 0xd5, 0xb6, 0x8d, 0x48, 0xb2, 0xef, 0xbd, 0xb7, 0x83, 0x1d, 0x4a,
+ 0xb1, 0x6d, 0x1b, 0x42, 0x76, 0x87, 0x8c, 0x38, 0x4f, 0xa2, 0x57, 0xe8, 0x26, 0x64, 0x7b, 0xc4,
+ 0xf3, 0xf4, 0x2e, 0x61, 0x6a, 0x9e, 0xaf, 0x15, 0xc2, 0x40, 0x89, 0x86, 0x70, 0xd4, 0x41, 0x0a,
+ 0xa4, 0x99, 0x0d, 0x13, 0xe5, 0x7c, 0x2d, 0x1f, 0x06, 0x0a, 0x1f, 0xc0, 0xbc, 0x51, 0xef, 0xc3,
+ 0xfc, 0x48, 0x30, 0x68, 0x11, 0x0a, 0xdb, 0xbb, 0xf5, 0xd6, 0x41, 0xf3, 0x51, 0x73, 0xef, 0x79,
+ 0xb3, 0x24, 0xd1, 0xfa, 0xd2, 0x81, 0xbd, 0x47, 0x25, 0x19, 0xcd, 0x43, 0x9e, 0xf6, 0x77, 0x30,
+ 0xde, 0xc3, 0xa5, 0x94, 0x5a, 0x85, 0xd2, 0x78, 0xcc, 0x14, 0xbe, 0x83, 0x31, 0x85, 0x4b, 0x94,
+ 0x8b, 0xf6, 0x23, 0x2e, 0x59, 0xfd, 0x39, 0x0d, 0x8b, 0x63, 0xfb, 0x0c, 0x7d, 0x08, 0x79, 0xef,
+ 0xd4, 0xf3, 0x49, 0xaf, 0x65, 0x1a, 0x6c, 0x52, 0xf2, 0xb5, 0xf9, 0x30, 0x50, 0x86, 0x83, 0x38,
+ 0xc7, 0xbb, 0x0d, 0x03, 0x3d, 0x84, 0x6c, 0xb4, 0xee, 0x53, 0x6b, 0x97, 0x36, 0x0a, 0x9b, 0x6b,
+ 0x53, 0x0f, 0x81, 0x68, 0xad, 0xb3, 0xba, 0x08, 0x23, 0x1c, 0x75, 0xe8, 0x91, 0x4c, 0x0f, 0x71,
+ 0x71, 0x12, 0x26, 0x1e, 0xc9, 0x9a, 0xed, 0xf9, 0x0d, 0xab, 0x63, 0xf3, 0xb3, 0x94, 0xa2, 0x31,
+ 0xfb, 0x45, 0x0f, 0x20, 0x7b, 0x48, 0xf4, 0x63, 0xff, 0xd0, 0x2b, 0xa7, 0x59, 0x10, 0xd3, 0x8f,
+ 0x3a, 0x8d, 0xe1, 0x78, 0x0c, 0xc2, 0x06, 0x47, 0x1d, 0xf4, 0xed, 0xec, 0x8d, 0x9d, 0x61, 0xdc,
+ 0xff, 0xea, 0xc6, 0x9e, 0xb1, 0xad, 0xbf, 0x49, 0x0e, 0x26, 0x4a, 0x34, 0xcb, 0x82, 0xf9, 0xe8,
+ 0x5c, 0xc1, 0x88, 0xa4, 0xa7, 0xc5, 0x12, 0xd5, 0x61, 0x32, 0x16, 0x4d, 0x14, 0xe6, 0x24, 0x3a,
+ 0x7e, 0xf5, 0xb6, 0x6f, 0x9e, 0x98, 0xfe, 0x69, 0xa4, 0xde, 0x39, 0x16, 0xc5, 0xf4, 0xe3, 0x77,
+ 0x4b, 0xe0, 0xc5, 0x16, 0x8d, 0x1d, 0xbf, 0x63, 0x4c, 0xe2, 0xf0, 0x1d, 0xc5, 0xab, 0xdf, 0xcb,
+ 0xb0, 0x94, 0xc0, 0x83, 0x1c, 0x58, 0x1a, 0xb9, 0x3e, 0xc4, 0x04, 0xa4, 0xb0, 0x79, 0xf3, 0x8c,
+ 0x6b, 0x88, 0x88, 0xe5, 0x5a, 0x18, 0x28, 0x49, 0x2c, 0x9a, 0x84, 0x2f, 0x5b, 0x13, 0xe8, 0x1c,
+ 0x64, 0x44, 0x4c, 0x3f, 0xa5, 0xe0, 0xf2, 0x04, 0x1b, 0xfa, 0x0c, 0x16, 0xda, 0xb6, 0xeb, 0x92,
+ 0x63, 0xdd, 0x37, 0x6d, 0x6b, 0xb8, 0x71, 0x50, 0x18, 0x28, 0x63, 0x6f, 0xf0, 0x7c, 0xec, 0xb9,
+ 0x61, 0xa0, 0xfd, 0x81, 0x00, 0x72, 0x7d, 0xba, 0x7d, 0xae, 0xf8, 0x2b, 0x33, 0x54, 0xef, 0x9c,
+ 0x52, 0xb4, 0x0e, 0x39, 0x9e, 0xbf, 0x69, 0x08, 0x35, 0x2a, 0x86, 0x81, 0x32, 0x18, 0xc3, 0x59,
+ 0xd6, 0x6b, 0x18, 0xea, 0x46, 0x94, 0x3c, 0x2a, 0x40, 0x76, 0x7f, 0xa7, 0x59, 0x6f, 0x34, 0x1f,
+ 0x96, 0x24, 0x94, 0x81, 0x14, 0xd3, 0xa0, 0x3c, 0xa4, 0x23, 0xfd, 0xf9, 0x53, 0x86, 0x6b, 0x53,
+ 0x96, 0xdf, 0xf0, 0x56, 0xca, 0xd7, 0x9b, 0x98, 0xad, 0x33, 0xb7, 0x6a, 0xec, 0x56, 0xca, 0x0d,
+ 0x07, 0xb7, 0x52, 0xc1, 0xfb, 0x06, 0xae, 0xea, 0x8e, 0xd3, 0xa2, 0xb7, 0x7c, 0x7a, 0xa7, 0x7a,
+ 0xa5, 0x77, 0x22, 0x0f, 0xa9, 0x19, 0x97, 0x43, 0xc7, 0xd9, 0xe7, 0x06, 0xcf, 0xb7, 0x1e, 0x08,
+ 0x4f, 0xfc, 0x82, 0x96, 0x48, 0xc5, 0x6e, 0x87, 0x43, 0x13, 0xbd, 0x23, 0x4c, 0x72, 0x90, 0xe1,
+ 0x00, 0xf5, 0x37, 0x39, 0x26, 0xa4, 0xfc, 0xc4, 0x1c, 0x68, 0x9a, 0xfc, 0x0f, 0x34, 0xed, 0x0c,
+ 0x2d, 0x4a, 0xfd, 0x97, 0x5a, 0xa4, 0xee, 0xc2, 0x62, 0xdd, 0x7e, 0x65, 0x1d, 0xdb, 0xba, 0x11,
+ 0xdd, 0x11, 0x2f, 0xf0, 0x09, 0xa5, 0x7e, 0x9d, 0x82, 0xa5, 0x84, 0xef, 0x02, 0xb4, 0x3b, 0x72,
+ 0x15, 0x78, 0xaf, 0xef, 0xa1, 0xa4, 0x6d, 0xd0, 0x80, 0x0c, 0x55, 0x19, 0xdb, 0x12, 0x1b, 0xeb,
+ 0x2c, 0x61, 0xd8, 0x62, 0x60, 0x4e, 0xc5, 0x0d, 0xb1, 0x68, 0xd1, 0x33, 0x28, 0x08, 0x91, 0xa0,
+ 0x09, 0x89, 0x43, 0xea, 0xff, 0xc9, 0xe1, 0x51, 0x58, 0x9d, 0x78, 0x6d, 0xd7, 0x74, 0x7c, 0xdb,
+ 0xad, 0x2d, 0x86, 0x81, 0x12, 0x37, 0xc6, 0xc0, 0x1f, 0xe8, 0x34, 0xa9, 0x7f, 0xc8, 0x50, 0x3c,
+ 0x70, 0x68, 0x5d, 0xc5, 0x06, 0xbb, 0xc8, 0x97, 0xe9, 0x93, 0x31, 0x21, 0xa9, 0x26, 0x59, 0xc7,
+ 0xbd, 0x55, 0x9e, 0xba, 0xba, 0xe5, 0x75, 0x88, 0x3b, 0x43, 0x4b, 0x54, 0xc8, 0xb8, 0x44, 0xf7,
+ 0x6c, 0x4b, 0x48, 0x09, 0xc3, 0xf0, 0x11, 0x2c, 0x5a, 0xf5, 0x13, 0x58, 0x18, 0x65, 0xa2, 0x3a,
+ 0x31, 0xbc, 0xaf, 0x44, 0x3a, 0x01, 0x90, 0x79, 0xb0, 0xd5, 0x78, 0xbc, 0x53, 0x2f, 0xa5, 0xd4,
+ 0x5f, 0x64, 0xc8, 0xd3, 0x0a, 0x6c, 0x1f, 0xf6, 0xad, 0x23, 0xb4, 0xc7, 0xb6, 0x91, 0x41, 0xdc,
+ 0x99, 0x13, 0x4f, 0xa1, 0xc4, 0xc0, 0xc4, 0xb3, 0xfb, 0x6e, 0x9b, 0xaa, 0x8a, 0x41, 0x5c, 0x1e,
+ 0x0f, 0x37, 0xd6, 0x24, 0x2c, 0x7a, 0x48, 0xe3, 0xd7, 0x4e, 0xa1, 0x00, 0x1b, 0xe7, 0xa0, 0x63,
+ 0x8f, 0xbc, 0xa4, 0xd4, 0x52, 0x93, 0x30, 0x6b, 0x6b, 0x59, 0x48, 0xb7, 0xe9, 0x2b, 0xf5, 0xad,
+ 0x0c, 0x57, 0x12, 0x43, 0xb8, 0xd0, 0x9c, 0xa9, 0x90, 0x61, 0xf4, 0x7c, 0xce, 0xd2, 0x3c, 0x1d,
+ 0x3e, 0x82, 0x45, 0x8b, 0x36, 0x20, 0xd7, 0x3e, 0x24, 0xed, 0x23, 0xaf, 0xdf, 0x13, 0x93, 0xc0,
+ 0x74, 0x3a, 0x1a, 0xc3, 0x83, 0x1e, 0xfa, 0x18, 0x80, 0xd9, 0xb4, 0x3c, 0xf3, 0x0d, 0x61, 0x9a,
+ 0x9e, 0x16, 0xff, 0x14, 0x0c, 0x46, 0x71, 0x9e, 0xf5, 0x9f, 0x98, 0x6f, 0x88, 0xfa, 0xa3, 0x0c,
+ 0xcb, 0x49, 0x65, 0xb8, 0x50, 0x46, 0xeb, 0x34, 0x5a, 0xea, 0xcd, 0x34, 0x44, 0x4e, 0x22, 0x5a,
+ 0x3e, 0x86, 0xb3, 0xac, 0xd7, 0x30, 0xd0, 0x0d, 0x31, 0x47, 0x34, 0xa5, 0xe2, 0xb0, 0xf2, 0xa2,
+ 0xee, 0x77, 0x7f, 0x7d, 0xb7, 0x2a, 0xbf, 0x7d, 0xb7, 0x2a, 0xff, 0xfe, 0x6e, 0x55, 0x7e, 0x71,
+ 0xab, 0x6b, 0xfa, 0x87, 0xfd, 0x97, 0x95, 0xb6, 0xdd, 0xab, 0xb2, 0x48, 0xaa, 0x2c, 0x92, 0xaa,
+ 0x67, 0x1c, 0x55, 0x4f, 0x36, 0xab, 0xec, 0x1f, 0x9e, 0xfb, 0xec, 0xf7, 0x65, 0x86, 0x35, 0x77,
+ 0xfe, 0x0e, 0x00, 0x00, 0xff, 0xff, 0x6a, 0x53, 0x4d, 0x33, 0x9b, 0x12, 0x00, 0x00,
}
func (m *Command) Marshal() (dAtA []byte, err error) {
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command.proto
index feb738c3c..dcdc69782 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command.proto
@@ -1,167 +1,232 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-import "gogo.proto";
-import "common.proto";
import "agent.proto";
-import "host.proto";
-import "nginx.proto";
+import "common.proto";
import "config.proto";
-import "events/event.proto";
import "dp_software_details.proto";
+import "events/event.proto";
+import "gogo.proto";
+import "host.proto";
import "nap.proto";
+import "nginx.proto";
+
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-// Command is the envelope sent between the management plane and the data plane, requesting some action or reporting a response
+// Represents a command message, which is used for communication between the management server and the agent.
message Command {
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ]; // add metadata later with fields like timestamp etc
-
+ // Provides metadata information associated with the command
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // Command type enum
enum CommandType {
+ // All commands default to normal
NORMAL = 0;
+ // The download type is used when sending NginxConfig from the management server to the agent.
+ // It is used to instruct the agent to download the NGINX config from the management server.
DOWNLOAD = 1;
+ // The upload type is used when sending NginxConfig from the agent to the management server.
+ // It is used to instruct the agent to upload the NGINX config from the agent.
+ // This will be implemented in a future release.
UPLOAD = 2;
}
- // used as a dispatch flag to quickly send the command to the correct base processor that will then further sort
- // based on the actual data type
- CommandType type = 2 [(gogoproto.jsontag) = "type" ];
+ // Used to determine the type of command
+ CommandType type = 2 [(gogoproto.jsontag) = "type"];
oneof data {
- // common command status response - used by most command responses
- CommandStatusResponse cmd_status = 3 [(gogoproto.jsontag) = "cmd_status" ];
+ // Common command status response
+ CommandStatusResponse cmd_status = 3 [(gogoproto.jsontag) = "cmd_status"];
- // request action on nginx config when sent C → A - all action values (see NgxConfig)
- // notify config details when sent A → C - only RETURN action
- NginxConfig nginx_config = 4 [(gogoproto.jsontag) = "nginx_config" ];
+ // Used by the management server to notify the agent to download or upload NGINX configuration.
+ NginxConfig nginx_config = 4 [(gogoproto.jsontag) = "nginx_config"];
- // request action on nginx config when sent C → A - all action values (see NgxConfig)
- // notify config details when sent A → C - only RETURN action
- NginxConfigResponse nginx_config_response = 5 [(gogoproto.jsontag) = "nginx_config_response" ];
+ // Response sent to indicate if a NGINX config apply was successful or not
+ NginxConfigResponse nginx_config_response = 5 [(gogoproto.jsontag) = "nginx_config_response"];
- // request connection to a management plane, A → C
- AgentConnectRequest agent_connect_request = 6 [(gogoproto.jsontag) = "agent_connect_request" ];
+ // Agent connect request that is sent from the agent to the management server to initialize registration
+ AgentConnectRequest agent_connect_request = 6 [(gogoproto.jsontag) = "agent_connect_request"];
- // connection response to the data plane, C → A
- AgentConnectResponse agent_connect_response = 7 [(gogoproto.jsontag) = "agent_connect_response" ];
+ // Agent connect response that is sent from the management server to the agent to finalize registration
+ AgentConnectResponse agent_connect_response = 7 [(gogoproto.jsontag) = "agent_connect_response"];
- // request Configuration parameters for agent, A → C
- AgentConfigRequest agent_config_request = 8 [(gogoproto.jsontag) = "agent_config_request" ];
+ // Agent config request that is sent by the agent to the management server to request agent configuration
+ AgentConfigRequest agent_config_request = 8 [(gogoproto.jsontag) = "agent_config_request"];
- // configuration parameters for Agent C → A. This message can be sent asynchronously as well
- AgentConfig agent_config = 9 [(gogoproto.jsontag) = "agent_config" ];
+ // Agent Config is sent by the management server to the agent when is receives an AgentConfigRequest from the agent
+ AgentConfig agent_config = 9 [(gogoproto.jsontag) = "agent_config"];
- // DataplaneStatus reports Dataplane metrics the Agent is aware of
- DataplaneStatus dataplane_status = 11 [(gogoproto.jsontag) = "dataplane_status" ];
+ // Dataplane status is sent by the agent to the management server to report the information like the health of the system
+ DataplaneStatus dataplane_status = 11 [(gogoproto.jsontag) = "dataplane_status"];
- // EventReport reports events the Agent is aware of, e.g. Start/Stop of Agent, Config Apply NGINX
- f5.nginx.agent.sdk.events.EventReport event_report = 12 [(gogoproto.jsontag) = "event_report" ];
+ // Reports events the agent is aware of like the start/stop of the agent, NGINX config applies, etc.
+ f5.nginx.agent.sdk.events.EventReport event_report = 12 [(gogoproto.jsontag) = "event_report"];
- // DataplaneSoftwareDetails contains details for additional software running on the dataplane that pertains
- // to NGINX Agent
+ // Provides details of additional software running on the dataplane
DataplaneSoftwareDetails dataplane_software_details = 13 [(gogoproto.jsontag) = "dataplane_software_details"];
- // DataplaneUpdate contains details for dataplane resources that have changed
- DataplaneUpdate dataplane_update = 14 [(gogoproto.jsontag) = "dataplane_update" ];
+ // Provides details of any changes on the dataplane
+ DataplaneUpdate dataplane_update = 14 [(gogoproto.jsontag) = "dataplane_update"];
}
}
+// Represents a command status response
message CommandStatusResponse {
+ // Command status enum
enum CommandStatus {
+ // Unknown status of command
CMD_UNKNOWN = 0;
+ // Command was successful
CMD_OK = 1;
+ // Command failed
CMD_ERROR = 2;
}
+ // Command error code enum
enum CommandErrorCode {
- ERR_OK = 0; // No Error
- ERR_UNKNOWN = 1; // unknown error
+ // No Error (This is the default value)
+ ERR_OK = 0;
+ // Unknown error
+ ERR_UNKNOWN = 1;
}
- CommandStatus status = 1 [(gogoproto.jsontag) = "status" ];
- CommandErrorCode error_code = 2 [(gogoproto.jsontag) = "error_code" ];
- string message = 3 [(gogoproto.jsontag) = "message" ];
- string error = 4 [(gogoproto.jsontag) = "error" ];
+ // Command status
+ CommandStatus status = 1 [(gogoproto.jsontag) = "status"];
+ // Error code
+ CommandErrorCode error_code = 2 [(gogoproto.jsontag) = "error_code"];
+ // Provides a user friendly message to describe the response
+ string message = 3 [(gogoproto.jsontag) = "message"];
+ // Provides an error message of why the command failed
+ string error = 4 [(gogoproto.jsontag) = "error"];
}
-// DataplaneStatus reports Dataplane metrics the Agent is aware of
+// Represents a dataplane status, which is used by the agent to periodically report the status of NGINX, agent activities and other dataplane software activities.
message DataplaneStatus {
- string system_id = 1 [(gogoproto.jsontag) = "system_id" ];
- repeated NginxDetails details = 2 [(gogoproto.jsontag) = "details" ]; // moving to dataplane_software_details
- HostInfo host = 3 [(gogoproto.jsontag) = "host" ];
- repeated NginxHealth healths = 5 [(gogoproto.jsontag) = "healths" ]; // moving to DataplaneSoftwareHealth
+ // System ID
+ string system_id = 1 [(gogoproto.jsontag) = "system_id"];
+ // List of NGINX details. This field will be moving to DataplaneSoftwareDetails in a future release.
+ repeated NginxDetails details = 2 [(gogoproto.jsontag) = "details"];
+ // Host information
+ HostInfo host = 3 [(gogoproto.jsontag) = "host"];
+ // List of NGINX health information. This field will be moving to DataplaneSoftwareHealth in a future release.
+ repeated NginxHealth healths = 5 [(gogoproto.jsontag) = "healths"];
+ // List of software details. This includes details about NGINX and any other software installed in the system that the agent is interested in.
repeated DataplaneSoftwareDetails dataplane_software_details = 6 [(gogoproto.jsontag) = "dataplane_software_details"];
+ // List of software health statues. This includes the health of NGINX and any other software installed in the system that the agent is interested in.
repeated DataplaneSoftwareHealth dataplane_software_healths = 7 [(gogoproto.jsontag) = "dataplane_software_healths"];
- repeated AgentActivityStatus agent_activity_status = 8 [(gogoproto.jsontag) = "agent_activity_status" ];
+ // List of activity statuses. Reports on the status of activities that the agent is currently executing.
+ repeated AgentActivityStatus agent_activity_status = 8 [(gogoproto.jsontag) = "agent_activity_status"];
}
+// Represent an agent activity status
message AgentActivityStatus {
- oneof Status {
- NginxConfigStatus nginx_config_status = 1 [(gogoproto.jsontag) = "nginx_config_status" ];
- }
+ oneof Status {
+ // NGINX configuration status
+ NginxConfigStatus nginx_config_status = 1 [(gogoproto.jsontag) = "nginx_config_status"];
+ }
}
+// Represents a NGINX configuration status
message NginxConfigStatus {
- string correlation_id = 1 [(gogoproto.jsontag) = "correlation_id" ];
- Status status = 2 [(gogoproto.jsontag) = "status" ];
- string message = 3 [(gogoproto.jsontag) = "message" ];
- string nginx_id = 4 [(gogoproto.jsontag) = "nginx_id" ];
-
+ // CorrelationID is an ID used by the producer of the message to track the flow of events
+ string correlation_id = 1 [(gogoproto.jsontag) = "correlation_id"];
+ // Provides a status for the NGINX configuration
+ Status status = 2 [(gogoproto.jsontag) = "status"];
+ // Provides a user friendly message to describe the current state of the NGINX configuration.
+ string message = 3 [(gogoproto.jsontag) = "message"];
+ // NGINX ID
+ string nginx_id = 4 [(gogoproto.jsontag) = "nginx_id"];
+
+ // NGINX configuration status enum
enum Status {
+ // The configuration is still in the process of being applied.
PENDING = 0;
+ // The configuration has being successfully applied.
OK = 1;
+ // The configuration has failed to be applied
ERROR = 2;
}
}
+// Represents a dataplane software health
message DataplaneSoftwareHealth {
- oneof health {
- NginxHealth nginx_health = 1 [(gogoproto.jsontag) = "nginx_health"];
- AppProtectWAFHealth app_protect_waf_health = 2 [(gogoproto.jsontag) = "app_protect_waf_health"];
- }
+ oneof health {
+ // Health of NGINX instance
+ NginxHealth nginx_health = 1 [(gogoproto.jsontag) = "nginx_health"];
+ // Health of App Protect WAF
+ AppProtectWAFHealth app_protect_waf_health = 2 [(gogoproto.jsontag) = "app_protect_waf_health"];
+ }
}
+// Represents a dataplane update
message DataplaneUpdate {
- HostInfo host = 1 [(gogoproto.jsontag) = "host"];
- repeated DataplaneSoftwareDetails dataplane_software_details = 2 [(gogoproto.jsontag) = "dataplane_software_details"];
+ // Host information
+ HostInfo host = 1 [(gogoproto.jsontag) = "host"];
+ // List of software details. This includes details about NGINX and any other software installed in the system that the agent is interested in.
+ repeated DataplaneSoftwareDetails dataplane_software_details = 2 [(gogoproto.jsontag) = "dataplane_software_details"];
}
+// Represents a download request
message DownloadRequest {
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
+ // Metadata information
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
}
+// Represents a NGINX config response
message NginxConfigResponse {
- CommandStatusResponse status = 1 [(gogoproto.jsontag) = "status" ];
- NginxConfigAction action = 2 [(gogoproto.jsontag) = "action" ];
- ConfigDescriptor config_data = 3 [(gogoproto.jsontag) = "config_data" ];
+ // Command status
+ CommandStatusResponse status = 1 [(gogoproto.jsontag) = "status"];
+ // NGINX config action
+ NginxConfigAction action = 2 [(gogoproto.jsontag) = "action"];
+ // NGINX config description
+ ConfigDescriptor config_data = 3 [(gogoproto.jsontag) = "config_data"];
}
+// Represents an upload status
message UploadStatus {
+ // Transfer status enum
enum TransferStatus {
+ // Unknown status
UNKNOWN = 0;
+ // Upload was successful
OK = 1;
+ // Upload failed
FAILED = 2;
}
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- TransferStatus status = 2 [(gogoproto.jsontag) = "status" ];
- string reason = 3 [(gogoproto.jsontag) = "reason" ];
+ // Metadata information
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // Transfer status
+ TransferStatus status = 2 [(gogoproto.jsontag) = "status"];
+ // Provides an error message of why the upload failed
+ string reason = 3 [(gogoproto.jsontag) = "reason"];
}
+// Represents a data chunck
message DataChunk {
oneof chunk {
- ChunkedResourceHeader header = 1 [(gogoproto.jsontag) = "header" ];
- ChunkedResourceChunk data = 2 [(gogoproto.jsontag) = "data" ];
- };
+ // Chunk header
+ ChunkedResourceHeader header = 1 [(gogoproto.jsontag) = "header"];
+ // Chunk data
+ ChunkedResourceChunk data = 2 [(gogoproto.jsontag) = "data"];
+ }
}
+// Represents a chunked resource Header
message ChunkedResourceHeader {
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- // number of chunks expected in this transfer
- int32 chunks = 2 [(gogoproto.jsontag) = "chunks" ];
- string checksum = 3 [(gogoproto.jsontag) = "checksum" ];
- int32 chunk_size = 4 [(gogoproto.jsontag) = "chunk_size" ];
+ // Metadata information
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // Number of chunks expected in the transfer
+ int32 chunks = 2 [(gogoproto.jsontag) = "chunks"];
+ // Chunk checksum
+ string checksum = 3 [(gogoproto.jsontag) = "checksum"];
+ // Chunk size
+ int32 chunk_size = 4 [(gogoproto.jsontag) = "chunk_size"];
}
+// Represents a chunked resource chunk
message ChunkedResourceChunk {
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- int32 chunk_id = 2 [(gogoproto.jsontag) = "chunk_id" ];
- bytes data = 3 [(gogoproto.jsontag) = "data" ];
+ // Metadata information
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // Chunk ID
+ int32 chunk_id = 2 [(gogoproto.jsontag) = "chunk_id"];
+ // Chunk data
+ bytes data = 3 [(gogoproto.jsontag) = "data"];
}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command_svc.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command_svc.pb.go
index 86f71f023..05ac4ec44 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command_svc.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command_svc.pb.go
@@ -57,21 +57,14 @@ const _ = grpc.SupportPackageIsVersion4
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type CommanderClient interface {
- // A Bidirectional streaming RPC established by the data plane agent and is kept open
+ // A Bidirectional streaming RPC established by the agent and is kept open
CommandChannel(ctx context.Context, opts ...grpc.CallOption) (Commander_CommandChannelClient, error)
- // A streaming RPC established by the data plane agent and is used to download resources associated with commands
- // The download stream will be kept open for the duration of the data transfer and will be closed when its done/
- // The transfer is a stream of chunks as follows:
- // - header
- // - data chunk count to follow
- // - resource identifier/metadata
- // - data 1
- // ...
- // - data
- //
- // each data chunk is of a size smaller than the maximum gRPC payload
+ // A streaming RPC established by the agent and is used to download resources associated with commands
+ // The download stream will be kept open for the duration of the data transfer and will be closed when its done.
+ // The transfer is a stream of chunks as follows: header -> data chunk 1 -> data chunk N.
+ // Each data chunk is of a size smaller than the maximum gRPC payload
Download(ctx context.Context, in *DownloadRequest, opts ...grpc.CallOption) (Commander_DownloadClient, error)
- // A streaming RPC established by the data plane agent and is used to upload resources associated with commands
+ // A streaming RPC established by the agent and is used to upload resources associated with commands
Upload(ctx context.Context, opts ...grpc.CallOption) (Commander_UploadClient, error)
}
@@ -182,21 +175,14 @@ func (x *commanderUploadClient) CloseAndRecv() (*UploadStatus, error) {
// CommanderServer is the server API for Commander service.
type CommanderServer interface {
- // A Bidirectional streaming RPC established by the data plane agent and is kept open
+ // A Bidirectional streaming RPC established by the agent and is kept open
CommandChannel(Commander_CommandChannelServer) error
- // A streaming RPC established by the data plane agent and is used to download resources associated with commands
- // The download stream will be kept open for the duration of the data transfer and will be closed when its done/
- // The transfer is a stream of chunks as follows:
- // - header
- // - data chunk count to follow
- // - resource identifier/metadata
- // - data 1
- // ...
- // - data
- //
- // each data chunk is of a size smaller than the maximum gRPC payload
+ // A streaming RPC established by the agent and is used to download resources associated with commands
+ // The download stream will be kept open for the duration of the data transfer and will be closed when its done.
+ // The transfer is a stream of chunks as follows: header -> data chunk 1 -> data chunk N.
+ // Each data chunk is of a size smaller than the maximum gRPC payload
Download(*DownloadRequest, Commander_DownloadServer) error
- // A streaming RPC established by the data plane agent and is used to upload resources associated with commands
+ // A streaming RPC established by the agent and is used to upload resources associated with commands
Upload(Commander_UploadServer) error
}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command_svc.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command_svc.proto
index 2c232c967..d3addcb55 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command_svc.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/command_svc.proto
@@ -1,29 +1,21 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
import "command.proto";
-// Interface exported by the server.
-service Commander {
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
- // A Bidirectional streaming RPC established by the data plane agent and is kept open
+// Represents a service used to sent command messages between the management server and the agent.
+service Commander {
+ // A Bidirectional streaming RPC established by the agent and is kept open
rpc CommandChannel(stream Command) returns (stream Command) {}
- // A streaming RPC established by the data plane agent and is used to download resources associated with commands
- // The download stream will be kept open for the duration of the data transfer and will be closed when its done/
- // The transfer is a stream of chunks as follows:
- // - header
- // - data chunk count to follow
- // - resource identifier/metadata
- // - data 1
- // ...
- // - data
- //
- // each data chunk is of a size smaller than the maximum gRPC payload
+ // A streaming RPC established by the agent and is used to download resources associated with commands
+ // The download stream will be kept open for the duration of the data transfer and will be closed when its done.
+ // The transfer is a stream of chunks as follows: header -> data chunk 1 -> data chunk N.
+ // Each data chunk is of a size smaller than the maximum gRPC payload
rpc Download(DownloadRequest) returns (stream DataChunk) {}
- // A streaming RPC established by the data plane agent and is used to upload resources associated with commands
+ // A streaming RPC established by the agent and is used to upload resources associated with commands
rpc Upload(stream DataChunk) returns (UploadStatus) {}
}
-
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common.pb.go
index 96be39044..398267a49 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common.pb.go
@@ -24,14 +24,20 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Action enum
type File_Action int32
const (
- File_unset File_Action = 0
+ // Default value
+ File_unset File_Action = 0
+ // No changes to the file
File_unchanged File_Action = 1
- File_add File_Action = 2
- File_update File_Action = 3
- File_delete File_Action = 4
+ // New file
+ File_add File_Action = 2
+ // Updated file
+ File_update File_Action = 3
+ // File deleted
+ File_delete File_Action = 4
)
var File_Action_name = map[int32]string{
@@ -58,15 +64,19 @@ func (File_Action) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_555bd8c177793206, []int{2, 0}
}
-// Metadata timestamped info associating a client with a specific command message
+// Represents the metadata for a message
type Metadata struct {
- Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp"`
- ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id"`
- MessageId string `protobuf:"bytes,3,opt,name=message_id,json=messageId,proto3" json:"message_id"`
- CloudAccountId string `protobuf:"bytes,4,opt,name=cloud_account_id,json=cloudAccountId,proto3" json:"cloud_account_id"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // timestamp defines the time of message creation
+ Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp"`
+ // Client ID
+ ClientId string `protobuf:"bytes,2,opt,name=client_id,json=clientId,proto3" json:"client_id"`
+ // Message ID
+ MessageId string `protobuf:"bytes,3,opt,name=message_id,json=messageId,proto3" json:"message_id"`
+ // Cloud Account ID (e.g. AWS/Azure/GCP account ID)
+ CloudAccountId string `protobuf:"bytes,4,opt,name=cloud_account_id,json=cloudAccountId,proto3" json:"cloud_account_id"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Metadata) Reset() { *m = Metadata{} }
@@ -130,7 +140,9 @@ func (m *Metadata) GetCloudAccountId() string {
return ""
}
+// Represents a map of directories & files on the system
type DirectoryMap struct {
+ // List of directories
Directories []*Directory `protobuf:"bytes,1,rep,name=directories,proto3" json:"directories,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -177,17 +189,25 @@ func (m *DirectoryMap) GetDirectories() []*Directory {
return nil
}
+// Represents a file
type File struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
- Lines int32 `protobuf:"varint,2,opt,name=lines,proto3" json:"lines"`
- Mtime *types.Timestamp `protobuf:"bytes,3,opt,name=mtime,proto3" json:"mtime"`
- Permissions string `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions"`
- Size_ int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size"`
- Contents []byte `protobuf:"bytes,6,opt,name=contents,proto3" json:"contents"`
- Action File_Action `protobuf:"varint,7,opt,name=action,proto3,enum=f5.nginx.agent.sdk.File_Action" json:"action,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Name of the file
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Number of lines in the file
+ Lines int32 `protobuf:"varint,2,opt,name=lines,proto3" json:"lines"`
+ // When the file was last modified
+ Mtime *types.Timestamp `protobuf:"bytes,3,opt,name=mtime,proto3" json:"mtime"`
+ // File permissions (e.g. 0644)
+ Permissions string `protobuf:"bytes,4,opt,name=permissions,proto3" json:"permissions"`
+ // Size of the file in bytes
+ Size_ int64 `protobuf:"varint,5,opt,name=size,proto3" json:"size"`
+ // The contents of the file in bytes
+ Contents []byte `protobuf:"bytes,6,opt,name=contents,proto3" json:"contents"`
+ // Action to take on the file (e.g. update, delete, etc)
+ Action File_Action `protobuf:"varint,7,opt,name=action,proto3,enum=f5.nginx.agent.sdk.File_Action" json:"action,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *File) Reset() { *m = File{} }
@@ -272,15 +292,21 @@ func (m *File) GetAction() File_Action {
return File_unset
}
+// Represents a directory
type Directory struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
- Mtime *types.Timestamp `protobuf:"bytes,2,opt,name=mtime,proto3" json:"mtime,omitempty"`
- Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"`
- Size_ int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
- Files []*File `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Name of the directory
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // When the directory was last modified
+ Mtime *types.Timestamp `protobuf:"bytes,2,opt,name=mtime,proto3" json:"mtime,omitempty"`
+ // Directory permissions (e.g. 0644)
+ Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions,omitempty"`
+ // Size of the directory in bytes
+ Size_ int64 `protobuf:"varint,4,opt,name=size,proto3" json:"size,omitempty"`
+ // List of files in the directory
+ Files []*File `protobuf:"bytes,5,rep,name=files,proto3" json:"files,omitempty"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Directory) Reset() { *m = Directory{} }
@@ -351,7 +377,9 @@ func (m *Directory) GetFiles() []*File {
return nil
}
+// Represents a list of SSL certificates files
type SslCertificates struct {
+ // List of SSL certificates
SslCerts []*SslCertificate `protobuf:"bytes,1,rep,name=ssl_certs,json=sslCerts,proto3" json:"ssl_certs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -398,26 +426,43 @@ func (m *SslCertificates) GetSslCerts() []*SslCertificate {
return nil
}
+// Represents a SSL certificate file
type SslCertificate struct {
- FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"fileName"`
- Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size"`
- Mtime *types.Timestamp `protobuf:"bytes,3,opt,name=mtime,proto3" json:"mtime"`
- Validity *CertificateDates `protobuf:"bytes,4,opt,name=validity,proto3" json:"validity"`
- Issuer *CertificateName `protobuf:"bytes,5,opt,name=issuer,proto3" json:"issuer"`
- Subject *CertificateName `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject"`
- SubjAltNames []string `protobuf:"bytes,7,rep,name=subj_alt_names,json=subjAltNames,proto3" json:"subjectAltName"`
- OcspUrl []string `protobuf:"bytes,8,rep,name=ocsp_url,json=ocspUrl,proto3" json:"ocspURL"`
- PublicKeyAlgorithm string `protobuf:"bytes,9,opt,name=public_key_algorithm,json=publicKeyAlgorithm,proto3" json:"publicKeyAlgorithm"`
- SignatureAlgorithm string `protobuf:"bytes,10,opt,name=signature_algorithm,json=signatureAlgorithm,proto3" json:"signatureAlgorithm"`
- SerialNumber string `protobuf:"bytes,11,opt,name=serial_number,json=serialNumber,proto3" json:"serialNumber"`
- SubjectKeyIdentifier string `protobuf:"bytes,12,opt,name=subject_key_identifier,json=subjectKeyIdentifier,proto3" json:"subjectKeyIdentifier"`
- Fingerprint string `protobuf:"bytes,13,opt,name=fingerprint,proto3" json:"fingerprint"`
- FingerprintAlgorithm string `protobuf:"bytes,14,opt,name=fingerprint_algorithm,json=fingerprintAlgorithm,proto3" json:"fingerprintAlgorithm"`
- Version int64 `protobuf:"varint,15,opt,name=version,proto3" json:"version"`
- AuthorityKeyIdentifier string `protobuf:"bytes,16,opt,name=authority_key_identifier,json=authorityKeyIdentifier,proto3" json:"authorityKeyIdentifier"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Name of the file
+ FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName,proto3" json:"fileName"`
+ // Size of the file in bytes
+ Size_ int64 `protobuf:"varint,2,opt,name=size,proto3" json:"size"`
+ // When the file was last modified
+ Mtime *types.Timestamp `protobuf:"bytes,3,opt,name=mtime,proto3" json:"mtime"`
+ // A time when the certificate is valid
+ Validity *CertificateDates `protobuf:"bytes,4,opt,name=validity,proto3" json:"validity"`
+ // This field contains the distinguished name (DN) of the certificate issuer
+ Issuer *CertificateName `protobuf:"bytes,5,opt,name=issuer,proto3" json:"issuer"`
+ // This dedicated object name associated with the public key, for which the certificate is issued
+ Subject *CertificateName `protobuf:"bytes,6,opt,name=subject,proto3" json:"subject"`
+ // Subject alternative names that allows users to specify additional host names for the SSL certificate
+ SubjAltNames []string `protobuf:"bytes,7,rep,name=subj_alt_names,json=subjAltNames,proto3" json:"subjectAltName"`
+ // Online Certificate Status Protocol URL
+ OcspUrl []string `protobuf:"bytes,8,rep,name=ocsp_url,json=ocspUrl,proto3" json:"ocspURL"`
+ // Public key encryption algorithm (e.g. RSA)
+ PublicKeyAlgorithm string `protobuf:"bytes,9,opt,name=public_key_algorithm,json=publicKeyAlgorithm,proto3" json:"publicKeyAlgorithm"`
+ // The signature algorithm contain a hashing algorithm and an encryption algorithm (e.g. sha256RSA where sha256 is the hashing algorithm and RSA is the encryption algorithm)
+ SignatureAlgorithm string `protobuf:"bytes,10,opt,name=signature_algorithm,json=signatureAlgorithm,proto3" json:"signatureAlgorithm"`
+ // Used to uniquely identify the certificate within a CA's systems
+ SerialNumber string `protobuf:"bytes,11,opt,name=serial_number,json=serialNumber,proto3" json:"serialNumber"`
+ // The subject key identifier extension provides a means of identifying certificates that contain a particular public key
+ SubjectKeyIdentifier string `protobuf:"bytes,12,opt,name=subject_key_identifier,json=subjectKeyIdentifier,proto3" json:"subjectKeyIdentifier"`
+ // SSL certificate fingerprint
+ Fingerprint string `protobuf:"bytes,13,opt,name=fingerprint,proto3" json:"fingerprint"`
+ // SSL certificate fingerprint algorithm
+ FingerprintAlgorithm string `protobuf:"bytes,14,opt,name=fingerprint_algorithm,json=fingerprintAlgorithm,proto3" json:"fingerprintAlgorithm"`
+ // There are three versions of certificates: 1, 2 and 3, numbered as 0, 1 and 2. Version 1 supports only the basic fields; Version 2 adds unique identifiers, which represent two additional fields; Version 3 adds extensions.
+ Version int64 `protobuf:"varint,15,opt,name=version,proto3" json:"version"`
+ // The authority key identifier extension provides a means of identifying the Public Key corresponding to the Private Key used to sign a certificate
+ AuthorityKeyIdentifier string `protobuf:"bytes,16,opt,name=authority_key_identifier,json=authorityKeyIdentifier,proto3" json:"authorityKeyIdentifier"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *SslCertificate) Reset() { *m = SslCertificate{} }
@@ -565,8 +610,11 @@ func (m *SslCertificate) GetAuthorityKeyIdentifier() string {
return ""
}
+// Represents the dates for which a certificate is valid
type CertificateDates struct {
- NotBefore int64 `protobuf:"varint,1,opt,name=not_before,json=notBefore,proto3" json:"notBefore"`
+ // The start date that for when the certificate is valid
+ NotBefore int64 `protobuf:"varint,1,opt,name=not_before,json=notBefore,proto3" json:"notBefore"`
+ // The end date that for when the certificate is valid
NotAfter int64 `protobuf:"varint,2,opt,name=not_after,json=notAfter,proto3" json:"notAfter"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -620,12 +668,19 @@ func (m *CertificateDates) GetNotAfter() int64 {
return 0
}
+// Represents a Distinguished Name (DN)
type CertificateName struct {
- CommonName string `protobuf:"bytes,1,opt,name=common_name,json=commonName,proto3" json:"commonName"`
- Country []string `protobuf:"bytes,2,rep,name=country,proto3" json:"country"`
- State []string `protobuf:"bytes,3,rep,name=state,proto3" json:"state"`
- Locality []string `protobuf:"bytes,4,rep,name=locality,proto3" json:"locality"`
- Organization []string `protobuf:"bytes,5,rep,name=organization,proto3" json:"organization"`
+ // The fully qualified domain name (e.g. www.example.com)
+ CommonName string `protobuf:"bytes,1,opt,name=common_name,json=commonName,proto3" json:"commonName"`
+ // Country
+ Country []string `protobuf:"bytes,2,rep,name=country,proto3" json:"country"`
+ // State
+ State []string `protobuf:"bytes,3,rep,name=state,proto3" json:"state"`
+ // Locality
+ Locality []string `protobuf:"bytes,4,rep,name=locality,proto3" json:"locality"`
+ // Organization
+ Organization []string `protobuf:"bytes,5,rep,name=organization,proto3" json:"organization"`
+ // Organizational Unit
OrganizationalUnit []string `protobuf:"bytes,6,rep,name=organizational_unit,json=organizationalUnit,proto3" json:"organizationalUnit"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -707,9 +762,13 @@ func (m *CertificateName) GetOrganizationalUnit() []string {
return nil
}
+// Represents a zipped file
type ZippedFile struct {
- Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents"`
- Checksum string `protobuf:"bytes,2,opt,name=checksum,proto3" json:"checksum"`
+ // The contents of the file in bytes
+ Contents []byte `protobuf:"bytes,1,opt,name=contents,proto3" json:"contents"`
+ // File checksum
+ Checksum string `protobuf:"bytes,2,opt,name=checksum,proto3" json:"checksum"`
+ // The directory where the file is located
RootDirectory string `protobuf:"bytes,3,opt,name=root_directory,json=rootDirectory,proto3" json:"root_directory"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common.proto
index fb01fb89a..092d4dad1 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common.proto
@@ -1,86 +1,146 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
import "gogo.proto";
import "google/protobuf/timestamp.proto";
-// Metadata timestamped info associating a client with a specific command message
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents the metadata for a message
message Metadata {
- google.protobuf.Timestamp timestamp = 1 [(gogoproto.jsontag) = "timestamp" ];
- string client_id = 2 [(gogoproto.jsontag) = "client_id" ];
- string message_id = 3 [(gogoproto.jsontag) = "message_id" ];
- string cloud_account_id = 4 [(gogoproto.jsontag) = "cloud_account_id" ];
+ // timestamp defines the time of message creation
+ google.protobuf.Timestamp timestamp = 1 [(gogoproto.jsontag) = "timestamp"];
+ // Client ID
+ string client_id = 2 [(gogoproto.jsontag) = "client_id"];
+ // Message ID
+ string message_id = 3 [(gogoproto.jsontag) = "message_id"];
+ // Cloud Account ID (e.g. AWS/Azure/GCP account ID)
+ string cloud_account_id = 4 [(gogoproto.jsontag) = "cloud_account_id"];
}
+// Represents a map of directories & files on the system
message DirectoryMap {
+ // List of directories
repeated Directory directories = 1;
}
+// Represents a file
message File {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- int32 lines = 2 [(gogoproto.jsontag) = "lines" ];
- google.protobuf.Timestamp mtime = 3 [(gogoproto.jsontag) = "mtime" ];
- string permissions = 4 [(gogoproto.jsontag) = "permissions" ];
- int64 size = 5 [(gogoproto.jsontag) = "size" ];
- bytes contents = 6 [(gogoproto.jsontag) = "contents" ];
+ // Name of the file
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Number of lines in the file
+ int32 lines = 2 [(gogoproto.jsontag) = "lines"];
+ // When the file was last modified
+ google.protobuf.Timestamp mtime = 3 [(gogoproto.jsontag) = "mtime"];
+ // File permissions (e.g. 0644)
+ string permissions = 4 [(gogoproto.jsontag) = "permissions"];
+ // Size of the file in bytes
+ int64 size = 5 [(gogoproto.jsontag) = "size"];
+ // The contents of the file in bytes
+ bytes contents = 6 [(gogoproto.jsontag) = "contents"];
+ // Action enum
enum Action {
+ // Default value
unset = 0;
+ // No changes to the file
unchanged = 1;
+ // New file
add = 2;
+ // Updated file
update = 3;
+ // File deleted
delete = 4;
}
+ // Action to take on the file (e.g. update, delete, etc)
Action action = 7;
}
+// Represents a directory
message Directory {
+ // Name of the directory
string name = 1;
+ // When the directory was last modified
google.protobuf.Timestamp mtime = 2;
+ // Directory permissions (e.g. 0644)
string permissions = 3;
+ // Size of the directory in bytes
int64 size = 4;
+ // List of files in the directory
repeated File files = 5;
}
+// Represents a list of SSL certificates files
message SslCertificates {
+ // List of SSL certificates
repeated SslCertificate ssl_certs = 1;
}
+// Represents a SSL certificate file
message SslCertificate {
- string file_name = 1 [(gogoproto.jsontag) = "fileName" ];
- int64 size = 2 [(gogoproto.jsontag) = "size" ];
- google.protobuf.Timestamp mtime = 3 [(gogoproto.jsontag) = "mtime" ];
- CertificateDates validity = 4 [(gogoproto.jsontag) = "validity" ];
- CertificateName issuer = 5 [(gogoproto.jsontag) = "issuer" ];
- CertificateName subject = 6 [(gogoproto.jsontag) = "subject" ];
- repeated string subj_alt_names = 7 [(gogoproto.jsontag) = "subjectAltName" ];
- repeated string ocsp_url = 8 [(gogoproto.jsontag) = "ocspURL" ];
- string public_key_algorithm = 9 [(gogoproto.jsontag) = "publicKeyAlgorithm" ];
- string signature_algorithm = 10 [(gogoproto.jsontag) = "signatureAlgorithm" ];
- string serial_number = 11 [(gogoproto.jsontag) = "serialNumber" ];
- string subject_key_identifier = 12 [(gogoproto.jsontag) = "subjectKeyIdentifier" ];
- string fingerprint = 13 [(gogoproto.jsontag) = "fingerprint" ];
- string fingerprint_algorithm = 14 [(gogoproto.jsontag) = "fingerprintAlgorithm" ];
- int64 version = 15 [(gogoproto.jsontag) = "version" ];
- string authority_key_identifier = 16 [(gogoproto.jsontag) = "authorityKeyIdentifier" ];
+ // Name of the file
+ string file_name = 1 [(gogoproto.jsontag) = "fileName"];
+ // Size of the file in bytes
+ int64 size = 2 [(gogoproto.jsontag) = "size"];
+ // When the file was last modified
+ google.protobuf.Timestamp mtime = 3 [(gogoproto.jsontag) = "mtime"];
+ // A time when the certificate is valid
+ CertificateDates validity = 4 [(gogoproto.jsontag) = "validity"];
+ // This field contains the distinguished name (DN) of the certificate issuer
+ CertificateName issuer = 5 [(gogoproto.jsontag) = "issuer"];
+ // This dedicated object name associated with the public key, for which the certificate is issued
+ CertificateName subject = 6 [(gogoproto.jsontag) = "subject"];
+ // Subject alternative names that allows users to specify additional host names for the SSL certificate
+ repeated string subj_alt_names = 7 [(gogoproto.jsontag) = "subjectAltName"];
+ // Online Certificate Status Protocol URL
+ repeated string ocsp_url = 8 [(gogoproto.jsontag) = "ocspURL"];
+ // Public key encryption algorithm (e.g. RSA)
+ string public_key_algorithm = 9 [(gogoproto.jsontag) = "publicKeyAlgorithm"];
+ // The signature algorithm contain a hashing algorithm and an encryption algorithm (e.g. sha256RSA where sha256 is the hashing algorithm and RSA is the encryption algorithm)
+ string signature_algorithm = 10 [(gogoproto.jsontag) = "signatureAlgorithm"];
+ // Used to uniquely identify the certificate within a CA's systems
+ string serial_number = 11 [(gogoproto.jsontag) = "serialNumber"];
+ // The subject key identifier extension provides a means of identifying certificates that contain a particular public key
+ string subject_key_identifier = 12 [(gogoproto.jsontag) = "subjectKeyIdentifier"];
+ // SSL certificate fingerprint
+ string fingerprint = 13 [(gogoproto.jsontag) = "fingerprint"];
+ // SSL certificate fingerprint algorithm
+ string fingerprint_algorithm = 14 [(gogoproto.jsontag) = "fingerprintAlgorithm"];
+ // There are three versions of certificates: 1, 2 and 3, numbered as 0, 1 and 2. Version 1 supports only the basic fields; Version 2 adds unique identifiers, which represent two additional fields; Version 3 adds extensions.
+ int64 version = 15 [(gogoproto.jsontag) = "version"];
+ // The authority key identifier extension provides a means of identifying the Public Key corresponding to the Private Key used to sign a certificate
+ string authority_key_identifier = 16 [(gogoproto.jsontag) = "authorityKeyIdentifier"];
}
+// Represents the dates for which a certificate is valid
message CertificateDates {
- int64 not_before = 1 [(gogoproto.jsontag) = "notBefore" ];
- int64 not_after = 2 [(gogoproto.jsontag) = "notAfter" ];
+ // The start date that for when the certificate is valid
+ int64 not_before = 1 [(gogoproto.jsontag) = "notBefore"];
+ // The end date that for when the certificate is valid
+ int64 not_after = 2 [(gogoproto.jsontag) = "notAfter"];
}
+// Represents a Distinguished Name (DN)
message CertificateName {
- string common_name = 1 [(gogoproto.jsontag) = "commonName" ];
- repeated string country = 2 [(gogoproto.jsontag) = "country" ];
- repeated string state = 3 [(gogoproto.jsontag) = "state" ];
- repeated string locality = 4 [(gogoproto.jsontag) = "locality" ];
- repeated string organization = 5 [(gogoproto.jsontag) = "organization" ];
- repeated string organizational_unit = 6 [(gogoproto.jsontag) = "organizationalUnit" ];
+ // The fully qualified domain name (e.g. www.example.com)
+ string common_name = 1 [(gogoproto.jsontag) = "commonName"];
+ // Country
+ repeated string country = 2 [(gogoproto.jsontag) = "country"];
+ // State
+ repeated string state = 3 [(gogoproto.jsontag) = "state"];
+ // Locality
+ repeated string locality = 4 [(gogoproto.jsontag) = "locality"];
+ // Organization
+ repeated string organization = 5 [(gogoproto.jsontag) = "organization"];
+ // Organizational Unit
+ repeated string organizational_unit = 6 [(gogoproto.jsontag) = "organizationalUnit"];
}
+// Represents a zipped file
message ZippedFile {
- bytes contents = 1 [(gogoproto.jsontag) = "contents" ];
- string checksum = 2 [(gogoproto.jsontag) = "checksum" ];
- string root_directory = 3 [(gogoproto.jsontag) = "root_directory" ];
+ // The contents of the file in bytes
+ bytes contents = 1 [(gogoproto.jsontag) = "contents"];
+ // File checksum
+ string checksum = 2 [(gogoproto.jsontag) = "checksum"];
+ // The directory where the file is located
+ string root_directory = 3 [(gogoproto.jsontag) = "root_directory"];
}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common/common.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common/common.pb.go
index 5b8bfdda9..74c563d70 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common/common.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common/common.pb.go
@@ -23,8 +23,11 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Represents a dimension used in events
type Dimension struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Dimension name
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Dimension value
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common/common.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common/common.proto
index 710d56d24..a85e2bcff 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common/common.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/common/common.proto
@@ -1,11 +1,15 @@
+// Common messages
syntax = "proto3";
package f5.nginx.agent.sdk.common;
-option go_package = "github.com/nginx/agent/sdk/v2/proto/common;f5.nginx.agent.sdk.common";
import "gogo.proto";
+option go_package = "github.com/nginx/agent/sdk/v2/proto/common;f5.nginx.agent.sdk.common";
+
+// Represents a dimension used in events
message Dimension {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- string value = 2 [(gogoproto.jsontag) = "value" ];
+ // Dimension name
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Dimension value
+ string value = 2 [(gogoproto.jsontag) = "value"];
}
-
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/config.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/config.pb.go
index 821e8b96f..e7bdcb53c 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/config.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/config.pb.go
@@ -23,8 +23,11 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Represents a config report
type ConfigReport struct {
- Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
+ // Provides metadata information associated with the message
+ Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
+ // List of NGINX config descriptors
Configs []*ConfigDescriptor `protobuf:"bytes,2,rep,name=configs,proto3" json:"configs"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -78,9 +81,13 @@ func (m *ConfigReport) GetConfigs() []*ConfigDescriptor {
return nil
}
+// Represents a config descriptor
type ConfigDescriptor struct {
- SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
- NginxId string `protobuf:"bytes,2,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
+ // System ID
+ SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
+ // NGINX ID
+ NginxId string `protobuf:"bytes,2,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
+ // Config file checksum
Checksum string `protobuf:"bytes,3,opt,name=checksum,proto3" json:"checksum"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -152,23 +159,23 @@ var fileDescriptor_3eaf2c85e69e9ea4 = []byte{
// 298 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0xe2, 0x49, 0xce, 0xcf, 0x4b,
0xcb, 0x4c, 0xd7, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4a, 0x33, 0xd5, 0xcb, 0x4b, 0xcf,
- 0xcc, 0xab, 0xd0, 0x4b, 0x4c, 0x4f, 0xcd, 0x2b, 0xd1, 0x2b, 0x4e, 0xc9, 0x96, 0xe2, 0x4a, 0xcf,
- 0x4f, 0xcf, 0x87, 0xc8, 0x4b, 0xf1, 0x24, 0xe7, 0xe7, 0xe6, 0xe6, 0xe7, 0x41, 0x78, 0x4a, 0xd3,
- 0x19, 0xb9, 0x78, 0x9c, 0xc1, 0xda, 0x83, 0x52, 0x0b, 0xf2, 0x8b, 0x4a, 0x84, 0xac, 0xb8, 0x58,
- 0x72, 0x53, 0x4b, 0x12, 0x25, 0x18, 0x15, 0x18, 0x35, 0xb8, 0x8d, 0x64, 0xf4, 0x30, 0x4d, 0xd3,
- 0xf3, 0x4d, 0x2d, 0x49, 0x4c, 0x49, 0x2c, 0x49, 0x74, 0xe2, 0x78, 0x75, 0x4f, 0x1e, 0xac, 0x3a,
- 0x08, 0x4c, 0x0a, 0x79, 0x73, 0xb1, 0x43, 0x9c, 0x52, 0x2c, 0xc1, 0xa4, 0xc0, 0xac, 0xc1, 0x6d,
- 0xa4, 0x82, 0x4d, 0x3b, 0xc4, 0x3a, 0x97, 0xd4, 0xe2, 0xe4, 0xa2, 0xcc, 0x82, 0x92, 0xfc, 0x22,
- 0x27, 0xee, 0x57, 0xf7, 0xe4, 0x61, 0x1a, 0x83, 0x60, 0x0c, 0xa5, 0x89, 0x8c, 0x5c, 0x02, 0xe8,
- 0x4a, 0x85, 0xb4, 0xb8, 0x38, 0x8b, 0x2b, 0x8b, 0x4b, 0x52, 0x73, 0xe3, 0x33, 0x53, 0xc0, 0x4e,
- 0xe4, 0x74, 0xe2, 0x7d, 0x75, 0x4f, 0x1e, 0x21, 0x18, 0xc4, 0x01, 0x61, 0x7a, 0xa6, 0x08, 0xa9,
- 0x73, 0x71, 0x80, 0xad, 0x06, 0x29, 0x65, 0x02, 0x2b, 0xe5, 0x79, 0x75, 0x4f, 0x1e, 0x2e, 0x16,
- 0xc4, 0x0e, 0x66, 0x79, 0xa6, 0x08, 0x69, 0x70, 0x71, 0x24, 0x67, 0xa4, 0x26, 0x67, 0x17, 0x97,
- 0xe6, 0x4a, 0x30, 0x23, 0x14, 0xc2, 0xc4, 0x82, 0xe0, 0x2c, 0x27, 0xf3, 0x13, 0x8f, 0xe4, 0x18,
- 0x2f, 0x3c, 0x92, 0x63, 0x7c, 0xf0, 0x48, 0x8e, 0x31, 0x4a, 0x33, 0x3d, 0xb3, 0x24, 0xa3, 0x34,
- 0x49, 0x2f, 0x39, 0x3f, 0x57, 0x1f, 0x6c, 0x96, 0x3e, 0xd8, 0x93, 0xfa, 0xc5, 0x29, 0xd9, 0xfa,
- 0x65, 0x46, 0xfa, 0xe0, 0x00, 0xb6, 0x06, 0x93, 0x49, 0x6c, 0x60, 0xca, 0x18, 0x10, 0x00, 0x00,
- 0xff, 0xff, 0x2e, 0xd1, 0x9b, 0xd3, 0xab, 0x01, 0x00, 0x00,
+ 0xcc, 0xab, 0xd0, 0x4b, 0x4c, 0x4f, 0xcd, 0x2b, 0xd1, 0x2b, 0x4e, 0xc9, 0x96, 0xe2, 0x49, 0xce,
+ 0xcf, 0xcd, 0xcd, 0xcf, 0x83, 0xa8, 0x90, 0xe2, 0x4a, 0xcf, 0x4f, 0xcf, 0x87, 0xb0, 0x95, 0xa6,
+ 0x33, 0x72, 0xf1, 0x38, 0x83, 0xb5, 0x07, 0xa5, 0x16, 0xe4, 0x17, 0x95, 0x08, 0x59, 0x71, 0xb1,
+ 0xe4, 0xa6, 0x96, 0x24, 0x4a, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x1b, 0xc9, 0xe8, 0x61, 0x9a, 0xa6,
+ 0xe7, 0x9b, 0x5a, 0x92, 0x98, 0x92, 0x58, 0x92, 0xe8, 0xc4, 0xf1, 0xea, 0x9e, 0x3c, 0x58, 0x75,
+ 0x10, 0x98, 0x14, 0xf2, 0xe6, 0x62, 0x87, 0x38, 0xa5, 0x58, 0x82, 0x49, 0x81, 0x59, 0x83, 0xdb,
+ 0x48, 0x05, 0x9b, 0x76, 0x88, 0x75, 0x2e, 0xa9, 0xc5, 0xc9, 0x45, 0x99, 0x05, 0x25, 0xf9, 0x45,
+ 0x4e, 0xdc, 0xaf, 0xee, 0xc9, 0xc3, 0x34, 0x06, 0xc1, 0x18, 0x4a, 0x13, 0x19, 0xb9, 0x04, 0xd0,
+ 0x95, 0x0a, 0x69, 0x71, 0x71, 0x16, 0x57, 0x16, 0x97, 0xa4, 0xe6, 0xc6, 0x67, 0xa6, 0x80, 0x9d,
+ 0xc8, 0xe9, 0xc4, 0xfb, 0xea, 0x9e, 0x3c, 0x42, 0x30, 0x88, 0x03, 0xc2, 0xf4, 0x4c, 0x11, 0x52,
+ 0xe7, 0xe2, 0x00, 0x5b, 0x0d, 0x52, 0xca, 0x04, 0x56, 0xca, 0xf3, 0xea, 0x9e, 0x3c, 0x5c, 0x2c,
+ 0x88, 0x1d, 0xcc, 0xf2, 0x4c, 0x11, 0xd2, 0xe0, 0xe2, 0x48, 0xce, 0x48, 0x4d, 0xce, 0x2e, 0x2e,
+ 0xcd, 0x95, 0x60, 0x46, 0x28, 0x84, 0x89, 0x05, 0xc1, 0x59, 0x4e, 0xe6, 0x27, 0x1e, 0xc9, 0x31,
+ 0x5e, 0x78, 0x24, 0xc7, 0xf8, 0xe0, 0x91, 0x1c, 0x63, 0x94, 0x66, 0x7a, 0x66, 0x49, 0x46, 0x69,
+ 0x92, 0x5e, 0x72, 0x7e, 0xae, 0x3e, 0xd8, 0x2c, 0x7d, 0xb0, 0x27, 0xf5, 0x8b, 0x53, 0xb2, 0xf5,
+ 0xcb, 0x8c, 0xf4, 0xc1, 0x01, 0x6c, 0x0d, 0x26, 0x93, 0xd8, 0xc0, 0x94, 0x31, 0x20, 0x00, 0x00,
+ 0xff, 0xff, 0x53, 0x4a, 0x06, 0x93, 0xab, 0x01, 0x00, 0x00,
}
func (m *ConfigReport) Marshal() (dAtA []byte, err error) {
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/config.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/config.proto
index adc8d5003..d44386e6d 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/config.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/config.proto
@@ -1,17 +1,25 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-import "gogo.proto";
import "common.proto";
+import "gogo.proto";
+
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+// Represents a config report
message ConfigReport {
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- repeated ConfigDescriptor configs = 2 [(gogoproto.jsontag) = "configs" ];
+ // Provides metadata information associated with the message
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // List of NGINX config descriptors
+ repeated ConfigDescriptor configs = 2 [(gogoproto.jsontag) = "configs"];
}
+// Represents a config descriptor
message ConfigDescriptor {
- string system_id = 1 [(gogoproto.jsontag) = "system_id" ];
- string nginx_id = 2 [(gogoproto.jsontag) = "nginx_id" ];
- string checksum = 3 [(gogoproto.jsontag) = "checksum" ];
+ // System ID
+ string system_id = 1 [(gogoproto.jsontag) = "system_id"];
+ // NGINX ID
+ string nginx_id = 2 [(gogoproto.jsontag) = "nginx_id"];
+ // Config file checksum
+ string checksum = 3 [(gogoproto.jsontag) = "checksum"];
}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dp_software_details.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dp_software_details.pb.go
index a30ec906d..c3628b516 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dp_software_details.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dp_software_details.pb.go
@@ -23,8 +23,7 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
-// DataplaneSoftwareDetails contains details for additional software running on the dataplane that pertains
-// to NGINX Agent
+// Represents dataplane software details which contains details for additional software running on the dataplane that pertains to NGINX Agent
type DataplaneSoftwareDetails struct {
// Types that are valid to be assigned to Data:
// *DataplaneSoftwareDetails_AppProtectWafDetails
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dp_software_details.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dp_software_details.proto
index 4d9a20771..891a57266 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dp_software_details.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dp_software_details.proto
@@ -1,16 +1,18 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
import "gogo.proto";
import "nap.proto";
import "nginx.proto";
-// DataplaneSoftwareDetails contains details for additional software running on the dataplane that pertains
-// to NGINX Agent
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents dataplane software details which contains details for additional software running on the dataplane that pertains to NGINX Agent
message DataplaneSoftwareDetails {
- oneof data {
- AppProtectWAFDetails app_protect_waf_details = 1 [(gogoproto.jsontag) = "app_protect_waf_details"];
- NginxDetails nginx_details = 2 [(gogoproto.jsontag) = "nginx_details"];
- }
+ oneof data {
+ // App Protect WAF software details
+ AppProtectWAFDetails app_protect_waf_details = 1 [(gogoproto.jsontag) = "app_protect_waf_details"];
+ // NGINX software details
+ NginxDetails nginx_details = 2 [(gogoproto.jsontag) = "nginx_details"];
+ }
}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dpenv.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dpenv.pb.go
deleted file mode 100644
index 847e0772e..000000000
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dpenv.pb.go
+++ /dev/null
@@ -1,1121 +0,0 @@
-// Code generated by protoc-gen-gogo. DO NOT EDIT.
-// source: dpenv.proto
-
-package proto
-
-import (
- encoding_binary "encoding/binary"
- fmt "fmt"
- _ "github.com/gogo/protobuf/gogoproto"
- proto "github.com/gogo/protobuf/proto"
- io "io"
- math "math"
- math_bits "math/bits"
-)
-
-// 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.GoGoProtoPackageIsVersion3 // please upgrade the proto package
-
-type EnvReport_Type int32
-
-const (
- EnvReport_SYSTEM EnvReport_Type = 0
- EnvReport_INSTANCE EnvReport_Type = 1
- EnvReport_AGENT EnvReport_Type = 2
-)
-
-var EnvReport_Type_name = map[int32]string{
- 0: "SYSTEM",
- 1: "INSTANCE",
- 2: "AGENT",
-}
-
-var EnvReport_Type_value = map[string]int32{
- "SYSTEM": 0,
- "INSTANCE": 1,
- "AGENT": 2,
-}
-
-func (x EnvReport_Type) String() string {
- return proto.EnumName(EnvReport_Type_name, int32(x))
-}
-
-func (EnvReport_Type) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_a2ec482b9ece7397, []int{0, 0}
-}
-
-// MetasReport a report containing status entities for a specific metric type
-type EnvReport struct {
- Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- Type EnvReport_Type `protobuf:"varint,2,opt,name=type,proto3,enum=f5.nginx.agent.sdk.EnvReport_Type" json:"type"`
- PropertySets []*EnvPropertySet `protobuf:"bytes,3,rep,name=property_sets,json=propertySets,proto3" json:"property_sets"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *EnvReport) Reset() { *m = EnvReport{} }
-func (m *EnvReport) String() string { return proto.CompactTextString(m) }
-func (*EnvReport) ProtoMessage() {}
-func (*EnvReport) Descriptor() ([]byte, []int) {
- return fileDescriptor_a2ec482b9ece7397, []int{0}
-}
-func (m *EnvReport) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *EnvReport) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_EnvReport.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *EnvReport) XXX_Merge(src proto.Message) {
- xxx_messageInfo_EnvReport.Merge(m, src)
-}
-func (m *EnvReport) XXX_Size() int {
- return m.Size()
-}
-func (m *EnvReport) XXX_DiscardUnknown() {
- xxx_messageInfo_EnvReport.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_EnvReport proto.InternalMessageInfo
-
-func (m *EnvReport) GetMeta() *Metadata {
- if m != nil {
- return m.Meta
- }
- return nil
-}
-
-func (m *EnvReport) GetType() EnvReport_Type {
- if m != nil {
- return m.Type
- }
- return EnvReport_SYSTEM
-}
-
-func (m *EnvReport) GetPropertySets() []*EnvPropertySet {
- if m != nil {
- return m.PropertySets
- }
- return nil
-}
-
-// EnvPropety - a container for a Dataplane Environment property.
-type EnvProperty struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
- // Types that are valid to be assigned to Value:
- // *EnvProperty_Ival
- // *EnvProperty_Dval
- // *EnvProperty_Sval
- Value isEnvProperty_Value `protobuf_oneof:"value"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *EnvProperty) Reset() { *m = EnvProperty{} }
-func (m *EnvProperty) String() string { return proto.CompactTextString(m) }
-func (*EnvProperty) ProtoMessage() {}
-func (*EnvProperty) Descriptor() ([]byte, []int) {
- return fileDescriptor_a2ec482b9ece7397, []int{1}
-}
-func (m *EnvProperty) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *EnvProperty) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_EnvProperty.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *EnvProperty) XXX_Merge(src proto.Message) {
- xxx_messageInfo_EnvProperty.Merge(m, src)
-}
-func (m *EnvProperty) XXX_Size() int {
- return m.Size()
-}
-func (m *EnvProperty) XXX_DiscardUnknown() {
- xxx_messageInfo_EnvProperty.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_EnvProperty proto.InternalMessageInfo
-
-type isEnvProperty_Value interface {
- isEnvProperty_Value()
- MarshalTo([]byte) (int, error)
- Size() int
-}
-
-type EnvProperty_Ival struct {
- Ival int64 `protobuf:"varint,10,opt,name=ival,proto3,oneof" json:"ival"`
-}
-type EnvProperty_Dval struct {
- Dval float64 `protobuf:"fixed64,11,opt,name=dval,proto3,oneof" json:"dval"`
-}
-type EnvProperty_Sval struct {
- Sval string `protobuf:"bytes,12,opt,name=sval,proto3,oneof" json:"sval"`
-}
-
-func (*EnvProperty_Ival) isEnvProperty_Value() {}
-func (*EnvProperty_Dval) isEnvProperty_Value() {}
-func (*EnvProperty_Sval) isEnvProperty_Value() {}
-
-func (m *EnvProperty) GetValue() isEnvProperty_Value {
- if m != nil {
- return m.Value
- }
- return nil
-}
-
-func (m *EnvProperty) GetName() string {
- if m != nil {
- return m.Name
- }
- return ""
-}
-
-func (m *EnvProperty) GetIval() int64 {
- if x, ok := m.GetValue().(*EnvProperty_Ival); ok {
- return x.Ival
- }
- return 0
-}
-
-func (m *EnvProperty) GetDval() float64 {
- if x, ok := m.GetValue().(*EnvProperty_Dval); ok {
- return x.Dval
- }
- return 0
-}
-
-func (m *EnvProperty) GetSval() string {
- if x, ok := m.GetValue().(*EnvProperty_Sval); ok {
- return x.Sval
- }
- return ""
-}
-
-// XXX_OneofWrappers is for the internal use of the proto package.
-func (*EnvProperty) XXX_OneofWrappers() []interface{} {
- return []interface{}{
- (*EnvProperty_Ival)(nil),
- (*EnvProperty_Dval)(nil),
- (*EnvProperty_Sval)(nil),
- }
-}
-
-type EnvPropertySet struct {
- Dimensions []*Dimension `protobuf:"bytes,1,rep,name=dimensions,proto3" json:"dimensions"`
- Properties []*EnvProperty `protobuf:"bytes,2,rep,name=properties,proto3" json:"properties"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *EnvPropertySet) Reset() { *m = EnvPropertySet{} }
-func (m *EnvPropertySet) String() string { return proto.CompactTextString(m) }
-func (*EnvPropertySet) ProtoMessage() {}
-func (*EnvPropertySet) Descriptor() ([]byte, []int) {
- return fileDescriptor_a2ec482b9ece7397, []int{2}
-}
-func (m *EnvPropertySet) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *EnvPropertySet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_EnvPropertySet.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *EnvPropertySet) XXX_Merge(src proto.Message) {
- xxx_messageInfo_EnvPropertySet.Merge(m, src)
-}
-func (m *EnvPropertySet) XXX_Size() int {
- return m.Size()
-}
-func (m *EnvPropertySet) XXX_DiscardUnknown() {
- xxx_messageInfo_EnvPropertySet.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_EnvPropertySet proto.InternalMessageInfo
-
-func (m *EnvPropertySet) GetDimensions() []*Dimension {
- if m != nil {
- return m.Dimensions
- }
- return nil
-}
-
-func (m *EnvPropertySet) GetProperties() []*EnvProperty {
- if m != nil {
- return m.Properties
- }
- return nil
-}
-
-func init() {
- proto.RegisterEnum("f5.nginx.agent.sdk.EnvReport_Type", EnvReport_Type_name, EnvReport_Type_value)
- proto.RegisterType((*EnvReport)(nil), "f5.nginx.agent.sdk.EnvReport")
- proto.RegisterType((*EnvProperty)(nil), "f5.nginx.agent.sdk.EnvProperty")
- proto.RegisterType((*EnvPropertySet)(nil), "f5.nginx.agent.sdk.EnvPropertySet")
-}
-
-func init() { proto.RegisterFile("dpenv.proto", fileDescriptor_a2ec482b9ece7397) }
-
-var fileDescriptor_a2ec482b9ece7397 = []byte{
- // 441 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xc1, 0x6e, 0xd3, 0x40,
- 0x10, 0x86, 0xbb, 0x89, 0x5b, 0x9a, 0x71, 0x1a, 0x85, 0x3d, 0x59, 0x55, 0x49, 0x2c, 0x9f, 0x8c,
- 0x90, 0x6c, 0x29, 0x08, 0x21, 0xc1, 0x85, 0x1a, 0x22, 0xe0, 0x90, 0x80, 0x9c, 0x5c, 0xe8, 0x05,
- 0x6d, 0xb3, 0x8b, 0xb1, 0x5a, 0xef, 0xae, 0xbc, 0x5b, 0x8b, 0xbc, 0x06, 0xe2, 0x41, 0x78, 0x0c,
- 0x8e, 0x3c, 0x41, 0x84, 0x72, 0xcc, 0x53, 0xa0, 0x5d, 0x1b, 0x92, 0x8a, 0xa0, 0x5e, 0x66, 0x76,
- 0xf4, 0xcd, 0xff, 0x4f, 0xf2, 0xcb, 0xe0, 0x52, 0xc9, 0x78, 0x15, 0xc9, 0x52, 0x68, 0x81, 0xf1,
- 0xa7, 0x27, 0x11, 0xcf, 0x72, 0xfe, 0x25, 0x22, 0x19, 0xe3, 0x3a, 0x52, 0xf4, 0xea, 0x14, 0x32,
- 0x91, 0x89, 0x9a, 0x9f, 0x76, 0x17, 0xa2, 0x28, 0x04, 0x6f, 0xa6, 0x93, 0x82, 0xe9, 0x32, 0x5f,
- 0xa8, 0x7a, 0x0c, 0xbe, 0xb6, 0xa0, 0x33, 0xe6, 0x55, 0xca, 0xa4, 0x28, 0x35, 0x7e, 0x06, 0x4e,
- 0xc1, 0x34, 0xf1, 0x90, 0x8f, 0x42, 0x77, 0x74, 0x16, 0xfd, 0xeb, 0x1c, 0x4d, 0x98, 0x26, 0x94,
- 0x68, 0x92, 0x1c, 0x6f, 0x56, 0x43, 0xbb, 0x9d, 0xda, 0x8a, 0x5f, 0x80, 0xa3, 0x97, 0x92, 0x79,
- 0x2d, 0x1f, 0x85, 0xbd, 0x51, 0xb0, 0x4f, 0xfb, 0xf7, 0x50, 0x34, 0x5f, 0x4a, 0x56, 0x3b, 0x18,
- 0x4d, 0x6a, 0x2b, 0xbe, 0x80, 0x13, 0x59, 0x0a, 0xc9, 0x4a, 0xbd, 0xfc, 0xa8, 0x98, 0x56, 0x5e,
- 0xdb, 0x6f, 0x87, 0xee, 0x7f, 0xad, 0xde, 0x37, 0xbb, 0x33, 0xa6, 0x93, 0xfb, 0x9b, 0xd5, 0xf0,
- 0xb6, 0x38, 0xed, 0xca, 0x2d, 0x57, 0xc1, 0x23, 0x70, 0xcc, 0x4d, 0x0c, 0x70, 0x34, 0xfb, 0x30,
- 0x9b, 0x8f, 0x27, 0xfd, 0x03, 0xdc, 0x85, 0xe3, 0xb7, 0xd3, 0xd9, 0xfc, 0x7c, 0xfa, 0x72, 0xdc,
- 0x47, 0xb8, 0x03, 0x87, 0xe7, 0xaf, 0xc7, 0xd3, 0x79, 0xbf, 0x15, 0x7c, 0x43, 0xe0, 0xee, 0x1c,
- 0xc0, 0x67, 0xe0, 0x70, 0x52, 0x30, 0x1b, 0x4b, 0xa7, 0xfe, 0xd9, 0x66, 0x4e, 0x6d, 0xc5, 0x03,
- 0x70, 0xf2, 0x8a, 0x5c, 0x7b, 0xe0, 0xa3, 0xb0, 0x5d, 0x53, 0x33, 0xbf, 0x39, 0x48, 0x6d, 0x37,
- 0x9c, 0x1a, 0xee, 0xfa, 0x28, 0x44, 0x35, 0xa7, 0x0d, 0xa7, 0x0d, 0x57, 0x86, 0x77, 0xb7, 0xee,
- 0xaa, 0xe1, 0xa6, 0x27, 0xf7, 0xe0, 0xb0, 0x22, 0xd7, 0x37, 0x2c, 0xf8, 0x8e, 0xa0, 0x77, 0xfb,
- 0x7f, 0xe3, 0x09, 0x00, 0xcd, 0x0b, 0xc6, 0x55, 0x2e, 0xb8, 0xf2, 0x90, 0xcd, 0xeb, 0xc1, 0xbe,
- 0xbc, 0x5e, 0xfd, 0xd9, 0x4a, 0x7a, 0x9b, 0xd5, 0x70, 0x47, 0x94, 0xee, 0xbc, 0xf1, 0x3b, 0x80,
- 0x26, 0xb5, 0x9c, 0x29, 0xaf, 0x65, 0xed, 0x86, 0x77, 0xc4, 0x5f, 0x1b, 0x6e, 0x65, 0xe9, 0xce,
- 0x3b, 0x79, 0xfa, 0x63, 0x3d, 0x40, 0x3f, 0xd7, 0x03, 0xf4, 0x6b, 0x3d, 0x40, 0x17, 0x0f, 0xb3,
- 0x5c, 0x7f, 0xbe, 0xb9, 0x8c, 0x16, 0xa2, 0x88, 0xad, 0x63, 0x6c, 0x1d, 0x63, 0x45, 0xaf, 0xe2,
- 0x6a, 0x14, 0xdb, 0x2f, 0xf2, 0xb9, 0xad, 0x97, 0x47, 0xb6, 0x3d, 0xfe, 0x1d, 0x00, 0x00, 0xff,
- 0xff, 0xc5, 0xd7, 0xbe, 0xea, 0xea, 0x02, 0x00, 0x00,
-}
-
-func (m *EnvReport) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *EnvReport) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvReport) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if len(m.PropertySets) > 0 {
- for iNdEx := len(m.PropertySets) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.PropertySets[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintDpenv(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x1a
- }
- }
- if m.Type != 0 {
- i = encodeVarintDpenv(dAtA, i, uint64(m.Type))
- i--
- dAtA[i] = 0x10
- }
- if m.Meta != nil {
- {
- size, err := m.Meta.MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintDpenv(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *EnvProperty) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *EnvProperty) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvProperty) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if m.Value != nil {
- {
- size := m.Value.Size()
- i -= size
- if _, err := m.Value.MarshalTo(dAtA[i:]); err != nil {
- return 0, err
- }
- }
- }
- if len(m.Name) > 0 {
- i -= len(m.Name)
- copy(dAtA[i:], m.Name)
- i = encodeVarintDpenv(dAtA, i, uint64(len(m.Name)))
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
-}
-
-func (m *EnvProperty_Ival) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvProperty_Ival) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- i = encodeVarintDpenv(dAtA, i, uint64(m.Ival))
- i--
- dAtA[i] = 0x50
- return len(dAtA) - i, nil
-}
-func (m *EnvProperty_Dval) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvProperty_Dval) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- i -= 8
- encoding_binary.LittleEndian.PutUint64(dAtA[i:], uint64(math.Float64bits(float64(m.Dval))))
- i--
- dAtA[i] = 0x59
- return len(dAtA) - i, nil
-}
-func (m *EnvProperty_Sval) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvProperty_Sval) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- i -= len(m.Sval)
- copy(dAtA[i:], m.Sval)
- i = encodeVarintDpenv(dAtA, i, uint64(len(m.Sval)))
- i--
- dAtA[i] = 0x62
- return len(dAtA) - i, nil
-}
-func (m *EnvPropertySet) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *EnvPropertySet) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *EnvPropertySet) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if len(m.Properties) > 0 {
- for iNdEx := len(m.Properties) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Properties[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintDpenv(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0x12
- }
- }
- if len(m.Dimensions) > 0 {
- for iNdEx := len(m.Dimensions) - 1; iNdEx >= 0; iNdEx-- {
- {
- size, err := m.Dimensions[iNdEx].MarshalToSizedBuffer(dAtA[:i])
- if err != nil {
- return 0, err
- }
- i -= size
- i = encodeVarintDpenv(dAtA, i, uint64(size))
- }
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func encodeVarintDpenv(dAtA []byte, offset int, v uint64) int {
- offset -= sovDpenv(v)
- base := offset
- for v >= 1<<7 {
- dAtA[offset] = uint8(v&0x7f | 0x80)
- v >>= 7
- offset++
- }
- dAtA[offset] = uint8(v)
- return base
-}
-func (m *EnvReport) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if m.Meta != nil {
- l = m.Meta.Size()
- n += 1 + l + sovDpenv(uint64(l))
- }
- if m.Type != 0 {
- n += 1 + sovDpenv(uint64(m.Type))
- }
- if len(m.PropertySets) > 0 {
- for _, e := range m.PropertySets {
- l = e.Size()
- n += 1 + l + sovDpenv(uint64(l))
- }
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
-}
-
-func (m *EnvProperty) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Name)
- if l > 0 {
- n += 1 + l + sovDpenv(uint64(l))
- }
- if m.Value != nil {
- n += m.Value.Size()
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
-}
-
-func (m *EnvProperty_Ival) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- n += 1 + sovDpenv(uint64(m.Ival))
- return n
-}
-func (m *EnvProperty_Dval) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- n += 9
- return n
-}
-func (m *EnvProperty_Sval) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Sval)
- n += 1 + l + sovDpenv(uint64(l))
- return n
-}
-func (m *EnvPropertySet) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Dimensions) > 0 {
- for _, e := range m.Dimensions {
- l = e.Size()
- n += 1 + l + sovDpenv(uint64(l))
- }
- }
- if len(m.Properties) > 0 {
- for _, e := range m.Properties {
- l = e.Size()
- n += 1 + l + sovDpenv(uint64(l))
- }
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
-}
-
-func sovDpenv(x uint64) (n int) {
- return (math_bits.Len64(x|1) + 6) / 7
-}
-func sozDpenv(x uint64) (n int) {
- return sovDpenv(uint64((x << 1) ^ uint64((int64(x) >> 63))))
-}
-func (m *EnvReport) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: EnvReport: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: EnvReport: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Meta", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- if m.Meta == nil {
- m.Meta = &Metadata{}
- }
- if err := m.Meta.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Type", wireType)
- }
- m.Type = 0
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- m.Type |= EnvReport_Type(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- case 3:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field PropertySets", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.PropertySets = append(m.PropertySets, &EnvPropertySet{})
- if err := m.PropertySets[len(m.PropertySets)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipDpenv(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthDpenv
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *EnvProperty) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: EnvProperty: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: EnvProperty: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Name = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 10:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Ival", wireType)
- }
- var v int64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Value = &EnvProperty_Ival{v}
- case 11:
- if wireType != 1 {
- return fmt.Errorf("proto: wrong wireType = %d for field Dval", wireType)
- }
- var v uint64
- if (iNdEx + 8) > l {
- return io.ErrUnexpectedEOF
- }
- v = uint64(encoding_binary.LittleEndian.Uint64(dAtA[iNdEx:]))
- iNdEx += 8
- m.Value = &EnvProperty_Dval{float64(math.Float64frombits(v))}
- case 12:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Sval", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Value = &EnvProperty_Sval{string(dAtA[iNdEx:postIndex])}
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipDpenv(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthDpenv
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *EnvPropertySet) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: EnvPropertySet: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: EnvPropertySet: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Dimensions", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Dimensions = append(m.Dimensions, &Dimension{})
- if err := m.Dimensions[len(m.Dimensions)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Properties", wireType)
- }
- var msglen int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- msglen |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if msglen < 0 {
- return ErrInvalidLengthDpenv
- }
- postIndex := iNdEx + msglen
- if postIndex < 0 {
- return ErrInvalidLengthDpenv
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Properties = append(m.Properties, &EnvProperty{})
- if err := m.Properties[len(m.Properties)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
- return err
- }
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipDpenv(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthDpenv
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func skipDpenv(dAtA []byte) (n int, err error) {
- l := len(dAtA)
- iNdEx := 0
- depth := 0
- for iNdEx < l {
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= (uint64(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- wireType := int(wire & 0x7)
- switch wireType {
- case 0:
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- iNdEx++
- if dAtA[iNdEx-1] < 0x80 {
- break
- }
- }
- case 1:
- iNdEx += 8
- case 2:
- var length int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return 0, ErrIntOverflowDpenv
- }
- if iNdEx >= l {
- return 0, io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- length |= (int(b) & 0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- if length < 0 {
- return 0, ErrInvalidLengthDpenv
- }
- iNdEx += length
- case 3:
- depth++
- case 4:
- if depth == 0 {
- return 0, ErrUnexpectedEndOfGroupDpenv
- }
- depth--
- case 5:
- iNdEx += 4
- default:
- return 0, fmt.Errorf("proto: illegal wireType %d", wireType)
- }
- if iNdEx < 0 {
- return 0, ErrInvalidLengthDpenv
- }
- if depth == 0 {
- return iNdEx, nil
- }
- }
- return 0, io.ErrUnexpectedEOF
-}
-
-var (
- ErrInvalidLengthDpenv = fmt.Errorf("proto: negative length found during unmarshaling")
- ErrIntOverflowDpenv = fmt.Errorf("proto: integer overflow")
- ErrUnexpectedEndOfGroupDpenv = fmt.Errorf("proto: unexpected end of group")
-)
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dpenv.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dpenv.proto
deleted file mode 100644
index 409df2818..000000000
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/dpenv.proto
+++ /dev/null
@@ -1,36 +0,0 @@
-syntax = "proto3";
-package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-
-import "gogo.proto";
-import "common.proto";
-import "metrics.proto";
-
-// MetasReport a report containing status entities for a specific metric type
-message EnvReport {
- enum Type {
- SYSTEM = 0;
- INSTANCE = 1;
- AGENT = 2;
- }
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- Type type = 2 [(gogoproto.jsontag) = "type" ];
- repeated EnvPropertySet property_sets = 3 [(gogoproto.jsontag) = "property_sets" ];
-}
-
-
-// EnvPropety - a container for a Dataplane Environment property.
-message EnvProperty {
- string name = 1 [(gogoproto.jsontag) = "name" ];
-
- oneof value {
- int64 ival = 10 [(gogoproto.jsontag) = "ival" ]; // for example cpu count.
- double dval = 11 [(gogoproto.jsontag) = "dval" ]; // for example cpu utilization
- string sval = 12 [(gogoproto.jsontag) = "sval" ]; // for example os name, release name
- }
-}
-
-message EnvPropertySet {
- repeated Dimension dimensions = 1 [(gogoproto.jsontag) = "dimensions" ];
- repeated EnvProperty properties = 2 [(gogoproto.jsontag) = "properties" ];
-}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/events/event.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/events/event.pb.go
index 903408281..e054b5c00 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/events/event.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/events/event.pb.go
@@ -25,17 +25,25 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Represents the metadata for an event
type Metadata struct {
- Module string `protobuf:"bytes,1,opt,name=Module,proto3" json:"module"`
- UUID string `protobuf:"bytes,2,opt,name=UUID,proto3" json:"uuid"`
- CorrelationID string `protobuf:"bytes,3,opt,name=CorrelationID,proto3" json:"correlation_id"`
- Timestamp *types.Timestamp `protobuf:"bytes,4,opt,name=Timestamp,proto3" json:"timestamp"`
- EventLevel string `protobuf:"bytes,5,opt,name=EventLevel,proto3" json:"event_level"`
- Type string `protobuf:"bytes,6,opt,name=Type,proto3" json:"type"`
- Category string `protobuf:"bytes,7,opt,name=Category,proto3" json:"category"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Module is the process that generate the event
+ Module string `protobuf:"bytes,1,opt,name=Module,proto3" json:"module"`
+ // UUID is a unique identifier for each event
+ UUID string `protobuf:"bytes,2,opt,name=UUID,proto3" json:"uuid"`
+ // CorrelationID is an ID used by the producer of the message to track the flow of events
+ CorrelationID string `protobuf:"bytes,3,opt,name=CorrelationID,proto3" json:"correlation_id"`
+ // Timestamp defines the time of event generation
+ Timestamp *types.Timestamp `protobuf:"bytes,4,opt,name=Timestamp,proto3" json:"timestamp"`
+ // EventLevel defines the criticality of event
+ EventLevel string `protobuf:"bytes,5,opt,name=EventLevel,proto3" json:"event_level"`
+ // Type is used to identify the event type for further processing
+ Type string `protobuf:"bytes,6,opt,name=Type,proto3" json:"type"`
+ // Category is used for classifying the event type into a higher level entity
+ Category string `protobuf:"bytes,7,opt,name=Category,proto3" json:"category"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Metadata) Reset() { *m = Metadata{} }
@@ -120,7 +128,9 @@ func (m *Metadata) GetCategory() string {
return ""
}
+// Represents an event
type Event struct {
+ // Event metadata
Metadata *Metadata `protobuf:"bytes,1,opt,name=Metadata,proto3" json:"metadata"`
// Types that are valid to be assigned to Data:
//
@@ -217,7 +227,9 @@ func (*Event) XXX_OneofWrappers() []interface{} {
}
}
+// Represents an event report
type EventReport struct {
+ // Array of events
Events []*Event `protobuf:"bytes,1,rep,name=Events,proto3" json:"events"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -264,8 +276,11 @@ func (m *EventReport) GetEvents() []*Event {
return nil
}
+// Represents an activity event
type ActivityEvent struct {
- Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"message"`
+ // Activtiy event message
+ Message string `protobuf:"bytes,1,opt,name=Message,proto3" json:"message"`
+ // Array of dimensions
Dimensions []*common.Dimension `protobuf:"bytes,2,rep,name=Dimensions,proto3" json:"dimensions"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -319,7 +334,7 @@ func (m *ActivityEvent) GetDimensions() []*common.Dimension {
return nil
}
-// SecurityViolationEvent represents a Security Violation that is emitted by the Agent
+// Represents a security violation that is emitted by the agent
type SecurityViolationEvent struct {
PolicyName string `protobuf:"bytes,1,opt,name=PolicyName,proto3" json:"policy_name"`
SupportID string `protobuf:"bytes,2,opt,name=SupportID,proto3" json:"support_id"`
@@ -898,7 +913,7 @@ func init() {
func init() { proto.RegisterFile("event.proto", fileDescriptor_2d17a9d3f0ddf27e) }
var fileDescriptor_2d17a9d3f0ddf27e = []byte{
- // 1646 bytes of a gzipped FileDescriptorProto
+ // 1647 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x57, 0xdd, 0x6e, 0xdc, 0xc6,
0x15, 0xee, 0xca, 0xb2, 0x7e, 0x66, 0x25, 0xd9, 0x1e, 0x39, 0xf6, 0x48, 0x71, 0x44, 0x75, 0x9d,
0xb8, 0x2a, 0x52, 0xec, 0xa2, 0x4a, 0x02, 0x14, 0x08, 0x10, 0xc0, 0xab, 0x75, 0x92, 0x45, 0x23,
@@ -906,102 +921,102 @@ var fileDescriptor_2d17a9d3f0ddf27e = []byte{
0x6b, 0x3d, 0x42, 0x81, 0x3e, 0x57, 0x91, 0xcb, 0xdc, 0x17, 0x20, 0x0a, 0x5f, 0xf2, 0x05, 0x7a,
0x5b, 0xcc, 0x99, 0x21, 0x87, 0xd4, 0x5f, 0xae, 0x6c, 0x9e, 0xef, 0xfb, 0xce, 0x99, 0x39, 0x3f,
0xb3, 0x47, 0xa8, 0xcb, 0x17, 0x3c, 0x51, 0xfd, 0x34, 0x13, 0x4a, 0xe0, 0x9d, 0xe9, 0x57, 0xfd,
- 0x24, 0x8a, 0x93, 0xf7, 0x7d, 0x16, 0x69, 0xab, 0x0c, 0x2f, 0xfb, 0x80, 0xcb, 0x5d, 0x14, 0x89,
- 0x48, 0x18, 0xda, 0xae, 0x17, 0x09, 0x11, 0xcd, 0xf8, 0x00, 0xbe, 0xce, 0xf3, 0xe9, 0x40, 0xc5,
- 0x73, 0x2e, 0x15, 0x9b, 0xa7, 0x96, 0xb0, 0x1d, 0x88, 0xf9, 0x5c, 0x24, 0x03, 0xf3, 0x8f, 0x31,
- 0xf6, 0x7e, 0x5e, 0x42, 0x6b, 0xc7, 0x5c, 0xb1, 0x90, 0x29, 0x86, 0x7b, 0x68, 0xe5, 0x58, 0x84,
- 0xf9, 0x8c, 0x93, 0xce, 0x7e, 0xe7, 0x60, 0x7d, 0x88, 0xca, 0xc2, 0x5b, 0x99, 0x83, 0x85, 0x5a,
- 0x04, 0xbf, 0x40, 0xcb, 0xef, 0xde, 0x8d, 0x47, 0x64, 0x09, 0x18, 0x6b, 0x65, 0xe1, 0x2d, 0xe7,
- 0x79, 0x1c, 0x52, 0xb0, 0xe2, 0x3f, 0xa1, 0xcd, 0x23, 0x91, 0x65, 0x7c, 0xc6, 0x54, 0x2c, 0x92,
- 0xf1, 0x88, 0x3c, 0x00, 0x1a, 0x2e, 0x0b, 0x6f, 0x2b, 0x70, 0x80, 0x1f, 0x87, 0xb4, 0x4d, 0xc4,
- 0xdf, 0xa1, 0xf5, 0xd3, 0xea, 0xc0, 0x64, 0x79, 0xbf, 0x73, 0xd0, 0x3d, 0xdc, 0xed, 0x9b, 0x2b,
- 0xf5, 0xab, 0x2b, 0xf5, 0x6b, 0xc6, 0x70, 0xb3, 0x2c, 0xbc, 0xf5, 0xfa, 0x86, 0xd4, 0x69, 0xf1,
- 0x00, 0xa1, 0x37, 0x3a, 0x3b, 0x3f, 0xf0, 0x05, 0x9f, 0x91, 0x87, 0x10, 0xff, 0x51, 0x59, 0x78,
- 0x26, 0xa7, 0xfe, 0x4c, 0x9b, 0x69, 0x83, 0xa2, 0x6f, 0x74, 0x7a, 0x95, 0x72, 0xb2, 0xe2, 0x6e,
- 0xa4, 0xae, 0x52, 0x4e, 0xc1, 0x8a, 0x0f, 0xd0, 0xda, 0x11, 0x53, 0x3c, 0x12, 0xd9, 0x15, 0x59,
- 0x05, 0xc6, 0x46, 0x59, 0x78, 0x6b, 0x81, 0xb5, 0xd1, 0x1a, 0xed, 0xfd, 0xb2, 0x84, 0x1e, 0x82,
- 0x5b, 0x7c, 0xec, 0x72, 0x0a, 0x99, 0xec, 0x1e, 0xbe, 0xec, 0xdf, 0x59, 0xc4, 0x7e, 0x45, 0x35,
- 0x8e, 0xe7, 0xf6, 0x8b, 0xba, 0xb2, 0x84, 0x68, 0xf3, 0x75, 0xa0, 0xe2, 0x45, 0xac, 0xae, 0xc0,
- 0x3f, 0xe4, 0xbe, 0x7b, 0x78, 0x70, 0x8f, 0xcf, 0x16, 0xdf, 0xa4, 0x9f, 0x59, 0x93, 0x0f, 0x94,
- 0xef, 0x7f, 0x43, 0xdb, 0x4e, 0xf1, 0x3f, 0x3b, 0xe8, 0xd9, 0x84, 0x07, 0x79, 0x16, 0xab, 0xab,
- 0xb3, 0x58, 0x98, 0xc2, 0x98, 0x78, 0x0f, 0x20, 0xde, 0x1f, 0xef, 0x89, 0x77, 0xbb, 0x70, 0xf8,
- 0xa2, 0x2c, 0x3c, 0x22, 0x2d, 0xe6, 0x2f, 0x2a, 0xb0, 0x3e, 0xc2, 0x1d, 0x01, 0x87, 0x2b, 0x68,
- 0x59, 0xdf, 0xbc, 0x37, 0x41, 0x5d, 0x30, 0x50, 0x9e, 0x8a, 0x4c, 0xe1, 0x11, 0x5a, 0x81, 0x4f,
- 0x49, 0x3a, 0xfb, 0x0f, 0x0e, 0xba, 0x87, 0xfb, 0xf7, 0x9c, 0xc8, 0x38, 0x82, 0x0e, 0x36, 0x16,
- 0x6a, 0xb5, 0xbd, 0x7f, 0x75, 0xae, 0xe5, 0x13, 0x7f, 0x86, 0x56, 0x8f, 0xb9, 0x94, 0x2c, 0xaa,
- 0x1a, 0xbf, 0x5b, 0x16, 0xde, 0xea, 0xdc, 0x98, 0x68, 0x85, 0xe1, 0x53, 0x84, 0x46, 0xf1, 0x9c,
- 0x27, 0x32, 0x16, 0x89, 0x24, 0x4b, 0x70, 0x84, 0x4f, 0x6f, 0x3b, 0x82, 0x9d, 0xb0, 0x9a, 0x3c,
- 0xdc, 0x2a, 0x0b, 0x0f, 0x85, 0xb5, 0x96, 0x36, 0xfc, 0xf4, 0xfe, 0xf3, 0xe4, 0xae, 0xbc, 0xeb,
- 0x56, 0x3e, 0x11, 0xb3, 0x38, 0xb8, 0x7a, 0xcb, 0xe6, 0xd5, 0xd1, 0xa0, 0x95, 0x53, 0xb0, 0xfa,
- 0x09, 0x9b, 0x73, 0xda, 0xa0, 0xe0, 0x3f, 0xa0, 0xf5, 0x49, 0x9e, 0xea, 0x5c, 0xd5, 0x13, 0x0a,
- 0xa1, 0xa5, 0x31, 0xea, 0xb1, 0x73, 0x04, 0x7d, 0xed, 0x1f, 0x73, 0x15, 0x88, 0x39, 0xb7, 0x63,
- 0x0a, 0xd7, 0x16, 0xc6, 0x44, 0x2b, 0x4c, 0xcf, 0xb4, 0xfd, 0x2f, 0xe5, 0x4c, 0x8a, 0x04, 0xa6,
- 0xd3, 0xce, 0xb4, 0x25, 0xfb, 0x19, 0x20, 0xb4, 0x4d, 0xc4, 0x7f, 0x41, 0xcf, 0x87, 0x33, 0x11,
- 0x5c, 0xc6, 0x49, 0xf4, 0xe6, 0x7d, 0xc0, 0x53, 0x7d, 0x33, 0xeb, 0xc3, 0xcc, 0xe5, 0x27, 0x65,
- 0xe1, 0xed, 0x9c, 0x5b, 0x8a, 0xcf, 0x2b, 0x4e, 0xe5, 0xee, 0x2e, 0x35, 0x3c, 0x54, 0x5c, 0x5d,
- 0x88, 0xd0, 0x0e, 0xad, 0x79, 0xa8, 0xc0, 0x42, 0x2d, 0xa2, 0x07, 0xf7, 0x44, 0xbf, 0x1b, 0x81,
- 0x98, 0x35, 0x07, 0x37, 0xb5, 0x36, 0x5a, 0xa3, 0xf8, 0x04, 0x91, 0xbf, 0x7e, 0x2b, 0xb2, 0x7f,
- 0xb0, 0x2c, 0xe4, 0xe1, 0xb7, 0x22, 0xfb, 0x9e, 0xb3, 0x90, 0x67, 0x67, 0x6c, 0x96, 0x73, 0xb2,
- 0x06, 0xca, 0xa7, 0x65, 0xe1, 0x3d, 0x7e, 0x3f, 0x9d, 0xfa, 0x17, 0x00, 0xf9, 0x0b, 0x8d, 0xd1,
- 0x3b, 0x55, 0x78, 0x07, 0x3d, 0x78, 0x47, 0xc7, 0x64, 0x1d, 0xc4, 0xab, 0x65, 0xe1, 0x3d, 0xc8,
- 0xb3, 0x98, 0x6a, 0x9b, 0x4e, 0x3a, 0xe5, 0x7f, 0xcf, 0xb9, 0x54, 0x04, 0xb9, 0xa4, 0x67, 0xc6,
- 0x44, 0x2b, 0x0c, 0x1f, 0xa2, 0xee, 0x58, 0x9e, 0x66, 0x79, 0xa2, 0x1f, 0x9a, 0x90, 0x74, 0x81,
- 0xfa, 0xb8, 0x2c, 0xbc, 0x8d, 0x58, 0xfa, 0xaa, 0xb2, 0xd3, 0x26, 0x49, 0x17, 0xca, 0xca, 0x27,
- 0x8a, 0xa9, 0x5c, 0x92, 0x0d, 0x57, 0x28, 0x1b, 0xc0, 0x97, 0x80, 0xd0, 0x36, 0x11, 0x7f, 0x85,
- 0x36, 0x28, 0x97, 0xa9, 0x48, 0x24, 0x3f, 0x12, 0x21, 0x27, 0x9b, 0x20, 0x7c, 0x52, 0x16, 0xde,
- 0x66, 0x66, 0xed, 0x7e, 0x20, 0x42, 0x4e, 0x5b, 0x34, 0xdd, 0x9f, 0x13, 0x9e, 0x2d, 0x78, 0xf6,
- 0x3a, 0x0c, 0x33, 0xb2, 0xe5, 0xfa, 0x53, 0x82, 0xd5, 0x67, 0x61, 0x98, 0xd1, 0x06, 0x05, 0xbf,
- 0x44, 0x2b, 0x67, 0x13, 0x68, 0xe6, 0x47, 0xee, 0xee, 0x0b, 0x69, 0x1a, 0xd9, 0x42, 0xda, 0x2b,
- 0xe5, 0x73, 0xa1, 0x38, 0x78, 0x7d, 0xec, 0xbc, 0x66, 0x60, 0xb5, 0x5e, 0x1d, 0x05, 0x7f, 0x59,
- 0x09, 0x4e, 0x44, 0xa6, 0xc8, 0x13, 0x57, 0xb1, 0x90, 0x4b, 0x15, 0x27, 0xe6, 0xc9, 0xd1, 0x3d,
- 0x4f, 0x1b, 0x3c, 0x77, 0x78, 0x50, 0xe1, 0x1b, 0x87, 0x37, 0x02, 0x47, 0xc1, 0x7d, 0x84, 0xea,
- 0xf9, 0x94, 0x64, 0xdb, 0x4d, 0x57, 0xfd, 0xae, 0x49, 0xda, 0x60, 0xe8, 0x72, 0x4c, 0xf2, 0xf3,
- 0x86, 0xe4, 0xa9, 0x2b, 0x87, 0xcc, 0xcf, 0xfd, 0x86, 0xac, 0x4d, 0xc4, 0xdf, 0xa0, 0x47, 0xf5,
- 0x17, 0x65, 0x2a, 0x4e, 0x22, 0xf2, 0x91, 0xbb, 0x95, 0x7b, 0x46, 0x33, 0xc0, 0xe8, 0x75, 0x32,
- 0xfe, 0x02, 0x75, 0x27, 0x71, 0x34, 0xe1, 0x4a, 0xe7, 0x53, 0x92, 0x67, 0xae, 0x9a, 0x32, 0x8e,
- 0x7c, 0xc9, 0x15, 0x24, 0x5c, 0xd2, 0x26, 0x0b, 0xbf, 0x42, 0xab, 0x93, 0x38, 0x3a, 0x3a, 0x7b,
- 0x23, 0xc9, 0x73, 0x37, 0x2e, 0x5a, 0x10, 0x2c, 0xb8, 0xa4, 0x15, 0xa8, 0x3b, 0xf3, 0x68, 0x16,
- 0xf3, 0x44, 0x1d, 0xcd, 0x98, 0x94, 0x84, 0xb8, 0xce, 0x0c, 0xc0, 0xec, 0x07, 0xda, 0x4e, 0x9b,
- 0x24, 0x3c, 0x42, 0x4f, 0xcc, 0xe7, 0xeb, 0x34, 0x9d, 0xc5, 0x01, 0x9c, 0x95, 0xec, 0x80, 0xf2,
- 0x59, 0x59, 0x78, 0xd8, 0x2a, 0x99, 0x43, 0xe9, 0x4d, 0x01, 0xfe, 0x09, 0x91, 0x1b, 0xc6, 0x33,
- 0x9e, 0xe9, 0x67, 0x94, 0xec, 0x82, 0xb3, 0xbd, 0xb2, 0xf0, 0x76, 0x6f, 0x3a, 0xf3, 0x17, 0x86,
- 0x45, 0xef, 0xd4, 0xeb, 0xd7, 0x62, 0xc2, 0x17, 0x5c, 0x3f, 0xc2, 0xe4, 0xe3, 0xc6, 0xf5, 0xad,
- 0x8d, 0xd6, 0x28, 0xfe, 0x33, 0xda, 0x3e, 0xbd, 0xc8, 0x38, 0x53, 0x47, 0x6c, 0x9e, 0xb2, 0x38,
- 0x4a, 0x4c, 0x92, 0x5f, 0x80, 0x68, 0xa7, 0x2c, 0xbc, 0x8f, 0x14, 0xc0, 0x7e, 0x60, 0x71, 0x9b,
- 0xec, 0xdb, 0x54, 0x7a, 0xf0, 0x86, 0x42, 0xbd, 0x4e, 0xc4, 0x9c, 0xcd, 0x62, 0x2e, 0xc9, 0x27,
- 0xae, 0x54, 0xe7, 0x42, 0xf9, 0xac, 0x02, 0x68, 0x8b, 0xa6, 0x6b, 0x30, 0x14, 0xaa, 0xde, 0x4b,
- 0xf6, 0x5c, 0x0d, 0xb4, 0xaa, 0xde, 0x4d, 0x9a, 0x24, 0xfc, 0x16, 0x3d, 0x7d, 0x93, 0x4c, 0x45,
- 0x16, 0xf0, 0xb0, 0x15, 0xd2, 0x03, 0xf1, 0x6e, 0x59, 0x78, 0xcf, 0xb8, 0xc5, 0xfd, 0x76, 0xec,
- 0x5b, 0x75, 0x78, 0x88, 0x1e, 0x0f, 0x85, 0x9a, 0xc4, 0x51, 0xc2, 0x54, 0x9e, 0x71, 0x98, 0xea,
- 0x7d, 0x57, 0x52, 0xed, 0x42, 0x56, 0xa0, 0x19, 0xf0, 0x1b, 0x7c, 0xdd, 0x17, 0x75, 0xef, 0x1e,
- 0x89, 0x44, 0xf1, 0xf7, 0x4a, 0x92, 0xdf, 0x3a, 0x27, 0xae, 0xd5, 0x03, 0x8b, 0xd2, 0x9b, 0x02,
- 0xcc, 0xd1, 0x96, 0x1b, 0x9e, 0x91, 0x5e, 0xba, 0x7a, 0xf0, 0xdb, 0x7c, 0xdf, 0x82, 0x54, 0x0b,
- 0x34, 0x7f, 0xb8, 0x5d, 0x16, 0xde, 0x23, 0x37, 0x8f, 0x3e, 0x2c, 0x60, 0xd7, 0x9c, 0xe2, 0xdf,
- 0xa3, 0xb5, 0xc9, 0x95, 0x54, 0x7c, 0x3e, 0x1e, 0x91, 0x97, 0x70, 0x46, 0x58, 0x42, 0x25, 0xd8,
- 0xf4, 0x4f, 0x6b, 0x0d, 0xeb, 0xb2, 0x8e, 0x13, 0xa9, 0x58, 0x12, 0xf0, 0x53, 0x16, 0x49, 0xf2,
- 0xa9, 0x2b, 0x6b, 0x6c, 0xed, 0xbe, 0x62, 0x91, 0xa4, 0x2d, 0x9a, 0x7e, 0x31, 0xaa, 0xef, 0xef,
- 0x32, 0x91, 0xa7, 0xe4, 0x33, 0xf7, 0x62, 0xd4, 0xba, 0x48, 0x23, 0xb4, 0x4d, 0xd4, 0x0d, 0x31,
- 0x8a, 0x65, 0x3a, 0x63, 0x66, 0x55, 0x78, 0xe5, 0x1a, 0x22, 0x34, 0x66, 0x53, 0x81, 0x26, 0x49,
- 0x0f, 0xfc, 0x5b, 0x9d, 0x9c, 0xf1, 0x88, 0xfc, 0xce, 0x75, 0x3c, 0xe4, 0x4b, 0xdf, 0xa6, 0x02,
- 0xf1, 0xd7, 0x68, 0xeb, 0x84, 0x65, 0x7a, 0x61, 0x13, 0x52, 0x69, 0x37, 0xe4, 0x00, 0xe8, 0x90,
- 0xb4, 0x14, 0x10, 0xff, 0xc2, 0x42, 0xf4, 0x1a, 0xb5, 0xf7, 0xbf, 0x0e, 0xda, 0xac, 0x6b, 0x0e,
- 0x69, 0xf4, 0xd0, 0xd2, 0x78, 0xd4, 0x5c, 0x66, 0xf4, 0x13, 0xa3, 0x13, 0xae, 0x83, 0x2e, 0x8d,
- 0x47, 0xf8, 0x1b, 0xb4, 0x51, 0xfd, 0xee, 0x1f, 0x33, 0x79, 0x69, 0xf7, 0x18, 0x68, 0xd0, 0x9a,
- 0x5a, 0xef, 0x0c, 0x73, 0x26, 0x2f, 0x69, 0x8b, 0x8f, 0x3f, 0x47, 0x2b, 0xc3, 0x7c, 0x3a, 0xe5,
- 0x99, 0xdd, 0x6a, 0xe0, 0x9c, 0x4e, 0x09, 0x10, 0xb5, 0x14, 0x4d, 0xfe, 0x71, 0x3a, 0x95, 0x5c,
- 0xd9, 0xad, 0xa6, 0x4d, 0x16, 0x00, 0x51, 0x4b, 0xd1, 0xe4, 0x1f, 0x78, 0x12, 0xa9, 0x0b, 0xbb,
- 0xbe, 0xb4, 0xc9, 0x33, 0x80, 0xa8, 0xa5, 0xf4, 0xfe, 0x86, 0xba, 0xb6, 0x43, 0xe1, 0xda, 0x9f,
- 0xa3, 0xe5, 0xc6, 0x16, 0xf7, 0xbc, 0x2c, 0xbc, 0xed, 0x94, 0x65, 0x6c, 0xce, 0x15, 0xcf, 0x8c,
- 0x1e, 0xf2, 0x07, 0x24, 0xdc, 0x47, 0x0f, 0xcd, 0xfa, 0x61, 0xee, 0x4e, 0xca, 0xc2, 0x7b, 0x7a,
- 0x8d, 0x6d, 0x56, 0x10, 0x43, 0xeb, 0xfd, 0x7b, 0x09, 0x6d, 0xb6, 0x3a, 0xfa, 0xb6, 0x70, 0x6e,
- 0x98, 0xae, 0x87, 0xfb, 0x12, 0xad, 0xda, 0xa3, 0x36, 0x93, 0x7d, 0x8d, 0x6f, 0x27, 0x90, 0x56,
- 0x54, 0x1c, 0xb7, 0x2e, 0x68, 0xff, 0x48, 0x78, 0x75, 0xcf, 0xcc, 0x35, 0xd8, 0x43, 0xaf, 0x2c,
- 0xbc, 0x8f, 0x6f, 0x8f, 0x60, 0xa6, 0xaf, 0x95, 0xbc, 0x08, 0xa1, 0xba, 0x89, 0x24, 0x59, 0xfe,
- 0xd5, 0xe9, 0x6e, 0x75, 0x9c, 0xd9, 0x32, 0xaf, 0xc5, 0xaa, 0x9f, 0x26, 0x49, 0x1b, 0xae, 0x87,
- 0xf4, 0xe7, 0x0f, 0x7b, 0x9d, 0x5f, 0x3e, 0xec, 0x75, 0xfe, 0xfb, 0x61, 0xaf, 0xf3, 0xd3, 0x28,
- 0x8a, 0xd5, 0x45, 0x7e, 0xae, 0xf7, 0xf9, 0x01, 0x44, 0x1a, 0x40, 0xa4, 0x81, 0x0c, 0x2f, 0x07,
- 0x8b, 0x43, 0xf3, 0x97, 0xf6, 0xc0, 0x84, 0xfc, 0xfa, 0xce, 0xc3, 0x9c, 0xaf, 0x00, 0xef, 0x8b,
- 0xff, 0x07, 0x00, 0x00, 0xff, 0xff, 0x89, 0xc8, 0x71, 0xe0, 0xd5, 0x0f, 0x00, 0x00,
+ 0x24, 0x8a, 0x93, 0xf7, 0x7d, 0x16, 0x69, 0xab, 0x0c, 0x2f, 0xfb, 0x80, 0xcb, 0xdd, 0xed, 0x40,
+ 0xcc, 0xe7, 0x22, 0x19, 0x98, 0x7f, 0x0c, 0x7f, 0x17, 0x45, 0x22, 0x12, 0xf6, 0xff, 0x5e, 0x24,
+ 0x44, 0x34, 0xe3, 0x03, 0xf8, 0x3a, 0xcf, 0xa7, 0x03, 0x15, 0xcf, 0xb9, 0x54, 0x6c, 0x9e, 0x1a,
+ 0x42, 0xef, 0xe7, 0x25, 0xb4, 0x76, 0xcc, 0x15, 0x0b, 0x99, 0x62, 0xb8, 0x87, 0x56, 0x8e, 0x45,
+ 0x98, 0xcf, 0x38, 0xe9, 0xec, 0x77, 0x0e, 0xd6, 0x87, 0xa8, 0x2c, 0xbc, 0x95, 0x39, 0x58, 0xa8,
+ 0x45, 0xf0, 0x0b, 0xb4, 0xfc, 0xee, 0xdd, 0x78, 0x44, 0x96, 0x80, 0xb1, 0x56, 0x16, 0xde, 0x72,
+ 0x9e, 0xc7, 0x21, 0x05, 0x2b, 0xfe, 0x13, 0xda, 0x3c, 0x12, 0x59, 0xc6, 0x67, 0x4c, 0xc5, 0x22,
+ 0x19, 0x8f, 0xc8, 0x03, 0xa0, 0xe1, 0xb2, 0xf0, 0xb6, 0x02, 0x07, 0xf8, 0x71, 0x48, 0xdb, 0x44,
+ 0xfc, 0x1d, 0x5a, 0x3f, 0xad, 0xce, 0x46, 0x96, 0xf7, 0x3b, 0x07, 0xdd, 0xc3, 0xdd, 0xbe, 0x39,
+ 0x7d, 0xbf, 0x3a, 0x7d, 0xbf, 0x66, 0x0c, 0x37, 0xcb, 0xc2, 0x5b, 0xaf, 0x2f, 0x43, 0x9d, 0x16,
+ 0x0f, 0x10, 0x7a, 0xa3, 0xb3, 0xf3, 0x03, 0x5f, 0xf0, 0x19, 0x79, 0x08, 0xf1, 0x1f, 0x95, 0x85,
+ 0x67, 0x72, 0xea, 0xcf, 0xb4, 0x99, 0x36, 0x28, 0xfa, 0x46, 0xa7, 0x57, 0x29, 0x27, 0x2b, 0xee,
+ 0x46, 0xea, 0x2a, 0xe5, 0x14, 0xac, 0xf8, 0x00, 0xad, 0x1d, 0x31, 0xc5, 0x23, 0x91, 0x5d, 0x91,
+ 0x55, 0x60, 0x6c, 0x94, 0x85, 0xb7, 0x16, 0x58, 0x1b, 0xad, 0xd1, 0xde, 0x2f, 0x4b, 0xe8, 0x21,
+ 0xb8, 0xc5, 0xc7, 0x2e, 0xa7, 0x90, 0xc9, 0xee, 0xe1, 0xcb, 0xfe, 0x9d, 0x45, 0xec, 0x57, 0x54,
+ 0xe3, 0x78, 0x6e, 0xbf, 0xa8, 0x2b, 0x4b, 0x88, 0x36, 0x5f, 0x07, 0x2a, 0x5e, 0xc4, 0xea, 0x0a,
+ 0xfc, 0x43, 0xee, 0xbb, 0x87, 0x07, 0xf7, 0xf8, 0x6c, 0xf1, 0x4d, 0xfa, 0x99, 0x35, 0xf9, 0x40,
+ 0xf9, 0xfe, 0x37, 0xb4, 0xed, 0x14, 0xff, 0xb3, 0x83, 0x9e, 0x4d, 0x78, 0x90, 0x67, 0xb1, 0xba,
+ 0x3a, 0x8b, 0x85, 0x29, 0x8c, 0x89, 0xf7, 0x00, 0xe2, 0xfd, 0xf1, 0x9e, 0x78, 0xb7, 0x0b, 0x87,
+ 0x2f, 0xca, 0xc2, 0x23, 0xd2, 0x62, 0xfe, 0xa2, 0x02, 0xeb, 0x23, 0xdc, 0x11, 0x70, 0xb8, 0x82,
+ 0x96, 0xf5, 0xcd, 0x7b, 0x13, 0xd4, 0x05, 0x03, 0xe5, 0xa9, 0xc8, 0x14, 0x1e, 0xa1, 0x15, 0xf8,
+ 0x94, 0xa4, 0xb3, 0xff, 0xe0, 0xa0, 0x7b, 0xb8, 0x7f, 0xcf, 0x89, 0x8c, 0x23, 0xe8, 0x60, 0x63,
+ 0xa1, 0x56, 0xdb, 0xfb, 0x57, 0xe7, 0x5a, 0x3e, 0xf1, 0x67, 0x68, 0xf5, 0x98, 0x4b, 0xc9, 0xa2,
+ 0xaa, 0xf1, 0xbb, 0x65, 0xe1, 0xad, 0xce, 0x8d, 0x89, 0x56, 0x18, 0x3e, 0x45, 0x68, 0x14, 0xcf,
+ 0x79, 0x22, 0x63, 0x91, 0x48, 0xb2, 0x04, 0x47, 0xf8, 0xf4, 0xb6, 0x23, 0xd8, 0x71, 0xac, 0xc9,
+ 0xc3, 0xad, 0xb2, 0xf0, 0x50, 0x58, 0x6b, 0x69, 0xc3, 0x4f, 0xef, 0x3f, 0x4f, 0xee, 0xca, 0xbb,
+ 0x6e, 0xe5, 0x13, 0x31, 0x8b, 0x83, 0xab, 0xb7, 0x6c, 0x5e, 0x1d, 0x0d, 0x5a, 0x39, 0x05, 0xab,
+ 0x9f, 0xb0, 0x39, 0xa7, 0x0d, 0x0a, 0xfe, 0x03, 0x5a, 0x9f, 0xe4, 0xa9, 0xce, 0x55, 0x3d, 0xa1,
+ 0x10, 0x5a, 0x1a, 0xa3, 0x1e, 0x3b, 0x47, 0xd0, 0xd7, 0xfe, 0x31, 0x57, 0x81, 0x98, 0x73, 0x3b,
+ 0xa6, 0x70, 0x6d, 0x61, 0x4c, 0xb4, 0xc2, 0xf4, 0x4c, 0xdb, 0xff, 0x52, 0xce, 0xa4, 0x48, 0x60,
+ 0x3a, 0xed, 0x4c, 0x5b, 0xb2, 0x9f, 0x01, 0x42, 0xdb, 0x44, 0xfc, 0x17, 0xf4, 0x7c, 0x38, 0x13,
+ 0xc1, 0x65, 0x9c, 0x44, 0x6f, 0xde, 0x07, 0x3c, 0xd5, 0x37, 0xb3, 0x3e, 0xcc, 0x5c, 0x7e, 0x52,
+ 0x16, 0xde, 0xce, 0xb9, 0xa5, 0xf8, 0xbc, 0xe2, 0x54, 0xee, 0xee, 0x52, 0xc3, 0x43, 0xc5, 0xd5,
+ 0x85, 0x08, 0xed, 0xd0, 0x9a, 0x87, 0x0a, 0x2c, 0xd4, 0x22, 0x7a, 0x70, 0x4f, 0xf4, 0xbb, 0x11,
+ 0x88, 0x59, 0x73, 0x70, 0x53, 0x6b, 0xa3, 0x35, 0x8a, 0x4f, 0x10, 0xf9, 0xeb, 0xb7, 0x22, 0xfb,
+ 0x07, 0xcb, 0x42, 0x1e, 0x7e, 0x2b, 0xb2, 0xef, 0x39, 0x0b, 0x79, 0x76, 0xc6, 0x66, 0x39, 0x27,
+ 0x6b, 0xa0, 0x7c, 0x5a, 0x16, 0xde, 0xe3, 0xf7, 0xd3, 0xa9, 0x7f, 0x01, 0x90, 0xbf, 0xd0, 0x18,
+ 0xbd, 0x53, 0x85, 0x77, 0xd0, 0x83, 0x77, 0x74, 0x4c, 0xd6, 0x41, 0xbc, 0x5a, 0x16, 0xde, 0x83,
+ 0x3c, 0x8b, 0xa9, 0xb6, 0xe9, 0xa4, 0x53, 0xfe, 0xf7, 0x9c, 0x4b, 0x45, 0x90, 0x4b, 0x7a, 0x66,
+ 0x4c, 0xb4, 0xc2, 0xf0, 0x21, 0xea, 0x8e, 0xe5, 0x69, 0x96, 0x27, 0xfa, 0xa1, 0x09, 0x49, 0x17,
+ 0xa8, 0x8f, 0xcb, 0xc2, 0xdb, 0x88, 0xa5, 0xaf, 0x2a, 0x3b, 0x6d, 0x92, 0x74, 0xa1, 0xac, 0x7c,
+ 0xa2, 0x98, 0xca, 0x25, 0xd9, 0x70, 0x85, 0xb2, 0x01, 0x7c, 0x09, 0x08, 0x6d, 0x13, 0xf1, 0x57,
+ 0x68, 0x83, 0x72, 0x99, 0x8a, 0x44, 0xf2, 0x23, 0x11, 0x72, 0xb2, 0x09, 0xc2, 0x27, 0x65, 0xe1,
+ 0x6d, 0x66, 0xd6, 0xee, 0x07, 0x22, 0xe4, 0xb4, 0x45, 0xd3, 0xfd, 0x39, 0xe1, 0xd9, 0x82, 0x67,
+ 0xaf, 0xc3, 0x30, 0x23, 0x5b, 0xae, 0x3f, 0x25, 0x58, 0x7d, 0x16, 0x86, 0x19, 0x6d, 0x50, 0xf0,
+ 0x4b, 0xb4, 0x72, 0x36, 0x81, 0x66, 0x7e, 0xe4, 0xee, 0xbe, 0x90, 0xa6, 0x91, 0x2d, 0xa4, 0xbd,
+ 0x52, 0x3e, 0x17, 0x8a, 0x83, 0xd7, 0xc7, 0xce, 0x6b, 0x06, 0x56, 0xeb, 0xd5, 0x51, 0xf0, 0x97,
+ 0x95, 0xe0, 0x44, 0x64, 0x8a, 0x3c, 0x71, 0x15, 0x0b, 0xb9, 0x54, 0x71, 0x62, 0x9e, 0x1c, 0xdd,
+ 0xf3, 0xb4, 0xc1, 0x73, 0x87, 0x07, 0x15, 0xbe, 0x71, 0x78, 0x23, 0x70, 0x14, 0xdc, 0x47, 0xa8,
+ 0x9e, 0x4f, 0x49, 0xb6, 0xdd, 0x74, 0xd5, 0xef, 0x9a, 0xa4, 0x0d, 0x86, 0x2e, 0xc7, 0x24, 0x3f,
+ 0x6f, 0x48, 0x9e, 0xba, 0x72, 0xc8, 0xfc, 0xdc, 0x6f, 0xc8, 0xda, 0x44, 0xfc, 0x0d, 0x7a, 0x54,
+ 0x7f, 0x51, 0xa6, 0xe2, 0x24, 0x22, 0x1f, 0xb9, 0x5b, 0xb9, 0x67, 0x34, 0x03, 0x8c, 0x5e, 0x27,
+ 0xe3, 0x2f, 0x50, 0x77, 0x12, 0x47, 0x13, 0xae, 0x74, 0x3e, 0x25, 0x79, 0xe6, 0xaa, 0x29, 0xe3,
+ 0xc8, 0x97, 0x5c, 0x41, 0xc2, 0x25, 0x6d, 0xb2, 0xf0, 0x2b, 0xb4, 0x3a, 0x89, 0xa3, 0xa3, 0xb3,
+ 0x37, 0x92, 0x3c, 0x77, 0xe3, 0xa2, 0x05, 0xc1, 0x82, 0x4b, 0x5a, 0x81, 0xba, 0x33, 0x8f, 0x66,
+ 0x31, 0x4f, 0xd4, 0xd1, 0x8c, 0x49, 0x49, 0x88, 0xeb, 0xcc, 0x00, 0xcc, 0x7e, 0xa0, 0xed, 0xb4,
+ 0x49, 0xc2, 0x23, 0xf4, 0xc4, 0x7c, 0xbe, 0x4e, 0xd3, 0x59, 0x1c, 0xc0, 0x59, 0xc9, 0x0e, 0x28,
+ 0x9f, 0x95, 0x85, 0x87, 0xad, 0x92, 0x39, 0x94, 0xde, 0x14, 0xe0, 0x9f, 0x10, 0xb9, 0x61, 0x3c,
+ 0xe3, 0x99, 0x7e, 0x46, 0xc9, 0x2e, 0x38, 0xdb, 0x2b, 0x0b, 0x6f, 0xf7, 0xa6, 0x33, 0x7f, 0x61,
+ 0x58, 0xf4, 0x4e, 0xbd, 0x7e, 0x2d, 0x26, 0x7c, 0xc1, 0xf5, 0x23, 0x4c, 0x3e, 0x6e, 0x5c, 0xdf,
+ 0xda, 0x68, 0x8d, 0xe2, 0x3f, 0xa3, 0xed, 0xd3, 0x8b, 0x8c, 0x33, 0x75, 0xc4, 0xe6, 0x29, 0x8b,
+ 0xa3, 0xc4, 0x24, 0xf9, 0x05, 0x88, 0x76, 0xca, 0xc2, 0xfb, 0x48, 0x01, 0xec, 0x07, 0x16, 0xb7,
+ 0xc9, 0xbe, 0x4d, 0xa5, 0x07, 0x6f, 0x28, 0xd4, 0xeb, 0x44, 0xcc, 0xd9, 0x2c, 0xe6, 0x92, 0x7c,
+ 0xe2, 0x4a, 0x75, 0x2e, 0x94, 0xcf, 0x2a, 0x80, 0xb6, 0x68, 0xba, 0x06, 0x43, 0xa1, 0xea, 0xbd,
+ 0x64, 0xcf, 0xd5, 0x40, 0xab, 0xea, 0xdd, 0xa4, 0x49, 0xc2, 0x6f, 0xd1, 0xd3, 0x37, 0xc9, 0x54,
+ 0x64, 0x01, 0x0f, 0x5b, 0x21, 0x3d, 0x10, 0xef, 0x96, 0x85, 0xf7, 0x8c, 0x5b, 0xdc, 0x6f, 0xc7,
+ 0xbe, 0x55, 0x87, 0x87, 0xe8, 0xf1, 0x50, 0xa8, 0x49, 0x1c, 0x25, 0x4c, 0xe5, 0x19, 0x87, 0xa9,
+ 0xde, 0x77, 0x25, 0xd5, 0x2e, 0x64, 0x05, 0x9a, 0x01, 0xbf, 0xc1, 0xd7, 0x7d, 0x51, 0xf7, 0xee,
+ 0x91, 0x48, 0x14, 0x7f, 0xaf, 0x24, 0xf9, 0xad, 0x73, 0xe2, 0x5a, 0x3d, 0xb0, 0x28, 0xbd, 0x29,
+ 0xc0, 0x1c, 0x6d, 0xb9, 0xe1, 0x19, 0xe9, 0xa5, 0xab, 0x07, 0xbf, 0xcd, 0xf7, 0x2d, 0x48, 0xb5,
+ 0x40, 0xf3, 0x87, 0xdb, 0x65, 0xe1, 0x3d, 0x72, 0xf3, 0xe8, 0xc3, 0x02, 0x76, 0xcd, 0x29, 0xfe,
+ 0x3d, 0x5a, 0x9b, 0x5c, 0x49, 0xc5, 0xe7, 0xe3, 0x11, 0x79, 0x09, 0x67, 0x84, 0x25, 0x54, 0x82,
+ 0x4d, 0xff, 0xb4, 0xd6, 0xb0, 0x2e, 0xeb, 0x38, 0x91, 0x8a, 0x25, 0x01, 0x3f, 0x65, 0x91, 0x24,
+ 0x9f, 0xba, 0xb2, 0xc6, 0xd6, 0xee, 0x2b, 0x16, 0x49, 0xda, 0xa2, 0xe9, 0x17, 0xa3, 0xfa, 0xfe,
+ 0x2e, 0x13, 0x79, 0x4a, 0x3e, 0x73, 0x2f, 0x46, 0xad, 0x8b, 0x34, 0x42, 0xdb, 0x44, 0xdd, 0x10,
+ 0xa3, 0x58, 0xa6, 0x33, 0x66, 0x56, 0x85, 0x57, 0xae, 0x21, 0x42, 0x63, 0x36, 0x15, 0x68, 0x92,
+ 0xf4, 0xc0, 0xbf, 0xd5, 0xc9, 0x19, 0x8f, 0xc8, 0xef, 0x5c, 0xc7, 0x43, 0xbe, 0xf4, 0x6d, 0x2a,
+ 0x10, 0x7f, 0x8d, 0xb6, 0x4e, 0x58, 0xa6, 0x17, 0x36, 0x21, 0x95, 0x76, 0x43, 0x0e, 0x80, 0x0e,
+ 0x49, 0x4b, 0x01, 0xf1, 0x2f, 0x2c, 0x44, 0xaf, 0x51, 0x7b, 0xff, 0xeb, 0xa0, 0xcd, 0xba, 0xe6,
+ 0x90, 0x46, 0x0f, 0x2d, 0x8d, 0x47, 0xcd, 0x65, 0x46, 0x3f, 0x31, 0x3a, 0xe1, 0x3a, 0xe8, 0xd2,
+ 0x78, 0x84, 0xbf, 0x41, 0x1b, 0xd5, 0xef, 0xfe, 0x31, 0x93, 0x97, 0x76, 0x8f, 0x81, 0x06, 0xad,
+ 0xa9, 0xf5, 0xce, 0x30, 0x67, 0xf2, 0x92, 0xb6, 0xf8, 0xf8, 0x73, 0xb4, 0x32, 0xcc, 0xa7, 0x53,
+ 0x9e, 0xd9, 0xad, 0x06, 0xce, 0xe9, 0x94, 0x00, 0x51, 0x4b, 0xd1, 0xe4, 0x1f, 0xa7, 0x53, 0xc9,
+ 0x95, 0xdd, 0x6a, 0xda, 0x64, 0x01, 0x10, 0xb5, 0x14, 0x4d, 0xfe, 0x81, 0x27, 0x91, 0xba, 0xb0,
+ 0xeb, 0x4b, 0x9b, 0x3c, 0x03, 0x88, 0x5a, 0x4a, 0xef, 0x6f, 0xa8, 0x6b, 0x3b, 0x14, 0xae, 0xfd,
+ 0x39, 0x5a, 0x6e, 0x6c, 0x71, 0xcf, 0xcb, 0xc2, 0xdb, 0x4e, 0x59, 0xc6, 0xe6, 0x5c, 0xf1, 0xcc,
+ 0xe8, 0x21, 0x7f, 0x40, 0xc2, 0x7d, 0xf4, 0xd0, 0xac, 0x1f, 0xe6, 0xee, 0xa4, 0x2c, 0xbc, 0xa7,
+ 0xd7, 0xd8, 0x66, 0x05, 0x31, 0xb4, 0xde, 0xbf, 0x97, 0xd0, 0x66, 0xab, 0xa3, 0x6f, 0x0b, 0xe7,
+ 0x86, 0xe9, 0x7a, 0xb8, 0x2f, 0xd1, 0xaa, 0x3d, 0x6a, 0x33, 0xd9, 0xd7, 0xf8, 0x76, 0x02, 0x69,
+ 0x45, 0xc5, 0x71, 0xeb, 0x82, 0xf6, 0x8f, 0x84, 0x57, 0xf7, 0xcc, 0x5c, 0x83, 0x3d, 0xf4, 0xca,
+ 0xc2, 0xfb, 0xf8, 0xf6, 0x08, 0x66, 0xfa, 0x5a, 0xc9, 0x8b, 0x10, 0xaa, 0x9b, 0x48, 0x92, 0xe5,
+ 0x5f, 0x9d, 0xee, 0x56, 0xc7, 0x99, 0x2d, 0xf3, 0x5a, 0xac, 0xfa, 0x69, 0x92, 0xb4, 0xe1, 0x7a,
+ 0x48, 0x7f, 0xfe, 0xb0, 0xd7, 0xf9, 0xe5, 0xc3, 0x5e, 0xe7, 0xbf, 0x1f, 0xf6, 0x3a, 0x3f, 0x8d,
+ 0xa2, 0x58, 0x5d, 0xe4, 0xe7, 0x7a, 0x9f, 0x1f, 0x40, 0xa4, 0x01, 0x44, 0x1a, 0xc8, 0xf0, 0x72,
+ 0xb0, 0x38, 0x34, 0x7f, 0x54, 0x0f, 0x4c, 0xc8, 0xaf, 0xef, 0x3c, 0xcc, 0xf9, 0x0a, 0xf0, 0xbe,
+ 0xf8, 0x7f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xb3, 0x5c, 0xb5, 0xd5, 0x0f, 0x00, 0x00,
}
func (m *Metadata) Marshal() (dAtA []byte, err error) {
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/events/event.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/events/event.proto
index bbbf8aff9..4dfc67f58 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/events/event.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/events/event.proto
@@ -1,121 +1,140 @@
+// Event messages
syntax = "proto3";
package f5.nginx.agent.sdk.events;
-option go_package = "github.com/nginx/agent/sdk/v2/proto/events;f5.nginx.agent.sdk.events";
+import "common/common.proto";
import "gogo.proto";
import "google/protobuf/timestamp.proto";
-import "common/common.proto";
+option go_package = "github.com/nginx/agent/sdk/v2/proto/events;f5.nginx.agent.sdk.events";
+
+// Represents the metadata for an event
message Metadata {
- string Module = 1 [(gogoproto.jsontag) = "module" ];
- string UUID = 2 [(gogoproto.jsontag) = "uuid" ];
- string CorrelationID = 3 [(gogoproto.jsontag) = "correlation_id" ];
- google.protobuf.Timestamp Timestamp = 4 [(gogoproto.jsontag) = "timestamp" ];
- string EventLevel = 5 [(gogoproto.jsontag) = "event_level" ];
- string Type = 6 [(gogoproto.jsontag) = "type" ];
- string Category = 7 [(gogoproto.jsontag) = "category" ];
+ // Module is the process that generate the event
+ string Module = 1 [(gogoproto.jsontag) = "module"];
+ // UUID is a unique identifier for each event
+ string UUID = 2 [(gogoproto.jsontag) = "uuid"];
+ // CorrelationID is an ID used by the producer of the message to track the flow of events
+ string CorrelationID = 3 [(gogoproto.jsontag) = "correlation_id"];
+ // Timestamp defines the time of event generation
+ google.protobuf.Timestamp Timestamp = 4 [(gogoproto.jsontag) = "timestamp"];
+ // EventLevel defines the criticality of event
+ string EventLevel = 5 [(gogoproto.jsontag) = "event_level"];
+ // Type is used to identify the event type for further processing
+ string Type = 6 [(gogoproto.jsontag) = "type"];
+ // Category is used for classifying the event type into a higher level entity
+ string Category = 7 [(gogoproto.jsontag) = "category"];
}
+// Represents an event
message Event {
- Metadata Metadata = 1 [(gogoproto.jsontag) = "metadata" ];
- oneof data {
- ActivityEvent ActivityEvent = 2 [(gogoproto.jsontag) = "activity_event" ];
-
- // While generating the SecurityViolationEvent, the Metadata for a SecurityViolationEvent
- // would look as shown below:
- // * Module = Agent
- // * UUID = A UUID generated by the Agent for the EventReport
- // * CorrelationID = The UUID will be used as the Correlation ID to track the EventReport
- // * Timestamp = The timestamp when NGINX Agent received the violation event
- // * EventLevel = All the SecurityViolationEvent would be generated at an ERROR_EVENT_LEVEL ("ERROR") level
- // In future, the levels might be dynamically chosen based on Request Outcome of SecurityViolationEvent
- // * Type = NGINX_EVENT_TYPE ("Nginx")
- // * Category = APP_PROTECT_CATEGORY ("AppProtect")
- //
- SecurityViolationEvent SecurityViolationEvent = 3 [(gogoproto.jsontag) = "security_violation_event" ];
- }
+ // Event metadata
+ Metadata Metadata = 1 [(gogoproto.jsontag) = "metadata"];
+ oneof data {
+ ActivityEvent ActivityEvent = 2 [(gogoproto.jsontag) = "activity_event"]; // Activity event
+
+ /**
+ * While generating the SecurityViolationEvent, the Metadata for a SecurityViolationEvent
+ * would look as shown below:
+ * - Module = Agent
+ * - UUID = A UUID generated by the Agent for the EventReport
+ * - CorrelationID = The UUID will be used as the Correlation ID to track the EventReport
+ * - Timestamp = The timestamp when NGINX Agent received the violation event
+ * - EventLevel = All the SecurityViolationEvent would be generated at an ERROR_EVENT_LEVEL ("ERROR") level
+ * In future, the levels might be dynamically chosen based on Request Outcome of SecurityViolationEvent
+ * - Type = NGINX_EVENT_TYPE ("Nginx")
+ * - Category = APP_PROTECT_CATEGORY ("AppProtect")
+ */
+
+ SecurityViolationEvent SecurityViolationEvent = 3 [(gogoproto.jsontag) = "security_violation_event"]; // Security violation event
+ }
}
+// Represents an event report
message EventReport {
- repeated Event Events = 1 [(gogoproto.jsontag) = "events" ];
+ // Array of events
+ repeated Event Events = 1 [(gogoproto.jsontag) = "events"];
}
+// Represents an activity event
message ActivityEvent {
- string Message = 1 [(gogoproto.jsontag) = "message" ];
- repeated f5.nginx.agent.sdk.common.Dimension Dimensions = 2 [(gogoproto.jsontag) = "dimensions" ];
+ // Activtiy event message
+ string Message = 1 [(gogoproto.jsontag) = "message"];
+ // Array of dimensions
+ repeated f5.nginx.agent.sdk.common.Dimension Dimensions = 2 [(gogoproto.jsontag) = "dimensions"];
}
-// SecurityViolationEvent represents a Security Violation that is emitted by the Agent
+// Represents a security violation that is emitted by the agent
message SecurityViolationEvent {
- string PolicyName = 1 [(gogoproto.jsontag) = "policy_name" ];
- string SupportID = 2 [(gogoproto.jsontag) = "support_id" ];
-
- string Outcome = 3 [(gogoproto.jsontag) = "outcome" ];
- string OutcomeReason = 4 [(gogoproto.jsontag) = "outcome_reason" ];
- string BlockingExceptionReason = 5 [(gogoproto.jsontag) = "blocking_exception_reason" ];
-
- string Method = 6 [(gogoproto.jsontag) = "method" ];
- string Protocol = 7 [(gogoproto.jsontag) = "protocol" ];
- string XForwardedForHeaderValue = 8 [(gogoproto.jsontag) = "xff_header_value" ];
-
- string URI = 9 [(gogoproto.jsontag) = "uri" ];
- string Request = 10 [(gogoproto.jsontag) = "request" ];
- string IsTruncated = 11 [(gogoproto.jsontag) = "is_truncated" ];
- string RequestStatus = 12 [(gogoproto.jsontag) = "request_status" ];
- string ResponseCode = 13 [(gogoproto.jsontag) = "response_code" ];
-
- string ServerAddr = 14 [(gogoproto.jsontag) = "server_addr" ];
- string VSName = 15 [(gogoproto.jsontag) = "vs_name" ];
- string RemoteAddr = 16[(gogoproto.jsontag) = "remote_addr" ];
- string RemotePort = 17 [(gogoproto.jsontag) = "destination_port" ];
- string ServerPort = 18 [(gogoproto.jsontag) = "server_port" ];
-
- string Violations = 19 [(gogoproto.jsontag) = "violations" ];
- string SubViolations = 20 [(gogoproto.jsontag) = "sub_violations" ];
- string ViolationRating = 21 [(gogoproto.jsontag) = "violation_rating" ];
-
- string SigSetNames = 22 [(gogoproto.jsontag) = "sig_set_names" ];
- string SigCVEs = 23 [(gogoproto.jsontag) = "sig_cves" ];
-
- string ClientClass = 24 [(gogoproto.jsontag) = "client_class" ];
- string ClientApplication = 25 [(gogoproto.jsontag) = "client_application" ];
- string ClientApplicationVersion = 26 [(gogoproto.jsontag) = "client_application_version" ];
-
- string Severity = 27 [(gogoproto.jsontag) = "severity" ];
- string ThreatCampaignNames = 28 [(gogoproto.jsontag) = "threat_campaign_names" ];
-
- string BotAnomalies = 29 [(gogoproto.jsontag) = "bot_anomalies" ];
- string BotCategory = 30 [(gogoproto.jsontag) = "bot_category" ];
- string EnforcedBotAnomalies = 31 [(gogoproto.jsontag) = "enforced_bot_anomalies" ];
- string BotSignatureName = 32 [(gogoproto.jsontag) = "bot_signature_name" ];
-
- string ViolationContexts = 33 [(gogoproto.jsontag) = "violation_contexts" ];
- repeated ViolationData ViolationsData = 34 [(gogoproto.jsontag) = "violations_data" ];
-
- string SystemID = 35 [(gogoproto.jsontag) = "system_id" ];
- string InstanceTags = 36 [(gogoproto.jsontag) = "instance_tags" ];
- string InstanceGroup = 37 [(gogoproto.jsontag) = "instance_group" ];
- string DisplayName = 38 [(gogoproto.jsontag) = "display_name" ];
- string NginxID = 39 [(gogoproto.jsontag) = "nginx_id" ];
- string ParentHostname = 40 [(gogoproto.jsontag) = "parent_hostname" ];
+ string PolicyName = 1 [(gogoproto.jsontag) = "policy_name"];
+ string SupportID = 2 [(gogoproto.jsontag) = "support_id"];
+
+ string Outcome = 3 [(gogoproto.jsontag) = "outcome"];
+ string OutcomeReason = 4 [(gogoproto.jsontag) = "outcome_reason"];
+ string BlockingExceptionReason = 5 [(gogoproto.jsontag) = "blocking_exception_reason"];
+
+ string Method = 6 [(gogoproto.jsontag) = "method"];
+ string Protocol = 7 [(gogoproto.jsontag) = "protocol"];
+ string XForwardedForHeaderValue = 8 [(gogoproto.jsontag) = "xff_header_value"];
+
+ string URI = 9 [(gogoproto.jsontag) = "uri"];
+ string Request = 10 [(gogoproto.jsontag) = "request"];
+ string IsTruncated = 11 [(gogoproto.jsontag) = "is_truncated"];
+ string RequestStatus = 12 [(gogoproto.jsontag) = "request_status"];
+ string ResponseCode = 13 [(gogoproto.jsontag) = "response_code"];
+
+ string ServerAddr = 14 [(gogoproto.jsontag) = "server_addr"];
+ string VSName = 15 [(gogoproto.jsontag) = "vs_name"];
+ string RemoteAddr = 16 [(gogoproto.jsontag) = "remote_addr"];
+ string RemotePort = 17 [(gogoproto.jsontag) = "destination_port"];
+ string ServerPort = 18 [(gogoproto.jsontag) = "server_port"];
+
+ string Violations = 19 [(gogoproto.jsontag) = "violations"];
+ string SubViolations = 20 [(gogoproto.jsontag) = "sub_violations"];
+ string ViolationRating = 21 [(gogoproto.jsontag) = "violation_rating"];
+
+ string SigSetNames = 22 [(gogoproto.jsontag) = "sig_set_names"];
+ string SigCVEs = 23 [(gogoproto.jsontag) = "sig_cves"];
+
+ string ClientClass = 24 [(gogoproto.jsontag) = "client_class"];
+ string ClientApplication = 25 [(gogoproto.jsontag) = "client_application"];
+ string ClientApplicationVersion = 26 [(gogoproto.jsontag) = "client_application_version"];
+
+ string Severity = 27 [(gogoproto.jsontag) = "severity"];
+ string ThreatCampaignNames = 28 [(gogoproto.jsontag) = "threat_campaign_names"];
+
+ string BotAnomalies = 29 [(gogoproto.jsontag) = "bot_anomalies"];
+ string BotCategory = 30 [(gogoproto.jsontag) = "bot_category"];
+ string EnforcedBotAnomalies = 31 [(gogoproto.jsontag) = "enforced_bot_anomalies"];
+ string BotSignatureName = 32 [(gogoproto.jsontag) = "bot_signature_name"];
+
+ string ViolationContexts = 33 [(gogoproto.jsontag) = "violation_contexts"];
+ repeated ViolationData ViolationsData = 34 [(gogoproto.jsontag) = "violations_data"];
+
+ string SystemID = 35 [(gogoproto.jsontag) = "system_id"];
+ string InstanceTags = 36 [(gogoproto.jsontag) = "instance_tags"];
+ string InstanceGroup = 37 [(gogoproto.jsontag) = "instance_group"];
+ string DisplayName = 38 [(gogoproto.jsontag) = "display_name"];
+ string NginxID = 39 [(gogoproto.jsontag) = "nginx_id"];
+ string ParentHostname = 40 [(gogoproto.jsontag) = "parent_hostname"];
}
message SignatureData {
- string ID = 1 [(gogoproto.jsontag) = "sig_data_id" ];
- string BlockingMask = 2 [(gogoproto.jsontag) = "sig_data_blocking_mask" ];
- string Buffer = 3 [(gogoproto.jsontag) = "sig_data_buffer" ];
- string Offset = 4 [(gogoproto.jsontag) = "sig_data_offset" ];
- string Length = 5 [(gogoproto.jsontag) = "sig_data_length" ];
+ string ID = 1 [(gogoproto.jsontag) = "sig_data_id"];
+ string BlockingMask = 2 [(gogoproto.jsontag) = "sig_data_blocking_mask"];
+ string Buffer = 3 [(gogoproto.jsontag) = "sig_data_buffer"];
+ string Offset = 4 [(gogoproto.jsontag) = "sig_data_offset"];
+ string Length = 5 [(gogoproto.jsontag) = "sig_data_length"];
}
message ContextData {
- string Name = 1 [(gogoproto.jsontag) = "parameter_data_name"];
- string Value = 2 [(gogoproto.jsontag) = "parameter_data_value"];
+ string Name = 1 [(gogoproto.jsontag) = "parameter_data_name"];
+ string Value = 2 [(gogoproto.jsontag) = "parameter_data_value"];
}
message ViolationData {
- string Name = 1 [(gogoproto.jsontag) = "violation_data_name" ];
- string Context = 2 [(gogoproto.jsontag) = "violation_data_context" ];
- ContextData ContextData = 3 [(gogoproto.jsontag) = "violation_data_context_data" ];
- repeated SignatureData Signatures = 4 [(gogoproto.jsontag) = "violation_data_signatures" ];
+ string Name = 1 [(gogoproto.jsontag) = "violation_data_name"];
+ string Context = 2 [(gogoproto.jsontag) = "violation_data_context"];
+ ContextData ContextData = 3 [(gogoproto.jsontag) = "violation_data_context_data"];
+ repeated SignatureData Signatures = 4 [(gogoproto.jsontag) = "violation_data_signatures"];
}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/host.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/host.pb.go
index 6168ed6ff..0e5d9b0e6 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/host.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/host.pb.go
@@ -24,23 +24,37 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Represents the host system information
type HostInfo struct {
- Agent string `protobuf:"bytes,1,opt,name=agent,proto3" json:"agent"`
- Boot uint64 `protobuf:"varint,2,opt,name=boot,proto3" json:"boot"`
- Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname"`
- DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name"`
- OsType string `protobuf:"bytes,5,opt,name=os_type,json=osType,proto3" json:"os-type"`
- Uuid string `protobuf:"bytes,6,opt,name=uuid,proto3" json:"uuid"`
- Uname string `protobuf:"bytes,7,opt,name=uname,proto3" json:"uname"`
- Partitons []*DiskPartition `protobuf:"bytes,8,rep,name=partitons,proto3" json:"disk_partitions"`
- Network *Network `protobuf:"bytes,9,opt,name=network,proto3" json:"network"`
- Processor []*CpuInfo `protobuf:"bytes,10,rep,name=processor,proto3" json:"processor"`
- Release *ReleaseInfo `protobuf:"bytes,11,opt,name=release,proto3" json:"release"`
- Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags"`
- AgentAccessibleDirs string `protobuf:"bytes,13,opt,name=agent_accessible_dirs,json=agentAccessibleDirs,proto3" json:"agent_accessible_dirs"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // NGINX Agent version
+ Agent string `protobuf:"bytes,1,opt,name=agent,proto3" json:"agent"`
+ // Host boot time
+ Boot uint64 `protobuf:"varint,2,opt,name=boot,proto3" json:"boot"`
+ // Hostname
+ Hostname string `protobuf:"bytes,3,opt,name=hostname,proto3" json:"hostname"`
+ // Display Name
+ DisplayName string `protobuf:"bytes,4,opt,name=display_name,json=displayName,proto3" json:"display_name"`
+ // OS type (e.g. freebsd, linux, etc)
+ OsType string `protobuf:"bytes,5,opt,name=os_type,json=osType,proto3" json:"os-type"`
+ // Host UUID
+ Uuid string `protobuf:"bytes,6,opt,name=uuid,proto3" json:"uuid"`
+ // The native cpu architecture queried at runtime, as returned by `uname -m` or empty string in case of error
+ Uname string `protobuf:"bytes,7,opt,name=uname,proto3" json:"uname"`
+ // List of disk partitions
+ Partitons []*DiskPartition `protobuf:"bytes,8,rep,name=partitons,proto3" json:"disk_partitions"`
+ // Network information
+ Network *Network `protobuf:"bytes,9,opt,name=network,proto3" json:"network"`
+ // List of CPU processor information
+ Processor []*CpuInfo `protobuf:"bytes,10,rep,name=processor,proto3" json:"processor"`
+ // Release Information
+ Release *ReleaseInfo `protobuf:"bytes,11,opt,name=release,proto3" json:"release"`
+ // List of tags
+ Tags []string `protobuf:"bytes,12,rep,name=tags,proto3" json:"tags"`
+ // List of directories that the NGINX Agent is allowed to access on the host
+ AgentAccessibleDirs string `protobuf:"bytes,13,opt,name=agent_accessible_dirs,json=agentAccessibleDirs,proto3" json:"agent_accessible_dirs"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *HostInfo) Reset() { *m = HostInfo{} }
@@ -167,9 +181,13 @@ func (m *HostInfo) GetAgentAccessibleDirs() string {
return ""
}
+// Represents a disk partition
type DiskPartition struct {
- MountPoint string `protobuf:"bytes,1,opt,name=mount_point,json=mountPoint,proto3" json:"mountpoint"`
- Device string `protobuf:"bytes,2,opt,name=device,proto3" json:"device"`
+ // Mount point location
+ MountPoint string `protobuf:"bytes,1,opt,name=mount_point,json=mountPoint,proto3" json:"mountpoint"`
+ // Device file path
+ Device string `protobuf:"bytes,2,opt,name=device,proto3" json:"device"`
+ // File system type (e.g. hfs, swap, etc)
FsType string `protobuf:"bytes,3,opt,name=fs_type,json=fsType,proto3" json:"fstype"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -230,12 +248,15 @@ func (m *DiskPartition) GetFsType() string {
return ""
}
+// Represents a network
type Network struct {
- Interfaces []*NetworkInterface `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces"`
- Default string `protobuf:"bytes,2,opt,name=default,proto3" json:"default"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // List of network interfaces
+ Interfaces []*NetworkInterface `protobuf:"bytes,1,rep,name=interfaces,proto3" json:"interfaces"`
+ // Default network name
+ Default string `protobuf:"bytes,2,opt,name=default,proto3" json:"default"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *Network) Reset() { *m = Network{} }
@@ -285,14 +306,19 @@ func (m *Network) GetDefault() string {
return ""
}
+// Represents a network interface
type NetworkInterface struct {
- Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac"`
- Ipv6 []*Address `protobuf:"bytes,2,rep,name=ipv6,proto3" json:"ipv6"`
- Ipv4 []*Address `protobuf:"bytes,3,rep,name=ipv4,proto3" json:"ipv4"`
- Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // MAC address
+ Mac string `protobuf:"bytes,1,opt,name=mac,proto3" json:"mac"`
+ // List of IPV6 addresses
+ Ipv6 []*Address `protobuf:"bytes,2,rep,name=ipv6,proto3" json:"ipv6"`
+ // List of IPV4 addresses
+ Ipv4 []*Address `protobuf:"bytes,3,rep,name=ipv4,proto3" json:"ipv4"`
+ // Name of network interface
+ Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *NetworkInterface) Reset() { *m = NetworkInterface{} }
@@ -356,9 +382,13 @@ func (m *NetworkInterface) GetName() string {
return ""
}
+// Represents an IP address
type Address struct {
- Prefixlen int64 `protobuf:"varint,1,opt,name=prefixlen,proto3" json:"prefixlen"`
- Netmask string `protobuf:"bytes,2,opt,name=netmask,proto3" json:"netmask"`
+ // Prefix length
+ Prefixlen int64 `protobuf:"varint,1,opt,name=prefixlen,proto3" json:"prefixlen"`
+ // Netmask
+ Netmask string `protobuf:"bytes,2,opt,name=netmask,proto3" json:"netmask"`
+ // IP Address
Address string `protobuf:"bytes,3,opt,name=address,proto3" json:"address"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -419,14 +449,23 @@ func (m *Address) GetAddress() string {
return ""
}
+// Represents CPU information
type CpuInfo struct {
- Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model"`
- Cores int32 `protobuf:"varint,2,opt,name=cores,proto3" json:"cores"`
- Architecture string `protobuf:"bytes,3,opt,name=architecture,proto3" json:"architecture"`
- Mhz float64 `protobuf:"fixed64,4,opt,name=mhz,proto3" json:"mhz"`
- Hypervisor string `protobuf:"bytes,5,opt,name=hypervisor,proto3" json:"hypervisor"`
- Cpus int32 `protobuf:"varint,6,opt,name=cpus,proto3" json:"cpus"`
- Virtualization string `protobuf:"bytes,7,opt,name=virtualization,proto3" json:"virtualization"`
+ // Model of CPU
+ Model string `protobuf:"bytes,1,opt,name=model,proto3" json:"model"`
+ // Number of cores
+ Cores int32 `protobuf:"varint,2,opt,name=cores,proto3" json:"cores"`
+ // CPU architecture
+ Architecture string `protobuf:"bytes,3,opt,name=architecture,proto3" json:"architecture"`
+ // CPU clock speed in MHz
+ Mhz float64 `protobuf:"fixed64,4,opt,name=mhz,proto3" json:"mhz"`
+ // Hypervisor (e.g. VMWare, KVM, etc.)
+ Hypervisor string `protobuf:"bytes,5,opt,name=hypervisor,proto3" json:"hypervisor"`
+ // Total number of CPUs
+ Cpus int32 `protobuf:"varint,6,opt,name=cpus,proto3" json:"cpus"`
+ // Type of hypervisor (e.g guest or host)
+ Virtualization string `protobuf:"bytes,7,opt,name=virtualization,proto3" json:"virtualization"`
+ // Map of caches with names as the keys and size in bytes as the values
Cache map[string]string `protobuf:"bytes,8,rep,name=cache,proto3" json:"cache" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -522,11 +561,17 @@ func (m *CpuInfo) GetCache() map[string]string {
return nil
}
+// Represents release information
type ReleaseInfo struct {
- Codename string `protobuf:"bytes,1,opt,name=codename,proto3" json:"codename"`
- Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id"`
- Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
- VersionId string `protobuf:"bytes,4,opt,name=version_id,json=versionId,proto3" json:"version_id"`
+ // OS type (e.g. freebsd, linux, etc)
+ Codename string `protobuf:"bytes,1,opt,name=codename,proto3" json:"codename"`
+ // OS name (e.g. ubuntu, linuxmint, etc)
+ Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id"`
+ // OS family (e.g. debian, rhel)
+ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name"`
+ // Version of the OS kernel
+ VersionId string `protobuf:"bytes,4,opt,name=version_id,json=versionId,proto3" json:"version_id"`
+ // Version of the OS
Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/host.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/host.proto
index 5fdc7a75d..892d182b2 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/host.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/host.proto
@@ -1,64 +1,110 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
import "gogo.proto";
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents the host system information
message HostInfo {
- string agent = 1 [(gogoproto.jsontag) = "agent" ];
- uint64 boot = 2 [(gogoproto.jsontag) = "boot" ];
- string hostname = 3 [(gogoproto.jsontag) = "hostname" ];
- string display_name = 4 [(gogoproto.jsontag) = "display_name" ];
- string os_type = 5 [(gogoproto.jsontag) = "os-type" ]; // note kebab case used for compatibility with legacy
- string uuid = 6 [(gogoproto.jsontag) = "uuid" ];
- string uname = 7 [(gogoproto.jsontag) = "uname" ];
- repeated DiskPartition partitons = 8 [(gogoproto.jsontag) = "disk_partitions" ];
- Network network = 9 [(gogoproto.jsontag) = "network" ];
- repeated CpuInfo processor = 10 [(gogoproto.jsontag) = "processor" ];
- ReleaseInfo release = 11 [(gogoproto.jsontag) = "release" ];
- repeated string tags = 12 [(gogoproto.jsontag) = "tags" ];
- string agent_accessible_dirs = 13 [(gogoproto.jsontag) = "agent_accessible_dirs" ];
+ // NGINX Agent version
+ string agent = 1 [(gogoproto.jsontag) = "agent"];
+ // Host boot time
+ uint64 boot = 2 [(gogoproto.jsontag) = "boot"];
+ // Hostname
+ string hostname = 3 [(gogoproto.jsontag) = "hostname"];
+ // Display Name
+ string display_name = 4 [(gogoproto.jsontag) = "display_name"];
+ // OS type (e.g. freebsd, linux, etc)
+ string os_type = 5 [(gogoproto.jsontag) = "os-type"];
+ // Host UUID
+ string uuid = 6 [(gogoproto.jsontag) = "uuid"];
+ // The native cpu architecture queried at runtime, as returned by `uname -m` or empty string in case of error
+ string uname = 7 [(gogoproto.jsontag) = "uname"];
+ // List of disk partitions
+ repeated DiskPartition partitons = 8 [(gogoproto.jsontag) = "disk_partitions"];
+ // Network information
+ Network network = 9 [(gogoproto.jsontag) = "network"];
+ // List of CPU processor information
+ repeated CpuInfo processor = 10 [(gogoproto.jsontag) = "processor"];
+ // Release Information
+ ReleaseInfo release = 11 [(gogoproto.jsontag) = "release"];
+ // List of tags
+ repeated string tags = 12 [(gogoproto.jsontag) = "tags"];
+ // List of directories that the NGINX Agent is allowed to access on the host
+ string agent_accessible_dirs = 13 [(gogoproto.jsontag) = "agent_accessible_dirs"];
}
+// Represents a disk partition
message DiskPartition {
- string mount_point = 1 [(gogoproto.jsontag) = "mountpoint" ];
- string device = 2 [(gogoproto.jsontag) = "device" ];
- string fs_type = 3 [(gogoproto.jsontag) = "fstype" ];
+ // Mount point location
+ string mount_point = 1 [(gogoproto.jsontag) = "mountpoint"];
+ // Device file path
+ string device = 2 [(gogoproto.jsontag) = "device"];
+ // File system type (e.g. hfs, swap, etc)
+ string fs_type = 3 [(gogoproto.jsontag) = "fstype"];
}
+// Represents a network
message Network {
- repeated NetworkInterface interfaces = 1 [(gogoproto.jsontag) = "interfaces" ];
- string default = 2 [(gogoproto.jsontag) = "default" ];
+ // List of network interfaces
+ repeated NetworkInterface interfaces = 1 [(gogoproto.jsontag) = "interfaces"];
+ // Default network name
+ string default = 2 [(gogoproto.jsontag) = "default"];
}
+// Represents a network interface
message NetworkInterface {
- string mac = 1 [(gogoproto.jsontag) = "mac" ];
- repeated Address ipv6 = 2 [(gogoproto.jsontag) = "ipv6" ];
- repeated Address ipv4 = 3 [(gogoproto.jsontag) = "ipv4" ];
- string name = 4 [(gogoproto.jsontag) = "name" ];
+ // MAC address
+ string mac = 1 [(gogoproto.jsontag) = "mac"];
+ // List of IPV6 addresses
+ repeated Address ipv6 = 2 [(gogoproto.jsontag) = "ipv6"];
+ // List of IPV4 addresses
+ repeated Address ipv4 = 3 [(gogoproto.jsontag) = "ipv4"];
+ // Name of network interface
+ string name = 4 [(gogoproto.jsontag) = "name"];
}
+// Represents an IP address
message Address {
- int64 prefixlen = 1 [(gogoproto.jsontag) = "prefixlen" ];
- string netmask = 2 [(gogoproto.jsontag) = "netmask" ];
- string address = 3 [(gogoproto.jsontag) = "address" ];
+ // Prefix length
+ int64 prefixlen = 1 [(gogoproto.jsontag) = "prefixlen"];
+ // Netmask
+ string netmask = 2 [(gogoproto.jsontag) = "netmask"];
+ // IP Address
+ string address = 3 [(gogoproto.jsontag) = "address"];
}
+// Represents CPU information
message CpuInfo {
- string model = 1 [(gogoproto.jsontag) = "model" ];
- int32 cores = 2 [(gogoproto.jsontag) = "cores" ];
- string architecture = 3 [(gogoproto.jsontag) = "architecture" ];
- double mhz = 4 [(gogoproto.jsontag) = "mhz" ];
- string hypervisor = 5 [(gogoproto.jsontag) = "hypervisor" ];
- int32 cpus = 6 [(gogoproto.jsontag) = "cpus" ];
- string virtualization = 7 [(gogoproto.jsontag) = "virtualization" ];
- map cache = 8 [(gogoproto.jsontag) = "cache" ];
+ // Model of CPU
+ string model = 1 [(gogoproto.jsontag) = "model"];
+ // Number of cores
+ int32 cores = 2 [(gogoproto.jsontag) = "cores"];
+ // CPU architecture
+ string architecture = 3 [(gogoproto.jsontag) = "architecture"];
+ // CPU clock speed in MHz
+ double mhz = 4 [(gogoproto.jsontag) = "mhz"];
+ // Hypervisor (e.g. VMWare, KVM, etc.)
+ string hypervisor = 5 [(gogoproto.jsontag) = "hypervisor"];
+ // Total number of CPUs
+ int32 cpus = 6 [(gogoproto.jsontag) = "cpus"];
+ // Type of hypervisor (e.g guest or host)
+ string virtualization = 7 [(gogoproto.jsontag) = "virtualization"];
+ // Map of caches with names as the keys and size in bytes as the values
+ map cache = 8 [(gogoproto.jsontag) = "cache"];
}
+// Represents release information
message ReleaseInfo {
- string codename = 1 [(gogoproto.jsontag) = "codename" ];
- string id = 2 [(gogoproto.jsontag) = "id" ];
- string name = 3 [(gogoproto.jsontag) = "name" ];
- string version_id = 4 [(gogoproto.jsontag) = "version_id" ];
- string version = 5 [(gogoproto.jsontag) = "version" ];
+ // OS type (e.g. freebsd, linux, etc)
+ string codename = 1 [(gogoproto.jsontag) = "codename"];
+ // OS name (e.g. ubuntu, linuxmint, etc)
+ string id = 2 [(gogoproto.jsontag) = "id"];
+ // OS family (e.g. debian, rhel)
+ string name = 3 [(gogoproto.jsontag) = "name"];
+ // Version of the OS kernel
+ string version_id = 4 [(gogoproto.jsontag) = "version_id"];
+ // Version of the OS
+ string version = 5 [(gogoproto.jsontag) = "version"];
}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.pb.go
index afaa09a13..ee8c82794 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.pb.go
@@ -25,12 +25,16 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Metric type enum
type MetricsReport_Type int32
const (
- MetricsReport_SYSTEM MetricsReport_Type = 0
+ // System metric type
+ MetricsReport_SYSTEM MetricsReport_Type = 0
+ // NGINX instance metric type
MetricsReport_INSTANCE MetricsReport_Type = 1
- MetricsReport_AGENT MetricsReport_Type = 2
+ // Agent metric type
+ MetricsReport_AGENT MetricsReport_Type = 2
)
var MetricsReport_Type_name = map[int32]string{
@@ -53,13 +57,17 @@ func (MetricsReport_Type) EnumDescriptor() ([]byte, []int) {
return fileDescriptor_6039342a2ba47b72, []int{0, 0}
}
+// Represents a metric report
type MetricsReport struct {
- Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
- Type MetricsReport_Type `protobuf:"varint,2,opt,name=type,proto3,enum=f5.nginx.agent.sdk.MetricsReport_Type" json:"type"`
- Data []*StatsEntity `protobuf:"bytes,3,rep,name=data,proto3" json:"data"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Provides meta information about the metrics
+ Meta *Metadata `protobuf:"bytes,1,opt,name=meta,proto3" json:"meta"`
+ // Type of metrics
+ Type MetricsReport_Type `protobuf:"varint,2,opt,name=type,proto3,enum=f5.nginx.agent.sdk.MetricsReport_Type" json:"type"`
+ // List of stats entities
+ Data []*StatsEntity `protobuf:"bytes,3,rep,name=data,proto3" json:"data"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *MetricsReport) Reset() { *m = MetricsReport{} }
@@ -116,8 +124,11 @@ func (m *MetricsReport) GetData() []*StatsEntity {
return nil
}
+// Represents a simple metric
type SimpleMetric struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Metric name
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Metric value
Value float64 `protobuf:"fixed64,2,opt,name=value,proto3" json:"value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -171,9 +182,11 @@ func (m *SimpleMetric) GetValue() float64 {
return 0
}
-// Dimension defines a dimensional attribute used when classifying and categorizing data
+// Represents a dimension which is a dimensional attribute used when classifying and categorizing data
type Dimension struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Dimension name
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Dimension value
Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -227,14 +240,17 @@ func (m *Dimension) GetValue() string {
return ""
}
-// StatsEntity a timestamped entry for Dimensions and Metrics
+// Represents a stats entity which is a timestamped entry for dimensions and metrics
type StatsEntity struct {
- Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
- Dimensions []*Dimension `protobuf:"bytes,3,rep,name=dimensions,proto3" json:"dimensions"`
- Simplemetrics []*SimpleMetric `protobuf:"bytes,4,rep,name=simplemetrics,proto3" json:"simplemetrics"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // Timestamp defines the time of stats entity creation
+ Timestamp *types.Timestamp `protobuf:"bytes,1,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
+ // List of dimensions
+ Dimensions []*Dimension `protobuf:"bytes,3,rep,name=dimensions,proto3" json:"dimensions"`
+ // List of metrics
+ Simplemetrics []*SimpleMetric `protobuf:"bytes,4,rep,name=simplemetrics,proto3" json:"simplemetrics"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *StatsEntity) Reset() { *m = StatsEntity{} }
@@ -302,36 +318,36 @@ func init() {
func init() { proto.RegisterFile("metrics.proto", fileDescriptor_6039342a2ba47b72) }
var fileDescriptor_6039342a2ba47b72 = []byte{
- // 459 bytes of a gzipped FileDescriptorProto
+ // 460 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x52, 0x41, 0x6f, 0xd3, 0x30,
0x14, 0xc6, 0x6d, 0x36, 0x9a, 0xd7, 0x76, 0x2a, 0x3e, 0x55, 0xd5, 0x68, 0xaa, 0x1e, 0x50, 0x11,
0x92, 0x23, 0x15, 0x21, 0x10, 0x88, 0xc3, 0xc2, 0x2a, 0xc4, 0xa4, 0xf4, 0xe0, 0xe4, 0x32, 0x6e,
0x5e, 0xeb, 0x85, 0x68, 0x75, 0x1c, 0xd5, 0xee, 0x44, 0x6f, 0xfc, 0x3c, 0x8e, 0xfc, 0x82, 0x0a,
0xf5, 0xd8, 0xff, 0x80, 0x84, 0x62, 0xa7, 0x5b, 0x27, 0xc2, 0x61, 0x97, 0x67, 0x3f, 0xeb, 0x7d,
0xdf, 0x7b, 0xef, 0xfb, 0x0c, 0x6d, 0xc1, 0xf5, 0x32, 0x9d, 0x29, 0x92, 0x2f, 0xa5, 0x96, 0x18,
- 0x5f, 0xbf, 0x21, 0x59, 0x92, 0x66, 0xdf, 0x09, 0x4b, 0x78, 0xa6, 0x89, 0x9a, 0xdf, 0xf4, 0xbc,
- 0x44, 0xca, 0x64, 0xc1, 0x7d, 0x53, 0x71, 0xb5, 0xba, 0xf6, 0x75, 0x2a, 0xb8, 0xd2, 0x4c, 0xe4,
- 0x16, 0xd4, 0x6b, 0xcd, 0xa4, 0x10, 0x32, 0x2b, 0x33, 0x48, 0x64, 0x22, 0xed, 0x7d, 0xf8, 0x07,
- 0x41, 0x3b, 0xb4, 0x0d, 0x28, 0xcf, 0xe5, 0x52, 0xe3, 0xf7, 0xe0, 0x08, 0xae, 0x59, 0x17, 0x0d,
- 0xd0, 0xa8, 0x39, 0x3e, 0x25, 0xff, 0xf6, 0x23, 0x21, 0xd7, 0x6c, 0xce, 0x34, 0x0b, 0x1a, 0xbb,
- 0x8d, 0x67, 0xaa, 0xa9, 0x89, 0xf8, 0x1c, 0x1c, 0xbd, 0xce, 0x79, 0xb7, 0x36, 0x40, 0xa3, 0x93,
- 0xf1, 0x8b, 0xff, 0x60, 0xef, 0x9b, 0x91, 0x78, 0x9d, 0x73, 0xcb, 0x52, 0xe0, 0xa8, 0x89, 0xf8,
- 0x23, 0x38, 0x05, 0x7b, 0xb7, 0x3e, 0xa8, 0x8f, 0x9a, 0x63, 0xaf, 0x8a, 0x25, 0xd2, 0x4c, 0xab,
- 0x49, 0xa6, 0x53, 0xbd, 0xb6, 0xf0, 0x02, 0x40, 0x4d, 0x1c, 0xbe, 0x02, 0xa7, 0xa0, 0xc5, 0x00,
- 0xc7, 0xd1, 0x65, 0x14, 0x4f, 0xc2, 0xce, 0x13, 0xdc, 0x82, 0xc6, 0x97, 0x69, 0x14, 0x9f, 0x4d,
- 0x3f, 0x4d, 0x3a, 0x08, 0xbb, 0x70, 0x74, 0xf6, 0x79, 0x32, 0x8d, 0x3b, 0xb5, 0x61, 0x08, 0xad,
- 0x28, 0x15, 0xf9, 0x82, 0xdb, 0xb9, 0xf0, 0x29, 0x38, 0x19, 0x13, 0xdc, 0x6c, 0xef, 0x5a, 0xea,
- 0x22, 0xa7, 0x26, 0x62, 0x0f, 0x8e, 0x6e, 0xd9, 0x62, 0x65, 0x17, 0x44, 0x81, 0xbb, 0xdb, 0x78,
- 0xf6, 0x81, 0xda, 0x63, 0x78, 0x01, 0xee, 0x79, 0x2a, 0x78, 0xa6, 0x52, 0x99, 0x3d, 0x86, 0xcb,
- 0xad, 0xe0, 0xfa, 0x51, 0x83, 0xe6, 0xc1, 0x9e, 0xf8, 0x1d, 0xb8, 0x77, 0xbe, 0x96, 0xee, 0xf4,
- 0x88, 0x75, 0x9e, 0xec, 0x9d, 0x27, 0xf1, 0xbe, 0x82, 0xde, 0x17, 0xe3, 0x10, 0x60, 0xbe, 0x9f,
- 0x4a, 0x95, 0xb2, 0x3e, 0xaf, 0x92, 0xf5, 0x6e, 0xf6, 0xe0, 0x64, 0xb7, 0xf1, 0x0e, 0x40, 0xf4,
- 0xe0, 0x8e, 0x2f, 0xa1, 0xad, 0x8c, 0x66, 0xe5, 0xcf, 0xec, 0x3a, 0x86, 0x71, 0x50, 0x69, 0xd4,
- 0x81, 0xb8, 0xc1, 0xb3, 0xdd, 0xc6, 0x7b, 0x08, 0xa5, 0x0f, 0xd3, 0x0b, 0xa7, 0x51, 0xeb, 0xd4,
- 0xe9, 0xd3, 0x32, 0x0d, 0xde, 0xfe, 0xdc, 0xf6, 0xd1, 0xaf, 0x6d, 0x1f, 0xfd, 0xde, 0xf6, 0xd1,
- 0xd7, 0x97, 0x49, 0xaa, 0xbf, 0xad, 0xae, 0xc8, 0x4c, 0x0a, 0xdf, 0xf4, 0xf1, 0x4d, 0x1f, 0x5f,
- 0xcd, 0x6f, 0xfc, 0xdb, 0xb1, 0xfd, 0xfd, 0x1f, 0xac, 0x12, 0xc7, 0xe6, 0x78, 0xfd, 0x37, 0x00,
- 0x00, 0xff, 0xff, 0xb6, 0xea, 0xd2, 0xe4, 0x3d, 0x03, 0x00, 0x00,
+ 0x5f, 0xbf, 0x21, 0x59, 0x92, 0x66, 0xdf, 0x09, 0x4b, 0x78, 0xa6, 0x89, 0x9a, 0xdf, 0xf4, 0x5a,
+ 0x33, 0x29, 0x84, 0xcc, 0x6c, 0x45, 0x0f, 0x12, 0x99, 0xc8, 0xf2, 0xee, 0x25, 0x52, 0x26, 0x0b,
+ 0xee, 0x9b, 0xec, 0x6a, 0x75, 0xed, 0xeb, 0x54, 0x70, 0xa5, 0x99, 0xc8, 0x6d, 0xc1, 0xf0, 0x0f,
+ 0x82, 0x76, 0x68, 0x1b, 0x50, 0x9e, 0xcb, 0xa5, 0xc6, 0xef, 0xc1, 0x11, 0x5c, 0xb3, 0x2e, 0x1a,
+ 0xa0, 0x51, 0x73, 0x7c, 0x4a, 0xfe, 0xed, 0x47, 0x42, 0xae, 0xd9, 0x9c, 0x69, 0x16, 0x34, 0x76,
+ 0x1b, 0xcf, 0x54, 0x53, 0x13, 0xf1, 0x39, 0x38, 0x7a, 0x9d, 0xf3, 0x6e, 0x6d, 0x80, 0x46, 0x27,
+ 0xe3, 0x17, 0xff, 0xc1, 0xde, 0x37, 0x23, 0xf1, 0x3a, 0xe7, 0x96, 0xa5, 0xc0, 0x51, 0x13, 0xf1,
+ 0x47, 0x70, 0x0a, 0xf6, 0x6e, 0x7d, 0x50, 0x1f, 0x35, 0xc7, 0x5e, 0x15, 0x4b, 0xa4, 0x99, 0x56,
+ 0x93, 0x4c, 0xa7, 0x7a, 0x6d, 0xe1, 0x05, 0x80, 0x9a, 0x38, 0x7c, 0x05, 0x4e, 0x41, 0x8b, 0x01,
+ 0x8e, 0xa3, 0xcb, 0x28, 0x9e, 0x84, 0x9d, 0x27, 0xb8, 0x05, 0x8d, 0x2f, 0xd3, 0x28, 0x3e, 0x9b,
+ 0x7e, 0x9a, 0x74, 0x10, 0x76, 0xe1, 0xe8, 0xec, 0xf3, 0x64, 0x1a, 0x77, 0x6a, 0xc3, 0x10, 0x5a,
+ 0x51, 0x2a, 0xf2, 0x05, 0xb7, 0x73, 0xe1, 0x53, 0x70, 0x32, 0x26, 0xb8, 0xd9, 0xde, 0xb5, 0xd4,
+ 0x45, 0x4e, 0x4d, 0xc4, 0x1e, 0x1c, 0xdd, 0xb2, 0xc5, 0xca, 0x2e, 0x88, 0x02, 0x77, 0xb7, 0xf1,
+ 0xec, 0x03, 0xb5, 0xc7, 0xf0, 0x02, 0xdc, 0xf3, 0x54, 0xf0, 0x4c, 0xa5, 0x32, 0x7b, 0x0c, 0x97,
+ 0x5b, 0xc1, 0xf5, 0xa3, 0x06, 0xcd, 0x83, 0x3d, 0xf1, 0x3b, 0x70, 0xef, 0xdc, 0x2b, 0xdd, 0xe9,
+ 0x11, 0xeb, 0x2f, 0xd9, 0xfb, 0x4b, 0xe2, 0x7d, 0x05, 0xbd, 0x2f, 0xc6, 0x21, 0xc0, 0x7c, 0x3f,
+ 0x95, 0x2a, 0x65, 0x7d, 0x5e, 0x25, 0xeb, 0xdd, 0xec, 0xc1, 0xc9, 0x6e, 0xe3, 0x1d, 0x80, 0xe8,
+ 0xc1, 0x1d, 0x5f, 0x42, 0x5b, 0x19, 0xcd, 0xca, 0x9f, 0xd9, 0x75, 0x0c, 0xe3, 0xa0, 0xd2, 0xa8,
+ 0x03, 0x71, 0x83, 0x67, 0xbb, 0x8d, 0xf7, 0x10, 0x4a, 0x1f, 0xa6, 0x17, 0x4e, 0xa3, 0xd6, 0xa9,
+ 0xd3, 0xa7, 0x65, 0x1a, 0xbc, 0xfd, 0xb9, 0xed, 0xa3, 0x5f, 0xdb, 0x3e, 0xfa, 0xbd, 0xed, 0xa3,
+ 0xaf, 0x2f, 0x93, 0x54, 0x7f, 0x5b, 0x5d, 0x91, 0x99, 0x14, 0xbe, 0xe9, 0xe3, 0x9b, 0x3e, 0xbe,
+ 0x9a, 0xdf, 0xf8, 0xb7, 0x63, 0xfb, 0xc7, 0x3f, 0x58, 0x25, 0x8e, 0xcd, 0xf1, 0xfa, 0x6f, 0x00,
+ 0x00, 0x00, 0xff, 0xff, 0xe6, 0xcd, 0x1e, 0xb5, 0x3d, 0x03, 0x00, 0x00,
}
func (m *MetricsReport) Marshal() (dAtA []byte, err error) {
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.proto
index 8c3734976..e4cba46fd 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.proto
@@ -1,39 +1,56 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-import "google/protobuf/timestamp.proto";
import "common.proto";
import "gogo.proto";
+import "google/protobuf/timestamp.proto";
+
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+// Represents a metric report
message MetricsReport {
+ // Metric type enum
enum Type {
+ // System metric type
SYSTEM = 0;
+ // NGINX instance metric type
INSTANCE = 1;
+ // Agent metric type
AGENT = 2;
}
- Metadata meta = 1 [(gogoproto.jsontag) = "meta" ];
- Type type = 2 [(gogoproto.jsontag) = "type" ];
- repeated StatsEntity data = 3 [(gogoproto.jsontag) = "data" ];
+ // Provides meta information about the metrics
+ Metadata meta = 1 [(gogoproto.jsontag) = "meta"];
+ // Type of metrics
+ Type type = 2 [(gogoproto.jsontag) = "type"];
+ // List of stats entities
+ repeated StatsEntity data = 3 [(gogoproto.jsontag) = "data"];
}
+// Represents a simple metric
message SimpleMetric {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- double value = 2 [(gogoproto.jsontag) = "value" ];
+ // Metric name
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Metric value
+ double value = 2 [(gogoproto.jsontag) = "value"];
}
-// Dimension defines a dimensional attribute used when classifying and categorizing data
+// Represents a dimension which is a dimensional attribute used when classifying and categorizing data
message Dimension {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- string value = 2 [(gogoproto.jsontag) = "value" ];
+ // Dimension name
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Dimension value
+ string value = 2 [(gogoproto.jsontag) = "value"];
}
-// StatsEntity a timestamped entry for Dimensions and Metrics
+// Represents a stats entity which is a timestamped entry for dimensions and metrics
message StatsEntity {
+ // Timestamp defines the time of stats entity creation
google.protobuf.Timestamp timestamp = 1;
// DEPRECATED
reserved 2;
reserved "metrics";
- repeated Dimension dimensions = 3 [(gogoproto.jsontag) = "dimensions" ];
- repeated SimpleMetric simplemetrics = 4 [(gogoproto.jsontag) = "simplemetrics" ];
+ // List of dimensions
+ repeated Dimension dimensions = 3 [(gogoproto.jsontag) = "dimensions"];
+ // List of metrics
+ repeated SimpleMetric simplemetrics = 4 [(gogoproto.jsontag) = "simplemetrics"];
}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.svc.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.svc.pb.go
index f86abcd9f..781af9dd3 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.svc.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.svc.pb.go
@@ -29,22 +29,22 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
func init() { proto.RegisterFile("metrics.svc.proto", fileDescriptor_ece8a4321458910f) }
var fileDescriptor_ece8a4321458910f = []byte{
- // 229 bytes of a gzipped FileDescriptorProto
+ // 228 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0xcc, 0x4d, 0x2d, 0x29,
0xca, 0x4c, 0x2e, 0xd6, 0x2b, 0x2e, 0x4b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x12, 0x4a,
0x33, 0xd5, 0xcb, 0x4b, 0xcf, 0xcc, 0xab, 0xd0, 0x4b, 0x4c, 0x4f, 0xcd, 0x2b, 0xd1, 0x2b, 0x4e,
- 0xc9, 0x96, 0x92, 0x4e, 0xcf, 0xcf, 0x4f, 0xcf, 0x49, 0xd5, 0x07, 0xab, 0x48, 0x2a, 0x4d, 0xd3,
- 0x4f, 0xcd, 0x2d, 0x28, 0xa9, 0x84, 0x68, 0x90, 0x12, 0x4a, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6,
- 0x07, 0x53, 0x50, 0x31, 0x5e, 0x98, 0xb9, 0x60, 0xae, 0xd1, 0x5a, 0x46, 0x2e, 0x3e, 0x5f, 0x88,
- 0x48, 0x70, 0x6a, 0x51, 0x59, 0x66, 0x72, 0xaa, 0x90, 0x3b, 0x17, 0x5b, 0x70, 0x49, 0x51, 0x6a,
- 0x62, 0xae, 0x90, 0xa2, 0x1e, 0xa6, 0x8d, 0x7a, 0x50, 0xd5, 0x41, 0xa9, 0x05, 0xf9, 0x45, 0x25,
- 0x52, 0x62, 0x7a, 0x10, 0x07, 0xe8, 0xc1, 0x1c, 0xa0, 0xe7, 0x0a, 0x72, 0x80, 0x12, 0x83, 0x06,
- 0xa3, 0x50, 0x10, 0x17, 0x0f, 0xc4, 0x20, 0x57, 0xb0, 0x33, 0x84, 0xd4, 0xb0, 0x19, 0x07, 0x71,
- 0xa2, 0x1e, 0x58, 0x09, 0x61, 0x33, 0x9d, 0xcc, 0x4f, 0x3c, 0x92, 0x63, 0xbc, 0xf0, 0x48, 0x8e,
- 0xf1, 0xc1, 0x23, 0x39, 0xc6, 0x28, 0xcd, 0xf4, 0xcc, 0x92, 0x8c, 0xd2, 0x24, 0xbd, 0xe4, 0xfc,
- 0x5c, 0x7d, 0xb0, 0xc1, 0xfa, 0x60, 0x83, 0xf5, 0x8b, 0x53, 0xb2, 0xf5, 0xcb, 0x8c, 0x20, 0x81,
- 0x62, 0x0d, 0x31, 0x85, 0x0d, 0x4c, 0x19, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0x9b, 0xc4, 0x8d,
- 0xf5, 0x58, 0x01, 0x00, 0x00,
+ 0xc9, 0x96, 0x12, 0x4a, 0x2d, 0x4b, 0xcd, 0x2b, 0x29, 0xd6, 0x07, 0x53, 0x10, 0x75, 0x52, 0xd2,
+ 0xe9, 0xf9, 0xf9, 0xe9, 0x39, 0xa9, 0xfa, 0x60, 0x5e, 0x52, 0x69, 0x9a, 0x7e, 0x6a, 0x6e, 0x41,
+ 0x49, 0x25, 0x54, 0x92, 0x17, 0x66, 0x2e, 0x98, 0x6b, 0xb4, 0x96, 0x91, 0x8b, 0xcf, 0x17, 0x22,
+ 0x12, 0x9c, 0x5a, 0x54, 0x96, 0x99, 0x9c, 0x2a, 0xe4, 0xce, 0xc5, 0x16, 0x5c, 0x52, 0x94, 0x9a,
+ 0x98, 0x2b, 0xa4, 0xa8, 0x87, 0x69, 0xa3, 0x1e, 0x54, 0x75, 0x50, 0x6a, 0x41, 0x7e, 0x51, 0x89,
+ 0x94, 0x98, 0x1e, 0xc4, 0x32, 0x3d, 0x98, 0x65, 0x7a, 0xae, 0x20, 0xcb, 0x94, 0x18, 0x34, 0x18,
+ 0x85, 0x82, 0xb8, 0x78, 0x20, 0x06, 0xb9, 0x82, 0xdd, 0x28, 0xa4, 0x86, 0xcd, 0x38, 0x88, 0xfb,
+ 0xf5, 0xc0, 0x4a, 0x08, 0x9b, 0xe9, 0x64, 0x7e, 0xe2, 0x91, 0x1c, 0xe3, 0x85, 0x47, 0x72, 0x8c,
+ 0x0f, 0x1e, 0xc9, 0x31, 0x46, 0x69, 0xa6, 0x67, 0x96, 0x64, 0x94, 0x26, 0xe9, 0x25, 0xe7, 0xe7,
+ 0xea, 0x83, 0x0d, 0xd6, 0x07, 0x1b, 0xac, 0x5f, 0x9c, 0x92, 0xad, 0x5f, 0x66, 0x04, 0x09, 0x00,
+ 0x6b, 0x88, 0x29, 0x6c, 0x60, 0xca, 0x18, 0x10, 0x00, 0x00, 0xff, 0xff, 0x70, 0x1f, 0xc3, 0xc1,
+ 0x58, 0x01, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.svc.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.svc.proto
index 81959dda8..ef22b6888 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.svc.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/metrics.svc.proto
@@ -1,12 +1,13 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-import "google/protobuf/empty.proto";
import "events/event.proto";
+import "google/protobuf/empty.proto";
import "metrics.proto";
-// MetricsService is responsible for ingesting high volume metrics and events
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents a metrics service which is responsible for ingesting high volume metrics and events
service MetricsService {
// A client-to-server streaming RPC to deliver high volume metrics reports.
rpc Stream(stream MetricsReport) returns (google.protobuf.Empty) {}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nap.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nap.pb.go
index 15a1f6b33..56526ebd1 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nap.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nap.pb.go
@@ -23,11 +23,15 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// Status enum
type AppProtectWAFHealth_AppProtectWAFStatus int32
const (
- AppProtectWAFHealth_UNKNOWN AppProtectWAFHealth_AppProtectWAFStatus = 0
- AppProtectWAFHealth_ACTIVE AppProtectWAFHealth_AppProtectWAFStatus = 1
+ // Unknown status
+ AppProtectWAFHealth_UNKNOWN AppProtectWAFHealth_AppProtectWAFStatus = 0
+ // Active status
+ AppProtectWAFHealth_ACTIVE AppProtectWAFHealth_AppProtectWAFStatus = 1
+ // Degraded status
AppProtectWAFHealth_DEGRADED AppProtectWAFHealth_AppProtectWAFStatus = 2
)
@@ -51,15 +55,19 @@ func (AppProtectWAFHealth_AppProtectWAFStatus) EnumDescriptor() ([]byte, []int)
return fileDescriptor_f34234efeae954d9, []int{1, 0}
}
-// AppProtectWAFDetails reports the details of Nginx App Protect
+// Represents App Protect WAF details
type AppProtectWAFDetails struct {
- WafVersion string `protobuf:"bytes,1,opt,name=waf_version,json=wafVersion,proto3" json:"waf_version"`
- AttackSignaturesVersion string `protobuf:"bytes,2,opt,name=attack_signatures_version,json=attackSignaturesVersion,proto3" json:"attack_signatures_version"`
- ThreatCampaignsVersion string `protobuf:"bytes,3,opt,name=threat_campaigns_version,json=threatCampaignsVersion,proto3" json:"threat_campaigns_version"`
- Health *AppProtectWAFHealth `protobuf:"bytes,4,opt,name=health,proto3" json:"health"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // WAF version
+ WafVersion string `protobuf:"bytes,1,opt,name=waf_version,json=wafVersion,proto3" json:"waf_version"`
+ // Attack signatures version (This is being deprecated and will be removed in a future release)
+ AttackSignaturesVersion string `protobuf:"bytes,2,opt,name=attack_signatures_version,json=attackSignaturesVersion,proto3" json:"attack_signatures_version"`
+ // Threat signatures version (This is being deprecated and will be removed in a future release)
+ ThreatCampaignsVersion string `protobuf:"bytes,3,opt,name=threat_campaigns_version,json=threatCampaignsVersion,proto3" json:"threat_campaigns_version"`
+ // App Protect Health details (This is being deprecated and will be removed in a future release)
+ Health *AppProtectWAFHealth `protobuf:"bytes,4,opt,name=health,proto3" json:"health"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *AppProtectWAFDetails) Reset() { *m = AppProtectWAFDetails{} }
@@ -123,14 +131,17 @@ func (m *AppProtectWAFDetails) GetHealth() *AppProtectWAFHealth {
return nil
}
-// AppProtectWAFHealth reports the health details of Nginx App Protect
+// Represents the health of App Protect WAF
type AppProtectWAFHealth struct {
- SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
- AppProtectWafStatus AppProtectWAFHealth_AppProtectWAFStatus `protobuf:"varint,2,opt,name=app_protect_waf_status,json=appProtectWafStatus,proto3,enum=f5.nginx.agent.sdk.AppProtectWAFHealth_AppProtectWAFStatus" json:"app_protect_waf_status"`
- DegradedReason string `protobuf:"bytes,3,opt,name=degraded_reason,json=degradedReason,proto3" json:"degraded_reason"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // System ID
+ SystemId string `protobuf:"bytes,1,opt,name=system_id,json=systemId,proto3" json:"system_id"`
+ // App Protect WAF status
+ AppProtectWafStatus AppProtectWAFHealth_AppProtectWAFStatus `protobuf:"varint,2,opt,name=app_protect_waf_status,json=appProtectWafStatus,proto3,enum=f5.nginx.agent.sdk.AppProtectWAFHealth_AppProtectWAFStatus" json:"app_protect_waf_status"`
+ // Provides an error message of why App Protect WAF is degraded
+ DegradedReason string `protobuf:"bytes,3,opt,name=degraded_reason,json=degradedReason,proto3" json:"degraded_reason"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *AppProtectWAFHealth) Reset() { *m = AppProtectWAFHealth{} }
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nap.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nap.proto
index f91b87f02..ab2348edb 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nap.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nap.proto
@@ -1,25 +1,37 @@
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
import "gogo.proto";
-// AppProtectWAFDetails reports the details of Nginx App Protect
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
+
+// Represents App Protect WAF details
message AppProtectWAFDetails {
- string waf_version = 1 [(gogoproto.jsontag) = "waf_version"];
- string attack_signatures_version = 2 [(gogoproto.jsontag) = "attack_signatures_version"]; // deprecating
- string threat_campaigns_version = 3 [(gogoproto.jsontag) = "threat_campaigns_version"]; // deprecating
- AppProtectWAFHealth health = 4 [(gogoproto.jsontag) = "health"]; // deprecating
+ // WAF version
+ string waf_version = 1 [(gogoproto.jsontag) = "waf_version"];
+ // Attack signatures version (This is being deprecated and will be removed in a future release)
+ string attack_signatures_version = 2 [(gogoproto.jsontag) = "attack_signatures_version"];
+ // Threat signatures version (This is being deprecated and will be removed in a future release)
+ string threat_campaigns_version = 3 [(gogoproto.jsontag) = "threat_campaigns_version"];
+ // App Protect Health details (This is being deprecated and will be removed in a future release)
+ AppProtectWAFHealth health = 4 [(gogoproto.jsontag) = "health"];
}
-// AppProtectWAFHealth reports the health details of Nginx App Protect
+// Represents the health of App Protect WAF
message AppProtectWAFHealth {
- enum AppProtectWAFStatus {
- UNKNOWN = 0;
- ACTIVE = 1;
- DEGRADED = 2;
- }
- string system_id = 1 [(gogoproto.jsontag) = "system_id"];
- AppProtectWAFStatus app_protect_waf_status = 2 [(gogoproto.jsontag) = "app_protect_waf_status"];
- string degraded_reason = 3 [(gogoproto.jsontag) = "degraded_reason"];
+ // Status enum
+ enum AppProtectWAFStatus {
+ // Unknown status
+ UNKNOWN = 0;
+ // Active status
+ ACTIVE = 1;
+ // Degraded status
+ DEGRADED = 2;
+ }
+ // System ID
+ string system_id = 1 [(gogoproto.jsontag) = "system_id"];
+ // App Protect WAF status
+ AppProtectWAFStatus app_protect_waf_status = 2 [(gogoproto.jsontag) = "app_protect_waf_status"];
+ // Provides an error message of why App Protect WAF is degraded
+ string degraded_reason = 3 [(gogoproto.jsontag) = "degraded_reason"];
}
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nginx.pb.go b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nginx.pb.go
index a8ab6ef23..d3d3ea688 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nginx.pb.go
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nginx.pb.go
@@ -23,15 +23,22 @@ var _ = math.Inf
// proto package needs to be updated.
const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package
+// NGINX config action enum
type NginxConfigAction int32
const (
- NginxConfigAction_UNKNOWN NginxConfigAction = 0
- NginxConfigAction_APPLY NginxConfigAction = 1
- NginxConfigAction_TEST NginxConfigAction = 2
+ // Unknown action
+ NginxConfigAction_UNKNOWN NginxConfigAction = 0
+ // Apply config action
+ NginxConfigAction_APPLY NginxConfigAction = 1
+ // Test config action (This will be implemented in a future release)
+ NginxConfigAction_TEST NginxConfigAction = 2
+ // Rollback config action (This will be implemented in a future release)
NginxConfigAction_ROLLBACK NginxConfigAction = 3
- NginxConfigAction_RETURN NginxConfigAction = 4
- NginxConfigAction_FORCE NginxConfigAction = 5
+ // Return config action (This will be implemented in a future release)
+ NginxConfigAction_RETURN NginxConfigAction = 4
+ // Force config apply action
+ NginxConfigAction_FORCE NginxConfigAction = 5
)
var NginxConfigAction_name = map[int32]string{
@@ -64,8 +71,10 @@ func (NginxConfigAction) EnumDescriptor() ([]byte, []int) {
type NginxSslMetaData_NginxSslType int32
const (
+ // SSL complied with NGINX
NginxSslMetaData_BUILT NginxSslMetaData_NginxSslType = 0
- NginxSslMetaData_RUN NginxSslMetaData_NginxSslType = 1
+ // SSL not complied with NGINX
+ NginxSslMetaData_RUN NginxSslMetaData_NginxSslType = 1
)
var NginxSslMetaData_NginxSslType_name = map[int32]string{
@@ -83,14 +92,18 @@ func (x NginxSslMetaData_NginxSslType) String() string {
}
func (NginxSslMetaData_NginxSslType) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{5, 0}
+ return fileDescriptor_917f1a70b1fd7255, []int{2, 0}
}
+// NGINX status enum
type NginxHealth_NginxStatus int32
const (
- NginxHealth_UNKNOWN NginxHealth_NginxStatus = 0
- NginxHealth_ACTIVE NginxHealth_NginxStatus = 1
+ // Unknown status
+ NginxHealth_UNKNOWN NginxHealth_NginxStatus = 0
+ // Active status
+ NginxHealth_ACTIVE NginxHealth_NginxStatus = 1
+ // Degraded status
NginxHealth_DEGRADED NginxHealth_NginxStatus = 2
)
@@ -111,213 +124,48 @@ func (x NginxHealth_NginxStatus) String() string {
}
func (NginxHealth_NginxStatus) EnumDescriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{6, 0}
-}
-
-type PlusInfo struct {
- Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
- Release string `protobuf:"bytes,2,opt,name=release,proto3" json:"release"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PlusInfo) Reset() { *m = PlusInfo{} }
-func (m *PlusInfo) String() string { return proto.CompactTextString(m) }
-func (*PlusInfo) ProtoMessage() {}
-func (*PlusInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{0}
-}
-func (m *PlusInfo) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *PlusInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_PlusInfo.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *PlusInfo) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PlusInfo.Merge(m, src)
-}
-func (m *PlusInfo) XXX_Size() int {
- return m.Size()
-}
-func (m *PlusInfo) XXX_DiscardUnknown() {
- xxx_messageInfo_PlusInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PlusInfo proto.InternalMessageInfo
-
-func (m *PlusInfo) GetEnabled() bool {
- if m != nil {
- return m.Enabled
- }
- return false
-}
-
-func (m *PlusInfo) GetRelease() string {
- if m != nil {
- return m.Release
- }
- return ""
-}
-
-type SSLInfo struct {
- Built []string `protobuf:"bytes,1,rep,name=built,proto3" json:"built"`
- Run []string `protobuf:"bytes,2,rep,name=run,proto3" json:"run"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *SSLInfo) Reset() { *m = SSLInfo{} }
-func (m *SSLInfo) String() string { return proto.CompactTextString(m) }
-func (*SSLInfo) ProtoMessage() {}
-func (*SSLInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{1}
-}
-func (m *SSLInfo) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *SSLInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_SSLInfo.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *SSLInfo) XXX_Merge(src proto.Message) {
- xxx_messageInfo_SSLInfo.Merge(m, src)
-}
-func (m *SSLInfo) XXX_Size() int {
- return m.Size()
-}
-func (m *SSLInfo) XXX_DiscardUnknown() {
- xxx_messageInfo_SSLInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_SSLInfo proto.InternalMessageInfo
-
-func (m *SSLInfo) GetBuilt() []string {
- if m != nil {
- return m.Built
- }
- return nil
-}
-
-func (m *SSLInfo) GetRun() []string {
- if m != nil {
- return m.Run
- }
- return nil
-}
-
-type PathInfo struct {
- Bin string `protobuf:"bytes,1,opt,name=bin,proto3" json:"bin"`
- Conf string `protobuf:"bytes,2,opt,name=conf,proto3" json:"conf"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
-}
-
-func (m *PathInfo) Reset() { *m = PathInfo{} }
-func (m *PathInfo) String() string { return proto.CompactTextString(m) }
-func (*PathInfo) ProtoMessage() {}
-func (*PathInfo) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{2}
-}
-func (m *PathInfo) XXX_Unmarshal(b []byte) error {
- return m.Unmarshal(b)
-}
-func (m *PathInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
- if deterministic {
- return xxx_messageInfo_PathInfo.Marshal(b, m, deterministic)
- } else {
- b = b[:cap(b)]
- n, err := m.MarshalToSizedBuffer(b)
- if err != nil {
- return nil, err
- }
- return b[:n], nil
- }
-}
-func (m *PathInfo) XXX_Merge(src proto.Message) {
- xxx_messageInfo_PathInfo.Merge(m, src)
-}
-func (m *PathInfo) XXX_Size() int {
- return m.Size()
-}
-func (m *PathInfo) XXX_DiscardUnknown() {
- xxx_messageInfo_PathInfo.DiscardUnknown(m)
-}
-
-var xxx_messageInfo_PathInfo proto.InternalMessageInfo
-
-func (m *PathInfo) GetBin() string {
- if m != nil {
- return m.Bin
- }
- return ""
-}
-
-func (m *PathInfo) GetConf() string {
- if m != nil {
- return m.Conf
- }
- return ""
+ return fileDescriptor_917f1a70b1fd7255, []int{3, 0}
}
// swagger:model NginxDetails
-// Each NGINXDetails is associated with with a single NGINX instance.
+// Represents NGINX details about a single NGINX instance
type NginxDetails struct {
- // NGINX ID
- // example: b636d4376dea15405589692d3c5d3869ff3a9b26b0e7bb4bb1aa7e658ace1437
+ // NGINX ID.
+ // Example: b636d4376dea15405589692d3c5d3869ff3a9b26b0e7bb4bb1aa7e658ace1437
NginxId string `protobuf:"bytes,1,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
- // Version of NGINX
- // example: 1.23.2
+ // NGINX version.
+ // Example: 1.23.2
Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version"`
- // Path to configuration file
- // example: /usr/local/nginx/conf/nginx.conf
+ // Path to NGINX configuration.
+ // Example: /usr/local/nginx/conf/nginx.conf
ConfPath string `protobuf:"bytes,3,opt,name=conf_path,json=confPath,proto3" json:"conf_path"`
- // Process ID
- // example: 8
+ // Process ID of NGINX instance.
+ // Example: 8
ProcessId string `protobuf:"bytes,4,opt,name=process_id,json=processId,proto3" json:"process_id"`
- // Process Path
- // example: /usr/local/nginx/sbin/nginx
+ // The path to the NGINX executable.
+ // Example: /usr/local/nginx/sbin/nginx
ProcessPath string `protobuf:"bytes,5,opt,name=process_path,json=processPath,proto3" json:"process_path"`
- // Start Time
- // example: 1670429190000
+ // The start time of the NGINX instance.
+ // Example: 1670429190000
StartTime int64 `protobuf:"varint,6,opt,name=start_time,json=startTime,proto3" json:"start_time"`
- // Was NGINX built from source
- // example: false
+ // Determines if the NGINX instance was built from the source code in github or not.
+ // Example: false
BuiltFromSource bool `protobuf:"varint,7,opt,name=built_from_source,json=builtFromSource,proto3" json:"built_from_source"`
- // List of loadable modules
- // example: []
+ // List of NGINX loadable modules.
+ // Example: []
LoadableModules []string `protobuf:"bytes,8,rep,name=loadable_modules,json=loadableModules,proto3" json:"loadable_modules"`
- // List of runtime modules
- // example: [ "http_stub_status_module" ]
+ // List of NGINX runtime modules.
+ // Example: [ "http_stub_status_module" ]
RuntimeModules []string `protobuf:"bytes,9,rep,name=runtime_modules,json=runtimeModules,proto3" json:"runtime_modules"`
- // NGINX plus metadata
+ // NGINX Plus metadata.
Plus *NginxPlusMetaData `protobuf:"bytes,10,opt,name=plus,proto3" json:"plus"`
- // SSL metadata
+ // NGINX SSL metadata.
Ssl *NginxSslMetaData `protobuf:"bytes,11,opt,name=ssl,proto3" json:"ssl"`
- // Status URL
- // example: http://localhost:8080/api
+ // Status URL.
+ // Example: http://localhost:8080/api
StatusUrl string `protobuf:"bytes,12,opt,name=status_url,json=statusUrl,proto3" json:"status_url"`
- // Configuration arguments
- // example: [ "", "with-http_stub_status_module" ]
+ // Command line arguments that were used when the NGINX instance was started.
+ // Example: [ "", "with-http_stub_status_module" ]
ConfigureArgs []string `protobuf:"bytes,13,rep,name=configure_args,json=configureArgs,proto3" json:"configure_args"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -328,7 +176,7 @@ func (m *NginxDetails) Reset() { *m = NginxDetails{} }
func (m *NginxDetails) String() string { return proto.CompactTextString(m) }
func (*NginxDetails) ProtoMessage() {}
func (*NginxDetails) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{3}
+ return fileDescriptor_917f1a70b1fd7255, []int{0}
}
func (m *NginxDetails) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -449,12 +297,13 @@ func (m *NginxDetails) GetConfigureArgs() []string {
}
// swagger:model NginxPlusMetaData
+// Represents NGINX Plus metadata
type NginxPlusMetaData struct {
- // Is NGINX instance a plus instance
- // example: true
+ // Determines if its a plus instance or not.
+ // Example: true
Enabled bool `protobuf:"varint,1,opt,name=enabled,proto3" json:"enabled"`
- // NGINX plus release
- // example: R27
+ // NGINX Plus version.
+ // Example: R27
Release string `protobuf:"bytes,2,opt,name=release,proto3" json:"release"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -465,7 +314,7 @@ func (m *NginxPlusMetaData) Reset() { *m = NginxPlusMetaData{} }
func (m *NginxPlusMetaData) String() string { return proto.CompactTextString(m) }
func (*NginxPlusMetaData) ProtoMessage() {}
func (*NginxPlusMetaData) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{4}
+ return fileDescriptor_917f1a70b1fd7255, []int{1}
}
func (m *NginxPlusMetaData) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -509,12 +358,13 @@ func (m *NginxPlusMetaData) GetRelease() string {
}
// swagger:model NginxSslMetaData
+// Represents NGINX SSL metadata
type NginxSslMetaData struct {
- // SSL type
- // example: 0
+ // SSL Type.
+ // Example: 0
SslType NginxSslMetaData_NginxSslType `protobuf:"varint,1,opt,name=ssl_type,json=sslType,proto3,enum=f5.nginx.agent.sdk.NginxSslMetaData_NginxSslType" json:"ssl_type"`
- // SSL details
- // example: null
+ // List of SSL information (e.g. version, type, etc).
+ // Example: null
Details []string `protobuf:"bytes,2,rep,name=details,proto3" json:"details"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -525,7 +375,7 @@ func (m *NginxSslMetaData) Reset() { *m = NginxSslMetaData{} }
func (m *NginxSslMetaData) String() string { return proto.CompactTextString(m) }
func (*NginxSslMetaData) ProtoMessage() {}
func (*NginxSslMetaData) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{5}
+ return fileDescriptor_917f1a70b1fd7255, []int{2}
}
func (m *NginxSslMetaData) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -568,20 +418,24 @@ func (m *NginxSslMetaData) GetDetails() []string {
return nil
}
+// Represents the health of a NGINX instance
type NginxHealth struct {
- NginxId string `protobuf:"bytes,1,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
- NginxStatus NginxHealth_NginxStatus `protobuf:"varint,2,opt,name=nginx_status,json=nginxStatus,proto3,enum=f5.nginx.agent.sdk.NginxHealth_NginxStatus" json:"nginx_status"`
- DegradedReason string `protobuf:"bytes,3,opt,name=degraded_reason,json=degradedReason,proto3" json:"degraded_reason"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // NGINX ID
+ NginxId string `protobuf:"bytes,1,opt,name=nginx_id,json=nginxId,proto3" json:"nginx_id"`
+ // NGINX status
+ NginxStatus NginxHealth_NginxStatus `protobuf:"varint,2,opt,name=nginx_status,json=nginxStatus,proto3,enum=f5.nginx.agent.sdk.NginxHealth_NginxStatus" json:"nginx_status"`
+ // Provides an error message of why a NGINX instance is degraded
+ DegradedReason string `protobuf:"bytes,3,opt,name=degraded_reason,json=degradedReason,proto3" json:"degraded_reason"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *NginxHealth) Reset() { *m = NginxHealth{} }
func (m *NginxHealth) String() string { return proto.CompactTextString(m) }
func (*NginxHealth) ProtoMessage() {}
func (*NginxHealth) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{6}
+ return fileDescriptor_917f1a70b1fd7255, []int{3}
}
func (m *NginxHealth) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -631,25 +485,34 @@ func (m *NginxHealth) GetDegradedReason() string {
return ""
}
+// Represents a NGINX config
type NginxConfig struct {
- Action NginxConfigAction `protobuf:"varint,1,opt,name=action,proto3,enum=f5.nginx.agent.sdk.NginxConfigAction" json:"action"`
- ConfigData *ConfigDescriptor `protobuf:"bytes,2,opt,name=config_data,json=configData,proto3" json:"config_data"`
- Zconfig *ZippedFile `protobuf:"bytes,3,opt,name=zconfig,proto3" json:"zconfig"`
- Zaux *ZippedFile `protobuf:"bytes,4,opt,name=zaux,proto3" json:"zaux"`
- AccessLogs *AccessLogs `protobuf:"bytes,5,opt,name=access_logs,json=accessLogs,proto3" json:"access_logs"`
- ErrorLogs *ErrorLogs `protobuf:"bytes,6,opt,name=error_logs,json=errorLogs,proto3" json:"error_logs"`
- Ssl *SslCertificates `protobuf:"bytes,7,opt,name=ssl,proto3" json:"ssl"`
- DirectoryMap *DirectoryMap `protobuf:"bytes,8,opt,name=directory_map,json=directoryMap,proto3" json:"directory_map"`
- XXX_NoUnkeyedLiteral struct{} `json:"-"`
- XXX_unrecognized []byte `json:"-"`
- XXX_sizecache int32 `json:"-"`
+ // NGINX config action
+ Action NginxConfigAction `protobuf:"varint,1,opt,name=action,proto3,enum=f5.nginx.agent.sdk.NginxConfigAction" json:"action"`
+ // Metadata information about the configuration
+ ConfigData *ConfigDescriptor `protobuf:"bytes,2,opt,name=config_data,json=configData,proto3" json:"config_data"`
+ // Zipped file of all NGINX config files
+ Zconfig *ZippedFile `protobuf:"bytes,3,opt,name=zconfig,proto3" json:"zconfig"`
+ // Zipped file of all auxiliary files
+ Zaux *ZippedFile `protobuf:"bytes,4,opt,name=zaux,proto3" json:"zaux"`
+ // Information about all access log files
+ AccessLogs *AccessLogs `protobuf:"bytes,5,opt,name=access_logs,json=accessLogs,proto3" json:"access_logs"`
+ // Information about all error log files
+ ErrorLogs *ErrorLogs `protobuf:"bytes,6,opt,name=error_logs,json=errorLogs,proto3" json:"error_logs"`
+ // Information about all SSL certificates files
+ Ssl *SslCertificates `protobuf:"bytes,7,opt,name=ssl,proto3" json:"ssl"`
+ // Directory map of all config and aux files
+ DirectoryMap *DirectoryMap `protobuf:"bytes,8,opt,name=directory_map,json=directoryMap,proto3" json:"directory_map"`
+ XXX_NoUnkeyedLiteral struct{} `json:"-"`
+ XXX_unrecognized []byte `json:"-"`
+ XXX_sizecache int32 `json:"-"`
}
func (m *NginxConfig) Reset() { *m = NginxConfig{} }
func (m *NginxConfig) String() string { return proto.CompactTextString(m) }
func (*NginxConfig) ProtoMessage() {}
func (*NginxConfig) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{7}
+ return fileDescriptor_917f1a70b1fd7255, []int{4}
}
func (m *NginxConfig) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -734,7 +597,9 @@ func (m *NginxConfig) GetDirectoryMap() *DirectoryMap {
return nil
}
+// Represents access log files
type AccessLogs struct {
+ // List of access log files
AccessLog []*AccessLog `protobuf:"bytes,1,rep,name=access_log,json=accessLog,proto3" json:"access_log"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -745,7 +610,7 @@ func (m *AccessLogs) Reset() { *m = AccessLogs{} }
func (m *AccessLogs) String() string { return proto.CompactTextString(m) }
func (*AccessLogs) ProtoMessage() {}
func (*AccessLogs) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{8}
+ return fileDescriptor_917f1a70b1fd7255, []int{5}
}
func (m *AccessLogs) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -781,10 +646,15 @@ func (m *AccessLogs) GetAccessLog() []*AccessLog {
return nil
}
+// Represents an access log file
type AccessLog struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
- Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format"`
- Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions"`
+ // Name of file
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Format of the file
+ Format string `protobuf:"bytes,2,opt,name=format,proto3" json:"format"`
+ // File Permissions
+ Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions"`
+ // Determines if the file is readable or not
Readable bool `protobuf:"varint,4,opt,name=readable,proto3" json:"readable"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -795,7 +665,7 @@ func (m *AccessLog) Reset() { *m = AccessLog{} }
func (m *AccessLog) String() string { return proto.CompactTextString(m) }
func (*AccessLog) ProtoMessage() {}
func (*AccessLog) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{9}
+ return fileDescriptor_917f1a70b1fd7255, []int{6}
}
func (m *AccessLog) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -852,7 +722,9 @@ func (m *AccessLog) GetReadable() bool {
return false
}
+// Represents error log files
type ErrorLogs struct {
+ // List of error log files
ErrorLog []*ErrorLog `protobuf:"bytes,1,rep,name=error_log,json=errorLog,proto3" json:"error_log"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -863,7 +735,7 @@ func (m *ErrorLogs) Reset() { *m = ErrorLogs{} }
func (m *ErrorLogs) String() string { return proto.CompactTextString(m) }
func (*ErrorLogs) ProtoMessage() {}
func (*ErrorLogs) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{10}
+ return fileDescriptor_917f1a70b1fd7255, []int{7}
}
func (m *ErrorLogs) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -899,10 +771,15 @@ func (m *ErrorLogs) GetErrorLog() []*ErrorLog {
return nil
}
+// Represents an error log file
type ErrorLog struct {
- Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
- LogLevel string `protobuf:"bytes,2,opt,name=log_level,json=logLevel,proto3" json:"log_level"`
- Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions"`
+ // Name of file
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name"`
+ // Log level
+ LogLevel string `protobuf:"bytes,2,opt,name=log_level,json=logLevel,proto3" json:"log_level"`
+ // File Permissions
+ Permissions string `protobuf:"bytes,3,opt,name=permissions,proto3" json:"permissions"`
+ // Determines if the file is readable or not
Readable bool `protobuf:"varint,4,opt,name=readable,proto3" json:"readable"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@@ -913,7 +790,7 @@ func (m *ErrorLog) Reset() { *m = ErrorLog{} }
func (m *ErrorLog) String() string { return proto.CompactTextString(m) }
func (*ErrorLog) ProtoMessage() {}
func (*ErrorLog) Descriptor() ([]byte, []int) {
- return fileDescriptor_917f1a70b1fd7255, []int{11}
+ return fileDescriptor_917f1a70b1fd7255, []int{8}
}
func (m *ErrorLog) XXX_Unmarshal(b []byte) error {
return m.Unmarshal(b)
@@ -974,9 +851,6 @@ func init() {
proto.RegisterEnum("f5.nginx.agent.sdk.NginxConfigAction", NginxConfigAction_name, NginxConfigAction_value)
proto.RegisterEnum("f5.nginx.agent.sdk.NginxSslMetaData_NginxSslType", NginxSslMetaData_NginxSslType_name, NginxSslMetaData_NginxSslType_value)
proto.RegisterEnum("f5.nginx.agent.sdk.NginxHealth_NginxStatus", NginxHealth_NginxStatus_name, NginxHealth_NginxStatus_value)
- proto.RegisterType((*PlusInfo)(nil), "f5.nginx.agent.sdk.PlusInfo")
- proto.RegisterType((*SSLInfo)(nil), "f5.nginx.agent.sdk.SSLInfo")
- proto.RegisterType((*PathInfo)(nil), "f5.nginx.agent.sdk.PathInfo")
proto.RegisterType((*NginxDetails)(nil), "f5.nginx.agent.sdk.NginxDetails")
proto.RegisterType((*NginxPlusMetaData)(nil), "f5.nginx.agent.sdk.NginxPlusMetaData")
proto.RegisterType((*NginxSslMetaData)(nil), "f5.nginx.agent.sdk.NginxSslMetaData")
@@ -991,215 +865,80 @@ func init() {
func init() { proto.RegisterFile("nginx.proto", fileDescriptor_917f1a70b1fd7255) }
var fileDescriptor_917f1a70b1fd7255 = []byte{
- // 1240 bytes of a gzipped FileDescriptorProto
- 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xdd, 0x6e, 0xdc, 0xc4,
- 0x17, 0xaf, 0xb3, 0x49, 0xd6, 0x3e, 0xbb, 0x49, 0xb6, 0xf3, 0xff, 0x23, 0x6d, 0xab, 0x12, 0x47,
- 0x86, 0x8a, 0x50, 0x44, 0xa2, 0xa6, 0x20, 0x84, 0xa8, 0xa8, 0xf6, 0xab, 0x34, 0xea, 0x36, 0x8d,
- 0x26, 0x9b, 0x52, 0x72, 0xb3, 0x4c, 0xd6, 0x93, 0x8d, 0x55, 0xaf, 0xbd, 0x9a, 0xb1, 0xab, 0xb6,
- 0xcf, 0xc0, 0x93, 0x70, 0xc7, 0x25, 0x6f, 0xc0, 0x1d, 0x3c, 0x81, 0x85, 0x7a, 0xe9, 0x1b, 0x5e,
- 0x01, 0xcd, 0x99, 0xb1, 0x77, 0xf3, 0x45, 0x7b, 0x01, 0x37, 0xe3, 0x39, 0xbf, 0x39, 0xe7, 0xe7,
- 0x39, 0x9f, 0x36, 0xd4, 0xa2, 0x71, 0x10, 0xbd, 0xda, 0x9a, 0x8a, 0x38, 0x89, 0x09, 0x39, 0xf9,
- 0x72, 0x4b, 0xcb, 0x6c, 0xcc, 0xa3, 0x64, 0x4b, 0xfa, 0x2f, 0x6e, 0xc2, 0x38, 0x1e, 0xc7, 0xfa,
- 0xfc, 0x66, 0x7d, 0x14, 0x47, 0x27, 0xc1, 0x78, 0x26, 0x4d, 0x26, 0x71, 0xa4, 0x25, 0xef, 0x39,
- 0xd8, 0xfb, 0x61, 0x2a, 0x77, 0xa3, 0x93, 0x98, 0xdc, 0x86, 0x2a, 0x8f, 0xd8, 0x71, 0xc8, 0xfd,
- 0xa6, 0xb5, 0x61, 0x6d, 0xda, 0xed, 0x5a, 0x9e, 0xb9, 0x05, 0x44, 0x8b, 0x8d, 0x52, 0x13, 0x3c,
- 0xe4, 0x4c, 0xf2, 0xe6, 0xc2, 0x86, 0xb5, 0xe9, 0x68, 0x35, 0x03, 0xd1, 0x62, 0xe3, 0xf5, 0xa0,
- 0x7a, 0x70, 0xd0, 0x47, 0x62, 0x17, 0x96, 0x8e, 0xd3, 0x20, 0x4c, 0x9a, 0xd6, 0x46, 0x65, 0xd3,
- 0x69, 0x3b, 0x79, 0xe6, 0x6a, 0x80, 0xea, 0x07, 0xb9, 0x01, 0x15, 0x91, 0x46, 0xcd, 0x05, 0x3c,
- 0xae, 0xe6, 0x99, 0xab, 0x44, 0xaa, 0x16, 0xaf, 0x03, 0xf6, 0x3e, 0x4b, 0x4e, 0x91, 0xe7, 0x06,
- 0x54, 0x8e, 0x83, 0x08, 0x2f, 0x67, 0xd4, 0x8e, 0x83, 0x88, 0xaa, 0x85, 0xdc, 0x82, 0x45, 0xe5,
- 0xa5, 0xb9, 0x91, 0x9d, 0x67, 0x2e, 0xca, 0x14, 0x57, 0xef, 0xf7, 0x25, 0xa8, 0xef, 0xa9, 0x08,
- 0x75, 0x79, 0xc2, 0x82, 0x50, 0x92, 0x4f, 0xc0, 0xc6, 0x88, 0x0d, 0x03, 0xdf, 0xd0, 0xd5, 0xf3,
- 0xcc, 0x2d, 0x31, 0x5a, 0xc5, 0xdd, 0x2e, 0x3a, 0xfb, 0x92, 0x0b, 0x19, 0xc4, 0xd1, 0xbc, 0xb3,
- 0x06, 0xa2, 0xc5, 0x86, 0xdc, 0x01, 0x47, 0xbd, 0x68, 0x38, 0x65, 0xc9, 0x69, 0xb3, 0x82, 0x8a,
- 0x2b, 0x79, 0xe6, 0xce, 0x40, 0x6a, 0xab, 0xad, 0xf2, 0x84, 0x7c, 0x0e, 0x30, 0x15, 0xf1, 0x88,
- 0x4b, 0xa9, 0xde, 0xbe, 0x88, 0xca, 0xab, 0x79, 0xe6, 0xce, 0xa1, 0xd4, 0x31, 0xfb, 0x5d, 0x9f,
- 0xdc, 0x83, 0x7a, 0x71, 0x80, 0xec, 0x4b, 0x68, 0xd0, 0xc8, 0x33, 0xf7, 0x0c, 0x4e, 0x6b, 0x46,
- 0x2a, 0xde, 0x21, 0x13, 0x26, 0x92, 0x61, 0x12, 0x4c, 0x78, 0x73, 0x79, 0xc3, 0xda, 0xac, 0xe8,
- 0x77, 0xcc, 0x50, 0xea, 0xe0, 0x7e, 0x10, 0x4c, 0x38, 0x69, 0xc1, 0x75, 0x4c, 0xc4, 0xf0, 0x44,
- 0xc4, 0x93, 0xa1, 0x8c, 0x53, 0x31, 0xe2, 0xcd, 0x2a, 0xd6, 0xc0, 0x07, 0x79, 0xe6, 0x5e, 0x3c,
- 0xa4, 0x6b, 0x08, 0x3d, 0x14, 0xf1, 0xe4, 0x00, 0x01, 0xf2, 0x00, 0x1a, 0x61, 0xcc, 0x7c, 0x55,
- 0x22, 0xc3, 0x49, 0xec, 0xa7, 0x21, 0x97, 0x4d, 0x1b, 0xf3, 0xf9, 0xff, 0x3c, 0x73, 0x2f, 0x9c,
- 0xd1, 0xb5, 0x02, 0x79, 0xa2, 0x01, 0x72, 0x1f, 0xd6, 0x44, 0x1a, 0xa9, 0x9b, 0x95, 0xf6, 0x0e,
- 0xda, 0xff, 0x2f, 0xcf, 0xdc, 0xf3, 0x47, 0x74, 0xd5, 0x00, 0x85, 0x75, 0x07, 0x16, 0xa7, 0x61,
- 0x2a, 0x9b, 0xb0, 0x61, 0x6d, 0xd6, 0x76, 0x6e, 0x6f, 0x5d, 0x6c, 0x89, 0x2d, 0x2c, 0x00, 0x55,
- 0xec, 0x4f, 0x78, 0xc2, 0xba, 0x2c, 0x61, 0xba, 0x4c, 0x94, 0x19, 0xc5, 0x95, 0x3c, 0x80, 0x8a,
- 0x94, 0x61, 0xb3, 0x86, 0x1c, 0x1f, 0x5f, 0xc9, 0x71, 0x20, 0xc3, 0x92, 0x02, 0xab, 0x50, 0xca,
- 0x90, 0xaa, 0xc5, 0x84, 0x3d, 0x49, 0xe5, 0x30, 0x15, 0x61, 0xb3, 0x3e, 0x4b, 0xed, 0x0c, 0xc5,
- 0xb0, 0x27, 0xa9, 0x3c, 0x14, 0x21, 0xf9, 0x1a, 0x56, 0x75, 0x6b, 0xa6, 0x82, 0x0f, 0x99, 0x18,
- 0xcb, 0xe6, 0x0a, 0x7a, 0x4c, 0xf2, 0xcc, 0x3d, 0x77, 0x42, 0x57, 0x4a, 0xb9, 0x25, 0xc6, 0xd2,
- 0x63, 0x70, 0xfd, 0x82, 0x3f, 0xff, 0x72, 0x03, 0xff, 0x6a, 0x41, 0xe3, 0xbc, 0xbf, 0xe4, 0x08,
- 0x6c, 0x29, 0xc3, 0x61, 0xf2, 0x7a, 0xca, 0xf1, 0x1d, 0xab, 0x3b, 0x77, 0xdf, 0x27, 0x4e, 0x25,
- 0x30, 0x78, 0x3d, 0xe5, 0xba, 0xd7, 0x0a, 0x1a, 0x5a, 0x95, 0x1a, 0x56, 0xf7, 0xf2, 0x75, 0x7f,
- 0x9a, 0x49, 0x80, 0xf7, 0x32, 0x10, 0x2d, 0x36, 0x9e, 0x67, 0x7a, 0xd9, 0xb0, 0x11, 0x07, 0x96,
- 0xda, 0x87, 0xbb, 0xfd, 0x41, 0xe3, 0x1a, 0xa9, 0x42, 0x85, 0x1e, 0xee, 0x35, 0x2c, 0xef, 0xa7,
- 0x05, 0xa8, 0xa1, 0xd2, 0x23, 0xce, 0xc2, 0xe4, 0xf4, 0xfd, 0xfb, 0xfd, 0x47, 0xa8, 0x6b, 0x50,
- 0x67, 0x09, 0x03, 0xb4, 0xba, 0xf3, 0xd9, 0x95, 0x3e, 0x6a, 0x7e, 0xe3, 0x1e, 0x9a, 0xe8, 0xd6,
- 0x9c, 0x27, 0xa1, 0x7a, 0x5a, 0xeb, 0x63, 0x55, 0xe7, 0x3e, 0x1f, 0x0b, 0xe6, 0x73, 0x7f, 0x28,
- 0x38, 0x93, 0x71, 0x64, 0x06, 0x06, 0xd6, 0xf9, 0xb9, 0x23, 0xba, 0x5a, 0x00, 0x14, 0x65, 0xef,
- 0x0b, 0xe3, 0x97, 0x21, 0xab, 0x41, 0xf5, 0x70, 0xef, 0xf1, 0xde, 0xd3, 0xef, 0xf7, 0x1a, 0xd7,
- 0x08, 0xc0, 0x72, 0xab, 0x33, 0xd8, 0x7d, 0xd6, 0x6b, 0x58, 0xa4, 0x0e, 0x76, 0xb7, 0xf7, 0x1d,
- 0x6d, 0x75, 0x7b, 0xdd, 0xc6, 0x82, 0xf7, 0xd7, 0xa2, 0x31, 0xeb, 0x60, 0x11, 0x91, 0x5d, 0x58,
- 0x66, 0xa3, 0x44, 0x0d, 0x35, 0x9d, 0xc3, 0xab, 0xfb, 0x45, 0x1b, 0xb4, 0x50, 0xb9, 0x0d, 0x79,
- 0xe6, 0x1a, 0x43, 0x6a, 0x9e, 0xe4, 0x19, 0xd4, 0x74, 0x65, 0x0e, 0x7d, 0x96, 0x30, 0x8c, 0xd7,
- 0x15, 0xbd, 0xa3, 0xa9, 0xba, 0x5c, 0x8e, 0x44, 0x30, 0x4d, 0x62, 0xd1, 0x5e, 0xcb, 0x33, 0x77,
- 0xde, 0x98, 0x82, 0x16, 0xb0, 0xd0, 0x7a, 0x50, 0x7d, 0xa3, 0x45, 0x0c, 0x4f, 0x6d, 0x67, 0xfd,
- 0x32, 0xce, 0xa3, 0x60, 0x3a, 0xe5, 0xfe, 0xc3, 0x20, 0xe4, 0xba, 0x58, 0x8c, 0x09, 0x2d, 0x36,
- 0xe4, 0x3e, 0x2c, 0xbe, 0x61, 0xe9, 0x2b, 0x1c, 0xb3, 0xef, 0xe6, 0xc0, 0x81, 0xa0, 0xf4, 0x29,
- 0xae, 0x64, 0x1f, 0x6a, 0x6c, 0x84, 0x23, 0x36, 0x8c, 0xc7, 0x12, 0x47, 0xef, 0x15, 0x24, 0x2d,
- 0x54, 0xeb, 0xc7, 0x63, 0xa9, 0xdd, 0x9a, 0x33, 0xa3, 0xc0, 0xca, 0x43, 0xd2, 0x07, 0xe0, 0x42,
- 0xc4, 0x42, 0x13, 0x2e, 0x23, 0xe1, 0x87, 0x97, 0x11, 0xf6, 0x94, 0x16, 0xf2, 0xe1, 0x00, 0x99,
- 0x19, 0x51, 0x87, 0x17, 0x47, 0xe4, 0x5b, 0x3d, 0xb0, 0xaa, 0x48, 0xf3, 0xd1, 0x65, 0x34, 0x07,
- 0x32, 0xec, 0x70, 0x91, 0x04, 0x27, 0xc1, 0x88, 0x25, 0x5c, 0x9e, 0x9b, 0x57, 0xcf, 0x61, 0xc5,
- 0x0f, 0x04, 0x1f, 0x25, 0xb1, 0x78, 0x3d, 0x9c, 0xb0, 0x69, 0xd3, 0x46, 0xa6, 0x8d, 0xcb, 0x98,
- 0xba, 0x85, 0xe2, 0x13, 0x36, 0x6d, 0x5f, 0xcf, 0x33, 0xf7, 0xac, 0x29, 0xad, 0xfb, 0x73, 0x0a,
- 0xde, 0x11, 0x40, 0xeb, 0x8c, 0xd7, 0xb3, 0x80, 0xe0, 0x5f, 0xc0, 0x15, 0x5e, 0x97, 0x36, 0xda,
- 0xeb, 0x99, 0x11, 0x75, 0xca, 0x20, 0x7a, 0x3f, 0x5b, 0xe0, 0x94, 0x8a, 0xea, 0xcb, 0x1f, 0xb1,
- 0x09, 0x37, 0x6d, 0x8d, 0x19, 0x54, 0x32, 0xc5, 0x95, 0x78, 0xb0, 0x7c, 0x12, 0x8b, 0x09, 0x4b,
- 0xcc, 0xa8, 0xc3, 0x12, 0xd6, 0x08, 0x35, 0x4f, 0x72, 0x17, 0x6a, 0x53, 0x2e, 0x26, 0x81, 0x54,
- 0x9f, 0x72, 0x69, 0xba, 0x11, 0xb3, 0x38, 0x07, 0xd3, 0x79, 0x81, 0x6c, 0x82, 0x2d, 0xb8, 0xfe,
- 0x7e, 0x61, 0x69, 0xd9, 0x7a, 0x9e, 0x14, 0x18, 0x2d, 0x77, 0xde, 0x21, 0x38, 0x65, 0x2a, 0xc9,
- 0x23, 0x70, 0xca, 0x44, 0x9a, 0x30, 0xdc, 0xfa, 0xa7, 0xe4, 0xeb, 0x9f, 0x88, 0xd2, 0x84, 0xda,
- 0x45, 0xea, 0xbd, 0x5f, 0x2c, 0xb0, 0x0b, 0xad, 0x77, 0x84, 0xe0, 0x0e, 0x38, 0x61, 0x3c, 0x1e,
- 0x86, 0xfc, 0x25, 0x0f, 0x4d, 0x14, 0x90, 0xb6, 0x04, 0xa9, 0x1d, 0xc6, 0xe3, 0xbe, 0xda, 0xfd,
- 0xa7, 0xa1, 0xb8, 0x73, 0x64, 0xbe, 0x59, 0xf3, 0x33, 0xe5, 0xec, 0x04, 0x73, 0x60, 0xa9, 0xb5,
- 0xbf, 0xdf, 0xff, 0xa1, 0x61, 0x11, 0x1b, 0x16, 0x07, 0xbd, 0x83, 0x41, 0x63, 0x41, 0x8d, 0x32,
- 0xfa, 0xb4, 0xdf, 0x6f, 0xb7, 0x3a, 0x8f, 0x1b, 0x15, 0x35, 0xe4, 0x68, 0x6f, 0x70, 0x48, 0xf7,
- 0x1a, 0x8b, 0x4a, 0xfd, 0xe1, 0x53, 0xda, 0xe9, 0x35, 0x96, 0xda, 0x5f, 0xfd, 0xf6, 0x76, 0xdd,
- 0xfa, 0xe3, 0xed, 0xba, 0xf5, 0xe7, 0xdb, 0x75, 0xeb, 0xe8, 0xd3, 0x71, 0x90, 0x9c, 0xa6, 0xc7,
- 0x5b, 0xa3, 0x78, 0xb2, 0x8d, 0xb1, 0xdd, 0xc6, 0xd8, 0x6e, 0x4b, 0xff, 0xc5, 0xf6, 0xcb, 0x9d,
- 0x6d, 0xfc, 0xf5, 0xfd, 0x06, 0xd7, 0xe3, 0x65, 0x7c, 0xdc, 0xfb, 0x3b, 0x00, 0x00, 0xff, 0xff,
- 0xd1, 0x1d, 0x3e, 0xf9, 0x52, 0x0b, 0x00, 0x00,
-}
-
-func (m *PlusInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PlusInfo) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *PlusInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if len(m.Release) > 0 {
- i -= len(m.Release)
- copy(dAtA[i:], m.Release)
- i = encodeVarintNginx(dAtA, i, uint64(len(m.Release)))
- i--
- dAtA[i] = 0x12
- }
- if m.Enabled {
- i--
- if m.Enabled {
- dAtA[i] = 1
- } else {
- dAtA[i] = 0
- }
- i--
- dAtA[i] = 0x8
- }
- return len(dAtA) - i, nil
-}
-
-func (m *SSLInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *SSLInfo) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *SSLInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if len(m.Run) > 0 {
- for iNdEx := len(m.Run) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.Run[iNdEx])
- copy(dAtA[i:], m.Run[iNdEx])
- i = encodeVarintNginx(dAtA, i, uint64(len(m.Run[iNdEx])))
- i--
- dAtA[i] = 0x12
- }
- }
- if len(m.Built) > 0 {
- for iNdEx := len(m.Built) - 1; iNdEx >= 0; iNdEx-- {
- i -= len(m.Built[iNdEx])
- copy(dAtA[i:], m.Built[iNdEx])
- i = encodeVarintNginx(dAtA, i, uint64(len(m.Built[iNdEx])))
- i--
- dAtA[i] = 0xa
- }
- }
- return len(dAtA) - i, nil
-}
-
-func (m *PathInfo) Marshal() (dAtA []byte, err error) {
- size := m.Size()
- dAtA = make([]byte, size)
- n, err := m.MarshalToSizedBuffer(dAtA[:size])
- if err != nil {
- return nil, err
- }
- return dAtA[:n], nil
-}
-
-func (m *PathInfo) MarshalTo(dAtA []byte) (int, error) {
- size := m.Size()
- return m.MarshalToSizedBuffer(dAtA[:size])
-}
-
-func (m *PathInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) {
- i := len(dAtA)
- _ = i
- var l int
- _ = l
- if m.XXX_unrecognized != nil {
- i -= len(m.XXX_unrecognized)
- copy(dAtA[i:], m.XXX_unrecognized)
- }
- if len(m.Conf) > 0 {
- i -= len(m.Conf)
- copy(dAtA[i:], m.Conf)
- i = encodeVarintNginx(dAtA, i, uint64(len(m.Conf)))
- i--
- dAtA[i] = 0x12
- }
- if len(m.Bin) > 0 {
- i -= len(m.Bin)
- copy(dAtA[i:], m.Bin)
- i = encodeVarintNginx(dAtA, i, uint64(len(m.Bin)))
- i--
- dAtA[i] = 0xa
- }
- return len(dAtA) - i, nil
+ // 1166 bytes of a gzipped FileDescriptorProto
+ 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x56, 0xcd, 0x6e, 0xdb, 0x46,
+ 0x10, 0x0e, 0x2d, 0xd9, 0x22, 0x47, 0xb2, 0xcd, 0x6c, 0x5b, 0x80, 0x28, 0x52, 0x53, 0x60, 0x1b,
+ 0xd4, 0x4d, 0x51, 0x1b, 0x71, 0x5a, 0x14, 0x45, 0x83, 0x06, 0x92, 0xa5, 0x34, 0x46, 0x14, 0xc7,
+ 0x58, 0xcb, 0x69, 0xeb, 0x0b, 0xbb, 0x16, 0xd7, 0x34, 0x11, 0x4a, 0x14, 0x76, 0xa9, 0x20, 0xc9,
+ 0x33, 0xf4, 0x49, 0x7a, 0xeb, 0xb1, 0x6f, 0xd0, 0x5b, 0xfb, 0x04, 0x44, 0x91, 0x23, 0x2f, 0x7d,
+ 0x85, 0x82, 0xb3, 0x4b, 0x4a, 0xfe, 0x6b, 0x72, 0xe9, 0x85, 0x9a, 0xf9, 0x76, 0xbe, 0x6f, 0x39,
+ 0xb3, 0xb3, 0x43, 0x41, 0x73, 0x12, 0x46, 0x93, 0x97, 0x5b, 0x53, 0x91, 0xa4, 0x09, 0x21, 0xa7,
+ 0x5f, 0x6d, 0x29, 0x9f, 0x85, 0x7c, 0x92, 0x6e, 0xc9, 0xe0, 0xf9, 0x87, 0xad, 0x51, 0x32, 0x1e,
+ 0x27, 0x13, 0x15, 0x51, 0x78, 0x93, 0xd3, 0x28, 0xd4, 0x1e, 0x84, 0x49, 0x98, 0x28, 0xdb, 0xfb,
+ 0x73, 0x19, 0x5a, 0xfb, 0x05, 0xb7, 0xc7, 0x53, 0x16, 0xc5, 0x92, 0x7c, 0x0a, 0x26, 0x6a, 0xf9,
+ 0x51, 0xe0, 0x18, 0x6d, 0x63, 0xd3, 0xea, 0xb6, 0xf2, 0xcc, 0xad, 0x30, 0xda, 0x40, 0x6b, 0x2f,
+ 0x20, 0xb7, 0xa1, 0xf1, 0x82, 0x0b, 0x19, 0x25, 0x13, 0x67, 0x09, 0xe3, 0x9a, 0x79, 0xe6, 0x96,
+ 0x10, 0x2d, 0x0d, 0x72, 0x07, 0xac, 0x62, 0x73, 0x7f, 0xca, 0xd2, 0x33, 0xa7, 0x86, 0x81, 0xab,
+ 0x79, 0xe6, 0xce, 0x41, 0x6a, 0x16, 0xe6, 0x01, 0x4b, 0xcf, 0xc8, 0x17, 0x00, 0x53, 0x91, 0x8c,
+ 0xb8, 0x94, 0xc5, 0xee, 0x75, 0x0c, 0x5e, 0xcb, 0x33, 0x77, 0x01, 0xa5, 0x96, 0xb6, 0xf7, 0x02,
+ 0x72, 0x0f, 0x5a, 0xe5, 0x02, 0xaa, 0x2f, 0x23, 0xc1, 0xce, 0x33, 0xf7, 0x1c, 0x4e, 0x9b, 0xda,
+ 0x2b, 0xf7, 0x90, 0x29, 0x13, 0xa9, 0x9f, 0x46, 0x63, 0xee, 0xac, 0xb4, 0x8d, 0xcd, 0x9a, 0xda,
+ 0x63, 0x8e, 0x52, 0x0b, 0xed, 0x61, 0x34, 0xe6, 0xa4, 0x03, 0x37, 0x4f, 0x66, 0x51, 0x9c, 0xfa,
+ 0xa7, 0x22, 0x19, 0xfb, 0x32, 0x99, 0x89, 0x11, 0x77, 0x1a, 0x6d, 0x63, 0xd3, 0xec, 0x7e, 0x90,
+ 0x67, 0xee, 0xe5, 0x45, 0xba, 0x8e, 0xd0, 0x43, 0x91, 0x8c, 0x0f, 0x11, 0x20, 0x0f, 0xc0, 0x8e,
+ 0x13, 0x16, 0xb0, 0x93, 0x98, 0xfb, 0xe3, 0x24, 0x98, 0xc5, 0x5c, 0x3a, 0x66, 0xbb, 0xb6, 0x69,
+ 0x75, 0xdf, 0xcf, 0x33, 0xf7, 0xd2, 0x1a, 0x5d, 0x2f, 0x91, 0x27, 0x0a, 0x20, 0xf7, 0x61, 0x5d,
+ 0xcc, 0x26, 0xc5, 0x9b, 0x55, 0x7c, 0x0b, 0xf9, 0xef, 0xe5, 0x99, 0x7b, 0x71, 0x89, 0xae, 0x69,
+ 0xa0, 0x64, 0xef, 0x42, 0x7d, 0x1a, 0xcf, 0xa4, 0x03, 0x6d, 0x63, 0xb3, 0xb9, 0x73, 0x7b, 0xeb,
+ 0x72, 0xb3, 0x6c, 0x61, 0x03, 0x1c, 0xc4, 0x33, 0xf9, 0x84, 0xa7, 0xac, 0xc7, 0x52, 0xd6, 0x35,
+ 0xf3, 0xcc, 0x45, 0x1a, 0xc5, 0x27, 0x79, 0x00, 0x35, 0x29, 0x63, 0xa7, 0x89, 0x1a, 0x9f, 0x5c,
+ 0xab, 0x71, 0x28, 0xe3, 0x4a, 0xa2, 0x91, 0x67, 0x6e, 0x41, 0xa2, 0xc5, 0x43, 0x97, 0x3d, 0x9d,
+ 0x49, 0x7f, 0x26, 0x62, 0xa7, 0x35, 0x3f, 0xda, 0x39, 0x8a, 0x65, 0x4f, 0x67, 0xf2, 0x48, 0xc4,
+ 0xe4, 0x1b, 0x58, 0x53, 0x2d, 0x3b, 0x13, 0xdc, 0x67, 0x22, 0x94, 0xce, 0x2a, 0x66, 0x4c, 0xf2,
+ 0xcc, 0xbd, 0xb0, 0x42, 0x57, 0x2b, 0xbf, 0x23, 0x42, 0xe9, 0x31, 0xb8, 0x79, 0x29, 0x9f, 0xa2,
+ 0x59, 0xf9, 0xa4, 0xa8, 0xa9, 0x6a, 0x6a, 0x53, 0x35, 0xab, 0x86, 0x68, 0x69, 0x14, 0x61, 0x82,
+ 0xc7, 0x9c, 0x49, 0xbe, 0xd8, 0xd3, 0x1a, 0xa2, 0xa5, 0xe1, 0xfd, 0x6e, 0x80, 0x7d, 0x31, 0x5f,
+ 0x72, 0x0c, 0xa6, 0x94, 0xb1, 0x9f, 0xbe, 0x9a, 0x72, 0xdc, 0x63, 0x6d, 0xe7, 0xee, 0xbb, 0xd4,
+ 0xa9, 0x02, 0x86, 0xaf, 0xa6, 0x5c, 0xdd, 0xb5, 0x52, 0x86, 0x36, 0xa4, 0x82, 0x8b, 0xf7, 0x0a,
+ 0xd4, 0xfd, 0x74, 0x96, 0xb0, 0x0e, 0xf8, 0x5e, 0x1a, 0xa2, 0xa5, 0xe1, 0x79, 0xfa, 0x2e, 0x6b,
+ 0x35, 0x62, 0xc1, 0x72, 0xf7, 0x68, 0x6f, 0x30, 0xb4, 0x6f, 0x90, 0x06, 0xd4, 0xe8, 0xd1, 0xbe,
+ 0x6d, 0x78, 0xbf, 0x2c, 0x41, 0x13, 0x83, 0x1e, 0x71, 0x16, 0xa7, 0x67, 0xef, 0x7e, 0xdf, 0x7f,
+ 0x86, 0x96, 0x02, 0xd5, 0x29, 0x61, 0x81, 0xd6, 0x76, 0x3e, 0xbf, 0x36, 0x47, 0xa5, 0xaf, 0xd3,
+ 0x43, 0x8a, 0xba, 0x9a, 0x8b, 0x22, 0x54, 0xcd, 0x31, 0xb5, 0x5c, 0xf4, 0x79, 0xc0, 0x43, 0xc1,
+ 0x02, 0x1e, 0xf8, 0x82, 0x33, 0x99, 0x4c, 0xf4, 0xc0, 0xc0, 0x3e, 0xbf, 0xb0, 0x44, 0xd7, 0x4a,
+ 0x80, 0xa2, 0xef, 0x7d, 0xa9, 0xf3, 0xd2, 0x62, 0x4d, 0x68, 0x1c, 0xed, 0x3f, 0xde, 0x7f, 0xfa,
+ 0xc3, 0xbe, 0x7d, 0x83, 0x00, 0xac, 0x74, 0x76, 0x87, 0x7b, 0xcf, 0xfa, 0xb6, 0x41, 0x5a, 0x60,
+ 0xf6, 0xfa, 0xdf, 0xd3, 0x4e, 0xaf, 0xdf, 0xb3, 0x97, 0xbc, 0x7f, 0xea, 0x9a, 0xb6, 0x8b, 0x4d,
+ 0x44, 0xf6, 0x60, 0x85, 0x8d, 0xd2, 0x62, 0xa8, 0xa9, 0x33, 0xbc, 0xfe, 0xbe, 0x28, 0x42, 0x07,
+ 0x83, 0xbb, 0x90, 0x67, 0xae, 0x26, 0x52, 0xfd, 0x4b, 0x9e, 0x41, 0x53, 0x75, 0xa6, 0x1f, 0xb0,
+ 0x94, 0x61, 0xbd, 0xae, 0xb9, 0x3b, 0x4a, 0xaa, 0xc7, 0xe5, 0x48, 0x44, 0xd3, 0x34, 0x11, 0xdd,
+ 0xf5, 0x3c, 0x73, 0x17, 0xc9, 0x14, 0x94, 0x83, 0x8d, 0xd6, 0x87, 0xc6, 0x6b, 0xe5, 0x62, 0x79,
+ 0x9a, 0x3b, 0x1b, 0x57, 0x69, 0x1e, 0x47, 0xd3, 0x29, 0x0f, 0x1e, 0x46, 0x31, 0x57, 0xcd, 0xa2,
+ 0x29, 0xb4, 0x34, 0xc8, 0x7d, 0xa8, 0xbf, 0x66, 0xb3, 0x97, 0x38, 0x66, 0xdf, 0xae, 0x81, 0x03,
+ 0xa1, 0x88, 0xa7, 0xf8, 0x24, 0x07, 0xd0, 0x64, 0x23, 0x1c, 0xb1, 0x71, 0x12, 0x4a, 0x1c, 0xbd,
+ 0xd7, 0x88, 0x74, 0x30, 0x6c, 0x90, 0x84, 0x52, 0xa5, 0xb5, 0x40, 0xa3, 0xc0, 0xaa, 0x45, 0x32,
+ 0x00, 0xe0, 0x42, 0x24, 0x42, 0x09, 0xae, 0xa0, 0xe0, 0x47, 0x57, 0x09, 0xf6, 0x8b, 0x28, 0xd4,
+ 0xc3, 0x01, 0x32, 0x27, 0x51, 0x8b, 0x97, 0x4b, 0xe4, 0x3b, 0x35, 0xb0, 0x1a, 0x28, 0xf3, 0xf1,
+ 0x55, 0x32, 0x87, 0x32, 0xde, 0xe5, 0x22, 0x8d, 0x4e, 0xa3, 0x11, 0x4b, 0xb9, 0xbc, 0x30, 0xaf,
+ 0x7e, 0x84, 0xd5, 0x20, 0x12, 0x7c, 0x94, 0x26, 0xe2, 0x95, 0x3f, 0x66, 0x53, 0xc7, 0x44, 0xa5,
+ 0xf6, 0x55, 0x4a, 0xbd, 0x32, 0xf0, 0x09, 0x9b, 0x76, 0x6f, 0xe6, 0x99, 0x7b, 0x9e, 0x4a, 0x5b,
+ 0xc1, 0x42, 0x80, 0x77, 0x0c, 0xd0, 0x39, 0x97, 0xf5, 0xbc, 0x20, 0x8e, 0xd1, 0xae, 0x5d, 0x97,
+ 0x75, 0xc5, 0x51, 0x59, 0xcf, 0x49, 0xd4, 0xaa, 0x8a, 0xe8, 0xfd, 0x6a, 0x80, 0x55, 0x05, 0x92,
+ 0x5b, 0x50, 0x9f, 0xb0, 0x31, 0xd7, 0xd7, 0x1a, 0x4f, 0xb0, 0xf0, 0x29, 0x3e, 0x89, 0x07, 0x2b,
+ 0xa7, 0x89, 0x18, 0xb3, 0x54, 0x8f, 0x3a, 0x6c, 0x61, 0x85, 0x50, 0xfd, 0x4b, 0xee, 0x42, 0x73,
+ 0xca, 0xc5, 0x38, 0x92, 0xc5, 0xa7, 0x5c, 0xea, 0xdb, 0x88, 0xa7, 0xb8, 0x00, 0xd3, 0x45, 0x87,
+ 0x6c, 0x82, 0x29, 0xb8, 0xfa, 0x7e, 0x61, 0x6b, 0x99, 0x6a, 0x9e, 0x94, 0x18, 0xad, 0x2c, 0xef,
+ 0x08, 0xac, 0xea, 0x28, 0xc9, 0x23, 0xb0, 0xaa, 0x83, 0xd4, 0x65, 0xb8, 0xf5, 0x5f, 0x87, 0xaf,
+ 0xfe, 0x44, 0x54, 0x14, 0x6a, 0x96, 0x47, 0xef, 0xfd, 0x66, 0x80, 0x59, 0x46, 0xbd, 0xa5, 0x04,
+ 0x77, 0xc0, 0x8a, 0x93, 0xd0, 0x8f, 0xf9, 0x0b, 0x1e, 0xeb, 0x2a, 0xa0, 0x6c, 0x05, 0x52, 0x33,
+ 0x4e, 0xc2, 0x41, 0x61, 0xfd, 0xaf, 0xa5, 0xb8, 0x73, 0xac, 0xbf, 0x59, 0x8b, 0x33, 0xe5, 0xfc,
+ 0x04, 0xb3, 0x60, 0xb9, 0x73, 0x70, 0x30, 0xf8, 0xc9, 0x36, 0x88, 0x09, 0xf5, 0x61, 0xff, 0x70,
+ 0x68, 0x2f, 0x15, 0xa3, 0x8c, 0x3e, 0x1d, 0x0c, 0xba, 0x9d, 0xdd, 0xc7, 0x76, 0xad, 0x18, 0x72,
+ 0xb4, 0x3f, 0x3c, 0xa2, 0xfb, 0x76, 0xbd, 0x08, 0x7f, 0xf8, 0x94, 0xee, 0xf6, 0xed, 0xe5, 0xee,
+ 0xd7, 0x7f, 0xbc, 0xd9, 0x30, 0xfe, 0x7a, 0xb3, 0x61, 0xfc, 0xfd, 0x66, 0xc3, 0x38, 0xfe, 0x2c,
+ 0x8c, 0xd2, 0xb3, 0xd9, 0xc9, 0xd6, 0x28, 0x19, 0x6f, 0x63, 0x6d, 0xb7, 0xb1, 0xb6, 0xdb, 0x32,
+ 0x78, 0xbe, 0xfd, 0x62, 0x67, 0x1b, 0xff, 0x14, 0x7e, 0x8b, 0xcf, 0x93, 0x15, 0xfc, 0xb9, 0xf7,
+ 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x80, 0x5c, 0xfb, 0x6c, 0x0a, 0x00, 0x00,
}
func (m *NginxDetails) Marshal() (dAtA []byte, err error) {
@@ -1793,90 +1532,27 @@ func encodeVarintNginx(dAtA []byte, offset int, v uint64) int {
dAtA[offset] = uint8(v)
return base
}
-func (m *PlusInfo) Size() (n int) {
+func (m *NginxDetails) Size() (n int) {
if m == nil {
return 0
}
var l int
_ = l
- if m.Enabled {
- n += 2
+ l = len(m.NginxId)
+ if l > 0 {
+ n += 1 + l + sovNginx(uint64(l))
}
- l = len(m.Release)
+ l = len(m.Version)
if l > 0 {
n += 1 + l + sovNginx(uint64(l))
}
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
+ l = len(m.ConfPath)
+ if l > 0 {
+ n += 1 + l + sovNginx(uint64(l))
}
- return n
-}
-
-func (m *SSLInfo) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- if len(m.Built) > 0 {
- for _, s := range m.Built {
- l = len(s)
- n += 1 + l + sovNginx(uint64(l))
- }
- }
- if len(m.Run) > 0 {
- for _, s := range m.Run {
- l = len(s)
- n += 1 + l + sovNginx(uint64(l))
- }
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
-}
-
-func (m *PathInfo) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.Bin)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
- }
- l = len(m.Conf)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
- }
- if m.XXX_unrecognized != nil {
- n += len(m.XXX_unrecognized)
- }
- return n
-}
-
-func (m *NginxDetails) Size() (n int) {
- if m == nil {
- return 0
- }
- var l int
- _ = l
- l = len(m.NginxId)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
- }
- l = len(m.Version)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
- }
- l = len(m.ConfPath)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
- }
- l = len(m.ProcessId)
- if l > 0 {
- n += 1 + l + sovNginx(uint64(l))
+ l = len(m.ProcessId)
+ if l > 0 {
+ n += 1 + l + sovNginx(uint64(l))
}
l = len(m.ProcessPath)
if l > 0 {
@@ -2126,339 +1802,6 @@ func sovNginx(x uint64) (n int) {
func sozNginx(x uint64) (n int) {
return sovNginx(uint64((x << 1) ^ uint64((int64(x) >> 63))))
}
-func (m *PlusInfo) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PlusInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PlusInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 0 {
- return fmt.Errorf("proto: wrong wireType = %d for field Enabled", wireType)
- }
- var v int
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- v |= int(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- m.Enabled = bool(v != 0)
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Release", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthNginx
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthNginx
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Release = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipNginx(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNginx
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *SSLInfo) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: SSLInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: SSLInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Built", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthNginx
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthNginx
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Built = append(m.Built, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Run", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthNginx
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthNginx
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Run = append(m.Run, string(dAtA[iNdEx:postIndex]))
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipNginx(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNginx
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
-func (m *PathInfo) Unmarshal(dAtA []byte) error {
- l := len(dAtA)
- iNdEx := 0
- for iNdEx < l {
- preIndex := iNdEx
- var wire uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- wire |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- fieldNum := int32(wire >> 3)
- wireType := int(wire & 0x7)
- if wireType == 4 {
- return fmt.Errorf("proto: PathInfo: wiretype end group for non-group")
- }
- if fieldNum <= 0 {
- return fmt.Errorf("proto: PathInfo: illegal tag %d (wire type %d)", fieldNum, wire)
- }
- switch fieldNum {
- case 1:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Bin", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthNginx
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthNginx
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Bin = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- case 2:
- if wireType != 2 {
- return fmt.Errorf("proto: wrong wireType = %d for field Conf", wireType)
- }
- var stringLen uint64
- for shift := uint(0); ; shift += 7 {
- if shift >= 64 {
- return ErrIntOverflowNginx
- }
- if iNdEx >= l {
- return io.ErrUnexpectedEOF
- }
- b := dAtA[iNdEx]
- iNdEx++
- stringLen |= uint64(b&0x7F) << shift
- if b < 0x80 {
- break
- }
- }
- intStringLen := int(stringLen)
- if intStringLen < 0 {
- return ErrInvalidLengthNginx
- }
- postIndex := iNdEx + intStringLen
- if postIndex < 0 {
- return ErrInvalidLengthNginx
- }
- if postIndex > l {
- return io.ErrUnexpectedEOF
- }
- m.Conf = string(dAtA[iNdEx:postIndex])
- iNdEx = postIndex
- default:
- iNdEx = preIndex
- skippy, err := skipNginx(dAtA[iNdEx:])
- if err != nil {
- return err
- }
- if (skippy < 0) || (iNdEx+skippy) < 0 {
- return ErrInvalidLengthNginx
- }
- if (iNdEx + skippy) > l {
- return io.ErrUnexpectedEOF
- }
- m.XXX_unrecognized = append(m.XXX_unrecognized, dAtA[iNdEx:iNdEx+skippy]...)
- iNdEx += skippy
- }
- }
-
- if iNdEx > l {
- return io.ErrUnexpectedEOF
- }
- return nil
-}
func (m *NginxDetails) Unmarshal(dAtA []byte) error {
l := len(dAtA)
iNdEx := 0
diff --git a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nginx.proto b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nginx.proto
index 305809568..7ac92921b 100644
--- a/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nginx.proto
+++ b/test/performance/vendor/github.com/nginx/agent/sdk/v2/proto/nginx.proto
@@ -1,142 +1,170 @@
-
syntax = "proto3";
package f5.nginx.agent.sdk;
-option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
-import "gogo.proto";
-import "config.proto";
-import "common.proto";
-
-message PlusInfo {
- bool enabled = 1 [(gogoproto.jsontag) = "enabled" ];
- string release = 2 [(gogoproto.jsontag) = "release" ];
-}
-message SSLInfo {
- repeated string built = 1 [(gogoproto.jsontag) = "built" ];
- repeated string run = 2 [(gogoproto.jsontag) = "run" ];
-}
+import "common.proto";
+import "config.proto";
+import "gogo.proto";
-message PathInfo {
- string bin = 1 [(gogoproto.jsontag) = "bin" ];
- string conf = 2 [(gogoproto.jsontag) = "conf" ];
-}
+option go_package = "github.com/nginx/agent/sdk/v2/proto;proto";
// swagger:model NginxDetails
-// Each NGINXDetails is associated with with a single NGINX instance.
+// Represents NGINX details about a single NGINX instance
message NginxDetails {
- // NGINX ID
- // example: b636d4376dea15405589692d3c5d3869ff3a9b26b0e7bb4bb1aa7e658ace1437
- string nginx_id = 1 [(gogoproto.jsontag) = "nginx_id" ];
- // Version of NGINX
- // example: 1.23.2
- string version = 2 [(gogoproto.jsontag) = "version" ];
- // Path to configuration file
- // example: /usr/local/nginx/conf/nginx.conf
- string conf_path = 3 [(gogoproto.jsontag) = "conf_path" ];
- // Process ID
- // example: 8
- string process_id = 4 [(gogoproto.jsontag) = "process_id" ];
- // Process Path
- // example: /usr/local/nginx/sbin/nginx
- string process_path = 5 [(gogoproto.jsontag) = "process_path" ];
- // Start Time
- // example: 1670429190000
- int64 start_time = 6 [(gogoproto.jsontag) = "start_time" ];
- // Was NGINX built from source
- // example: false
- bool built_from_source = 7 [(gogoproto.jsontag) = "built_from_source" ];
- // List of loadable modules
- // example: []
- repeated string loadable_modules = 8 [(gogoproto.jsontag) = "loadable_modules" ];
- // List of runtime modules
- // example: [ "http_stub_status_module" ]
- repeated string runtime_modules = 9 [(gogoproto.jsontag) = "runtime_modules" ];
- // NGINX plus metadata
- NginxPlusMetaData plus = 10 [(gogoproto.jsontag) = "plus" ];
- // SSL metadata
- NginxSslMetaData ssl = 11 [(gogoproto.jsontag) = "ssl" ];
- // Status URL
- // example: http://localhost:8080/api
- string status_url = 12 [(gogoproto.jsontag) = "status_url" ];
- // Configuration arguments
- // example: [ "", "with-http_stub_status_module" ]
- repeated string configure_args = 13 [(gogoproto.jsontag) = "configure_args" ];
+ // NGINX ID.
+ // Example: b636d4376dea15405589692d3c5d3869ff3a9b26b0e7bb4bb1aa7e658ace1437
+ string nginx_id = 1 [(gogoproto.jsontag) = "nginx_id"];
+ // NGINX version.
+ // Example: 1.23.2
+ string version = 2 [(gogoproto.jsontag) = "version"];
+ // Path to NGINX configuration.
+ // Example: /usr/local/nginx/conf/nginx.conf
+ string conf_path = 3 [(gogoproto.jsontag) = "conf_path"];
+ // Process ID of NGINX instance.
+ // Example: 8
+ string process_id = 4 [(gogoproto.jsontag) = "process_id"];
+ // The path to the NGINX executable.
+ // Example: /usr/local/nginx/sbin/nginx
+ string process_path = 5 [(gogoproto.jsontag) = "process_path"];
+ // The start time of the NGINX instance.
+ // Example: 1670429190000
+ int64 start_time = 6 [(gogoproto.jsontag) = "start_time"];
+ // Determines if the NGINX instance was built from the source code in github or not.
+ // Example: false
+ bool built_from_source = 7 [(gogoproto.jsontag) = "built_from_source"];
+ // List of NGINX loadable modules.
+ // Example: []
+ repeated string loadable_modules = 8 [(gogoproto.jsontag) = "loadable_modules"];
+ // List of NGINX runtime modules.
+ // Example: [ "http_stub_status_module" ]
+ repeated string runtime_modules = 9 [(gogoproto.jsontag) = "runtime_modules"];
+ // NGINX Plus metadata.
+ NginxPlusMetaData plus = 10 [(gogoproto.jsontag) = "plus"];
+ // NGINX SSL metadata.
+ NginxSslMetaData ssl = 11 [(gogoproto.jsontag) = "ssl"];
+ // Status URL.
+ // Example: http://localhost:8080/api
+ string status_url = 12 [(gogoproto.jsontag) = "status_url"];
+ // Command line arguments that were used when the NGINX instance was started.
+ // Example: [ "", "with-http_stub_status_module" ]
+ repeated string configure_args = 13 [(gogoproto.jsontag) = "configure_args"];
}
// swagger:model NginxPlusMetaData
+// Represents NGINX Plus metadata
message NginxPlusMetaData {
- // Is NGINX instance a plus instance
- // example: true
- bool enabled = 1 [(gogoproto.jsontag) = "enabled" ];
- // NGINX plus release
- // example: R27
- string release = 2 [(gogoproto.jsontag) = "release" ];
+ // Determines if its a plus instance or not.
+ // Example: true
+ bool enabled = 1 [(gogoproto.jsontag) = "enabled"];
+ // NGINX Plus version.
+ // Example: R27
+ string release = 2 [(gogoproto.jsontag) = "release"];
}
// swagger:model NginxSslMetaData
+// Represents NGINX SSL metadata
message NginxSslMetaData {
// SSL type enum
enum NginxSslType {
+ // SSL complied with NGINX
BUILT = 0;
+ // SSL not complied with NGINX
RUN = 1;
}
- // SSL type
- // example: 0
- NginxSslType ssl_type = 1 [(gogoproto.jsontag) = "ssl_type" ];
- // SSL details
- // example: null
- repeated string details = 2 [(gogoproto.jsontag) = "details" ];
+ // SSL Type.
+ // Example: 0
+ NginxSslType ssl_type = 1 [(gogoproto.jsontag) = "ssl_type"];
+ // List of SSL information (e.g. version, type, etc).
+ // Example: null
+ repeated string details = 2 [(gogoproto.jsontag) = "details"];
}
+// Represents the health of a NGINX instance
message NginxHealth {
+ // NGINX status enum
enum NginxStatus {
- UNKNOWN = 0;
- ACTIVE = 1;
- DEGRADED = 2;
- }
- string nginx_id = 1 [(gogoproto.jsontag) = "nginx_id" ];
- NginxStatus nginx_status = 2 [(gogoproto.jsontag) = "nginx_status" ];
- string degraded_reason = 3 [(gogoproto.jsontag) = "degraded_reason" ];
+ // Unknown status
+ UNKNOWN = 0;
+ // Active status
+ ACTIVE = 1;
+ // Degraded status
+ DEGRADED = 2;
+ }
+ // NGINX ID
+ string nginx_id = 1 [(gogoproto.jsontag) = "nginx_id"];
+ // NGINX status
+ NginxStatus nginx_status = 2 [(gogoproto.jsontag) = "nginx_status"];
+ // Provides an error message of why a NGINX instance is degraded
+ string degraded_reason = 3 [(gogoproto.jsontag) = "degraded_reason"];
}
+// NGINX config action enum
enum NginxConfigAction {
+ // Unknown action
UNKNOWN = 0;
+ // Apply config action
APPLY = 1;
+ // Test config action (This will be implemented in a future release)
TEST = 2;
+ // Rollback config action (This will be implemented in a future release)
ROLLBACK = 3;
+ // Return config action (This will be implemented in a future release)
RETURN = 4;
+ // Force config apply action
FORCE = 5;
}
+// Represents a NGINX config
message NginxConfig {
- NginxConfigAction action = 1 [(gogoproto.jsontag) = "action" ];
- ConfigDescriptor config_data = 2 [(gogoproto.jsontag) = "config_data" ];
- ZippedFile zconfig = 3 [(gogoproto.jsontag) = "zconfig" ];
- ZippedFile zaux = 4 [(gogoproto.jsontag) = "zaux" ];
- AccessLogs access_logs = 5 [(gogoproto.jsontag) = "access_logs" ];
- ErrorLogs error_logs = 6 [(gogoproto.jsontag) = "error_logs" ];
- SslCertificates ssl = 7 [(gogoproto.jsontag) = "ssl" ];
- DirectoryMap directory_map = 8 [(gogoproto.jsontag) = "directory_map" ];
+ // NGINX config action
+ NginxConfigAction action = 1 [(gogoproto.jsontag) = "action"];
+ // Metadata information about the configuration
+ ConfigDescriptor config_data = 2 [(gogoproto.jsontag) = "config_data"];
+ // Zipped file of all NGINX config files
+ ZippedFile zconfig = 3 [(gogoproto.jsontag) = "zconfig"];
+ // Zipped file of all auxiliary files
+ ZippedFile zaux = 4 [(gogoproto.jsontag) = "zaux"];
+ // Information about all access log files
+ AccessLogs access_logs = 5 [(gogoproto.jsontag) = "access_logs"];
+ // Information about all error log files
+ ErrorLogs error_logs = 6 [(gogoproto.jsontag) = "error_logs"];
+ // Information about all SSL certificates files
+ SslCertificates ssl = 7 [(gogoproto.jsontag) = "ssl"];
+ // Directory map of all config and aux files
+ DirectoryMap directory_map = 8 [(gogoproto.jsontag) = "directory_map"];
}
+// Represents access log files
message AccessLogs {
- repeated AccessLog access_log = 1 [(gogoproto.jsontag) = "access_log" ];
+ // List of access log files
+ repeated AccessLog access_log = 1 [(gogoproto.jsontag) = "access_log"];
}
+// Represents an access log file
message AccessLog {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- string format = 2 [(gogoproto.jsontag) = "format" ];
- string permissions = 3 [(gogoproto.jsontag) = "permissions" ];
- bool readable = 4 [(gogoproto.jsontag) = "readable" ];
+ // Name of file
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Format of the file
+ string format = 2 [(gogoproto.jsontag) = "format"];
+ // File Permissions
+ string permissions = 3 [(gogoproto.jsontag) = "permissions"];
+ // Determines if the file is readable or not
+ bool readable = 4 [(gogoproto.jsontag) = "readable"];
}
+// Represents error log files
message ErrorLogs {
- repeated ErrorLog error_log = 1 [(gogoproto.jsontag) = "error_log" ];
+ // List of error log files
+ repeated ErrorLog error_log = 1 [(gogoproto.jsontag) = "error_log"];
}
+// Represents an error log file
message ErrorLog {
- string name = 1 [(gogoproto.jsontag) = "name" ];
- string log_level = 2 [(gogoproto.jsontag) = "log_level" ];
- string permissions = 3 [(gogoproto.jsontag) = "permissions" ];
- bool readable = 4 [(gogoproto.jsontag) = "readable" ];
+ // Name of file
+ string name = 1 [(gogoproto.jsontag) = "name"];
+ // Log level
+ string log_level = 2 [(gogoproto.jsontag) = "log_level"];
+ // File Permissions
+ string permissions = 3 [(gogoproto.jsontag) = "permissions"];
+ // Determines if the file is readable or not
+ bool readable = 4 [(gogoproto.jsontag) = "readable"];
}
diff --git a/test/performance/vendor/github.com/spf13/cobra/.golangci.yml b/test/performance/vendor/github.com/spf13/cobra/.golangci.yml
index 0d6e61793..439d3e1de 100644
--- a/test/performance/vendor/github.com/spf13/cobra/.golangci.yml
+++ b/test/performance/vendor/github.com/spf13/cobra/.golangci.yml
@@ -1,3 +1,17 @@
+# Copyright 2013-2022 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
diff --git a/test/performance/vendor/github.com/spf13/cobra/Makefile b/test/performance/vendor/github.com/spf13/cobra/Makefile
index 443ef1a98..c433a01bc 100644
--- a/test/performance/vendor/github.com/spf13/cobra/Makefile
+++ b/test/performance/vendor/github.com/spf13/cobra/Makefile
@@ -6,7 +6,7 @@ $(warning "could not find golangci-lint in $(PATH), run: curl -sfL https://insta
endif
ifeq (, $(shell which richgo))
-$(warning "could not find richgo in $(PATH), run: go get github.com/kyoh86/richgo")
+$(warning "could not find richgo in $(PATH), run: go install github.com/kyoh86/richgo@latest")
endif
.PHONY: fmt lint test install_deps clean
diff --git a/test/performance/vendor/github.com/spf13/cobra/README.md b/test/performance/vendor/github.com/spf13/cobra/README.md
index 2bf152082..7cc726beb 100644
--- a/test/performance/vendor/github.com/spf13/cobra/README.md
+++ b/test/performance/vendor/github.com/spf13/cobra/README.md
@@ -3,7 +3,7 @@
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
+[Hugo](https://gohugo.io), and [GitHub CLI](https://github.com/cli/cli) to
name a few. [This list](./projects_using_cobra.md) contains a more extensive list of projects using Cobra.
[](https://github.com/spf13/cobra/actions?query=workflow%3ATest)
@@ -23,6 +23,7 @@ Cobra provides:
* 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
@@ -40,9 +41,9 @@ 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.`
+`APPNAME VERB NOUN --ADJECTIVE`
or
-`APPNAME COMMAND ARG --FLAG`
+`APPNAME COMMAND ARG --FLAG`.
A few good real world examples may better illustrate this point.
diff --git a/test/performance/vendor/github.com/spf13/cobra/active_help.go b/test/performance/vendor/github.com/spf13/cobra/active_help.go
index 0c631913d..95e03aecb 100644
--- a/test/performance/vendor/github.com/spf13/cobra/active_help.go
+++ b/test/performance/vendor/github.com/spf13/cobra/active_help.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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 (
diff --git a/test/performance/vendor/github.com/spf13/cobra/args.go b/test/performance/vendor/github.com/spf13/cobra/args.go
index 20a022b30..2c1f99e78 100644
--- a/test/performance/vendor/github.com/spf13/cobra/args.go
+++ b/test/performance/vendor/github.com/spf13/cobra/args.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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 (
@@ -32,7 +46,8 @@ func NoArgs(cmd *Command, args []string) error {
return nil
}
-// OnlyValidArgs returns an error if any args are not in the list of ValidArgs.
+// 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.
@@ -41,7 +56,6 @@ func OnlyValidArgs(cmd *Command, args []string) error {
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]))
@@ -86,18 +100,6 @@ func ExactArgs(n int) PositionalArgs {
}
}
-// 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`
-func ExactValidArgs(n int) PositionalArgs {
- return func(cmd *Command, args []string) error {
- if err := ExactArgs(n)(cmd, args); err != nil {
- return err
- }
- return OnlyValidArgs(cmd, args)
- }
-}
-
// 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 {
@@ -119,3 +121,11 @@ func MatchAll(pargs ...PositionalArgs) PositionalArgs {
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/test/performance/vendor/github.com/spf13/cobra/bash_completions.go b/test/performance/vendor/github.com/spf13/cobra/bash_completions.go
index cb7e19537..3acdb2797 100644
--- a/test/performance/vendor/github.com/spf13/cobra/bash_completions.go
+++ b/test/performance/vendor/github.com/spf13/cobra/bash_completions.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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 (
diff --git a/test/performance/vendor/github.com/spf13/cobra/bash_completionsV2.go b/test/performance/vendor/github.com/spf13/cobra/bash_completionsV2.go
index 767bf0312..bb4b71892 100644
--- a/test/performance/vendor/github.com/spf13/cobra/bash_completionsV2.go
+++ b/test/performance/vendor/github.com/spf13/cobra/bash_completionsV2.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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 (
@@ -150,7 +164,7 @@ __%[1]s_process_completion_results() {
__%[1]s_handle_special_char "$cur" =
# Print the activeHelp statements before we finish
- if [ ${#activeHelp} -ne 0 ]; then
+ if [ ${#activeHelp[*]} -ne 0 ]; then
printf "\n";
printf "%%s\n" "${activeHelp[@]}"
printf "\n"
diff --git a/test/performance/vendor/github.com/spf13/cobra/cobra.go b/test/performance/vendor/github.com/spf13/cobra/cobra.go
index d6cbfd719..fe44bc8a0 100644
--- a/test/performance/vendor/github.com/spf13/cobra/cobra.go
+++ b/test/performance/vendor/github.com/spf13/cobra/cobra.go
@@ -1,9 +1,10 @@
-// Copyright © 2013 Steve Francia .
+// Copyright 2013-2022 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
+//
+// 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,
@@ -39,15 +40,25 @@ var templateFuncs = template.FuncMap{
}
var initializers []func()
+var finalizers []func()
+
+const (
+ defaultPrefixMatching = false
+ defaultCommandSorting = true
+ defaultCaseInsensitive = false
+)
// EnablePrefixMatching allows to set 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 = false
+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 = true
+var EnableCommandSorting = defaultCommandSorting
+
+// EnableCaseInsensitive allows case-insensitive commands names. (case sensitive by default)
+var EnableCaseInsensitive = defaultCaseInsensitive
// MousetrapHelpText enables an information splash screen on Windows
// if the CLI is started from explorer.exe.
@@ -84,6 +95,12 @@ 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,
diff --git a/test/performance/vendor/github.com/spf13/cobra/command.go b/test/performance/vendor/github.com/spf13/cobra/command.go
index 675bb1340..6ff47dd5c 100644
--- a/test/performance/vendor/github.com/spf13/cobra/command.go
+++ b/test/performance/vendor/github.com/spf13/cobra/command.go
@@ -1,9 +1,10 @@
-// Copyright © 2013 Steve Francia .
+// Copyright 2013-2022 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
+//
+// 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,
@@ -29,9 +30,17 @@ import (
flag "github.com/spf13/pflag"
)
+const FlagSetByCobraAnnotation = "cobra_annotation_flag_set_by_cobra"
+
// FParseErrWhitelist configures Flag parse errors to be ignored
type FParseErrWhitelist flag.ParseErrorsWhitelist
+// 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
@@ -58,6 +67,9 @@ type Command struct {
// 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
@@ -125,6 +137,9 @@ type Command struct {
// 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.
@@ -157,6 +172,12 @@ type Command struct {
// 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
@@ -236,8 +257,8 @@ func (c *Command) Context() context.Context {
return c.ctx
}
-// SetContext sets context for the command. It is set to context.Background by default and will be overwritten by
-// Command.ExecuteContext or Command.ExecuteContextC
+// 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
}
@@ -300,6 +321,21 @@ func (c *Command) SetHelpCommand(cmd *Command) {
c.helpCommand = cmd
}
+// SetHelpCommandGroup 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
+}
+
+// SetCompletionCommandGroup 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
@@ -508,10 +544,16 @@ Aliases:
{{.NameAndAliases}}{{end}}{{if .HasExample}}
Examples:
-{{.Example}}{{end}}{{if .HasAvailableSubCommands}}
+{{.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}}
-Available Commands:{{range .Commands}}{{if (or .IsAvailableCommand (eq .Name "help"))}}
- {{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if .HasAvailableLocalFlags}}
+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}}
@@ -676,7 +718,7 @@ func (c *Command) findSuggestions(arg string) string {
func (c *Command) findNext(next string) *Command {
matches := make([]*Command, 0)
for _, cmd := range c.commands {
- if cmd.Name() == next || cmd.HasAlias(next) {
+ if commandNameMatches(cmd.Name(), next) || cmd.HasAlias(next) {
cmd.commandCalledAs.name = next
return cmd
}
@@ -833,6 +875,8 @@ func (c *Command) execute(a []string) (err error) {
c.preRun()
+ defer c.postRun()
+
argWoFlags := c.Flags().Args()
if c.DisableFlagParsing {
argWoFlags = a
@@ -861,10 +905,10 @@ func (c *Command) execute(a []string) (err error) {
c.PreRun(c, argWoFlags)
}
- if err := c.validateRequiredFlags(); err != nil {
+ if err := c.ValidateRequiredFlags(); err != nil {
return err
}
- if err := c.validateFlagGroups(); err != nil {
+ if err := c.ValidateFlagGroups(); err != nil {
return err
}
@@ -903,6 +947,12 @@ func (c *Command) preRun() {
}
}
+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.
@@ -946,7 +996,11 @@ func (c *Command) ExecuteC() (cmd *Command, err error) {
// 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()
+ c.InitDefaultCompletionCmd()
+
+ // Now that all commands have been created, let's make sure all groups
+ // are properly created also
+ c.checkCommandGroups()
args := c.args
@@ -1018,7 +1072,8 @@ func (c *Command) ValidateArgs(args []string) error {
return c.Args(c, args)
}
-func (c *Command) validateRequiredFlags() error {
+// ValidateRequiredFlags validates all required flags are present and returns an error otherwise
+func (c *Command) ValidateRequiredFlags() error {
if c.DisableFlagParsing {
return nil
}
@@ -1041,6 +1096,19 @@ func (c *Command) validateRequiredFlags() error {
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.
@@ -1054,6 +1122,7 @@ func (c *Command) InitDefaultHelpFlag() {
usage += c.Name()
}
c.Flags().BoolP("help", "h", false, usage)
+ _ = c.Flags().SetAnnotation("help", FlagSetByCobraAnnotation, []string{"true"})
}
}
@@ -1079,6 +1148,7 @@ func (c *Command) InitDefaultVersionFlag() {
} else {
c.Flags().Bool("version", false, usage)
}
+ _ = c.Flags().SetAnnotation("version", FlagSetByCobraAnnotation, []string{"true"})
}
}
@@ -1121,10 +1191,12 @@ Simply type ` + c.Name() + ` help [path to command] for full details.`,
c.Printf("Unknown help topic %#q\n", args)
CheckErr(c.Root().Usage())
} else {
- cmd.InitDefaultHelpFlag() // make possible 'help' flag to be shown
+ 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)
@@ -1185,6 +1257,36 @@ func (c *Command) AddCommand(cmds ...*Command) {
}
}
+// 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
+}
+
+// ContainGroups 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{}
@@ -1328,7 +1430,7 @@ func (c *Command) Name() string {
// 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 a == s {
+ if commandNameMatches(a, s) {
return true
}
}
@@ -1505,7 +1607,8 @@ func (c *Command) LocalFlags() *flag.FlagSet {
}
addToLocal := func(f *flag.Flag) {
- if c.lflags.Lookup(f.Name) == nil && c.parentsPflags.Lookup(f.Name) == nil {
+ // 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)
}
}
@@ -1694,3 +1797,14 @@ func (c *Command) updateParentsPflags() {
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/test/performance/vendor/github.com/spf13/cobra/command_notwin.go b/test/performance/vendor/github.com/spf13/cobra/command_notwin.go
index bb5dad90b..2b77f8f01 100644
--- a/test/performance/vendor/github.com/spf13/cobra/command_notwin.go
+++ b/test/performance/vendor/github.com/spf13/cobra/command_notwin.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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
diff --git a/test/performance/vendor/github.com/spf13/cobra/command_win.go b/test/performance/vendor/github.com/spf13/cobra/command_win.go
index a84f5a82a..520f23abf 100644
--- a/test/performance/vendor/github.com/spf13/cobra/command_win.go
+++ b/test/performance/vendor/github.com/spf13/cobra/command_win.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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
diff --git a/test/performance/vendor/github.com/spf13/cobra/completions.go b/test/performance/vendor/github.com/spf13/cobra/completions.go
index 2c2483998..e8a0206db 100644
--- a/test/performance/vendor/github.com/spf13/cobra/completions.go
+++ b/test/performance/vendor/github.com/spf13/cobra/completions.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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 (
@@ -260,6 +274,12 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
}
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.
+ 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
@@ -292,6 +312,12 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
}
}
+ // 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 {
@@ -463,6 +489,18 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
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{}
@@ -607,12 +645,12 @@ func checkIfFlagCompletion(finalCmd *Command, args []string, lastArg string) (*p
return flag, trimmedArgs, lastArg, nil
}
-// initDefaultCompletionCmd adds a default 'completion' command to c.
+// 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() {
+func (c *Command) InitDefaultCompletionCmd() {
if c.CompletionOptions.DisableDefaultCmd || !c.HasSubCommands() {
return
}
@@ -635,6 +673,7 @@ See each sub-command's help for details on how to use the generated script.
Args: NoArgs,
ValidArgsFunction: NoFileCompletions,
Hidden: c.CompletionOptions.HiddenDefaultCmd,
+ GroupID: c.completionCommandGroupID,
}
c.AddCommand(completionCmd)
diff --git a/test/performance/vendor/github.com/spf13/cobra/fish_completions.go b/test/performance/vendor/github.com/spf13/cobra/fish_completions.go
index 005ee6be7..97112a17b 100644
--- a/test/performance/vendor/github.com/spf13/cobra/fish_completions.go
+++ b/test/performance/vendor/github.com/spf13/cobra/fish_completions.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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 (
diff --git a/test/performance/vendor/github.com/spf13/cobra/flag_groups.go b/test/performance/vendor/github.com/spf13/cobra/flag_groups.go
index dc7843119..9c377aaf9 100644
--- a/test/performance/vendor/github.com/spf13/cobra/flag_groups.go
+++ b/test/performance/vendor/github.com/spf13/cobra/flag_groups.go
@@ -1,9 +1,10 @@
-// Copyright © 2022 Steve Francia .
+// Copyright 2013-2022 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
+//
+// 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,
@@ -58,9 +59,9 @@ func (c *Command) MarkFlagsMutuallyExclusive(flagNames ...string) {
}
}
-// validateFlagGroups validates the mutuallyExclusive/requiredAsGroup logic and returns the
+// ValidateFlagGroups validates the mutuallyExclusive/requiredAsGroup logic and returns the
// first error encountered.
-func (c *Command) validateFlagGroups() error {
+func (c *Command) ValidateFlagGroups() error {
if c.DisableFlagParsing {
return nil
}
diff --git a/test/performance/vendor/github.com/spf13/cobra/powershell_completions.go b/test/performance/vendor/github.com/spf13/cobra/powershell_completions.go
index 379e7c088..004de42e4 100644
--- a/test/performance/vendor/github.com/spf13/cobra/powershell_completions.go
+++ b/test/performance/vendor/github.com/spf13/cobra/powershell_completions.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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).
@@ -8,9 +22,15 @@ import (
"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
@@ -27,7 +47,7 @@ filter __%[1]s_escapeStringWithSpecialChars {
`+" $_ -replace '\\s|#|@|\\$|;|,|''|\\{|\\}|\\(|\\)|\"|`|\\||<|>|&','`$&'"+`
}
-Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
+[scriptblock]$__%[2]sCompleterBlock = {
param(
$WordToComplete,
$CommandAst,
@@ -52,17 +72,17 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
}
__%[1]s_debug "Truncated command: $Command"
- $ShellCompDirectiveError=%[3]d
- $ShellCompDirectiveNoSpace=%[4]d
- $ShellCompDirectiveNoFileComp=%[5]d
- $ShellCompDirectiveFilterFileExt=%[6]d
- $ShellCompDirectiveFilterDirs=%[7]d
+ $ShellCompDirectiveError=%[4]d
+ $ShellCompDirectiveNoSpace=%[5]d
+ $ShellCompDirectiveNoFileComp=%[6]d
+ $ShellCompDirectiveFilterFileExt=%[7]d
+ $ShellCompDirectiveFilterDirs=%[8]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 %[2]s $Arguments"
+ $RequestComp="$Program %[3]s $Arguments"
__%[1]s_debug "RequestComp: $RequestComp"
# we cannot use $WordToComplete because it
@@ -92,7 +112,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
__%[1]s_debug "Calling $RequestComp"
# First disable ActiveHelp which is not supported for Powershell
- $env:%[8]s=0
+ $env:%[9]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
@@ -243,7 +263,9 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
}
}
-`, name, compCmd,
+
+Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock $__%[2]sCompleterBlock
+`, name, nameForVar, compCmd,
ShellCompDirectiveError, ShellCompDirectiveNoSpace, ShellCompDirectiveNoFileComp,
ShellCompDirectiveFilterFileExt, ShellCompDirectiveFilterDirs, activeHelpEnvVar(name)))
}
diff --git a/test/performance/vendor/github.com/spf13/cobra/projects_using_cobra.md b/test/performance/vendor/github.com/spf13/cobra/projects_using_cobra.md
index ac680118e..6865f88e7 100644
--- a/test/performance/vendor/github.com/spf13/cobra/projects_using_cobra.md
+++ b/test/performance/vendor/github.com/spf13/cobra/projects_using_cobra.md
@@ -1,7 +1,10 @@
## Projects using Cobra
+- [Allero](https://github.com/allero-io/allero)
- [Arduino CLI](https://github.com/arduino/arduino-cli)
- [Bleve](https://blevesearch.com/)
+- [Cilium](https://cilium.io/)
+- [CloudQuery](https://github.com/cloudquery/cloudquery)
- [CockroachDB](https://www.cockroachlabs.com/)
- [Cosmos SDK](https://github.com/cosmos/cosmos-sdk)
- [Datree](https://github.com/datreeio/datree)
@@ -11,7 +14,7 @@
- [Gardener](https://github.com/gardener/gardenctl)
- [Giant Swarm's gsctl](https://github.com/giantswarm/gsctl)
- [Git Bump](https://github.com/erdaltsksn/git-bump)
-- [Github CLI](https://github.com/cli/cli)
+- [GitHub CLI](https://github.com/cli/cli)
- [GitHub Labeler](https://github.com/erdaltsksn/gh-label)
- [Golangci-lint](https://golangci-lint.run)
- [GopherJS](https://github.com/gopherjs/gopherjs)
@@ -23,6 +26,7 @@
- [Kool](https://github.com/kool-dev/kool)
- [Kubernetes](https://kubernetes.io/)
- [Kubescape](https://github.com/armosec/kubescape)
+- [KubeVirt](https://github.com/kubevirt/kubevirt)
- [Linkerd](https://linkerd.io/)
- [Mattermost-server](https://github.com/mattermost/mattermost-server)
- [Mercure](https://mercure.rocks/)
@@ -33,6 +37,7 @@
- [Multi-gitter](https://github.com/lindell/multi-gitter)
- [Nanobox](https://github.com/nanobox-io/nanobox)/[Nanopack](https://github.com/nanopack)
- [nFPM](https://nfpm.goreleaser.com)
+- [Okteto](https://github.com/okteto/okteto)
- [OpenShift](https://www.openshift.com/)
- [Ory Hydra](https://github.com/ory/hydra)
- [Ory Kratos](https://github.com/ory/kratos)
@@ -52,3 +57,4 @@
- [UpCloud CLI (`upctl`)](https://github.com/UpCloudLtd/upcloud-cli)
- VMware's [Tanzu Community Edition](https://github.com/vmware-tanzu/community-edition) & [Tanzu Framework](https://github.com/vmware-tanzu/tanzu-framework)
- [Werf](https://werf.io/)
+- [ZITADEL](https://github.com/zitadel/zitadel)
diff --git a/test/performance/vendor/github.com/spf13/cobra/shell_completions.go b/test/performance/vendor/github.com/spf13/cobra/shell_completions.go
index d99bf91e5..126e83c30 100644
--- a/test/performance/vendor/github.com/spf13/cobra/shell_completions.go
+++ b/test/performance/vendor/github.com/spf13/cobra/shell_completions.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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 (
diff --git a/test/performance/vendor/github.com/spf13/cobra/shell_completions.md b/test/performance/vendor/github.com/spf13/cobra/shell_completions.md
index 1e2058ed6..553ee5df8 100644
--- a/test/performance/vendor/github.com/spf13/cobra/shell_completions.md
+++ b/test/performance/vendor/github.com/spf13/cobra/shell_completions.md
@@ -99,6 +99,11 @@ To tell Cobra *not* to provide the default `completion` command:
rootCmd.CompletionOptions.DisableDefaultCmd = true
```
+To tell Cobra to mark the default `completion` command as *hidden*:
+```
+rootCmd.CompletionOptions.HiddenDefaultCmd = true
+```
+
To tell Cobra *not* to provide the user with the `--no-descriptions` flag to the completion sub-commands:
```
rootCmd.CompletionOptions.DisableNoDescFlag = true
@@ -530,6 +535,21 @@ search for a keyword in charts
$ helm s[tab]
search show status
```
+### Aliases
+
+You can also configure `powershell` aliases for your program and they will also support completions.
+
+```
+$ sal aliasname origcommand
+$ Register-ArgumentCompleter -CommandName 'aliasname' -ScriptBlock $__origcommandCompleterBlock
+
+# and now when you run `aliasname` completion will make
+# suggestions as it did for `origcommand`.
+
+$ aliasname
+completion firstcommand secondcommand
+```
+The name of the completer block variable is of the form `$__CompleterBlock` where every `-` and `:` in the program name have been replaced with `_`, to respect powershell naming syntax.
### Limitations
diff --git a/test/performance/vendor/github.com/spf13/cobra/user_guide.md b/test/performance/vendor/github.com/spf13/cobra/user_guide.md
index 5a7acf88e..e55367e85 100644
--- a/test/performance/vendor/github.com/spf13/cobra/user_guide.md
+++ b/test/performance/vendor/github.com/spf13/cobra/user_guide.md
@@ -302,15 +302,15 @@ rootCmd.MarkPersistentFlagRequired("region")
### Flag Groups
-If you have different flags that must be provided together (e.g. if they provide the `--username` flag they MUST provide the `--password` flag as well) then
+If you have different flags that must be provided together (e.g. if they provide the `--username` flag they MUST provide the `--password` flag as well) then
Cobra can enforce that requirement:
```go
rootCmd.Flags().StringVarP(&u, "username", "u", "", "Username (required if password is set)")
rootCmd.Flags().StringVarP(&pw, "password", "p", "", "Password (required if username is set)")
rootCmd.MarkFlagsRequiredTogether("username", "password")
-```
+```
-You can also prevent different flags from being provided together if they represent mutually
+You can also prevent different flags from being provided together if they represent mutually
exclusive options such as specifying an output format as either `--json` or `--yaml` but never both:
```go
rootCmd.Flags().BoolVar(&u, "json", false, "Output in JSON")
@@ -327,29 +327,47 @@ In both of these cases:
## Positional and Custom Arguments
Validation of positional arguments can be specified using the `Args` field of `Command`.
+The following validators are built in:
+
+- Number of arguments:
+ - `NoArgs` - report an error if there are any positional args.
+ - `ArbitraryArgs` - accept any number of args.
+ - `MinimumNArgs(int)` - report an error if less than N positional args are provided.
+ - `MaximumNArgs(int)` - report an error if more than N positional args are provided.
+ - `ExactArgs(int)` - report an error if there are not exactly N positional args.
+ - `RangeArgs(min, max)` - report an error if the number of args is not between `min` and `max`.
+- Content of the arguments:
+ - `OnlyValidArgs` - report an error if there are any positional args not specified in the `ValidArgs` field of `Command`, which can optionally be set to a list of valid values for positional args.
+
If `Args` is undefined or `nil`, it defaults to `ArbitraryArgs`.
-The following validators are built in:
+Moreover, `MatchAll(pargs ...PositionalArgs)` enables combining existing checks with arbitrary other checks.
+For instance, if you want to report an error if there are not exactly N positional args OR if there are any positional
+args that are not in the `ValidArgs` field of `Command`, you can call `MatchAll` on `ExactArgs` and `OnlyValidArgs`, as
+shown below:
-- `NoArgs` - the command will report an error if there are any positional args.
-- `ArbitraryArgs` - the command will accept any args.
-- `OnlyValidArgs` - the command will report an error if there are any positional args that are not in the `ValidArgs` field of `Command`.
-- `MinimumNArgs(int)` - the command will report an error if there are not at least N positional args.
-- `MaximumNArgs(int)` - the command will report an error if there are more than N positional args.
-- `ExactArgs(int)` - the command will report an error if there are not exactly N positional args.
-- `ExactValidArgs(int)` - the command will report an error if there are not exactly N positional args OR if there are any positional args that are not in the `ValidArgs` field of `Command`
-- `RangeArgs(min, max)` - the command will report an error if the number of args is not between the minimum and maximum number of expected args.
-- `MatchAll(pargs ...PositionalArgs)` - enables combining existing checks with arbitrary other checks (e.g. you want to check the ExactArgs length along with other qualities).
+```go
+var cmd = &cobra.Command{
+ Short: "hello",
+ Args: MatchAll(ExactArgs(2), OnlyValidArgs),
+ Run: func(cmd *cobra.Command, args []string) {
+ fmt.Println("Hello, World!")
+ },
+}
+```
-An example of setting the custom validator:
+It is possible to set any custom validator that satisfies `func(cmd *cobra.Command, args []string) error`.
+For example:
```go
var cmd = &cobra.Command{
Short: "hello",
Args: func(cmd *cobra.Command, args []string) error {
- if len(args) < 1 {
- return errors.New("requires a color argument")
+ // Optionally run one of the validators provided by cobra
+ if err := cobra.MinimumNArgs(1)(cmd, args); err != nil {
+ return err
}
+ // Run the custom validation logic
if myapp.IsValidColor(args[0]) {
return nil
}
@@ -444,37 +462,46 @@ create' is called. Every command will automatically have the '--help' flag adde
The following output is automatically generated by Cobra. Nothing beyond the
command and flag definitions are needed.
- $ cobra help
+ $ cobra-cli help
Cobra is a CLI library for Go that empowers applications.
This application is a tool to generate the needed files
to quickly create a Cobra application.
Usage:
- cobra [command]
+ cobra-cli [command]
Available Commands:
add Add a command to a Cobra Application
+ completion Generate the autocompletion script for the specified shell
help Help about any command
init Initialize a Cobra Application
Flags:
-a, --author string author name for copyright attribution (default "YOUR NAME")
--config string config file (default is $HOME/.cobra.yaml)
- -h, --help help for cobra
+ -h, --help help for cobra-cli
-l, --license string name of license for the project
- --viper use Viper for configuration (default true)
+ --viper use Viper for configuration
- Use "cobra [command] --help" for more information about a command.
+ Use "cobra-cli [command] --help" for more information about a command.
Help is just a command like any other. There is no special logic or behavior
around it. In fact, you can provide your own if you want.
+### Grouping commands in help
+
+Cobra supports grouping of available commands in the help output. To group commands, each group must be explicitly
+defined using `AddGroup()` on the parent command. Then a subcommand can be added to a group using the `GroupID` element
+of that subcommand. The groups will appear in the help output in the same order as they are defined using different
+calls to `AddGroup()`. If you use the generated `help` or `completion` commands, you can set their group ids using
+`SetHelpCommandGroupId()` and `SetCompletionCommandGroupId()` on the root command, respectively.
+
### Defining your own help
You can provide your own Help command or your own template for the default command to use
-with following functions:
+with the following functions:
```go
cmd.SetHelpCommand(cmd *Command)
@@ -493,22 +520,23 @@ showing the user the 'usage'.
You may recognize this from the help above. That's because the default help
embeds the usage as part of its output.
- $ cobra --invalid
+ $ cobra-cli --invalid
Error: unknown flag: --invalid
Usage:
- cobra [command]
+ cobra-cli [command]
Available Commands:
add Add a command to a Cobra Application
+ completion Generate the autocompletion script for the specified shell
help Help about any command
init Initialize a Cobra Application
Flags:
-a, --author string author name for copyright attribution (default "YOUR NAME")
--config string config file (default is $HOME/.cobra.yaml)
- -h, --help help for cobra
+ -h, --help help for cobra-cli
-l, --license string name of license for the project
- --viper use Viper for configuration (default true)
+ --viper use Viper for configuration
Use "cobra [command] --help" for more information about a command.
@@ -627,7 +655,7 @@ Did you mean this?
Run 'hugo --help' for usage.
```
-Suggestions are automatic based on every subcommand registered and use an implementation of [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance). Every registered command that matches a minimum distance of 2 (ignoring case) will be displayed as a suggestion.
+Suggestions are automatically generated based on existing subcommands and use an implementation of [Levenshtein distance](https://en.wikipedia.org/wiki/Levenshtein_distance). Every registered command that matches a minimum distance of 2 (ignoring case) will be displayed as a suggestion.
If you need to disable suggestions or tweak the string distance in your command, use:
@@ -641,7 +669,8 @@ or
command.SuggestionsMinimumDistance = 1
```
-You can also explicitly set names for which a given command will be suggested using the `SuggestFor` attribute. This allows suggestions for strings that are not close in terms of string distance, but makes sense in your set of commands and for some which you don't want aliases. Example:
+You can also explicitly set names for which a given command will be suggested using the `SuggestFor` attribute. This allows suggestions for strings that are not close in terms of string distance, but make sense in your set of commands but for which
+you don't want aliases. Example:
```
$ kubectl remove
diff --git a/test/performance/vendor/github.com/spf13/cobra/zsh_completions.go b/test/performance/vendor/github.com/spf13/cobra/zsh_completions.go
index 65cd94c60..84cec76fd 100644
--- a/test/performance/vendor/github.com/spf13/cobra/zsh_completions.go
+++ b/test/performance/vendor/github.com/spf13/cobra/zsh_completions.go
@@ -1,3 +1,17 @@
+// Copyright 2013-2022 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 (
diff --git a/test/performance/vendor/github.com/stretchr/objx/Taskfile.yml b/test/performance/vendor/github.com/stretchr/objx/Taskfile.yml
index a749ac549..7746f516d 100644
--- a/test/performance/vendor/github.com/stretchr/objx/Taskfile.yml
+++ b/test/performance/vendor/github.com/stretchr/objx/Taskfile.yml
@@ -25,6 +25,6 @@ tasks:
- go test -race ./...
test-coverage:
- desc: Runs go tests and calucates test coverage
+ desc: Runs go tests and calculates test coverage
cmds:
- go test -race -coverprofile=c.out ./...
diff --git a/test/performance/vendor/go.uber.org/atomic/CHANGELOG.md b/test/performance/vendor/go.uber.org/atomic/CHANGELOG.md
index 38f564e2b..5fe03f21b 100644
--- a/test/performance/vendor/go.uber.org/atomic/CHANGELOG.md
+++ b/test/performance/vendor/go.uber.org/atomic/CHANGELOG.md
@@ -4,6 +4,23 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [1.10.0] - 2022-08-11
+### Added
+- Add `atomic.Float32` type for atomic operations on `float32`.
+- Add `CompareAndSwap` and `Swap` methods to `atomic.String`, `atomic.Error`,
+ and `atomic.Value`.
+- Add generic `atomic.Pointer[T]` type for atomic operations on pointers of any
+ type. This is present only for Go 1.18 or higher, and is a drop-in for
+ replacement for the standard library's `sync/atomic.Pointer` type.
+
+### Changed
+- Deprecate `CAS` methods on all types in favor of corresponding
+ `CompareAndSwap` methods.
+
+Thanks to @eNV25 and @icpd for their contributions to this release.
+
+[1.10.0]: https://github.com/uber-go/atomic/compare/v1.9.0...v1.10.0
+
## [1.9.0] - 2021-07-15
### Added
- Add `Float64.Swap` to match int atomic operations.
diff --git a/test/performance/vendor/go.uber.org/atomic/bool.go b/test/performance/vendor/go.uber.org/atomic/bool.go
index 209df7bbc..dfa2085f4 100644
--- a/test/performance/vendor/go.uber.org/atomic/bool.go
+++ b/test/performance/vendor/go.uber.org/atomic/bool.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -55,8 +55,15 @@ func (x *Bool) Store(val bool) {
}
// CAS is an atomic compare-and-swap for bool values.
+//
+// Deprecated: Use CompareAndSwap.
func (x *Bool) CAS(old, new bool) (swapped bool) {
- return x.v.CAS(boolToInt(old), boolToInt(new))
+ return x.CompareAndSwap(old, new)
+}
+
+// CompareAndSwap is an atomic compare-and-swap for bool values.
+func (x *Bool) CompareAndSwap(old, new bool) (swapped bool) {
+ return x.v.CompareAndSwap(boolToInt(old), boolToInt(new))
}
// Swap atomically stores the given bool and returns the old
diff --git a/test/performance/vendor/go.uber.org/atomic/duration.go b/test/performance/vendor/go.uber.org/atomic/duration.go
index 207594f5e..6f4157445 100644
--- a/test/performance/vendor/go.uber.org/atomic/duration.go
+++ b/test/performance/vendor/go.uber.org/atomic/duration.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -56,8 +56,15 @@ func (x *Duration) Store(val time.Duration) {
}
// CAS is an atomic compare-and-swap for time.Duration values.
+//
+// Deprecated: Use CompareAndSwap.
func (x *Duration) CAS(old, new time.Duration) (swapped bool) {
- return x.v.CAS(int64(old), int64(new))
+ return x.CompareAndSwap(old, new)
+}
+
+// CompareAndSwap is an atomic compare-and-swap for time.Duration values.
+func (x *Duration) CompareAndSwap(old, new time.Duration) (swapped bool) {
+ return x.v.CompareAndSwap(int64(old), int64(new))
}
// Swap atomically stores the given time.Duration and returns the old
diff --git a/test/performance/vendor/go.uber.org/atomic/error.go b/test/performance/vendor/go.uber.org/atomic/error.go
index 3be19c35e..27b23ea16 100644
--- a/test/performance/vendor/go.uber.org/atomic/error.go
+++ b/test/performance/vendor/go.uber.org/atomic/error.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -49,3 +49,14 @@ func (x *Error) Load() error {
func (x *Error) Store(val error) {
x.v.Store(packError(val))
}
+
+// CompareAndSwap is an atomic compare-and-swap for error values.
+func (x *Error) CompareAndSwap(old, new error) (swapped bool) {
+ return x.v.CompareAndSwap(packError(old), packError(new))
+}
+
+// Swap atomically stores the given error and returns the old
+// value.
+func (x *Error) Swap(val error) (old error) {
+ return unpackError(x.v.Swap(packError(val)))
+}
diff --git a/test/performance/vendor/go.uber.org/atomic/error_ext.go b/test/performance/vendor/go.uber.org/atomic/error_ext.go
index ffe0be21c..d31fb633b 100644
--- a/test/performance/vendor/go.uber.org/atomic/error_ext.go
+++ b/test/performance/vendor/go.uber.org/atomic/error_ext.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2020 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -23,7 +23,7 @@ package atomic
// atomic.Value panics on nil inputs, or if the underlying type changes.
// Stabilize by always storing a custom struct that we control.
-//go:generate bin/gen-atomicwrapper -name=Error -type=error -wrapped=Value -pack=packError -unpack=unpackError -file=error.go
+//go:generate bin/gen-atomicwrapper -name=Error -type=error -wrapped=Value -pack=packError -unpack=unpackError -compareandswap -swap -file=error.go
type packedError struct{ Value error }
diff --git a/test/performance/vendor/go.uber.org/atomic/float32.go b/test/performance/vendor/go.uber.org/atomic/float32.go
new file mode 100644
index 000000000..5d535a6d2
--- /dev/null
+++ b/test/performance/vendor/go.uber.org/atomic/float32.go
@@ -0,0 +1,77 @@
+// @generated Code generated by gen-atomicwrapper.
+
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
+//
+// 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 atomic
+
+import (
+ "encoding/json"
+ "math"
+)
+
+// Float32 is an atomic type-safe wrapper for float32 values.
+type Float32 struct {
+ _ nocmp // disallow non-atomic comparison
+
+ v Uint32
+}
+
+var _zeroFloat32 float32
+
+// NewFloat32 creates a new Float32.
+func NewFloat32(val float32) *Float32 {
+ x := &Float32{}
+ if val != _zeroFloat32 {
+ x.Store(val)
+ }
+ return x
+}
+
+// Load atomically loads the wrapped float32.
+func (x *Float32) Load() float32 {
+ return math.Float32frombits(x.v.Load())
+}
+
+// Store atomically stores the passed float32.
+func (x *Float32) Store(val float32) {
+ x.v.Store(math.Float32bits(val))
+}
+
+// Swap atomically stores the given float32 and returns the old
+// value.
+func (x *Float32) Swap(val float32) (old float32) {
+ return math.Float32frombits(x.v.Swap(math.Float32bits(val)))
+}
+
+// MarshalJSON encodes the wrapped float32 into JSON.
+func (x *Float32) MarshalJSON() ([]byte, error) {
+ return json.Marshal(x.Load())
+}
+
+// UnmarshalJSON decodes a float32 from JSON.
+func (x *Float32) UnmarshalJSON(b []byte) error {
+ var v float32
+ if err := json.Unmarshal(b, &v); err != nil {
+ return err
+ }
+ x.Store(v)
+ return nil
+}
diff --git a/test/performance/vendor/go.uber.org/atomic/float32_ext.go b/test/performance/vendor/go.uber.org/atomic/float32_ext.go
new file mode 100644
index 000000000..b0cd8d9c8
--- /dev/null
+++ b/test/performance/vendor/go.uber.org/atomic/float32_ext.go
@@ -0,0 +1,76 @@
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
+//
+// 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 atomic
+
+import (
+ "math"
+ "strconv"
+)
+
+//go:generate bin/gen-atomicwrapper -name=Float32 -type=float32 -wrapped=Uint32 -pack=math.Float32bits -unpack=math.Float32frombits -swap -json -imports math -file=float32.go
+
+// Add atomically adds to the wrapped float32 and returns the new value.
+func (f *Float32) Add(delta float32) float32 {
+ for {
+ old := f.Load()
+ new := old + delta
+ if f.CAS(old, new) {
+ return new
+ }
+ }
+}
+
+// Sub atomically subtracts from the wrapped float32 and returns the new value.
+func (f *Float32) Sub(delta float32) float32 {
+ return f.Add(-delta)
+}
+
+// CAS is an atomic compare-and-swap for float32 values.
+//
+// Deprecated: Use CompareAndSwap
+func (f *Float32) CAS(old, new float32) (swapped bool) {
+ return f.CompareAndSwap(old, new)
+}
+
+// CompareAndSwap is an atomic compare-and-swap for float32 values.
+//
+// Note: CompareAndSwap handles NaN incorrectly. NaN != NaN using Go's inbuilt operators
+// but CompareAndSwap allows a stored NaN to compare equal to a passed in NaN.
+// This avoids typical CompareAndSwap loops from blocking forever, e.g.,
+//
+// for {
+// old := atom.Load()
+// new = f(old)
+// if atom.CompareAndSwap(old, new) {
+// break
+// }
+// }
+//
+// If CompareAndSwap did not match NaN to match, then the above would loop forever.
+func (f *Float32) CompareAndSwap(old, new float32) (swapped bool) {
+ return f.v.CompareAndSwap(math.Float32bits(old), math.Float32bits(new))
+}
+
+// String encodes the wrapped value as a string.
+func (f *Float32) String() string {
+ // 'g' is the behavior for floats with %v.
+ return strconv.FormatFloat(float64(f.Load()), 'g', -1, 32)
+}
diff --git a/test/performance/vendor/go.uber.org/atomic/float64.go b/test/performance/vendor/go.uber.org/atomic/float64.go
index 8a1367184..11d5189a5 100644
--- a/test/performance/vendor/go.uber.org/atomic/float64.go
+++ b/test/performance/vendor/go.uber.org/atomic/float64.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/test/performance/vendor/go.uber.org/atomic/float64_ext.go b/test/performance/vendor/go.uber.org/atomic/float64_ext.go
index df36b0107..48c52b0ab 100644
--- a/test/performance/vendor/go.uber.org/atomic/float64_ext.go
+++ b/test/performance/vendor/go.uber.org/atomic/float64_ext.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2020 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -45,21 +45,28 @@ func (f *Float64) Sub(delta float64) float64 {
// CAS is an atomic compare-and-swap for float64 values.
//
-// Note: CAS handles NaN incorrectly. NaN != NaN using Go's inbuilt operators
-// but CAS allows a stored NaN to compare equal to a passed in NaN.
-// This avoids typical CAS loops from blocking forever, e.g.,
+// Deprecated: Use CompareAndSwap
+func (f *Float64) CAS(old, new float64) (swapped bool) {
+ return f.CompareAndSwap(old, new)
+}
+
+// CompareAndSwap is an atomic compare-and-swap for float64 values.
//
-// for {
-// old := atom.Load()
-// new = f(old)
-// if atom.CAS(old, new) {
-// break
-// }
-// }
+// Note: CompareAndSwap handles NaN incorrectly. NaN != NaN using Go's inbuilt operators
+// but CompareAndSwap allows a stored NaN to compare equal to a passed in NaN.
+// This avoids typical CompareAndSwap loops from blocking forever, e.g.,
//
-// If CAS did not match NaN to match, then the above would loop forever.
-func (f *Float64) CAS(old, new float64) (swapped bool) {
- return f.v.CAS(math.Float64bits(old), math.Float64bits(new))
+// for {
+// old := atom.Load()
+// new = f(old)
+// if atom.CompareAndSwap(old, new) {
+// break
+// }
+// }
+//
+// If CompareAndSwap did not match NaN to match, then the above would loop forever.
+func (f *Float64) CompareAndSwap(old, new float64) (swapped bool) {
+ return f.v.CompareAndSwap(math.Float64bits(old), math.Float64bits(new))
}
// String encodes the wrapped value as a string.
diff --git a/test/performance/vendor/go.uber.org/atomic/int32.go b/test/performance/vendor/go.uber.org/atomic/int32.go
index 640ea36a1..b9a68f42c 100644
--- a/test/performance/vendor/go.uber.org/atomic/int32.go
+++ b/test/performance/vendor/go.uber.org/atomic/int32.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicint.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -66,7 +66,14 @@ func (i *Int32) Dec() int32 {
}
// CAS is an atomic compare-and-swap.
+//
+// Deprecated: Use CompareAndSwap.
func (i *Int32) CAS(old, new int32) (swapped bool) {
+ return i.CompareAndSwap(old, new)
+}
+
+// CompareAndSwap is an atomic compare-and-swap.
+func (i *Int32) CompareAndSwap(old, new int32) (swapped bool) {
return atomic.CompareAndSwapInt32(&i.v, old, new)
}
diff --git a/test/performance/vendor/go.uber.org/atomic/int64.go b/test/performance/vendor/go.uber.org/atomic/int64.go
index 9ab66b980..78d260976 100644
--- a/test/performance/vendor/go.uber.org/atomic/int64.go
+++ b/test/performance/vendor/go.uber.org/atomic/int64.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicint.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -66,7 +66,14 @@ func (i *Int64) Dec() int64 {
}
// CAS is an atomic compare-and-swap.
+//
+// Deprecated: Use CompareAndSwap.
func (i *Int64) CAS(old, new int64) (swapped bool) {
+ return i.CompareAndSwap(old, new)
+}
+
+// CompareAndSwap is an atomic compare-and-swap.
+func (i *Int64) CompareAndSwap(old, new int64) (swapped bool) {
return atomic.CompareAndSwapInt64(&i.v, old, new)
}
diff --git a/test/performance/vendor/go.uber.org/atomic/nocmp.go b/test/performance/vendor/go.uber.org/atomic/nocmp.go
index a8201cb4a..54b74174a 100644
--- a/test/performance/vendor/go.uber.org/atomic/nocmp.go
+++ b/test/performance/vendor/go.uber.org/atomic/nocmp.go
@@ -23,13 +23,13 @@ package atomic
// nocmp is an uncomparable struct. Embed this inside another struct to make
// it uncomparable.
//
-// type Foo struct {
-// nocmp
-// // ...
-// }
+// type Foo struct {
+// nocmp
+// // ...
+// }
//
// This DOES NOT:
//
-// - Disallow shallow copies of structs
-// - Disallow comparison of pointers to uncomparable structs
+// - Disallow shallow copies of structs
+// - Disallow comparison of pointers to uncomparable structs
type nocmp [0]func()
diff --git a/test/performance/vendor/go.uber.org/atomic/pointer_go118.go b/test/performance/vendor/go.uber.org/atomic/pointer_go118.go
new file mode 100644
index 000000000..e0f47dba4
--- /dev/null
+++ b/test/performance/vendor/go.uber.org/atomic/pointer_go118.go
@@ -0,0 +1,60 @@
+// Copyright (c) 2022 Uber Technologies, Inc.
+//
+// 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.
+
+//go:build go1.18 && !go1.19
+// +build go1.18,!go1.19
+
+package atomic
+
+import "unsafe"
+
+type Pointer[T any] struct {
+ _ nocmp // disallow non-atomic comparison
+ p UnsafePointer
+}
+
+// NewPointer creates a new Pointer.
+func NewPointer[T any](v *T) *Pointer[T] {
+ var p Pointer[T]
+ if v != nil {
+ p.p.Store(unsafe.Pointer(v))
+ }
+ return &p
+}
+
+// Load atomically loads the wrapped value.
+func (p *Pointer[T]) Load() *T {
+ return (*T)(p.p.Load())
+}
+
+// Store atomically stores the passed value.
+func (p *Pointer[T]) Store(val *T) {
+ p.p.Store(unsafe.Pointer(val))
+}
+
+// Swap atomically swaps the wrapped pointer and returns the old value.
+func (p *Pointer[T]) Swap(val *T) (old *T) {
+ return (*T)(p.p.Swap(unsafe.Pointer(val)))
+}
+
+// CompareAndSwap is an atomic compare-and-swap.
+func (p *Pointer[T]) CompareAndSwap(old, new *T) (swapped bool) {
+ return p.p.CompareAndSwap(unsafe.Pointer(old), unsafe.Pointer(new))
+}
diff --git a/test/performance/vendor/go.uber.org/atomic/pointer_go119.go b/test/performance/vendor/go.uber.org/atomic/pointer_go119.go
new file mode 100644
index 000000000..6726f17ad
--- /dev/null
+++ b/test/performance/vendor/go.uber.org/atomic/pointer_go119.go
@@ -0,0 +1,61 @@
+// Copyright (c) 2022 Uber Technologies, Inc.
+//
+// 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.
+
+//go:build go1.19
+// +build go1.19
+
+package atomic
+
+import "sync/atomic"
+
+// Pointer is an atomic pointer of type *T.
+type Pointer[T any] struct {
+ _ nocmp // disallow non-atomic comparison
+ p atomic.Pointer[T]
+}
+
+// NewPointer creates a new Pointer.
+func NewPointer[T any](v *T) *Pointer[T] {
+ var p Pointer[T]
+ if v != nil {
+ p.p.Store(v)
+ }
+ return &p
+}
+
+// Load atomically loads the wrapped value.
+func (p *Pointer[T]) Load() *T {
+ return p.p.Load()
+}
+
+// Store atomically stores the passed value.
+func (p *Pointer[T]) Store(val *T) {
+ p.p.Store(val)
+}
+
+// Swap atomically swaps the wrapped pointer and returns the old value.
+func (p *Pointer[T]) Swap(val *T) (old *T) {
+ return p.p.Swap(val)
+}
+
+// CompareAndSwap is an atomic compare-and-swap.
+func (p *Pointer[T]) CompareAndSwap(old, new *T) (swapped bool) {
+ return p.p.CompareAndSwap(old, new)
+}
diff --git a/test/performance/vendor/go.uber.org/atomic/string.go b/test/performance/vendor/go.uber.org/atomic/string.go
index 80df93d09..c4bea70f4 100644
--- a/test/performance/vendor/go.uber.org/atomic/string.go
+++ b/test/performance/vendor/go.uber.org/atomic/string.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -52,3 +52,14 @@ func (x *String) Load() string {
func (x *String) Store(val string) {
x.v.Store(val)
}
+
+// CompareAndSwap is an atomic compare-and-swap for string values.
+func (x *String) CompareAndSwap(old, new string) (swapped bool) {
+ return x.v.CompareAndSwap(old, new)
+}
+
+// Swap atomically stores the given string and returns the old
+// value.
+func (x *String) Swap(val string) (old string) {
+ return x.v.Swap(val).(string)
+}
diff --git a/test/performance/vendor/go.uber.org/atomic/string_ext.go b/test/performance/vendor/go.uber.org/atomic/string_ext.go
index 83d92edaf..1f63dfd5b 100644
--- a/test/performance/vendor/go.uber.org/atomic/string_ext.go
+++ b/test/performance/vendor/go.uber.org/atomic/string_ext.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2020 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -20,9 +20,7 @@
package atomic
-//go:generate bin/gen-atomicwrapper -name=String -type=string -wrapped=Value -file=string.go
-// Note: No Swap as String wraps Value, which wraps the stdlib sync/atomic.Value which
-// only supports Swap as of go1.17: https://github.com/golang/go/issues/39351
+//go:generate bin/gen-atomicwrapper -name=String -type=string -wrapped=Value -compareandswap -swap -file=string.go
// String returns the wrapped value.
func (s *String) String() string {
diff --git a/test/performance/vendor/go.uber.org/atomic/time.go b/test/performance/vendor/go.uber.org/atomic/time.go
index 33460fc37..1660feb14 100644
--- a/test/performance/vendor/go.uber.org/atomic/time.go
+++ b/test/performance/vendor/go.uber.org/atomic/time.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicwrapper.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
diff --git a/test/performance/vendor/go.uber.org/atomic/uint32.go b/test/performance/vendor/go.uber.org/atomic/uint32.go
index 7859a9cc3..d6f04a96d 100644
--- a/test/performance/vendor/go.uber.org/atomic/uint32.go
+++ b/test/performance/vendor/go.uber.org/atomic/uint32.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicint.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -66,7 +66,14 @@ func (i *Uint32) Dec() uint32 {
}
// CAS is an atomic compare-and-swap.
+//
+// Deprecated: Use CompareAndSwap.
func (i *Uint32) CAS(old, new uint32) (swapped bool) {
+ return i.CompareAndSwap(old, new)
+}
+
+// CompareAndSwap is an atomic compare-and-swap.
+func (i *Uint32) CompareAndSwap(old, new uint32) (swapped bool) {
return atomic.CompareAndSwapUint32(&i.v, old, new)
}
diff --git a/test/performance/vendor/go.uber.org/atomic/uint64.go b/test/performance/vendor/go.uber.org/atomic/uint64.go
index 2f2a7db63..2574bdd5e 100644
--- a/test/performance/vendor/go.uber.org/atomic/uint64.go
+++ b/test/performance/vendor/go.uber.org/atomic/uint64.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicint.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -66,7 +66,14 @@ func (i *Uint64) Dec() uint64 {
}
// CAS is an atomic compare-and-swap.
+//
+// Deprecated: Use CompareAndSwap.
func (i *Uint64) CAS(old, new uint64) (swapped bool) {
+ return i.CompareAndSwap(old, new)
+}
+
+// CompareAndSwap is an atomic compare-and-swap.
+func (i *Uint64) CompareAndSwap(old, new uint64) (swapped bool) {
return atomic.CompareAndSwapUint64(&i.v, old, new)
}
diff --git a/test/performance/vendor/go.uber.org/atomic/uintptr.go b/test/performance/vendor/go.uber.org/atomic/uintptr.go
index ecf7a7727..81b275a7a 100644
--- a/test/performance/vendor/go.uber.org/atomic/uintptr.go
+++ b/test/performance/vendor/go.uber.org/atomic/uintptr.go
@@ -1,6 +1,6 @@
// @generated Code generated by gen-atomicint.
-// Copyright (c) 2020-2021 Uber Technologies, Inc.
+// Copyright (c) 2020-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -66,7 +66,14 @@ func (i *Uintptr) Dec() uintptr {
}
// CAS is an atomic compare-and-swap.
+//
+// Deprecated: Use CompareAndSwap.
func (i *Uintptr) CAS(old, new uintptr) (swapped bool) {
+ return i.CompareAndSwap(old, new)
+}
+
+// CompareAndSwap is an atomic compare-and-swap.
+func (i *Uintptr) CompareAndSwap(old, new uintptr) (swapped bool) {
return atomic.CompareAndSwapUintptr(&i.v, old, new)
}
diff --git a/test/performance/vendor/go.uber.org/atomic/unsafe_pointer.go b/test/performance/vendor/go.uber.org/atomic/unsafe_pointer.go
index 169f793dc..34868baf6 100644
--- a/test/performance/vendor/go.uber.org/atomic/unsafe_pointer.go
+++ b/test/performance/vendor/go.uber.org/atomic/unsafe_pointer.go
@@ -1,4 +1,4 @@
-// Copyright (c) 2021 Uber Technologies, Inc.
+// Copyright (c) 2021-2022 Uber Technologies, Inc.
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
@@ -53,6 +53,13 @@ func (p *UnsafePointer) Swap(val unsafe.Pointer) (old unsafe.Pointer) {
}
// CAS is an atomic compare-and-swap.
+//
+// Deprecated: Use CompareAndSwap
func (p *UnsafePointer) CAS(old, new unsafe.Pointer) (swapped bool) {
+ return p.CompareAndSwap(old, new)
+}
+
+// CompareAndSwap is an atomic compare-and-swap.
+func (p *UnsafePointer) CompareAndSwap(old, new unsafe.Pointer) (swapped bool) {
return atomic.CompareAndSwapPointer(&p.v, old, new)
}
diff --git a/test/performance/vendor/go.uber.org/atomic/value.go b/test/performance/vendor/go.uber.org/atomic/value.go
index 671f3a382..52caedb9a 100644
--- a/test/performance/vendor/go.uber.org/atomic/value.go
+++ b/test/performance/vendor/go.uber.org/atomic/value.go
@@ -25,7 +25,7 @@ import "sync/atomic"
// Value shadows the type of the same name from sync/atomic
// https://godoc.org/sync/atomic#Value
type Value struct {
- atomic.Value
-
_ nocmp // disallow non-atomic comparison
+
+ atomic.Value
}
diff --git a/test/performance/vendor/golang.org/x/net/http2/headermap.go b/test/performance/vendor/golang.org/x/net/http2/headermap.go
index 9e12941da..149b3dd20 100644
--- a/test/performance/vendor/golang.org/x/net/http2/headermap.go
+++ b/test/performance/vendor/golang.org/x/net/http2/headermap.go
@@ -27,7 +27,14 @@ func buildCommonHeaderMaps() {
"accept-language",
"accept-ranges",
"age",
+ "access-control-allow-credentials",
+ "access-control-allow-headers",
+ "access-control-allow-methods",
"access-control-allow-origin",
+ "access-control-expose-headers",
+ "access-control-max-age",
+ "access-control-request-headers",
+ "access-control-request-method",
"allow",
"authorization",
"cache-control",
@@ -53,6 +60,7 @@ func buildCommonHeaderMaps() {
"link",
"location",
"max-forwards",
+ "origin",
"proxy-authenticate",
"proxy-authorization",
"range",
@@ -68,6 +76,8 @@ func buildCommonHeaderMaps() {
"vary",
"via",
"www-authenticate",
+ "x-forwarded-for",
+ "x-forwarded-proto",
}
commonLowerHeader = make(map[string]string, len(common))
commonCanonHeader = make(map[string]string, len(common))
@@ -85,3 +95,11 @@ func lowerHeader(v string) (lower string, ascii bool) {
}
return asciiToLower(v)
}
+
+func canonicalHeader(v string) string {
+ buildCommonHeaderMapsOnce()
+ if s, ok := commonCanonHeader[v]; ok {
+ return s
+ }
+ return http.CanonicalHeaderKey(v)
+}
diff --git a/test/performance/vendor/golang.org/x/net/http2/hpack/encode.go b/test/performance/vendor/golang.org/x/net/http2/hpack/encode.go
index 6886dc163..46219da2b 100644
--- a/test/performance/vendor/golang.org/x/net/http2/hpack/encode.go
+++ b/test/performance/vendor/golang.org/x/net/http2/hpack/encode.go
@@ -116,6 +116,11 @@ func (e *Encoder) SetMaxDynamicTableSize(v uint32) {
e.dynTab.setMaxSize(v)
}
+// MaxDynamicTableSize returns the current dynamic header table size.
+func (e *Encoder) MaxDynamicTableSize() (v uint32) {
+ return e.dynTab.maxSize
+}
+
// SetMaxDynamicTableSizeLimit changes the maximum value that can be
// specified in SetMaxDynamicTableSize to v. By default, it is set to
// 4096, which is the same size of the default dynamic header table
diff --git a/test/performance/vendor/golang.org/x/net/http2/hpack/static_table.go b/test/performance/vendor/golang.org/x/net/http2/hpack/static_table.go
new file mode 100644
index 000000000..754a1eb91
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/net/http2/hpack/static_table.go
@@ -0,0 +1,188 @@
+// go generate gen.go
+// Code generated by the command above; DO NOT EDIT.
+
+package hpack
+
+var staticTable = &headerFieldTable{
+ evictCount: 0,
+ byName: map[string]uint64{
+ ":authority": 1,
+ ":method": 3,
+ ":path": 5,
+ ":scheme": 7,
+ ":status": 14,
+ "accept-charset": 15,
+ "accept-encoding": 16,
+ "accept-language": 17,
+ "accept-ranges": 18,
+ "accept": 19,
+ "access-control-allow-origin": 20,
+ "age": 21,
+ "allow": 22,
+ "authorization": 23,
+ "cache-control": 24,
+ "content-disposition": 25,
+ "content-encoding": 26,
+ "content-language": 27,
+ "content-length": 28,
+ "content-location": 29,
+ "content-range": 30,
+ "content-type": 31,
+ "cookie": 32,
+ "date": 33,
+ "etag": 34,
+ "expect": 35,
+ "expires": 36,
+ "from": 37,
+ "host": 38,
+ "if-match": 39,
+ "if-modified-since": 40,
+ "if-none-match": 41,
+ "if-range": 42,
+ "if-unmodified-since": 43,
+ "last-modified": 44,
+ "link": 45,
+ "location": 46,
+ "max-forwards": 47,
+ "proxy-authenticate": 48,
+ "proxy-authorization": 49,
+ "range": 50,
+ "referer": 51,
+ "refresh": 52,
+ "retry-after": 53,
+ "server": 54,
+ "set-cookie": 55,
+ "strict-transport-security": 56,
+ "transfer-encoding": 57,
+ "user-agent": 58,
+ "vary": 59,
+ "via": 60,
+ "www-authenticate": 61,
+ },
+ byNameValue: map[pairNameValue]uint64{
+ {name: ":authority", value: ""}: 1,
+ {name: ":method", value: "GET"}: 2,
+ {name: ":method", value: "POST"}: 3,
+ {name: ":path", value: "/"}: 4,
+ {name: ":path", value: "/index.html"}: 5,
+ {name: ":scheme", value: "http"}: 6,
+ {name: ":scheme", value: "https"}: 7,
+ {name: ":status", value: "200"}: 8,
+ {name: ":status", value: "204"}: 9,
+ {name: ":status", value: "206"}: 10,
+ {name: ":status", value: "304"}: 11,
+ {name: ":status", value: "400"}: 12,
+ {name: ":status", value: "404"}: 13,
+ {name: ":status", value: "500"}: 14,
+ {name: "accept-charset", value: ""}: 15,
+ {name: "accept-encoding", value: "gzip, deflate"}: 16,
+ {name: "accept-language", value: ""}: 17,
+ {name: "accept-ranges", value: ""}: 18,
+ {name: "accept", value: ""}: 19,
+ {name: "access-control-allow-origin", value: ""}: 20,
+ {name: "age", value: ""}: 21,
+ {name: "allow", value: ""}: 22,
+ {name: "authorization", value: ""}: 23,
+ {name: "cache-control", value: ""}: 24,
+ {name: "content-disposition", value: ""}: 25,
+ {name: "content-encoding", value: ""}: 26,
+ {name: "content-language", value: ""}: 27,
+ {name: "content-length", value: ""}: 28,
+ {name: "content-location", value: ""}: 29,
+ {name: "content-range", value: ""}: 30,
+ {name: "content-type", value: ""}: 31,
+ {name: "cookie", value: ""}: 32,
+ {name: "date", value: ""}: 33,
+ {name: "etag", value: ""}: 34,
+ {name: "expect", value: ""}: 35,
+ {name: "expires", value: ""}: 36,
+ {name: "from", value: ""}: 37,
+ {name: "host", value: ""}: 38,
+ {name: "if-match", value: ""}: 39,
+ {name: "if-modified-since", value: ""}: 40,
+ {name: "if-none-match", value: ""}: 41,
+ {name: "if-range", value: ""}: 42,
+ {name: "if-unmodified-since", value: ""}: 43,
+ {name: "last-modified", value: ""}: 44,
+ {name: "link", value: ""}: 45,
+ {name: "location", value: ""}: 46,
+ {name: "max-forwards", value: ""}: 47,
+ {name: "proxy-authenticate", value: ""}: 48,
+ {name: "proxy-authorization", value: ""}: 49,
+ {name: "range", value: ""}: 50,
+ {name: "referer", value: ""}: 51,
+ {name: "refresh", value: ""}: 52,
+ {name: "retry-after", value: ""}: 53,
+ {name: "server", value: ""}: 54,
+ {name: "set-cookie", value: ""}: 55,
+ {name: "strict-transport-security", value: ""}: 56,
+ {name: "transfer-encoding", value: ""}: 57,
+ {name: "user-agent", value: ""}: 58,
+ {name: "vary", value: ""}: 59,
+ {name: "via", value: ""}: 60,
+ {name: "www-authenticate", value: ""}: 61,
+ },
+ ents: []HeaderField{
+ {Name: ":authority", Value: "", Sensitive: false},
+ {Name: ":method", Value: "GET", Sensitive: false},
+ {Name: ":method", Value: "POST", Sensitive: false},
+ {Name: ":path", Value: "/", Sensitive: false},
+ {Name: ":path", Value: "/index.html", Sensitive: false},
+ {Name: ":scheme", Value: "http", Sensitive: false},
+ {Name: ":scheme", Value: "https", Sensitive: false},
+ {Name: ":status", Value: "200", Sensitive: false},
+ {Name: ":status", Value: "204", Sensitive: false},
+ {Name: ":status", Value: "206", Sensitive: false},
+ {Name: ":status", Value: "304", Sensitive: false},
+ {Name: ":status", Value: "400", Sensitive: false},
+ {Name: ":status", Value: "404", Sensitive: false},
+ {Name: ":status", Value: "500", Sensitive: false},
+ {Name: "accept-charset", Value: "", Sensitive: false},
+ {Name: "accept-encoding", Value: "gzip, deflate", Sensitive: false},
+ {Name: "accept-language", Value: "", Sensitive: false},
+ {Name: "accept-ranges", Value: "", Sensitive: false},
+ {Name: "accept", Value: "", Sensitive: false},
+ {Name: "access-control-allow-origin", Value: "", Sensitive: false},
+ {Name: "age", Value: "", Sensitive: false},
+ {Name: "allow", Value: "", Sensitive: false},
+ {Name: "authorization", Value: "", Sensitive: false},
+ {Name: "cache-control", Value: "", Sensitive: false},
+ {Name: "content-disposition", Value: "", Sensitive: false},
+ {Name: "content-encoding", Value: "", Sensitive: false},
+ {Name: "content-language", Value: "", Sensitive: false},
+ {Name: "content-length", Value: "", Sensitive: false},
+ {Name: "content-location", Value: "", Sensitive: false},
+ {Name: "content-range", Value: "", Sensitive: false},
+ {Name: "content-type", Value: "", Sensitive: false},
+ {Name: "cookie", Value: "", Sensitive: false},
+ {Name: "date", Value: "", Sensitive: false},
+ {Name: "etag", Value: "", Sensitive: false},
+ {Name: "expect", Value: "", Sensitive: false},
+ {Name: "expires", Value: "", Sensitive: false},
+ {Name: "from", Value: "", Sensitive: false},
+ {Name: "host", Value: "", Sensitive: false},
+ {Name: "if-match", Value: "", Sensitive: false},
+ {Name: "if-modified-since", Value: "", Sensitive: false},
+ {Name: "if-none-match", Value: "", Sensitive: false},
+ {Name: "if-range", Value: "", Sensitive: false},
+ {Name: "if-unmodified-since", Value: "", Sensitive: false},
+ {Name: "last-modified", Value: "", Sensitive: false},
+ {Name: "link", Value: "", Sensitive: false},
+ {Name: "location", Value: "", Sensitive: false},
+ {Name: "max-forwards", Value: "", Sensitive: false},
+ {Name: "proxy-authenticate", Value: "", Sensitive: false},
+ {Name: "proxy-authorization", Value: "", Sensitive: false},
+ {Name: "range", Value: "", Sensitive: false},
+ {Name: "referer", Value: "", Sensitive: false},
+ {Name: "refresh", Value: "", Sensitive: false},
+ {Name: "retry-after", Value: "", Sensitive: false},
+ {Name: "server", Value: "", Sensitive: false},
+ {Name: "set-cookie", Value: "", Sensitive: false},
+ {Name: "strict-transport-security", Value: "", Sensitive: false},
+ {Name: "transfer-encoding", Value: "", Sensitive: false},
+ {Name: "user-agent", Value: "", Sensitive: false},
+ {Name: "vary", Value: "", Sensitive: false},
+ {Name: "via", Value: "", Sensitive: false},
+ {Name: "www-authenticate", Value: "", Sensitive: false},
+ },
+}
diff --git a/test/performance/vendor/golang.org/x/net/http2/hpack/tables.go b/test/performance/vendor/golang.org/x/net/http2/hpack/tables.go
index a66cfbea6..8cbdf3f01 100644
--- a/test/performance/vendor/golang.org/x/net/http2/hpack/tables.go
+++ b/test/performance/vendor/golang.org/x/net/http2/hpack/tables.go
@@ -96,8 +96,7 @@ func (t *headerFieldTable) evictOldest(n int) {
// meaning t.ents is reversed for dynamic tables. Hence, when t is a dynamic
// table, the return value i actually refers to the entry t.ents[t.len()-i].
//
-// All tables are assumed to be a dynamic tables except for the global
-// staticTable pointer.
+// All tables are assumed to be a dynamic tables except for the global staticTable.
//
// See Section 2.3.3.
func (t *headerFieldTable) search(f HeaderField) (i uint64, nameValueMatch bool) {
@@ -125,81 +124,6 @@ func (t *headerFieldTable) idToIndex(id uint64) uint64 {
return k + 1
}
-// http://tools.ietf.org/html/draft-ietf-httpbis-header-compression-07#appendix-B
-var staticTable = newStaticTable()
-var staticTableEntries = [...]HeaderField{
- {Name: ":authority"},
- {Name: ":method", Value: "GET"},
- {Name: ":method", Value: "POST"},
- {Name: ":path", Value: "/"},
- {Name: ":path", Value: "/index.html"},
- {Name: ":scheme", Value: "http"},
- {Name: ":scheme", Value: "https"},
- {Name: ":status", Value: "200"},
- {Name: ":status", Value: "204"},
- {Name: ":status", Value: "206"},
- {Name: ":status", Value: "304"},
- {Name: ":status", Value: "400"},
- {Name: ":status", Value: "404"},
- {Name: ":status", Value: "500"},
- {Name: "accept-charset"},
- {Name: "accept-encoding", Value: "gzip, deflate"},
- {Name: "accept-language"},
- {Name: "accept-ranges"},
- {Name: "accept"},
- {Name: "access-control-allow-origin"},
- {Name: "age"},
- {Name: "allow"},
- {Name: "authorization"},
- {Name: "cache-control"},
- {Name: "content-disposition"},
- {Name: "content-encoding"},
- {Name: "content-language"},
- {Name: "content-length"},
- {Name: "content-location"},
- {Name: "content-range"},
- {Name: "content-type"},
- {Name: "cookie"},
- {Name: "date"},
- {Name: "etag"},
- {Name: "expect"},
- {Name: "expires"},
- {Name: "from"},
- {Name: "host"},
- {Name: "if-match"},
- {Name: "if-modified-since"},
- {Name: "if-none-match"},
- {Name: "if-range"},
- {Name: "if-unmodified-since"},
- {Name: "last-modified"},
- {Name: "link"},
- {Name: "location"},
- {Name: "max-forwards"},
- {Name: "proxy-authenticate"},
- {Name: "proxy-authorization"},
- {Name: "range"},
- {Name: "referer"},
- {Name: "refresh"},
- {Name: "retry-after"},
- {Name: "server"},
- {Name: "set-cookie"},
- {Name: "strict-transport-security"},
- {Name: "transfer-encoding"},
- {Name: "user-agent"},
- {Name: "vary"},
- {Name: "via"},
- {Name: "www-authenticate"},
-}
-
-func newStaticTable() *headerFieldTable {
- t := &headerFieldTable{}
- t.init()
- for _, e := range staticTableEntries[:] {
- t.addEntry(e)
- }
- return t
-}
-
var huffmanCodes = [256]uint32{
0x1ff8,
0x7fffd8,
diff --git a/test/performance/vendor/golang.org/x/net/http2/server.go b/test/performance/vendor/golang.org/x/net/http2/server.go
index 47524a61a..4eb7617fa 100644
--- a/test/performance/vendor/golang.org/x/net/http2/server.go
+++ b/test/performance/vendor/golang.org/x/net/http2/server.go
@@ -98,6 +98,19 @@ type Server struct {
// the HTTP/2 spec's recommendations.
MaxConcurrentStreams uint32
+ // MaxDecoderHeaderTableSize optionally specifies the http2
+ // SETTINGS_HEADER_TABLE_SIZE to send in the initial settings frame. It
+ // informs the remote endpoint of the maximum size of the header compression
+ // table used to decode header blocks, in octets. If zero, the default value
+ // of 4096 is used.
+ MaxDecoderHeaderTableSize uint32
+
+ // MaxEncoderHeaderTableSize optionally specifies an upper limit for the
+ // header compression table used for encoding request headers. Received
+ // SETTINGS_HEADER_TABLE_SIZE settings are capped at this limit. If zero,
+ // the default value of 4096 is used.
+ MaxEncoderHeaderTableSize uint32
+
// MaxReadFrameSize optionally specifies the largest frame
// this server is willing to read. A valid value is between
// 16k and 16M, inclusive. If zero or otherwise invalid, a
@@ -143,7 +156,7 @@ type Server struct {
}
func (s *Server) initialConnRecvWindowSize() int32 {
- if s.MaxUploadBufferPerConnection > initialWindowSize {
+ if s.MaxUploadBufferPerConnection >= initialWindowSize {
return s.MaxUploadBufferPerConnection
}
return 1 << 20
@@ -170,6 +183,20 @@ func (s *Server) maxConcurrentStreams() uint32 {
return defaultMaxStreams
}
+func (s *Server) maxDecoderHeaderTableSize() uint32 {
+ if v := s.MaxDecoderHeaderTableSize; v > 0 {
+ return v
+ }
+ return initialHeaderTableSize
+}
+
+func (s *Server) maxEncoderHeaderTableSize() uint32 {
+ if v := s.MaxEncoderHeaderTableSize; v > 0 {
+ return v
+ }
+ return initialHeaderTableSize
+}
+
// maxQueuedControlFrames is the maximum number of control frames like
// SETTINGS, PING and RST_STREAM that will be queued for writing before
// the connection is closed to prevent memory exhaustion attacks.
@@ -394,7 +421,6 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
advMaxStreams: s.maxConcurrentStreams(),
initialStreamSendWindowSize: initialWindowSize,
maxFrameSize: initialMaxFrameSize,
- headerTableSize: initialHeaderTableSize,
serveG: newGoroutineLock(),
pushEnabled: true,
sawClientPreface: opts.SawClientPreface,
@@ -424,12 +450,13 @@ func (s *Server) ServeConn(c net.Conn, opts *ServeConnOpts) {
sc.flow.add(initialWindowSize)
sc.inflow.add(initialWindowSize)
sc.hpackEncoder = hpack.NewEncoder(&sc.headerWriteBuf)
+ sc.hpackEncoder.SetMaxDynamicTableSizeLimit(s.maxEncoderHeaderTableSize())
fr := NewFramer(sc.bw, c)
if s.CountError != nil {
fr.countError = s.CountError
}
- fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil)
+ fr.ReadMetaHeaders = hpack.NewDecoder(s.maxDecoderHeaderTableSize(), nil)
fr.MaxHeaderListSize = sc.maxHeaderListSize()
fr.SetMaxReadFrameSize(s.maxReadFrameSize())
sc.framer = fr
@@ -559,9 +586,9 @@ type serverConn struct {
streams map[uint32]*stream
initialStreamSendWindowSize int32
maxFrameSize int32
- headerTableSize uint32
peerMaxHeaderListSize uint32 // zero means unknown (default)
canonHeader map[string]string // http2-lower-case -> Go-Canonical-Case
+ canonHeaderKeysSize int // canonHeader keys size in bytes
writingFrame bool // started writing a frame (on serve goroutine or separate)
writingFrameAsync bool // started a frame on its own goroutine but haven't heard back on wroteFrameCh
needsFrameFlush bool // last frame write wasn't a flush
@@ -622,7 +649,9 @@ type stream struct {
resetQueued bool // RST_STREAM queued for write; set by sc.resetStream
gotTrailerHeader bool // HEADER frame for trailers was seen
wroteHeaders bool // whether we wrote headers (not status 100)
+ readDeadline *time.Timer // nil if unused
writeDeadline *time.Timer // nil if unused
+ closeErr error // set before cw is closed
trailer http.Header // accumulated trailers
reqTrailer http.Header // handler's Request.Trailer
@@ -738,6 +767,13 @@ func (sc *serverConn) condlogf(err error, format string, args ...interface{}) {
}
}
+// maxCachedCanonicalHeadersKeysSize is an arbitrarily-chosen limit on the size
+// of the entries in the canonHeader cache.
+// This should be larger than the size of unique, uncommon header keys likely to
+// be sent by the peer, while not so high as to permit unreasonable memory usage
+// if the peer sends an unbounded number of unique header keys.
+const maxCachedCanonicalHeadersKeysSize = 2048
+
func (sc *serverConn) canonicalHeader(v string) string {
sc.serveG.check()
buildCommonHeaderMapsOnce()
@@ -753,14 +789,10 @@ func (sc *serverConn) canonicalHeader(v string) string {
sc.canonHeader = make(map[string]string)
}
cv = http.CanonicalHeaderKey(v)
- // maxCachedCanonicalHeaders is an arbitrarily-chosen limit on the number of
- // entries in the canonHeader cache. This should be larger than the number
- // of unique, uncommon header keys likely to be sent by the peer, while not
- // so high as to permit unreasonable memory usage if the peer sends an unbounded
- // number of unique header keys.
- const maxCachedCanonicalHeaders = 32
- if len(sc.canonHeader) < maxCachedCanonicalHeaders {
+ size := 100 + len(v)*2 // 100 bytes of map overhead + key + value
+ if sc.canonHeaderKeysSize+size <= maxCachedCanonicalHeadersKeysSize {
sc.canonHeader[v] = cv
+ sc.canonHeaderKeysSize += size
}
return cv
}
@@ -862,6 +894,7 @@ func (sc *serverConn) serve() {
{SettingMaxFrameSize, sc.srv.maxReadFrameSize()},
{SettingMaxConcurrentStreams, sc.advMaxStreams},
{SettingMaxHeaderListSize, sc.maxHeaderListSize()},
+ {SettingHeaderTableSize, sc.srv.maxDecoderHeaderTableSize()},
{SettingInitialWindowSize, uint32(sc.srv.initialStreamRecvWindowSize())},
},
})
@@ -948,6 +981,8 @@ func (sc *serverConn) serve() {
}
case *startPushRequest:
sc.startPush(v)
+ case func(*serverConn):
+ v(sc)
default:
panic(fmt.Sprintf("unexpected type %T", v))
}
@@ -1371,6 +1406,9 @@ func (sc *serverConn) startGracefulShutdownInternal() {
func (sc *serverConn) goAway(code ErrCode) {
sc.serveG.check()
if sc.inGoAway {
+ if sc.goAwayCode == ErrCodeNo {
+ sc.goAwayCode = code
+ }
return
}
sc.inGoAway = true
@@ -1458,6 +1496,21 @@ func (sc *serverConn) processFrame(f Frame) error {
sc.sawFirstSettings = true
}
+ // Discard frames for streams initiated after the identified last
+ // stream sent in a GOAWAY, or all frames after sending an error.
+ // We still need to return connection-level flow control for DATA frames.
+ // RFC 9113 Section 6.8.
+ if sc.inGoAway && (sc.goAwayCode != ErrCodeNo || f.Header().StreamID > sc.maxClientStreamID) {
+
+ if f, ok := f.(*DataFrame); ok {
+ if sc.inflow.available() < int32(f.Length) {
+ return sc.countError("data_flow", streamError(f.Header().StreamID, ErrCodeFlowControl))
+ }
+ sc.sendWindowUpdate(nil, int(f.Length)) // conn-level
+ }
+ return nil
+ }
+
switch f := f.(type) {
case *SettingsFrame:
return sc.processSettings(f)
@@ -1500,9 +1553,6 @@ func (sc *serverConn) processPing(f *PingFrame) error {
// PROTOCOL_ERROR."
return sc.countError("ping_on_stream", ConnectionError(ErrCodeProtocol))
}
- if sc.inGoAway && sc.goAwayCode != ErrCodeNo {
- return nil
- }
sc.writeFrame(FrameWriteRequest{write: writePingAck{f}})
return nil
}
@@ -1564,6 +1614,9 @@ func (sc *serverConn) closeStream(st *stream, err error) {
panic(fmt.Sprintf("invariant; can't close stream in state %v", st.state))
}
st.state = stateClosed
+ if st.readDeadline != nil {
+ st.readDeadline.Stop()
+ }
if st.writeDeadline != nil {
st.writeDeadline.Stop()
}
@@ -1589,6 +1642,14 @@ func (sc *serverConn) closeStream(st *stream, err error) {
p.CloseWithError(err)
}
+ if e, ok := err.(StreamError); ok {
+ if e.Cause != nil {
+ err = e.Cause
+ } else {
+ err = errStreamClosed
+ }
+ }
+ st.closeErr = err
st.cw.Close() // signals Handler's CloseNotifier, unblocks writes, etc
sc.writeSched.CloseStream(st.id)
}
@@ -1631,7 +1692,6 @@ func (sc *serverConn) processSetting(s Setting) error {
}
switch s.ID {
case SettingHeaderTableSize:
- sc.headerTableSize = s.Val
sc.hpackEncoder.SetMaxDynamicTableSize(s.Val)
case SettingEnablePush:
sc.pushEnabled = s.Val != 0
@@ -1685,16 +1745,6 @@ func (sc *serverConn) processSettingInitialWindowSize(val uint32) error {
func (sc *serverConn) processData(f *DataFrame) error {
sc.serveG.check()
id := f.Header().StreamID
- if sc.inGoAway && (sc.goAwayCode != ErrCodeNo || id > sc.maxClientStreamID) {
- // Discard all DATA frames if the GOAWAY is due to an
- // error, or:
- //
- // Section 6.8: After sending a GOAWAY frame, the sender
- // can discard frames for streams initiated by the
- // receiver with identifiers higher than the identified
- // last stream.
- return nil
- }
data := f.Data()
state, st := sc.state(id)
@@ -1747,6 +1797,12 @@ func (sc *serverConn) processData(f *DataFrame) error {
// Sender sending more than they'd declared?
if st.declBodyBytes != -1 && st.bodyBytes+int64(len(data)) > st.declBodyBytes {
+ if sc.inflow.available() < int32(f.Length) {
+ return sc.countError("data_flow", streamError(id, ErrCodeFlowControl))
+ }
+ sc.inflow.take(int32(f.Length))
+ sc.sendWindowUpdate(nil, int(f.Length)) // conn-level
+
st.body.CloseWithError(fmt.Errorf("sender tried to send more than declared Content-Length of %d bytes", st.declBodyBytes))
// RFC 7540, sec 8.1.2.6: A request or response is also malformed if the
// value of a content-length header field does not equal the sum of the
@@ -1831,19 +1887,27 @@ func (st *stream) copyTrailersToHandlerRequest() {
}
}
+// onReadTimeout is run on its own goroutine (from time.AfterFunc)
+// when the stream's ReadTimeout has fired.
+func (st *stream) onReadTimeout() {
+ // Wrap the ErrDeadlineExceeded to avoid callers depending on us
+ // returning the bare error.
+ st.body.CloseWithError(fmt.Errorf("%w", os.ErrDeadlineExceeded))
+}
+
// onWriteTimeout is run on its own goroutine (from time.AfterFunc)
// when the stream's WriteTimeout has fired.
func (st *stream) onWriteTimeout() {
- st.sc.writeFrameFromHandler(FrameWriteRequest{write: streamError(st.id, ErrCodeInternal)})
+ st.sc.writeFrameFromHandler(FrameWriteRequest{write: StreamError{
+ StreamID: st.id,
+ Code: ErrCodeInternal,
+ Cause: os.ErrDeadlineExceeded,
+ }})
}
func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
sc.serveG.check()
id := f.StreamID
- if sc.inGoAway {
- // Ignore.
- return nil
- }
// http://tools.ietf.org/html/rfc7540#section-5.1.1
// Streams initiated by a client MUST use odd-numbered stream
// identifiers. [...] An endpoint that receives an unexpected
@@ -1946,6 +2010,9 @@ func (sc *serverConn) processHeaders(f *MetaHeadersFrame) error {
// (in Go 1.8), though. That's a more sane option anyway.
if sc.hs.ReadTimeout != 0 {
sc.conn.SetReadDeadline(time.Time{})
+ if st.body != nil {
+ st.readDeadline = time.AfterFunc(sc.hs.ReadTimeout, st.onReadTimeout)
+ }
}
go sc.runHandler(rw, req, handler)
@@ -2014,9 +2081,6 @@ func (sc *serverConn) checkPriority(streamID uint32, p PriorityParam) error {
}
func (sc *serverConn) processPriority(f *PriorityFrame) error {
- if sc.inGoAway {
- return nil
- }
if err := sc.checkPriority(f.StreamID, f.PriorityParam); err != nil {
return err
}
@@ -2090,12 +2154,6 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
return nil, nil, sc.countError("bad_path_method", streamError(f.StreamID, ErrCodeProtocol))
}
- bodyOpen := !f.StreamEnded()
- if rp.method == "HEAD" && bodyOpen {
- // HEAD requests can't have bodies
- return nil, nil, sc.countError("head_body", streamError(f.StreamID, ErrCodeProtocol))
- }
-
rp.header = make(http.Header)
for _, hf := range f.RegularFields() {
rp.header.Add(sc.canonicalHeader(hf.Name), hf.Value)
@@ -2108,6 +2166,7 @@ func (sc *serverConn) newWriterAndRequest(st *stream, f *MetaHeadersFrame) (*res
if err != nil {
return nil, nil, err
}
+ bodyOpen := !f.StreamEnded()
if bodyOpen {
if vv, ok := rp.header["Content-Length"]; ok {
if cl, err := strconv.ParseUint(vv[0], 10, 63); err == nil {
@@ -2223,6 +2282,9 @@ func (sc *serverConn) runHandler(rw *responseWriter, req *http.Request, handler
didPanic := true
defer func() {
rw.rws.stream.cancelCtx()
+ if req.MultipartForm != nil {
+ req.MultipartForm.RemoveAll()
+ }
if didPanic {
e := recover()
sc.writeFrameFromHandler(FrameWriteRequest{
@@ -2334,7 +2396,7 @@ func (sc *serverConn) sendWindowUpdate(st *stream, n int) {
// a larger Read than this. Very unlikely, but we handle it here
// rather than elsewhere for now.
const maxUint31 = 1<<31 - 1
- for n >= maxUint31 {
+ for n > maxUint31 {
sc.sendWindowUpdate32(st, maxUint31)
n -= maxUint31
}
@@ -2454,7 +2516,15 @@ type responseWriterState struct {
type chunkWriter struct{ rws *responseWriterState }
-func (cw chunkWriter) Write(p []byte) (n int, err error) { return cw.rws.writeChunk(p) }
+func (cw chunkWriter) Write(p []byte) (n int, err error) {
+ n, err = cw.rws.writeChunk(p)
+ if err == errStreamClosed {
+ // If writing failed because the stream has been closed,
+ // return the reason it was closed.
+ err = cw.rws.stream.closeErr
+ }
+ return n, err
+}
func (rws *responseWriterState) hasTrailers() bool { return len(rws.trailers) > 0 }
@@ -2493,6 +2563,10 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
rws.writeHeader(200)
}
+ if rws.handlerDone {
+ rws.promoteUndeclaredTrailers()
+ }
+
isHeadResp := rws.req.Method == "HEAD"
if !rws.sentHeader {
rws.sentHeader = true
@@ -2564,10 +2638,6 @@ func (rws *responseWriterState) writeChunk(p []byte) (n int, err error) {
return 0, nil
}
- if rws.handlerDone {
- rws.promoteUndeclaredTrailers()
- }
-
// only send trailers if they have actually been defined by the
// server handler.
hasNonemptyTrailers := rws.hasNonemptyTrailers()
@@ -2648,23 +2718,85 @@ func (rws *responseWriterState) promoteUndeclaredTrailers() {
}
}
+func (w *responseWriter) SetReadDeadline(deadline time.Time) error {
+ st := w.rws.stream
+ if !deadline.IsZero() && deadline.Before(time.Now()) {
+ // If we're setting a deadline in the past, reset the stream immediately
+ // so writes after SetWriteDeadline returns will fail.
+ st.onReadTimeout()
+ return nil
+ }
+ w.rws.conn.sendServeMsg(func(sc *serverConn) {
+ if st.readDeadline != nil {
+ if !st.readDeadline.Stop() {
+ // Deadline already exceeded, or stream has been closed.
+ return
+ }
+ }
+ if deadline.IsZero() {
+ st.readDeadline = nil
+ } else if st.readDeadline == nil {
+ st.readDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onReadTimeout)
+ } else {
+ st.readDeadline.Reset(deadline.Sub(time.Now()))
+ }
+ })
+ return nil
+}
+
+func (w *responseWriter) SetWriteDeadline(deadline time.Time) error {
+ st := w.rws.stream
+ if !deadline.IsZero() && deadline.Before(time.Now()) {
+ // If we're setting a deadline in the past, reset the stream immediately
+ // so writes after SetWriteDeadline returns will fail.
+ st.onWriteTimeout()
+ return nil
+ }
+ w.rws.conn.sendServeMsg(func(sc *serverConn) {
+ if st.writeDeadline != nil {
+ if !st.writeDeadline.Stop() {
+ // Deadline already exceeded, or stream has been closed.
+ return
+ }
+ }
+ if deadline.IsZero() {
+ st.writeDeadline = nil
+ } else if st.writeDeadline == nil {
+ st.writeDeadline = time.AfterFunc(deadline.Sub(time.Now()), st.onWriteTimeout)
+ } else {
+ st.writeDeadline.Reset(deadline.Sub(time.Now()))
+ }
+ })
+ return nil
+}
+
func (w *responseWriter) Flush() {
+ w.FlushError()
+}
+
+func (w *responseWriter) FlushError() error {
rws := w.rws
if rws == nil {
panic("Header called after Handler finished")
}
+ var err error
if rws.bw.Buffered() > 0 {
- if err := rws.bw.Flush(); err != nil {
- // Ignore the error. The frame writer already knows.
- return
- }
+ err = rws.bw.Flush()
} else {
// The bufio.Writer won't call chunkWriter.Write
// (writeChunk with zero bytes, so we have to do it
// ourselves to force the HTTP response header and/or
// final DATA frame (with END_STREAM) to be sent.
- rws.writeChunk(nil)
+ _, err = chunkWriter{rws}.Write(nil)
+ if err == nil {
+ select {
+ case <-rws.stream.cw:
+ err = rws.stream.closeErr
+ default:
+ }
+ }
}
+ return err
}
func (w *responseWriter) CloseNotify() <-chan bool {
diff --git a/test/performance/vendor/golang.org/x/net/http2/transport.go b/test/performance/vendor/golang.org/x/net/http2/transport.go
index 4ded4dfd5..30f706e6c 100644
--- a/test/performance/vendor/golang.org/x/net/http2/transport.go
+++ b/test/performance/vendor/golang.org/x/net/http2/transport.go
@@ -16,6 +16,7 @@ import (
"errors"
"fmt"
"io"
+ "io/fs"
"log"
"math"
mathrand "math/rand"
@@ -67,13 +68,23 @@ const (
// A Transport internally caches connections to servers. It is safe
// for concurrent use by multiple goroutines.
type Transport struct {
- // DialTLS specifies an optional dial function for creating
- // TLS connections for requests.
+ // DialTLSContext specifies an optional dial function with context for
+ // creating TLS connections for requests.
//
- // If DialTLS is nil, tls.Dial is used.
+ // If DialTLSContext and DialTLS is nil, tls.Dial is used.
//
// If the returned net.Conn has a ConnectionState method like tls.Conn,
// it will be used to set http.Response.TLS.
+ DialTLSContext func(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error)
+
+ // DialTLS specifies an optional dial function for creating
+ // TLS connections for requests.
+ //
+ // If DialTLSContext and DialTLS is nil, tls.Dial is used.
+ //
+ // Deprecated: Use DialTLSContext instead, which allows the transport
+ // to cancel dials as soon as they are no longer needed.
+ // If both are set, DialTLSContext takes priority.
DialTLS func(network, addr string, cfg *tls.Config) (net.Conn, error)
// TLSClientConfig specifies the TLS configuration to use with
@@ -107,6 +118,28 @@ type Transport struct {
// to mean no limit.
MaxHeaderListSize uint32
+ // MaxReadFrameSize is the http2 SETTINGS_MAX_FRAME_SIZE to send in the
+ // initial settings frame. It is the size in bytes of the largest frame
+ // payload that the sender is willing to receive. If 0, no setting is
+ // sent, and the value is provided by the peer, which should be 16384
+ // according to the spec:
+ // https://datatracker.ietf.org/doc/html/rfc7540#section-6.5.2.
+ // Values are bounded in the range 16k to 16M.
+ MaxReadFrameSize uint32
+
+ // MaxDecoderHeaderTableSize optionally specifies the http2
+ // SETTINGS_HEADER_TABLE_SIZE to send in the initial settings frame. It
+ // informs the remote endpoint of the maximum size of the header compression
+ // table used to decode header blocks, in octets. If zero, the default value
+ // of 4096 is used.
+ MaxDecoderHeaderTableSize uint32
+
+ // MaxEncoderHeaderTableSize optionally specifies an upper limit for the
+ // header compression table used for encoding request headers. Received
+ // SETTINGS_HEADER_TABLE_SIZE settings are capped at this limit. If zero,
+ // the default value of 4096 is used.
+ MaxEncoderHeaderTableSize uint32
+
// StrictMaxConcurrentStreams controls whether the server's
// SETTINGS_MAX_CONCURRENT_STREAMS should be respected
// globally. If false, new TCP connections are created to the
@@ -160,6 +193,19 @@ func (t *Transport) maxHeaderListSize() uint32 {
return t.MaxHeaderListSize
}
+func (t *Transport) maxFrameReadSize() uint32 {
+ if t.MaxReadFrameSize == 0 {
+ return 0 // use the default provided by the peer
+ }
+ if t.MaxReadFrameSize < minMaxFrameSize {
+ return minMaxFrameSize
+ }
+ if t.MaxReadFrameSize > maxFrameSize {
+ return maxFrameSize
+ }
+ return t.MaxReadFrameSize
+}
+
func (t *Transport) disableCompression() bool {
return t.DisableCompression || (t.t1 != nil && t.t1.DisableCompression)
}
@@ -248,7 +294,8 @@ func (t *Transport) initConnPool() {
// HTTP/2 server.
type ClientConn struct {
t *Transport
- tconn net.Conn // usually *tls.Conn, except specialized impls
+ tconn net.Conn // usually *tls.Conn, except specialized impls
+ tconnClosed bool
tlsState *tls.ConnectionState // nil only for specialized impls
reused uint32 // whether conn is being reused; atomic
singleUse bool // whether being used for a single http.Request
@@ -281,10 +328,11 @@ type ClientConn struct {
lastActive time.Time
lastIdle time.Time // time last idle
// Settings from peer: (also guarded by wmu)
- maxFrameSize uint32
- maxConcurrentStreams uint32
- peerMaxHeaderListSize uint64
- initialWindowSize uint32
+ maxFrameSize uint32
+ maxConcurrentStreams uint32
+ peerMaxHeaderListSize uint64
+ peerMaxHeaderTableSize uint32
+ initialWindowSize uint32
// reqHeaderMu is a 1-element semaphore channel controlling access to sending new requests.
// Write to reqHeaderMu to lock it, read from it to unlock.
@@ -334,8 +382,8 @@ type clientStream struct {
readErr error // sticky read error; owned by transportResponseBody.Read
reqBody io.ReadCloser
- reqBodyContentLength int64 // -1 means unknown
- reqBodyClosed bool // body has been closed; guarded by cc.mu
+ reqBodyContentLength int64 // -1 means unknown
+ reqBodyClosed chan struct{} // guarded by cc.mu; non-nil on Close, closed when done
// owned by writeRequest:
sentEndStream bool // sent an END_STREAM flag to the peer
@@ -375,9 +423,8 @@ func (cs *clientStream) abortStreamLocked(err error) {
cs.abortErr = err
close(cs.abort)
})
- if cs.reqBody != nil && !cs.reqBodyClosed {
- cs.reqBody.Close()
- cs.reqBodyClosed = true
+ if cs.reqBody != nil {
+ cs.closeReqBodyLocked()
}
// TODO(dneil): Clean up tests where cs.cc.cond is nil.
if cs.cc.cond != nil {
@@ -390,13 +437,24 @@ func (cs *clientStream) abortRequestBodyWrite() {
cc := cs.cc
cc.mu.Lock()
defer cc.mu.Unlock()
- if cs.reqBody != nil && !cs.reqBodyClosed {
- cs.reqBody.Close()
- cs.reqBodyClosed = true
+ if cs.reqBody != nil && cs.reqBodyClosed == nil {
+ cs.closeReqBodyLocked()
cc.cond.Broadcast()
}
}
+func (cs *clientStream) closeReqBodyLocked() {
+ if cs.reqBodyClosed != nil {
+ return
+ }
+ cs.reqBodyClosed = make(chan struct{})
+ reqBodyClosed := cs.reqBodyClosed
+ go func() {
+ cs.reqBody.Close()
+ close(reqBodyClosed)
+ }()
+}
+
type stickyErrWriter struct {
conn net.Conn
timeout time.Duration
@@ -480,6 +538,15 @@ func authorityAddr(scheme string, authority string) (addr string) {
return net.JoinHostPort(host, port)
}
+var retryBackoffHook func(time.Duration) *time.Timer
+
+func backoffNewTimer(d time.Duration) *time.Timer {
+ if retryBackoffHook != nil {
+ return retryBackoffHook(d)
+ }
+ return time.NewTimer(d)
+}
+
// RoundTripOpt is like RoundTrip, but takes options.
func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Response, error) {
if !(req.URL.Scheme == "https" || (req.URL.Scheme == "http" && t.AllowHTTP)) {
@@ -505,11 +572,14 @@ func (t *Transport) RoundTripOpt(req *http.Request, opt RoundTripOpt) (*http.Res
}
backoff := float64(uint(1) << (uint(retry) - 1))
backoff += backoff * (0.1 * mathrand.Float64())
+ d := time.Second * time.Duration(backoff)
+ timer := backoffNewTimer(d)
select {
- case <-time.After(time.Second * time.Duration(backoff)):
+ case <-timer.C:
t.vlogf("RoundTrip retrying after failure: %v", err)
continue
case <-req.Context().Done():
+ timer.Stop()
err = req.Context().Err()
}
}
@@ -592,7 +662,7 @@ func (t *Transport) dialClientConn(ctx context.Context, addr string, singleUse b
if err != nil {
return nil, err
}
- tconn, err := t.dialTLS(ctx)("tcp", addr, t.newTLSConfig(host))
+ tconn, err := t.dialTLS(ctx, "tcp", addr, t.newTLSConfig(host))
if err != nil {
return nil, err
}
@@ -613,24 +683,25 @@ func (t *Transport) newTLSConfig(host string) *tls.Config {
return cfg
}
-func (t *Transport) dialTLS(ctx context.Context) func(string, string, *tls.Config) (net.Conn, error) {
- if t.DialTLS != nil {
- return t.DialTLS
+func (t *Transport) dialTLS(ctx context.Context, network, addr string, tlsCfg *tls.Config) (net.Conn, error) {
+ if t.DialTLSContext != nil {
+ return t.DialTLSContext(ctx, network, addr, tlsCfg)
+ } else if t.DialTLS != nil {
+ return t.DialTLS(network, addr, tlsCfg)
}
- return func(network, addr string, cfg *tls.Config) (net.Conn, error) {
- tlsCn, err := t.dialTLSWithContext(ctx, network, addr, cfg)
- if err != nil {
- return nil, err
- }
- state := tlsCn.ConnectionState()
- if p := state.NegotiatedProtocol; p != NextProtoTLS {
- return nil, fmt.Errorf("http2: unexpected ALPN protocol %q; want %q", p, NextProtoTLS)
- }
- if !state.NegotiatedProtocolIsMutual {
- return nil, errors.New("http2: could not negotiate protocol mutually")
- }
- return tlsCn, nil
+
+ tlsCn, err := t.dialTLSWithContext(ctx, network, addr, tlsCfg)
+ if err != nil {
+ return nil, err
+ }
+ state := tlsCn.ConnectionState()
+ if p := state.NegotiatedProtocol; p != NextProtoTLS {
+ return nil, fmt.Errorf("http2: unexpected ALPN protocol %q; want %q", p, NextProtoTLS)
}
+ if !state.NegotiatedProtocolIsMutual {
+ return nil, errors.New("http2: could not negotiate protocol mutually")
+ }
+ return tlsCn, nil
}
// disableKeepAlives reports whether connections should be closed as
@@ -646,6 +717,20 @@ func (t *Transport) expectContinueTimeout() time.Duration {
return t.t1.ExpectContinueTimeout
}
+func (t *Transport) maxDecoderHeaderTableSize() uint32 {
+ if v := t.MaxDecoderHeaderTableSize; v > 0 {
+ return v
+ }
+ return initialHeaderTableSize
+}
+
+func (t *Transport) maxEncoderHeaderTableSize() uint32 {
+ if v := t.MaxEncoderHeaderTableSize; v > 0 {
+ return v
+ }
+ return initialHeaderTableSize
+}
+
func (t *Transport) NewClientConn(c net.Conn) (*ClientConn, error) {
return t.newClientConn(c, t.disableKeepAlives())
}
@@ -686,15 +771,19 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
})
cc.br = bufio.NewReader(c)
cc.fr = NewFramer(cc.bw, cc.br)
+ if t.maxFrameReadSize() != 0 {
+ cc.fr.SetMaxReadFrameSize(t.maxFrameReadSize())
+ }
if t.CountError != nil {
cc.fr.countError = t.CountError
}
- cc.fr.ReadMetaHeaders = hpack.NewDecoder(initialHeaderTableSize, nil)
+ maxHeaderTableSize := t.maxDecoderHeaderTableSize()
+ cc.fr.ReadMetaHeaders = hpack.NewDecoder(maxHeaderTableSize, nil)
cc.fr.MaxHeaderListSize = t.maxHeaderListSize()
- // TODO: SetMaxDynamicTableSize, SetMaxDynamicTableSizeLimit on
- // henc in response to SETTINGS frames?
cc.henc = hpack.NewEncoder(&cc.hbuf)
+ cc.henc.SetMaxDynamicTableSizeLimit(t.maxEncoderHeaderTableSize())
+ cc.peerMaxHeaderTableSize = initialHeaderTableSize
if t.AllowHTTP {
cc.nextStreamID = 3
@@ -709,9 +798,15 @@ func (t *Transport) newClientConn(c net.Conn, singleUse bool) (*ClientConn, erro
{ID: SettingEnablePush, Val: 0},
{ID: SettingInitialWindowSize, Val: transportDefaultStreamFlow},
}
+ if max := t.maxFrameReadSize(); max != 0 {
+ initialSettings = append(initialSettings, Setting{ID: SettingMaxFrameSize, Val: max})
+ }
if max := t.maxHeaderListSize(); max != 0 {
initialSettings = append(initialSettings, Setting{ID: SettingMaxHeaderListSize, Val: max})
}
+ if maxHeaderTableSize != initialHeaderTableSize {
+ initialSettings = append(initialSettings, Setting{ID: SettingHeaderTableSize, Val: maxHeaderTableSize})
+ }
cc.bw.Write(clientPreface)
cc.fr.WriteSettings(initialSettings...)
@@ -910,10 +1005,10 @@ func (cc *ClientConn) onIdleTimeout() {
cc.closeIfIdle()
}
-func (cc *ClientConn) closeConn() error {
+func (cc *ClientConn) closeConn() {
t := time.AfterFunc(250*time.Millisecond, cc.forceCloseConn)
defer t.Stop()
- return cc.tconn.Close()
+ cc.tconn.Close()
}
// A tls.Conn.Close can hang for a long time if the peer is unresponsive.
@@ -979,7 +1074,8 @@ func (cc *ClientConn) Shutdown(ctx context.Context) error {
shutdownEnterWaitStateHook()
select {
case <-done:
- return cc.closeConn()
+ cc.closeConn()
+ return nil
case <-ctx.Done():
cc.mu.Lock()
// Free the goroutine above
@@ -1016,7 +1112,7 @@ func (cc *ClientConn) sendGoAway() error {
// closes the client connection immediately. In-flight requests are interrupted.
// err is sent to streams.
-func (cc *ClientConn) closeForError(err error) error {
+func (cc *ClientConn) closeForError(err error) {
cc.mu.Lock()
cc.closed = true
for _, cs := range cc.streams {
@@ -1024,7 +1120,7 @@ func (cc *ClientConn) closeForError(err error) error {
}
cc.cond.Broadcast()
cc.mu.Unlock()
- return cc.closeConn()
+ cc.closeConn()
}
// Close closes the client connection immediately.
@@ -1032,16 +1128,17 @@ func (cc *ClientConn) closeForError(err error) error {
// In-flight requests are interrupted. For a graceful shutdown, use Shutdown instead.
func (cc *ClientConn) Close() error {
err := errors.New("http2: client connection force closed via ClientConn.Close")
- return cc.closeForError(err)
+ cc.closeForError(err)
+ return nil
}
// closes the client connection immediately. In-flight requests are interrupted.
-func (cc *ClientConn) closeForLostPing() error {
+func (cc *ClientConn) closeForLostPing() {
err := errors.New("http2: client connection lost")
if f := cc.t.CountError; f != nil {
f("conn_close_lost_ping")
}
- return cc.closeForError(err)
+ cc.closeForError(err)
}
// errRequestCanceled is a copy of net/http's errRequestCanceled because it's not
@@ -1051,7 +1148,7 @@ var errRequestCanceled = errors.New("net/http: request canceled")
func commaSeparatedTrailers(req *http.Request) (string, error) {
keys := make([]string, 0, len(req.Trailer))
for k := range req.Trailer {
- k = http.CanonicalHeaderKey(k)
+ k = canonicalHeader(k)
switch k {
case "Transfer-Encoding", "Trailer", "Content-Length":
return "", fmt.Errorf("invalid Trailer key %q", k)
@@ -1419,11 +1516,19 @@ func (cs *clientStream) cleanupWriteRequest(err error) {
// and in multiple cases: server replies <=299 and >299
// while still writing request body
cc.mu.Lock()
+ mustCloseBody := false
+ if cs.reqBody != nil && cs.reqBodyClosed == nil {
+ mustCloseBody = true
+ cs.reqBodyClosed = make(chan struct{})
+ }
bodyClosed := cs.reqBodyClosed
- cs.reqBodyClosed = true
cc.mu.Unlock()
- if !bodyClosed && cs.reqBody != nil {
+ if mustCloseBody {
cs.reqBody.Close()
+ close(bodyClosed)
+ }
+ if bodyClosed != nil {
+ <-bodyClosed
}
if err != nil && cs.sentEndStream {
@@ -1580,7 +1685,7 @@ func (cs *clientStream) writeRequestBody(req *http.Request) (err error) {
var sawEOF bool
for !sawEOF {
- n, err := body.Read(buf[:len(buf)])
+ n, err := body.Read(buf)
if hasContentLen {
remainLen -= int64(n)
if remainLen == 0 && err == nil {
@@ -1603,7 +1708,7 @@ func (cs *clientStream) writeRequestBody(req *http.Request) (err error) {
}
if err != nil {
cc.mu.Lock()
- bodyClosed := cs.reqBodyClosed
+ bodyClosed := cs.reqBodyClosed != nil
cc.mu.Unlock()
switch {
case bodyClosed:
@@ -1698,7 +1803,7 @@ func (cs *clientStream) awaitFlowControl(maxBytes int) (taken int32, err error)
if cc.closed {
return 0, errClientConnClosed
}
- if cs.reqBodyClosed {
+ if cs.reqBodyClosed != nil {
return 0, errStopReqBodyWrite
}
select {
@@ -1883,7 +1988,7 @@ func (cc *ClientConn) encodeHeaders(req *http.Request, addGzipHeader bool, trail
// Header list size is ok. Write the headers.
enumerateHeaders(func(name, value string) {
- name, ascii := asciiToLower(name)
+ name, ascii := lowerHeader(name)
if !ascii {
// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
// field names have to be ASCII characters (just as in HTTP/1.x).
@@ -1936,7 +2041,7 @@ func (cc *ClientConn) encodeTrailers(trailer http.Header) ([]byte, error) {
}
for k, vv := range trailer {
- lowKey, ascii := asciiToLower(k)
+ lowKey, ascii := lowerHeader(k)
if !ascii {
// Skip writing invalid headers. Per RFC 7540, Section 8.1.2, header
// field names have to be ASCII characters (just as in HTTP/1.x).
@@ -1994,7 +2099,7 @@ func (cc *ClientConn) forgetStreamID(id uint32) {
// wake up RoundTrip if there is a pending request.
cc.cond.Broadcast()
- closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives()
+ closeOnIdle := cc.singleUse || cc.doNotReuse || cc.t.disableKeepAlives() || cc.goAway != nil
if closeOnIdle && cc.streamsReserved == 0 && len(cc.streams) == 0 {
if VerboseLogs {
cc.vlogf("http2: Transport closing idle conn %p (forSingleUse=%v, maxStream=%v)", cc, cc.singleUse, cc.nextStreamID-2)
@@ -2070,6 +2175,7 @@ func (rl *clientConnReadLoop) cleanup() {
err = io.ErrUnexpectedEOF
}
cc.closed = true
+
for _, cs := range cc.streams {
select {
case <-cs.peerClosed:
@@ -2268,7 +2374,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
Status: status + " " + http.StatusText(statusCode),
}
for _, hf := range regularFields {
- key := http.CanonicalHeaderKey(hf.Name)
+ key := canonicalHeader(hf.Name)
if key == "Trailer" {
t := res.Trailer
if t == nil {
@@ -2276,7 +2382,7 @@ func (rl *clientConnReadLoop) handleResponse(cs *clientStream, f *MetaHeadersFra
res.Trailer = t
}
foreachHeaderElement(hf.Value, func(v string) {
- t[http.CanonicalHeaderKey(v)] = nil
+ t[canonicalHeader(v)] = nil
})
} else {
vv := header[key]
@@ -2381,7 +2487,7 @@ func (rl *clientConnReadLoop) processTrailers(cs *clientStream, f *MetaHeadersFr
trailer := make(http.Header)
for _, hf := range f.RegularFields() {
- key := http.CanonicalHeaderKey(hf.Name)
+ key := canonicalHeader(hf.Name)
trailer[key] = append(trailer[key], hf.Value)
}
cs.trailer = trailer
@@ -2663,7 +2769,6 @@ func (rl *clientConnReadLoop) processGoAway(f *GoAwayFrame) error {
if fn := cc.t.CountError; fn != nil {
fn("recv_goaway_" + f.ErrCode.stringToken())
}
-
}
cc.setGoAway(f)
return nil
@@ -2728,8 +2833,10 @@ func (rl *clientConnReadLoop) processSettingsNoWrite(f *SettingsFrame) error {
cc.cond.Broadcast()
cc.initialWindowSize = s.Val
+ case SettingHeaderTableSize:
+ cc.henc.SetMaxDynamicTableSize(s.Val)
+ cc.peerMaxHeaderTableSize = s.Val
default:
- // TODO(bradfitz): handle more settings? SETTINGS_HEADER_TABLE_SIZE probably.
cc.vlogf("Unhandled Setting: %v", s)
}
return nil
@@ -2953,7 +3060,11 @@ func (gz *gzipReader) Read(p []byte) (n int, err error) {
}
func (gz *gzipReader) Close() error {
- return gz.body.Close()
+ if err := gz.body.Close(); err != nil {
+ return err
+ }
+ gz.zerr = fs.ErrClosed
+ return nil
}
type errorReader struct{ err error }
@@ -3017,7 +3128,7 @@ func traceGotConn(req *http.Request, cc *ClientConn, reused bool) {
cc.mu.Lock()
ci.WasIdle = len(cc.streams) == 0 && reused
if ci.WasIdle && !cc.lastActive.IsZero() {
- ci.IdleTime = time.Now().Sub(cc.lastActive)
+ ci.IdleTime = time.Since(cc.lastActive)
}
cc.mu.Unlock()
diff --git a/test/performance/vendor/golang.org/x/net/trace/trace.go b/test/performance/vendor/golang.org/x/net/trace/trace.go
index 3ebf6f2da..eae2a99f5 100644
--- a/test/performance/vendor/golang.org/x/net/trace/trace.go
+++ b/test/performance/vendor/golang.org/x/net/trace/trace.go
@@ -395,7 +395,7 @@ func New(family, title string) Trace {
}
func (tr *trace) Finish() {
- elapsed := time.Now().Sub(tr.Start)
+ elapsed := time.Since(tr.Start)
tr.mu.Lock()
tr.Elapsed = elapsed
tr.mu.Unlock()
diff --git a/test/performance/vendor/golang.org/x/sync/errgroup/errgroup.go b/test/performance/vendor/golang.org/x/sync/errgroup/errgroup.go
index 4c0850a45..cbee7a4e2 100644
--- a/test/performance/vendor/golang.org/x/sync/errgroup/errgroup.go
+++ b/test/performance/vendor/golang.org/x/sync/errgroup/errgroup.go
@@ -61,8 +61,8 @@ func (g *Group) Wait() error {
// It blocks until the new goroutine can be added without the number of
// active goroutines in the group exceeding the configured limit.
//
-// The first call to return a non-nil error cancels the group; its error will be
-// returned by Wait.
+// The first call to return a non-nil error cancels the group's context, if the
+// group was created by calling WithContext. The error will be returned by Wait.
func (g *Group) Go(f func() error) {
if g.sem != nil {
g.sem <- token{}
diff --git a/test/performance/vendor/golang.org/x/sys/cpu/cpu_arm64.go b/test/performance/vendor/golang.org/x/sys/cpu/cpu_arm64.go
index 87dd5e302..f3eb993bf 100644
--- a/test/performance/vendor/golang.org/x/sys/cpu/cpu_arm64.go
+++ b/test/performance/vendor/golang.org/x/sys/cpu/cpu_arm64.go
@@ -6,7 +6,10 @@ package cpu
import "runtime"
-const cacheLineSize = 64
+// cacheLineSize is used to prevent false sharing of cache lines.
+// We choose 128 because Apple Silicon, a.k.a. M1, has 128-byte cache line size.
+// It doesn't cost much and is much more future-proof.
+const cacheLineSize = 128
func initOptions() {
options = []option{
@@ -41,13 +44,10 @@ func archInit() {
switch runtime.GOOS {
case "freebsd":
readARM64Registers()
- case "linux", "netbsd":
+ case "linux", "netbsd", "openbsd":
doinit()
default:
- // Most platforms don't seem to allow reading these registers.
- //
- // OpenBSD:
- // See https://golang.org/issue/31746
+ // Many platforms don't seem to allow reading these registers.
setMinimalFeatures()
}
}
diff --git a/test/performance/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go b/test/performance/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
new file mode 100644
index 000000000..85b64d5cc
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.go
@@ -0,0 +1,65 @@
+// 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 cpu
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+// Minimal copy of functionality from x/sys/unix so the cpu package can call
+// sysctl without depending on x/sys/unix.
+
+const (
+ // From OpenBSD's sys/sysctl.h.
+ _CTL_MACHDEP = 7
+
+ // From OpenBSD's machine/cpu.h.
+ _CPU_ID_AA64ISAR0 = 2
+ _CPU_ID_AA64ISAR1 = 3
+)
+
+// Implemented in the runtime package (runtime/sys_openbsd3.go)
+func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno)
+
+//go:linkname syscall_syscall6 syscall.syscall6
+
+func sysctl(mib []uint32, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ _, _, errno := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(unsafe.Pointer(&mib[0])), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if errno != 0 {
+ return errno
+ }
+ return nil
+}
+
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
+func sysctlUint64(mib []uint32) (uint64, bool) {
+ var out uint64
+ nout := unsafe.Sizeof(out)
+ if err := sysctl(mib, (*byte)(unsafe.Pointer(&out)), &nout, nil, 0); err != nil {
+ return 0, false
+ }
+ return out, true
+}
+
+func doinit() {
+ setMinimalFeatures()
+
+ // Get ID_AA64ISAR0 and ID_AA64ISAR1 from sysctl.
+ isar0, ok := sysctlUint64([]uint32{_CTL_MACHDEP, _CPU_ID_AA64ISAR0})
+ if !ok {
+ return
+ }
+ isar1, ok := sysctlUint64([]uint32{_CTL_MACHDEP, _CPU_ID_AA64ISAR1})
+ if !ok {
+ return
+ }
+ parseARM64SystemRegisters(isar0, isar1, 0)
+
+ Initialized = true
+}
diff --git a/test/performance/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s b/test/performance/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s
new file mode 100644
index 000000000..054ba05d6
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/cpu/cpu_openbsd_arm64.s
@@ -0,0 +1,11 @@
+// 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.
+
+#include "textflag.h"
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go b/test/performance/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
index f8c484f58..f3cde129b 100644
--- a/test/performance/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
+++ b/test/performance/vendor/golang.org/x/sys/cpu/cpu_other_arm64.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build !linux && !netbsd && arm64
-// +build !linux,!netbsd,arm64
+//go:build !linux && !netbsd && !openbsd && arm64
+// +build !linux,!netbsd,!openbsd,arm64
package cpu
diff --git a/test/performance/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go b/test/performance/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go
new file mode 100644
index 000000000..060d46b6e
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/cpu/cpu_other_ppc64x.go
@@ -0,0 +1,15 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build !aix && !linux && (ppc64 || ppc64le)
+// +build !aix
+// +build !linux
+// +build ppc64 ppc64le
+
+package cpu
+
+func archInit() {
+ PPC64.IsPOWER8 = true
+ Initialized = true
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s b/test/performance/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s
new file mode 100644
index 000000000..e5b9a8489
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/asm_bsd_ppc64.s
@@ -0,0 +1,31 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build (darwin || freebsd || netbsd || openbsd) && gc
+// +build darwin freebsd netbsd openbsd
+// +build gc
+
+#include "textflag.h"
+
+//
+// System call support for ppc64, BSD
+//
+
+// Just jump to package syscall's implementation for all these functions.
+// The runtime may know about them.
+
+TEXT ·Syscall(SB),NOSPLIT,$0-56
+ JMP syscall·Syscall(SB)
+
+TEXT ·Syscall6(SB),NOSPLIT,$0-80
+ JMP syscall·Syscall6(SB)
+
+TEXT ·Syscall9(SB),NOSPLIT,$0-104
+ JMP syscall·Syscall9(SB)
+
+TEXT ·RawSyscall(SB),NOSPLIT,$0-56
+ JMP syscall·RawSyscall(SB)
+
+TEXT ·RawSyscall6(SB),NOSPLIT,$0-80
+ JMP syscall·RawSyscall6(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/dirent.go b/test/performance/vendor/golang.org/x/sys/unix/dirent.go
index e74e5eaa3..2499f977b 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/dirent.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/dirent.go
@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos
+// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos
package unix
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ioctl_linux.go b/test/performance/vendor/golang.org/x/sys/unix/ioctl_linux.go
index 884430b81..0d12c0851 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ioctl_linux.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ioctl_linux.go
@@ -4,9 +4,7 @@
package unix
-import (
- "unsafe"
-)
+import "unsafe"
// IoctlRetInt performs an ioctl operation specified by req on a device
// associated with opened file descriptor fd, and returns a non-negative
@@ -217,3 +215,19 @@ func IoctlKCMAttach(fd int, info KCMAttach) error {
func IoctlKCMUnattach(fd int, info KCMUnattach) error {
return ioctlPtr(fd, SIOCKCMUNATTACH, unsafe.Pointer(&info))
}
+
+// IoctlLoopGetStatus64 gets the status of the loop device associated with the
+// file descriptor fd using the LOOP_GET_STATUS64 operation.
+func IoctlLoopGetStatus64(fd int) (*LoopInfo64, error) {
+ var value LoopInfo64
+ if err := ioctlPtr(fd, LOOP_GET_STATUS64, unsafe.Pointer(&value)); err != nil {
+ return nil, err
+ }
+ return &value, nil
+}
+
+// IoctlLoopSetStatus64 sets the status of the loop device associated with the
+// file descriptor fd using the LOOP_SET_STATUS64 operation.
+func IoctlLoopSetStatus64(fd int, value *LoopInfo64) error {
+ return ioctlPtr(fd, LOOP_SET_STATUS64, unsafe.Pointer(value))
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/mkall.sh b/test/performance/vendor/golang.org/x/sys/unix/mkall.sh
index dcef4de6f..727cba212 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/mkall.sh
+++ b/test/performance/vendor/golang.org/x/sys/unix/mkall.sh
@@ -73,12 +73,12 @@ aix_ppc64)
darwin_amd64)
mkerrors="$mkerrors -m64"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- mkasm="go run mkasm_darwin.go"
+ mkasm="go run mkasm.go"
;;
darwin_arm64)
mkerrors="$mkerrors -m64"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
- mkasm="go run mkasm_darwin.go"
+ mkasm="go run mkasm.go"
;;
dragonfly_amd64)
mkerrors="$mkerrors -m64"
@@ -142,33 +142,33 @@ netbsd_arm64)
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
openbsd_386)
+ mkasm="go run mkasm.go"
mkerrors="$mkerrors -m32"
- mksyscall="go run mksyscall.go -l32 -openbsd"
+ mksyscall="go run mksyscall.go -l32 -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go"
- mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
openbsd_amd64)
+ mkasm="go run mkasm.go"
mkerrors="$mkerrors -m64"
- mksyscall="go run mksyscall.go -openbsd"
+ mksyscall="go run mksyscall.go -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go"
- mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
mktypes="GOARCH=$GOARCH go tool cgo -godefs"
;;
openbsd_arm)
+ mkasm="go run mkasm.go"
mkerrors="$mkerrors"
- mksyscall="go run mksyscall.go -l32 -openbsd -arm"
+ mksyscall="go run mksyscall.go -l32 -openbsd -arm -libc"
mksysctl="go run mksysctl_openbsd.go"
- mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
# Let the type of C char be signed for making the bare syscall
# API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
openbsd_arm64)
+ mkasm="go run mkasm.go"
mkerrors="$mkerrors -m64"
- mksyscall="go run mksyscall.go -openbsd"
+ mksyscall="go run mksyscall.go -openbsd -libc"
mksysctl="go run mksysctl_openbsd.go"
- mksysnum="go run mksysnum.go 'https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master'"
# Let the type of C char be signed for making the bare syscall
# API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
@@ -182,6 +182,24 @@ openbsd_mips64)
# API consistent across platforms.
mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
;;
+openbsd_ppc64)
+ mkasm="go run mkasm.go"
+ mkerrors="$mkerrors -m64"
+ mksyscall="go run mksyscall.go -openbsd -libc"
+ mksysctl="go run mksysctl_openbsd.go"
+ # Let the type of C char be signed for making the bare syscall
+ # API consistent across platforms.
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
+ ;;
+openbsd_riscv64)
+ mkasm="go run mkasm.go"
+ mkerrors="$mkerrors -m64"
+ mksyscall="go run mksyscall.go -openbsd -libc"
+ mksysctl="go run mksysctl_openbsd.go"
+ # Let the type of C char be signed for making the bare syscall
+ # API consistent across platforms.
+ mktypes="GOARCH=$GOARCH go tool cgo -godefs -- -fsigned-char"
+ ;;
solaris_amd64)
mksyscall="go run mksyscall_solaris.go"
mkerrors="$mkerrors -m64"
@@ -214,11 +232,6 @@ esac
if [ "$GOOSARCH" == "aix_ppc64" ]; then
# aix/ppc64 script generates files instead of writing to stdin.
echo "$mksyscall -tags $GOOS,$GOARCH $syscall_goos $GOOSARCH_in && gofmt -w zsyscall_$GOOSARCH.go && gofmt -w zsyscall_"$GOOSARCH"_gccgo.go && gofmt -w zsyscall_"$GOOSARCH"_gc.go " ;
- elif [ "$GOOS" == "darwin" ]; then
- # 1.12 and later, syscalls via libSystem
- echo "$mksyscall -tags $GOOS,$GOARCH,go1.12 $syscall_goos $GOOSARCH_in |gofmt >zsyscall_$GOOSARCH.go";
- # 1.13 and later, syscalls via libSystem (including syscallPtr)
- echo "$mksyscall -tags $GOOS,$GOARCH,go1.13 syscall_darwin.1_13.go |gofmt >zsyscall_$GOOSARCH.1_13.go";
elif [ "$GOOS" == "illumos" ]; then
# illumos code generation requires a --illumos switch
echo "$mksyscall -illumos -tags illumos,$GOARCH syscall_illumos.go |gofmt > zsyscall_illumos_$GOARCH.go";
@@ -232,5 +245,5 @@ esac
if [ -n "$mksysctl" ]; then echo "$mksysctl |gofmt >$zsysctl"; fi
if [ -n "$mksysnum" ]; then echo "$mksysnum |gofmt >zsysnum_$GOOSARCH.go"; fi
if [ -n "$mktypes" ]; then echo "$mktypes types_$GOOS.go | go run mkpost.go > ztypes_$GOOSARCH.go"; fi
- if [ -n "$mkasm" ]; then echo "$mkasm $GOARCH"; fi
+ if [ -n "$mkasm" ]; then echo "$mkasm $GOOS $GOARCH"; fi
) | $run
diff --git a/test/performance/vendor/golang.org/x/sys/unix/mkerrors.sh b/test/performance/vendor/golang.org/x/sys/unix/mkerrors.sh
index 2ab44aa65..7456d9ddd 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/mkerrors.sh
+++ b/test/performance/vendor/golang.org/x/sys/unix/mkerrors.sh
@@ -642,7 +642,7 @@ errors=$(
signals=$(
echo '#include ' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print $2 }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
+ grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
sort
)
@@ -652,7 +652,7 @@ echo '#include ' | $CC -x c - -E -dM $ccflags |
sort >_error.grep
echo '#include ' | $CC -x c - -E -dM $ccflags |
awk '$1=="#define" && $2 ~ /^SIG[A-Z0-9]+$/ { print "^\t" $2 "[ \t]*=" }' |
- egrep -v '(SIGSTKSIZE|SIGSTKSZ|SIGRT|SIGMAX64)' |
+ grep -v 'SIGSTKSIZE\|SIGSTKSZ\|SIGRT\|SIGMAX64' |
sort >_signal.grep
echo '// mkerrors.sh' "$@"
diff --git a/test/performance/vendor/golang.org/x/sys/unix/sockcmsg_unix.go b/test/performance/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
index 453a942c5..3865943f6 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/sockcmsg_unix.go
@@ -52,6 +52,20 @@ func ParseSocketControlMessage(b []byte) ([]SocketControlMessage, error) {
return msgs, nil
}
+// ParseOneSocketControlMessage parses a single socket control message from b, returning the message header,
+// message data (a slice of b), and the remainder of b after that single message.
+// When there are no remaining messages, len(remainder) == 0.
+func ParseOneSocketControlMessage(b []byte) (hdr Cmsghdr, data []byte, remainder []byte, err error) {
+ h, dbuf, err := socketControlMessageHeaderAndData(b)
+ if err != nil {
+ return Cmsghdr{}, nil, nil, err
+ }
+ if i := cmsgAlignOf(int(h.Len)); i < len(b) {
+ remainder = b[i:]
+ }
+ return *h, dbuf, remainder, nil
+}
+
func socketControlMessageHeaderAndData(b []byte) (*Cmsghdr, []byte, error) {
h := (*Cmsghdr)(unsafe.Pointer(&b[0]))
if h.Len < SizeofCmsghdr || uint64(h.Len) > uint64(len(b)) {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/str.go b/test/performance/vendor/golang.org/x/sys/unix/str.go
deleted file mode 100644
index 8ba89ed86..000000000
--- a/test/performance/vendor/golang.org/x/sys/unix/str.go
+++ /dev/null
@@ -1,27 +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.
-
-//go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris
-// +build aix darwin dragonfly freebsd linux netbsd openbsd solaris
-
-package unix
-
-func itoa(val int) string { // do it here rather than with fmt to avoid dependency
- if val < 0 {
- return "-" + uitoa(uint(-val))
- }
- return uitoa(uint(val))
-}
-
-func uitoa(val uint) string {
- var buf [32]byte // big enough for int64
- i := len(buf) - 1
- for val >= 10 {
- buf[i] = byte(val%10 + '0')
- i--
- val /= 10
- }
- buf[i] = byte(val + '0')
- return string(buf[i:])
-}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall.go b/test/performance/vendor/golang.org/x/sys/unix/syscall.go
index 649fa8740..63e8c8383 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall.go
@@ -29,8 +29,6 @@ import (
"bytes"
"strings"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
@@ -82,13 +80,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
- var s []byte
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(s)
+ return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
deleted file mode 100644
index b0098607c..000000000
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_darwin.1_12.go
+++ /dev/null
@@ -1,32 +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 darwin && go1.12 && !go1.13
-// +build darwin,go1.12,!go1.13
-
-package unix
-
-import (
- "unsafe"
-)
-
-const _SYS_GETDIRENTRIES64 = 344
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- // To implement this using libSystem we'd need syscall_syscallPtr for
- // fdopendir. However, syscallPtr was only added in Go 1.13, so we fall
- // back to raw syscalls for this func on Go 1.12.
- var p unsafe.Pointer
- if len(buf) > 0 {
- p = unsafe.Pointer(&buf[0])
- } else {
- p = unsafe.Pointer(&_zero)
- }
- r0, _, e1 := Syscall6(_SYS_GETDIRENTRIES64, uintptr(fd), uintptr(p), uintptr(len(buf)), uintptr(unsafe.Pointer(basep)), 0, 0)
- n = int(r0)
- if e1 != 0 {
- return n, errnoErr(e1)
- }
- return n, nil
-}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
deleted file mode 100644
index 1596426b1..000000000
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_darwin.1_13.go
+++ /dev/null
@@ -1,108 +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 darwin && go1.13
-// +build darwin,go1.13
-
-package unix
-
-import (
- "unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
-)
-
-//sys closedir(dir uintptr) (err error)
-//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
-
-func fdopendir(fd int) (dir uintptr, err error) {
- r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
- dir = uintptr(r0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_fdopendir_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
-
-func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
- // Simulate Getdirentries using fdopendir/readdir_r/closedir.
- // We store the number of entries to skip in the seek
- // offset of fd. See issue #31368.
- // It's not the full required semantics, but should handle the case
- // of calling Getdirentries or ReadDirent repeatedly.
- // It won't handle assigning the results of lseek to *basep, or handle
- // the directory being edited underfoot.
- skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
- if err != nil {
- return 0, err
- }
-
- // We need to duplicate the incoming file descriptor
- // because the caller expects to retain control of it, but
- // fdopendir expects to take control of its argument.
- // Just Dup'ing the file descriptor is not enough, as the
- // result shares underlying state. Use Openat to make a really
- // new file descriptor referring to the same directory.
- fd2, err := Openat(fd, ".", O_RDONLY, 0)
- if err != nil {
- return 0, err
- }
- d, err := fdopendir(fd2)
- if err != nil {
- Close(fd2)
- return 0, err
- }
- defer closedir(d)
-
- var cnt int64
- for {
- var entry Dirent
- var entryp *Dirent
- e := readdir_r(d, &entry, &entryp)
- if e != 0 {
- return n, errnoErr(e)
- }
- if entryp == nil {
- break
- }
- if skip > 0 {
- skip--
- cnt++
- continue
- }
-
- reclen := int(entry.Reclen)
- if reclen > len(buf) {
- // Not enough room. Return for now.
- // The counter will let us know where we should start up again.
- // Note: this strategy for suspending in the middle and
- // restarting is O(n^2) in the length of the directory. Oh well.
- break
- }
-
- // Copy entry into return buffer.
- var s []byte
- hdr := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- hdr.Data = unsafe.Pointer(&entry)
- hdr.Cap = reclen
- hdr.Len = reclen
- copy(buf, s)
-
- buf = buf[reclen:]
- n += reclen
- cnt++
- }
- // Set the seek offset of the input fd to record
- // how many files we've already returned.
- _, err = Seek(fd, cnt, 0 /* SEEK_SET */)
- if err != nil {
- return n, err
- }
-
- return n, nil
-}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_darwin.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_darwin.go
index 4f87f16ea..1f6338218 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_darwin.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_darwin.go
@@ -19,6 +19,96 @@ import (
"unsafe"
)
+//sys closedir(dir uintptr) (err error)
+//sys readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno)
+
+func fdopendir(fd int) (dir uintptr, err error) {
+ r0, _, e1 := syscall_syscallPtr(libc_fdopendir_trampoline_addr, uintptr(fd), 0, 0)
+ dir = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fdopendir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fdopendir fdopendir "/usr/lib/libSystem.B.dylib"
+
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ // Simulate Getdirentries using fdopendir/readdir_r/closedir.
+ // We store the number of entries to skip in the seek
+ // offset of fd. See issue #31368.
+ // It's not the full required semantics, but should handle the case
+ // of calling Getdirentries or ReadDirent repeatedly.
+ // It won't handle assigning the results of lseek to *basep, or handle
+ // the directory being edited underfoot.
+ skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
+ if err != nil {
+ return 0, err
+ }
+
+ // We need to duplicate the incoming file descriptor
+ // because the caller expects to retain control of it, but
+ // fdopendir expects to take control of its argument.
+ // Just Dup'ing the file descriptor is not enough, as the
+ // result shares underlying state. Use Openat to make a really
+ // new file descriptor referring to the same directory.
+ fd2, err := Openat(fd, ".", O_RDONLY, 0)
+ if err != nil {
+ return 0, err
+ }
+ d, err := fdopendir(fd2)
+ if err != nil {
+ Close(fd2)
+ return 0, err
+ }
+ defer closedir(d)
+
+ var cnt int64
+ for {
+ var entry Dirent
+ var entryp *Dirent
+ e := readdir_r(d, &entry, &entryp)
+ if e != 0 {
+ return n, errnoErr(e)
+ }
+ if entryp == nil {
+ break
+ }
+ if skip > 0 {
+ skip--
+ cnt++
+ continue
+ }
+
+ reclen := int(entry.Reclen)
+ if reclen > len(buf) {
+ // Not enough room. Return for now.
+ // The counter will let us know where we should start up again.
+ // Note: this strategy for suspending in the middle and
+ // restarting is O(n^2) in the length of the directory. Oh well.
+ break
+ }
+
+ // Copy entry into return buffer.
+ s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
+ copy(buf, s)
+
+ buf = buf[reclen:]
+ n += reclen
+ cnt++
+ }
+ // Set the seek offset of the input fd to record
+ // how many files we've already returned.
+ _, err = Seek(fd, cnt, 0 /* SEEK_SET */)
+ if err != nil {
+ return n, err
+ }
+
+ return n, nil
+}
+
// SockaddrDatalink implements the Sockaddr interface for AF_LINK type sockets.
type SockaddrDatalink struct {
Len uint8
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
index c3c4c698e..b11ede89a 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_386.go
@@ -61,7 +61,7 @@ func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
}
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
- ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
+ ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
index 82be61a2f..9ed8eec6c 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_amd64.go
@@ -61,7 +61,7 @@ func PtraceGetFsBase(pid int, fsbase *int64) (err error) {
}
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
- ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
+ ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
index cd58f1026..f8ac98247 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_arm.go
@@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
- ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint32(countin)}
+ ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint32(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
index d6f538f9e..8e932036e 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_arm64.go
@@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
- ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
+ ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
index 8ea6e9610..cbe122278 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_freebsd_riscv64.go
@@ -57,7 +57,7 @@ func sendfile(outfd int, infd int, offset *int64, count int) (written int, err e
func Syscall9(num, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err syscall.Errno)
func PtraceIO(req int, pid int, addr uintptr, out []byte, countin int) (count int, err error) {
- ioDesc := PtraceIoDesc{Op: int32(req), Offs: (*byte)(unsafe.Pointer(addr)), Addr: (*byte)(unsafe.Pointer(&out[0])), Len: uint64(countin)}
+ ioDesc := PtraceIoDesc{Op: int32(req), Offs: uintptr(unsafe.Pointer(addr)), Addr: uintptr(unsafe.Pointer(&out[0])), Len: uint64(countin)}
err = ptrace(PT_IO, pid, uintptr(unsafe.Pointer(&ioDesc)), 0)
return int(ioDesc.Len), err
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_illumos.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_illumos.go
index e48244a9c..87db5a6a8 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_illumos.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_illumos.go
@@ -10,8 +10,6 @@
package unix
import (
- "fmt"
- "runtime"
"unsafe"
)
@@ -79,107 +77,3 @@ func Accept4(fd int, flags int) (nfd int, sa Sockaddr, err error) {
}
return
}
-
-//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
-
-func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
- var clp, datap *strbuf
- if len(cl) > 0 {
- clp = &strbuf{
- Len: int32(len(cl)),
- Buf: (*int8)(unsafe.Pointer(&cl[0])),
- }
- }
- if len(data) > 0 {
- datap = &strbuf{
- Len: int32(len(data)),
- Buf: (*int8)(unsafe.Pointer(&data[0])),
- }
- }
- return putmsg(fd, clp, datap, flags)
-}
-
-//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
-
-func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
- var clp, datap *strbuf
- if len(cl) > 0 {
- clp = &strbuf{
- Maxlen: int32(len(cl)),
- Buf: (*int8)(unsafe.Pointer(&cl[0])),
- }
- }
- if len(data) > 0 {
- datap = &strbuf{
- Maxlen: int32(len(data)),
- Buf: (*int8)(unsafe.Pointer(&data[0])),
- }
- }
-
- if err = getmsg(fd, clp, datap, &flags); err != nil {
- return nil, nil, 0, err
- }
-
- if len(cl) > 0 {
- retCl = cl[:clp.Len]
- }
- if len(data) > 0 {
- retData = data[:datap.Len]
- }
- return retCl, retData, flags, nil
-}
-
-func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
- return ioctlRet(fd, req, uintptr(arg))
-}
-
-func IoctlSetString(fd int, req uint, val string) error {
- bs := make([]byte, len(val)+1)
- copy(bs[:len(bs)-1], val)
- err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
- runtime.KeepAlive(&bs[0])
- return err
-}
-
-// Lifreq Helpers
-
-func (l *Lifreq) SetName(name string) error {
- if len(name) >= len(l.Name) {
- return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
- }
- for i := range name {
- l.Name[i] = int8(name[i])
- }
- return nil
-}
-
-func (l *Lifreq) SetLifruInt(d int) {
- *(*int)(unsafe.Pointer(&l.Lifru[0])) = d
-}
-
-func (l *Lifreq) GetLifruInt() int {
- return *(*int)(unsafe.Pointer(&l.Lifru[0]))
-}
-
-func (l *Lifreq) SetLifruUint(d uint) {
- *(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
-}
-
-func (l *Lifreq) GetLifruUint() uint {
- return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
-}
-
-func IoctlLifreq(fd int, req uint, l *Lifreq) error {
- return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
-}
-
-// Strioctl Helpers
-
-func (s *Strioctl) SetInt(i int) {
- s.Len = int32(unsafe.Sizeof(i))
- s.Dp = (*int8)(unsafe.Pointer(&i))
-}
-
-func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
- return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
-}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux.go
index ecb0f27fb..c5a98440e 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux.go
@@ -13,6 +13,7 @@ package unix
import (
"encoding/binary"
+ "strconv"
"syscall"
"time"
"unsafe"
@@ -233,7 +234,7 @@ func Futimesat(dirfd int, path string, tv []Timeval) error {
func Futimes(fd int, tv []Timeval) (err error) {
// Believe it or not, this is the best we can do on Linux
// (and is what glibc does).
- return Utimes("/proc/self/fd/"+itoa(fd), tv)
+ return Utimes("/proc/self/fd/"+strconv.Itoa(fd), tv)
}
const ImplementsGetwd = true
@@ -1553,6 +1554,7 @@ func sendmsgN(fd int, iov []Iovec, oob []byte, ptr unsafe.Pointer, salen _Sockle
var iova [1]Iovec
iova[0].Base = &dummy
iova[0].SetLen(1)
+ iov = iova[:]
}
}
msg.Control = &oob[0]
@@ -1891,17 +1893,28 @@ func PrctlRetInt(option int, arg2 uintptr, arg3 uintptr, arg4 uintptr, arg5 uint
return int(ret), nil
}
-// issue 1435.
-// On linux Setuid and Setgid only affects the current thread, not the process.
-// This does not match what most callers expect so we must return an error
-// here rather than letting the caller think that the call succeeded.
-
func Setuid(uid int) (err error) {
- return EOPNOTSUPP
+ return syscall.Setuid(uid)
+}
+
+func Setgid(gid int) (err error) {
+ return syscall.Setgid(gid)
+}
+
+func Setreuid(ruid, euid int) (err error) {
+ return syscall.Setreuid(ruid, euid)
+}
+
+func Setregid(rgid, egid int) (err error) {
+ return syscall.Setregid(rgid, egid)
+}
+
+func Setresuid(ruid, euid, suid int) (err error) {
+ return syscall.Setresuid(ruid, euid, suid)
}
-func Setgid(uid int) (err error) {
- return EOPNOTSUPP
+func Setresgid(rgid, egid, sgid int) (err error) {
+ return syscall.Setresgid(rgid, egid, sgid)
}
// SetfsgidRetGid sets fsgid for current thread and returns previous fsgid set.
@@ -2240,7 +2253,7 @@ func (fh *FileHandle) Bytes() []byte {
if n == 0 {
return nil
}
- return (*[1 << 30]byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type)) + 4))[:n:n]
+ return unsafe.Slice((*byte)(unsafe.Pointer(uintptr(unsafe.Pointer(&fh.fileHandle.Type))+4)), n)
}
// NameToHandleAt wraps the name_to_handle_at system call; it obtains
@@ -2356,6 +2369,16 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
return prev, nil
}
+//sysnb rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) = SYS_RT_SIGPROCMASK
+
+func PthreadSigmask(how int, set, oldset *Sigset_t) error {
+ if oldset != nil {
+ // Explicitly clear in case Sigset_t is larger than _C__NSIG.
+ *oldset = Sigset_t{}
+ }
+ return rtSigprocmask(how, set, oldset, _C__NSIG/8)
+}
+
/*
* Unimplemented
*/
@@ -2414,7 +2437,6 @@ func Setitimer(which ItimerWhich, it Itimerval) (Itimerval, error) {
// RestartSyscall
// RtSigaction
// RtSigpending
-// RtSigprocmask
// RtSigqueueinfo
// RtSigreturn
// RtSigsuspend
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_386.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_386.go
index 518e476e6..ff5b5899d 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_386.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_386.go
@@ -41,10 +41,6 @@ func setTimeval(sec, usec int64) Timeval {
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
index f5e9d6bef..9b2703532 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_amd64.go
@@ -46,11 +46,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_arm.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
index c1a7778f1..856ad1d63 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_arm.go
@@ -62,10 +62,6 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
//sys Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) = SYS__NEWSELECT
//sys setfsgid(gid int) (prev int, err error) = SYS_SETFSGID32
//sys setfsuid(uid int) (prev int, err error) = SYS_SETFSUID32
-//sysnb Setregid(rgid int, egid int) (err error) = SYS_SETREGID32
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error) = SYS_SETRESGID32
-//sysnb Setresuid(ruid int, euid int, suid int) (err error) = SYS_SETRESUID32
-//sysnb Setreuid(ruid int, euid int) (err error) = SYS_SETREUID32
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
index d83e2c657..6422704bc 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_arm64.go
@@ -39,11 +39,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
index 0b69c3eff..59dab510e 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_loong64.go
@@ -34,10 +34,6 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
index 98a2660b9..bfef09a39 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_mips64x.go
@@ -37,11 +37,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Statfs(path string, buf *Statfs_t) (err error)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
index b8a18c0ad..ab3025096 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_mipsx.go
@@ -32,10 +32,6 @@ func Syscall9(trap, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr,
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys SyncFileRange(fd int, off int64, n int64, flags int) (err error)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
index 4ed9e67c6..eac1cf1ac 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_ppc.go
@@ -34,10 +34,6 @@ import (
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error) = SYS_SENDFILE64
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error)
//sys Stat(path string, stat *Stat_t) (err error) = SYS_STAT64
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
index db63d384c..4df56616b 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_ppc64x.go
@@ -34,11 +34,7 @@ package unix
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
index 925a748a3..5f4243dea 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_riscv64.go
@@ -38,11 +38,7 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
index 6fcf277b0..d0a7d4066 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_s390x.go
@@ -34,11 +34,7 @@ import (
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
//sys Statfs(path string, buf *Statfs_t) (err error)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
index 02a45d9cc..f5c793be2 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_linux_sparc64.go
@@ -31,11 +31,7 @@ package unix
//sys sendfile(outfd int, infd int, offset *int64, count int) (written int, err error)
//sys setfsgid(gid int) (prev int, err error)
//sys setfsuid(uid int) (prev int, err error)
-//sysnb Setregid(rgid int, egid int) (err error)
-//sysnb Setresgid(rgid int, egid int, sgid int) (err error)
-//sysnb Setresuid(ruid int, euid int, suid int) (err error)
//sysnb Setrlimit(resource int, rlim *Rlimit) (err error)
-//sysnb Setreuid(ruid int, euid int) (err error)
//sys Shutdown(fd int, how int) (err error)
//sys Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error)
//sys Stat(path string, stat *Stat_t) (err error)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go
new file mode 100644
index 000000000..e23c5394e
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_openbsd_libc.go
@@ -0,0 +1,27 @@
+// Copyright 2022 The Go Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+//go:build openbsd && !mips64
+// +build openbsd,!mips64
+
+package unix
+
+import _ "unsafe"
+
+// Implemented in the runtime package (runtime/sys_openbsd3.go)
+func syscall_syscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_syscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_rawSyscall(fn, a1, a2, a3 uintptr) (r1, r2 uintptr, err Errno)
+func syscall_rawSyscall6(fn, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err Errno)
+
+//go:linkname syscall_syscall syscall.syscall
+//go:linkname syscall_syscall6 syscall.syscall6
+//go:linkname syscall_syscall10 syscall.syscall10
+//go:linkname syscall_rawSyscall syscall.rawSyscall
+//go:linkname syscall_rawSyscall6 syscall.rawSyscall6
+
+func syscall_syscall9(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9 uintptr) (r1, r2 uintptr, err Errno) {
+ return syscall_syscall10(fn, a1, a2, a3, a4, a5, a6, a7, a8, a9, 0)
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go
new file mode 100644
index 000000000..c2796139c
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_openbsd_ppc64.go
@@ -0,0 +1,42 @@
+// 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 ppc64 && openbsd
+// +build ppc64,openbsd
+
+package unix
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: sec, Usec: usec}
+}
+
+func SetKevent(k *Kevent_t, fd, mode, flags int) {
+ k.Ident = uint64(fd)
+ k.Filter = int16(mode)
+ k.Flags = uint16(flags)
+}
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(length)
+}
+
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint32(length)
+}
+
+// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
+// of openbsd/ppc64 the syscall is called sysctl instead of __sysctl.
+const SYS___SYSCTL = SYS_SYSCTL
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go
new file mode 100644
index 000000000..23199a7ff
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_openbsd_riscv64.go
@@ -0,0 +1,42 @@
+// 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 riscv64 && openbsd
+// +build riscv64,openbsd
+
+package unix
+
+func setTimespec(sec, nsec int64) Timespec {
+ return Timespec{Sec: sec, Nsec: nsec}
+}
+
+func setTimeval(sec, usec int64) Timeval {
+ return Timeval{Sec: sec, Usec: usec}
+}
+
+func SetKevent(k *Kevent_t, fd, mode, flags int) {
+ k.Ident = uint64(fd)
+ k.Filter = int16(mode)
+ k.Flags = uint16(flags)
+}
+
+func (iov *Iovec) SetLen(length int) {
+ iov.Len = uint64(length)
+}
+
+func (msghdr *Msghdr) SetControllen(length int) {
+ msghdr.Controllen = uint32(length)
+}
+
+func (msghdr *Msghdr) SetIovlen(length int) {
+ msghdr.Iovlen = uint32(length)
+}
+
+func (cmsg *Cmsghdr) SetLen(length int) {
+ cmsg.Len = uint32(length)
+}
+
+// SYS___SYSCTL is used by syscall_bsd.go for all BSDs, but in modern versions
+// of openbsd/riscv64 the syscall is called sysctl instead of __sysctl.
+const SYS___SYSCTL = SYS_SYSCTL
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_solaris.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_solaris.go
index b5ec457cd..2109e569c 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_solaris.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_solaris.go
@@ -750,8 +750,8 @@ type EventPort struct {
// we should handle things gracefully. To do so, we need to keep an extra
// reference to the cookie around until the event is processed
// thus the otherwise seemingly extraneous "cookies" map
- // The key of this map is a pointer to the corresponding &fCookie.cookie
- cookies map[*interface{}]*fileObjCookie
+ // The key of this map is a pointer to the corresponding fCookie
+ cookies map[*fileObjCookie]struct{}
}
// PortEvent is an abstraction of the port_event C struct.
@@ -778,7 +778,7 @@ func NewEventPort() (*EventPort, error) {
port: port,
fds: make(map[uintptr]*fileObjCookie),
paths: make(map[string]*fileObjCookie),
- cookies: make(map[*interface{}]*fileObjCookie),
+ cookies: make(map[*fileObjCookie]struct{}),
}
return e, nil
}
@@ -799,6 +799,7 @@ func (e *EventPort) Close() error {
}
e.fds = nil
e.paths = nil
+ e.cookies = nil
return nil
}
@@ -826,17 +827,16 @@ func (e *EventPort) AssociatePath(path string, stat os.FileInfo, events int, coo
if _, found := e.paths[path]; found {
return fmt.Errorf("%v is already associated with this Event Port", path)
}
- fobj, err := createFileObj(path, stat)
+ fCookie, err := createFileObjCookie(path, stat, cookie)
if err != nil {
return err
}
- fCookie := &fileObjCookie{fobj, cookie}
- _, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fobj)), events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
+ _, err = port_associate(e.port, PORT_SOURCE_FILE, uintptr(unsafe.Pointer(fCookie.fobj)), events, (*byte)(unsafe.Pointer(fCookie)))
if err != nil {
return err
}
e.paths[path] = fCookie
- e.cookies[&fCookie.cookie] = fCookie
+ e.cookies[fCookie] = struct{}{}
return nil
}
@@ -858,7 +858,7 @@ func (e *EventPort) DissociatePath(path string) error {
if err == nil {
// dissociate was successful, safe to delete the cookie
fCookie := e.paths[path]
- delete(e.cookies, &fCookie.cookie)
+ delete(e.cookies, fCookie)
}
delete(e.paths, path)
return err
@@ -871,13 +871,16 @@ func (e *EventPort) AssociateFd(fd uintptr, events int, cookie interface{}) erro
if _, found := e.fds[fd]; found {
return fmt.Errorf("%v is already associated with this Event Port", fd)
}
- fCookie := &fileObjCookie{nil, cookie}
- _, err := port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(&fCookie.cookie)))
+ fCookie, err := createFileObjCookie("", nil, cookie)
+ if err != nil {
+ return err
+ }
+ _, err = port_associate(e.port, PORT_SOURCE_FD, fd, events, (*byte)(unsafe.Pointer(fCookie)))
if err != nil {
return err
}
e.fds[fd] = fCookie
- e.cookies[&fCookie.cookie] = fCookie
+ e.cookies[fCookie] = struct{}{}
return nil
}
@@ -896,27 +899,31 @@ func (e *EventPort) DissociateFd(fd uintptr) error {
if err == nil {
// dissociate was successful, safe to delete the cookie
fCookie := e.fds[fd]
- delete(e.cookies, &fCookie.cookie)
+ delete(e.cookies, fCookie)
}
delete(e.fds, fd)
return err
}
-func createFileObj(name string, stat os.FileInfo) (*fileObj, error) {
- fobj := new(fileObj)
- bs, err := ByteSliceFromString(name)
- if err != nil {
- return nil, err
- }
- fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
- s := stat.Sys().(*syscall.Stat_t)
- fobj.Atim.Sec = s.Atim.Sec
- fobj.Atim.Nsec = s.Atim.Nsec
- fobj.Mtim.Sec = s.Mtim.Sec
- fobj.Mtim.Nsec = s.Mtim.Nsec
- fobj.Ctim.Sec = s.Ctim.Sec
- fobj.Ctim.Nsec = s.Ctim.Nsec
- return fobj, nil
+func createFileObjCookie(name string, stat os.FileInfo, cookie interface{}) (*fileObjCookie, error) {
+ fCookie := new(fileObjCookie)
+ fCookie.cookie = cookie
+ if name != "" && stat != nil {
+ fCookie.fobj = new(fileObj)
+ bs, err := ByteSliceFromString(name)
+ if err != nil {
+ return nil, err
+ }
+ fCookie.fobj.Name = (*int8)(unsafe.Pointer(&bs[0]))
+ s := stat.Sys().(*syscall.Stat_t)
+ fCookie.fobj.Atim.Sec = s.Atim.Sec
+ fCookie.fobj.Atim.Nsec = s.Atim.Nsec
+ fCookie.fobj.Mtim.Sec = s.Mtim.Sec
+ fCookie.fobj.Mtim.Nsec = s.Mtim.Nsec
+ fCookie.fobj.Ctim.Sec = s.Ctim.Sec
+ fCookie.fobj.Ctim.Nsec = s.Ctim.Nsec
+ }
+ return fCookie, nil
}
// GetOne wraps port_get(3c) and returns a single PortEvent.
@@ -929,44 +936,50 @@ func (e *EventPort) GetOne(t *Timespec) (*PortEvent, error) {
p := new(PortEvent)
e.mu.Lock()
defer e.mu.Unlock()
- e.peIntToExt(pe, p)
+ err = e.peIntToExt(pe, p)
+ if err != nil {
+ return nil, err
+ }
return p, nil
}
// peIntToExt converts a cgo portEvent struct into the friendlier PortEvent
// NOTE: Always call this function while holding the e.mu mutex
-func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) {
+func (e *EventPort) peIntToExt(peInt *portEvent, peExt *PortEvent) error {
+ if e.cookies == nil {
+ return fmt.Errorf("this EventPort is already closed")
+ }
peExt.Events = peInt.Events
peExt.Source = peInt.Source
- cookie := (*interface{})(unsafe.Pointer(peInt.User))
- peExt.Cookie = *cookie
+ fCookie := (*fileObjCookie)(unsafe.Pointer(peInt.User))
+ _, found := e.cookies[fCookie]
+
+ if !found {
+ panic("unexpected event port address; may be due to kernel bug; see https://go.dev/issue/54254")
+ }
+ peExt.Cookie = fCookie.cookie
+ delete(e.cookies, fCookie)
+
switch peInt.Source {
case PORT_SOURCE_FD:
- delete(e.cookies, cookie)
peExt.Fd = uintptr(peInt.Object)
// Only remove the fds entry if it exists and this cookie matches
if fobj, ok := e.fds[peExt.Fd]; ok {
- if &fobj.cookie == cookie {
+ if fobj == fCookie {
delete(e.fds, peExt.Fd)
}
}
case PORT_SOURCE_FILE:
- if fCookie, ok := e.cookies[cookie]; ok && uintptr(unsafe.Pointer(fCookie.fobj)) == uintptr(peInt.Object) {
- // Use our stashed reference rather than using unsafe on what we got back
- // the unsafe version would be (*fileObj)(unsafe.Pointer(uintptr(peInt.Object)))
- peExt.fobj = fCookie.fobj
- } else {
- panic("mismanaged memory")
- }
- delete(e.cookies, cookie)
+ peExt.fobj = fCookie.fobj
peExt.Path = BytePtrToString((*byte)(unsafe.Pointer(peExt.fobj.Name)))
// Only remove the paths entry if it exists and this cookie matches
if fobj, ok := e.paths[peExt.Path]; ok {
- if &fobj.cookie == cookie {
+ if fobj == fCookie {
delete(e.paths, peExt.Path)
}
}
}
+ return nil
}
// Pending wraps port_getn(3c) and returns how many events are pending.
@@ -990,7 +1003,7 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
got := uint32(min)
max := uint32(len(s))
var err error
- ps := make([]portEvent, max, max)
+ ps := make([]portEvent, max)
_, err = port_getn(e.port, &ps[0], max, &got, timeout)
// got will be trustworthy with ETIME, but not any other error.
if err != nil && err != ETIME {
@@ -998,8 +1011,122 @@ func (e *EventPort) Get(s []PortEvent, min int, timeout *Timespec) (int, error)
}
e.mu.Lock()
defer e.mu.Unlock()
+ valid := 0
for i := 0; i < int(got); i++ {
- e.peIntToExt(&ps[i], &s[i])
+ err2 := e.peIntToExt(&ps[i], &s[i])
+ if err2 != nil {
+ if valid == 0 && err == nil {
+ // If err2 is the only error and there are no valid events
+ // to return, return it to the caller.
+ err = err2
+ }
+ break
+ }
+ valid = i + 1
+ }
+ return valid, err
+}
+
+//sys putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error)
+
+func Putmsg(fd int, cl []byte, data []byte, flags int) (err error) {
+ var clp, datap *strbuf
+ if len(cl) > 0 {
+ clp = &strbuf{
+ Len: int32(len(cl)),
+ Buf: (*int8)(unsafe.Pointer(&cl[0])),
+ }
}
- return int(got), err
+ if len(data) > 0 {
+ datap = &strbuf{
+ Len: int32(len(data)),
+ Buf: (*int8)(unsafe.Pointer(&data[0])),
+ }
+ }
+ return putmsg(fd, clp, datap, flags)
+}
+
+//sys getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error)
+
+func Getmsg(fd int, cl []byte, data []byte) (retCl []byte, retData []byte, flags int, err error) {
+ var clp, datap *strbuf
+ if len(cl) > 0 {
+ clp = &strbuf{
+ Maxlen: int32(len(cl)),
+ Buf: (*int8)(unsafe.Pointer(&cl[0])),
+ }
+ }
+ if len(data) > 0 {
+ datap = &strbuf{
+ Maxlen: int32(len(data)),
+ Buf: (*int8)(unsafe.Pointer(&data[0])),
+ }
+ }
+
+ if err = getmsg(fd, clp, datap, &flags); err != nil {
+ return nil, nil, 0, err
+ }
+
+ if len(cl) > 0 {
+ retCl = cl[:clp.Len]
+ }
+ if len(data) > 0 {
+ retData = data[:datap.Len]
+ }
+ return retCl, retData, flags, nil
+}
+
+func IoctlSetIntRetInt(fd int, req uint, arg int) (int, error) {
+ return ioctlRet(fd, req, uintptr(arg))
+}
+
+func IoctlSetString(fd int, req uint, val string) error {
+ bs := make([]byte, len(val)+1)
+ copy(bs[:len(bs)-1], val)
+ err := ioctl(fd, req, uintptr(unsafe.Pointer(&bs[0])))
+ runtime.KeepAlive(&bs[0])
+ return err
+}
+
+// Lifreq Helpers
+
+func (l *Lifreq) SetName(name string) error {
+ if len(name) >= len(l.Name) {
+ return fmt.Errorf("name cannot be more than %d characters", len(l.Name)-1)
+ }
+ for i := range name {
+ l.Name[i] = int8(name[i])
+ }
+ return nil
+}
+
+func (l *Lifreq) SetLifruInt(d int) {
+ *(*int)(unsafe.Pointer(&l.Lifru[0])) = d
+}
+
+func (l *Lifreq) GetLifruInt() int {
+ return *(*int)(unsafe.Pointer(&l.Lifru[0]))
+}
+
+func (l *Lifreq) SetLifruUint(d uint) {
+ *(*uint)(unsafe.Pointer(&l.Lifru[0])) = d
+}
+
+func (l *Lifreq) GetLifruUint() uint {
+ return *(*uint)(unsafe.Pointer(&l.Lifru[0]))
+}
+
+func IoctlLifreq(fd int, req uint, l *Lifreq) error {
+ return ioctl(fd, req, uintptr(unsafe.Pointer(l)))
+}
+
+// Strioctl Helpers
+
+func (s *Strioctl) SetInt(i int) {
+ s.Len = int32(unsafe.Sizeof(i))
+ s.Dp = (*int8)(unsafe.Pointer(&i))
+}
+
+func IoctlSetStrioctlRetInt(fd int, req uint, s *Strioctl) (int, error) {
+ return ioctlRet(fd, req, uintptr(unsafe.Pointer(s)))
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_unix.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_unix.go
index 1ff5060b5..00bafda86 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_unix.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_unix.go
@@ -13,8 +13,6 @@ import (
"sync"
"syscall"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
var (
@@ -117,11 +115,7 @@ func (m *mmapper) Mmap(fd int, offset int64, length int, prot int, flags int) (d
}
// Use unsafe to convert addr into a []byte.
- var b []byte
- hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
- hdr.Data = unsafe.Pointer(addr)
- hdr.Cap = length
- hdr.Len = length
+ b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), length)
// Register mapping in m and return it.
p := &b[cap(b)-1]
@@ -429,11 +423,15 @@ func Send(s int, buf []byte, flags int) (err error) {
}
func Sendto(fd int, p []byte, flags int, to Sockaddr) (err error) {
- ptr, n, err := to.sockaddr()
- if err != nil {
- return err
+ var ptr unsafe.Pointer
+ var salen _Socklen
+ if to != nil {
+ ptr, salen, err = to.sockaddr()
+ if err != nil {
+ return err
+ }
}
- return sendto(fd, p, flags, ptr, n)
+ return sendto(fd, p, flags, ptr, salen)
}
func SetsockoptByte(fd, level, opt int, value byte) (err error) {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_unix_gc.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
index 5898e9a52..b6919ca58 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_unix_gc.go
@@ -2,11 +2,9 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
-//go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64
-// +build darwin dragonfly freebsd linux netbsd openbsd solaris
+//go:build (darwin || dragonfly || freebsd || (linux && !ppc64 && !ppc64le) || netbsd || openbsd || solaris) && gc
+// +build darwin dragonfly freebsd linux,!ppc64,!ppc64le netbsd openbsd solaris
// +build gc
-// +build !ppc64le
-// +build !ppc64
package unix
diff --git a/test/performance/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go b/test/performance/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
index f8616f454..68b2f3e1c 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/syscall_zos_s390x.go
@@ -9,8 +9,10 @@ package unix
import (
"bytes"
+ "fmt"
"runtime"
"sort"
+ "strings"
"sync"
"syscall"
"unsafe"
@@ -55,7 +57,13 @@ func (d *Dirent) NameString() string {
if d == nil {
return ""
}
- return string(d.Name[:d.Namlen])
+ s := string(d.Name[:])
+ idx := strings.IndexByte(s, 0)
+ if idx == -1 {
+ return s
+ } else {
+ return s[:idx]
+ }
}
func (sa *SockaddrInet4) sockaddr() (unsafe.Pointer, _Socklen, error) {
@@ -1230,6 +1238,14 @@ func Readdir(dir uintptr) (*Dirent, error) {
return &ent, err
}
+func readdir_r(dirp uintptr, entry *direntLE, result **direntLE) (err error) {
+ r0, _, e1 := syscall_syscall(SYS___READDIR_R_A, dirp, uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ if int64(r0) == -1 {
+ err = errnoErr(Errno(e1))
+ }
+ return
+}
+
func Closedir(dir uintptr) error {
_, _, e := syscall_syscall(SYS_CLOSEDIR, dir, 0, 0)
if e != 0 {
@@ -1821,3 +1837,158 @@ func Unmount(name string, mtm int) (err error) {
}
return err
}
+
+func fdToPath(dirfd int) (path string, err error) {
+ var buffer [1024]byte
+ // w_ctrl()
+ ret := runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_W_IOCTL<<4,
+ []uintptr{uintptr(dirfd), 17, 1024, uintptr(unsafe.Pointer(&buffer[0]))})
+ if ret == 0 {
+ zb := bytes.IndexByte(buffer[:], 0)
+ if zb == -1 {
+ zb = len(buffer)
+ }
+ // __e2a_l()
+ runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___E2A_L<<4,
+ []uintptr{uintptr(unsafe.Pointer(&buffer[0])), uintptr(zb)})
+ return string(buffer[:zb]), nil
+ }
+ // __errno()
+ errno := int(*(*int32)(unsafe.Pointer(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO<<4,
+ []uintptr{}))))
+ // __errno2()
+ errno2 := int(runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS___ERRNO2<<4,
+ []uintptr{}))
+ // strerror_r()
+ ret = runtime.CallLeFuncByPtr(runtime.XplinkLibvec+SYS_STRERROR_R<<4,
+ []uintptr{uintptr(errno), uintptr(unsafe.Pointer(&buffer[0])), 1024})
+ if ret == 0 {
+ zb := bytes.IndexByte(buffer[:], 0)
+ if zb == -1 {
+ zb = len(buffer)
+ }
+ return "", fmt.Errorf("%s (errno2=0x%x)", buffer[:zb], errno2)
+ } else {
+ return "", fmt.Errorf("fdToPath errno %d (errno2=0x%x)", errno, errno2)
+ }
+}
+
+func direntLeToDirentUnix(dirent *direntLE, dir uintptr, path string) (Dirent, error) {
+ var d Dirent
+
+ d.Ino = uint64(dirent.Ino)
+ offset, err := Telldir(dir)
+ if err != nil {
+ return d, err
+ }
+
+ d.Off = int64(offset)
+ s := string(bytes.Split(dirent.Name[:], []byte{0})[0])
+ copy(d.Name[:], s)
+
+ d.Reclen = uint16(24 + len(d.NameString()))
+ var st Stat_t
+ path = path + "/" + s
+ err = Lstat(path, &st)
+ if err != nil {
+ return d, err
+ }
+
+ d.Type = uint8(st.Mode >> 24)
+ return d, err
+}
+
+func Getdirentries(fd int, buf []byte, basep *uintptr) (n int, err error) {
+ // Simulation of Getdirentries port from the Darwin implementation.
+ // COMMENTS FROM DARWIN:
+ // It's not the full required semantics, but should handle the case
+ // of calling Getdirentries or ReadDirent repeatedly.
+ // It won't handle assigning the results of lseek to *basep, or handle
+ // the directory being edited underfoot.
+
+ skip, err := Seek(fd, 0, 1 /* SEEK_CUR */)
+ if err != nil {
+ return 0, err
+ }
+
+ // Get path from fd to avoid unavailable call (fdopendir)
+ path, err := fdToPath(fd)
+ if err != nil {
+ return 0, err
+ }
+ d, err := Opendir(path)
+ if err != nil {
+ return 0, err
+ }
+ defer Closedir(d)
+
+ var cnt int64
+ for {
+ var entryLE direntLE
+ var entrypLE *direntLE
+ e := readdir_r(d, &entryLE, &entrypLE)
+ if e != nil {
+ return n, e
+ }
+ if entrypLE == nil {
+ break
+ }
+ if skip > 0 {
+ skip--
+ cnt++
+ continue
+ }
+
+ // Dirent on zos has a different structure
+ entry, e := direntLeToDirentUnix(&entryLE, d, path)
+ if e != nil {
+ return n, e
+ }
+
+ reclen := int(entry.Reclen)
+ if reclen > len(buf) {
+ // Not enough room. Return for now.
+ // The counter will let us know where we should start up again.
+ // Note: this strategy for suspending in the middle and
+ // restarting is O(n^2) in the length of the directory. Oh well.
+ break
+ }
+
+ // Copy entry into return buffer.
+ s := unsafe.Slice((*byte)(unsafe.Pointer(&entry)), reclen)
+ copy(buf, s)
+
+ buf = buf[reclen:]
+ n += reclen
+ cnt++
+ }
+ // Set the seek offset of the input fd to record
+ // how many files we've already returned.
+ _, err = Seek(fd, cnt, 0 /* SEEK_SET */)
+ if err != nil {
+ return n, err
+ }
+
+ return n, nil
+}
+
+func ReadDirent(fd int, buf []byte) (n int, err error) {
+ var base = (*uintptr)(unsafe.Pointer(new(uint64)))
+ return Getdirentries(fd, buf, base)
+}
+
+func direntIno(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Ino), unsafe.Sizeof(Dirent{}.Ino))
+}
+
+func direntReclen(buf []byte) (uint64, bool) {
+ return readInt(buf, unsafe.Offsetof(Dirent{}.Reclen), unsafe.Sizeof(Dirent{}.Reclen))
+}
+
+func direntNamlen(buf []byte) (uint64, bool) {
+ reclen, ok := direntReclen(buf)
+ if !ok {
+ return 0, false
+ }
+ return reclen - uint64(unsafe.Offsetof(Dirent{}.Name)), true
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/sysvshm_unix.go b/test/performance/vendor/golang.org/x/sys/unix/sysvshm_unix.go
index 0bb4c8de5..5bb41d17b 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/sysvshm_unix.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/sysvshm_unix.go
@@ -7,11 +7,7 @@
package unix
-import (
- "unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
-)
+import "unsafe"
// SysvShmAttach attaches the Sysv shared memory segment associated with the
// shared memory identifier id.
@@ -34,12 +30,7 @@ func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
}
// Use unsafe to convert addr into a []byte.
- // TODO: convert to unsafe.Slice once we can assume Go 1.17
- var b []byte
- hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
- hdr.Data = unsafe.Pointer(addr)
- hdr.Cap = int(info.Segsz)
- hdr.Len = int(info.Segsz)
+ b := unsafe.Slice((*byte)(unsafe.Pointer(addr)), int(info.Segsz))
return b, nil
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/xattr_bsd.go b/test/performance/vendor/golang.org/x/sys/unix/xattr_bsd.go
index 25df1e378..663b3779d 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/xattr_bsd.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/xattr_bsd.go
@@ -160,13 +160,12 @@ func Lremovexattr(link string, attr string) (err error) {
}
func Listxattr(file string, dest []byte) (sz int, err error) {
- d := initxattrdest(dest, 0)
destsiz := len(dest)
// FreeBSD won't allow you to list xattrs from multiple namespaces
- s := 0
+ s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
+ stmp, e := ListxattrNS(file, nsid, dest[pos:])
/* Errors accessing system attrs are ignored so that
* we can implement the Linux-like behavior of omitting errors that
@@ -175,66 +174,102 @@ func Listxattr(file string, dest []byte) (sz int, err error) {
* Linux will still error if we ask for user attributes on a file that
* we don't have read permissions on, so don't ignore those errors
*/
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- continue
- } else if e != nil {
+ if e != nil {
+ if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+ continue
+ }
return s, e
}
s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
+ pos = s
+ if pos > destsiz {
+ pos = destsiz
}
- d = initxattrdest(dest, s)
}
return s, nil
}
-func Flistxattr(fd int, dest []byte) (sz int, err error) {
+func ListxattrNS(file string, nsid int, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest)
- s := 0
+ s, e := ExtattrListFile(file, nsid, uintptr(d), destsiz)
+ if e != nil {
+ return 0, err
+ }
+
+ return s, nil
+}
+
+func Flistxattr(fd int, dest []byte) (sz int, err error) {
+ destsiz := len(dest)
+
+ s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- continue
- } else if e != nil {
+ stmp, e := FlistxattrNS(fd, nsid, dest[pos:])
+
+ if e != nil {
+ if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+ continue
+ }
return s, e
}
s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
+ pos = s
+ if pos > destsiz {
+ pos = destsiz
}
- d = initxattrdest(dest, s)
}
return s, nil
}
-func Llistxattr(link string, dest []byte) (sz int, err error) {
+func FlistxattrNS(fd int, nsid int, dest []byte) (sz int, err error) {
d := initxattrdest(dest, 0)
destsiz := len(dest)
- s := 0
+ s, e := ExtattrListFd(fd, nsid, uintptr(d), destsiz)
+ if e != nil {
+ return 0, err
+ }
+
+ return s, nil
+}
+
+func Llistxattr(link string, dest []byte) (sz int, err error) {
+ destsiz := len(dest)
+
+ s, pos := 0, 0
for _, nsid := range [...]int{EXTATTR_NAMESPACE_USER, EXTATTR_NAMESPACE_SYSTEM} {
- stmp, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
- if e != nil && e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
- continue
- } else if e != nil {
+ stmp, e := LlistxattrNS(link, nsid, dest[pos:])
+
+ if e != nil {
+ if e == EPERM && nsid != EXTATTR_NAMESPACE_USER {
+ continue
+ }
return s, e
}
s += stmp
- destsiz -= s
- if destsiz < 0 {
- destsiz = 0
+ pos = s
+ if pos > destsiz {
+ pos = destsiz
}
- d = initxattrdest(dest, s)
+ }
+
+ return s, nil
+}
+
+func LlistxattrNS(link string, nsid int, dest []byte) (sz int, err error) {
+ d := initxattrdest(dest, 0)
+ destsiz := len(dest)
+
+ s, e := ExtattrListLink(link, nsid, uintptr(d), destsiz)
+ if e != nil {
+ return 0, err
}
return s, nil
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go b/test/performance/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go
new file mode 100644
index 000000000..8e2c51b1e
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zerrors_openbsd_ppc64.go
@@ -0,0 +1,1905 @@
+// mkerrors.sh -m64
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc64 && openbsd
+// +build ppc64,openbsd
+
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- -m64 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+ AF_APPLETALK = 0x10
+ AF_BLUETOOTH = 0x20
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_CNT = 0x15
+ AF_COIP = 0x14
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_E164 = 0x1a
+ AF_ECMA = 0x8
+ AF_ENCAP = 0x1c
+ AF_HYLINK = 0xf
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x18
+ AF_IPX = 0x17
+ AF_ISDN = 0x1a
+ AF_ISO = 0x7
+ AF_KEY = 0x1e
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x24
+ AF_MPLS = 0x21
+ AF_NATM = 0x1b
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PUP = 0x4
+ AF_ROUTE = 0x11
+ AF_SIP = 0x1d
+ AF_SNA = 0xb
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ ALTWERASE = 0x200
+ ARPHRD_ETHER = 0x1
+ ARPHRD_FRELAY = 0xf
+ ARPHRD_IEEE1394 = 0x18
+ ARPHRD_IEEE802 = 0x6
+ B0 = 0x0
+ B110 = 0x6e
+ B115200 = 0x1c200
+ B1200 = 0x4b0
+ B134 = 0x86
+ B14400 = 0x3840
+ B150 = 0x96
+ B1800 = 0x708
+ B19200 = 0x4b00
+ B200 = 0xc8
+ B230400 = 0x38400
+ B2400 = 0x960
+ B28800 = 0x7080
+ B300 = 0x12c
+ B38400 = 0x9600
+ B4800 = 0x12c0
+ B50 = 0x32
+ B57600 = 0xe100
+ B600 = 0x258
+ B7200 = 0x1c20
+ B75 = 0x4b
+ B76800 = 0x12c00
+ B9600 = 0x2580
+ BIOCFLUSH = 0x20004268
+ BIOCGBLEN = 0x40044266
+ BIOCGDIRFILT = 0x4004427c
+ BIOCGDLT = 0x4004426a
+ BIOCGDLTLIST = 0xc010427b
+ BIOCGETIF = 0x4020426b
+ BIOCGFILDROP = 0x40044278
+ BIOCGHDRCMPLT = 0x40044274
+ BIOCGRSIG = 0x40044273
+ BIOCGRTIMEOUT = 0x4010426e
+ BIOCGSTATS = 0x4008426f
+ BIOCIMMEDIATE = 0x80044270
+ BIOCLOCK = 0x20004276
+ BIOCPROMISC = 0x20004269
+ BIOCSBLEN = 0xc0044266
+ BIOCSDIRFILT = 0x8004427d
+ BIOCSDLT = 0x8004427a
+ BIOCSETF = 0x80104267
+ BIOCSETIF = 0x8020426c
+ BIOCSETWF = 0x80104277
+ BIOCSFILDROP = 0x80044279
+ BIOCSHDRCMPLT = 0x80044275
+ BIOCSRSIG = 0x80044272
+ BIOCSRTIMEOUT = 0x8010426d
+ BIOCVERSION = 0x40044271
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALIGNMENT = 0x4
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIRECTION_IN = 0x1
+ BPF_DIRECTION_OUT = 0x2
+ BPF_DIV = 0x30
+ BPF_FILDROP_CAPTURE = 0x1
+ BPF_FILDROP_DROP = 0x2
+ BPF_FILDROP_PASS = 0x0
+ BPF_F_DIR_IN = 0x10
+ BPF_F_DIR_MASK = 0x30
+ BPF_F_DIR_OUT = 0x20
+ BPF_F_DIR_SHIFT = 0x4
+ BPF_F_FLOWID = 0x8
+ BPF_F_PRI_MASK = 0x7
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXBUFSIZE = 0x200000
+ BPF_MAXINSNS = 0x200
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINBUFSIZE = 0x20
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_OR = 0x40
+ BPF_RELEASE = 0x30bb6
+ BPF_RET = 0x6
+ BPF_RND = 0xc0
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BRKINT = 0x2
+ CFLUSH = 0xf
+ CLOCAL = 0x8000
+ CLOCK_BOOTTIME = 0x6
+ CLOCK_MONOTONIC = 0x3
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x4
+ CLOCK_UPTIME = 0x5
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
+ CREAD = 0x800
+ CRTSCTS = 0x10000
+ CS5 = 0x0
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTART = 0x11
+ CSTATUS = 0xff
+ CSTOP = 0x13
+ CSTOPB = 0x400
+ CSUSP = 0x1a
+ CTL_HW = 0x6
+ CTL_KERN = 0x1
+ CTL_MAXNAME = 0xc
+ CTL_NET = 0x4
+ DIOCADDQUEUE = 0xc110445d
+ DIOCADDRULE = 0xcd604404
+ DIOCADDSTATE = 0xc1084425
+ DIOCCHANGERULE = 0xcd60441a
+ DIOCCLRIFFLAG = 0xc028445a
+ DIOCCLRSRCNODES = 0x20004455
+ DIOCCLRSTATES = 0xc0e04412
+ DIOCCLRSTATUS = 0xc0284416
+ DIOCGETLIMIT = 0xc0084427
+ DIOCGETQSTATS = 0xc1204460
+ DIOCGETQUEUE = 0xc110445f
+ DIOCGETQUEUES = 0xc110445e
+ DIOCGETRULE = 0xcd604407
+ DIOCGETRULES = 0xcd604406
+ DIOCGETRULESET = 0xc444443b
+ DIOCGETRULESETS = 0xc444443a
+ DIOCGETSRCNODES = 0xc0104454
+ DIOCGETSTATE = 0xc1084413
+ DIOCGETSTATES = 0xc0104419
+ DIOCGETSTATUS = 0xc1e84415
+ DIOCGETSYNFLWATS = 0xc0084463
+ DIOCGETTIMEOUT = 0xc008441e
+ DIOCIGETIFACES = 0xc0284457
+ DIOCKILLSRCNODES = 0xc080445b
+ DIOCKILLSTATES = 0xc0e04429
+ DIOCNATLOOK = 0xc0504417
+ DIOCOSFPADD = 0xc088444f
+ DIOCOSFPFLUSH = 0x2000444e
+ DIOCOSFPGET = 0xc0884450
+ DIOCRADDADDRS = 0xc4504443
+ DIOCRADDTABLES = 0xc450443d
+ DIOCRCLRADDRS = 0xc4504442
+ DIOCRCLRASTATS = 0xc4504448
+ DIOCRCLRTABLES = 0xc450443c
+ DIOCRCLRTSTATS = 0xc4504441
+ DIOCRDELADDRS = 0xc4504444
+ DIOCRDELTABLES = 0xc450443e
+ DIOCRGETADDRS = 0xc4504446
+ DIOCRGETASTATS = 0xc4504447
+ DIOCRGETTABLES = 0xc450443f
+ DIOCRGETTSTATS = 0xc4504440
+ DIOCRINADEFINE = 0xc450444d
+ DIOCRSETADDRS = 0xc4504445
+ DIOCRSETTFLAGS = 0xc450444a
+ DIOCRTSTADDRS = 0xc4504449
+ DIOCSETDEBUG = 0xc0044418
+ DIOCSETHOSTID = 0xc0044456
+ DIOCSETIFFLAG = 0xc0284459
+ DIOCSETLIMIT = 0xc0084428
+ DIOCSETREASS = 0xc004445c
+ DIOCSETSTATUSIF = 0xc0284414
+ DIOCSETSYNCOOKIES = 0xc0014462
+ DIOCSETSYNFLWATS = 0xc0084461
+ DIOCSETTIMEOUT = 0xc008441d
+ DIOCSTART = 0x20004401
+ DIOCSTOP = 0x20004402
+ DIOCXBEGIN = 0xc0104451
+ DIOCXCOMMIT = 0xc0104452
+ DIOCXROLLBACK = 0xc0104453
+ DLT_ARCNET = 0x7
+ DLT_ATM_RFC1483 = 0xb
+ DLT_AX25 = 0x3
+ DLT_CHAOS = 0x5
+ DLT_C_HDLC = 0x68
+ DLT_EN10MB = 0x1
+ DLT_EN3MB = 0x2
+ DLT_ENC = 0xd
+ DLT_FDDI = 0xa
+ DLT_IEEE802 = 0x6
+ DLT_IEEE802_11 = 0x69
+ DLT_IEEE802_11_RADIO = 0x7f
+ DLT_LOOP = 0xc
+ DLT_MPLS = 0xdb
+ DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
+ DLT_PFLOG = 0x75
+ DLT_PFSYNC = 0x12
+ DLT_PPP = 0x9
+ DLT_PPP_BSDOS = 0x10
+ DLT_PPP_ETHER = 0x33
+ DLT_PPP_SERIAL = 0x32
+ DLT_PRONET = 0x4
+ DLT_RAW = 0xe
+ DLT_SLIP = 0x8
+ DLT_SLIP_BSDOS = 0xf
+ DLT_USBPCAP = 0xf9
+ DLT_USER0 = 0x93
+ DLT_USER1 = 0x94
+ DLT_USER10 = 0x9d
+ DLT_USER11 = 0x9e
+ DLT_USER12 = 0x9f
+ DLT_USER13 = 0xa0
+ DLT_USER14 = 0xa1
+ DLT_USER15 = 0xa2
+ DLT_USER2 = 0x95
+ DLT_USER3 = 0x96
+ DLT_USER4 = 0x97
+ DLT_USER5 = 0x98
+ DLT_USER6 = 0x99
+ DLT_USER7 = 0x9a
+ DLT_USER8 = 0x9b
+ DLT_USER9 = 0x9c
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ ECHO = 0x8
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EMT_TAGOVF = 0x1
+ EMUL_ENABLED = 0x1
+ EMUL_NATIVE = 0x2
+ ENDRUNDISC = 0x9
+ ETH64_8021_RSVD_MASK = 0xfffffffffff0
+ ETH64_8021_RSVD_PREFIX = 0x180c2000000
+ ETHERMIN = 0x2e
+ ETHERMTU = 0x5dc
+ ETHERTYPE_8023 = 0x4
+ ETHERTYPE_AARP = 0x80f3
+ ETHERTYPE_ACCTON = 0x8390
+ ETHERTYPE_AEONIC = 0x8036
+ ETHERTYPE_ALPHA = 0x814a
+ ETHERTYPE_AMBER = 0x6008
+ ETHERTYPE_AMOEBA = 0x8145
+ ETHERTYPE_AOE = 0x88a2
+ ETHERTYPE_APOLLO = 0x80f7
+ ETHERTYPE_APOLLODOMAIN = 0x8019
+ ETHERTYPE_APPLETALK = 0x809b
+ ETHERTYPE_APPLITEK = 0x80c7
+ ETHERTYPE_ARGONAUT = 0x803a
+ ETHERTYPE_ARP = 0x806
+ ETHERTYPE_AT = 0x809b
+ ETHERTYPE_ATALK = 0x809b
+ ETHERTYPE_ATOMIC = 0x86df
+ ETHERTYPE_ATT = 0x8069
+ ETHERTYPE_ATTSTANFORD = 0x8008
+ ETHERTYPE_AUTOPHON = 0x806a
+ ETHERTYPE_AXIS = 0x8856
+ ETHERTYPE_BCLOOP = 0x9003
+ ETHERTYPE_BOFL = 0x8102
+ ETHERTYPE_CABLETRON = 0x7034
+ ETHERTYPE_CHAOS = 0x804
+ ETHERTYPE_COMDESIGN = 0x806c
+ ETHERTYPE_COMPUGRAPHIC = 0x806d
+ ETHERTYPE_COUNTERPOINT = 0x8062
+ ETHERTYPE_CRONUS = 0x8004
+ ETHERTYPE_CRONUSVLN = 0x8003
+ ETHERTYPE_DCA = 0x1234
+ ETHERTYPE_DDE = 0x807b
+ ETHERTYPE_DEBNI = 0xaaaa
+ ETHERTYPE_DECAM = 0x8048
+ ETHERTYPE_DECCUST = 0x6006
+ ETHERTYPE_DECDIAG = 0x6005
+ ETHERTYPE_DECDNS = 0x803c
+ ETHERTYPE_DECDTS = 0x803e
+ ETHERTYPE_DECEXPER = 0x6000
+ ETHERTYPE_DECLAST = 0x8041
+ ETHERTYPE_DECLTM = 0x803f
+ ETHERTYPE_DECMUMPS = 0x6009
+ ETHERTYPE_DECNETBIOS = 0x8040
+ ETHERTYPE_DELTACON = 0x86de
+ ETHERTYPE_DIDDLE = 0x4321
+ ETHERTYPE_DLOG1 = 0x660
+ ETHERTYPE_DLOG2 = 0x661
+ ETHERTYPE_DN = 0x6003
+ ETHERTYPE_DOGFIGHT = 0x1989
+ ETHERTYPE_DSMD = 0x8039
+ ETHERTYPE_EAPOL = 0x888e
+ ETHERTYPE_ECMA = 0x803
+ ETHERTYPE_ENCRYPT = 0x803d
+ ETHERTYPE_ES = 0x805d
+ ETHERTYPE_EXCELAN = 0x8010
+ ETHERTYPE_EXPERDATA = 0x8049
+ ETHERTYPE_FLIP = 0x8146
+ ETHERTYPE_FLOWCONTROL = 0x8808
+ ETHERTYPE_FRARP = 0x808
+ ETHERTYPE_GENDYN = 0x8068
+ ETHERTYPE_HAYES = 0x8130
+ ETHERTYPE_HIPPI_FP = 0x8180
+ ETHERTYPE_HITACHI = 0x8820
+ ETHERTYPE_HP = 0x8005
+ ETHERTYPE_IEEEPUP = 0xa00
+ ETHERTYPE_IEEEPUPAT = 0xa01
+ ETHERTYPE_IMLBL = 0x4c42
+ ETHERTYPE_IMLBLDIAG = 0x424c
+ ETHERTYPE_IP = 0x800
+ ETHERTYPE_IPAS = 0x876c
+ ETHERTYPE_IPV6 = 0x86dd
+ ETHERTYPE_IPX = 0x8137
+ ETHERTYPE_IPXNEW = 0x8037
+ ETHERTYPE_KALPANA = 0x8582
+ ETHERTYPE_LANBRIDGE = 0x8038
+ ETHERTYPE_LANPROBE = 0x8888
+ ETHERTYPE_LAT = 0x6004
+ ETHERTYPE_LBACK = 0x9000
+ ETHERTYPE_LITTLE = 0x8060
+ ETHERTYPE_LLDP = 0x88cc
+ ETHERTYPE_LOGICRAFT = 0x8148
+ ETHERTYPE_LOOPBACK = 0x9000
+ ETHERTYPE_MACSEC = 0x88e5
+ ETHERTYPE_MATRA = 0x807a
+ ETHERTYPE_MAX = 0xffff
+ ETHERTYPE_MERIT = 0x807c
+ ETHERTYPE_MICP = 0x873a
+ ETHERTYPE_MOPDL = 0x6001
+ ETHERTYPE_MOPRC = 0x6002
+ ETHERTYPE_MOTOROLA = 0x818d
+ ETHERTYPE_MPLS = 0x8847
+ ETHERTYPE_MPLS_MCAST = 0x8848
+ ETHERTYPE_MUMPS = 0x813f
+ ETHERTYPE_NBPCC = 0x3c04
+ ETHERTYPE_NBPCLAIM = 0x3c09
+ ETHERTYPE_NBPCLREQ = 0x3c05
+ ETHERTYPE_NBPCLRSP = 0x3c06
+ ETHERTYPE_NBPCREQ = 0x3c02
+ ETHERTYPE_NBPCRSP = 0x3c03
+ ETHERTYPE_NBPDG = 0x3c07
+ ETHERTYPE_NBPDGB = 0x3c08
+ ETHERTYPE_NBPDLTE = 0x3c0a
+ ETHERTYPE_NBPRAR = 0x3c0c
+ ETHERTYPE_NBPRAS = 0x3c0b
+ ETHERTYPE_NBPRST = 0x3c0d
+ ETHERTYPE_NBPSCD = 0x3c01
+ ETHERTYPE_NBPVCD = 0x3c00
+ ETHERTYPE_NBS = 0x802
+ ETHERTYPE_NCD = 0x8149
+ ETHERTYPE_NESTAR = 0x8006
+ ETHERTYPE_NETBEUI = 0x8191
+ ETHERTYPE_NHRP = 0x2001
+ ETHERTYPE_NOVELL = 0x8138
+ ETHERTYPE_NS = 0x600
+ ETHERTYPE_NSAT = 0x601
+ ETHERTYPE_NSCOMPAT = 0x807
+ ETHERTYPE_NSH = 0x984f
+ ETHERTYPE_NTRAILER = 0x10
+ ETHERTYPE_OS9 = 0x7007
+ ETHERTYPE_OS9NET = 0x7009
+ ETHERTYPE_PACER = 0x80c6
+ ETHERTYPE_PBB = 0x88e7
+ ETHERTYPE_PCS = 0x4242
+ ETHERTYPE_PLANNING = 0x8044
+ ETHERTYPE_PPP = 0x880b
+ ETHERTYPE_PPPOE = 0x8864
+ ETHERTYPE_PPPOEDISC = 0x8863
+ ETHERTYPE_PRIMENTS = 0x7031
+ ETHERTYPE_PUP = 0x200
+ ETHERTYPE_PUPAT = 0x200
+ ETHERTYPE_QINQ = 0x88a8
+ ETHERTYPE_RACAL = 0x7030
+ ETHERTYPE_RATIONAL = 0x8150
+ ETHERTYPE_RAWFR = 0x6559
+ ETHERTYPE_RCL = 0x1995
+ ETHERTYPE_RDP = 0x8739
+ ETHERTYPE_RETIX = 0x80f2
+ ETHERTYPE_REVARP = 0x8035
+ ETHERTYPE_SCA = 0x6007
+ ETHERTYPE_SECTRA = 0x86db
+ ETHERTYPE_SECUREDATA = 0x876d
+ ETHERTYPE_SGITW = 0x817e
+ ETHERTYPE_SG_BOUNCE = 0x8016
+ ETHERTYPE_SG_DIAG = 0x8013
+ ETHERTYPE_SG_NETGAMES = 0x8014
+ ETHERTYPE_SG_RESV = 0x8015
+ ETHERTYPE_SIMNET = 0x5208
+ ETHERTYPE_SLOW = 0x8809
+ ETHERTYPE_SNA = 0x80d5
+ ETHERTYPE_SNMP = 0x814c
+ ETHERTYPE_SONIX = 0xfaf5
+ ETHERTYPE_SPIDER = 0x809f
+ ETHERTYPE_SPRITE = 0x500
+ ETHERTYPE_STP = 0x8181
+ ETHERTYPE_TALARIS = 0x812b
+ ETHERTYPE_TALARISMC = 0x852b
+ ETHERTYPE_TCPCOMP = 0x876b
+ ETHERTYPE_TCPSM = 0x9002
+ ETHERTYPE_TEC = 0x814f
+ ETHERTYPE_TIGAN = 0x802f
+ ETHERTYPE_TRAIL = 0x1000
+ ETHERTYPE_TRANSETHER = 0x6558
+ ETHERTYPE_TYMSHARE = 0x802e
+ ETHERTYPE_UBBST = 0x7005
+ ETHERTYPE_UBDEBUG = 0x900
+ ETHERTYPE_UBDIAGLOOP = 0x7002
+ ETHERTYPE_UBDL = 0x7000
+ ETHERTYPE_UBNIU = 0x7001
+ ETHERTYPE_UBNMC = 0x7003
+ ETHERTYPE_VALID = 0x1600
+ ETHERTYPE_VARIAN = 0x80dd
+ ETHERTYPE_VAXELN = 0x803b
+ ETHERTYPE_VEECO = 0x8067
+ ETHERTYPE_VEXP = 0x805b
+ ETHERTYPE_VGLAB = 0x8131
+ ETHERTYPE_VINES = 0xbad
+ ETHERTYPE_VINESECHO = 0xbaf
+ ETHERTYPE_VINESLOOP = 0xbae
+ ETHERTYPE_VITAL = 0xff00
+ ETHERTYPE_VLAN = 0x8100
+ ETHERTYPE_VLTLMAN = 0x8080
+ ETHERTYPE_VPROD = 0x805c
+ ETHERTYPE_VURESERVED = 0x8147
+ ETHERTYPE_WATERLOO = 0x8130
+ ETHERTYPE_WELLFLEET = 0x8103
+ ETHERTYPE_X25 = 0x805
+ ETHERTYPE_X75 = 0x801
+ ETHERTYPE_XNSSM = 0x9001
+ ETHERTYPE_XTP = 0x817d
+ ETHER_ADDR_LEN = 0x6
+ ETHER_ALIGN = 0x2
+ ETHER_CRC_LEN = 0x4
+ ETHER_CRC_POLY_BE = 0x4c11db6
+ ETHER_CRC_POLY_LE = 0xedb88320
+ ETHER_HDR_LEN = 0xe
+ ETHER_MAX_DIX_LEN = 0x600
+ ETHER_MAX_HARDMTU_LEN = 0xff9b
+ ETHER_MAX_LEN = 0x5ee
+ ETHER_MIN_LEN = 0x40
+ ETHER_TYPE_LEN = 0x2
+ ETHER_VLAN_ENCAP_LEN = 0x4
+ EVFILT_AIO = -0x3
+ EVFILT_DEVICE = -0x8
+ EVFILT_EXCEPT = -0x9
+ EVFILT_PROC = -0x5
+ EVFILT_READ = -0x1
+ EVFILT_SIGNAL = -0x6
+ EVFILT_SYSCOUNT = 0x9
+ EVFILT_TIMER = -0x7
+ EVFILT_VNODE = -0x4
+ EVFILT_WRITE = -0x2
+ EVL_ENCAPLEN = 0x4
+ EVL_PRIO_BITS = 0xd
+ EVL_PRIO_MAX = 0x7
+ EVL_VLID_MASK = 0xfff
+ EVL_VLID_MAX = 0xffe
+ EVL_VLID_MIN = 0x1
+ EVL_VLID_NULL = 0x0
+ EV_ADD = 0x1
+ EV_CLEAR = 0x20
+ EV_DELETE = 0x2
+ EV_DISABLE = 0x8
+ EV_DISPATCH = 0x80
+ EV_ENABLE = 0x4
+ EV_EOF = 0x8000
+ EV_ERROR = 0x4000
+ EV_FLAG1 = 0x2000
+ EV_ONESHOT = 0x10
+ EV_RECEIPT = 0x40
+ EV_SYSFLAGS = 0xf800
+ EXTA = 0x4b00
+ EXTB = 0x9600
+ EXTPROC = 0x800
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FLUSHO = 0x800000
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0xa
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0x7
+ F_GETOWN = 0x5
+ F_ISATTY = 0xb
+ F_OK = 0x0
+ F_RDLCK = 0x1
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0x8
+ F_SETLKW = 0x9
+ F_SETOWN = 0x6
+ F_UNLCK = 0x2
+ F_WRLCK = 0x3
+ HUPCL = 0x4000
+ HW_MACHINE = 0x1
+ ICANON = 0x100
+ ICMP6_FILTER = 0x12
+ ICRNL = 0x100
+ IEXTEN = 0x400
+ IFAN_ARRIVAL = 0x0
+ IFAN_DEPARTURE = 0x1
+ IFF_ALLMULTI = 0x200
+ IFF_BROADCAST = 0x2
+ IFF_CANTCHANGE = 0x8e52
+ IFF_DEBUG = 0x4
+ IFF_LINK0 = 0x1000
+ IFF_LINK1 = 0x2000
+ IFF_LINK2 = 0x4000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x8000
+ IFF_NOARP = 0x80
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_STATICARP = 0x20
+ IFF_UP = 0x1
+ IFNAMSIZ = 0x10
+ IFT_1822 = 0x2
+ IFT_A12MPPSWITCH = 0x82
+ IFT_AAL2 = 0xbb
+ IFT_AAL5 = 0x31
+ IFT_ADSL = 0x5e
+ IFT_AFLANE8023 = 0x3b
+ IFT_AFLANE8025 = 0x3c
+ IFT_ARAP = 0x58
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ASYNC = 0x54
+ IFT_ATM = 0x25
+ IFT_ATMDXI = 0x69
+ IFT_ATMFUNI = 0x6a
+ IFT_ATMIMA = 0x6b
+ IFT_ATMLOGICAL = 0x50
+ IFT_ATMRADIO = 0xbd
+ IFT_ATMSUBINTERFACE = 0x86
+ IFT_ATMVCIENDPT = 0xc2
+ IFT_ATMVIRTUAL = 0x95
+ IFT_BGPPOLICYACCOUNTING = 0xa2
+ IFT_BLUETOOTH = 0xf8
+ IFT_BRIDGE = 0xd1
+ IFT_BSC = 0x53
+ IFT_CARP = 0xf7
+ IFT_CCTEMUL = 0x3d
+ IFT_CEPT = 0x13
+ IFT_CES = 0x85
+ IFT_CHANNEL = 0x46
+ IFT_CNR = 0x55
+ IFT_COFFEE = 0x84
+ IFT_COMPOSITELINK = 0x9b
+ IFT_DCN = 0x8d
+ IFT_DIGITALPOWERLINE = 0x8a
+ IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
+ IFT_DLSW = 0x4a
+ IFT_DOCSCABLEDOWNSTREAM = 0x80
+ IFT_DOCSCABLEMACLAYER = 0x7f
+ IFT_DOCSCABLEUPSTREAM = 0x81
+ IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
+ IFT_DS0 = 0x51
+ IFT_DS0BUNDLE = 0x52
+ IFT_DS1FDL = 0xaa
+ IFT_DS3 = 0x1e
+ IFT_DTM = 0x8c
+ IFT_DUMMY = 0xf1
+ IFT_DVBASILN = 0xac
+ IFT_DVBASIOUT = 0xad
+ IFT_DVBRCCDOWNSTREAM = 0x93
+ IFT_DVBRCCMACLAYER = 0x92
+ IFT_DVBRCCUPSTREAM = 0x94
+ IFT_ECONET = 0xce
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_EPLRS = 0x57
+ IFT_ESCON = 0x49
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0xf3
+ IFT_FAST = 0x7d
+ IFT_FASTETHER = 0x3e
+ IFT_FASTETHERFX = 0x45
+ IFT_FDDI = 0xf
+ IFT_FIBRECHANNEL = 0x38
+ IFT_FRAMERELAYINTERCONNECT = 0x3a
+ IFT_FRAMERELAYMPI = 0x5c
+ IFT_FRDLCIENDPT = 0xc1
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_FRF16MFRBUNDLE = 0xa3
+ IFT_FRFORWARD = 0x9e
+ IFT_G703AT2MB = 0x43
+ IFT_G703AT64K = 0x42
+ IFT_GIF = 0xf0
+ IFT_GIGABITETHERNET = 0x75
+ IFT_GR303IDT = 0xb2
+ IFT_GR303RDT = 0xb1
+ IFT_H323GATEKEEPER = 0xa4
+ IFT_H323PROXY = 0xa5
+ IFT_HDH1822 = 0x3
+ IFT_HDLC = 0x76
+ IFT_HDSL2 = 0xa8
+ IFT_HIPERLAN2 = 0xb7
+ IFT_HIPPI = 0x2f
+ IFT_HIPPIINTERFACE = 0x39
+ IFT_HOSTPAD = 0x5a
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IBM370PARCHAN = 0x48
+ IFT_IDSL = 0x9a
+ IFT_IEEE1394 = 0x90
+ IFT_IEEE80211 = 0x47
+ IFT_IEEE80212 = 0x37
+ IFT_IEEE8023ADLAG = 0xa1
+ IFT_IFGSN = 0x91
+ IFT_IMT = 0xbe
+ IFT_INFINIBAND = 0xc7
+ IFT_INTERLEAVE = 0x7c
+ IFT_IP = 0x7e
+ IFT_IPFORWARD = 0x8e
+ IFT_IPOVERATM = 0x72
+ IFT_IPOVERCDLC = 0x6d
+ IFT_IPOVERCLAW = 0x6e
+ IFT_IPSWITCH = 0x4e
+ IFT_ISDN = 0x3f
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISDNS = 0x4b
+ IFT_ISDNU = 0x4c
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88025CRFPINT = 0x62
+ IFT_ISO88025DTR = 0x56
+ IFT_ISO88025FIBER = 0x73
+ IFT_ISO88026 = 0xa
+ IFT_ISUP = 0xb3
+ IFT_L2VLAN = 0x87
+ IFT_L3IPVLAN = 0x88
+ IFT_L3IPXVLAN = 0x89
+ IFT_LAPB = 0x10
+ IFT_LAPD = 0x4d
+ IFT_LAPF = 0x77
+ IFT_LINEGROUP = 0xd2
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MBIM = 0xfa
+ IFT_MEDIAMAILOVERIP = 0x8b
+ IFT_MFSIGLINK = 0xa7
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_MPC = 0x71
+ IFT_MPLS = 0xa6
+ IFT_MPLSTUNNEL = 0x96
+ IFT_MSDSL = 0x8f
+ IFT_MVL = 0xbf
+ IFT_MYRINET = 0x63
+ IFT_NFAS = 0xaf
+ IFT_NSIP = 0x1b
+ IFT_OPTICALCHANNEL = 0xc3
+ IFT_OPTICALTRANSPORT = 0xc4
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PFLOG = 0xf5
+ IFT_PFLOW = 0xf9
+ IFT_PFSYNC = 0xf6
+ IFT_PLC = 0xae
+ IFT_PON155 = 0xcf
+ IFT_PON622 = 0xd0
+ IFT_POS = 0xab
+ IFT_PPP = 0x17
+ IFT_PPPMULTILINKBUNDLE = 0x6c
+ IFT_PROPATM = 0xc5
+ IFT_PROPBWAP2MP = 0xb8
+ IFT_PROPCNLS = 0x59
+ IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
+ IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
+ IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PROPWIRELESSP2P = 0x9d
+ IFT_PTPSERIAL = 0x16
+ IFT_PVC = 0xf2
+ IFT_Q2931 = 0xc9
+ IFT_QLLC = 0x44
+ IFT_RADIOMAC = 0xbc
+ IFT_RADSL = 0x5f
+ IFT_REACHDSL = 0xc0
+ IFT_RFC1483 = 0x9f
+ IFT_RS232 = 0x21
+ IFT_RSRB = 0x4f
+ IFT_SDLC = 0x11
+ IFT_SDSL = 0x60
+ IFT_SHDSL = 0xa9
+ IFT_SIP = 0x1f
+ IFT_SIPSIG = 0xcc
+ IFT_SIPTG = 0xcb
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETOVERHEADCHANNEL = 0xb9
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_SRP = 0x97
+ IFT_SS7SIGLINK = 0x9c
+ IFT_STACKTOSTACK = 0x6f
+ IFT_STARLAN = 0xb
+ IFT_T1 = 0x12
+ IFT_TDLC = 0x74
+ IFT_TELINK = 0xc8
+ IFT_TERMPAD = 0x5b
+ IFT_TR008 = 0xb0
+ IFT_TRANSPHDLC = 0x7b
+ IFT_TUNNEL = 0x83
+ IFT_ULTRA = 0x1d
+ IFT_USB = 0xa0
+ IFT_V11 = 0x40
+ IFT_V35 = 0x2d
+ IFT_V36 = 0x41
+ IFT_V37 = 0x78
+ IFT_VDSL = 0x61
+ IFT_VIRTUALIPADDRESS = 0x70
+ IFT_VIRTUALTG = 0xca
+ IFT_VOICEDID = 0xd5
+ IFT_VOICEEM = 0x64
+ IFT_VOICEEMFGD = 0xd3
+ IFT_VOICEENCAP = 0x67
+ IFT_VOICEFGDEANA = 0xd4
+ IFT_VOICEFXO = 0x65
+ IFT_VOICEFXS = 0x66
+ IFT_VOICEOVERATM = 0x98
+ IFT_VOICEOVERCABLE = 0xc6
+ IFT_VOICEOVERFRAMERELAY = 0x99
+ IFT_VOICEOVERIP = 0x68
+ IFT_WIREGUARD = 0xfb
+ IFT_X213 = 0x5d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25HUNTGROUP = 0x7a
+ IFT_X25MLP = 0x79
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LOOPBACKNET = 0x7f
+ IN_RFC3021_HOST = 0x1
+ IN_RFC3021_NET = 0xfffffffe
+ IN_RFC3021_NSHIFT = 0x1f
+ IPPROTO_AH = 0x33
+ IPPROTO_CARP = 0x70
+ IPPROTO_DIVERT = 0x102
+ IPPROTO_DONE = 0x101
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERIP = 0x61
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPCOMP = 0x6c
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV4 = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_MAX = 0x100
+ IPPROTO_MAXID = 0x103
+ IPPROTO_MOBILE = 0x37
+ IPPROTO_MPLS = 0x89
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PFSYNC = 0xf0
+ IPPROTO_PIM = 0x67
+ IPPROTO_PUP = 0xc
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPPROTO_UDPLITE = 0x88
+ IPV6_AUTH_LEVEL = 0x35
+ IPV6_AUTOFLOWLABEL = 0x3b
+ IPV6_CHECKSUM = 0x1a
+ IPV6_DEFAULT_MULTICAST_HOPS = 0x1
+ IPV6_DEFAULT_MULTICAST_LOOP = 0x1
+ IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
+ IPV6_ESP_NETWORK_LEVEL = 0x37
+ IPV6_ESP_TRANS_LEVEL = 0x36
+ IPV6_FAITH = 0x1d
+ IPV6_FLOWINFO_MASK = 0xfffffff
+ IPV6_FLOWLABEL_MASK = 0xfffff
+ IPV6_FRAGTTL = 0x78
+ IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
+ IPV6_IPCOMP_LEVEL = 0x3c
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MAXHLIM = 0xff
+ IPV6_MAXPACKET = 0xffff
+ IPV6_MINHOPCOUNT = 0x41
+ IPV6_MMTU = 0x500
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_OPTIONS = 0x1
+ IPV6_PATHMTU = 0x2c
+ IPV6_PIPEX = 0x3f
+ IPV6_PKTINFO = 0x2e
+ IPV6_PORTRANGE = 0xe
+ IPV6_PORTRANGE_DEFAULT = 0x0
+ IPV6_PORTRANGE_HIGH = 0x1
+ IPV6_PORTRANGE_LOW = 0x2
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVDSTPORT = 0x40
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x24
+ IPV6_RECVRTHDR = 0x26
+ IPV6_RECVTCLASS = 0x39
+ IPV6_RTABLE = 0x1021
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x23
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_SOCKOPT_RESERVED1 = 0x3
+ IPV6_TCLASS = 0x3d
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
+ IPV6_V6ONLY = 0x1b
+ IPV6_VERSION = 0x60
+ IPV6_VERSION_MASK = 0xf0
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_AUTH_LEVEL = 0x14
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_ESP_NETWORK_LEVEL = 0x16
+ IP_ESP_TRANS_LEVEL = 0x15
+ IP_HDRINCL = 0x2
+ IP_IPCOMP_LEVEL = 0x1d
+ IP_IPDEFTTL = 0x25
+ IP_IPSECFLOWINFO = 0x24
+ IP_IPSEC_LOCAL_AUTH = 0x1b
+ IP_IPSEC_LOCAL_CRED = 0x19
+ IP_IPSEC_LOCAL_ID = 0x17
+ IP_IPSEC_REMOTE_AUTH = 0x1c
+ IP_IPSEC_REMOTE_CRED = 0x1a
+ IP_IPSEC_REMOTE_ID = 0x18
+ IP_MAXPACKET = 0xffff
+ IP_MAX_MEMBERSHIPS = 0xfff
+ IP_MF = 0x2000
+ IP_MINTTL = 0x20
+ IP_MIN_MEMBERSHIPS = 0xf
+ IP_MSS = 0x240
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_OFFMASK = 0x1fff
+ IP_OPTIONS = 0x1
+ IP_PIPEX = 0x22
+ IP_PORTRANGE = 0x13
+ IP_PORTRANGE_DEFAULT = 0x0
+ IP_PORTRANGE_HIGH = 0x1
+ IP_PORTRANGE_LOW = 0x2
+ IP_RECVDSTADDR = 0x7
+ IP_RECVDSTPORT = 0x21
+ IP_RECVIF = 0x1e
+ IP_RECVOPTS = 0x5
+ IP_RECVRETOPTS = 0x6
+ IP_RECVRTABLE = 0x23
+ IP_RECVTTL = 0x1f
+ IP_RETOPTS = 0x8
+ IP_RF = 0x8000
+ IP_RTABLE = 0x1021
+ IP_SENDSRCADDR = 0x7
+ IP_TOS = 0x3
+ IP_TTL = 0x4
+ ISIG = 0x80
+ ISTRIP = 0x20
+ ITIMER_PROF = 0x2
+ ITIMER_REAL = 0x0
+ ITIMER_VIRTUAL = 0x1
+ IUCLC = 0x1000
+ IXANY = 0x800
+ IXOFF = 0x400
+ IXON = 0x200
+ KERN_HOSTNAME = 0xa
+ KERN_OSRELEASE = 0x2
+ KERN_OSTYPE = 0x1
+ KERN_VERSION = 0x4
+ LCNT_OVERLOAD_FLUSH = 0x6
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x6
+ MADV_NORMAL = 0x0
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_SPACEAVAIL = 0x5
+ MADV_WILLNEED = 0x3
+ MAP_ANON = 0x1000
+ MAP_ANONYMOUS = 0x1000
+ MAP_CONCEAL = 0x8000
+ MAP_COPY = 0x2
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_FLAGMASK = 0xfff7
+ MAP_HASSEMAPHORE = 0x0
+ MAP_INHERIT = 0x0
+ MAP_INHERIT_COPY = 0x1
+ MAP_INHERIT_NONE = 0x2
+ MAP_INHERIT_SHARE = 0x0
+ MAP_INHERIT_ZERO = 0x3
+ MAP_NOEXTEND = 0x0
+ MAP_NORESERVE = 0x0
+ MAP_PRIVATE = 0x2
+ MAP_RENAME = 0x0
+ MAP_SHARED = 0x1
+ MAP_STACK = 0x4000
+ MAP_TRYFIXED = 0x0
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_DEFEXPORTED = 0x200
+ MNT_DELEXPORT = 0x20000
+ MNT_DOOMED = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXRDONLY = 0x80
+ MNT_FORCE = 0x80000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_NOATIME = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOPERM = 0x20
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x4000000
+ MNT_STALLED = 0x100000
+ MNT_SWAPPABLE = 0x200000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0x400ffff
+ MNT_WAIT = 0x1
+ MNT_WANTRDWR = 0x2000000
+ MNT_WXALLOWED = 0x800
+ MOUNT_AFS = "afs"
+ MOUNT_CD9660 = "cd9660"
+ MOUNT_EXT2FS = "ext2fs"
+ MOUNT_FFS = "ffs"
+ MOUNT_FUSEFS = "fuse"
+ MOUNT_MFS = "mfs"
+ MOUNT_MSDOS = "msdos"
+ MOUNT_NCPFS = "ncpfs"
+ MOUNT_NFS = "nfs"
+ MOUNT_NTFS = "ntfs"
+ MOUNT_TMPFS = "tmpfs"
+ MOUNT_UDF = "udf"
+ MOUNT_UFS = "ffs"
+ MSG_BCAST = 0x100
+ MSG_CMSG_CLOEXEC = 0x800
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x80
+ MSG_EOR = 0x8
+ MSG_MCAST = 0x200
+ MSG_NOSIGNAL = 0x400
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MSG_WAITFORONE = 0x1000
+ MS_ASYNC = 0x1
+ MS_INVALIDATE = 0x4
+ MS_SYNC = 0x2
+ NAME_MAX = 0xff
+ NET_RT_DUMP = 0x1
+ NET_RT_FLAGS = 0x2
+ NET_RT_IFLIST = 0x3
+ NET_RT_IFNAMES = 0x6
+ NET_RT_MAXID = 0x8
+ NET_RT_SOURCE = 0x7
+ NET_RT_STATS = 0x4
+ NET_RT_TABLE = 0x5
+ NFDBITS = 0x20
+ NOFLSH = 0x80000000
+ NOKERNINFO = 0x2000000
+ NOTE_ATTRIB = 0x8
+ NOTE_CHANGE = 0x1
+ NOTE_CHILD = 0x4
+ NOTE_DELETE = 0x1
+ NOTE_EOF = 0x2
+ NOTE_EXEC = 0x20000000
+ NOTE_EXIT = 0x80000000
+ NOTE_EXTEND = 0x4
+ NOTE_FORK = 0x40000000
+ NOTE_LINK = 0x10
+ NOTE_LOWAT = 0x1
+ NOTE_OOB = 0x4
+ NOTE_PCTRLMASK = 0xf0000000
+ NOTE_PDATAMASK = 0xfffff
+ NOTE_RENAME = 0x20
+ NOTE_REVOKE = 0x40
+ NOTE_TRACK = 0x1
+ NOTE_TRACKERR = 0x2
+ NOTE_TRUNCATE = 0x80
+ NOTE_WRITE = 0x2
+ OCRNL = 0x10
+ OLCUC = 0x20
+ ONLCR = 0x2
+ ONLRET = 0x80
+ ONOCR = 0x40
+ ONOEOT = 0x8
+ OPOST = 0x1
+ OXTABS = 0x4
+ O_ACCMODE = 0x3
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x10000
+ O_CREAT = 0x200
+ O_DIRECTORY = 0x20000
+ O_DSYNC = 0x80
+ O_EXCL = 0x800
+ O_EXLOCK = 0x20
+ O_FSYNC = 0x80
+ O_NDELAY = 0x4
+ O_NOCTTY = 0x8000
+ O_NOFOLLOW = 0x100
+ O_NONBLOCK = 0x4
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_RSYNC = 0x80
+ O_SHLOCK = 0x10
+ O_SYNC = 0x80
+ O_TRUNC = 0x400
+ O_WRONLY = 0x1
+ PARENB = 0x1000
+ PARMRK = 0x8
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PF_FLUSH = 0x1
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
+ RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffffffffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BFD = 0xb
+ RTAX_BRD = 0x7
+ RTAX_DNS = 0xc
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_LABEL = 0xa
+ RTAX_MAX = 0xf
+ RTAX_NETMASK = 0x2
+ RTAX_SEARCH = 0xe
+ RTAX_SRC = 0x8
+ RTAX_SRCMASK = 0x9
+ RTAX_STATIC = 0xd
+ RTA_AUTHOR = 0x40
+ RTA_BFD = 0x800
+ RTA_BRD = 0x80
+ RTA_DNS = 0x1000
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_LABEL = 0x400
+ RTA_NETMASK = 0x4
+ RTA_SEARCH = 0x4000
+ RTA_SRC = 0x100
+ RTA_SRCMASK = 0x200
+ RTA_STATIC = 0x2000
+ RTF_ANNOUNCE = 0x4000
+ RTF_BFD = 0x1000000
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_CACHED = 0x20000
+ RTF_CLONED = 0x10000
+ RTF_CLONING = 0x100
+ RTF_CONNECTED = 0x800000
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_FMASK = 0x110fc08
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MODIFIED = 0x20
+ RTF_MPATH = 0x40000
+ RTF_MPLS = 0x100000
+ RTF_MULTICAST = 0x200
+ RTF_PERMANENT_ARP = 0x2000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x2000
+ RTF_REJECT = 0x8
+ RTF_STATIC = 0x800
+ RTF_UP = 0x1
+ RTF_USETRAILERS = 0x8000
+ RTM_80211INFO = 0x15
+ RTM_ADD = 0x1
+ RTM_BFD = 0x12
+ RTM_CHANGE = 0x3
+ RTM_CHGADDRATTR = 0x14
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_DESYNC = 0x10
+ RTM_GET = 0x4
+ RTM_IFANNOUNCE = 0xf
+ RTM_IFINFO = 0xe
+ RTM_INVALIDATE = 0x11
+ RTM_LOSING = 0x5
+ RTM_MAXSIZE = 0x800
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_PROPOSAL = 0x13
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_SOURCE = 0x16
+ RTM_VERSION = 0x5
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RT_TABLEID_BITS = 0x8
+ RT_TABLEID_MASK = 0xff
+ RT_TABLEID_MAX = 0xff
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x4
+ SEEK_CUR = 0x1
+ SEEK_END = 0x2
+ SEEK_SET = 0x0
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDMULTI = 0x80206931
+ SIOCAIFADDR = 0x8040691a
+ SIOCAIFGROUP = 0x80286987
+ SIOCATMARK = 0x40047307
+ SIOCBRDGADD = 0x8060693c
+ SIOCBRDGADDL = 0x80606949
+ SIOCBRDGADDS = 0x80606941
+ SIOCBRDGARL = 0x808c694d
+ SIOCBRDGDADDR = 0x81286947
+ SIOCBRDGDEL = 0x8060693d
+ SIOCBRDGDELS = 0x80606942
+ SIOCBRDGFLUSH = 0x80606948
+ SIOCBRDGFRL = 0x808c694e
+ SIOCBRDGGCACHE = 0xc0146941
+ SIOCBRDGGFD = 0xc0146952
+ SIOCBRDGGHT = 0xc0146951
+ SIOCBRDGGIFFLGS = 0xc060693e
+ SIOCBRDGGMA = 0xc0146953
+ SIOCBRDGGPARAM = 0xc0406958
+ SIOCBRDGGPRI = 0xc0146950
+ SIOCBRDGGRL = 0xc030694f
+ SIOCBRDGGTO = 0xc0146946
+ SIOCBRDGIFS = 0xc0606942
+ SIOCBRDGRTS = 0xc0206943
+ SIOCBRDGSADDR = 0xc1286944
+ SIOCBRDGSCACHE = 0x80146940
+ SIOCBRDGSFD = 0x80146952
+ SIOCBRDGSHT = 0x80146951
+ SIOCBRDGSIFCOST = 0x80606955
+ SIOCBRDGSIFFLGS = 0x8060693f
+ SIOCBRDGSIFPRIO = 0x80606954
+ SIOCBRDGSIFPROT = 0x8060694a
+ SIOCBRDGSMA = 0x80146953
+ SIOCBRDGSPRI = 0x80146950
+ SIOCBRDGSPROTO = 0x8014695a
+ SIOCBRDGSTO = 0x80146945
+ SIOCBRDGSTXHC = 0x80146959
+ SIOCDELLABEL = 0x80206997
+ SIOCDELMULTI = 0x80206932
+ SIOCDIFADDR = 0x80206919
+ SIOCDIFGROUP = 0x80286989
+ SIOCDIFPARENT = 0x802069b4
+ SIOCDIFPHYADDR = 0x80206949
+ SIOCDPWE3NEIGHBOR = 0x802069de
+ SIOCDVNETID = 0x802069af
+ SIOCGETKALIVE = 0xc01869a4
+ SIOCGETLABEL = 0x8020699a
+ SIOCGETMPWCFG = 0xc02069ae
+ SIOCGETPFLOW = 0xc02069fe
+ SIOCGETPFSYNC = 0xc02069f8
+ SIOCGETSGCNT = 0xc0207534
+ SIOCGETVIFCNT = 0xc0287533
+ SIOCGETVLAN = 0xc0206990
+ SIOCGIFADDR = 0xc0206921
+ SIOCGIFBRDADDR = 0xc0206923
+ SIOCGIFCONF = 0xc0106924
+ SIOCGIFDATA = 0xc020691b
+ SIOCGIFDESCR = 0xc0206981
+ SIOCGIFDSTADDR = 0xc0206922
+ SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFGATTR = 0xc028698b
+ SIOCGIFGENERIC = 0xc020693a
+ SIOCGIFGLIST = 0xc028698d
+ SIOCGIFGMEMB = 0xc028698a
+ SIOCGIFGROUP = 0xc0286988
+ SIOCGIFHARDMTU = 0xc02069a5
+ SIOCGIFLLPRIO = 0xc02069b6
+ SIOCGIFMEDIA = 0xc0406938
+ SIOCGIFMETRIC = 0xc0206917
+ SIOCGIFMTU = 0xc020697e
+ SIOCGIFNETMASK = 0xc0206925
+ SIOCGIFPAIR = 0xc02069b1
+ SIOCGIFPARENT = 0xc02069b3
+ SIOCGIFPRIORITY = 0xc020699c
+ SIOCGIFRDOMAIN = 0xc02069a0
+ SIOCGIFRTLABEL = 0xc0206983
+ SIOCGIFRXR = 0x802069aa
+ SIOCGIFSFFPAGE = 0xc1126939
+ SIOCGIFXFLAGS = 0xc020699e
+ SIOCGLIFPHYADDR = 0xc218694b
+ SIOCGLIFPHYDF = 0xc02069c2
+ SIOCGLIFPHYECN = 0xc02069c8
+ SIOCGLIFPHYRTABLE = 0xc02069a2
+ SIOCGLIFPHYTTL = 0xc02069a9
+ SIOCGPGRP = 0x40047309
+ SIOCGPWE3 = 0xc0206998
+ SIOCGPWE3CTRLWORD = 0xc02069dc
+ SIOCGPWE3FAT = 0xc02069dd
+ SIOCGPWE3NEIGHBOR = 0xc21869de
+ SIOCGRXHPRIO = 0xc02069db
+ SIOCGSPPPPARAMS = 0xc0206994
+ SIOCGTXHPRIO = 0xc02069c6
+ SIOCGUMBINFO = 0xc02069be
+ SIOCGUMBPARAM = 0xc02069c0
+ SIOCGVH = 0xc02069f6
+ SIOCGVNETFLOWID = 0xc02069c4
+ SIOCGVNETID = 0xc02069a7
+ SIOCIFAFATTACH = 0x801169ab
+ SIOCIFAFDETACH = 0x801169ac
+ SIOCIFCREATE = 0x8020697a
+ SIOCIFDESTROY = 0x80206979
+ SIOCIFGCLONERS = 0xc0106978
+ SIOCSETKALIVE = 0x801869a3
+ SIOCSETLABEL = 0x80206999
+ SIOCSETMPWCFG = 0x802069ad
+ SIOCSETPFLOW = 0x802069fd
+ SIOCSETPFSYNC = 0x802069f7
+ SIOCSETVLAN = 0x8020698f
+ SIOCSIFADDR = 0x8020690c
+ SIOCSIFBRDADDR = 0x80206913
+ SIOCSIFDESCR = 0x80206980
+ SIOCSIFDSTADDR = 0x8020690e
+ SIOCSIFFLAGS = 0x80206910
+ SIOCSIFGATTR = 0x8028698c
+ SIOCSIFGENERIC = 0x80206939
+ SIOCSIFLLADDR = 0x8020691f
+ SIOCSIFLLPRIO = 0x802069b5
+ SIOCSIFMEDIA = 0xc0206937
+ SIOCSIFMETRIC = 0x80206918
+ SIOCSIFMTU = 0x8020697f
+ SIOCSIFNETMASK = 0x80206916
+ SIOCSIFPAIR = 0x802069b0
+ SIOCSIFPARENT = 0x802069b2
+ SIOCSIFPRIORITY = 0x8020699b
+ SIOCSIFRDOMAIN = 0x8020699f
+ SIOCSIFRTLABEL = 0x80206982
+ SIOCSIFXFLAGS = 0x8020699d
+ SIOCSLIFPHYADDR = 0x8218694a
+ SIOCSLIFPHYDF = 0x802069c1
+ SIOCSLIFPHYECN = 0x802069c7
+ SIOCSLIFPHYRTABLE = 0x802069a1
+ SIOCSLIFPHYTTL = 0x802069a8
+ SIOCSPGRP = 0x80047308
+ SIOCSPWE3CTRLWORD = 0x802069dc
+ SIOCSPWE3FAT = 0x802069dd
+ SIOCSPWE3NEIGHBOR = 0x821869de
+ SIOCSRXHPRIO = 0x802069db
+ SIOCSSPPPPARAMS = 0x80206993
+ SIOCSTXHPRIO = 0x802069c5
+ SIOCSUMBPARAM = 0x802069bf
+ SIOCSVH = 0xc02069f5
+ SIOCSVNETFLOWID = 0x802069c3
+ SIOCSVNETID = 0x802069a6
+ SOCK_CLOEXEC = 0x8000
+ SOCK_DGRAM = 0x2
+ SOCK_DNS = 0x1000
+ SOCK_NONBLOCK = 0x4000
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x2
+ SO_BINDANY = 0x1000
+ SO_BROADCAST = 0x20
+ SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1024
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_NETPROC = 0x1020
+ SO_OOBINLINE = 0x100
+ SO_PEERCRED = 0x1022
+ SO_PROTOCOL = 0x1025
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RTABLE = 0x1021
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SPLICE = 0x1023
+ SO_TIMESTAMP = 0x800
+ SO_TYPE = 0x1008
+ SO_USELOOPBACK = 0x40
+ SO_ZEROIZE = 0x2000
+ S_BLKSIZE = 0x200
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISTXT = 0x200
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TCIFLUSH = 0x1
+ TCIOFF = 0x3
+ TCIOFLUSH = 0x3
+ TCION = 0x4
+ TCOFLUSH = 0x2
+ TCOOFF = 0x1
+ TCOON = 0x2
+ TCPOPT_EOL = 0x0
+ TCPOPT_MAXSEG = 0x2
+ TCPOPT_NOP = 0x1
+ TCPOPT_SACK = 0x5
+ TCPOPT_SACK_HDR = 0x1010500
+ TCPOPT_SACK_PERMITTED = 0x4
+ TCPOPT_SACK_PERMIT_HDR = 0x1010402
+ TCPOPT_SIGNATURE = 0x13
+ TCPOPT_TIMESTAMP = 0x8
+ TCPOPT_TSTAMP_HDR = 0x101080a
+ TCPOPT_WINDOW = 0x3
+ TCP_INFO = 0x9
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_SACK = 0x3
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MD5SIG = 0x4
+ TCP_MSS = 0x200
+ TCP_NODELAY = 0x1
+ TCP_NOPUSH = 0x10
+ TCP_SACKHOLE_LIMIT = 0x80
+ TCP_SACK_ENABLE = 0x8
+ TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCHKVERAUTH = 0x2000741e
+ TIOCCLRVERAUTH = 0x2000741d
+ TIOCCONS = 0x80047462
+ TIOCDRAIN = 0x2000745e
+ TIOCEXCL = 0x2000740d
+ TIOCEXT = 0x80047460
+ TIOCFLAG_CLOCAL = 0x2
+ TIOCFLAG_CRTSCTS = 0x4
+ TIOCFLAG_MDMBUF = 0x8
+ TIOCFLAG_PPS = 0x10
+ TIOCFLAG_SOFTCAR = 0x1
+ TIOCFLUSH = 0x80047410
+ TIOCGETA = 0x402c7413
+ TIOCGETD = 0x4004741a
+ TIOCGFLAGS = 0x4004745d
+ TIOCGPGRP = 0x40047477
+ TIOCGSID = 0x40047463
+ TIOCGTSTAMP = 0x4010745b
+ TIOCGWINSZ = 0x40087468
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGET = 0x4004746a
+ TIOCMODG = 0x4004746a
+ TIOCMODS = 0x8004746d
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCREMOTE = 0x80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSCTTY = 0x20007461
+ TIOCSDTR = 0x20007479
+ TIOCSETA = 0x802c7414
+ TIOCSETAF = 0x802c7416
+ TIOCSETAW = 0x802c7415
+ TIOCSETD = 0x8004741b
+ TIOCSETVERAUTH = 0x8004741c
+ TIOCSFLAGS = 0x8004745c
+ TIOCSIG = 0x8004745f
+ TIOCSPGRP = 0x80047476
+ TIOCSTART = 0x2000746e
+ TIOCSTAT = 0x20007465
+ TIOCSTOP = 0x2000746f
+ TIOCSTSTAMP = 0x8008745a
+ TIOCSWINSZ = 0x80087467
+ TIOCUCNTL = 0x80047466
+ TIOCUCNTL_CBRK = 0x7a
+ TIOCUCNTL_SBRK = 0x7b
+ TOSTOP = 0x400000
+ UTIME_NOW = -0x2
+ UTIME_OMIT = -0x1
+ VDISCARD = 0xf
+ VDSUSP = 0xb
+ VEOF = 0x0
+ VEOL = 0x1
+ VEOL2 = 0x2
+ VERASE = 0x3
+ VINTR = 0x8
+ VKILL = 0x5
+ VLNEXT = 0xe
+ VMIN = 0x10
+ VM_ANONMIN = 0x7
+ VM_LOADAVG = 0x2
+ VM_MALLOC_CONF = 0xc
+ VM_MAXID = 0xd
+ VM_MAXSLP = 0xa
+ VM_METER = 0x1
+ VM_NKMEMPAGES = 0x6
+ VM_PSSTRINGS = 0x3
+ VM_SWAPENCRYPT = 0x5
+ VM_USPACE = 0xb
+ VM_UVMEXP = 0x4
+ VM_VNODEMIN = 0x9
+ VM_VTEXTMIN = 0x8
+ VQUIT = 0x9
+ VREPRINT = 0x6
+ VSTART = 0xc
+ VSTATUS = 0x12
+ VSTOP = 0xd
+ VSUSP = 0xa
+ VTIME = 0x11
+ VWERASE = 0x4
+ WALTSIG = 0x4
+ WCONTINUED = 0x8
+ WCOREFLAG = 0x80
+ WNOHANG = 0x1
+ WUNTRACED = 0x2
+ XCASE = 0x1000000
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EADDRINUSE = syscall.Errno(0x30)
+ EADDRNOTAVAIL = syscall.Errno(0x31)
+ EAFNOSUPPORT = syscall.Errno(0x2f)
+ EAGAIN = syscall.Errno(0x23)
+ EALREADY = syscall.Errno(0x25)
+ EAUTH = syscall.Errno(0x50)
+ EBADF = syscall.Errno(0x9)
+ EBADMSG = syscall.Errno(0x5c)
+ EBADRPC = syscall.Errno(0x48)
+ EBUSY = syscall.Errno(0x10)
+ ECANCELED = syscall.Errno(0x58)
+ ECHILD = syscall.Errno(0xa)
+ ECONNABORTED = syscall.Errno(0x35)
+ ECONNREFUSED = syscall.Errno(0x3d)
+ ECONNRESET = syscall.Errno(0x36)
+ EDEADLK = syscall.Errno(0xb)
+ EDESTADDRREQ = syscall.Errno(0x27)
+ EDOM = syscall.Errno(0x21)
+ EDQUOT = syscall.Errno(0x45)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EFTYPE = syscall.Errno(0x4f)
+ EHOSTDOWN = syscall.Errno(0x40)
+ EHOSTUNREACH = syscall.Errno(0x41)
+ EIDRM = syscall.Errno(0x59)
+ EILSEQ = syscall.Errno(0x54)
+ EINPROGRESS = syscall.Errno(0x24)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EIPSEC = syscall.Errno(0x52)
+ EISCONN = syscall.Errno(0x38)
+ EISDIR = syscall.Errno(0x15)
+ ELAST = syscall.Errno(0x5f)
+ ELOOP = syscall.Errno(0x3e)
+ EMEDIUMTYPE = syscall.Errno(0x56)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ EMSGSIZE = syscall.Errno(0x28)
+ ENAMETOOLONG = syscall.Errno(0x3f)
+ ENEEDAUTH = syscall.Errno(0x51)
+ ENETDOWN = syscall.Errno(0x32)
+ ENETRESET = syscall.Errno(0x34)
+ ENETUNREACH = syscall.Errno(0x33)
+ ENFILE = syscall.Errno(0x17)
+ ENOATTR = syscall.Errno(0x53)
+ ENOBUFS = syscall.Errno(0x37)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOLCK = syscall.Errno(0x4d)
+ ENOMEDIUM = syscall.Errno(0x55)
+ ENOMEM = syscall.Errno(0xc)
+ ENOMSG = syscall.Errno(0x5a)
+ ENOPROTOOPT = syscall.Errno(0x2a)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOSYS = syscall.Errno(0x4e)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTCONN = syscall.Errno(0x39)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTEMPTY = syscall.Errno(0x42)
+ ENOTRECOVERABLE = syscall.Errno(0x5d)
+ ENOTSOCK = syscall.Errno(0x26)
+ ENOTSUP = syscall.Errno(0x5b)
+ ENOTTY = syscall.Errno(0x19)
+ ENXIO = syscall.Errno(0x6)
+ EOPNOTSUPP = syscall.Errno(0x2d)
+ EOVERFLOW = syscall.Errno(0x57)
+ EOWNERDEAD = syscall.Errno(0x5e)
+ EPERM = syscall.Errno(0x1)
+ EPFNOSUPPORT = syscall.Errno(0x2e)
+ EPIPE = syscall.Errno(0x20)
+ EPROCLIM = syscall.Errno(0x43)
+ EPROCUNAVAIL = syscall.Errno(0x4c)
+ EPROGMISMATCH = syscall.Errno(0x4b)
+ EPROGUNAVAIL = syscall.Errno(0x4a)
+ EPROTO = syscall.Errno(0x5f)
+ EPROTONOSUPPORT = syscall.Errno(0x2b)
+ EPROTOTYPE = syscall.Errno(0x29)
+ ERANGE = syscall.Errno(0x22)
+ EREMOTE = syscall.Errno(0x47)
+ EROFS = syscall.Errno(0x1e)
+ ERPCMISMATCH = syscall.Errno(0x49)
+ ESHUTDOWN = syscall.Errno(0x3a)
+ ESOCKTNOSUPPORT = syscall.Errno(0x2c)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ESTALE = syscall.Errno(0x46)
+ ETIMEDOUT = syscall.Errno(0x3c)
+ ETOOMANYREFS = syscall.Errno(0x3b)
+ ETXTBSY = syscall.Errno(0x1a)
+ EUSERS = syscall.Errno(0x44)
+ EWOULDBLOCK = syscall.Errno(0x23)
+ EXDEV = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGALRM = syscall.Signal(0xe)
+ SIGBUS = syscall.Signal(0xa)
+ SIGCHLD = syscall.Signal(0x14)
+ SIGCONT = syscall.Signal(0x13)
+ SIGEMT = syscall.Signal(0x7)
+ SIGFPE = syscall.Signal(0x8)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINFO = syscall.Signal(0x1d)
+ SIGINT = syscall.Signal(0x2)
+ SIGIO = syscall.Signal(0x17)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKILL = syscall.Signal(0x9)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGPROF = syscall.Signal(0x1b)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGSTOP = syscall.Signal(0x11)
+ SIGSYS = syscall.Signal(0xc)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTHR = syscall.Signal(0x20)
+ SIGTRAP = syscall.Signal(0x5)
+ SIGTSTP = syscall.Signal(0x12)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x10)
+ SIGUSR1 = syscall.Signal(0x1e)
+ SIGUSR2 = syscall.Signal(0x1f)
+ SIGVTALRM = syscall.Signal(0x1a)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "operation not permitted"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "input/output error"},
+ {6, "ENXIO", "device not configured"},
+ {7, "E2BIG", "argument list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file descriptor"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EDEADLK", "resource deadlock avoided"},
+ {12, "ENOMEM", "cannot allocate memory"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device busy"},
+ {17, "EEXIST", "file exists"},
+ {18, "EXDEV", "cross-device link"},
+ {19, "ENODEV", "operation not supported by device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "too many open files in system"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "inappropriate ioctl for device"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "numerical argument out of domain"},
+ {34, "ERANGE", "result too large"},
+ {35, "EAGAIN", "resource temporarily unavailable"},
+ {36, "EINPROGRESS", "operation now in progress"},
+ {37, "EALREADY", "operation already in progress"},
+ {38, "ENOTSOCK", "socket operation on non-socket"},
+ {39, "EDESTADDRREQ", "destination address required"},
+ {40, "EMSGSIZE", "message too long"},
+ {41, "EPROTOTYPE", "protocol wrong type for socket"},
+ {42, "ENOPROTOOPT", "protocol not available"},
+ {43, "EPROTONOSUPPORT", "protocol not supported"},
+ {44, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {45, "EOPNOTSUPP", "operation not supported"},
+ {46, "EPFNOSUPPORT", "protocol family not supported"},
+ {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
+ {48, "EADDRINUSE", "address already in use"},
+ {49, "EADDRNOTAVAIL", "can't assign requested address"},
+ {50, "ENETDOWN", "network is down"},
+ {51, "ENETUNREACH", "network is unreachable"},
+ {52, "ENETRESET", "network dropped connection on reset"},
+ {53, "ECONNABORTED", "software caused connection abort"},
+ {54, "ECONNRESET", "connection reset by peer"},
+ {55, "ENOBUFS", "no buffer space available"},
+ {56, "EISCONN", "socket is already connected"},
+ {57, "ENOTCONN", "socket is not connected"},
+ {58, "ESHUTDOWN", "can't send after socket shutdown"},
+ {59, "ETOOMANYREFS", "too many references: can't splice"},
+ {60, "ETIMEDOUT", "operation timed out"},
+ {61, "ECONNREFUSED", "connection refused"},
+ {62, "ELOOP", "too many levels of symbolic links"},
+ {63, "ENAMETOOLONG", "file name too long"},
+ {64, "EHOSTDOWN", "host is down"},
+ {65, "EHOSTUNREACH", "no route to host"},
+ {66, "ENOTEMPTY", "directory not empty"},
+ {67, "EPROCLIM", "too many processes"},
+ {68, "EUSERS", "too many users"},
+ {69, "EDQUOT", "disk quota exceeded"},
+ {70, "ESTALE", "stale NFS file handle"},
+ {71, "EREMOTE", "too many levels of remote in path"},
+ {72, "EBADRPC", "RPC struct is bad"},
+ {73, "ERPCMISMATCH", "RPC version wrong"},
+ {74, "EPROGUNAVAIL", "RPC program not available"},
+ {75, "EPROGMISMATCH", "program version wrong"},
+ {76, "EPROCUNAVAIL", "bad procedure for program"},
+ {77, "ENOLCK", "no locks available"},
+ {78, "ENOSYS", "function not implemented"},
+ {79, "EFTYPE", "inappropriate file type or format"},
+ {80, "EAUTH", "authentication error"},
+ {81, "ENEEDAUTH", "need authenticator"},
+ {82, "EIPSEC", "IPsec processing failure"},
+ {83, "ENOATTR", "attribute not found"},
+ {84, "EILSEQ", "illegal byte sequence"},
+ {85, "ENOMEDIUM", "no medium found"},
+ {86, "EMEDIUMTYPE", "wrong medium type"},
+ {87, "EOVERFLOW", "value too large to be stored in data type"},
+ {88, "ECANCELED", "operation canceled"},
+ {89, "EIDRM", "identifier removed"},
+ {90, "ENOMSG", "no message of desired type"},
+ {91, "ENOTSUP", "not supported"},
+ {92, "EBADMSG", "bad message"},
+ {93, "ENOTRECOVERABLE", "state not recoverable"},
+ {94, "EOWNERDEAD", "previous owner died"},
+ {95, "ELAST", "protocol error"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/BPT trap"},
+ {6, "SIGABRT", "abort trap"},
+ {7, "SIGEMT", "EMT trap"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGBUS", "bus error"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGSYS", "bad system call"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGURG", "urgent I/O condition"},
+ {17, "SIGSTOP", "suspended (signal)"},
+ {18, "SIGTSTP", "suspended"},
+ {19, "SIGCONT", "continued"},
+ {20, "SIGCHLD", "child exited"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGIO", "I/O possible"},
+ {24, "SIGXCPU", "cputime limit exceeded"},
+ {25, "SIGXFSZ", "filesize limit exceeded"},
+ {26, "SIGVTALRM", "virtual timer expired"},
+ {27, "SIGPROF", "profiling timer expired"},
+ {28, "SIGWINCH", "window size changes"},
+ {29, "SIGINFO", "information request"},
+ {30, "SIGUSR1", "user defined signal 1"},
+ {31, "SIGUSR2", "user defined signal 2"},
+ {32, "SIGTHR", "thread AST"},
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go
new file mode 100644
index 000000000..13d403031
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zerrors_openbsd_riscv64.go
@@ -0,0 +1,1904 @@
+// mkerrors.sh -m64
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build riscv64 && openbsd
+// +build riscv64,openbsd
+
+// Code generated by cmd/cgo -godefs; DO NOT EDIT.
+// cgo -godefs -- -m64 _const.go
+
+package unix
+
+import "syscall"
+
+const (
+ AF_APPLETALK = 0x10
+ AF_BLUETOOTH = 0x20
+ AF_CCITT = 0xa
+ AF_CHAOS = 0x5
+ AF_CNT = 0x15
+ AF_COIP = 0x14
+ AF_DATAKIT = 0x9
+ AF_DECnet = 0xc
+ AF_DLI = 0xd
+ AF_E164 = 0x1a
+ AF_ECMA = 0x8
+ AF_ENCAP = 0x1c
+ AF_HYLINK = 0xf
+ AF_IMPLINK = 0x3
+ AF_INET = 0x2
+ AF_INET6 = 0x18
+ AF_IPX = 0x17
+ AF_ISDN = 0x1a
+ AF_ISO = 0x7
+ AF_KEY = 0x1e
+ AF_LAT = 0xe
+ AF_LINK = 0x12
+ AF_LOCAL = 0x1
+ AF_MAX = 0x24
+ AF_MPLS = 0x21
+ AF_NATM = 0x1b
+ AF_NS = 0x6
+ AF_OSI = 0x7
+ AF_PUP = 0x4
+ AF_ROUTE = 0x11
+ AF_SIP = 0x1d
+ AF_SNA = 0xb
+ AF_UNIX = 0x1
+ AF_UNSPEC = 0x0
+ ALTWERASE = 0x200
+ ARPHRD_ETHER = 0x1
+ ARPHRD_FRELAY = 0xf
+ ARPHRD_IEEE1394 = 0x18
+ ARPHRD_IEEE802 = 0x6
+ B0 = 0x0
+ B110 = 0x6e
+ B115200 = 0x1c200
+ B1200 = 0x4b0
+ B134 = 0x86
+ B14400 = 0x3840
+ B150 = 0x96
+ B1800 = 0x708
+ B19200 = 0x4b00
+ B200 = 0xc8
+ B230400 = 0x38400
+ B2400 = 0x960
+ B28800 = 0x7080
+ B300 = 0x12c
+ B38400 = 0x9600
+ B4800 = 0x12c0
+ B50 = 0x32
+ B57600 = 0xe100
+ B600 = 0x258
+ B7200 = 0x1c20
+ B75 = 0x4b
+ B76800 = 0x12c00
+ B9600 = 0x2580
+ BIOCFLUSH = 0x20004268
+ BIOCGBLEN = 0x40044266
+ BIOCGDIRFILT = 0x4004427c
+ BIOCGDLT = 0x4004426a
+ BIOCGDLTLIST = 0xc010427b
+ BIOCGETIF = 0x4020426b
+ BIOCGFILDROP = 0x40044278
+ BIOCGHDRCMPLT = 0x40044274
+ BIOCGRSIG = 0x40044273
+ BIOCGRTIMEOUT = 0x4010426e
+ BIOCGSTATS = 0x4008426f
+ BIOCIMMEDIATE = 0x80044270
+ BIOCLOCK = 0x20004276
+ BIOCPROMISC = 0x20004269
+ BIOCSBLEN = 0xc0044266
+ BIOCSDIRFILT = 0x8004427d
+ BIOCSDLT = 0x8004427a
+ BIOCSETF = 0x80104267
+ BIOCSETIF = 0x8020426c
+ BIOCSETWF = 0x80104277
+ BIOCSFILDROP = 0x80044279
+ BIOCSHDRCMPLT = 0x80044275
+ BIOCSRSIG = 0x80044272
+ BIOCSRTIMEOUT = 0x8010426d
+ BIOCVERSION = 0x40044271
+ BPF_A = 0x10
+ BPF_ABS = 0x20
+ BPF_ADD = 0x0
+ BPF_ALIGNMENT = 0x4
+ BPF_ALU = 0x4
+ BPF_AND = 0x50
+ BPF_B = 0x10
+ BPF_DIRECTION_IN = 0x1
+ BPF_DIRECTION_OUT = 0x2
+ BPF_DIV = 0x30
+ BPF_FILDROP_CAPTURE = 0x1
+ BPF_FILDROP_DROP = 0x2
+ BPF_FILDROP_PASS = 0x0
+ BPF_F_DIR_IN = 0x10
+ BPF_F_DIR_MASK = 0x30
+ BPF_F_DIR_OUT = 0x20
+ BPF_F_DIR_SHIFT = 0x4
+ BPF_F_FLOWID = 0x8
+ BPF_F_PRI_MASK = 0x7
+ BPF_H = 0x8
+ BPF_IMM = 0x0
+ BPF_IND = 0x40
+ BPF_JA = 0x0
+ BPF_JEQ = 0x10
+ BPF_JGE = 0x30
+ BPF_JGT = 0x20
+ BPF_JMP = 0x5
+ BPF_JSET = 0x40
+ BPF_K = 0x0
+ BPF_LD = 0x0
+ BPF_LDX = 0x1
+ BPF_LEN = 0x80
+ BPF_LSH = 0x60
+ BPF_MAJOR_VERSION = 0x1
+ BPF_MAXBUFSIZE = 0x200000
+ BPF_MAXINSNS = 0x200
+ BPF_MEM = 0x60
+ BPF_MEMWORDS = 0x10
+ BPF_MINBUFSIZE = 0x20
+ BPF_MINOR_VERSION = 0x1
+ BPF_MISC = 0x7
+ BPF_MSH = 0xa0
+ BPF_MUL = 0x20
+ BPF_NEG = 0x80
+ BPF_OR = 0x40
+ BPF_RELEASE = 0x30bb6
+ BPF_RET = 0x6
+ BPF_RND = 0xc0
+ BPF_RSH = 0x70
+ BPF_ST = 0x2
+ BPF_STX = 0x3
+ BPF_SUB = 0x10
+ BPF_TAX = 0x0
+ BPF_TXA = 0x80
+ BPF_W = 0x0
+ BPF_X = 0x8
+ BRKINT = 0x2
+ CFLUSH = 0xf
+ CLOCAL = 0x8000
+ CLOCK_BOOTTIME = 0x6
+ CLOCK_MONOTONIC = 0x3
+ CLOCK_PROCESS_CPUTIME_ID = 0x2
+ CLOCK_REALTIME = 0x0
+ CLOCK_THREAD_CPUTIME_ID = 0x4
+ CLOCK_UPTIME = 0x5
+ CPUSTATES = 0x6
+ CP_IDLE = 0x5
+ CP_INTR = 0x4
+ CP_NICE = 0x1
+ CP_SPIN = 0x3
+ CP_SYS = 0x2
+ CP_USER = 0x0
+ CREAD = 0x800
+ CRTSCTS = 0x10000
+ CS5 = 0x0
+ CS6 = 0x100
+ CS7 = 0x200
+ CS8 = 0x300
+ CSIZE = 0x300
+ CSTART = 0x11
+ CSTATUS = 0xff
+ CSTOP = 0x13
+ CSTOPB = 0x400
+ CSUSP = 0x1a
+ CTL_HW = 0x6
+ CTL_KERN = 0x1
+ CTL_MAXNAME = 0xc
+ CTL_NET = 0x4
+ DIOCADDQUEUE = 0xc110445d
+ DIOCADDRULE = 0xcd604404
+ DIOCADDSTATE = 0xc1084425
+ DIOCCHANGERULE = 0xcd60441a
+ DIOCCLRIFFLAG = 0xc028445a
+ DIOCCLRSRCNODES = 0x20004455
+ DIOCCLRSTATES = 0xc0e04412
+ DIOCCLRSTATUS = 0xc0284416
+ DIOCGETLIMIT = 0xc0084427
+ DIOCGETQSTATS = 0xc1204460
+ DIOCGETQUEUE = 0xc110445f
+ DIOCGETQUEUES = 0xc110445e
+ DIOCGETRULE = 0xcd604407
+ DIOCGETRULES = 0xcd604406
+ DIOCGETRULESET = 0xc444443b
+ DIOCGETRULESETS = 0xc444443a
+ DIOCGETSRCNODES = 0xc0104454
+ DIOCGETSTATE = 0xc1084413
+ DIOCGETSTATES = 0xc0104419
+ DIOCGETSTATUS = 0xc1e84415
+ DIOCGETSYNFLWATS = 0xc0084463
+ DIOCGETTIMEOUT = 0xc008441e
+ DIOCIGETIFACES = 0xc0284457
+ DIOCKILLSRCNODES = 0xc080445b
+ DIOCKILLSTATES = 0xc0e04429
+ DIOCNATLOOK = 0xc0504417
+ DIOCOSFPADD = 0xc088444f
+ DIOCOSFPFLUSH = 0x2000444e
+ DIOCOSFPGET = 0xc0884450
+ DIOCRADDADDRS = 0xc4504443
+ DIOCRADDTABLES = 0xc450443d
+ DIOCRCLRADDRS = 0xc4504442
+ DIOCRCLRASTATS = 0xc4504448
+ DIOCRCLRTABLES = 0xc450443c
+ DIOCRCLRTSTATS = 0xc4504441
+ DIOCRDELADDRS = 0xc4504444
+ DIOCRDELTABLES = 0xc450443e
+ DIOCRGETADDRS = 0xc4504446
+ DIOCRGETASTATS = 0xc4504447
+ DIOCRGETTABLES = 0xc450443f
+ DIOCRGETTSTATS = 0xc4504440
+ DIOCRINADEFINE = 0xc450444d
+ DIOCRSETADDRS = 0xc4504445
+ DIOCRSETTFLAGS = 0xc450444a
+ DIOCRTSTADDRS = 0xc4504449
+ DIOCSETDEBUG = 0xc0044418
+ DIOCSETHOSTID = 0xc0044456
+ DIOCSETIFFLAG = 0xc0284459
+ DIOCSETLIMIT = 0xc0084428
+ DIOCSETREASS = 0xc004445c
+ DIOCSETSTATUSIF = 0xc0284414
+ DIOCSETSYNCOOKIES = 0xc0014462
+ DIOCSETSYNFLWATS = 0xc0084461
+ DIOCSETTIMEOUT = 0xc008441d
+ DIOCSTART = 0x20004401
+ DIOCSTOP = 0x20004402
+ DIOCXBEGIN = 0xc0104451
+ DIOCXCOMMIT = 0xc0104452
+ DIOCXROLLBACK = 0xc0104453
+ DLT_ARCNET = 0x7
+ DLT_ATM_RFC1483 = 0xb
+ DLT_AX25 = 0x3
+ DLT_CHAOS = 0x5
+ DLT_C_HDLC = 0x68
+ DLT_EN10MB = 0x1
+ DLT_EN3MB = 0x2
+ DLT_ENC = 0xd
+ DLT_FDDI = 0xa
+ DLT_IEEE802 = 0x6
+ DLT_IEEE802_11 = 0x69
+ DLT_IEEE802_11_RADIO = 0x7f
+ DLT_LOOP = 0xc
+ DLT_MPLS = 0xdb
+ DLT_NULL = 0x0
+ DLT_OPENFLOW = 0x10b
+ DLT_PFLOG = 0x75
+ DLT_PFSYNC = 0x12
+ DLT_PPP = 0x9
+ DLT_PPP_BSDOS = 0x10
+ DLT_PPP_ETHER = 0x33
+ DLT_PPP_SERIAL = 0x32
+ DLT_PRONET = 0x4
+ DLT_RAW = 0xe
+ DLT_SLIP = 0x8
+ DLT_SLIP_BSDOS = 0xf
+ DLT_USBPCAP = 0xf9
+ DLT_USER0 = 0x93
+ DLT_USER1 = 0x94
+ DLT_USER10 = 0x9d
+ DLT_USER11 = 0x9e
+ DLT_USER12 = 0x9f
+ DLT_USER13 = 0xa0
+ DLT_USER14 = 0xa1
+ DLT_USER15 = 0xa2
+ DLT_USER2 = 0x95
+ DLT_USER3 = 0x96
+ DLT_USER4 = 0x97
+ DLT_USER5 = 0x98
+ DLT_USER6 = 0x99
+ DLT_USER7 = 0x9a
+ DLT_USER8 = 0x9b
+ DLT_USER9 = 0x9c
+ DT_BLK = 0x6
+ DT_CHR = 0x2
+ DT_DIR = 0x4
+ DT_FIFO = 0x1
+ DT_LNK = 0xa
+ DT_REG = 0x8
+ DT_SOCK = 0xc
+ DT_UNKNOWN = 0x0
+ ECHO = 0x8
+ ECHOCTL = 0x40
+ ECHOE = 0x2
+ ECHOK = 0x4
+ ECHOKE = 0x1
+ ECHONL = 0x10
+ ECHOPRT = 0x20
+ EMT_TAGOVF = 0x1
+ EMUL_ENABLED = 0x1
+ EMUL_NATIVE = 0x2
+ ENDRUNDISC = 0x9
+ ETH64_8021_RSVD_MASK = 0xfffffffffff0
+ ETH64_8021_RSVD_PREFIX = 0x180c2000000
+ ETHERMIN = 0x2e
+ ETHERMTU = 0x5dc
+ ETHERTYPE_8023 = 0x4
+ ETHERTYPE_AARP = 0x80f3
+ ETHERTYPE_ACCTON = 0x8390
+ ETHERTYPE_AEONIC = 0x8036
+ ETHERTYPE_ALPHA = 0x814a
+ ETHERTYPE_AMBER = 0x6008
+ ETHERTYPE_AMOEBA = 0x8145
+ ETHERTYPE_AOE = 0x88a2
+ ETHERTYPE_APOLLO = 0x80f7
+ ETHERTYPE_APOLLODOMAIN = 0x8019
+ ETHERTYPE_APPLETALK = 0x809b
+ ETHERTYPE_APPLITEK = 0x80c7
+ ETHERTYPE_ARGONAUT = 0x803a
+ ETHERTYPE_ARP = 0x806
+ ETHERTYPE_AT = 0x809b
+ ETHERTYPE_ATALK = 0x809b
+ ETHERTYPE_ATOMIC = 0x86df
+ ETHERTYPE_ATT = 0x8069
+ ETHERTYPE_ATTSTANFORD = 0x8008
+ ETHERTYPE_AUTOPHON = 0x806a
+ ETHERTYPE_AXIS = 0x8856
+ ETHERTYPE_BCLOOP = 0x9003
+ ETHERTYPE_BOFL = 0x8102
+ ETHERTYPE_CABLETRON = 0x7034
+ ETHERTYPE_CHAOS = 0x804
+ ETHERTYPE_COMDESIGN = 0x806c
+ ETHERTYPE_COMPUGRAPHIC = 0x806d
+ ETHERTYPE_COUNTERPOINT = 0x8062
+ ETHERTYPE_CRONUS = 0x8004
+ ETHERTYPE_CRONUSVLN = 0x8003
+ ETHERTYPE_DCA = 0x1234
+ ETHERTYPE_DDE = 0x807b
+ ETHERTYPE_DEBNI = 0xaaaa
+ ETHERTYPE_DECAM = 0x8048
+ ETHERTYPE_DECCUST = 0x6006
+ ETHERTYPE_DECDIAG = 0x6005
+ ETHERTYPE_DECDNS = 0x803c
+ ETHERTYPE_DECDTS = 0x803e
+ ETHERTYPE_DECEXPER = 0x6000
+ ETHERTYPE_DECLAST = 0x8041
+ ETHERTYPE_DECLTM = 0x803f
+ ETHERTYPE_DECMUMPS = 0x6009
+ ETHERTYPE_DECNETBIOS = 0x8040
+ ETHERTYPE_DELTACON = 0x86de
+ ETHERTYPE_DIDDLE = 0x4321
+ ETHERTYPE_DLOG1 = 0x660
+ ETHERTYPE_DLOG2 = 0x661
+ ETHERTYPE_DN = 0x6003
+ ETHERTYPE_DOGFIGHT = 0x1989
+ ETHERTYPE_DSMD = 0x8039
+ ETHERTYPE_EAPOL = 0x888e
+ ETHERTYPE_ECMA = 0x803
+ ETHERTYPE_ENCRYPT = 0x803d
+ ETHERTYPE_ES = 0x805d
+ ETHERTYPE_EXCELAN = 0x8010
+ ETHERTYPE_EXPERDATA = 0x8049
+ ETHERTYPE_FLIP = 0x8146
+ ETHERTYPE_FLOWCONTROL = 0x8808
+ ETHERTYPE_FRARP = 0x808
+ ETHERTYPE_GENDYN = 0x8068
+ ETHERTYPE_HAYES = 0x8130
+ ETHERTYPE_HIPPI_FP = 0x8180
+ ETHERTYPE_HITACHI = 0x8820
+ ETHERTYPE_HP = 0x8005
+ ETHERTYPE_IEEEPUP = 0xa00
+ ETHERTYPE_IEEEPUPAT = 0xa01
+ ETHERTYPE_IMLBL = 0x4c42
+ ETHERTYPE_IMLBLDIAG = 0x424c
+ ETHERTYPE_IP = 0x800
+ ETHERTYPE_IPAS = 0x876c
+ ETHERTYPE_IPV6 = 0x86dd
+ ETHERTYPE_IPX = 0x8137
+ ETHERTYPE_IPXNEW = 0x8037
+ ETHERTYPE_KALPANA = 0x8582
+ ETHERTYPE_LANBRIDGE = 0x8038
+ ETHERTYPE_LANPROBE = 0x8888
+ ETHERTYPE_LAT = 0x6004
+ ETHERTYPE_LBACK = 0x9000
+ ETHERTYPE_LITTLE = 0x8060
+ ETHERTYPE_LLDP = 0x88cc
+ ETHERTYPE_LOGICRAFT = 0x8148
+ ETHERTYPE_LOOPBACK = 0x9000
+ ETHERTYPE_MACSEC = 0x88e5
+ ETHERTYPE_MATRA = 0x807a
+ ETHERTYPE_MAX = 0xffff
+ ETHERTYPE_MERIT = 0x807c
+ ETHERTYPE_MICP = 0x873a
+ ETHERTYPE_MOPDL = 0x6001
+ ETHERTYPE_MOPRC = 0x6002
+ ETHERTYPE_MOTOROLA = 0x818d
+ ETHERTYPE_MPLS = 0x8847
+ ETHERTYPE_MPLS_MCAST = 0x8848
+ ETHERTYPE_MUMPS = 0x813f
+ ETHERTYPE_NBPCC = 0x3c04
+ ETHERTYPE_NBPCLAIM = 0x3c09
+ ETHERTYPE_NBPCLREQ = 0x3c05
+ ETHERTYPE_NBPCLRSP = 0x3c06
+ ETHERTYPE_NBPCREQ = 0x3c02
+ ETHERTYPE_NBPCRSP = 0x3c03
+ ETHERTYPE_NBPDG = 0x3c07
+ ETHERTYPE_NBPDGB = 0x3c08
+ ETHERTYPE_NBPDLTE = 0x3c0a
+ ETHERTYPE_NBPRAR = 0x3c0c
+ ETHERTYPE_NBPRAS = 0x3c0b
+ ETHERTYPE_NBPRST = 0x3c0d
+ ETHERTYPE_NBPSCD = 0x3c01
+ ETHERTYPE_NBPVCD = 0x3c00
+ ETHERTYPE_NBS = 0x802
+ ETHERTYPE_NCD = 0x8149
+ ETHERTYPE_NESTAR = 0x8006
+ ETHERTYPE_NETBEUI = 0x8191
+ ETHERTYPE_NHRP = 0x2001
+ ETHERTYPE_NOVELL = 0x8138
+ ETHERTYPE_NS = 0x600
+ ETHERTYPE_NSAT = 0x601
+ ETHERTYPE_NSCOMPAT = 0x807
+ ETHERTYPE_NSH = 0x984f
+ ETHERTYPE_NTRAILER = 0x10
+ ETHERTYPE_OS9 = 0x7007
+ ETHERTYPE_OS9NET = 0x7009
+ ETHERTYPE_PACER = 0x80c6
+ ETHERTYPE_PBB = 0x88e7
+ ETHERTYPE_PCS = 0x4242
+ ETHERTYPE_PLANNING = 0x8044
+ ETHERTYPE_PPP = 0x880b
+ ETHERTYPE_PPPOE = 0x8864
+ ETHERTYPE_PPPOEDISC = 0x8863
+ ETHERTYPE_PRIMENTS = 0x7031
+ ETHERTYPE_PUP = 0x200
+ ETHERTYPE_PUPAT = 0x200
+ ETHERTYPE_QINQ = 0x88a8
+ ETHERTYPE_RACAL = 0x7030
+ ETHERTYPE_RATIONAL = 0x8150
+ ETHERTYPE_RAWFR = 0x6559
+ ETHERTYPE_RCL = 0x1995
+ ETHERTYPE_RDP = 0x8739
+ ETHERTYPE_RETIX = 0x80f2
+ ETHERTYPE_REVARP = 0x8035
+ ETHERTYPE_SCA = 0x6007
+ ETHERTYPE_SECTRA = 0x86db
+ ETHERTYPE_SECUREDATA = 0x876d
+ ETHERTYPE_SGITW = 0x817e
+ ETHERTYPE_SG_BOUNCE = 0x8016
+ ETHERTYPE_SG_DIAG = 0x8013
+ ETHERTYPE_SG_NETGAMES = 0x8014
+ ETHERTYPE_SG_RESV = 0x8015
+ ETHERTYPE_SIMNET = 0x5208
+ ETHERTYPE_SLOW = 0x8809
+ ETHERTYPE_SNA = 0x80d5
+ ETHERTYPE_SNMP = 0x814c
+ ETHERTYPE_SONIX = 0xfaf5
+ ETHERTYPE_SPIDER = 0x809f
+ ETHERTYPE_SPRITE = 0x500
+ ETHERTYPE_STP = 0x8181
+ ETHERTYPE_TALARIS = 0x812b
+ ETHERTYPE_TALARISMC = 0x852b
+ ETHERTYPE_TCPCOMP = 0x876b
+ ETHERTYPE_TCPSM = 0x9002
+ ETHERTYPE_TEC = 0x814f
+ ETHERTYPE_TIGAN = 0x802f
+ ETHERTYPE_TRAIL = 0x1000
+ ETHERTYPE_TRANSETHER = 0x6558
+ ETHERTYPE_TYMSHARE = 0x802e
+ ETHERTYPE_UBBST = 0x7005
+ ETHERTYPE_UBDEBUG = 0x900
+ ETHERTYPE_UBDIAGLOOP = 0x7002
+ ETHERTYPE_UBDL = 0x7000
+ ETHERTYPE_UBNIU = 0x7001
+ ETHERTYPE_UBNMC = 0x7003
+ ETHERTYPE_VALID = 0x1600
+ ETHERTYPE_VARIAN = 0x80dd
+ ETHERTYPE_VAXELN = 0x803b
+ ETHERTYPE_VEECO = 0x8067
+ ETHERTYPE_VEXP = 0x805b
+ ETHERTYPE_VGLAB = 0x8131
+ ETHERTYPE_VINES = 0xbad
+ ETHERTYPE_VINESECHO = 0xbaf
+ ETHERTYPE_VINESLOOP = 0xbae
+ ETHERTYPE_VITAL = 0xff00
+ ETHERTYPE_VLAN = 0x8100
+ ETHERTYPE_VLTLMAN = 0x8080
+ ETHERTYPE_VPROD = 0x805c
+ ETHERTYPE_VURESERVED = 0x8147
+ ETHERTYPE_WATERLOO = 0x8130
+ ETHERTYPE_WELLFLEET = 0x8103
+ ETHERTYPE_X25 = 0x805
+ ETHERTYPE_X75 = 0x801
+ ETHERTYPE_XNSSM = 0x9001
+ ETHERTYPE_XTP = 0x817d
+ ETHER_ADDR_LEN = 0x6
+ ETHER_ALIGN = 0x2
+ ETHER_CRC_LEN = 0x4
+ ETHER_CRC_POLY_BE = 0x4c11db6
+ ETHER_CRC_POLY_LE = 0xedb88320
+ ETHER_HDR_LEN = 0xe
+ ETHER_MAX_DIX_LEN = 0x600
+ ETHER_MAX_HARDMTU_LEN = 0xff9b
+ ETHER_MAX_LEN = 0x5ee
+ ETHER_MIN_LEN = 0x40
+ ETHER_TYPE_LEN = 0x2
+ ETHER_VLAN_ENCAP_LEN = 0x4
+ EVFILT_AIO = -0x3
+ EVFILT_DEVICE = -0x8
+ EVFILT_EXCEPT = -0x9
+ EVFILT_PROC = -0x5
+ EVFILT_READ = -0x1
+ EVFILT_SIGNAL = -0x6
+ EVFILT_SYSCOUNT = 0x9
+ EVFILT_TIMER = -0x7
+ EVFILT_VNODE = -0x4
+ EVFILT_WRITE = -0x2
+ EVL_ENCAPLEN = 0x4
+ EVL_PRIO_BITS = 0xd
+ EVL_PRIO_MAX = 0x7
+ EVL_VLID_MASK = 0xfff
+ EVL_VLID_MAX = 0xffe
+ EVL_VLID_MIN = 0x1
+ EVL_VLID_NULL = 0x0
+ EV_ADD = 0x1
+ EV_CLEAR = 0x20
+ EV_DELETE = 0x2
+ EV_DISABLE = 0x8
+ EV_DISPATCH = 0x80
+ EV_ENABLE = 0x4
+ EV_EOF = 0x8000
+ EV_ERROR = 0x4000
+ EV_FLAG1 = 0x2000
+ EV_ONESHOT = 0x10
+ EV_RECEIPT = 0x40
+ EV_SYSFLAGS = 0xf800
+ EXTA = 0x4b00
+ EXTB = 0x9600
+ EXTPROC = 0x800
+ FD_CLOEXEC = 0x1
+ FD_SETSIZE = 0x400
+ FLUSHO = 0x800000
+ F_DUPFD = 0x0
+ F_DUPFD_CLOEXEC = 0xa
+ F_GETFD = 0x1
+ F_GETFL = 0x3
+ F_GETLK = 0x7
+ F_GETOWN = 0x5
+ F_ISATTY = 0xb
+ F_OK = 0x0
+ F_RDLCK = 0x1
+ F_SETFD = 0x2
+ F_SETFL = 0x4
+ F_SETLK = 0x8
+ F_SETLKW = 0x9
+ F_SETOWN = 0x6
+ F_UNLCK = 0x2
+ F_WRLCK = 0x3
+ HUPCL = 0x4000
+ HW_MACHINE = 0x1
+ ICANON = 0x100
+ ICMP6_FILTER = 0x12
+ ICRNL = 0x100
+ IEXTEN = 0x400
+ IFAN_ARRIVAL = 0x0
+ IFAN_DEPARTURE = 0x1
+ IFF_ALLMULTI = 0x200
+ IFF_BROADCAST = 0x2
+ IFF_CANTCHANGE = 0x8e52
+ IFF_DEBUG = 0x4
+ IFF_LINK0 = 0x1000
+ IFF_LINK1 = 0x2000
+ IFF_LINK2 = 0x4000
+ IFF_LOOPBACK = 0x8
+ IFF_MULTICAST = 0x8000
+ IFF_NOARP = 0x80
+ IFF_OACTIVE = 0x400
+ IFF_POINTOPOINT = 0x10
+ IFF_PROMISC = 0x100
+ IFF_RUNNING = 0x40
+ IFF_SIMPLEX = 0x800
+ IFF_STATICARP = 0x20
+ IFF_UP = 0x1
+ IFNAMSIZ = 0x10
+ IFT_1822 = 0x2
+ IFT_A12MPPSWITCH = 0x82
+ IFT_AAL2 = 0xbb
+ IFT_AAL5 = 0x31
+ IFT_ADSL = 0x5e
+ IFT_AFLANE8023 = 0x3b
+ IFT_AFLANE8025 = 0x3c
+ IFT_ARAP = 0x58
+ IFT_ARCNET = 0x23
+ IFT_ARCNETPLUS = 0x24
+ IFT_ASYNC = 0x54
+ IFT_ATM = 0x25
+ IFT_ATMDXI = 0x69
+ IFT_ATMFUNI = 0x6a
+ IFT_ATMIMA = 0x6b
+ IFT_ATMLOGICAL = 0x50
+ IFT_ATMRADIO = 0xbd
+ IFT_ATMSUBINTERFACE = 0x86
+ IFT_ATMVCIENDPT = 0xc2
+ IFT_ATMVIRTUAL = 0x95
+ IFT_BGPPOLICYACCOUNTING = 0xa2
+ IFT_BLUETOOTH = 0xf8
+ IFT_BRIDGE = 0xd1
+ IFT_BSC = 0x53
+ IFT_CARP = 0xf7
+ IFT_CCTEMUL = 0x3d
+ IFT_CEPT = 0x13
+ IFT_CES = 0x85
+ IFT_CHANNEL = 0x46
+ IFT_CNR = 0x55
+ IFT_COFFEE = 0x84
+ IFT_COMPOSITELINK = 0x9b
+ IFT_DCN = 0x8d
+ IFT_DIGITALPOWERLINE = 0x8a
+ IFT_DIGITALWRAPPEROVERHEADCHANNEL = 0xba
+ IFT_DLSW = 0x4a
+ IFT_DOCSCABLEDOWNSTREAM = 0x80
+ IFT_DOCSCABLEMACLAYER = 0x7f
+ IFT_DOCSCABLEUPSTREAM = 0x81
+ IFT_DOCSCABLEUPSTREAMCHANNEL = 0xcd
+ IFT_DS0 = 0x51
+ IFT_DS0BUNDLE = 0x52
+ IFT_DS1FDL = 0xaa
+ IFT_DS3 = 0x1e
+ IFT_DTM = 0x8c
+ IFT_DUMMY = 0xf1
+ IFT_DVBASILN = 0xac
+ IFT_DVBASIOUT = 0xad
+ IFT_DVBRCCDOWNSTREAM = 0x93
+ IFT_DVBRCCMACLAYER = 0x92
+ IFT_DVBRCCUPSTREAM = 0x94
+ IFT_ECONET = 0xce
+ IFT_ENC = 0xf4
+ IFT_EON = 0x19
+ IFT_EPLRS = 0x57
+ IFT_ESCON = 0x49
+ IFT_ETHER = 0x6
+ IFT_FAITH = 0xf3
+ IFT_FAST = 0x7d
+ IFT_FASTETHER = 0x3e
+ IFT_FASTETHERFX = 0x45
+ IFT_FDDI = 0xf
+ IFT_FIBRECHANNEL = 0x38
+ IFT_FRAMERELAYINTERCONNECT = 0x3a
+ IFT_FRAMERELAYMPI = 0x5c
+ IFT_FRDLCIENDPT = 0xc1
+ IFT_FRELAY = 0x20
+ IFT_FRELAYDCE = 0x2c
+ IFT_FRF16MFRBUNDLE = 0xa3
+ IFT_FRFORWARD = 0x9e
+ IFT_G703AT2MB = 0x43
+ IFT_G703AT64K = 0x42
+ IFT_GIF = 0xf0
+ IFT_GIGABITETHERNET = 0x75
+ IFT_GR303IDT = 0xb2
+ IFT_GR303RDT = 0xb1
+ IFT_H323GATEKEEPER = 0xa4
+ IFT_H323PROXY = 0xa5
+ IFT_HDH1822 = 0x3
+ IFT_HDLC = 0x76
+ IFT_HDSL2 = 0xa8
+ IFT_HIPERLAN2 = 0xb7
+ IFT_HIPPI = 0x2f
+ IFT_HIPPIINTERFACE = 0x39
+ IFT_HOSTPAD = 0x5a
+ IFT_HSSI = 0x2e
+ IFT_HY = 0xe
+ IFT_IBM370PARCHAN = 0x48
+ IFT_IDSL = 0x9a
+ IFT_IEEE1394 = 0x90
+ IFT_IEEE80211 = 0x47
+ IFT_IEEE80212 = 0x37
+ IFT_IEEE8023ADLAG = 0xa1
+ IFT_IFGSN = 0x91
+ IFT_IMT = 0xbe
+ IFT_INFINIBAND = 0xc7
+ IFT_INTERLEAVE = 0x7c
+ IFT_IP = 0x7e
+ IFT_IPFORWARD = 0x8e
+ IFT_IPOVERATM = 0x72
+ IFT_IPOVERCDLC = 0x6d
+ IFT_IPOVERCLAW = 0x6e
+ IFT_IPSWITCH = 0x4e
+ IFT_ISDN = 0x3f
+ IFT_ISDNBASIC = 0x14
+ IFT_ISDNPRIMARY = 0x15
+ IFT_ISDNS = 0x4b
+ IFT_ISDNU = 0x4c
+ IFT_ISO88022LLC = 0x29
+ IFT_ISO88023 = 0x7
+ IFT_ISO88024 = 0x8
+ IFT_ISO88025 = 0x9
+ IFT_ISO88025CRFPINT = 0x62
+ IFT_ISO88025DTR = 0x56
+ IFT_ISO88025FIBER = 0x73
+ IFT_ISO88026 = 0xa
+ IFT_ISUP = 0xb3
+ IFT_L2VLAN = 0x87
+ IFT_L3IPVLAN = 0x88
+ IFT_L3IPXVLAN = 0x89
+ IFT_LAPB = 0x10
+ IFT_LAPD = 0x4d
+ IFT_LAPF = 0x77
+ IFT_LINEGROUP = 0xd2
+ IFT_LOCALTALK = 0x2a
+ IFT_LOOP = 0x18
+ IFT_MBIM = 0xfa
+ IFT_MEDIAMAILOVERIP = 0x8b
+ IFT_MFSIGLINK = 0xa7
+ IFT_MIOX25 = 0x26
+ IFT_MODEM = 0x30
+ IFT_MPC = 0x71
+ IFT_MPLS = 0xa6
+ IFT_MPLSTUNNEL = 0x96
+ IFT_MSDSL = 0x8f
+ IFT_MVL = 0xbf
+ IFT_MYRINET = 0x63
+ IFT_NFAS = 0xaf
+ IFT_NSIP = 0x1b
+ IFT_OPTICALCHANNEL = 0xc3
+ IFT_OPTICALTRANSPORT = 0xc4
+ IFT_OTHER = 0x1
+ IFT_P10 = 0xc
+ IFT_P80 = 0xd
+ IFT_PARA = 0x22
+ IFT_PFLOG = 0xf5
+ IFT_PFLOW = 0xf9
+ IFT_PFSYNC = 0xf6
+ IFT_PLC = 0xae
+ IFT_PON155 = 0xcf
+ IFT_PON622 = 0xd0
+ IFT_POS = 0xab
+ IFT_PPP = 0x17
+ IFT_PPPMULTILINKBUNDLE = 0x6c
+ IFT_PROPATM = 0xc5
+ IFT_PROPBWAP2MP = 0xb8
+ IFT_PROPCNLS = 0x59
+ IFT_PROPDOCSWIRELESSDOWNSTREAM = 0xb5
+ IFT_PROPDOCSWIRELESSMACLAYER = 0xb4
+ IFT_PROPDOCSWIRELESSUPSTREAM = 0xb6
+ IFT_PROPMUX = 0x36
+ IFT_PROPVIRTUAL = 0x35
+ IFT_PROPWIRELESSP2P = 0x9d
+ IFT_PTPSERIAL = 0x16
+ IFT_PVC = 0xf2
+ IFT_Q2931 = 0xc9
+ IFT_QLLC = 0x44
+ IFT_RADIOMAC = 0xbc
+ IFT_RADSL = 0x5f
+ IFT_REACHDSL = 0xc0
+ IFT_RFC1483 = 0x9f
+ IFT_RS232 = 0x21
+ IFT_RSRB = 0x4f
+ IFT_SDLC = 0x11
+ IFT_SDSL = 0x60
+ IFT_SHDSL = 0xa9
+ IFT_SIP = 0x1f
+ IFT_SIPSIG = 0xcc
+ IFT_SIPTG = 0xcb
+ IFT_SLIP = 0x1c
+ IFT_SMDSDXI = 0x2b
+ IFT_SMDSICIP = 0x34
+ IFT_SONET = 0x27
+ IFT_SONETOVERHEADCHANNEL = 0xb9
+ IFT_SONETPATH = 0x32
+ IFT_SONETVT = 0x33
+ IFT_SRP = 0x97
+ IFT_SS7SIGLINK = 0x9c
+ IFT_STACKTOSTACK = 0x6f
+ IFT_STARLAN = 0xb
+ IFT_T1 = 0x12
+ IFT_TDLC = 0x74
+ IFT_TELINK = 0xc8
+ IFT_TERMPAD = 0x5b
+ IFT_TR008 = 0xb0
+ IFT_TRANSPHDLC = 0x7b
+ IFT_TUNNEL = 0x83
+ IFT_ULTRA = 0x1d
+ IFT_USB = 0xa0
+ IFT_V11 = 0x40
+ IFT_V35 = 0x2d
+ IFT_V36 = 0x41
+ IFT_V37 = 0x78
+ IFT_VDSL = 0x61
+ IFT_VIRTUALIPADDRESS = 0x70
+ IFT_VIRTUALTG = 0xca
+ IFT_VOICEDID = 0xd5
+ IFT_VOICEEM = 0x64
+ IFT_VOICEEMFGD = 0xd3
+ IFT_VOICEENCAP = 0x67
+ IFT_VOICEFGDEANA = 0xd4
+ IFT_VOICEFXO = 0x65
+ IFT_VOICEFXS = 0x66
+ IFT_VOICEOVERATM = 0x98
+ IFT_VOICEOVERCABLE = 0xc6
+ IFT_VOICEOVERFRAMERELAY = 0x99
+ IFT_VOICEOVERIP = 0x68
+ IFT_WIREGUARD = 0xfb
+ IFT_X213 = 0x5d
+ IFT_X25 = 0x5
+ IFT_X25DDN = 0x4
+ IFT_X25HUNTGROUP = 0x7a
+ IFT_X25MLP = 0x79
+ IFT_X25PLE = 0x28
+ IFT_XETHER = 0x1a
+ IGNBRK = 0x1
+ IGNCR = 0x80
+ IGNPAR = 0x4
+ IMAXBEL = 0x2000
+ INLCR = 0x40
+ INPCK = 0x10
+ IN_CLASSA_HOST = 0xffffff
+ IN_CLASSA_MAX = 0x80
+ IN_CLASSA_NET = 0xff000000
+ IN_CLASSA_NSHIFT = 0x18
+ IN_CLASSB_HOST = 0xffff
+ IN_CLASSB_MAX = 0x10000
+ IN_CLASSB_NET = 0xffff0000
+ IN_CLASSB_NSHIFT = 0x10
+ IN_CLASSC_HOST = 0xff
+ IN_CLASSC_NET = 0xffffff00
+ IN_CLASSC_NSHIFT = 0x8
+ IN_CLASSD_HOST = 0xfffffff
+ IN_CLASSD_NET = 0xf0000000
+ IN_CLASSD_NSHIFT = 0x1c
+ IN_LOOPBACKNET = 0x7f
+ IN_RFC3021_HOST = 0x1
+ IN_RFC3021_NET = 0xfffffffe
+ IN_RFC3021_NSHIFT = 0x1f
+ IPPROTO_AH = 0x33
+ IPPROTO_CARP = 0x70
+ IPPROTO_DIVERT = 0x102
+ IPPROTO_DONE = 0x101
+ IPPROTO_DSTOPTS = 0x3c
+ IPPROTO_EGP = 0x8
+ IPPROTO_ENCAP = 0x62
+ IPPROTO_EON = 0x50
+ IPPROTO_ESP = 0x32
+ IPPROTO_ETHERIP = 0x61
+ IPPROTO_FRAGMENT = 0x2c
+ IPPROTO_GGP = 0x3
+ IPPROTO_GRE = 0x2f
+ IPPROTO_HOPOPTS = 0x0
+ IPPROTO_ICMP = 0x1
+ IPPROTO_ICMPV6 = 0x3a
+ IPPROTO_IDP = 0x16
+ IPPROTO_IGMP = 0x2
+ IPPROTO_IP = 0x0
+ IPPROTO_IPCOMP = 0x6c
+ IPPROTO_IPIP = 0x4
+ IPPROTO_IPV4 = 0x4
+ IPPROTO_IPV6 = 0x29
+ IPPROTO_MAX = 0x100
+ IPPROTO_MAXID = 0x103
+ IPPROTO_MOBILE = 0x37
+ IPPROTO_MPLS = 0x89
+ IPPROTO_NONE = 0x3b
+ IPPROTO_PFSYNC = 0xf0
+ IPPROTO_PIM = 0x67
+ IPPROTO_PUP = 0xc
+ IPPROTO_RAW = 0xff
+ IPPROTO_ROUTING = 0x2b
+ IPPROTO_RSVP = 0x2e
+ IPPROTO_SCTP = 0x84
+ IPPROTO_TCP = 0x6
+ IPPROTO_TP = 0x1d
+ IPPROTO_UDP = 0x11
+ IPPROTO_UDPLITE = 0x88
+ IPV6_AUTH_LEVEL = 0x35
+ IPV6_AUTOFLOWLABEL = 0x3b
+ IPV6_CHECKSUM = 0x1a
+ IPV6_DEFAULT_MULTICAST_HOPS = 0x1
+ IPV6_DEFAULT_MULTICAST_LOOP = 0x1
+ IPV6_DEFHLIM = 0x40
+ IPV6_DONTFRAG = 0x3e
+ IPV6_DSTOPTS = 0x32
+ IPV6_ESP_NETWORK_LEVEL = 0x37
+ IPV6_ESP_TRANS_LEVEL = 0x36
+ IPV6_FAITH = 0x1d
+ IPV6_FLOWINFO_MASK = 0xffffff0f
+ IPV6_FLOWLABEL_MASK = 0xffff0f00
+ IPV6_FRAGTTL = 0x78
+ IPV6_HLIMDEC = 0x1
+ IPV6_HOPLIMIT = 0x2f
+ IPV6_HOPOPTS = 0x31
+ IPV6_IPCOMP_LEVEL = 0x3c
+ IPV6_JOIN_GROUP = 0xc
+ IPV6_LEAVE_GROUP = 0xd
+ IPV6_MAXHLIM = 0xff
+ IPV6_MAXPACKET = 0xffff
+ IPV6_MINHOPCOUNT = 0x41
+ IPV6_MMTU = 0x500
+ IPV6_MULTICAST_HOPS = 0xa
+ IPV6_MULTICAST_IF = 0x9
+ IPV6_MULTICAST_LOOP = 0xb
+ IPV6_NEXTHOP = 0x30
+ IPV6_OPTIONS = 0x1
+ IPV6_PATHMTU = 0x2c
+ IPV6_PIPEX = 0x3f
+ IPV6_PKTINFO = 0x2e
+ IPV6_PORTRANGE = 0xe
+ IPV6_PORTRANGE_DEFAULT = 0x0
+ IPV6_PORTRANGE_HIGH = 0x1
+ IPV6_PORTRANGE_LOW = 0x2
+ IPV6_RECVDSTOPTS = 0x28
+ IPV6_RECVDSTPORT = 0x40
+ IPV6_RECVHOPLIMIT = 0x25
+ IPV6_RECVHOPOPTS = 0x27
+ IPV6_RECVPATHMTU = 0x2b
+ IPV6_RECVPKTINFO = 0x24
+ IPV6_RECVRTHDR = 0x26
+ IPV6_RECVTCLASS = 0x39
+ IPV6_RTABLE = 0x1021
+ IPV6_RTHDR = 0x33
+ IPV6_RTHDRDSTOPTS = 0x23
+ IPV6_RTHDR_LOOSE = 0x0
+ IPV6_RTHDR_STRICT = 0x1
+ IPV6_RTHDR_TYPE_0 = 0x0
+ IPV6_SOCKOPT_RESERVED1 = 0x3
+ IPV6_TCLASS = 0x3d
+ IPV6_UNICAST_HOPS = 0x4
+ IPV6_USE_MIN_MTU = 0x2a
+ IPV6_V6ONLY = 0x1b
+ IPV6_VERSION = 0x60
+ IPV6_VERSION_MASK = 0xf0
+ IP_ADD_MEMBERSHIP = 0xc
+ IP_AUTH_LEVEL = 0x14
+ IP_DEFAULT_MULTICAST_LOOP = 0x1
+ IP_DEFAULT_MULTICAST_TTL = 0x1
+ IP_DF = 0x4000
+ IP_DROP_MEMBERSHIP = 0xd
+ IP_ESP_NETWORK_LEVEL = 0x16
+ IP_ESP_TRANS_LEVEL = 0x15
+ IP_HDRINCL = 0x2
+ IP_IPCOMP_LEVEL = 0x1d
+ IP_IPDEFTTL = 0x25
+ IP_IPSECFLOWINFO = 0x24
+ IP_IPSEC_LOCAL_AUTH = 0x1b
+ IP_IPSEC_LOCAL_CRED = 0x19
+ IP_IPSEC_LOCAL_ID = 0x17
+ IP_IPSEC_REMOTE_AUTH = 0x1c
+ IP_IPSEC_REMOTE_CRED = 0x1a
+ IP_IPSEC_REMOTE_ID = 0x18
+ IP_MAXPACKET = 0xffff
+ IP_MAX_MEMBERSHIPS = 0xfff
+ IP_MF = 0x2000
+ IP_MINTTL = 0x20
+ IP_MIN_MEMBERSHIPS = 0xf
+ IP_MSS = 0x240
+ IP_MULTICAST_IF = 0x9
+ IP_MULTICAST_LOOP = 0xb
+ IP_MULTICAST_TTL = 0xa
+ IP_OFFMASK = 0x1fff
+ IP_OPTIONS = 0x1
+ IP_PIPEX = 0x22
+ IP_PORTRANGE = 0x13
+ IP_PORTRANGE_DEFAULT = 0x0
+ IP_PORTRANGE_HIGH = 0x1
+ IP_PORTRANGE_LOW = 0x2
+ IP_RECVDSTADDR = 0x7
+ IP_RECVDSTPORT = 0x21
+ IP_RECVIF = 0x1e
+ IP_RECVOPTS = 0x5
+ IP_RECVRETOPTS = 0x6
+ IP_RECVRTABLE = 0x23
+ IP_RECVTTL = 0x1f
+ IP_RETOPTS = 0x8
+ IP_RF = 0x8000
+ IP_RTABLE = 0x1021
+ IP_SENDSRCADDR = 0x7
+ IP_TOS = 0x3
+ IP_TTL = 0x4
+ ISIG = 0x80
+ ISTRIP = 0x20
+ ITIMER_PROF = 0x2
+ ITIMER_REAL = 0x0
+ ITIMER_VIRTUAL = 0x1
+ IUCLC = 0x1000
+ IXANY = 0x800
+ IXOFF = 0x400
+ IXON = 0x200
+ KERN_HOSTNAME = 0xa
+ KERN_OSRELEASE = 0x2
+ KERN_OSTYPE = 0x1
+ KERN_VERSION = 0x4
+ LCNT_OVERLOAD_FLUSH = 0x6
+ LOCK_EX = 0x2
+ LOCK_NB = 0x4
+ LOCK_SH = 0x1
+ LOCK_UN = 0x8
+ MADV_DONTNEED = 0x4
+ MADV_FREE = 0x6
+ MADV_NORMAL = 0x0
+ MADV_RANDOM = 0x1
+ MADV_SEQUENTIAL = 0x2
+ MADV_SPACEAVAIL = 0x5
+ MADV_WILLNEED = 0x3
+ MAP_ANON = 0x1000
+ MAP_ANONYMOUS = 0x1000
+ MAP_CONCEAL = 0x8000
+ MAP_COPY = 0x2
+ MAP_FILE = 0x0
+ MAP_FIXED = 0x10
+ MAP_FLAGMASK = 0xfff7
+ MAP_HASSEMAPHORE = 0x0
+ MAP_INHERIT = 0x0
+ MAP_INHERIT_COPY = 0x1
+ MAP_INHERIT_NONE = 0x2
+ MAP_INHERIT_SHARE = 0x0
+ MAP_INHERIT_ZERO = 0x3
+ MAP_NOEXTEND = 0x0
+ MAP_NORESERVE = 0x0
+ MAP_PRIVATE = 0x2
+ MAP_RENAME = 0x0
+ MAP_SHARED = 0x1
+ MAP_STACK = 0x4000
+ MAP_TRYFIXED = 0x0
+ MCL_CURRENT = 0x1
+ MCL_FUTURE = 0x2
+ MNT_ASYNC = 0x40
+ MNT_DEFEXPORTED = 0x200
+ MNT_DELEXPORT = 0x20000
+ MNT_DOOMED = 0x8000000
+ MNT_EXPORTANON = 0x400
+ MNT_EXPORTED = 0x100
+ MNT_EXRDONLY = 0x80
+ MNT_FORCE = 0x80000
+ MNT_LAZY = 0x3
+ MNT_LOCAL = 0x1000
+ MNT_NOATIME = 0x8000
+ MNT_NODEV = 0x10
+ MNT_NOEXEC = 0x4
+ MNT_NOPERM = 0x20
+ MNT_NOSUID = 0x8
+ MNT_NOWAIT = 0x2
+ MNT_QUOTA = 0x2000
+ MNT_RDONLY = 0x1
+ MNT_RELOAD = 0x40000
+ MNT_ROOTFS = 0x4000
+ MNT_SOFTDEP = 0x4000000
+ MNT_STALLED = 0x100000
+ MNT_SWAPPABLE = 0x200000
+ MNT_SYNCHRONOUS = 0x2
+ MNT_UPDATE = 0x10000
+ MNT_VISFLAGMASK = 0x400ffff
+ MNT_WAIT = 0x1
+ MNT_WANTRDWR = 0x2000000
+ MNT_WXALLOWED = 0x800
+ MOUNT_AFS = "afs"
+ MOUNT_CD9660 = "cd9660"
+ MOUNT_EXT2FS = "ext2fs"
+ MOUNT_FFS = "ffs"
+ MOUNT_FUSEFS = "fuse"
+ MOUNT_MFS = "mfs"
+ MOUNT_MSDOS = "msdos"
+ MOUNT_NCPFS = "ncpfs"
+ MOUNT_NFS = "nfs"
+ MOUNT_NTFS = "ntfs"
+ MOUNT_TMPFS = "tmpfs"
+ MOUNT_UDF = "udf"
+ MOUNT_UFS = "ffs"
+ MSG_BCAST = 0x100
+ MSG_CMSG_CLOEXEC = 0x800
+ MSG_CTRUNC = 0x20
+ MSG_DONTROUTE = 0x4
+ MSG_DONTWAIT = 0x80
+ MSG_EOR = 0x8
+ MSG_MCAST = 0x200
+ MSG_NOSIGNAL = 0x400
+ MSG_OOB = 0x1
+ MSG_PEEK = 0x2
+ MSG_TRUNC = 0x10
+ MSG_WAITALL = 0x40
+ MS_ASYNC = 0x1
+ MS_INVALIDATE = 0x4
+ MS_SYNC = 0x2
+ NAME_MAX = 0xff
+ NET_RT_DUMP = 0x1
+ NET_RT_FLAGS = 0x2
+ NET_RT_IFLIST = 0x3
+ NET_RT_IFNAMES = 0x6
+ NET_RT_MAXID = 0x8
+ NET_RT_SOURCE = 0x7
+ NET_RT_STATS = 0x4
+ NET_RT_TABLE = 0x5
+ NFDBITS = 0x20
+ NOFLSH = 0x80000000
+ NOKERNINFO = 0x2000000
+ NOTE_ATTRIB = 0x8
+ NOTE_CHANGE = 0x1
+ NOTE_CHILD = 0x4
+ NOTE_DELETE = 0x1
+ NOTE_EOF = 0x2
+ NOTE_EXEC = 0x20000000
+ NOTE_EXIT = 0x80000000
+ NOTE_EXTEND = 0x4
+ NOTE_FORK = 0x40000000
+ NOTE_LINK = 0x10
+ NOTE_LOWAT = 0x1
+ NOTE_OOB = 0x4
+ NOTE_PCTRLMASK = 0xf0000000
+ NOTE_PDATAMASK = 0xfffff
+ NOTE_RENAME = 0x20
+ NOTE_REVOKE = 0x40
+ NOTE_TRACK = 0x1
+ NOTE_TRACKERR = 0x2
+ NOTE_TRUNCATE = 0x80
+ NOTE_WRITE = 0x2
+ OCRNL = 0x10
+ OLCUC = 0x20
+ ONLCR = 0x2
+ ONLRET = 0x80
+ ONOCR = 0x40
+ ONOEOT = 0x8
+ OPOST = 0x1
+ OXTABS = 0x4
+ O_ACCMODE = 0x3
+ O_APPEND = 0x8
+ O_ASYNC = 0x40
+ O_CLOEXEC = 0x10000
+ O_CREAT = 0x200
+ O_DIRECTORY = 0x20000
+ O_DSYNC = 0x80
+ O_EXCL = 0x800
+ O_EXLOCK = 0x20
+ O_FSYNC = 0x80
+ O_NDELAY = 0x4
+ O_NOCTTY = 0x8000
+ O_NOFOLLOW = 0x100
+ O_NONBLOCK = 0x4
+ O_RDONLY = 0x0
+ O_RDWR = 0x2
+ O_RSYNC = 0x80
+ O_SHLOCK = 0x10
+ O_SYNC = 0x80
+ O_TRUNC = 0x400
+ O_WRONLY = 0x1
+ PARENB = 0x1000
+ PARMRK = 0x8
+ PARODD = 0x2000
+ PENDIN = 0x20000000
+ PF_FLUSH = 0x1
+ PRIO_PGRP = 0x1
+ PRIO_PROCESS = 0x0
+ PRIO_USER = 0x2
+ PROT_EXEC = 0x4
+ PROT_NONE = 0x0
+ PROT_READ = 0x1
+ PROT_WRITE = 0x2
+ RLIMIT_CORE = 0x4
+ RLIMIT_CPU = 0x0
+ RLIMIT_DATA = 0x2
+ RLIMIT_FSIZE = 0x1
+ RLIMIT_MEMLOCK = 0x6
+ RLIMIT_NOFILE = 0x8
+ RLIMIT_NPROC = 0x7
+ RLIMIT_RSS = 0x5
+ RLIMIT_STACK = 0x3
+ RLIM_INFINITY = 0x7fffffffffffffff
+ RTAX_AUTHOR = 0x6
+ RTAX_BFD = 0xb
+ RTAX_BRD = 0x7
+ RTAX_DNS = 0xc
+ RTAX_DST = 0x0
+ RTAX_GATEWAY = 0x1
+ RTAX_GENMASK = 0x3
+ RTAX_IFA = 0x5
+ RTAX_IFP = 0x4
+ RTAX_LABEL = 0xa
+ RTAX_MAX = 0xf
+ RTAX_NETMASK = 0x2
+ RTAX_SEARCH = 0xe
+ RTAX_SRC = 0x8
+ RTAX_SRCMASK = 0x9
+ RTAX_STATIC = 0xd
+ RTA_AUTHOR = 0x40
+ RTA_BFD = 0x800
+ RTA_BRD = 0x80
+ RTA_DNS = 0x1000
+ RTA_DST = 0x1
+ RTA_GATEWAY = 0x2
+ RTA_GENMASK = 0x8
+ RTA_IFA = 0x20
+ RTA_IFP = 0x10
+ RTA_LABEL = 0x400
+ RTA_NETMASK = 0x4
+ RTA_SEARCH = 0x4000
+ RTA_SRC = 0x100
+ RTA_SRCMASK = 0x200
+ RTA_STATIC = 0x2000
+ RTF_ANNOUNCE = 0x4000
+ RTF_BFD = 0x1000000
+ RTF_BLACKHOLE = 0x1000
+ RTF_BROADCAST = 0x400000
+ RTF_CACHED = 0x20000
+ RTF_CLONED = 0x10000
+ RTF_CLONING = 0x100
+ RTF_CONNECTED = 0x800000
+ RTF_DONE = 0x40
+ RTF_DYNAMIC = 0x10
+ RTF_FMASK = 0x110fc08
+ RTF_GATEWAY = 0x2
+ RTF_HOST = 0x4
+ RTF_LLINFO = 0x400
+ RTF_LOCAL = 0x200000
+ RTF_MODIFIED = 0x20
+ RTF_MPATH = 0x40000
+ RTF_MPLS = 0x100000
+ RTF_MULTICAST = 0x200
+ RTF_PERMANENT_ARP = 0x2000
+ RTF_PROTO1 = 0x8000
+ RTF_PROTO2 = 0x4000
+ RTF_PROTO3 = 0x2000
+ RTF_REJECT = 0x8
+ RTF_STATIC = 0x800
+ RTF_UP = 0x1
+ RTF_USETRAILERS = 0x8000
+ RTM_80211INFO = 0x15
+ RTM_ADD = 0x1
+ RTM_BFD = 0x12
+ RTM_CHANGE = 0x3
+ RTM_CHGADDRATTR = 0x14
+ RTM_DELADDR = 0xd
+ RTM_DELETE = 0x2
+ RTM_DESYNC = 0x10
+ RTM_GET = 0x4
+ RTM_IFANNOUNCE = 0xf
+ RTM_IFINFO = 0xe
+ RTM_INVALIDATE = 0x11
+ RTM_LOSING = 0x5
+ RTM_MAXSIZE = 0x800
+ RTM_MISS = 0x7
+ RTM_NEWADDR = 0xc
+ RTM_PROPOSAL = 0x13
+ RTM_REDIRECT = 0x6
+ RTM_RESOLVE = 0xb
+ RTM_SOURCE = 0x16
+ RTM_VERSION = 0x5
+ RTV_EXPIRE = 0x4
+ RTV_HOPCOUNT = 0x2
+ RTV_MTU = 0x1
+ RTV_RPIPE = 0x8
+ RTV_RTT = 0x40
+ RTV_RTTVAR = 0x80
+ RTV_SPIPE = 0x10
+ RTV_SSTHRESH = 0x20
+ RT_TABLEID_BITS = 0x8
+ RT_TABLEID_MASK = 0xff
+ RT_TABLEID_MAX = 0xff
+ RUSAGE_CHILDREN = -0x1
+ RUSAGE_SELF = 0x0
+ RUSAGE_THREAD = 0x1
+ SCM_RIGHTS = 0x1
+ SCM_TIMESTAMP = 0x4
+ SEEK_CUR = 0x1
+ SEEK_END = 0x2
+ SEEK_SET = 0x0
+ SHUT_RD = 0x0
+ SHUT_RDWR = 0x2
+ SHUT_WR = 0x1
+ SIOCADDMULTI = 0x80206931
+ SIOCAIFADDR = 0x8040691a
+ SIOCAIFGROUP = 0x80286987
+ SIOCATMARK = 0x40047307
+ SIOCBRDGADD = 0x8060693c
+ SIOCBRDGADDL = 0x80606949
+ SIOCBRDGADDS = 0x80606941
+ SIOCBRDGARL = 0x808c694d
+ SIOCBRDGDADDR = 0x81286947
+ SIOCBRDGDEL = 0x8060693d
+ SIOCBRDGDELS = 0x80606942
+ SIOCBRDGFLUSH = 0x80606948
+ SIOCBRDGFRL = 0x808c694e
+ SIOCBRDGGCACHE = 0xc0146941
+ SIOCBRDGGFD = 0xc0146952
+ SIOCBRDGGHT = 0xc0146951
+ SIOCBRDGGIFFLGS = 0xc060693e
+ SIOCBRDGGMA = 0xc0146953
+ SIOCBRDGGPARAM = 0xc0406958
+ SIOCBRDGGPRI = 0xc0146950
+ SIOCBRDGGRL = 0xc030694f
+ SIOCBRDGGTO = 0xc0146946
+ SIOCBRDGIFS = 0xc0606942
+ SIOCBRDGRTS = 0xc0206943
+ SIOCBRDGSADDR = 0xc1286944
+ SIOCBRDGSCACHE = 0x80146940
+ SIOCBRDGSFD = 0x80146952
+ SIOCBRDGSHT = 0x80146951
+ SIOCBRDGSIFCOST = 0x80606955
+ SIOCBRDGSIFFLGS = 0x8060693f
+ SIOCBRDGSIFPRIO = 0x80606954
+ SIOCBRDGSIFPROT = 0x8060694a
+ SIOCBRDGSMA = 0x80146953
+ SIOCBRDGSPRI = 0x80146950
+ SIOCBRDGSPROTO = 0x8014695a
+ SIOCBRDGSTO = 0x80146945
+ SIOCBRDGSTXHC = 0x80146959
+ SIOCDELLABEL = 0x80206997
+ SIOCDELMULTI = 0x80206932
+ SIOCDIFADDR = 0x80206919
+ SIOCDIFGROUP = 0x80286989
+ SIOCDIFPARENT = 0x802069b4
+ SIOCDIFPHYADDR = 0x80206949
+ SIOCDPWE3NEIGHBOR = 0x802069de
+ SIOCDVNETID = 0x802069af
+ SIOCGETKALIVE = 0xc01869a4
+ SIOCGETLABEL = 0x8020699a
+ SIOCGETMPWCFG = 0xc02069ae
+ SIOCGETPFLOW = 0xc02069fe
+ SIOCGETPFSYNC = 0xc02069f8
+ SIOCGETSGCNT = 0xc0207534
+ SIOCGETVIFCNT = 0xc0287533
+ SIOCGETVLAN = 0xc0206990
+ SIOCGIFADDR = 0xc0206921
+ SIOCGIFBRDADDR = 0xc0206923
+ SIOCGIFCONF = 0xc0106924
+ SIOCGIFDATA = 0xc020691b
+ SIOCGIFDESCR = 0xc0206981
+ SIOCGIFDSTADDR = 0xc0206922
+ SIOCGIFFLAGS = 0xc0206911
+ SIOCGIFGATTR = 0xc028698b
+ SIOCGIFGENERIC = 0xc020693a
+ SIOCGIFGLIST = 0xc028698d
+ SIOCGIFGMEMB = 0xc028698a
+ SIOCGIFGROUP = 0xc0286988
+ SIOCGIFHARDMTU = 0xc02069a5
+ SIOCGIFLLPRIO = 0xc02069b6
+ SIOCGIFMEDIA = 0xc0406938
+ SIOCGIFMETRIC = 0xc0206917
+ SIOCGIFMTU = 0xc020697e
+ SIOCGIFNETMASK = 0xc0206925
+ SIOCGIFPAIR = 0xc02069b1
+ SIOCGIFPARENT = 0xc02069b3
+ SIOCGIFPRIORITY = 0xc020699c
+ SIOCGIFRDOMAIN = 0xc02069a0
+ SIOCGIFRTLABEL = 0xc0206983
+ SIOCGIFRXR = 0x802069aa
+ SIOCGIFSFFPAGE = 0xc1126939
+ SIOCGIFXFLAGS = 0xc020699e
+ SIOCGLIFPHYADDR = 0xc218694b
+ SIOCGLIFPHYDF = 0xc02069c2
+ SIOCGLIFPHYECN = 0xc02069c8
+ SIOCGLIFPHYRTABLE = 0xc02069a2
+ SIOCGLIFPHYTTL = 0xc02069a9
+ SIOCGPGRP = 0x40047309
+ SIOCGPWE3 = 0xc0206998
+ SIOCGPWE3CTRLWORD = 0xc02069dc
+ SIOCGPWE3FAT = 0xc02069dd
+ SIOCGPWE3NEIGHBOR = 0xc21869de
+ SIOCGRXHPRIO = 0xc02069db
+ SIOCGSPPPPARAMS = 0xc0206994
+ SIOCGTXHPRIO = 0xc02069c6
+ SIOCGUMBINFO = 0xc02069be
+ SIOCGUMBPARAM = 0xc02069c0
+ SIOCGVH = 0xc02069f6
+ SIOCGVNETFLOWID = 0xc02069c4
+ SIOCGVNETID = 0xc02069a7
+ SIOCIFAFATTACH = 0x801169ab
+ SIOCIFAFDETACH = 0x801169ac
+ SIOCIFCREATE = 0x8020697a
+ SIOCIFDESTROY = 0x80206979
+ SIOCIFGCLONERS = 0xc0106978
+ SIOCSETKALIVE = 0x801869a3
+ SIOCSETLABEL = 0x80206999
+ SIOCSETMPWCFG = 0x802069ad
+ SIOCSETPFLOW = 0x802069fd
+ SIOCSETPFSYNC = 0x802069f7
+ SIOCSETVLAN = 0x8020698f
+ SIOCSIFADDR = 0x8020690c
+ SIOCSIFBRDADDR = 0x80206913
+ SIOCSIFDESCR = 0x80206980
+ SIOCSIFDSTADDR = 0x8020690e
+ SIOCSIFFLAGS = 0x80206910
+ SIOCSIFGATTR = 0x8028698c
+ SIOCSIFGENERIC = 0x80206939
+ SIOCSIFLLADDR = 0x8020691f
+ SIOCSIFLLPRIO = 0x802069b5
+ SIOCSIFMEDIA = 0xc0206937
+ SIOCSIFMETRIC = 0x80206918
+ SIOCSIFMTU = 0x8020697f
+ SIOCSIFNETMASK = 0x80206916
+ SIOCSIFPAIR = 0x802069b0
+ SIOCSIFPARENT = 0x802069b2
+ SIOCSIFPRIORITY = 0x8020699b
+ SIOCSIFRDOMAIN = 0x8020699f
+ SIOCSIFRTLABEL = 0x80206982
+ SIOCSIFXFLAGS = 0x8020699d
+ SIOCSLIFPHYADDR = 0x8218694a
+ SIOCSLIFPHYDF = 0x802069c1
+ SIOCSLIFPHYECN = 0x802069c7
+ SIOCSLIFPHYRTABLE = 0x802069a1
+ SIOCSLIFPHYTTL = 0x802069a8
+ SIOCSPGRP = 0x80047308
+ SIOCSPWE3CTRLWORD = 0x802069dc
+ SIOCSPWE3FAT = 0x802069dd
+ SIOCSPWE3NEIGHBOR = 0x821869de
+ SIOCSRXHPRIO = 0x802069db
+ SIOCSSPPPPARAMS = 0x80206993
+ SIOCSTXHPRIO = 0x802069c5
+ SIOCSUMBPARAM = 0x802069bf
+ SIOCSVH = 0xc02069f5
+ SIOCSVNETFLOWID = 0x802069c3
+ SIOCSVNETID = 0x802069a6
+ SOCK_CLOEXEC = 0x8000
+ SOCK_DGRAM = 0x2
+ SOCK_DNS = 0x1000
+ SOCK_NONBLOCK = 0x4000
+ SOCK_RAW = 0x3
+ SOCK_RDM = 0x4
+ SOCK_SEQPACKET = 0x5
+ SOCK_STREAM = 0x1
+ SOL_SOCKET = 0xffff
+ SOMAXCONN = 0x80
+ SO_ACCEPTCONN = 0x2
+ SO_BINDANY = 0x1000
+ SO_BROADCAST = 0x20
+ SO_DEBUG = 0x1
+ SO_DOMAIN = 0x1024
+ SO_DONTROUTE = 0x10
+ SO_ERROR = 0x1007
+ SO_KEEPALIVE = 0x8
+ SO_LINGER = 0x80
+ SO_NETPROC = 0x1020
+ SO_OOBINLINE = 0x100
+ SO_PEERCRED = 0x1022
+ SO_PROTOCOL = 0x1025
+ SO_RCVBUF = 0x1002
+ SO_RCVLOWAT = 0x1004
+ SO_RCVTIMEO = 0x1006
+ SO_REUSEADDR = 0x4
+ SO_REUSEPORT = 0x200
+ SO_RTABLE = 0x1021
+ SO_SNDBUF = 0x1001
+ SO_SNDLOWAT = 0x1003
+ SO_SNDTIMEO = 0x1005
+ SO_SPLICE = 0x1023
+ SO_TIMESTAMP = 0x800
+ SO_TYPE = 0x1008
+ SO_USELOOPBACK = 0x40
+ SO_ZEROIZE = 0x2000
+ S_BLKSIZE = 0x200
+ S_IEXEC = 0x40
+ S_IFBLK = 0x6000
+ S_IFCHR = 0x2000
+ S_IFDIR = 0x4000
+ S_IFIFO = 0x1000
+ S_IFLNK = 0xa000
+ S_IFMT = 0xf000
+ S_IFREG = 0x8000
+ S_IFSOCK = 0xc000
+ S_IREAD = 0x100
+ S_IRGRP = 0x20
+ S_IROTH = 0x4
+ S_IRUSR = 0x100
+ S_IRWXG = 0x38
+ S_IRWXO = 0x7
+ S_IRWXU = 0x1c0
+ S_ISGID = 0x400
+ S_ISTXT = 0x200
+ S_ISUID = 0x800
+ S_ISVTX = 0x200
+ S_IWGRP = 0x10
+ S_IWOTH = 0x2
+ S_IWRITE = 0x80
+ S_IWUSR = 0x80
+ S_IXGRP = 0x8
+ S_IXOTH = 0x1
+ S_IXUSR = 0x40
+ TCIFLUSH = 0x1
+ TCIOFF = 0x3
+ TCIOFLUSH = 0x3
+ TCION = 0x4
+ TCOFLUSH = 0x2
+ TCOOFF = 0x1
+ TCOON = 0x2
+ TCPOPT_EOL = 0x0
+ TCPOPT_MAXSEG = 0x2
+ TCPOPT_NOP = 0x1
+ TCPOPT_SACK = 0x5
+ TCPOPT_SACK_HDR = 0x1010500
+ TCPOPT_SACK_PERMITTED = 0x4
+ TCPOPT_SACK_PERMIT_HDR = 0x1010402
+ TCPOPT_SIGNATURE = 0x13
+ TCPOPT_TIMESTAMP = 0x8
+ TCPOPT_TSTAMP_HDR = 0x101080a
+ TCPOPT_WINDOW = 0x3
+ TCP_INFO = 0x9
+ TCP_MAXSEG = 0x2
+ TCP_MAXWIN = 0xffff
+ TCP_MAX_SACK = 0x3
+ TCP_MAX_WINSHIFT = 0xe
+ TCP_MD5SIG = 0x4
+ TCP_MSS = 0x200
+ TCP_NODELAY = 0x1
+ TCP_NOPUSH = 0x10
+ TCP_SACKHOLE_LIMIT = 0x80
+ TCP_SACK_ENABLE = 0x8
+ TCSAFLUSH = 0x2
+ TIMER_ABSTIME = 0x1
+ TIMER_RELTIME = 0x0
+ TIOCCBRK = 0x2000747a
+ TIOCCDTR = 0x20007478
+ TIOCCHKVERAUTH = 0x2000741e
+ TIOCCLRVERAUTH = 0x2000741d
+ TIOCCONS = 0x80047462
+ TIOCDRAIN = 0x2000745e
+ TIOCEXCL = 0x2000740d
+ TIOCEXT = 0x80047460
+ TIOCFLAG_CLOCAL = 0x2
+ TIOCFLAG_CRTSCTS = 0x4
+ TIOCFLAG_MDMBUF = 0x8
+ TIOCFLAG_PPS = 0x10
+ TIOCFLAG_SOFTCAR = 0x1
+ TIOCFLUSH = 0x80047410
+ TIOCGETA = 0x402c7413
+ TIOCGETD = 0x4004741a
+ TIOCGFLAGS = 0x4004745d
+ TIOCGPGRP = 0x40047477
+ TIOCGSID = 0x40047463
+ TIOCGTSTAMP = 0x4010745b
+ TIOCGWINSZ = 0x40087468
+ TIOCMBIC = 0x8004746b
+ TIOCMBIS = 0x8004746c
+ TIOCMGET = 0x4004746a
+ TIOCMODG = 0x4004746a
+ TIOCMODS = 0x8004746d
+ TIOCMSET = 0x8004746d
+ TIOCM_CAR = 0x40
+ TIOCM_CD = 0x40
+ TIOCM_CTS = 0x20
+ TIOCM_DSR = 0x100
+ TIOCM_DTR = 0x2
+ TIOCM_LE = 0x1
+ TIOCM_RI = 0x80
+ TIOCM_RNG = 0x80
+ TIOCM_RTS = 0x4
+ TIOCM_SR = 0x10
+ TIOCM_ST = 0x8
+ TIOCNOTTY = 0x20007471
+ TIOCNXCL = 0x2000740e
+ TIOCOUTQ = 0x40047473
+ TIOCPKT = 0x80047470
+ TIOCPKT_DATA = 0x0
+ TIOCPKT_DOSTOP = 0x20
+ TIOCPKT_FLUSHREAD = 0x1
+ TIOCPKT_FLUSHWRITE = 0x2
+ TIOCPKT_IOCTL = 0x40
+ TIOCPKT_NOSTOP = 0x10
+ TIOCPKT_START = 0x8
+ TIOCPKT_STOP = 0x4
+ TIOCREMOTE = 0x80047469
+ TIOCSBRK = 0x2000747b
+ TIOCSCTTY = 0x20007461
+ TIOCSDTR = 0x20007479
+ TIOCSETA = 0x802c7414
+ TIOCSETAF = 0x802c7416
+ TIOCSETAW = 0x802c7415
+ TIOCSETD = 0x8004741b
+ TIOCSETVERAUTH = 0x8004741c
+ TIOCSFLAGS = 0x8004745c
+ TIOCSIG = 0x8004745f
+ TIOCSPGRP = 0x80047476
+ TIOCSTART = 0x2000746e
+ TIOCSTAT = 0x20007465
+ TIOCSTOP = 0x2000746f
+ TIOCSTSTAMP = 0x8008745a
+ TIOCSWINSZ = 0x80087467
+ TIOCUCNTL = 0x80047466
+ TIOCUCNTL_CBRK = 0x7a
+ TIOCUCNTL_SBRK = 0x7b
+ TOSTOP = 0x400000
+ UTIME_NOW = -0x2
+ UTIME_OMIT = -0x1
+ VDISCARD = 0xf
+ VDSUSP = 0xb
+ VEOF = 0x0
+ VEOL = 0x1
+ VEOL2 = 0x2
+ VERASE = 0x3
+ VINTR = 0x8
+ VKILL = 0x5
+ VLNEXT = 0xe
+ VMIN = 0x10
+ VM_ANONMIN = 0x7
+ VM_LOADAVG = 0x2
+ VM_MALLOC_CONF = 0xc
+ VM_MAXID = 0xd
+ VM_MAXSLP = 0xa
+ VM_METER = 0x1
+ VM_NKMEMPAGES = 0x6
+ VM_PSSTRINGS = 0x3
+ VM_SWAPENCRYPT = 0x5
+ VM_USPACE = 0xb
+ VM_UVMEXP = 0x4
+ VM_VNODEMIN = 0x9
+ VM_VTEXTMIN = 0x8
+ VQUIT = 0x9
+ VREPRINT = 0x6
+ VSTART = 0xc
+ VSTATUS = 0x12
+ VSTOP = 0xd
+ VSUSP = 0xa
+ VTIME = 0x11
+ VWERASE = 0x4
+ WALTSIG = 0x4
+ WCONTINUED = 0x8
+ WCOREFLAG = 0x80
+ WNOHANG = 0x1
+ WUNTRACED = 0x2
+ XCASE = 0x1000000
+)
+
+// Errors
+const (
+ E2BIG = syscall.Errno(0x7)
+ EACCES = syscall.Errno(0xd)
+ EADDRINUSE = syscall.Errno(0x30)
+ EADDRNOTAVAIL = syscall.Errno(0x31)
+ EAFNOSUPPORT = syscall.Errno(0x2f)
+ EAGAIN = syscall.Errno(0x23)
+ EALREADY = syscall.Errno(0x25)
+ EAUTH = syscall.Errno(0x50)
+ EBADF = syscall.Errno(0x9)
+ EBADMSG = syscall.Errno(0x5c)
+ EBADRPC = syscall.Errno(0x48)
+ EBUSY = syscall.Errno(0x10)
+ ECANCELED = syscall.Errno(0x58)
+ ECHILD = syscall.Errno(0xa)
+ ECONNABORTED = syscall.Errno(0x35)
+ ECONNREFUSED = syscall.Errno(0x3d)
+ ECONNRESET = syscall.Errno(0x36)
+ EDEADLK = syscall.Errno(0xb)
+ EDESTADDRREQ = syscall.Errno(0x27)
+ EDOM = syscall.Errno(0x21)
+ EDQUOT = syscall.Errno(0x45)
+ EEXIST = syscall.Errno(0x11)
+ EFAULT = syscall.Errno(0xe)
+ EFBIG = syscall.Errno(0x1b)
+ EFTYPE = syscall.Errno(0x4f)
+ EHOSTDOWN = syscall.Errno(0x40)
+ EHOSTUNREACH = syscall.Errno(0x41)
+ EIDRM = syscall.Errno(0x59)
+ EILSEQ = syscall.Errno(0x54)
+ EINPROGRESS = syscall.Errno(0x24)
+ EINTR = syscall.Errno(0x4)
+ EINVAL = syscall.Errno(0x16)
+ EIO = syscall.Errno(0x5)
+ EIPSEC = syscall.Errno(0x52)
+ EISCONN = syscall.Errno(0x38)
+ EISDIR = syscall.Errno(0x15)
+ ELAST = syscall.Errno(0x5f)
+ ELOOP = syscall.Errno(0x3e)
+ EMEDIUMTYPE = syscall.Errno(0x56)
+ EMFILE = syscall.Errno(0x18)
+ EMLINK = syscall.Errno(0x1f)
+ EMSGSIZE = syscall.Errno(0x28)
+ ENAMETOOLONG = syscall.Errno(0x3f)
+ ENEEDAUTH = syscall.Errno(0x51)
+ ENETDOWN = syscall.Errno(0x32)
+ ENETRESET = syscall.Errno(0x34)
+ ENETUNREACH = syscall.Errno(0x33)
+ ENFILE = syscall.Errno(0x17)
+ ENOATTR = syscall.Errno(0x53)
+ ENOBUFS = syscall.Errno(0x37)
+ ENODEV = syscall.Errno(0x13)
+ ENOENT = syscall.Errno(0x2)
+ ENOEXEC = syscall.Errno(0x8)
+ ENOLCK = syscall.Errno(0x4d)
+ ENOMEDIUM = syscall.Errno(0x55)
+ ENOMEM = syscall.Errno(0xc)
+ ENOMSG = syscall.Errno(0x5a)
+ ENOPROTOOPT = syscall.Errno(0x2a)
+ ENOSPC = syscall.Errno(0x1c)
+ ENOSYS = syscall.Errno(0x4e)
+ ENOTBLK = syscall.Errno(0xf)
+ ENOTCONN = syscall.Errno(0x39)
+ ENOTDIR = syscall.Errno(0x14)
+ ENOTEMPTY = syscall.Errno(0x42)
+ ENOTRECOVERABLE = syscall.Errno(0x5d)
+ ENOTSOCK = syscall.Errno(0x26)
+ ENOTSUP = syscall.Errno(0x5b)
+ ENOTTY = syscall.Errno(0x19)
+ ENXIO = syscall.Errno(0x6)
+ EOPNOTSUPP = syscall.Errno(0x2d)
+ EOVERFLOW = syscall.Errno(0x57)
+ EOWNERDEAD = syscall.Errno(0x5e)
+ EPERM = syscall.Errno(0x1)
+ EPFNOSUPPORT = syscall.Errno(0x2e)
+ EPIPE = syscall.Errno(0x20)
+ EPROCLIM = syscall.Errno(0x43)
+ EPROCUNAVAIL = syscall.Errno(0x4c)
+ EPROGMISMATCH = syscall.Errno(0x4b)
+ EPROGUNAVAIL = syscall.Errno(0x4a)
+ EPROTO = syscall.Errno(0x5f)
+ EPROTONOSUPPORT = syscall.Errno(0x2b)
+ EPROTOTYPE = syscall.Errno(0x29)
+ ERANGE = syscall.Errno(0x22)
+ EREMOTE = syscall.Errno(0x47)
+ EROFS = syscall.Errno(0x1e)
+ ERPCMISMATCH = syscall.Errno(0x49)
+ ESHUTDOWN = syscall.Errno(0x3a)
+ ESOCKTNOSUPPORT = syscall.Errno(0x2c)
+ ESPIPE = syscall.Errno(0x1d)
+ ESRCH = syscall.Errno(0x3)
+ ESTALE = syscall.Errno(0x46)
+ ETIMEDOUT = syscall.Errno(0x3c)
+ ETOOMANYREFS = syscall.Errno(0x3b)
+ ETXTBSY = syscall.Errno(0x1a)
+ EUSERS = syscall.Errno(0x44)
+ EWOULDBLOCK = syscall.Errno(0x23)
+ EXDEV = syscall.Errno(0x12)
+)
+
+// Signals
+const (
+ SIGABRT = syscall.Signal(0x6)
+ SIGALRM = syscall.Signal(0xe)
+ SIGBUS = syscall.Signal(0xa)
+ SIGCHLD = syscall.Signal(0x14)
+ SIGCONT = syscall.Signal(0x13)
+ SIGEMT = syscall.Signal(0x7)
+ SIGFPE = syscall.Signal(0x8)
+ SIGHUP = syscall.Signal(0x1)
+ SIGILL = syscall.Signal(0x4)
+ SIGINFO = syscall.Signal(0x1d)
+ SIGINT = syscall.Signal(0x2)
+ SIGIO = syscall.Signal(0x17)
+ SIGIOT = syscall.Signal(0x6)
+ SIGKILL = syscall.Signal(0x9)
+ SIGPIPE = syscall.Signal(0xd)
+ SIGPROF = syscall.Signal(0x1b)
+ SIGQUIT = syscall.Signal(0x3)
+ SIGSEGV = syscall.Signal(0xb)
+ SIGSTOP = syscall.Signal(0x11)
+ SIGSYS = syscall.Signal(0xc)
+ SIGTERM = syscall.Signal(0xf)
+ SIGTHR = syscall.Signal(0x20)
+ SIGTRAP = syscall.Signal(0x5)
+ SIGTSTP = syscall.Signal(0x12)
+ SIGTTIN = syscall.Signal(0x15)
+ SIGTTOU = syscall.Signal(0x16)
+ SIGURG = syscall.Signal(0x10)
+ SIGUSR1 = syscall.Signal(0x1e)
+ SIGUSR2 = syscall.Signal(0x1f)
+ SIGVTALRM = syscall.Signal(0x1a)
+ SIGWINCH = syscall.Signal(0x1c)
+ SIGXCPU = syscall.Signal(0x18)
+ SIGXFSZ = syscall.Signal(0x19)
+)
+
+// Error table
+var errorList = [...]struct {
+ num syscall.Errno
+ name string
+ desc string
+}{
+ {1, "EPERM", "operation not permitted"},
+ {2, "ENOENT", "no such file or directory"},
+ {3, "ESRCH", "no such process"},
+ {4, "EINTR", "interrupted system call"},
+ {5, "EIO", "input/output error"},
+ {6, "ENXIO", "device not configured"},
+ {7, "E2BIG", "argument list too long"},
+ {8, "ENOEXEC", "exec format error"},
+ {9, "EBADF", "bad file descriptor"},
+ {10, "ECHILD", "no child processes"},
+ {11, "EDEADLK", "resource deadlock avoided"},
+ {12, "ENOMEM", "cannot allocate memory"},
+ {13, "EACCES", "permission denied"},
+ {14, "EFAULT", "bad address"},
+ {15, "ENOTBLK", "block device required"},
+ {16, "EBUSY", "device busy"},
+ {17, "EEXIST", "file exists"},
+ {18, "EXDEV", "cross-device link"},
+ {19, "ENODEV", "operation not supported by device"},
+ {20, "ENOTDIR", "not a directory"},
+ {21, "EISDIR", "is a directory"},
+ {22, "EINVAL", "invalid argument"},
+ {23, "ENFILE", "too many open files in system"},
+ {24, "EMFILE", "too many open files"},
+ {25, "ENOTTY", "inappropriate ioctl for device"},
+ {26, "ETXTBSY", "text file busy"},
+ {27, "EFBIG", "file too large"},
+ {28, "ENOSPC", "no space left on device"},
+ {29, "ESPIPE", "illegal seek"},
+ {30, "EROFS", "read-only file system"},
+ {31, "EMLINK", "too many links"},
+ {32, "EPIPE", "broken pipe"},
+ {33, "EDOM", "numerical argument out of domain"},
+ {34, "ERANGE", "result too large"},
+ {35, "EAGAIN", "resource temporarily unavailable"},
+ {36, "EINPROGRESS", "operation now in progress"},
+ {37, "EALREADY", "operation already in progress"},
+ {38, "ENOTSOCK", "socket operation on non-socket"},
+ {39, "EDESTADDRREQ", "destination address required"},
+ {40, "EMSGSIZE", "message too long"},
+ {41, "EPROTOTYPE", "protocol wrong type for socket"},
+ {42, "ENOPROTOOPT", "protocol not available"},
+ {43, "EPROTONOSUPPORT", "protocol not supported"},
+ {44, "ESOCKTNOSUPPORT", "socket type not supported"},
+ {45, "EOPNOTSUPP", "operation not supported"},
+ {46, "EPFNOSUPPORT", "protocol family not supported"},
+ {47, "EAFNOSUPPORT", "address family not supported by protocol family"},
+ {48, "EADDRINUSE", "address already in use"},
+ {49, "EADDRNOTAVAIL", "can't assign requested address"},
+ {50, "ENETDOWN", "network is down"},
+ {51, "ENETUNREACH", "network is unreachable"},
+ {52, "ENETRESET", "network dropped connection on reset"},
+ {53, "ECONNABORTED", "software caused connection abort"},
+ {54, "ECONNRESET", "connection reset by peer"},
+ {55, "ENOBUFS", "no buffer space available"},
+ {56, "EISCONN", "socket is already connected"},
+ {57, "ENOTCONN", "socket is not connected"},
+ {58, "ESHUTDOWN", "can't send after socket shutdown"},
+ {59, "ETOOMANYREFS", "too many references: can't splice"},
+ {60, "ETIMEDOUT", "operation timed out"},
+ {61, "ECONNREFUSED", "connection refused"},
+ {62, "ELOOP", "too many levels of symbolic links"},
+ {63, "ENAMETOOLONG", "file name too long"},
+ {64, "EHOSTDOWN", "host is down"},
+ {65, "EHOSTUNREACH", "no route to host"},
+ {66, "ENOTEMPTY", "directory not empty"},
+ {67, "EPROCLIM", "too many processes"},
+ {68, "EUSERS", "too many users"},
+ {69, "EDQUOT", "disk quota exceeded"},
+ {70, "ESTALE", "stale NFS file handle"},
+ {71, "EREMOTE", "too many levels of remote in path"},
+ {72, "EBADRPC", "RPC struct is bad"},
+ {73, "ERPCMISMATCH", "RPC version wrong"},
+ {74, "EPROGUNAVAIL", "RPC program not available"},
+ {75, "EPROGMISMATCH", "program version wrong"},
+ {76, "EPROCUNAVAIL", "bad procedure for program"},
+ {77, "ENOLCK", "no locks available"},
+ {78, "ENOSYS", "function not implemented"},
+ {79, "EFTYPE", "inappropriate file type or format"},
+ {80, "EAUTH", "authentication error"},
+ {81, "ENEEDAUTH", "need authenticator"},
+ {82, "EIPSEC", "IPsec processing failure"},
+ {83, "ENOATTR", "attribute not found"},
+ {84, "EILSEQ", "illegal byte sequence"},
+ {85, "ENOMEDIUM", "no medium found"},
+ {86, "EMEDIUMTYPE", "wrong medium type"},
+ {87, "EOVERFLOW", "value too large to be stored in data type"},
+ {88, "ECANCELED", "operation canceled"},
+ {89, "EIDRM", "identifier removed"},
+ {90, "ENOMSG", "no message of desired type"},
+ {91, "ENOTSUP", "not supported"},
+ {92, "EBADMSG", "bad message"},
+ {93, "ENOTRECOVERABLE", "state not recoverable"},
+ {94, "EOWNERDEAD", "previous owner died"},
+ {95, "ELAST", "protocol error"},
+}
+
+// Signal table
+var signalList = [...]struct {
+ num syscall.Signal
+ name string
+ desc string
+}{
+ {1, "SIGHUP", "hangup"},
+ {2, "SIGINT", "interrupt"},
+ {3, "SIGQUIT", "quit"},
+ {4, "SIGILL", "illegal instruction"},
+ {5, "SIGTRAP", "trace/BPT trap"},
+ {6, "SIGABRT", "abort trap"},
+ {7, "SIGEMT", "EMT trap"},
+ {8, "SIGFPE", "floating point exception"},
+ {9, "SIGKILL", "killed"},
+ {10, "SIGBUS", "bus error"},
+ {11, "SIGSEGV", "segmentation fault"},
+ {12, "SIGSYS", "bad system call"},
+ {13, "SIGPIPE", "broken pipe"},
+ {14, "SIGALRM", "alarm clock"},
+ {15, "SIGTERM", "terminated"},
+ {16, "SIGURG", "urgent I/O condition"},
+ {17, "SIGSTOP", "suspended (signal)"},
+ {18, "SIGTSTP", "suspended"},
+ {19, "SIGCONT", "continued"},
+ {20, "SIGCHLD", "child exited"},
+ {21, "SIGTTIN", "stopped (tty input)"},
+ {22, "SIGTTOU", "stopped (tty output)"},
+ {23, "SIGIO", "I/O possible"},
+ {24, "SIGXCPU", "cputime limit exceeded"},
+ {25, "SIGXFSZ", "filesize limit exceeded"},
+ {26, "SIGVTALRM", "virtual timer expired"},
+ {27, "SIGPROF", "profiling timer expired"},
+ {28, "SIGWINCH", "window size changes"},
+ {29, "SIGINFO", "information request"},
+ {30, "SIGUSR1", "user defined signal 1"},
+ {31, "SIGUSR2", "user defined signal 2"},
+ {32, "SIGTHR", "thread AST"},
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
deleted file mode 100644
index a06eb0932..000000000
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// go run mksyscall.go -tags darwin,amd64,go1.13 syscall_darwin.1_13.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-//go:build darwin && amd64 && go1.13
-// +build darwin,amd64,go1.13
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func closedir(dir uintptr) (err error) {
- _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_closedir_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
- r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
- res = Errno(r0)
- return
-}
-
-var libc_readdir_r_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
deleted file mode 100644
index d6c3e25c0..000000000
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s
+++ /dev/null
@@ -1,25 +0,0 @@
-// go run mkasm_darwin.go amd64
-// Code generated by the command above; DO NOT EDIT.
-
-//go:build go1.13
-// +build go1.13
-
-#include "textflag.h"
-
-TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_fdopendir(SB)
-
-GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
-
-TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_closedir(SB)
-
-GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
-
-TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_readdir_r(SB)
-
-GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
-DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
index 467deed76..c2461c496 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.go
@@ -1,8 +1,8 @@
-// go run mksyscall.go -tags darwin,amd64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
+// go run mksyscall.go -tags darwin,amd64 syscall_bsd.go syscall_darwin.go syscall_darwin_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-//go:build darwin && amd64 && go1.12
-// +build darwin,amd64,go1.12
+//go:build darwin && amd64
+// +build darwin,amd64
package unix
@@ -463,6 +463,32 @@ var libc_munlockall_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func closedir(dir uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_closedir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
+ r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ res = Errno(r0)
+ return
+}
+
+var libc_readdir_r_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe(p *[2]int32) (err error) {
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
index 7e308a476..95fe4c0eb 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.s
@@ -1,11 +1,14 @@
-// go run mkasm_darwin.go amd64
+// go run mkasm.go darwin amd64
// Code generated by the command above; DO NOT EDIT.
-//go:build go1.12
-// +build go1.12
-
#include "textflag.h"
+TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fdopendir(SB)
+
+GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
+
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgroups(SB)
@@ -174,6 +177,18 @@ TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_closedir(SB)
+
+GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
+
+TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readdir_r(SB)
+
+GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
+
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
deleted file mode 100644
index cec595d55..000000000
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.go
+++ /dev/null
@@ -1,40 +0,0 @@
-// go run mksyscall.go -tags darwin,arm64,go1.13 syscall_darwin.1_13.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-//go:build darwin && arm64 && go1.13
-// +build darwin,arm64,go1.13
-
-package unix
-
-import (
- "syscall"
- "unsafe"
-)
-
-var _ syscall.Errno
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func closedir(dir uintptr) (err error) {
- _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-var libc_closedir_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
- r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
- res = Errno(r0)
- return
-}
-
-var libc_readdir_r_trampoline_addr uintptr
-
-//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
deleted file mode 100644
index 357989722..000000000
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s
+++ /dev/null
@@ -1,25 +0,0 @@
-// go run mkasm_darwin.go arm64
-// Code generated by the command above; DO NOT EDIT.
-
-//go:build go1.13
-// +build go1.13
-
-#include "textflag.h"
-
-TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_fdopendir(SB)
-
-GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
-
-TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_closedir(SB)
-
-GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
-DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
-
-TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
- JMP libc_readdir_r(SB)
-
-GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
-DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
index 35938d34f..26a0fdc50 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.go
@@ -1,8 +1,8 @@
-// go run mksyscall.go -tags darwin,arm64,go1.12 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
+// go run mksyscall.go -tags darwin,arm64 syscall_bsd.go syscall_darwin.go syscall_darwin_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
-//go:build darwin && arm64 && go1.12
-// +build darwin,arm64,go1.12
+//go:build darwin && arm64
+// +build darwin,arm64
package unix
@@ -463,6 +463,32 @@ var libc_munlockall_trampoline_addr uintptr
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+func closedir(dir uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_closedir_trampoline_addr, uintptr(dir), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_closedir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_closedir closedir "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readdir_r(dir uintptr, entry *Dirent, result **Dirent) (res Errno) {
+ r0, _, _ := syscall_syscall(libc_readdir_r_trampoline_addr, uintptr(dir), uintptr(unsafe.Pointer(entry)), uintptr(unsafe.Pointer(result)))
+ res = Errno(r0)
+ return
+}
+
+var libc_readdir_r_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readdir_r readdir_r "/usr/lib/libSystem.B.dylib"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
func pipe(p *[2]int32) (err error) {
_, _, e1 := syscall_rawSyscall(libc_pipe_trampoline_addr, uintptr(unsafe.Pointer(p)), 0, 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
index b09e5bb0e..efa5b4c98 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.s
@@ -1,11 +1,14 @@
-// go run mkasm_darwin.go arm64
+// go run mkasm.go darwin arm64
// Code generated by the command above; DO NOT EDIT.
-//go:build go1.12
-// +build go1.12
-
#include "textflag.h"
+TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fdopendir(SB)
+
+GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB)
+
TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_getgroups(SB)
@@ -174,6 +177,18 @@ TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_closedir(SB)
+
+GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB)
+
+TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readdir_r(SB)
+
+GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB)
+
TEXT libc_pipe_trampoline<>(SB),NOSPLIT,$0-0
JMP libc_pipe(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
index af5cb064e..b57c7050d 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_illumos_amd64.go
@@ -15,25 +15,19 @@ import (
//go:cgo_import_dynamic libc_writev writev "libc.so"
//go:cgo_import_dynamic libc_pwritev pwritev "libc.so"
//go:cgo_import_dynamic libc_accept4 accept4 "libsocket.so"
-//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
-//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
//go:linkname procreadv libc_readv
//go:linkname procpreadv libc_preadv
//go:linkname procwritev libc_writev
//go:linkname procpwritev libc_pwritev
//go:linkname procaccept4 libc_accept4
-//go:linkname procputmsg libc_putmsg
-//go:linkname procgetmsg libc_getmsg
var (
procreadv,
procpreadv,
procwritev,
procpwritev,
- procaccept4,
- procputmsg,
- procgetmsg syscallFunc
+ procaccept4 syscallFunc
)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -106,23 +100,3 @@ func accept4(s int, rsa *RawSockaddrAny, addrlen *_Socklen, flags int) (fd int,
}
return
}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
- _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
- if e1 != 0 {
- err = e1
- }
- return
-}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux.go
index bc4a27531..293cf3680 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux.go
@@ -2151,3 +2151,13 @@ func setitimer(which int, newValue *Itimerval, oldValue *Itimerval) (err error)
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func rtSigprocmask(how int, set *Sigset_t, oldset *Sigset_t, sigsetsize uintptr) (err error) {
+ _, _, e1 := RawSyscall6(SYS_RT_SIGPROCMASK, uintptr(how), uintptr(unsafe.Pointer(set)), uintptr(unsafe.Pointer(oldset)), uintptr(sigsetsize), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
index 88af526b7..c81b0ad47 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_386.go
@@ -287,46 +287,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int, err error) {
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
n = int(r0)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
index 2a0c4aa6a..2206bce7f 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_amd64.go
@@ -334,36 +334,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -374,16 +344,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
index 4882bde3a..edf6b39f1 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_arm.go
@@ -412,46 +412,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID32, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID32, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID32, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID32, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
index 9f8c24e43..190609f21 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_arm64.go
@@ -289,36 +289,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -329,16 +299,6 @@ func setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
index 523f2ba03..806ffd1e1 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_loong64.go
@@ -223,46 +223,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
index d7d6f4244..5f984cbb1 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips.go
@@ -248,46 +248,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
index 7f1f8e653..46fc380a4 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64.go
@@ -278,36 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -318,16 +288,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
index f933d0f51..cbd0d4dad 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mips64le.go
@@ -278,36 +278,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -318,16 +288,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
index 297d0a998..0c13d15f0 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_mipsle.go
@@ -248,46 +248,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
index 2e32e7a44..e01432aed 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc.go
@@ -308,46 +308,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
index 3c5317046..13c7ee7ba 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64.go
@@ -349,36 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -389,16 +359,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
index a00c6744e..02d0c0fd6 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_ppc64le.go
@@ -349,36 +349,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -389,16 +359,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
index 1239cc2de..9fee3b1d2 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_riscv64.go
@@ -269,36 +269,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -309,16 +279,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
index e0dabc602..647bbfecd 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_s390x.go
@@ -319,36 +319,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -359,16 +329,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Splice(rfd int, roff *int64, wfd int, woff *int64, len int, flags int) (n int64, err error) {
r0, _, e1 := Syscall6(SYS_SPLICE, uintptr(rfd), uintptr(unsafe.Pointer(roff)), uintptr(wfd), uintptr(unsafe.Pointer(woff)), uintptr(len), uintptr(flags))
n = int64(r0)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
index 368623c0f..ada057f89 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_linux_sparc64.go
@@ -329,36 +329,6 @@ func setfsuid(uid int) (prev int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
-func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Setrlimit(resource int, rlim *Rlimit) (err error) {
_, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(resource), uintptr(unsafe.Pointer(rlim)), 0)
if e1 != 0 {
@@ -369,16 +339,6 @@ func Setrlimit(resource int, rlim *Rlimit) (err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
- if e1 != 0 {
- err = errnoErr(e1)
- }
- return
-}
-
-// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
-
func Shutdown(fd int, how int) (err error) {
_, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
index a057fc5d3..2925fe0a7 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -l32 -openbsd -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
+// go run mksyscall.go -l32 -openbsd -libc -tags openbsd,386 syscall_bsd.go syscall_openbsd.go syscall_openbsd_386.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && 386
@@ -16,7 +16,7 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -24,20 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
return
}
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -45,10 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
return
}
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -56,30 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
return
}
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -87,66 +111,94 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
return
}
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
@@ -156,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -164,6 +216,10 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
return
}
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
@@ -173,17 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -191,10 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -202,10 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -213,6 +281,10 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
return
}
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
@@ -221,27 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -249,6 +329,10 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
return
}
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
@@ -258,13 +342,17 @@ func Madvise(b []byte, behav int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
@@ -274,23 +362,31 @@ func Mlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
@@ -300,13 +396,17 @@ func Mprotect(b []byte, prot int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
@@ -316,13 +416,17 @@ func Msync(b []byte, flags int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
@@ -332,33 +436,45 @@ func Munlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) {
@@ -368,7 +484,7 @@ func Getdents(fd int, buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -376,6 +492,10 @@ func Getdents(fd int, buf []byte) (n int, err error) {
return
}
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getcwd(buf []byte) (n int, err error) {
@@ -385,7 +505,7 @@ func Getcwd(buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -393,16 +513,24 @@ func Getcwd(buf []byte) (n int, err error) {
return
}
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
@@ -412,17 +540,21 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -430,6 +562,10 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
return
}
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
@@ -438,23 +574,31 @@ func Access(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
@@ -463,13 +607,17 @@ func Chdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
@@ -478,13 +626,17 @@ func Chflags(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
@@ -493,13 +645,17 @@ func Chmod(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
@@ -508,13 +664,17 @@ func Chown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
@@ -523,27 +683,35 @@ func Chroot(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -551,33 +719,49 @@ func Dup(fd int) (nfd int, err error) {
return
}
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup3(from int, to int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
return
}
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -586,43 +770,59 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -631,23 +831,31 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
@@ -656,27 +864,35 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -684,16 +900,24 @@ func Fpathconf(fd int, name int) (val int, err error) {
return
}
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
@@ -702,71 +926,99 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), uintptr(length>>32))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
egid = int(r0)
return
}
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
gid = int(r0)
return
}
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -774,34 +1026,50 @@ func Getpgid(pid int) (pgid int, err error) {
return
}
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
pgrp = int(r0)
return
}
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
pid = int(r0)
return
}
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
ppid = int(r0)
return
}
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -809,20 +1077,28 @@ func Getpriority(which int, who int) (prio int, err error) {
return
}
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -830,20 +1106,28 @@ func Getrtable() (rtable int, err error) {
return
}
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -851,46 +1135,66 @@ func Getsid(pid int) (sid int, err error) {
return
}
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -898,6 +1202,10 @@ func Kqueue() (fd int, err error) {
return
}
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
@@ -906,13 +1214,17 @@ func Lchown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
@@ -926,13 +1238,17 @@ func Link(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
@@ -946,23 +1262,31 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
@@ -971,13 +1295,17 @@ func Lstat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
@@ -986,13 +1314,17 @@ func Mkdir(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
@@ -1001,13 +1333,17 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
@@ -1016,13 +1352,17 @@ func Mkfifo(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
@@ -1031,13 +1371,17 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
@@ -1046,13 +1390,17 @@ func Mknod(path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
@@ -1061,23 +1409,31 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
@@ -1086,7 +1442,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1094,6 +1450,10 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
@@ -1102,7 +1462,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1110,6 +1470,10 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
@@ -1118,7 +1482,7 @@ func Pathconf(path string, name int) (val int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1126,6 +1490,10 @@ func Pathconf(path string, name int) (val int, err error) {
return
}
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pread(fd int, p []byte, offset int64) (n int, err error) {
@@ -1135,7 +1503,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1143,6 +1511,10 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
@@ -1152,7 +1524,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), uintptr(offset>>32), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1160,6 +1532,10 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
@@ -1169,7 +1545,7 @@ func read(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1177,6 +1553,10 @@ func read(fd int, p []byte) (n int, err error) {
return
}
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
@@ -1191,7 +1571,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1199,6 +1579,10 @@ func Readlink(path string, buf []byte) (n int, err error) {
return
}
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
@@ -1213,7 +1597,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1221,6 +1605,10 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
return
}
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
@@ -1234,13 +1622,17 @@ func Rename(from string, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
@@ -1254,13 +1646,17 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
@@ -1269,13 +1665,17 @@ func Revoke(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
@@ -1284,17 +1684,21 @@ func Rmdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
+ r0, r1, e1 := syscall_syscall6(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(offset>>32), uintptr(whence), 0, 0)
newoffset = int64(int64(r1)<<32 | int64(r0))
if e1 != 0 {
err = errnoErr(e1)
@@ -1302,10 +1706,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return
}
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1313,36 +1721,52 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
return
}
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
@@ -1351,97 +1775,133 @@ func Setlogin(name string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1449,26 +1909,38 @@ func Setsid() (pid int, err error) {
return
}
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
@@ -1477,13 +1949,17 @@ func Stat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
@@ -1492,13 +1968,17 @@ func Statfs(path string, stat *Statfs_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
@@ -1512,13 +1992,17 @@ func Symlink(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
@@ -1532,23 +2016,31 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
@@ -1557,21 +2049,29 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), uintptr(length>>32))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
@@ -1580,13 +2080,17 @@ func Unlink(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
@@ -1595,13 +2099,17 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
@@ -1610,13 +2118,17 @@ func Unmount(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
@@ -1626,7 +2138,7 @@ func write(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1634,10 +2146,14 @@ func write(fd int, p []byte) (n int, err error) {
return
}
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
+ r0, _, e1 := syscall_syscall9(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos), uintptr(pos>>32), 0, 0)
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1645,20 +2161,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
return
}
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1669,7 +2193,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1685,9 +2209,13 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
new file mode 100644
index 000000000..75eb2f5f3
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_386.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd 386
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgroups(SB)
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgroups(SB)
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_wait4(SB)
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4
+DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_accept(SB)
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4
+DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_bind(SB)
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4
+DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connect(SB)
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4
+DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socket(SB)
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4
+DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockopt(SB)
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsockopt(SB)
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpeername(SB)
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockname(SB)
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shutdown(SB)
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socketpair(SB)
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4
+DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvfrom(SB)
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4
+DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendto(SB)
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvmsg(SB)
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4
+DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendmsg(SB)
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kevent(SB)
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimes(SB)
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4
+DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_futimes(SB)
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4
+DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_poll(SB)
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4
+DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_madvise(SB)
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4
+DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlock(SB)
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlockall(SB)
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mprotect(SB)
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_msync(SB)
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlock(SB)
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlockall(SB)
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pipe2(SB)
+
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getdents(SB)
+
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ioctl(SB)
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ppoll(SB)
+
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_access(SB)
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4
+DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_adjtime(SB)
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4
+DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chdir(SB)
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chflags(SB)
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chmod(SB)
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chown(SB)
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chroot(SB)
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_close(SB)
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4
+DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup(SB)
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup2(SB)
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup3(SB)
+
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_exit(SB)
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_faccessat(SB)
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchdir(SB)
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchflags(SB)
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmod(SB)
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmodat(SB)
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchown(SB)
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchownat(SB)
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_flock(SB)
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fpathconf(SB)
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstat(SB)
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatat(SB)
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatfs(SB)
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fsync(SB)
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ftruncate(SB)
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getegid(SB)
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_geteuid(SB)
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgid(SB)
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgid(SB)
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgrp(SB)
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpid(SB)
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getppid(SB)
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpriority(SB)
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrlimit(SB)
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrtable(SB)
+
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrusage(SB)
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsid(SB)
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4
+DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getuid(SB)
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_issetugid(SB)
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kill(SB)
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kqueue(SB)
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lchown(SB)
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_link(SB)
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4
+DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_linkat(SB)
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_listen(SB)
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4
+DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lstat(SB)
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdir(SB)
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdirat(SB)
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifo(SB)
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifoat(SB)
+
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknod(SB)
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknodat(SB)
+
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_nanosleep(SB)
+
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
+DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_open(SB)
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4
+DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_openat(SB)
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pathconf(SB)
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pread(SB)
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwrite(SB)
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_read(SB)
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4
+DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlink(SB)
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlinkat(SB)
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rename(SB)
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4
+DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameat(SB)
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_revoke(SB)
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4
+DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rmdir(SB)
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lseek(SB)
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_select(SB)
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4
+DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setegid(SB)
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_seteuid(SB)
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgid(SB)
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setlogin(SB)
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpgid(SB)
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpriority(SB)
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setregid(SB)
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setreuid(SB)
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresgid(SB)
+
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresuid(SB)
+
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrlimit(SB)
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrtable(SB)
+
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsid(SB)
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_settimeofday(SB)
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4
+DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setuid(SB)
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_stat(SB)
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4
+DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlink(SB)
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlinkat(SB)
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sync(SB)
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_truncate(SB)
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4
+DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_umask(SB)
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4
+DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlink(SB)
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlinkat(SB)
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unmount(SB)
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_write(SB)
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4
+DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mmap(SB)
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munmap(SB)
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
+
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
index 04db8fa2f..98446d2b9 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -openbsd -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
+// go run mksyscall.go -openbsd -libc -tags openbsd,amd64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_amd64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && amd64
@@ -16,7 +16,7 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -24,20 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
return
}
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -45,10 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
return
}
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -56,30 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
return
}
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -87,66 +111,94 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
return
}
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
@@ -156,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -164,6 +216,10 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
return
}
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
@@ -173,17 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -191,10 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -202,10 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -213,6 +281,10 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
return
}
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
@@ -221,27 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -249,6 +329,10 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
return
}
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
@@ -258,13 +342,17 @@ func Madvise(b []byte, behav int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
@@ -274,23 +362,31 @@ func Mlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
@@ -300,13 +396,17 @@ func Mprotect(b []byte, prot int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
@@ -316,13 +416,17 @@ func Msync(b []byte, flags int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
@@ -332,33 +436,45 @@ func Munlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) {
@@ -368,7 +484,7 @@ func Getdents(fd int, buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -376,6 +492,10 @@ func Getdents(fd int, buf []byte) (n int, err error) {
return
}
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getcwd(buf []byte) (n int, err error) {
@@ -385,7 +505,7 @@ func Getcwd(buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -393,16 +513,24 @@ func Getcwd(buf []byte) (n int, err error) {
return
}
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
@@ -412,17 +540,21 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -430,6 +562,10 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
return
}
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
@@ -438,23 +574,31 @@ func Access(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
@@ -463,13 +607,17 @@ func Chdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
@@ -478,13 +626,17 @@ func Chflags(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
@@ -493,13 +645,17 @@ func Chmod(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
@@ -508,13 +664,17 @@ func Chown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
@@ -523,27 +683,35 @@ func Chroot(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -551,33 +719,49 @@ func Dup(fd int) (nfd int, err error) {
return
}
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup3(from int, to int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
return
}
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -586,43 +770,59 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -631,23 +831,31 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
@@ -656,27 +864,35 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -684,16 +900,24 @@ func Fpathconf(fd int, name int) (val int, err error) {
return
}
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
@@ -702,71 +926,99 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
egid = int(r0)
return
}
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
gid = int(r0)
return
}
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -774,34 +1026,50 @@ func Getpgid(pid int) (pgid int, err error) {
return
}
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
pgrp = int(r0)
return
}
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
pid = int(r0)
return
}
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
ppid = int(r0)
return
}
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -809,20 +1077,28 @@ func Getpriority(which int, who int) (prio int, err error) {
return
}
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -830,20 +1106,28 @@ func Getrtable() (rtable int, err error) {
return
}
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -851,46 +1135,66 @@ func Getsid(pid int) (sid int, err error) {
return
}
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -898,6 +1202,10 @@ func Kqueue() (fd int, err error) {
return
}
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
@@ -906,13 +1214,17 @@ func Lchown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
@@ -926,13 +1238,17 @@ func Link(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
@@ -946,23 +1262,31 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
@@ -971,13 +1295,17 @@ func Lstat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
@@ -986,13 +1314,17 @@ func Mkdir(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
@@ -1001,13 +1333,17 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
@@ -1016,13 +1352,17 @@ func Mkfifo(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
@@ -1031,13 +1371,17 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
@@ -1046,13 +1390,17 @@ func Mknod(path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
@@ -1061,23 +1409,31 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
@@ -1086,7 +1442,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1094,6 +1450,10 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
@@ -1102,7 +1462,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1110,6 +1470,10 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
@@ -1118,7 +1482,7 @@ func Pathconf(path string, name int) (val int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1126,6 +1490,10 @@ func Pathconf(path string, name int) (val int, err error) {
return
}
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pread(fd int, p []byte, offset int64) (n int, err error) {
@@ -1135,7 +1503,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1143,6 +1511,10 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
@@ -1152,7 +1524,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1160,6 +1532,10 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
@@ -1169,7 +1545,7 @@ func read(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1177,6 +1553,10 @@ func read(fd int, p []byte) (n int, err error) {
return
}
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
@@ -1191,7 +1571,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1199,6 +1579,10 @@ func Readlink(path string, buf []byte) (n int, err error) {
return
}
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
@@ -1213,7 +1597,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1221,6 +1605,10 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
return
}
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
@@ -1234,13 +1622,17 @@ func Rename(from string, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
@@ -1254,13 +1646,17 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
@@ -1269,13 +1665,17 @@ func Revoke(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
@@ -1284,17 +1684,21 @@ func Rmdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
newoffset = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1302,10 +1706,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return
}
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1313,36 +1721,52 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
return
}
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
@@ -1351,97 +1775,133 @@ func Setlogin(name string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1449,26 +1909,38 @@ func Setsid() (pid int, err error) {
return
}
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
@@ -1477,13 +1949,17 @@ func Stat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
@@ -1492,13 +1968,17 @@ func Statfs(path string, stat *Statfs_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
@@ -1512,13 +1992,17 @@ func Symlink(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
@@ -1532,23 +2016,31 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
@@ -1557,21 +2049,29 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
@@ -1580,13 +2080,17 @@ func Unlink(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
@@ -1595,13 +2099,17 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
@@ -1610,13 +2118,17 @@ func Unmount(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
@@ -1626,7 +2138,7 @@ func write(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1634,10 +2146,14 @@ func write(fd int, p []byte) (n int, err error) {
return
}
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1645,20 +2161,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
return
}
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1669,7 +2193,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1685,9 +2209,13 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
new file mode 100644
index 000000000..243a6663c
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_amd64.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd amd64
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgroups(SB)
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgroups(SB)
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_wait4(SB)
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
+DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_accept(SB)
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
+DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_bind(SB)
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
+DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connect(SB)
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socket(SB)
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockopt(SB)
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsockopt(SB)
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpeername(SB)
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockname(SB)
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shutdown(SB)
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socketpair(SB)
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvfrom(SB)
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendto(SB)
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvmsg(SB)
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendmsg(SB)
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kevent(SB)
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimes(SB)
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_futimes(SB)
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_poll(SB)
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_madvise(SB)
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
+DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlock(SB)
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlockall(SB)
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mprotect(SB)
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_msync(SB)
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlock(SB)
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlockall(SB)
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pipe2(SB)
+
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getdents(SB)
+
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ioctl(SB)
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ppoll(SB)
+
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_access(SB)
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
+DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_adjtime(SB)
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chdir(SB)
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chflags(SB)
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chmod(SB)
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chown(SB)
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chroot(SB)
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_close(SB)
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
+DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup(SB)
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup2(SB)
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup3(SB)
+
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_exit(SB)
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_faccessat(SB)
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchdir(SB)
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchflags(SB)
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmod(SB)
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmodat(SB)
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchown(SB)
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchownat(SB)
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_flock(SB)
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fpathconf(SB)
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstat(SB)
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatat(SB)
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatfs(SB)
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fsync(SB)
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ftruncate(SB)
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getegid(SB)
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_geteuid(SB)
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgid(SB)
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgid(SB)
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgrp(SB)
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpid(SB)
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getppid(SB)
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpriority(SB)
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrlimit(SB)
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrtable(SB)
+
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrusage(SB)
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsid(SB)
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getuid(SB)
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_issetugid(SB)
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kill(SB)
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kqueue(SB)
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lchown(SB)
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_link(SB)
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
+DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_linkat(SB)
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_listen(SB)
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lstat(SB)
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdir(SB)
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdirat(SB)
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifo(SB)
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifoat(SB)
+
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknod(SB)
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknodat(SB)
+
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_nanosleep(SB)
+
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
+DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_open(SB)
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
+DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_openat(SB)
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pathconf(SB)
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pread(SB)
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwrite(SB)
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_read(SB)
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
+DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlink(SB)
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlinkat(SB)
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rename(SB)
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameat(SB)
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_revoke(SB)
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
+DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rmdir(SB)
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lseek(SB)
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_select(SB)
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
+DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setegid(SB)
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_seteuid(SB)
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgid(SB)
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setlogin(SB)
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpgid(SB)
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpriority(SB)
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setregid(SB)
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setreuid(SB)
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresgid(SB)
+
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresuid(SB)
+
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrlimit(SB)
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrtable(SB)
+
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsid(SB)
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_settimeofday(SB)
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setuid(SB)
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_stat(SB)
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlink(SB)
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlinkat(SB)
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sync(SB)
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_truncate(SB)
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_umask(SB)
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
+DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlink(SB)
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlinkat(SB)
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unmount(SB)
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_write(SB)
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
+DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mmap(SB)
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munmap(SB)
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
+
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
index 69f803006..8da6791d1 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -l32 -openbsd -arm -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
+// go run mksyscall.go -l32 -openbsd -arm -libc -tags openbsd,arm syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && arm
@@ -16,7 +16,7 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -24,20 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
return
}
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -45,10 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
return
}
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -56,30 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
return
}
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -87,66 +111,94 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
return
}
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
@@ -156,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -164,6 +216,10 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
return
}
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
@@ -173,17 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -191,10 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -202,10 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -213,6 +281,10 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
return
}
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
@@ -221,27 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -249,6 +329,10 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
return
}
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
@@ -258,13 +342,17 @@ func Madvise(b []byte, behav int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
@@ -274,23 +362,31 @@ func Mlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
@@ -300,13 +396,17 @@ func Mprotect(b []byte, prot int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
@@ -316,13 +416,17 @@ func Msync(b []byte, flags int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
@@ -332,33 +436,45 @@ func Munlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) {
@@ -368,7 +484,7 @@ func Getdents(fd int, buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -376,6 +492,10 @@ func Getdents(fd int, buf []byte) (n int, err error) {
return
}
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getcwd(buf []byte) (n int, err error) {
@@ -385,7 +505,7 @@ func Getcwd(buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -393,16 +513,24 @@ func Getcwd(buf []byte) (n int, err error) {
return
}
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
@@ -412,17 +540,21 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -430,6 +562,10 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
return
}
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
@@ -438,23 +574,31 @@ func Access(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
@@ -463,13 +607,17 @@ func Chdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
@@ -478,13 +626,17 @@ func Chflags(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
@@ -493,13 +645,17 @@ func Chmod(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
@@ -508,13 +664,17 @@ func Chown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
@@ -523,27 +683,35 @@ func Chroot(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -551,33 +719,49 @@ func Dup(fd int) (nfd int, err error) {
return
}
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup3(from int, to int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
return
}
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -586,43 +770,59 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -631,23 +831,31 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
@@ -656,27 +864,35 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -684,16 +900,24 @@ func Fpathconf(fd int, name int) (val int, err error) {
return
}
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
@@ -702,71 +926,99 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall6(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_ftruncate_trampoline_addr, uintptr(fd), 0, uintptr(length), uintptr(length>>32), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
egid = int(r0)
return
}
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
gid = int(r0)
return
}
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -774,34 +1026,50 @@ func Getpgid(pid int) (pgid int, err error) {
return
}
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
pgrp = int(r0)
return
}
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
pid = int(r0)
return
}
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
ppid = int(r0)
return
}
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -809,20 +1077,28 @@ func Getpriority(which int, who int) (prio int, err error) {
return
}
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -830,20 +1106,28 @@ func Getrtable() (rtable int, err error) {
return
}
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -851,46 +1135,66 @@ func Getsid(pid int) (sid int, err error) {
return
}
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -898,6 +1202,10 @@ func Kqueue() (fd int, err error) {
return
}
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
@@ -906,13 +1214,17 @@ func Lchown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
@@ -926,13 +1238,17 @@ func Link(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
@@ -946,23 +1262,31 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
@@ -971,13 +1295,17 @@ func Lstat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
@@ -986,13 +1314,17 @@ func Mkdir(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
@@ -1001,13 +1333,17 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
@@ -1016,13 +1352,17 @@ func Mkfifo(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
@@ -1031,13 +1371,17 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
@@ -1046,13 +1390,17 @@ func Mknod(path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
@@ -1061,23 +1409,31 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
@@ -1086,7 +1442,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1094,6 +1450,10 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
@@ -1102,7 +1462,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1110,6 +1470,10 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
@@ -1118,7 +1482,7 @@ func Pathconf(path string, name int) (val int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1126,6 +1490,10 @@ func Pathconf(path string, name int) (val int, err error) {
return
}
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pread(fd int, p []byte, offset int64) (n int, err error) {
@@ -1135,7 +1503,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1143,6 +1511,10 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
@@ -1152,7 +1524,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), uintptr(offset>>32))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1160,6 +1532,10 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
@@ -1169,7 +1545,7 @@ func read(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1177,6 +1553,10 @@ func read(fd int, p []byte) (n int, err error) {
return
}
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
@@ -1191,7 +1571,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1199,6 +1579,10 @@ func Readlink(path string, buf []byte) (n int, err error) {
return
}
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
@@ -1213,7 +1597,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1221,6 +1605,10 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
return
}
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
@@ -1234,13 +1622,17 @@ func Rename(from string, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
@@ -1254,13 +1646,17 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
@@ -1269,13 +1665,17 @@ func Revoke(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
@@ -1284,17 +1684,21 @@ func Rmdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, r1, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
+ r0, r1, e1 := syscall_syscall6(libc_lseek_trampoline_addr, uintptr(fd), 0, uintptr(offset), uintptr(offset>>32), uintptr(whence), 0)
newoffset = int64(int64(r1)<<32 | int64(r0))
if e1 != 0 {
err = errnoErr(e1)
@@ -1302,10 +1706,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return
}
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1313,36 +1721,52 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
return
}
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
@@ -1351,97 +1775,133 @@ func Setlogin(name string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1449,26 +1909,38 @@ func Setsid() (pid int, err error) {
return
}
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
@@ -1477,13 +1949,17 @@ func Stat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
@@ -1492,13 +1968,17 @@ func Statfs(path string, stat *Statfs_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
@@ -1512,13 +1992,17 @@ func Symlink(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
@@ -1532,23 +2016,31 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
@@ -1557,21 +2049,29 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length), uintptr(length>>32), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
@@ -1580,13 +2080,17 @@ func Unlink(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
@@ -1595,13 +2099,17 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
@@ -1610,13 +2118,17 @@ func Unmount(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
@@ -1626,7 +2138,7 @@ func write(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1634,10 +2146,14 @@ func write(fd int, p []byte) (n int, err error) {
return
}
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
+ r0, _, e1 := syscall_syscall9(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), uintptr(pos>>32), 0)
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1645,20 +2161,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
return
}
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1669,7 +2193,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1685,9 +2209,13 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
new file mode 100644
index 000000000..9ad116d9f
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd arm
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgroups(SB)
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getgroups_trampoline_addr(SB)/4, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgroups(SB)
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setgroups_trampoline_addr(SB)/4, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_wait4(SB)
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $4
+DATA ·libc_wait4_trampoline_addr(SB)/4, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_accept(SB)
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $4
+DATA ·libc_accept_trampoline_addr(SB)/4, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_bind(SB)
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $4
+DATA ·libc_bind_trampoline_addr(SB)/4, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connect(SB)
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $4
+DATA ·libc_connect_trampoline_addr(SB)/4, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socket(SB)
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $4
+DATA ·libc_socket_trampoline_addr(SB)/4, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockopt(SB)
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsockopt_trampoline_addr(SB)/4, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsockopt(SB)
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setsockopt_trampoline_addr(SB)/4, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpeername(SB)
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpeername_trampoline_addr(SB)/4, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockname(SB)
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsockname_trampoline_addr(SB)/4, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shutdown(SB)
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_shutdown_trampoline_addr(SB)/4, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socketpair(SB)
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $4
+DATA ·libc_socketpair_trampoline_addr(SB)/4, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvfrom(SB)
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $4
+DATA ·libc_recvfrom_trampoline_addr(SB)/4, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendto(SB)
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sendto_trampoline_addr(SB)/4, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvmsg(SB)
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $4
+DATA ·libc_recvmsg_trampoline_addr(SB)/4, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendmsg(SB)
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sendmsg_trampoline_addr(SB)/4, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kevent(SB)
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kevent_trampoline_addr(SB)/4, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimes(SB)
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $4
+DATA ·libc_utimes_trampoline_addr(SB)/4, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_futimes(SB)
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $4
+DATA ·libc_futimes_trampoline_addr(SB)/4, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_poll(SB)
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $4
+DATA ·libc_poll_trampoline_addr(SB)/4, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_madvise(SB)
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $4
+DATA ·libc_madvise_trampoline_addr(SB)/4, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlock(SB)
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mlock_trampoline_addr(SB)/4, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlockall(SB)
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mlockall_trampoline_addr(SB)/4, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mprotect(SB)
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mprotect_trampoline_addr(SB)/4, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_msync(SB)
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_msync_trampoline_addr(SB)/4, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlock(SB)
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munlock_trampoline_addr(SB)/4, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlockall(SB)
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munlockall_trampoline_addr(SB)/4, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pipe2(SB)
+
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pipe2_trampoline_addr(SB)/4, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getdents(SB)
+
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getdents_trampoline_addr(SB)/4, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getcwd_trampoline_addr(SB)/4, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ioctl(SB)
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ioctl_trampoline_addr(SB)/4, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sysctl_trampoline_addr(SB)/4, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ppoll(SB)
+
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ppoll_trampoline_addr(SB)/4, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_access(SB)
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $4
+DATA ·libc_access_trampoline_addr(SB)/4, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_adjtime(SB)
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $4
+DATA ·libc_adjtime_trampoline_addr(SB)/4, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chdir(SB)
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chdir_trampoline_addr(SB)/4, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chflags(SB)
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chflags_trampoline_addr(SB)/4, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chmod(SB)
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chmod_trampoline_addr(SB)/4, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chown(SB)
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chown_trampoline_addr(SB)/4, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chroot(SB)
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $4
+DATA ·libc_chroot_trampoline_addr(SB)/4, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_close(SB)
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $4
+DATA ·libc_close_trampoline_addr(SB)/4, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup(SB)
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup_trampoline_addr(SB)/4, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup2(SB)
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup2_trampoline_addr(SB)/4, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup3(SB)
+
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $4
+DATA ·libc_dup3_trampoline_addr(SB)/4, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_exit(SB)
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_exit_trampoline_addr(SB)/4, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_faccessat(SB)
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_faccessat_trampoline_addr(SB)/4, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchdir(SB)
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchdir_trampoline_addr(SB)/4, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchflags(SB)
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchflags_trampoline_addr(SB)/4, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmod(SB)
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchmod_trampoline_addr(SB)/4, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmodat(SB)
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchmodat_trampoline_addr(SB)/4, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchown(SB)
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchown_trampoline_addr(SB)/4, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchownat(SB)
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fchownat_trampoline_addr(SB)/4, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_flock(SB)
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $4
+DATA ·libc_flock_trampoline_addr(SB)/4, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fpathconf(SB)
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fpathconf_trampoline_addr(SB)/4, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstat(SB)
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstat_trampoline_addr(SB)/4, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatat(SB)
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstatat_trampoline_addr(SB)/4, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatfs(SB)
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fstatfs_trampoline_addr(SB)/4, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fsync(SB)
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_fsync_trampoline_addr(SB)/4, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ftruncate(SB)
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $4
+DATA ·libc_ftruncate_trampoline_addr(SB)/4, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getegid(SB)
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getegid_trampoline_addr(SB)/4, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_geteuid(SB)
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_geteuid_trampoline_addr(SB)/4, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgid(SB)
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getgid_trampoline_addr(SB)/4, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgid(SB)
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpgid_trampoline_addr(SB)/4, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgrp(SB)
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpgrp_trampoline_addr(SB)/4, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpid(SB)
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpid_trampoline_addr(SB)/4, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getppid(SB)
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getppid_trampoline_addr(SB)/4, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpriority(SB)
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getpriority_trampoline_addr(SB)/4, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrlimit(SB)
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrlimit_trampoline_addr(SB)/4, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrtable(SB)
+
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrtable_trampoline_addr(SB)/4, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrusage(SB)
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getrusage_trampoline_addr(SB)/4, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsid(SB)
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getsid_trampoline_addr(SB)/4, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $4
+DATA ·libc_gettimeofday_trampoline_addr(SB)/4, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getuid(SB)
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_getuid_trampoline_addr(SB)/4, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_issetugid(SB)
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_issetugid_trampoline_addr(SB)/4, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kill(SB)
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kill_trampoline_addr(SB)/4, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kqueue(SB)
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $4
+DATA ·libc_kqueue_trampoline_addr(SB)/4, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lchown(SB)
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lchown_trampoline_addr(SB)/4, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_link(SB)
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $4
+DATA ·libc_link_trampoline_addr(SB)/4, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_linkat(SB)
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_linkat_trampoline_addr(SB)/4, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_listen(SB)
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $4
+DATA ·libc_listen_trampoline_addr(SB)/4, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lstat(SB)
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lstat_trampoline_addr(SB)/4, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdir(SB)
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkdir_trampoline_addr(SB)/4, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdirat(SB)
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkdirat_trampoline_addr(SB)/4, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifo(SB)
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkfifo_trampoline_addr(SB)/4, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifoat(SB)
+
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mkfifoat_trampoline_addr(SB)/4, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknod(SB)
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mknod_trampoline_addr(SB)/4, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknodat(SB)
+
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mknodat_trampoline_addr(SB)/4, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_nanosleep(SB)
+
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $4
+DATA ·libc_nanosleep_trampoline_addr(SB)/4, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_open(SB)
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $4
+DATA ·libc_open_trampoline_addr(SB)/4, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_openat(SB)
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_openat_trampoline_addr(SB)/4, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pathconf(SB)
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pathconf_trampoline_addr(SB)/4, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pread(SB)
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pread_trampoline_addr(SB)/4, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwrite(SB)
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $4
+DATA ·libc_pwrite_trampoline_addr(SB)/4, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_read(SB)
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $4
+DATA ·libc_read_trampoline_addr(SB)/4, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlink(SB)
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_readlink_trampoline_addr(SB)/4, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlinkat(SB)
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_readlinkat_trampoline_addr(SB)/4, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rename(SB)
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $4
+DATA ·libc_rename_trampoline_addr(SB)/4, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameat(SB)
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_renameat_trampoline_addr(SB)/4, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_revoke(SB)
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $4
+DATA ·libc_revoke_trampoline_addr(SB)/4, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rmdir(SB)
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $4
+DATA ·libc_rmdir_trampoline_addr(SB)/4, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lseek(SB)
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $4
+DATA ·libc_lseek_trampoline_addr(SB)/4, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_select(SB)
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $4
+DATA ·libc_select_trampoline_addr(SB)/4, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setegid(SB)
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setegid_trampoline_addr(SB)/4, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_seteuid(SB)
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_seteuid_trampoline_addr(SB)/4, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgid(SB)
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setgid_trampoline_addr(SB)/4, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setlogin(SB)
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setlogin_trampoline_addr(SB)/4, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpgid(SB)
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setpgid_trampoline_addr(SB)/4, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpriority(SB)
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setpriority_trampoline_addr(SB)/4, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setregid(SB)
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setregid_trampoline_addr(SB)/4, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setreuid(SB)
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setreuid_trampoline_addr(SB)/4, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresgid(SB)
+
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setresgid_trampoline_addr(SB)/4, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresuid(SB)
+
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setresuid_trampoline_addr(SB)/4, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrlimit(SB)
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setrlimit_trampoline_addr(SB)/4, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrtable(SB)
+
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setrtable_trampoline_addr(SB)/4, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsid(SB)
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setsid_trampoline_addr(SB)/4, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_settimeofday(SB)
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $4
+DATA ·libc_settimeofday_trampoline_addr(SB)/4, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setuid(SB)
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $4
+DATA ·libc_setuid_trampoline_addr(SB)/4, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_stat(SB)
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_stat_trampoline_addr(SB)/4, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $4
+DATA ·libc_statfs_trampoline_addr(SB)/4, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlink(SB)
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_symlink_trampoline_addr(SB)/4, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlinkat(SB)
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_symlinkat_trampoline_addr(SB)/4, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sync(SB)
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $4
+DATA ·libc_sync_trampoline_addr(SB)/4, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_truncate(SB)
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $4
+DATA ·libc_truncate_trampoline_addr(SB)/4, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_umask(SB)
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $4
+DATA ·libc_umask_trampoline_addr(SB)/4, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlink(SB)
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unlink_trampoline_addr(SB)/4, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlinkat(SB)
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unlinkat_trampoline_addr(SB)/4, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unmount(SB)
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $4
+DATA ·libc_unmount_trampoline_addr(SB)/4, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_write(SB)
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $4
+DATA ·libc_write_trampoline_addr(SB)/4, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mmap(SB)
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $4
+DATA ·libc_mmap_trampoline_addr(SB)/4, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munmap(SB)
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $4
+DATA ·libc_munmap_trampoline_addr(SB)/4, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
+
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $4
+DATA ·libc_utimensat_trampoline_addr(SB)/4, $libc_utimensat_trampoline<>(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
index c96a50517..800aab6e3 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.go
@@ -1,4 +1,4 @@
-// go run mksyscall.go -openbsd -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go
+// go run mksyscall.go -openbsd -libc -tags openbsd,arm64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_arm64.go
// Code generated by the command above; see README.md. DO NOT EDIT.
//go:build openbsd && arm64
@@ -16,7 +16,7 @@ var _ syscall.Errno
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -24,20 +24,28 @@ func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
return
}
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setgroups(ngid int, gid *_Gid_t) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGROUPS, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
- r0, _, e1 := Syscall6(SYS_WAIT4, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
wpid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -45,10 +53,14 @@ func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err
return
}
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
- r0, _, e1 := Syscall(SYS_ACCEPT, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -56,30 +68,42 @@ func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
return
}
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_BIND, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
- _, _, e1 := Syscall(SYS_CONNECT, uintptr(s), uintptr(addr), uintptr(addrlen))
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socket(domain int, typ int, proto int) (fd int, err error) {
- r0, _, e1 := RawSyscall(SYS_SOCKET, uintptr(domain), uintptr(typ), uintptr(proto))
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -87,66 +111,94 @@ func socket(domain int, typ int, proto int) (fd int, err error) {
return
}
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
- _, _, e1 := Syscall6(SYS_GETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
- _, _, e1 := Syscall6(SYS_SETSOCKOPT, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETPEERNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
- _, _, e1 := RawSyscall(SYS_GETSOCKNAME, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Shutdown(s int, how int) (err error) {
- _, _, e1 := Syscall(SYS_SHUTDOWN, uintptr(s), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
- _, _, e1 := RawSyscall6(SYS_SOCKETPAIR, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
@@ -156,7 +208,7 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_RECVFROM, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -164,6 +216,10 @@ func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Sockl
return
}
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
@@ -173,17 +229,21 @@ func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS_SENDTO, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_RECVMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -191,10 +251,14 @@ func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_SENDMSG, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -202,10 +266,14 @@ func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
return
}
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_KEVENT, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -213,6 +281,10 @@ func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, ne
return
}
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func utimes(path string, timeval *[2]Timeval) (err error) {
@@ -221,27 +293,35 @@ func utimes(path string, timeval *[2]Timeval) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UTIMES, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func futimes(fd int, timeval *[2]Timeval) (err error) {
- _, _, e1 := Syscall(SYS_FUTIMES, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_POLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -249,6 +329,10 @@ func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
return
}
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Madvise(b []byte, behav int) (err error) {
@@ -258,13 +342,17 @@ func Madvise(b []byte, behav int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MADVISE, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlock(b []byte) (err error) {
@@ -274,23 +362,31 @@ func Mlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mlockall(flags int) (err error) {
- _, _, e1 := Syscall(SYS_MLOCKALL, uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mprotect(b []byte, prot int) (err error) {
@@ -300,13 +396,17 @@ func Mprotect(b []byte, prot int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MPROTECT, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Msync(b []byte, flags int) (err error) {
@@ -316,13 +416,17 @@ func Msync(b []byte, flags int) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MSYNC, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlock(b []byte) (err error) {
@@ -332,33 +436,45 @@ func Munlock(b []byte) (err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall(SYS_MUNLOCK, uintptr(_p0), uintptr(len(b)), 0)
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Munlockall() (err error) {
- _, _, e1 := Syscall(SYS_MUNLOCKALL, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pipe2(p *[2]_C_int, flags int) (err error) {
- _, _, e1 := RawSyscall(SYS_PIPE2, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getdents(fd int, buf []byte) (n int, err error) {
@@ -368,7 +484,7 @@ func Getdents(fd int, buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_GETDENTS, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -376,6 +492,10 @@ func Getdents(fd int, buf []byte) (n int, err error) {
return
}
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getcwd(buf []byte) (n int, err error) {
@@ -385,7 +505,7 @@ func Getcwd(buf []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS___GETCWD, uintptr(_p0), uintptr(len(buf)), 0)
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -393,16 +513,24 @@ func Getcwd(buf []byte) (n int, err error) {
return
}
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ioctl(fd int, req uint, arg uintptr) (err error) {
- _, _, e1 := Syscall(SYS_IOCTL, uintptr(fd), uintptr(req), uintptr(arg))
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
@@ -412,17 +540,21 @@ func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr)
} else {
_p0 = unsafe.Pointer(&_zero)
}
- _, _, e1 := Syscall6(SYS___SYSCTL, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_PPOLL, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -430,6 +562,10 @@ func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int,
return
}
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Access(path string, mode uint32) (err error) {
@@ -438,23 +574,31 @@ func Access(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_ACCESS, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
- _, _, e1 := Syscall(SYS_ADJTIME, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chdir(path string) (err error) {
@@ -463,13 +607,17 @@ func Chdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chflags(path string, flags int) (err error) {
@@ -478,13 +626,17 @@ func Chflags(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHFLAGS, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chmod(path string, mode uint32) (err error) {
@@ -493,13 +645,17 @@ func Chmod(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHMOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chown(path string, uid int, gid int) (err error) {
@@ -508,13 +664,17 @@ func Chown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Chroot(path string) (err error) {
@@ -523,27 +683,35 @@ func Chroot(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_CHROOT, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Close(fd int) (err error) {
- _, _, e1 := Syscall(SYS_CLOSE, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup(fd int) (nfd int, err error) {
- r0, _, e1 := Syscall(SYS_DUP, uintptr(fd), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
nfd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -551,33 +719,49 @@ func Dup(fd int) (nfd int, err error) {
return
}
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup2(from int, to int) (err error) {
- _, _, e1 := Syscall(SYS_DUP2, uintptr(from), uintptr(to), 0)
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Dup3(from int, to int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_DUP3, uintptr(from), uintptr(to), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Exit(code int) {
- Syscall(SYS_EXIT, uintptr(code), 0, 0)
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
return
}
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -586,43 +770,59 @@ func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FACCESSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchdir(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FCHDIR, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchflags(fd int, flags int) (err error) {
- _, _, e1 := Syscall(SYS_FCHFLAGS, uintptr(fd), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmod(fd int, mode uint32) (err error) {
- _, _, e1 := Syscall(SYS_FCHMOD, uintptr(fd), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
@@ -631,23 +831,31 @@ func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHMODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchown(fd int, uid int, gid int) (err error) {
- _, _, e1 := Syscall(SYS_FCHOWN, uintptr(fd), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
@@ -656,27 +864,35 @@ func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FCHOWNAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Flock(fd int, how int) (err error) {
- _, _, e1 := Syscall(SYS_FLOCK, uintptr(fd), uintptr(how), 0)
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fpathconf(fd int, name int) (val int, err error) {
- r0, _, e1 := Syscall(SYS_FPATHCONF, uintptr(fd), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -684,16 +900,24 @@ func Fpathconf(fd int, name int) (val int, err error) {
return
}
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstat(fd int, stat *Stat_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTAT, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
@@ -702,71 +926,99 @@ func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_FSTATAT, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fstatfs(fd int, stat *Statfs_t) (err error) {
- _, _, e1 := Syscall(SYS_FSTATFS, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Fsync(fd int) (err error) {
- _, _, e1 := Syscall(SYS_FSYNC, uintptr(fd), 0, 0)
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Ftruncate(fd int, length int64) (err error) {
- _, _, e1 := Syscall(SYS_FTRUNCATE, uintptr(fd), 0, uintptr(length))
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getegid() (egid int) {
- r0, _, _ := RawSyscall(SYS_GETEGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
egid = int(r0)
return
}
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Geteuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETEUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getgid() (gid int) {
- r0, _, _ := RawSyscall(SYS_GETGID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
gid = int(r0)
return
}
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgid(pid int) (pgid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETPGID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
pgid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -774,34 +1026,50 @@ func Getpgid(pid int) (pgid int, err error) {
return
}
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpgrp() (pgrp int) {
- r0, _, _ := RawSyscall(SYS_GETPGRP, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
pgrp = int(r0)
return
}
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpid() (pid int) {
- r0, _, _ := RawSyscall(SYS_GETPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
pid = int(r0)
return
}
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getppid() (ppid int) {
- r0, _, _ := RawSyscall(SYS_GETPPID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
ppid = int(r0)
return
}
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getpriority(which int, who int) (prio int, err error) {
- r0, _, e1 := Syscall(SYS_GETPRIORITY, uintptr(which), uintptr(who), 0)
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
prio = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -809,20 +1077,28 @@ func Getpriority(which int, who int) (prio int, err error) {
return
}
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrtable() (rtable int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETRTABLE, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
rtable = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -830,20 +1106,28 @@ func Getrtable() (rtable int, err error) {
return
}
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getrusage(who int, rusage *Rusage) (err error) {
- _, _, e1 := RawSyscall(SYS_GETRUSAGE, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getsid(pid int) (sid int, err error) {
- r0, _, e1 := RawSyscall(SYS_GETSID, uintptr(pid), 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
sid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -851,46 +1135,66 @@ func Getsid(pid int) (sid int, err error) {
return
}
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Gettimeofday(tv *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_GETTIMEOFDAY, uintptr(unsafe.Pointer(tv)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Getuid() (uid int) {
- r0, _, _ := RawSyscall(SYS_GETUID, 0, 0, 0)
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
uid = int(r0)
return
}
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Issetugid() (tainted bool) {
- r0, _, _ := Syscall(SYS_ISSETUGID, 0, 0, 0)
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
tainted = bool(r0 != 0)
return
}
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kill(pid int, signum syscall.Signal) (err error) {
- _, _, e1 := Syscall(SYS_KILL, uintptr(pid), uintptr(signum), 0)
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Kqueue() (fd int, err error) {
- r0, _, e1 := Syscall(SYS_KQUEUE, 0, 0, 0)
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -898,6 +1202,10 @@ func Kqueue() (fd int, err error) {
return
}
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lchown(path string, uid int, gid int) (err error) {
@@ -906,13 +1214,17 @@ func Lchown(path string, uid int, gid int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LCHOWN, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Link(path string, link string) (err error) {
@@ -926,13 +1238,17 @@ func Link(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
@@ -946,23 +1262,31 @@ func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err er
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_LINKAT, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Listen(s int, backlog int) (err error) {
- _, _, e1 := Syscall(SYS_LISTEN, uintptr(s), uintptr(backlog), 0)
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Lstat(path string, stat *Stat_t) (err error) {
@@ -971,13 +1295,17 @@ func Lstat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_LSTAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdir(path string, mode uint32) (err error) {
@@ -986,13 +1314,17 @@ func Mkdir(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIR, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkdirat(dirfd int, path string, mode uint32) (err error) {
@@ -1001,13 +1333,17 @@ func Mkdirat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKDIRAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifo(path string, mode uint32) (err error) {
@@ -1016,13 +1352,17 @@ func Mkfifo(path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFO, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
@@ -1031,13 +1371,17 @@ func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKFIFOAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknod(path string, mode uint32, dev int) (err error) {
@@ -1046,13 +1390,17 @@ func Mknod(path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_MKNOD, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
@@ -1061,23 +1409,31 @@ func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_MKNODAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
- _, _, e1 := Syscall(SYS_NANOSLEEP, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Open(path string, mode int, perm uint32) (fd int, err error) {
@@ -1086,7 +1442,7 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_OPEN, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1094,6 +1450,10 @@ func Open(path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
@@ -1102,7 +1462,7 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall6(SYS_OPENAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
fd = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1110,6 +1470,10 @@ func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
return
}
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Pathconf(path string, name int) (val int, err error) {
@@ -1118,7 +1482,7 @@ func Pathconf(path string, name int) (val int, err error) {
if err != nil {
return
}
- r0, _, e1 := Syscall(SYS_PATHCONF, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
val = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1126,6 +1490,10 @@ func Pathconf(path string, name int) (val int, err error) {
return
}
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pread(fd int, p []byte, offset int64) (n int, err error) {
@@ -1135,7 +1503,7 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PREAD, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1143,6 +1511,10 @@ func pread(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func pwrite(fd int, p []byte, offset int64) (n int, err error) {
@@ -1152,7 +1524,7 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_PWRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)), 0, uintptr(offset), 0)
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1160,6 +1532,10 @@ func pwrite(fd int, p []byte, offset int64) (n int, err error) {
return
}
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func read(fd int, p []byte) (n int, err error) {
@@ -1169,7 +1545,7 @@ func read(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1177,6 +1553,10 @@ func read(fd int, p []byte) (n int, err error) {
return
}
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlink(path string, buf []byte) (n int, err error) {
@@ -1191,7 +1571,7 @@ func Readlink(path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_READLINK, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1199,6 +1579,10 @@ func Readlink(path string, buf []byte) (n int, err error) {
return
}
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
@@ -1213,7 +1597,7 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
} else {
_p1 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall6(SYS_READLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1221,6 +1605,10 @@ func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
return
}
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rename(from string, to string) (err error) {
@@ -1234,13 +1622,17 @@ func Rename(from string, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RENAME, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Renameat(fromfd int, from string, tofd int, to string) (err error) {
@@ -1254,13 +1646,17 @@ func Renameat(fromfd int, from string, tofd int, to string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_RENAMEAT, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Revoke(path string) (err error) {
@@ -1269,13 +1665,17 @@ func Revoke(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_REVOKE, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Rmdir(path string) (err error) {
@@ -1284,17 +1684,21 @@ func Rmdir(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_RMDIR, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
- r0, _, e1 := Syscall6(SYS_LSEEK, uintptr(fd), 0, uintptr(offset), uintptr(whence), 0, 0)
+ r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
newoffset = int64(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1302,10 +1706,14 @@ func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
return
}
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
- r0, _, e1 := Syscall6(SYS_SELECT, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1313,36 +1721,52 @@ func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err
return
}
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setegid(egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEGID, uintptr(egid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Seteuid(euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETEUID, uintptr(euid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setgid(gid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETGID, uintptr(gid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setlogin(name string) (err error) {
@@ -1351,97 +1775,133 @@ func Setlogin(name string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SETLOGIN, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpgid(pid int, pgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETPGID, uintptr(pid), uintptr(pgid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setpriority(which int, who int, prio int) (err error) {
- _, _, e1 := Syscall(SYS_SETPRIORITY, uintptr(which), uintptr(who), uintptr(prio))
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setregid(rgid int, egid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREGID, uintptr(rgid), uintptr(egid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setreuid(ruid int, euid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETREUID, uintptr(ruid), uintptr(euid), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresgid(rgid int, egid int, sgid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESGID, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setresuid(ruid int, euid int, suid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRESUID, uintptr(ruid), uintptr(euid), uintptr(suid))
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrlimit(which int, lim *Rlimit) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRLIMIT, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setrtable(rtable int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETRTABLE, uintptr(rtable), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setsid() (pid int, err error) {
- r0, _, e1 := RawSyscall(SYS_SETSID, 0, 0, 0)
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
pid = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1449,26 +1909,38 @@ func Setsid() (pid int, err error) {
return
}
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Settimeofday(tp *Timeval) (err error) {
- _, _, e1 := RawSyscall(SYS_SETTIMEOFDAY, uintptr(unsafe.Pointer(tp)), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Setuid(uid int) (err error) {
- _, _, e1 := RawSyscall(SYS_SETUID, uintptr(uid), 0, 0)
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Stat(path string, stat *Stat_t) (err error) {
@@ -1477,13 +1949,17 @@ func Stat(path string, stat *Stat_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STAT, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Statfs(path string, stat *Statfs_t) (err error) {
@@ -1492,13 +1968,17 @@ func Statfs(path string, stat *Statfs_t) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_STATFS, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlink(path string, link string) (err error) {
@@ -1512,13 +1992,17 @@ func Symlink(path string, link string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINK, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
@@ -1532,23 +2016,31 @@ func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_SYMLINKAT, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Sync() (err error) {
- _, _, e1 := Syscall(SYS_SYNC, 0, 0, 0)
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Truncate(path string, length int64) (err error) {
@@ -1557,21 +2049,29 @@ func Truncate(path string, length int64) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_TRUNCATE, uintptr(unsafe.Pointer(_p0)), 0, uintptr(length))
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Umask(newmask int) (oldmask int) {
- r0, _, _ := Syscall(SYS_UMASK, uintptr(newmask), 0, 0)
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
oldmask = int(r0)
return
}
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlink(path string) (err error) {
@@ -1580,13 +2080,17 @@ func Unlink(path string) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINK, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unlinkat(dirfd int, path string, flags int) (err error) {
@@ -1595,13 +2099,17 @@ func Unlinkat(dirfd int, path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNLINKAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func Unmount(path string, flags int) (err error) {
@@ -1610,13 +2118,17 @@ func Unmount(path string, flags int) (err error) {
if err != nil {
return
}
- _, _, e1 := Syscall(SYS_UNMOUNT, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func write(fd int, p []byte) (n int, err error) {
@@ -1626,7 +2138,7 @@ func write(fd int, p []byte) (n int, err error) {
} else {
_p0 = unsafe.Pointer(&_zero)
}
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1634,10 +2146,14 @@ func write(fd int, p []byte) (n int, err error) {
return
}
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
- r0, _, e1 := Syscall9(SYS_MMAP, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), 0, uintptr(pos), 0, 0)
+ r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
ret = uintptr(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1645,20 +2161,28 @@ func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (
return
}
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func munmap(addr uintptr, length uintptr) (err error) {
- _, _, e1 := Syscall(SYS_MUNMAP, uintptr(addr), uintptr(length), 0)
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_READ, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1669,7 +2193,7 @@ func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
- r0, _, e1 := Syscall(SYS_WRITE, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
n = int(r0)
if e1 != 0 {
err = errnoErr(e1)
@@ -1685,9 +2209,13 @@ func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error
if err != nil {
return
}
- _, _, e1 := Syscall6(SYS_UTIMENSAT, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
if e1 != 0 {
err = errnoErr(e1)
}
return
}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
new file mode 100644
index 000000000..4efeff9ab
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_arm64.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd arm64
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgroups(SB)
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgroups(SB)
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_wait4(SB)
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
+DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_accept(SB)
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
+DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_bind(SB)
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
+DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connect(SB)
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socket(SB)
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockopt(SB)
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsockopt(SB)
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpeername(SB)
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockname(SB)
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shutdown(SB)
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socketpair(SB)
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvfrom(SB)
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendto(SB)
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvmsg(SB)
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendmsg(SB)
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kevent(SB)
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimes(SB)
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_futimes(SB)
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_poll(SB)
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_madvise(SB)
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
+DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlock(SB)
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlockall(SB)
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mprotect(SB)
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_msync(SB)
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlock(SB)
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlockall(SB)
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pipe2(SB)
+
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getdents(SB)
+
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ioctl(SB)
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ppoll(SB)
+
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_access(SB)
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
+DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_adjtime(SB)
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chdir(SB)
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chflags(SB)
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chmod(SB)
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chown(SB)
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chroot(SB)
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_close(SB)
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
+DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup(SB)
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup2(SB)
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup3(SB)
+
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_exit(SB)
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_faccessat(SB)
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchdir(SB)
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchflags(SB)
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmod(SB)
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmodat(SB)
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchown(SB)
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchownat(SB)
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_flock(SB)
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fpathconf(SB)
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstat(SB)
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatat(SB)
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatfs(SB)
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fsync(SB)
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ftruncate(SB)
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getegid(SB)
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_geteuid(SB)
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgid(SB)
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgid(SB)
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgrp(SB)
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpid(SB)
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getppid(SB)
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpriority(SB)
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrlimit(SB)
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrtable(SB)
+
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrusage(SB)
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsid(SB)
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getuid(SB)
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_issetugid(SB)
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kill(SB)
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kqueue(SB)
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lchown(SB)
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_link(SB)
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
+DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_linkat(SB)
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_listen(SB)
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lstat(SB)
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdir(SB)
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdirat(SB)
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifo(SB)
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifoat(SB)
+
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknod(SB)
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknodat(SB)
+
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_nanosleep(SB)
+
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
+DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_open(SB)
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
+DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_openat(SB)
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pathconf(SB)
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pread(SB)
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwrite(SB)
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_read(SB)
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
+DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlink(SB)
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlinkat(SB)
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rename(SB)
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameat(SB)
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_revoke(SB)
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
+DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rmdir(SB)
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lseek(SB)
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_select(SB)
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
+DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setegid(SB)
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_seteuid(SB)
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgid(SB)
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setlogin(SB)
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpgid(SB)
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpriority(SB)
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setregid(SB)
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setreuid(SB)
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresgid(SB)
+
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresuid(SB)
+
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrlimit(SB)
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrtable(SB)
+
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsid(SB)
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_settimeofday(SB)
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setuid(SB)
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_stat(SB)
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlink(SB)
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlinkat(SB)
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sync(SB)
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_truncate(SB)
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_umask(SB)
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
+DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlink(SB)
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlinkat(SB)
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unmount(SB)
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_write(SB)
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
+DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mmap(SB)
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munmap(SB)
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
+
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
new file mode 100644
index 000000000..c85de2d97
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.go
@@ -0,0 +1,2221 @@
+// go run mksyscall.go -openbsd -libc -tags openbsd,ppc64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_ppc64.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build openbsd && ppc64
+// +build openbsd,ppc64
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(ngid int, gid *_Gid_t) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ wpid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(s int, how int) (err error) {
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, timeval *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func futimes(fd int, timeval *[2]Timeval) (err error) {
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Madvise(b []byte, behav int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlockall(flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Msync(b []byte, flags int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlockall() (err error) {
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Access(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chflags(path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chmod(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Close(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup(fd int) (nfd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
+ nfd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup2(from int, to int) (err error) {
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup3(from int, to int, flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
+ return
+}
+
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchflags(fd int, flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Flock(fd int, how int) (err error) {
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fpathconf(fd int, name int) (val int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (uid int) {
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
+ pgid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgrp() (pgrp int) {
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
+ pgrp = int(r0)
+ return
+}
+
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (ppid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
+ ppid = int(r0)
+ return
+}
+
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
+ prio = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(which int, lim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrtable() (rtable int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
+ rtable = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getsid(pid int) (sid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
+ sid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Issetugid() (tainted bool) {
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
+ tainted = bool(r0 != 0)
+ return
+}
+
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, signum syscall.Signal) (err error) {
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kqueue() (fd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lchown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Link(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, backlog int) (err error) {
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdir(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdirat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifo(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknod(path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Open(path string, mode int, perm uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pathconf(path string, name int) (val int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlink(path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rename(from string, to string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(fromfd int, from string, tofd int, to string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Revoke(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rmdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
+ r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
+ newoffset = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setegid(egid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seteuid(euid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setgid(gid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setlogin(name string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(which int, lim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrtable(rtable int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
+ pid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Settimeofday(tp *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setuid(uid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Stat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, stat *Statfs_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlink(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() (err error) {
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(newmask int) (oldmask int) {
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
+ oldmask = int(r0)
+ return
+}
+
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlink(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unmount(path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
+ r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
new file mode 100644
index 000000000..7c9223b64
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_ppc64.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd ppc64
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getgroups(SB)
+ RET
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setgroups(SB)
+ RET
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_wait4(SB)
+ RET
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
+DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_accept(SB)
+ RET
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
+DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_bind(SB)
+ RET
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
+DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_connect(SB)
+ RET
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_socket(SB)
+ RET
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getsockopt(SB)
+ RET
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setsockopt(SB)
+ RET
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getpeername(SB)
+ RET
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getsockname(SB)
+ RET
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_shutdown(SB)
+ RET
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_socketpair(SB)
+ RET
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_recvfrom(SB)
+ RET
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_sendto(SB)
+ RET
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_recvmsg(SB)
+ RET
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_sendmsg(SB)
+ RET
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_kevent(SB)
+ RET
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_utimes(SB)
+ RET
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_futimes(SB)
+ RET
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_poll(SB)
+ RET
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_madvise(SB)
+ RET
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
+DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mlock(SB)
+ RET
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mlockall(SB)
+ RET
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mprotect(SB)
+ RET
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_msync(SB)
+ RET
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_munlock(SB)
+ RET
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_munlockall(SB)
+ RET
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_pipe2(SB)
+ RET
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getdents(SB)
+ RET
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getcwd(SB)
+ RET
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_ioctl(SB)
+ RET
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_sysctl(SB)
+ RET
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_ppoll(SB)
+ RET
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_access(SB)
+ RET
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
+DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_adjtime(SB)
+ RET
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_chdir(SB)
+ RET
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_chflags(SB)
+ RET
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_chmod(SB)
+ RET
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_chown(SB)
+ RET
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_chroot(SB)
+ RET
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_close(SB)
+ RET
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
+DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_dup(SB)
+ RET
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_dup2(SB)
+ RET
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_dup3(SB)
+ RET
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_exit(SB)
+ RET
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_faccessat(SB)
+ RET
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchdir(SB)
+ RET
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchflags(SB)
+ RET
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchmod(SB)
+ RET
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchmodat(SB)
+ RET
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchown(SB)
+ RET
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fchownat(SB)
+ RET
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_flock(SB)
+ RET
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fpathconf(SB)
+ RET
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fstat(SB)
+ RET
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fstatat(SB)
+ RET
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fstatfs(SB)
+ RET
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_fsync(SB)
+ RET
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_ftruncate(SB)
+ RET
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getegid(SB)
+ RET
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_geteuid(SB)
+ RET
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getgid(SB)
+ RET
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getpgid(SB)
+ RET
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getpgrp(SB)
+ RET
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getpid(SB)
+ RET
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getppid(SB)
+ RET
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getpriority(SB)
+ RET
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getrlimit(SB)
+ RET
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getrtable(SB)
+ RET
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getrusage(SB)
+ RET
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getsid(SB)
+ RET
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_gettimeofday(SB)
+ RET
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_getuid(SB)
+ RET
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_issetugid(SB)
+ RET
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_kill(SB)
+ RET
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_kqueue(SB)
+ RET
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_lchown(SB)
+ RET
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_link(SB)
+ RET
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
+DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_linkat(SB)
+ RET
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_listen(SB)
+ RET
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_lstat(SB)
+ RET
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mkdir(SB)
+ RET
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mkdirat(SB)
+ RET
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mkfifo(SB)
+ RET
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mkfifoat(SB)
+ RET
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mknod(SB)
+ RET
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mknodat(SB)
+ RET
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_nanosleep(SB)
+ RET
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
+DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_open(SB)
+ RET
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
+DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_openat(SB)
+ RET
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_pathconf(SB)
+ RET
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_pread(SB)
+ RET
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_pwrite(SB)
+ RET
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_read(SB)
+ RET
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
+DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_readlink(SB)
+ RET
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_readlinkat(SB)
+ RET
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_rename(SB)
+ RET
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_renameat(SB)
+ RET
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_revoke(SB)
+ RET
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
+DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_rmdir(SB)
+ RET
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_lseek(SB)
+ RET
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_select(SB)
+ RET
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
+DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setegid(SB)
+ RET
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_seteuid(SB)
+ RET
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setgid(SB)
+ RET
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setlogin(SB)
+ RET
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setpgid(SB)
+ RET
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setpriority(SB)
+ RET
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setregid(SB)
+ RET
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setreuid(SB)
+ RET
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setresgid(SB)
+ RET
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setresuid(SB)
+ RET
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setrlimit(SB)
+ RET
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setrtable(SB)
+ RET
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setsid(SB)
+ RET
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_settimeofday(SB)
+ RET
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_setuid(SB)
+ RET
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_stat(SB)
+ RET
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_statfs(SB)
+ RET
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_symlink(SB)
+ RET
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_symlinkat(SB)
+ RET
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_sync(SB)
+ RET
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_truncate(SB)
+ RET
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_umask(SB)
+ RET
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
+DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_unlink(SB)
+ RET
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_unlinkat(SB)
+ RET
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_unmount(SB)
+ RET
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_write(SB)
+ RET
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
+DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_mmap(SB)
+ RET
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_munmap(SB)
+ RET
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ CALL libc_utimensat(SB)
+ RET
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
new file mode 100644
index 000000000..8e3e7873f
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.go
@@ -0,0 +1,2221 @@
+// go run mksyscall.go -openbsd -libc -tags openbsd,riscv64 syscall_bsd.go syscall_openbsd.go syscall_openbsd_riscv64.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build openbsd && riscv64
+// +build openbsd,riscv64
+
+package unix
+
+import (
+ "syscall"
+ "unsafe"
+)
+
+var _ syscall.Errno
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getgroups(ngid int, gid *_Gid_t) (n int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgroups getgroups "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setgroups(ngid int, gid *_Gid_t) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setgroups_trampoline_addr, uintptr(ngid), uintptr(unsafe.Pointer(gid)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setgroups_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgroups setgroups "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func wait4(pid int, wstatus *_C_int, options int, rusage *Rusage) (wpid int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_wait4_trampoline_addr, uintptr(pid), uintptr(unsafe.Pointer(wstatus)), uintptr(options), uintptr(unsafe.Pointer(rusage)), 0, 0)
+ wpid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_wait4_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_wait4 wait4 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func accept(s int, rsa *RawSockaddrAny, addrlen *_Socklen) (fd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_accept_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_accept_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_accept accept "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func bind(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(libc_bind_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_bind_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_bind bind "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func connect(s int, addr unsafe.Pointer, addrlen _Socklen) (err error) {
+ _, _, e1 := syscall_syscall(libc_connect_trampoline_addr, uintptr(s), uintptr(addr), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_connect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_connect connect "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socket(domain int, typ int, proto int) (fd int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_socket_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_socket_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socket socket "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockopt(s int, level int, name int, val unsafe.Pointer, vallen *_Socklen) (err error) {
+ _, _, e1 := syscall_syscall6(libc_getsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(unsafe.Pointer(vallen)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockopt getsockopt "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func setsockopt(s int, level int, name int, val unsafe.Pointer, vallen uintptr) (err error) {
+ _, _, e1 := syscall_syscall6(libc_setsockopt_trampoline_addr, uintptr(s), uintptr(level), uintptr(name), uintptr(val), uintptr(vallen), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setsockopt_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsockopt setsockopt "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getpeername(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getpeername_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpeername_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpeername getpeername "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getsockname(fd int, rsa *RawSockaddrAny, addrlen *_Socklen) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getsockname_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(rsa)), uintptr(unsafe.Pointer(addrlen)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsockname_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsockname getsockname "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Shutdown(s int, how int) (err error) {
+ _, _, e1 := syscall_syscall(libc_shutdown_trampoline_addr, uintptr(s), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_shutdown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_shutdown shutdown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func socketpair(domain int, typ int, proto int, fd *[2]int32) (err error) {
+ _, _, e1 := syscall_rawSyscall6(libc_socketpair_trampoline_addr, uintptr(domain), uintptr(typ), uintptr(proto), uintptr(unsafe.Pointer(fd)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_socketpair_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_socketpair socketpair "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvfrom(fd int, p []byte, flags int, from *RawSockaddrAny, fromlen *_Socklen) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_recvfrom_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(flags), uintptr(unsafe.Pointer(from)), uintptr(unsafe.Pointer(fromlen)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_recvfrom_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvfrom recvfrom "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendto(s int, buf []byte, flags int, to unsafe.Pointer, addrlen _Socklen) (err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(libc_sendto_trampoline_addr, uintptr(s), uintptr(_p0), uintptr(len(buf)), uintptr(flags), uintptr(to), uintptr(addrlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sendto_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendto sendto "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func recvmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_recvmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_recvmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_recvmsg recvmsg "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sendmsg(s int, msg *Msghdr, flags int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_sendmsg_trampoline_addr, uintptr(s), uintptr(unsafe.Pointer(msg)), uintptr(flags))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sendmsg_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sendmsg sendmsg "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func kevent(kq int, change unsafe.Pointer, nchange int, event unsafe.Pointer, nevent int, timeout *Timespec) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_kevent_trampoline_addr, uintptr(kq), uintptr(change), uintptr(nchange), uintptr(event), uintptr(nevent), uintptr(unsafe.Pointer(timeout)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kevent_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kevent kevent "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimes(path string, timeval *[2]Timeval) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_utimes_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(timeval)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_utimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimes utimes "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func futimes(fd int, timeval *[2]Timeval) (err error) {
+ _, _, e1 := syscall_syscall(libc_futimes_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(timeval)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_futimes_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_futimes futimes "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func poll(fds *PollFd, nfds int, timeout int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_poll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(timeout))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_poll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_poll poll "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Madvise(b []byte, behav int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_madvise_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(behav))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_madvise_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_madvise madvise "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_mlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlock mlock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mlockall(flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_mlockall_trampoline_addr, uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mlockall mlockall "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mprotect(b []byte, prot int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_mprotect_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(prot))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mprotect_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mprotect mprotect "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Msync(b []byte, flags int) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_msync_trampoline_addr, uintptr(_p0), uintptr(len(b)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_msync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_msync msync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlock(b []byte) (err error) {
+ var _p0 unsafe.Pointer
+ if len(b) > 0 {
+ _p0 = unsafe.Pointer(&b[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall(libc_munlock_trampoline_addr, uintptr(_p0), uintptr(len(b)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munlock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlock munlock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Munlockall() (err error) {
+ _, _, e1 := syscall_syscall(libc_munlockall_trampoline_addr, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munlockall_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munlockall munlockall "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pipe2(p *[2]_C_int, flags int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_pipe2_trampoline_addr, uintptr(unsafe.Pointer(p)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pipe2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pipe2 pipe2 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getdents(fd int, buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_getdents_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getdents_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getdents getdents "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getcwd(buf []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(buf) > 0 {
+ _p0 = unsafe.Pointer(&buf[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_getcwd_trampoline_addr, uintptr(_p0), uintptr(len(buf)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getcwd_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getcwd getcwd "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ioctl(fd int, req uint, arg uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_ioctl_trampoline_addr, uintptr(fd), uintptr(req), uintptr(arg))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ioctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ioctl ioctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func sysctl(mib []_C_int, old *byte, oldlen *uintptr, new *byte, newlen uintptr) (err error) {
+ var _p0 unsafe.Pointer
+ if len(mib) > 0 {
+ _p0 = unsafe.Pointer(&mib[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ _, _, e1 := syscall_syscall6(libc_sysctl_trampoline_addr, uintptr(_p0), uintptr(len(mib)), uintptr(unsafe.Pointer(old)), uintptr(unsafe.Pointer(oldlen)), uintptr(unsafe.Pointer(new)), uintptr(newlen))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sysctl_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sysctl sysctl "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func ppoll(fds *PollFd, nfds int, timeout *Timespec, sigmask *Sigset_t) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_ppoll_trampoline_addr, uintptr(unsafe.Pointer(fds)), uintptr(nfds), uintptr(unsafe.Pointer(timeout)), uintptr(unsafe.Pointer(sigmask)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ppoll_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ppoll ppoll "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Access(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_access_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_access_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_access access "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Adjtime(delta *Timeval, olddelta *Timeval) (err error) {
+ _, _, e1 := syscall_syscall(libc_adjtime_trampoline_addr, uintptr(unsafe.Pointer(delta)), uintptr(unsafe.Pointer(olddelta)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_adjtime_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_adjtime adjtime "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chdir chdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chflags(path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chflags_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chflags chflags "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chmod(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chmod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chmod chmod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chown chown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Chroot(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_chroot_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_chroot_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_chroot chroot "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Close(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_close_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_close_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_close close "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup(fd int) (nfd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_dup_trampoline_addr, uintptr(fd), 0, 0)
+ nfd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup dup "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup2(from int, to int) (err error) {
+ _, _, e1 := syscall_syscall(libc_dup2_trampoline_addr, uintptr(from), uintptr(to), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup2_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup2 dup2 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Dup3(from int, to int, flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_dup3_trampoline_addr, uintptr(from), uintptr(to), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_dup3_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_dup3 dup3 "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Exit(code int) {
+ syscall_syscall(libc_exit_trampoline_addr, uintptr(code), 0, 0)
+ return
+}
+
+var libc_exit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_exit exit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Faccessat(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_faccessat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_faccessat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_faccessat faccessat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchdir(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchdir_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchdir fchdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchflags(fd int, flags int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchflags_trampoline_addr, uintptr(fd), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchflags_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchflags fchflags "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmod(fd int, mode uint32) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchmod_trampoline_addr, uintptr(fd), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchmod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmod fchmod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchmodat(dirfd int, path string, mode uint32, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fchmodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchmodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchmodat fchmodat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchown(fd int, uid int, gid int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fchown_trampoline_addr, uintptr(fd), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchown fchown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fchownat(dirfd int, path string, uid int, gid int, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fchownat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fchownat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fchownat fchownat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Flock(fd int, how int) (err error) {
+ _, _, e1 := syscall_syscall(libc_flock_trampoline_addr, uintptr(fd), uintptr(how), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_flock_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_flock flock "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fpathconf(fd int, name int) (val int, err error) {
+ r0, _, e1 := syscall_syscall(libc_fpathconf_trampoline_addr, uintptr(fd), uintptr(name), 0)
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fpathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fpathconf fpathconf "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstat(fd int, stat *Stat_t) (err error) {
+ _, _, e1 := syscall_syscall(libc_fstat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstat fstat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatat(fd int, path string, stat *Stat_t, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_fstatat_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstatat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatat fstatat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fstatfs(fd int, stat *Statfs_t) (err error) {
+ _, _, e1 := syscall_syscall(libc_fstatfs_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fstatfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fstatfs fstatfs "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Fsync(fd int) (err error) {
+ _, _, e1 := syscall_syscall(libc_fsync_trampoline_addr, uintptr(fd), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_fsync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_fsync fsync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Ftruncate(fd int, length int64) (err error) {
+ _, _, e1 := syscall_syscall(libc_ftruncate_trampoline_addr, uintptr(fd), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_ftruncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_ftruncate ftruncate "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getegid() (egid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getegid_trampoline_addr, 0, 0, 0)
+ egid = int(r0)
+ return
+}
+
+var libc_getegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getegid getegid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Geteuid() (uid int) {
+ r0, _, _ := syscall_rawSyscall(libc_geteuid_trampoline_addr, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+var libc_geteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_geteuid geteuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getgid() (gid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getgid_trampoline_addr, 0, 0, 0)
+ gid = int(r0)
+ return
+}
+
+var libc_getgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getgid getgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgid(pid int) (pgid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getpgid_trampoline_addr, uintptr(pid), 0, 0)
+ pgid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgid getpgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpgrp() (pgrp int) {
+ r0, _, _ := syscall_rawSyscall(libc_getpgrp_trampoline_addr, 0, 0, 0)
+ pgrp = int(r0)
+ return
+}
+
+var libc_getpgrp_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpgrp getpgrp "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpid() (pid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getpid_trampoline_addr, 0, 0, 0)
+ pid = int(r0)
+ return
+}
+
+var libc_getpid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpid getpid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getppid() (ppid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getppid_trampoline_addr, 0, 0, 0)
+ ppid = int(r0)
+ return
+}
+
+var libc_getppid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getppid getppid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getpriority(which int, who int) (prio int, err error) {
+ r0, _, e1 := syscall_syscall(libc_getpriority_trampoline_addr, uintptr(which), uintptr(who), 0)
+ prio = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getpriority getpriority "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrlimit(which int, lim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrlimit getrlimit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrtable() (rtable int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getrtable_trampoline_addr, 0, 0, 0)
+ rtable = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrtable getrtable "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getrusage(who int, rusage *Rusage) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_getrusage_trampoline_addr, uintptr(who), uintptr(unsafe.Pointer(rusage)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getrusage_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getrusage getrusage "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getsid(pid int) (sid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_getsid_trampoline_addr, uintptr(pid), 0, 0)
+ sid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_getsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getsid getsid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Gettimeofday(tv *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_gettimeofday_trampoline_addr, uintptr(unsafe.Pointer(tv)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_gettimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_gettimeofday gettimeofday "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Getuid() (uid int) {
+ r0, _, _ := syscall_rawSyscall(libc_getuid_trampoline_addr, 0, 0, 0)
+ uid = int(r0)
+ return
+}
+
+var libc_getuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_getuid getuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Issetugid() (tainted bool) {
+ r0, _, _ := syscall_syscall(libc_issetugid_trampoline_addr, 0, 0, 0)
+ tainted = bool(r0 != 0)
+ return
+}
+
+var libc_issetugid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_issetugid issetugid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kill(pid int, signum syscall.Signal) (err error) {
+ _, _, e1 := syscall_syscall(libc_kill_trampoline_addr, uintptr(pid), uintptr(signum), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kill_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kill kill "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Kqueue() (fd int, err error) {
+ r0, _, e1 := syscall_syscall(libc_kqueue_trampoline_addr, 0, 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_kqueue_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_kqueue kqueue "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lchown(path string, uid int, gid int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_lchown_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(uid), uintptr(gid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lchown_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lchown lchown "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Link(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_link_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_link_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_link link "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Linkat(pathfd int, path string, linkfd int, link string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_linkat_trampoline_addr, uintptr(pathfd), uintptr(unsafe.Pointer(_p0)), uintptr(linkfd), uintptr(unsafe.Pointer(_p1)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_linkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_linkat linkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Listen(s int, backlog int) (err error) {
+ _, _, e1 := syscall_syscall(libc_listen_trampoline_addr, uintptr(s), uintptr(backlog), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_listen_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_listen listen "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Lstat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_lstat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lstat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lstat lstat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdir(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdir mkdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkdirat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkdirat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkdirat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkdirat mkdirat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifo(path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkfifo_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkfifo_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifo mkfifo "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mkfifoat(dirfd int, path string, mode uint32) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mkfifoat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mkfifoat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mkfifoat mkfifoat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknod(path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_mknod_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mknod_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknod mknod "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Mknodat(dirfd int, path string, mode uint32, dev int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_mknodat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(dev), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mknodat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mknodat mknodat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Nanosleep(time *Timespec, leftover *Timespec) (err error) {
+ _, _, e1 := syscall_syscall(libc_nanosleep_trampoline_addr, uintptr(unsafe.Pointer(time)), uintptr(unsafe.Pointer(leftover)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_nanosleep_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_nanosleep nanosleep "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Open(path string, mode int, perm uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(libc_open_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm))
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_open_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_open open "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Openat(dirfd int, path string, mode int, perm uint32) (fd int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall6(libc_openat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(mode), uintptr(perm), 0, 0)
+ fd = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_openat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_openat openat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Pathconf(path string, name int) (val int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ r0, _, e1 := syscall_syscall(libc_pathconf_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(name), 0)
+ val = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pathconf_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pathconf pathconf "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pread(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pread_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pread_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pread pread "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func pwrite(fd int, p []byte, offset int64) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_pwrite_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)), uintptr(offset), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_pwrite_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_pwrite pwrite "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func read(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_read_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_read read "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlink(path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_readlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlink readlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Readlinkat(dirfd int, path string, buf []byte) (n int, err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 unsafe.Pointer
+ if len(buf) > 0 {
+ _p1 = unsafe.Pointer(&buf[0])
+ } else {
+ _p1 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall6(libc_readlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(_p1), uintptr(len(buf)), 0, 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_readlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_readlinkat readlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rename(from string, to string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_rename_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_rename_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rename rename "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Renameat(fromfd int, from string, tofd int, to string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(from)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(to)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_renameat_trampoline_addr, uintptr(fromfd), uintptr(unsafe.Pointer(_p0)), uintptr(tofd), uintptr(unsafe.Pointer(_p1)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_renameat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_renameat renameat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Revoke(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_revoke_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_revoke_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_revoke revoke "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Rmdir(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_rmdir_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_rmdir_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_rmdir rmdir "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seek(fd int, offset int64, whence int) (newoffset int64, err error) {
+ r0, _, e1 := syscall_syscall(libc_lseek_trampoline_addr, uintptr(fd), uintptr(offset), uintptr(whence))
+ newoffset = int64(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_lseek_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_lseek lseek "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Select(nfd int, r *FdSet, w *FdSet, e *FdSet, timeout *Timeval) (n int, err error) {
+ r0, _, e1 := syscall_syscall6(libc_select_trampoline_addr, uintptr(nfd), uintptr(unsafe.Pointer(r)), uintptr(unsafe.Pointer(w)), uintptr(unsafe.Pointer(e)), uintptr(unsafe.Pointer(timeout)), 0)
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_select_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_select select "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setegid(egid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setegid_trampoline_addr, uintptr(egid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setegid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setegid setegid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Seteuid(euid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_seteuid_trampoline_addr, uintptr(euid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_seteuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_seteuid seteuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setgid(gid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setgid_trampoline_addr, uintptr(gid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setgid setgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setlogin(name string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(name)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_setlogin_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setlogin_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setlogin setlogin "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpgid(pid int, pgid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setpgid_trampoline_addr, uintptr(pid), uintptr(pgid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setpgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpgid setpgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setpriority(which int, who int, prio int) (err error) {
+ _, _, e1 := syscall_syscall(libc_setpriority_trampoline_addr, uintptr(which), uintptr(who), uintptr(prio))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setpriority_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setpriority setpriority "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setregid(rgid int, egid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setregid_trampoline_addr, uintptr(rgid), uintptr(egid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setregid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setregid setregid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setreuid(ruid int, euid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setreuid_trampoline_addr, uintptr(ruid), uintptr(euid), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setreuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setreuid setreuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresgid(rgid int, egid int, sgid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setresgid_trampoline_addr, uintptr(rgid), uintptr(egid), uintptr(sgid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setresgid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresgid setresgid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setresuid(ruid int, euid int, suid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setresuid_trampoline_addr, uintptr(ruid), uintptr(euid), uintptr(suid))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setresuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setresuid setresuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrlimit(which int, lim *Rlimit) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setrlimit_trampoline_addr, uintptr(which), uintptr(unsafe.Pointer(lim)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setrlimit_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrlimit setrlimit "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setrtable(rtable int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setrtable_trampoline_addr, uintptr(rtable), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setrtable_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setrtable setrtable "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setsid() (pid int, err error) {
+ r0, _, e1 := syscall_rawSyscall(libc_setsid_trampoline_addr, 0, 0, 0)
+ pid = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setsid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setsid setsid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Settimeofday(tp *Timeval) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_settimeofday_trampoline_addr, uintptr(unsafe.Pointer(tp)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_settimeofday_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_settimeofday settimeofday "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Setuid(uid int) (err error) {
+ _, _, e1 := syscall_rawSyscall(libc_setuid_trampoline_addr, uintptr(uid), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_setuid_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_setuid setuid "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Stat(path string, stat *Stat_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_stat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_stat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_stat stat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Statfs(path string, stat *Statfs_t) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_statfs_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(stat)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_statfs_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_statfs statfs "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlink(path string, link string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(link)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_symlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(_p1)), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_symlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlink symlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Symlinkat(oldpath string, newdirfd int, newpath string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(oldpath)
+ if err != nil {
+ return
+ }
+ var _p1 *byte
+ _p1, err = BytePtrFromString(newpath)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_symlinkat_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(newdirfd), uintptr(unsafe.Pointer(_p1)))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_symlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_symlinkat symlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Sync() (err error) {
+ _, _, e1 := syscall_syscall(libc_sync_trampoline_addr, 0, 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_sync_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_sync sync "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Truncate(path string, length int64) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_truncate_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_truncate_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_truncate truncate "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Umask(newmask int) (oldmask int) {
+ r0, _, _ := syscall_syscall(libc_umask_trampoline_addr, uintptr(newmask), 0, 0)
+ oldmask = int(r0)
+ return
+}
+
+var libc_umask_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_umask umask "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlink(path string) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unlink_trampoline_addr, uintptr(unsafe.Pointer(_p0)), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unlink_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlink unlink "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unlinkat(dirfd int, path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unlinkat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(flags))
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unlinkat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unlinkat unlinkat "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func Unmount(path string, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall(libc_unmount_trampoline_addr, uintptr(unsafe.Pointer(_p0)), uintptr(flags), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_unmount_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_unmount unmount "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func write(fd int, p []byte) (n int, err error) {
+ var _p0 unsafe.Pointer
+ if len(p) > 0 {
+ _p0 = unsafe.Pointer(&p[0])
+ } else {
+ _p0 = unsafe.Pointer(&_zero)
+ }
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(_p0), uintptr(len(p)))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_write_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_write write "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func mmap(addr uintptr, length uintptr, prot int, flag int, fd int, pos int64) (ret uintptr, err error) {
+ r0, _, e1 := syscall_syscall6(libc_mmap_trampoline_addr, uintptr(addr), uintptr(length), uintptr(prot), uintptr(flag), uintptr(fd), uintptr(pos))
+ ret = uintptr(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_mmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_mmap mmap "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func munmap(addr uintptr, length uintptr) (err error) {
+ _, _, e1 := syscall_syscall(libc_munmap_trampoline_addr, uintptr(addr), uintptr(length), 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_munmap_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_munmap munmap "libc.so"
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func readlen(fd int, buf *byte, nbuf int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_read_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func writelen(fd int, buf *byte, nbuf int) (n int, err error) {
+ r0, _, e1 := syscall_syscall(libc_write_trampoline_addr, uintptr(fd), uintptr(unsafe.Pointer(buf)), uintptr(nbuf))
+ n = int(r0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func utimensat(dirfd int, path string, times *[2]Timespec, flags int) (err error) {
+ var _p0 *byte
+ _p0, err = BytePtrFromString(path)
+ if err != nil {
+ return
+ }
+ _, _, e1 := syscall_syscall6(libc_utimensat_trampoline_addr, uintptr(dirfd), uintptr(unsafe.Pointer(_p0)), uintptr(unsafe.Pointer(times)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+var libc_utimensat_trampoline_addr uintptr
+
+//go:cgo_import_dynamic libc_utimensat utimensat "libc.so"
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
new file mode 100644
index 000000000..7dba78927
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_openbsd_riscv64.s
@@ -0,0 +1,796 @@
+// go run mkasm.go openbsd riscv64
+// Code generated by the command above; DO NOT EDIT.
+
+#include "textflag.h"
+
+TEXT libc_getgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgroups(SB)
+
+GLOBL ·libc_getgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgroups_trampoline_addr(SB)/8, $libc_getgroups_trampoline<>(SB)
+
+TEXT libc_setgroups_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgroups(SB)
+
+GLOBL ·libc_setgroups_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgroups_trampoline_addr(SB)/8, $libc_setgroups_trampoline<>(SB)
+
+TEXT libc_wait4_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_wait4(SB)
+
+GLOBL ·libc_wait4_trampoline_addr(SB), RODATA, $8
+DATA ·libc_wait4_trampoline_addr(SB)/8, $libc_wait4_trampoline<>(SB)
+
+TEXT libc_accept_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_accept(SB)
+
+GLOBL ·libc_accept_trampoline_addr(SB), RODATA, $8
+DATA ·libc_accept_trampoline_addr(SB)/8, $libc_accept_trampoline<>(SB)
+
+TEXT libc_bind_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_bind(SB)
+
+GLOBL ·libc_bind_trampoline_addr(SB), RODATA, $8
+DATA ·libc_bind_trampoline_addr(SB)/8, $libc_bind_trampoline<>(SB)
+
+TEXT libc_connect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_connect(SB)
+
+GLOBL ·libc_connect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_connect_trampoline_addr(SB)/8, $libc_connect_trampoline<>(SB)
+
+TEXT libc_socket_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socket(SB)
+
+GLOBL ·libc_socket_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socket_trampoline_addr(SB)/8, $libc_socket_trampoline<>(SB)
+
+TEXT libc_getsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockopt(SB)
+
+GLOBL ·libc_getsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockopt_trampoline_addr(SB)/8, $libc_getsockopt_trampoline<>(SB)
+
+TEXT libc_setsockopt_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsockopt(SB)
+
+GLOBL ·libc_setsockopt_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsockopt_trampoline_addr(SB)/8, $libc_setsockopt_trampoline<>(SB)
+
+TEXT libc_getpeername_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpeername(SB)
+
+GLOBL ·libc_getpeername_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpeername_trampoline_addr(SB)/8, $libc_getpeername_trampoline<>(SB)
+
+TEXT libc_getsockname_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsockname(SB)
+
+GLOBL ·libc_getsockname_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsockname_trampoline_addr(SB)/8, $libc_getsockname_trampoline<>(SB)
+
+TEXT libc_shutdown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_shutdown(SB)
+
+GLOBL ·libc_shutdown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_shutdown_trampoline_addr(SB)/8, $libc_shutdown_trampoline<>(SB)
+
+TEXT libc_socketpair_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_socketpair(SB)
+
+GLOBL ·libc_socketpair_trampoline_addr(SB), RODATA, $8
+DATA ·libc_socketpair_trampoline_addr(SB)/8, $libc_socketpair_trampoline<>(SB)
+
+TEXT libc_recvfrom_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvfrom(SB)
+
+GLOBL ·libc_recvfrom_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvfrom_trampoline_addr(SB)/8, $libc_recvfrom_trampoline<>(SB)
+
+TEXT libc_sendto_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendto(SB)
+
+GLOBL ·libc_sendto_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendto_trampoline_addr(SB)/8, $libc_sendto_trampoline<>(SB)
+
+TEXT libc_recvmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_recvmsg(SB)
+
+GLOBL ·libc_recvmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_recvmsg_trampoline_addr(SB)/8, $libc_recvmsg_trampoline<>(SB)
+
+TEXT libc_sendmsg_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sendmsg(SB)
+
+GLOBL ·libc_sendmsg_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sendmsg_trampoline_addr(SB)/8, $libc_sendmsg_trampoline<>(SB)
+
+TEXT libc_kevent_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kevent(SB)
+
+GLOBL ·libc_kevent_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kevent_trampoline_addr(SB)/8, $libc_kevent_trampoline<>(SB)
+
+TEXT libc_utimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimes(SB)
+
+GLOBL ·libc_utimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimes_trampoline_addr(SB)/8, $libc_utimes_trampoline<>(SB)
+
+TEXT libc_futimes_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_futimes(SB)
+
+GLOBL ·libc_futimes_trampoline_addr(SB), RODATA, $8
+DATA ·libc_futimes_trampoline_addr(SB)/8, $libc_futimes_trampoline<>(SB)
+
+TEXT libc_poll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_poll(SB)
+
+GLOBL ·libc_poll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_poll_trampoline_addr(SB)/8, $libc_poll_trampoline<>(SB)
+
+TEXT libc_madvise_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_madvise(SB)
+
+GLOBL ·libc_madvise_trampoline_addr(SB), RODATA, $8
+DATA ·libc_madvise_trampoline_addr(SB)/8, $libc_madvise_trampoline<>(SB)
+
+TEXT libc_mlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlock(SB)
+
+GLOBL ·libc_mlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlock_trampoline_addr(SB)/8, $libc_mlock_trampoline<>(SB)
+
+TEXT libc_mlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mlockall(SB)
+
+GLOBL ·libc_mlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mlockall_trampoline_addr(SB)/8, $libc_mlockall_trampoline<>(SB)
+
+TEXT libc_mprotect_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mprotect(SB)
+
+GLOBL ·libc_mprotect_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mprotect_trampoline_addr(SB)/8, $libc_mprotect_trampoline<>(SB)
+
+TEXT libc_msync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_msync(SB)
+
+GLOBL ·libc_msync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_msync_trampoline_addr(SB)/8, $libc_msync_trampoline<>(SB)
+
+TEXT libc_munlock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlock(SB)
+
+GLOBL ·libc_munlock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlock_trampoline_addr(SB)/8, $libc_munlock_trampoline<>(SB)
+
+TEXT libc_munlockall_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munlockall(SB)
+
+GLOBL ·libc_munlockall_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munlockall_trampoline_addr(SB)/8, $libc_munlockall_trampoline<>(SB)
+
+TEXT libc_pipe2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pipe2(SB)
+
+GLOBL ·libc_pipe2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pipe2_trampoline_addr(SB)/8, $libc_pipe2_trampoline<>(SB)
+
+TEXT libc_getdents_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getdents(SB)
+
+GLOBL ·libc_getdents_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getdents_trampoline_addr(SB)/8, $libc_getdents_trampoline<>(SB)
+
+TEXT libc_getcwd_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getcwd(SB)
+
+GLOBL ·libc_getcwd_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getcwd_trampoline_addr(SB)/8, $libc_getcwd_trampoline<>(SB)
+
+TEXT libc_ioctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ioctl(SB)
+
+GLOBL ·libc_ioctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ioctl_trampoline_addr(SB)/8, $libc_ioctl_trampoline<>(SB)
+
+TEXT libc_sysctl_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sysctl(SB)
+
+GLOBL ·libc_sysctl_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sysctl_trampoline_addr(SB)/8, $libc_sysctl_trampoline<>(SB)
+
+TEXT libc_ppoll_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ppoll(SB)
+
+GLOBL ·libc_ppoll_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ppoll_trampoline_addr(SB)/8, $libc_ppoll_trampoline<>(SB)
+
+TEXT libc_access_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_access(SB)
+
+GLOBL ·libc_access_trampoline_addr(SB), RODATA, $8
+DATA ·libc_access_trampoline_addr(SB)/8, $libc_access_trampoline<>(SB)
+
+TEXT libc_adjtime_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_adjtime(SB)
+
+GLOBL ·libc_adjtime_trampoline_addr(SB), RODATA, $8
+DATA ·libc_adjtime_trampoline_addr(SB)/8, $libc_adjtime_trampoline<>(SB)
+
+TEXT libc_chdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chdir(SB)
+
+GLOBL ·libc_chdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chdir_trampoline_addr(SB)/8, $libc_chdir_trampoline<>(SB)
+
+TEXT libc_chflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chflags(SB)
+
+GLOBL ·libc_chflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chflags_trampoline_addr(SB)/8, $libc_chflags_trampoline<>(SB)
+
+TEXT libc_chmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chmod(SB)
+
+GLOBL ·libc_chmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chmod_trampoline_addr(SB)/8, $libc_chmod_trampoline<>(SB)
+
+TEXT libc_chown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chown(SB)
+
+GLOBL ·libc_chown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chown_trampoline_addr(SB)/8, $libc_chown_trampoline<>(SB)
+
+TEXT libc_chroot_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_chroot(SB)
+
+GLOBL ·libc_chroot_trampoline_addr(SB), RODATA, $8
+DATA ·libc_chroot_trampoline_addr(SB)/8, $libc_chroot_trampoline<>(SB)
+
+TEXT libc_close_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_close(SB)
+
+GLOBL ·libc_close_trampoline_addr(SB), RODATA, $8
+DATA ·libc_close_trampoline_addr(SB)/8, $libc_close_trampoline<>(SB)
+
+TEXT libc_dup_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup(SB)
+
+GLOBL ·libc_dup_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup_trampoline_addr(SB)/8, $libc_dup_trampoline<>(SB)
+
+TEXT libc_dup2_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup2(SB)
+
+GLOBL ·libc_dup2_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup2_trampoline_addr(SB)/8, $libc_dup2_trampoline<>(SB)
+
+TEXT libc_dup3_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_dup3(SB)
+
+GLOBL ·libc_dup3_trampoline_addr(SB), RODATA, $8
+DATA ·libc_dup3_trampoline_addr(SB)/8, $libc_dup3_trampoline<>(SB)
+
+TEXT libc_exit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_exit(SB)
+
+GLOBL ·libc_exit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_exit_trampoline_addr(SB)/8, $libc_exit_trampoline<>(SB)
+
+TEXT libc_faccessat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_faccessat(SB)
+
+GLOBL ·libc_faccessat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_faccessat_trampoline_addr(SB)/8, $libc_faccessat_trampoline<>(SB)
+
+TEXT libc_fchdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchdir(SB)
+
+GLOBL ·libc_fchdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchdir_trampoline_addr(SB)/8, $libc_fchdir_trampoline<>(SB)
+
+TEXT libc_fchflags_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchflags(SB)
+
+GLOBL ·libc_fchflags_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchflags_trampoline_addr(SB)/8, $libc_fchflags_trampoline<>(SB)
+
+TEXT libc_fchmod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmod(SB)
+
+GLOBL ·libc_fchmod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmod_trampoline_addr(SB)/8, $libc_fchmod_trampoline<>(SB)
+
+TEXT libc_fchmodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchmodat(SB)
+
+GLOBL ·libc_fchmodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchmodat_trampoline_addr(SB)/8, $libc_fchmodat_trampoline<>(SB)
+
+TEXT libc_fchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchown(SB)
+
+GLOBL ·libc_fchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchown_trampoline_addr(SB)/8, $libc_fchown_trampoline<>(SB)
+
+TEXT libc_fchownat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fchownat(SB)
+
+GLOBL ·libc_fchownat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fchownat_trampoline_addr(SB)/8, $libc_fchownat_trampoline<>(SB)
+
+TEXT libc_flock_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_flock(SB)
+
+GLOBL ·libc_flock_trampoline_addr(SB), RODATA, $8
+DATA ·libc_flock_trampoline_addr(SB)/8, $libc_flock_trampoline<>(SB)
+
+TEXT libc_fpathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fpathconf(SB)
+
+GLOBL ·libc_fpathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fpathconf_trampoline_addr(SB)/8, $libc_fpathconf_trampoline<>(SB)
+
+TEXT libc_fstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstat(SB)
+
+GLOBL ·libc_fstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstat_trampoline_addr(SB)/8, $libc_fstat_trampoline<>(SB)
+
+TEXT libc_fstatat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatat(SB)
+
+GLOBL ·libc_fstatat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatat_trampoline_addr(SB)/8, $libc_fstatat_trampoline<>(SB)
+
+TEXT libc_fstatfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fstatfs(SB)
+
+GLOBL ·libc_fstatfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fstatfs_trampoline_addr(SB)/8, $libc_fstatfs_trampoline<>(SB)
+
+TEXT libc_fsync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_fsync(SB)
+
+GLOBL ·libc_fsync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_fsync_trampoline_addr(SB)/8, $libc_fsync_trampoline<>(SB)
+
+TEXT libc_ftruncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_ftruncate(SB)
+
+GLOBL ·libc_ftruncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_ftruncate_trampoline_addr(SB)/8, $libc_ftruncate_trampoline<>(SB)
+
+TEXT libc_getegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getegid(SB)
+
+GLOBL ·libc_getegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getegid_trampoline_addr(SB)/8, $libc_getegid_trampoline<>(SB)
+
+TEXT libc_geteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_geteuid(SB)
+
+GLOBL ·libc_geteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_geteuid_trampoline_addr(SB)/8, $libc_geteuid_trampoline<>(SB)
+
+TEXT libc_getgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getgid(SB)
+
+GLOBL ·libc_getgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getgid_trampoline_addr(SB)/8, $libc_getgid_trampoline<>(SB)
+
+TEXT libc_getpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgid(SB)
+
+GLOBL ·libc_getpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgid_trampoline_addr(SB)/8, $libc_getpgid_trampoline<>(SB)
+
+TEXT libc_getpgrp_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpgrp(SB)
+
+GLOBL ·libc_getpgrp_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpgrp_trampoline_addr(SB)/8, $libc_getpgrp_trampoline<>(SB)
+
+TEXT libc_getpid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpid(SB)
+
+GLOBL ·libc_getpid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpid_trampoline_addr(SB)/8, $libc_getpid_trampoline<>(SB)
+
+TEXT libc_getppid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getppid(SB)
+
+GLOBL ·libc_getppid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getppid_trampoline_addr(SB)/8, $libc_getppid_trampoline<>(SB)
+
+TEXT libc_getpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getpriority(SB)
+
+GLOBL ·libc_getpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getpriority_trampoline_addr(SB)/8, $libc_getpriority_trampoline<>(SB)
+
+TEXT libc_getrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrlimit(SB)
+
+GLOBL ·libc_getrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrlimit_trampoline_addr(SB)/8, $libc_getrlimit_trampoline<>(SB)
+
+TEXT libc_getrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrtable(SB)
+
+GLOBL ·libc_getrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrtable_trampoline_addr(SB)/8, $libc_getrtable_trampoline<>(SB)
+
+TEXT libc_getrusage_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getrusage(SB)
+
+GLOBL ·libc_getrusage_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getrusage_trampoline_addr(SB)/8, $libc_getrusage_trampoline<>(SB)
+
+TEXT libc_getsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getsid(SB)
+
+GLOBL ·libc_getsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getsid_trampoline_addr(SB)/8, $libc_getsid_trampoline<>(SB)
+
+TEXT libc_gettimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_gettimeofday(SB)
+
+GLOBL ·libc_gettimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_gettimeofday_trampoline_addr(SB)/8, $libc_gettimeofday_trampoline<>(SB)
+
+TEXT libc_getuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_getuid(SB)
+
+GLOBL ·libc_getuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_getuid_trampoline_addr(SB)/8, $libc_getuid_trampoline<>(SB)
+
+TEXT libc_issetugid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_issetugid(SB)
+
+GLOBL ·libc_issetugid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_issetugid_trampoline_addr(SB)/8, $libc_issetugid_trampoline<>(SB)
+
+TEXT libc_kill_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kill(SB)
+
+GLOBL ·libc_kill_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kill_trampoline_addr(SB)/8, $libc_kill_trampoline<>(SB)
+
+TEXT libc_kqueue_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_kqueue(SB)
+
+GLOBL ·libc_kqueue_trampoline_addr(SB), RODATA, $8
+DATA ·libc_kqueue_trampoline_addr(SB)/8, $libc_kqueue_trampoline<>(SB)
+
+TEXT libc_lchown_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lchown(SB)
+
+GLOBL ·libc_lchown_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lchown_trampoline_addr(SB)/8, $libc_lchown_trampoline<>(SB)
+
+TEXT libc_link_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_link(SB)
+
+GLOBL ·libc_link_trampoline_addr(SB), RODATA, $8
+DATA ·libc_link_trampoline_addr(SB)/8, $libc_link_trampoline<>(SB)
+
+TEXT libc_linkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_linkat(SB)
+
+GLOBL ·libc_linkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_linkat_trampoline_addr(SB)/8, $libc_linkat_trampoline<>(SB)
+
+TEXT libc_listen_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_listen(SB)
+
+GLOBL ·libc_listen_trampoline_addr(SB), RODATA, $8
+DATA ·libc_listen_trampoline_addr(SB)/8, $libc_listen_trampoline<>(SB)
+
+TEXT libc_lstat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lstat(SB)
+
+GLOBL ·libc_lstat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lstat_trampoline_addr(SB)/8, $libc_lstat_trampoline<>(SB)
+
+TEXT libc_mkdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdir(SB)
+
+GLOBL ·libc_mkdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdir_trampoline_addr(SB)/8, $libc_mkdir_trampoline<>(SB)
+
+TEXT libc_mkdirat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkdirat(SB)
+
+GLOBL ·libc_mkdirat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkdirat_trampoline_addr(SB)/8, $libc_mkdirat_trampoline<>(SB)
+
+TEXT libc_mkfifo_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifo(SB)
+
+GLOBL ·libc_mkfifo_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifo_trampoline_addr(SB)/8, $libc_mkfifo_trampoline<>(SB)
+
+TEXT libc_mkfifoat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mkfifoat(SB)
+
+GLOBL ·libc_mkfifoat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mkfifoat_trampoline_addr(SB)/8, $libc_mkfifoat_trampoline<>(SB)
+
+TEXT libc_mknod_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknod(SB)
+
+GLOBL ·libc_mknod_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknod_trampoline_addr(SB)/8, $libc_mknod_trampoline<>(SB)
+
+TEXT libc_mknodat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mknodat(SB)
+
+GLOBL ·libc_mknodat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mknodat_trampoline_addr(SB)/8, $libc_mknodat_trampoline<>(SB)
+
+TEXT libc_nanosleep_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_nanosleep(SB)
+
+GLOBL ·libc_nanosleep_trampoline_addr(SB), RODATA, $8
+DATA ·libc_nanosleep_trampoline_addr(SB)/8, $libc_nanosleep_trampoline<>(SB)
+
+TEXT libc_open_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_open(SB)
+
+GLOBL ·libc_open_trampoline_addr(SB), RODATA, $8
+DATA ·libc_open_trampoline_addr(SB)/8, $libc_open_trampoline<>(SB)
+
+TEXT libc_openat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_openat(SB)
+
+GLOBL ·libc_openat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_openat_trampoline_addr(SB)/8, $libc_openat_trampoline<>(SB)
+
+TEXT libc_pathconf_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pathconf(SB)
+
+GLOBL ·libc_pathconf_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pathconf_trampoline_addr(SB)/8, $libc_pathconf_trampoline<>(SB)
+
+TEXT libc_pread_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pread(SB)
+
+GLOBL ·libc_pread_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pread_trampoline_addr(SB)/8, $libc_pread_trampoline<>(SB)
+
+TEXT libc_pwrite_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_pwrite(SB)
+
+GLOBL ·libc_pwrite_trampoline_addr(SB), RODATA, $8
+DATA ·libc_pwrite_trampoline_addr(SB)/8, $libc_pwrite_trampoline<>(SB)
+
+TEXT libc_read_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_read(SB)
+
+GLOBL ·libc_read_trampoline_addr(SB), RODATA, $8
+DATA ·libc_read_trampoline_addr(SB)/8, $libc_read_trampoline<>(SB)
+
+TEXT libc_readlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlink(SB)
+
+GLOBL ·libc_readlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlink_trampoline_addr(SB)/8, $libc_readlink_trampoline<>(SB)
+
+TEXT libc_readlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_readlinkat(SB)
+
+GLOBL ·libc_readlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_readlinkat_trampoline_addr(SB)/8, $libc_readlinkat_trampoline<>(SB)
+
+TEXT libc_rename_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rename(SB)
+
+GLOBL ·libc_rename_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rename_trampoline_addr(SB)/8, $libc_rename_trampoline<>(SB)
+
+TEXT libc_renameat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_renameat(SB)
+
+GLOBL ·libc_renameat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_renameat_trampoline_addr(SB)/8, $libc_renameat_trampoline<>(SB)
+
+TEXT libc_revoke_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_revoke(SB)
+
+GLOBL ·libc_revoke_trampoline_addr(SB), RODATA, $8
+DATA ·libc_revoke_trampoline_addr(SB)/8, $libc_revoke_trampoline<>(SB)
+
+TEXT libc_rmdir_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_rmdir(SB)
+
+GLOBL ·libc_rmdir_trampoline_addr(SB), RODATA, $8
+DATA ·libc_rmdir_trampoline_addr(SB)/8, $libc_rmdir_trampoline<>(SB)
+
+TEXT libc_lseek_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_lseek(SB)
+
+GLOBL ·libc_lseek_trampoline_addr(SB), RODATA, $8
+DATA ·libc_lseek_trampoline_addr(SB)/8, $libc_lseek_trampoline<>(SB)
+
+TEXT libc_select_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_select(SB)
+
+GLOBL ·libc_select_trampoline_addr(SB), RODATA, $8
+DATA ·libc_select_trampoline_addr(SB)/8, $libc_select_trampoline<>(SB)
+
+TEXT libc_setegid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setegid(SB)
+
+GLOBL ·libc_setegid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setegid_trampoline_addr(SB)/8, $libc_setegid_trampoline<>(SB)
+
+TEXT libc_seteuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_seteuid(SB)
+
+GLOBL ·libc_seteuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_seteuid_trampoline_addr(SB)/8, $libc_seteuid_trampoline<>(SB)
+
+TEXT libc_setgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setgid(SB)
+
+GLOBL ·libc_setgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setgid_trampoline_addr(SB)/8, $libc_setgid_trampoline<>(SB)
+
+TEXT libc_setlogin_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setlogin(SB)
+
+GLOBL ·libc_setlogin_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setlogin_trampoline_addr(SB)/8, $libc_setlogin_trampoline<>(SB)
+
+TEXT libc_setpgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpgid(SB)
+
+GLOBL ·libc_setpgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpgid_trampoline_addr(SB)/8, $libc_setpgid_trampoline<>(SB)
+
+TEXT libc_setpriority_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setpriority(SB)
+
+GLOBL ·libc_setpriority_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setpriority_trampoline_addr(SB)/8, $libc_setpriority_trampoline<>(SB)
+
+TEXT libc_setregid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setregid(SB)
+
+GLOBL ·libc_setregid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setregid_trampoline_addr(SB)/8, $libc_setregid_trampoline<>(SB)
+
+TEXT libc_setreuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setreuid(SB)
+
+GLOBL ·libc_setreuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setreuid_trampoline_addr(SB)/8, $libc_setreuid_trampoline<>(SB)
+
+TEXT libc_setresgid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresgid(SB)
+
+GLOBL ·libc_setresgid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresgid_trampoline_addr(SB)/8, $libc_setresgid_trampoline<>(SB)
+
+TEXT libc_setresuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setresuid(SB)
+
+GLOBL ·libc_setresuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setresuid_trampoline_addr(SB)/8, $libc_setresuid_trampoline<>(SB)
+
+TEXT libc_setrlimit_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrlimit(SB)
+
+GLOBL ·libc_setrlimit_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrlimit_trampoline_addr(SB)/8, $libc_setrlimit_trampoline<>(SB)
+
+TEXT libc_setrtable_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setrtable(SB)
+
+GLOBL ·libc_setrtable_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setrtable_trampoline_addr(SB)/8, $libc_setrtable_trampoline<>(SB)
+
+TEXT libc_setsid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setsid(SB)
+
+GLOBL ·libc_setsid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setsid_trampoline_addr(SB)/8, $libc_setsid_trampoline<>(SB)
+
+TEXT libc_settimeofday_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_settimeofday(SB)
+
+GLOBL ·libc_settimeofday_trampoline_addr(SB), RODATA, $8
+DATA ·libc_settimeofday_trampoline_addr(SB)/8, $libc_settimeofday_trampoline<>(SB)
+
+TEXT libc_setuid_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_setuid(SB)
+
+GLOBL ·libc_setuid_trampoline_addr(SB), RODATA, $8
+DATA ·libc_setuid_trampoline_addr(SB)/8, $libc_setuid_trampoline<>(SB)
+
+TEXT libc_stat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_stat(SB)
+
+GLOBL ·libc_stat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_stat_trampoline_addr(SB)/8, $libc_stat_trampoline<>(SB)
+
+TEXT libc_statfs_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_statfs(SB)
+
+GLOBL ·libc_statfs_trampoline_addr(SB), RODATA, $8
+DATA ·libc_statfs_trampoline_addr(SB)/8, $libc_statfs_trampoline<>(SB)
+
+TEXT libc_symlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlink(SB)
+
+GLOBL ·libc_symlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlink_trampoline_addr(SB)/8, $libc_symlink_trampoline<>(SB)
+
+TEXT libc_symlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_symlinkat(SB)
+
+GLOBL ·libc_symlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_symlinkat_trampoline_addr(SB)/8, $libc_symlinkat_trampoline<>(SB)
+
+TEXT libc_sync_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_sync(SB)
+
+GLOBL ·libc_sync_trampoline_addr(SB), RODATA, $8
+DATA ·libc_sync_trampoline_addr(SB)/8, $libc_sync_trampoline<>(SB)
+
+TEXT libc_truncate_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_truncate(SB)
+
+GLOBL ·libc_truncate_trampoline_addr(SB), RODATA, $8
+DATA ·libc_truncate_trampoline_addr(SB)/8, $libc_truncate_trampoline<>(SB)
+
+TEXT libc_umask_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_umask(SB)
+
+GLOBL ·libc_umask_trampoline_addr(SB), RODATA, $8
+DATA ·libc_umask_trampoline_addr(SB)/8, $libc_umask_trampoline<>(SB)
+
+TEXT libc_unlink_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlink(SB)
+
+GLOBL ·libc_unlink_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlink_trampoline_addr(SB)/8, $libc_unlink_trampoline<>(SB)
+
+TEXT libc_unlinkat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unlinkat(SB)
+
+GLOBL ·libc_unlinkat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unlinkat_trampoline_addr(SB)/8, $libc_unlinkat_trampoline<>(SB)
+
+TEXT libc_unmount_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_unmount(SB)
+
+GLOBL ·libc_unmount_trampoline_addr(SB), RODATA, $8
+DATA ·libc_unmount_trampoline_addr(SB)/8, $libc_unmount_trampoline<>(SB)
+
+TEXT libc_write_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_write(SB)
+
+GLOBL ·libc_write_trampoline_addr(SB), RODATA, $8
+DATA ·libc_write_trampoline_addr(SB)/8, $libc_write_trampoline<>(SB)
+
+TEXT libc_mmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_mmap(SB)
+
+GLOBL ·libc_mmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_mmap_trampoline_addr(SB)/8, $libc_mmap_trampoline<>(SB)
+
+TEXT libc_munmap_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_munmap(SB)
+
+GLOBL ·libc_munmap_trampoline_addr(SB), RODATA, $8
+DATA ·libc_munmap_trampoline_addr(SB)/8, $libc_munmap_trampoline<>(SB)
+
+TEXT libc_utimensat_trampoline<>(SB),NOSPLIT,$0-0
+ JMP libc_utimensat(SB)
+
+GLOBL ·libc_utimensat_trampoline_addr(SB), RODATA, $8
+DATA ·libc_utimensat_trampoline_addr(SB)/8, $libc_utimensat_trampoline<>(SB)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
index fdf53f8da..91f5a2bde 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsyscall_solaris_amd64.go
@@ -147,6 +147,8 @@ import (
//go:cgo_import_dynamic libc_port_dissociate port_dissociate "libc.so"
//go:cgo_import_dynamic libc_port_get port_get "libc.so"
//go:cgo_import_dynamic libc_port_getn port_getn "libc.so"
+//go:cgo_import_dynamic libc_putmsg putmsg "libc.so"
+//go:cgo_import_dynamic libc_getmsg getmsg "libc.so"
//go:linkname procpipe libc_pipe
//go:linkname procpipe2 libc_pipe2
@@ -284,6 +286,8 @@ import (
//go:linkname procport_dissociate libc_port_dissociate
//go:linkname procport_get libc_port_get
//go:linkname procport_getn libc_port_getn
+//go:linkname procputmsg libc_putmsg
+//go:linkname procgetmsg libc_getmsg
var (
procpipe,
@@ -421,7 +425,9 @@ var (
procport_associate,
procport_dissociate,
procport_get,
- procport_getn syscallFunc
+ procport_getn,
+ procputmsg,
+ procgetmsg syscallFunc
)
// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
@@ -2065,3 +2071,23 @@ func port_getn(port int, pe *portEvent, max uint32, nget *uint32, timeout *Times
}
return
}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func putmsg(fd int, clptr *strbuf, dataptr *strbuf, flags int) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procputmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(flags), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
+
+// THIS FILE IS GENERATED BY THE COMMAND AT THE TOP; DO NOT EDIT
+
+func getmsg(fd int, clptr *strbuf, dataptr *strbuf, flags *int) (err error) {
+ _, _, e1 := sysvicall6(uintptr(unsafe.Pointer(&procgetmsg)), 4, uintptr(fd), uintptr(unsafe.Pointer(clptr)), uintptr(unsafe.Pointer(dataptr)), uintptr(unsafe.Pointer(flags)), 0, 0)
+ if e1 != 0 {
+ err = e1
+ }
+ return
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go b/test/performance/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go
new file mode 100644
index 000000000..e44054470
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsysctl_openbsd_ppc64.go
@@ -0,0 +1,281 @@
+// go run mksysctl_openbsd.go
+// Code generated by the command above; DO NOT EDIT.
+
+//go:build ppc64 && openbsd
+// +build ppc64,openbsd
+
+package unix
+
+type mibentry struct {
+ ctlname string
+ ctloid []_C_int
+}
+
+var sysctlMib = []mibentry{
+ {"ddb.console", []_C_int{9, 6}},
+ {"ddb.log", []_C_int{9, 7}},
+ {"ddb.max_line", []_C_int{9, 3}},
+ {"ddb.max_width", []_C_int{9, 2}},
+ {"ddb.panic", []_C_int{9, 5}},
+ {"ddb.profile", []_C_int{9, 9}},
+ {"ddb.radix", []_C_int{9, 1}},
+ {"ddb.tab_stop_width", []_C_int{9, 4}},
+ {"ddb.trigger", []_C_int{9, 8}},
+ {"fs.posix.setuid", []_C_int{3, 1, 1}},
+ {"hw.allowpowerdown", []_C_int{6, 22}},
+ {"hw.byteorder", []_C_int{6, 4}},
+ {"hw.cpuspeed", []_C_int{6, 12}},
+ {"hw.diskcount", []_C_int{6, 10}},
+ {"hw.disknames", []_C_int{6, 8}},
+ {"hw.diskstats", []_C_int{6, 9}},
+ {"hw.machine", []_C_int{6, 1}},
+ {"hw.model", []_C_int{6, 2}},
+ {"hw.ncpu", []_C_int{6, 3}},
+ {"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
+ {"hw.pagesize", []_C_int{6, 7}},
+ {"hw.perfpolicy", []_C_int{6, 23}},
+ {"hw.physmem", []_C_int{6, 19}},
+ {"hw.power", []_C_int{6, 26}},
+ {"hw.product", []_C_int{6, 15}},
+ {"hw.serialno", []_C_int{6, 17}},
+ {"hw.setperf", []_C_int{6, 13}},
+ {"hw.smt", []_C_int{6, 24}},
+ {"hw.usermem", []_C_int{6, 20}},
+ {"hw.uuid", []_C_int{6, 18}},
+ {"hw.vendor", []_C_int{6, 14}},
+ {"hw.version", []_C_int{6, 16}},
+ {"kern.allowdt", []_C_int{1, 65}},
+ {"kern.allowkmem", []_C_int{1, 52}},
+ {"kern.argmax", []_C_int{1, 8}},
+ {"kern.audio", []_C_int{1, 84}},
+ {"kern.boottime", []_C_int{1, 21}},
+ {"kern.bufcachepercent", []_C_int{1, 72}},
+ {"kern.ccpu", []_C_int{1, 45}},
+ {"kern.clockrate", []_C_int{1, 12}},
+ {"kern.consbuf", []_C_int{1, 83}},
+ {"kern.consbufsize", []_C_int{1, 82}},
+ {"kern.consdev", []_C_int{1, 75}},
+ {"kern.cp_time", []_C_int{1, 40}},
+ {"kern.cp_time2", []_C_int{1, 71}},
+ {"kern.cpustats", []_C_int{1, 85}},
+ {"kern.domainname", []_C_int{1, 22}},
+ {"kern.file", []_C_int{1, 73}},
+ {"kern.forkstat", []_C_int{1, 42}},
+ {"kern.fscale", []_C_int{1, 46}},
+ {"kern.fsync", []_C_int{1, 33}},
+ {"kern.global_ptrace", []_C_int{1, 81}},
+ {"kern.hostid", []_C_int{1, 11}},
+ {"kern.hostname", []_C_int{1, 10}},
+ {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
+ {"kern.job_control", []_C_int{1, 19}},
+ {"kern.malloc.buckets", []_C_int{1, 39, 1}},
+ {"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
+ {"kern.maxclusters", []_C_int{1, 67}},
+ {"kern.maxfiles", []_C_int{1, 7}},
+ {"kern.maxlocksperuid", []_C_int{1, 70}},
+ {"kern.maxpartitions", []_C_int{1, 23}},
+ {"kern.maxproc", []_C_int{1, 6}},
+ {"kern.maxthread", []_C_int{1, 25}},
+ {"kern.maxvnodes", []_C_int{1, 5}},
+ {"kern.mbstat", []_C_int{1, 59}},
+ {"kern.msgbuf", []_C_int{1, 48}},
+ {"kern.msgbufsize", []_C_int{1, 38}},
+ {"kern.nchstats", []_C_int{1, 41}},
+ {"kern.netlivelocks", []_C_int{1, 76}},
+ {"kern.nfiles", []_C_int{1, 56}},
+ {"kern.ngroups", []_C_int{1, 18}},
+ {"kern.nosuidcoredump", []_C_int{1, 32}},
+ {"kern.nprocs", []_C_int{1, 47}},
+ {"kern.nthreads", []_C_int{1, 26}},
+ {"kern.numvnodes", []_C_int{1, 58}},
+ {"kern.osrelease", []_C_int{1, 2}},
+ {"kern.osrevision", []_C_int{1, 3}},
+ {"kern.ostype", []_C_int{1, 1}},
+ {"kern.osversion", []_C_int{1, 27}},
+ {"kern.pfstatus", []_C_int{1, 86}},
+ {"kern.pool_debug", []_C_int{1, 77}},
+ {"kern.posix1version", []_C_int{1, 17}},
+ {"kern.proc", []_C_int{1, 66}},
+ {"kern.rawpartition", []_C_int{1, 24}},
+ {"kern.saved_ids", []_C_int{1, 20}},
+ {"kern.securelevel", []_C_int{1, 9}},
+ {"kern.seminfo", []_C_int{1, 61}},
+ {"kern.shminfo", []_C_int{1, 62}},
+ {"kern.somaxconn", []_C_int{1, 28}},
+ {"kern.sominconn", []_C_int{1, 29}},
+ {"kern.splassert", []_C_int{1, 54}},
+ {"kern.stackgap_random", []_C_int{1, 50}},
+ {"kern.sysvipc_info", []_C_int{1, 51}},
+ {"kern.sysvmsg", []_C_int{1, 34}},
+ {"kern.sysvsem", []_C_int{1, 35}},
+ {"kern.sysvshm", []_C_int{1, 36}},
+ {"kern.timecounter.choice", []_C_int{1, 69, 4}},
+ {"kern.timecounter.hardware", []_C_int{1, 69, 3}},
+ {"kern.timecounter.tick", []_C_int{1, 69, 1}},
+ {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
+ {"kern.timeout_stats", []_C_int{1, 87}},
+ {"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
+ {"kern.tty.tk_nin", []_C_int{1, 44, 1}},
+ {"kern.tty.tk_nout", []_C_int{1, 44, 2}},
+ {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
+ {"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
+ {"kern.ttycount", []_C_int{1, 57}},
+ {"kern.utc_offset", []_C_int{1, 88}},
+ {"kern.version", []_C_int{1, 4}},
+ {"kern.video", []_C_int{1, 89}},
+ {"kern.watchdog.auto", []_C_int{1, 64, 2}},
+ {"kern.watchdog.period", []_C_int{1, 64, 1}},
+ {"kern.witnesswatch", []_C_int{1, 53}},
+ {"kern.wxabort", []_C_int{1, 74}},
+ {"net.bpf.bufsize", []_C_int{4, 31, 1}},
+ {"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
+ {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
+ {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
+ {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
+ {"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
+ {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
+ {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
+ {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
+ {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
+ {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
+ {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
+ {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
+ {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
+ {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
+ {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
+ {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
+ {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
+ {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
+ {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
+ {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
+ {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
+ {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
+ {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
+ {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
+ {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
+ {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
+ {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
+ {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
+ {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
+ {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
+ {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
+ {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
+ {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
+ {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
+ {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
+ {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
+ {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
+ {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
+ {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
+ {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
+ {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
+ {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
+ {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
+ {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
+ {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
+ {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
+ {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
+ {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
+ {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
+ {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
+ {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
+ {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
+ {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
+ {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
+ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
+ {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
+ {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
+ {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
+ {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
+ {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
+ {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
+ {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
+ {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
+ {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
+ {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
+ {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
+ {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
+ {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
+ {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
+ {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
+ {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
+ {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
+ {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
+ {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
+ {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
+ {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
+ {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
+ {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
+ {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
+ {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
+ {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
+ {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
+ {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
+ {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
+ {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
+ {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
+ {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
+ {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
+ {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
+ {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
+ {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
+ {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
+ {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
+ {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
+ {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
+ {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
+ {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
+ {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
+ {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
+ {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
+ {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
+ {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
+ {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
+ {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
+ {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
+ {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
+ {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
+ {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
+ {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
+ {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
+ {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
+ {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
+ {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
+ {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
+ {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
+ {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
+ {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
+ {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
+ {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
+ {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
+ {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
+ {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
+ {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
+ {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
+ {"net.key.sadb_dump", []_C_int{4, 30, 1}},
+ {"net.key.spd_dump", []_C_int{4, 30, 2}},
+ {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
+ {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
+ {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
+ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
+ {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
+ {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
+ {"net.mpls.ttl", []_C_int{4, 33, 2}},
+ {"net.pflow.stats", []_C_int{4, 34, 1}},
+ {"net.pipex.enable", []_C_int{4, 35, 1}},
+ {"vm.anonmin", []_C_int{2, 7}},
+ {"vm.loadavg", []_C_int{2, 2}},
+ {"vm.malloc_conf", []_C_int{2, 12}},
+ {"vm.maxslp", []_C_int{2, 10}},
+ {"vm.nkmempages", []_C_int{2, 6}},
+ {"vm.psstrings", []_C_int{2, 3}},
+ {"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
+ {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
+ {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
+ {"vm.uspace", []_C_int{2, 11}},
+ {"vm.uvmexp", []_C_int{2, 4}},
+ {"vm.vmmeter", []_C_int{2, 1}},
+ {"vm.vnodemin", []_C_int{2, 9}},
+ {"vm.vtextmin", []_C_int{2, 8}},
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go
new file mode 100644
index 000000000..a0db82fce
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsysctl_openbsd_riscv64.go
@@ -0,0 +1,282 @@
+// go run mksysctl_openbsd.go
+// Code generated by the command above; DO NOT EDIT.
+
+//go:build riscv64 && openbsd
+// +build riscv64,openbsd
+
+package unix
+
+type mibentry struct {
+ ctlname string
+ ctloid []_C_int
+}
+
+var sysctlMib = []mibentry{
+ {"ddb.console", []_C_int{9, 6}},
+ {"ddb.log", []_C_int{9, 7}},
+ {"ddb.max_line", []_C_int{9, 3}},
+ {"ddb.max_width", []_C_int{9, 2}},
+ {"ddb.panic", []_C_int{9, 5}},
+ {"ddb.profile", []_C_int{9, 9}},
+ {"ddb.radix", []_C_int{9, 1}},
+ {"ddb.tab_stop_width", []_C_int{9, 4}},
+ {"ddb.trigger", []_C_int{9, 8}},
+ {"fs.posix.setuid", []_C_int{3, 1, 1}},
+ {"hw.allowpowerdown", []_C_int{6, 22}},
+ {"hw.byteorder", []_C_int{6, 4}},
+ {"hw.cpuspeed", []_C_int{6, 12}},
+ {"hw.diskcount", []_C_int{6, 10}},
+ {"hw.disknames", []_C_int{6, 8}},
+ {"hw.diskstats", []_C_int{6, 9}},
+ {"hw.machine", []_C_int{6, 1}},
+ {"hw.model", []_C_int{6, 2}},
+ {"hw.ncpu", []_C_int{6, 3}},
+ {"hw.ncpufound", []_C_int{6, 21}},
+ {"hw.ncpuonline", []_C_int{6, 25}},
+ {"hw.pagesize", []_C_int{6, 7}},
+ {"hw.perfpolicy", []_C_int{6, 23}},
+ {"hw.physmem", []_C_int{6, 19}},
+ {"hw.power", []_C_int{6, 26}},
+ {"hw.product", []_C_int{6, 15}},
+ {"hw.serialno", []_C_int{6, 17}},
+ {"hw.setperf", []_C_int{6, 13}},
+ {"hw.smt", []_C_int{6, 24}},
+ {"hw.usermem", []_C_int{6, 20}},
+ {"hw.uuid", []_C_int{6, 18}},
+ {"hw.vendor", []_C_int{6, 14}},
+ {"hw.version", []_C_int{6, 16}},
+ {"kern.allowdt", []_C_int{1, 65}},
+ {"kern.allowkmem", []_C_int{1, 52}},
+ {"kern.argmax", []_C_int{1, 8}},
+ {"kern.audio", []_C_int{1, 84}},
+ {"kern.boottime", []_C_int{1, 21}},
+ {"kern.bufcachepercent", []_C_int{1, 72}},
+ {"kern.ccpu", []_C_int{1, 45}},
+ {"kern.clockrate", []_C_int{1, 12}},
+ {"kern.consbuf", []_C_int{1, 83}},
+ {"kern.consbufsize", []_C_int{1, 82}},
+ {"kern.consdev", []_C_int{1, 75}},
+ {"kern.cp_time", []_C_int{1, 40}},
+ {"kern.cp_time2", []_C_int{1, 71}},
+ {"kern.cpustats", []_C_int{1, 85}},
+ {"kern.domainname", []_C_int{1, 22}},
+ {"kern.file", []_C_int{1, 73}},
+ {"kern.forkstat", []_C_int{1, 42}},
+ {"kern.fscale", []_C_int{1, 46}},
+ {"kern.fsync", []_C_int{1, 33}},
+ {"kern.global_ptrace", []_C_int{1, 81}},
+ {"kern.hostid", []_C_int{1, 11}},
+ {"kern.hostname", []_C_int{1, 10}},
+ {"kern.intrcnt.nintrcnt", []_C_int{1, 63, 1}},
+ {"kern.job_control", []_C_int{1, 19}},
+ {"kern.malloc.buckets", []_C_int{1, 39, 1}},
+ {"kern.malloc.kmemnames", []_C_int{1, 39, 3}},
+ {"kern.maxclusters", []_C_int{1, 67}},
+ {"kern.maxfiles", []_C_int{1, 7}},
+ {"kern.maxlocksperuid", []_C_int{1, 70}},
+ {"kern.maxpartitions", []_C_int{1, 23}},
+ {"kern.maxproc", []_C_int{1, 6}},
+ {"kern.maxthread", []_C_int{1, 25}},
+ {"kern.maxvnodes", []_C_int{1, 5}},
+ {"kern.mbstat", []_C_int{1, 59}},
+ {"kern.msgbuf", []_C_int{1, 48}},
+ {"kern.msgbufsize", []_C_int{1, 38}},
+ {"kern.nchstats", []_C_int{1, 41}},
+ {"kern.netlivelocks", []_C_int{1, 76}},
+ {"kern.nfiles", []_C_int{1, 56}},
+ {"kern.ngroups", []_C_int{1, 18}},
+ {"kern.nosuidcoredump", []_C_int{1, 32}},
+ {"kern.nprocs", []_C_int{1, 47}},
+ {"kern.nselcoll", []_C_int{1, 43}},
+ {"kern.nthreads", []_C_int{1, 26}},
+ {"kern.numvnodes", []_C_int{1, 58}},
+ {"kern.osrelease", []_C_int{1, 2}},
+ {"kern.osrevision", []_C_int{1, 3}},
+ {"kern.ostype", []_C_int{1, 1}},
+ {"kern.osversion", []_C_int{1, 27}},
+ {"kern.pfstatus", []_C_int{1, 86}},
+ {"kern.pool_debug", []_C_int{1, 77}},
+ {"kern.posix1version", []_C_int{1, 17}},
+ {"kern.proc", []_C_int{1, 66}},
+ {"kern.rawpartition", []_C_int{1, 24}},
+ {"kern.saved_ids", []_C_int{1, 20}},
+ {"kern.securelevel", []_C_int{1, 9}},
+ {"kern.seminfo", []_C_int{1, 61}},
+ {"kern.shminfo", []_C_int{1, 62}},
+ {"kern.somaxconn", []_C_int{1, 28}},
+ {"kern.sominconn", []_C_int{1, 29}},
+ {"kern.splassert", []_C_int{1, 54}},
+ {"kern.stackgap_random", []_C_int{1, 50}},
+ {"kern.sysvipc_info", []_C_int{1, 51}},
+ {"kern.sysvmsg", []_C_int{1, 34}},
+ {"kern.sysvsem", []_C_int{1, 35}},
+ {"kern.sysvshm", []_C_int{1, 36}},
+ {"kern.timecounter.choice", []_C_int{1, 69, 4}},
+ {"kern.timecounter.hardware", []_C_int{1, 69, 3}},
+ {"kern.timecounter.tick", []_C_int{1, 69, 1}},
+ {"kern.timecounter.timestepwarnings", []_C_int{1, 69, 2}},
+ {"kern.timeout_stats", []_C_int{1, 87}},
+ {"kern.tty.tk_cancc", []_C_int{1, 44, 4}},
+ {"kern.tty.tk_nin", []_C_int{1, 44, 1}},
+ {"kern.tty.tk_nout", []_C_int{1, 44, 2}},
+ {"kern.tty.tk_rawcc", []_C_int{1, 44, 3}},
+ {"kern.tty.ttyinfo", []_C_int{1, 44, 5}},
+ {"kern.ttycount", []_C_int{1, 57}},
+ {"kern.utc_offset", []_C_int{1, 88}},
+ {"kern.version", []_C_int{1, 4}},
+ {"kern.video", []_C_int{1, 89}},
+ {"kern.watchdog.auto", []_C_int{1, 64, 2}},
+ {"kern.watchdog.period", []_C_int{1, 64, 1}},
+ {"kern.witnesswatch", []_C_int{1, 53}},
+ {"kern.wxabort", []_C_int{1, 74}},
+ {"net.bpf.bufsize", []_C_int{4, 31, 1}},
+ {"net.bpf.maxbufsize", []_C_int{4, 31, 2}},
+ {"net.inet.ah.enable", []_C_int{4, 2, 51, 1}},
+ {"net.inet.ah.stats", []_C_int{4, 2, 51, 2}},
+ {"net.inet.carp.allow", []_C_int{4, 2, 112, 1}},
+ {"net.inet.carp.log", []_C_int{4, 2, 112, 3}},
+ {"net.inet.carp.preempt", []_C_int{4, 2, 112, 2}},
+ {"net.inet.carp.stats", []_C_int{4, 2, 112, 4}},
+ {"net.inet.divert.recvspace", []_C_int{4, 2, 258, 1}},
+ {"net.inet.divert.sendspace", []_C_int{4, 2, 258, 2}},
+ {"net.inet.divert.stats", []_C_int{4, 2, 258, 3}},
+ {"net.inet.esp.enable", []_C_int{4, 2, 50, 1}},
+ {"net.inet.esp.stats", []_C_int{4, 2, 50, 4}},
+ {"net.inet.esp.udpencap", []_C_int{4, 2, 50, 2}},
+ {"net.inet.esp.udpencap_port", []_C_int{4, 2, 50, 3}},
+ {"net.inet.etherip.allow", []_C_int{4, 2, 97, 1}},
+ {"net.inet.etherip.stats", []_C_int{4, 2, 97, 2}},
+ {"net.inet.gre.allow", []_C_int{4, 2, 47, 1}},
+ {"net.inet.gre.wccp", []_C_int{4, 2, 47, 2}},
+ {"net.inet.icmp.bmcastecho", []_C_int{4, 2, 1, 2}},
+ {"net.inet.icmp.errppslimit", []_C_int{4, 2, 1, 3}},
+ {"net.inet.icmp.maskrepl", []_C_int{4, 2, 1, 1}},
+ {"net.inet.icmp.rediraccept", []_C_int{4, 2, 1, 4}},
+ {"net.inet.icmp.redirtimeout", []_C_int{4, 2, 1, 5}},
+ {"net.inet.icmp.stats", []_C_int{4, 2, 1, 7}},
+ {"net.inet.icmp.tstamprepl", []_C_int{4, 2, 1, 6}},
+ {"net.inet.igmp.stats", []_C_int{4, 2, 2, 1}},
+ {"net.inet.ip.arpdown", []_C_int{4, 2, 0, 40}},
+ {"net.inet.ip.arpqueued", []_C_int{4, 2, 0, 36}},
+ {"net.inet.ip.arptimeout", []_C_int{4, 2, 0, 39}},
+ {"net.inet.ip.encdebug", []_C_int{4, 2, 0, 12}},
+ {"net.inet.ip.forwarding", []_C_int{4, 2, 0, 1}},
+ {"net.inet.ip.ifq.congestion", []_C_int{4, 2, 0, 30, 4}},
+ {"net.inet.ip.ifq.drops", []_C_int{4, 2, 0, 30, 3}},
+ {"net.inet.ip.ifq.len", []_C_int{4, 2, 0, 30, 1}},
+ {"net.inet.ip.ifq.maxlen", []_C_int{4, 2, 0, 30, 2}},
+ {"net.inet.ip.maxqueue", []_C_int{4, 2, 0, 11}},
+ {"net.inet.ip.mforwarding", []_C_int{4, 2, 0, 31}},
+ {"net.inet.ip.mrtmfc", []_C_int{4, 2, 0, 37}},
+ {"net.inet.ip.mrtproto", []_C_int{4, 2, 0, 34}},
+ {"net.inet.ip.mrtstats", []_C_int{4, 2, 0, 35}},
+ {"net.inet.ip.mrtvif", []_C_int{4, 2, 0, 38}},
+ {"net.inet.ip.mtu", []_C_int{4, 2, 0, 4}},
+ {"net.inet.ip.mtudisc", []_C_int{4, 2, 0, 27}},
+ {"net.inet.ip.mtudisctimeout", []_C_int{4, 2, 0, 28}},
+ {"net.inet.ip.multipath", []_C_int{4, 2, 0, 32}},
+ {"net.inet.ip.portfirst", []_C_int{4, 2, 0, 7}},
+ {"net.inet.ip.porthifirst", []_C_int{4, 2, 0, 9}},
+ {"net.inet.ip.porthilast", []_C_int{4, 2, 0, 10}},
+ {"net.inet.ip.portlast", []_C_int{4, 2, 0, 8}},
+ {"net.inet.ip.redirect", []_C_int{4, 2, 0, 2}},
+ {"net.inet.ip.sourceroute", []_C_int{4, 2, 0, 5}},
+ {"net.inet.ip.stats", []_C_int{4, 2, 0, 33}},
+ {"net.inet.ip.ttl", []_C_int{4, 2, 0, 3}},
+ {"net.inet.ipcomp.enable", []_C_int{4, 2, 108, 1}},
+ {"net.inet.ipcomp.stats", []_C_int{4, 2, 108, 2}},
+ {"net.inet.ipip.allow", []_C_int{4, 2, 4, 1}},
+ {"net.inet.ipip.stats", []_C_int{4, 2, 4, 2}},
+ {"net.inet.pfsync.stats", []_C_int{4, 2, 240, 1}},
+ {"net.inet.tcp.ackonpush", []_C_int{4, 2, 6, 13}},
+ {"net.inet.tcp.always_keepalive", []_C_int{4, 2, 6, 22}},
+ {"net.inet.tcp.baddynamic", []_C_int{4, 2, 6, 6}},
+ {"net.inet.tcp.drop", []_C_int{4, 2, 6, 19}},
+ {"net.inet.tcp.ecn", []_C_int{4, 2, 6, 14}},
+ {"net.inet.tcp.ident", []_C_int{4, 2, 6, 9}},
+ {"net.inet.tcp.keepidle", []_C_int{4, 2, 6, 3}},
+ {"net.inet.tcp.keepinittime", []_C_int{4, 2, 6, 2}},
+ {"net.inet.tcp.keepintvl", []_C_int{4, 2, 6, 4}},
+ {"net.inet.tcp.mssdflt", []_C_int{4, 2, 6, 11}},
+ {"net.inet.tcp.reasslimit", []_C_int{4, 2, 6, 18}},
+ {"net.inet.tcp.rfc1323", []_C_int{4, 2, 6, 1}},
+ {"net.inet.tcp.rfc3390", []_C_int{4, 2, 6, 17}},
+ {"net.inet.tcp.rootonly", []_C_int{4, 2, 6, 24}},
+ {"net.inet.tcp.rstppslimit", []_C_int{4, 2, 6, 12}},
+ {"net.inet.tcp.sack", []_C_int{4, 2, 6, 10}},
+ {"net.inet.tcp.sackholelimit", []_C_int{4, 2, 6, 20}},
+ {"net.inet.tcp.slowhz", []_C_int{4, 2, 6, 5}},
+ {"net.inet.tcp.stats", []_C_int{4, 2, 6, 21}},
+ {"net.inet.tcp.synbucketlimit", []_C_int{4, 2, 6, 16}},
+ {"net.inet.tcp.syncachelimit", []_C_int{4, 2, 6, 15}},
+ {"net.inet.tcp.synhashsize", []_C_int{4, 2, 6, 25}},
+ {"net.inet.tcp.synuselimit", []_C_int{4, 2, 6, 23}},
+ {"net.inet.udp.baddynamic", []_C_int{4, 2, 17, 2}},
+ {"net.inet.udp.checksum", []_C_int{4, 2, 17, 1}},
+ {"net.inet.udp.recvspace", []_C_int{4, 2, 17, 3}},
+ {"net.inet.udp.rootonly", []_C_int{4, 2, 17, 6}},
+ {"net.inet.udp.sendspace", []_C_int{4, 2, 17, 4}},
+ {"net.inet.udp.stats", []_C_int{4, 2, 17, 5}},
+ {"net.inet6.divert.recvspace", []_C_int{4, 24, 86, 1}},
+ {"net.inet6.divert.sendspace", []_C_int{4, 24, 86, 2}},
+ {"net.inet6.divert.stats", []_C_int{4, 24, 86, 3}},
+ {"net.inet6.icmp6.errppslimit", []_C_int{4, 24, 30, 14}},
+ {"net.inet6.icmp6.mtudisc_hiwat", []_C_int{4, 24, 30, 16}},
+ {"net.inet6.icmp6.mtudisc_lowat", []_C_int{4, 24, 30, 17}},
+ {"net.inet6.icmp6.nd6_debug", []_C_int{4, 24, 30, 18}},
+ {"net.inet6.icmp6.nd6_delay", []_C_int{4, 24, 30, 8}},
+ {"net.inet6.icmp6.nd6_maxnudhint", []_C_int{4, 24, 30, 15}},
+ {"net.inet6.icmp6.nd6_mmaxtries", []_C_int{4, 24, 30, 10}},
+ {"net.inet6.icmp6.nd6_umaxtries", []_C_int{4, 24, 30, 9}},
+ {"net.inet6.icmp6.redirtimeout", []_C_int{4, 24, 30, 3}},
+ {"net.inet6.ip6.auto_flowlabel", []_C_int{4, 24, 17, 17}},
+ {"net.inet6.ip6.dad_count", []_C_int{4, 24, 17, 16}},
+ {"net.inet6.ip6.dad_pending", []_C_int{4, 24, 17, 49}},
+ {"net.inet6.ip6.defmcasthlim", []_C_int{4, 24, 17, 18}},
+ {"net.inet6.ip6.forwarding", []_C_int{4, 24, 17, 1}},
+ {"net.inet6.ip6.forwsrcrt", []_C_int{4, 24, 17, 5}},
+ {"net.inet6.ip6.hdrnestlimit", []_C_int{4, 24, 17, 15}},
+ {"net.inet6.ip6.hlim", []_C_int{4, 24, 17, 3}},
+ {"net.inet6.ip6.log_interval", []_C_int{4, 24, 17, 14}},
+ {"net.inet6.ip6.maxdynroutes", []_C_int{4, 24, 17, 48}},
+ {"net.inet6.ip6.maxfragpackets", []_C_int{4, 24, 17, 9}},
+ {"net.inet6.ip6.maxfrags", []_C_int{4, 24, 17, 41}},
+ {"net.inet6.ip6.mforwarding", []_C_int{4, 24, 17, 42}},
+ {"net.inet6.ip6.mrtmfc", []_C_int{4, 24, 17, 53}},
+ {"net.inet6.ip6.mrtmif", []_C_int{4, 24, 17, 52}},
+ {"net.inet6.ip6.mrtproto", []_C_int{4, 24, 17, 8}},
+ {"net.inet6.ip6.mtudisctimeout", []_C_int{4, 24, 17, 50}},
+ {"net.inet6.ip6.multicast_mtudisc", []_C_int{4, 24, 17, 44}},
+ {"net.inet6.ip6.multipath", []_C_int{4, 24, 17, 43}},
+ {"net.inet6.ip6.neighborgcthresh", []_C_int{4, 24, 17, 45}},
+ {"net.inet6.ip6.redirect", []_C_int{4, 24, 17, 2}},
+ {"net.inet6.ip6.soiikey", []_C_int{4, 24, 17, 54}},
+ {"net.inet6.ip6.sourcecheck", []_C_int{4, 24, 17, 10}},
+ {"net.inet6.ip6.sourcecheck_logint", []_C_int{4, 24, 17, 11}},
+ {"net.inet6.ip6.use_deprecated", []_C_int{4, 24, 17, 21}},
+ {"net.key.sadb_dump", []_C_int{4, 30, 1}},
+ {"net.key.spd_dump", []_C_int{4, 30, 2}},
+ {"net.mpls.ifq.congestion", []_C_int{4, 33, 3, 4}},
+ {"net.mpls.ifq.drops", []_C_int{4, 33, 3, 3}},
+ {"net.mpls.ifq.len", []_C_int{4, 33, 3, 1}},
+ {"net.mpls.ifq.maxlen", []_C_int{4, 33, 3, 2}},
+ {"net.mpls.mapttl_ip", []_C_int{4, 33, 5}},
+ {"net.mpls.mapttl_ip6", []_C_int{4, 33, 6}},
+ {"net.mpls.ttl", []_C_int{4, 33, 2}},
+ {"net.pflow.stats", []_C_int{4, 34, 1}},
+ {"net.pipex.enable", []_C_int{4, 35, 1}},
+ {"vm.anonmin", []_C_int{2, 7}},
+ {"vm.loadavg", []_C_int{2, 2}},
+ {"vm.malloc_conf", []_C_int{2, 12}},
+ {"vm.maxslp", []_C_int{2, 10}},
+ {"vm.nkmempages", []_C_int{2, 6}},
+ {"vm.psstrings", []_C_int{2, 3}},
+ {"vm.swapencrypt.enable", []_C_int{2, 5, 0}},
+ {"vm.swapencrypt.keyscreated", []_C_int{2, 5, 1}},
+ {"vm.swapencrypt.keysdeleted", []_C_int{2, 5, 2}},
+ {"vm.uspace", []_C_int{2, 11}},
+ {"vm.uvmexp", []_C_int{2, 4}},
+ {"vm.vmmeter", []_C_int{2, 1}},
+ {"vm.vnodemin", []_C_int{2, 9}},
+ {"vm.vtextmin", []_C_int{2, 8}},
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
index 817edbf95..597733813 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_386.go
@@ -6,6 +6,7 @@
package unix
+// Deprecated: Use libc wrappers instead of direct syscalls.
const (
SYS_EXIT = 1 // { void sys_exit(int rval); }
SYS_FORK = 2 // { int sys_fork(void); }
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
index ea453614e..16af29189 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_amd64.go
@@ -6,6 +6,7 @@
package unix
+// Deprecated: Use libc wrappers instead of direct syscalls.
const (
SYS_EXIT = 1 // { void sys_exit(int rval); }
SYS_FORK = 2 // { int sys_fork(void); }
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
index 467971eed..f59b18a97 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm.go
@@ -6,6 +6,7 @@
package unix
+// Deprecated: Use libc wrappers instead of direct syscalls.
const (
SYS_EXIT = 1 // { void sys_exit(int rval); }
SYS_FORK = 2 // { int sys_fork(void); }
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
index 32eec5ed5..721ef5910 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_arm64.go
@@ -6,6 +6,7 @@
package unix
+// Deprecated: Use libc wrappers instead of direct syscalls.
const (
SYS_EXIT = 1 // { void sys_exit(int rval); }
SYS_FORK = 2 // { int sys_fork(void); }
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go
new file mode 100644
index 000000000..f258cfa24
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_ppc64.go
@@ -0,0 +1,218 @@
+// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc64 && openbsd
+// +build ppc64,openbsd
+
+package unix
+
+const (
+ SYS_EXIT = 1 // { void sys_exit(int rval); }
+ SYS_FORK = 2 // { int sys_fork(void); }
+ SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
+ SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
+ SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
+ SYS_CLOSE = 6 // { int sys_close(int fd); }
+ SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
+ SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
+ SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
+ SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
+ SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
+ SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
+ SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
+ SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
+ SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
+ SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
+ SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
+ SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
+ SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
+ SYS_GETPID = 20 // { pid_t sys_getpid(void); }
+ SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
+ SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
+ SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
+ SYS_GETUID = 24 // { uid_t sys_getuid(void); }
+ SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
+ SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
+ SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
+ SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
+ SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
+ SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
+ SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
+ SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
+ SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
+ SYS_SYNC = 36 // { void sys_sync(void); }
+ SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
+ SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
+ SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
+ SYS_DUP = 41 // { int sys_dup(int fd); }
+ SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
+ SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
+ SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
+ SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
+ SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
+ SYS_GETGID = 47 // { gid_t sys_getgid(void); }
+ SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
+ SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
+ SYS_ACCT = 51 // { int sys_acct(const char *path); }
+ SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
+ SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
+ SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
+ SYS_REBOOT = 55 // { int sys_reboot(int opt); }
+ SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
+ SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
+ SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
+ SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
+ SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
+ SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
+ SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
+ SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
+ SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
+ SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
+ SYS_VFORK = 66 // { int sys_vfork(void); }
+ SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
+ SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
+ SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
+ SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
+ SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
+ SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+ SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
+ SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
+ SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
+ SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
+ SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
+ SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
+ SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
+ SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
+ SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
+ SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
+ SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
+ SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
+ SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
+ SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
+ SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
+ SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
+ SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
+ SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
+ SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
+ SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
+ SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
+ SYS_FSYNC = 95 // { int sys_fsync(int fd); }
+ SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
+ SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
+ SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
+ SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
+ SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
+ SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
+ SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
+ SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
+ SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
+ SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
+ SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
+ SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
+ SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
+ SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
+ SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
+ SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
+ SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
+ SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
+ SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
+ SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
+ SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
+ SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
+ SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
+ SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
+ SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
+ SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
+ SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
+ SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
+ SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
+ SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
+ SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
+ SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
+ SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
+ SYS_SETSID = 147 // { int sys_setsid(void); }
+ SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
+ SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
+ SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
+ SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
+ SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
+ SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
+ SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
+ SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
+ SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
+ SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
+ SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
+ SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
+ SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
+ SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
+ SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
+ SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+ SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
+ SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
+ SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
+ SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
+ SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
+ SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
+ SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
+ SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+ SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
+ SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
+ SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
+ SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
+ SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
+ SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
+ SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
+ SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
+ SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
+ SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
+ SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_KQUEUE = 269 // { int sys_kqueue(void); }
+ SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
+ SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
+ SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
+ SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
+ SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
+ SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
+ SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
+ SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
+ SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
+ SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
+ SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
+ SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
+ SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
+ SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
+ SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
+ SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
+ SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
+ SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
+ SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
+ SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
+ SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
+ SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
+ SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
+ SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
+ SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
+ SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
+ SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
+ SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
+ SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
+ SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
+ SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
+ SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
+ SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
+ SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
+ SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
+ SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
+ SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
+)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go
new file mode 100644
index 000000000..07919e0ec
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/zsysnum_openbsd_riscv64.go
@@ -0,0 +1,219 @@
+// go run mksysnum.go https://cvsweb.openbsd.org/cgi-bin/cvsweb/~checkout~/src/sys/kern/syscalls.master
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build riscv64 && openbsd
+// +build riscv64,openbsd
+
+package unix
+
+// Deprecated: Use libc wrappers instead of direct syscalls.
+const (
+ SYS_EXIT = 1 // { void sys_exit(int rval); }
+ SYS_FORK = 2 // { int sys_fork(void); }
+ SYS_READ = 3 // { ssize_t sys_read(int fd, void *buf, size_t nbyte); }
+ SYS_WRITE = 4 // { ssize_t sys_write(int fd, const void *buf, size_t nbyte); }
+ SYS_OPEN = 5 // { int sys_open(const char *path, int flags, ... mode_t mode); }
+ SYS_CLOSE = 6 // { int sys_close(int fd); }
+ SYS_GETENTROPY = 7 // { int sys_getentropy(void *buf, size_t nbyte); }
+ SYS___TFORK = 8 // { int sys___tfork(const struct __tfork *param, size_t psize); }
+ SYS_LINK = 9 // { int sys_link(const char *path, const char *link); }
+ SYS_UNLINK = 10 // { int sys_unlink(const char *path); }
+ SYS_WAIT4 = 11 // { pid_t sys_wait4(pid_t pid, int *status, int options, struct rusage *rusage); }
+ SYS_CHDIR = 12 // { int sys_chdir(const char *path); }
+ SYS_FCHDIR = 13 // { int sys_fchdir(int fd); }
+ SYS_MKNOD = 14 // { int sys_mknod(const char *path, mode_t mode, dev_t dev); }
+ SYS_CHMOD = 15 // { int sys_chmod(const char *path, mode_t mode); }
+ SYS_CHOWN = 16 // { int sys_chown(const char *path, uid_t uid, gid_t gid); }
+ SYS_OBREAK = 17 // { int sys_obreak(char *nsize); } break
+ SYS_GETDTABLECOUNT = 18 // { int sys_getdtablecount(void); }
+ SYS_GETRUSAGE = 19 // { int sys_getrusage(int who, struct rusage *rusage); }
+ SYS_GETPID = 20 // { pid_t sys_getpid(void); }
+ SYS_MOUNT = 21 // { int sys_mount(const char *type, const char *path, int flags, void *data); }
+ SYS_UNMOUNT = 22 // { int sys_unmount(const char *path, int flags); }
+ SYS_SETUID = 23 // { int sys_setuid(uid_t uid); }
+ SYS_GETUID = 24 // { uid_t sys_getuid(void); }
+ SYS_GETEUID = 25 // { uid_t sys_geteuid(void); }
+ SYS_PTRACE = 26 // { int sys_ptrace(int req, pid_t pid, caddr_t addr, int data); }
+ SYS_RECVMSG = 27 // { ssize_t sys_recvmsg(int s, struct msghdr *msg, int flags); }
+ SYS_SENDMSG = 28 // { ssize_t sys_sendmsg(int s, const struct msghdr *msg, int flags); }
+ SYS_RECVFROM = 29 // { ssize_t sys_recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlenaddr); }
+ SYS_ACCEPT = 30 // { int sys_accept(int s, struct sockaddr *name, socklen_t *anamelen); }
+ SYS_GETPEERNAME = 31 // { int sys_getpeername(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_GETSOCKNAME = 32 // { int sys_getsockname(int fdes, struct sockaddr *asa, socklen_t *alen); }
+ SYS_ACCESS = 33 // { int sys_access(const char *path, int amode); }
+ SYS_CHFLAGS = 34 // { int sys_chflags(const char *path, u_int flags); }
+ SYS_FCHFLAGS = 35 // { int sys_fchflags(int fd, u_int flags); }
+ SYS_SYNC = 36 // { void sys_sync(void); }
+ SYS_STAT = 38 // { int sys_stat(const char *path, struct stat *ub); }
+ SYS_GETPPID = 39 // { pid_t sys_getppid(void); }
+ SYS_LSTAT = 40 // { int sys_lstat(const char *path, struct stat *ub); }
+ SYS_DUP = 41 // { int sys_dup(int fd); }
+ SYS_FSTATAT = 42 // { int sys_fstatat(int fd, const char *path, struct stat *buf, int flag); }
+ SYS_GETEGID = 43 // { gid_t sys_getegid(void); }
+ SYS_PROFIL = 44 // { int sys_profil(caddr_t samples, size_t size, u_long offset, u_int scale); }
+ SYS_KTRACE = 45 // { int sys_ktrace(const char *fname, int ops, int facs, pid_t pid); }
+ SYS_SIGACTION = 46 // { int sys_sigaction(int signum, const struct sigaction *nsa, struct sigaction *osa); }
+ SYS_GETGID = 47 // { gid_t sys_getgid(void); }
+ SYS_SIGPROCMASK = 48 // { int sys_sigprocmask(int how, sigset_t mask); }
+ SYS_SETLOGIN = 50 // { int sys_setlogin(const char *namebuf); }
+ SYS_ACCT = 51 // { int sys_acct(const char *path); }
+ SYS_SIGPENDING = 52 // { int sys_sigpending(void); }
+ SYS_FSTAT = 53 // { int sys_fstat(int fd, struct stat *sb); }
+ SYS_IOCTL = 54 // { int sys_ioctl(int fd, u_long com, ... void *data); }
+ SYS_REBOOT = 55 // { int sys_reboot(int opt); }
+ SYS_REVOKE = 56 // { int sys_revoke(const char *path); }
+ SYS_SYMLINK = 57 // { int sys_symlink(const char *path, const char *link); }
+ SYS_READLINK = 58 // { ssize_t sys_readlink(const char *path, char *buf, size_t count); }
+ SYS_EXECVE = 59 // { int sys_execve(const char *path, char * const *argp, char * const *envp); }
+ SYS_UMASK = 60 // { mode_t sys_umask(mode_t newmask); }
+ SYS_CHROOT = 61 // { int sys_chroot(const char *path); }
+ SYS_GETFSSTAT = 62 // { int sys_getfsstat(struct statfs *buf, size_t bufsize, int flags); }
+ SYS_STATFS = 63 // { int sys_statfs(const char *path, struct statfs *buf); }
+ SYS_FSTATFS = 64 // { int sys_fstatfs(int fd, struct statfs *buf); }
+ SYS_FHSTATFS = 65 // { int sys_fhstatfs(const fhandle_t *fhp, struct statfs *buf); }
+ SYS_VFORK = 66 // { int sys_vfork(void); }
+ SYS_GETTIMEOFDAY = 67 // { int sys_gettimeofday(struct timeval *tp, struct timezone *tzp); }
+ SYS_SETTIMEOFDAY = 68 // { int sys_settimeofday(const struct timeval *tv, const struct timezone *tzp); }
+ SYS_SETITIMER = 69 // { int sys_setitimer(int which, const struct itimerval *itv, struct itimerval *oitv); }
+ SYS_GETITIMER = 70 // { int sys_getitimer(int which, struct itimerval *itv); }
+ SYS_SELECT = 71 // { int sys_select(int nd, fd_set *in, fd_set *ou, fd_set *ex, struct timeval *tv); }
+ SYS_KEVENT = 72 // { int sys_kevent(int fd, const struct kevent *changelist, int nchanges, struct kevent *eventlist, int nevents, const struct timespec *timeout); }
+ SYS_MUNMAP = 73 // { int sys_munmap(void *addr, size_t len); }
+ SYS_MPROTECT = 74 // { int sys_mprotect(void *addr, size_t len, int prot); }
+ SYS_MADVISE = 75 // { int sys_madvise(void *addr, size_t len, int behav); }
+ SYS_UTIMES = 76 // { int sys_utimes(const char *path, const struct timeval *tptr); }
+ SYS_FUTIMES = 77 // { int sys_futimes(int fd, const struct timeval *tptr); }
+ SYS_GETGROUPS = 79 // { int sys_getgroups(int gidsetsize, gid_t *gidset); }
+ SYS_SETGROUPS = 80 // { int sys_setgroups(int gidsetsize, const gid_t *gidset); }
+ SYS_GETPGRP = 81 // { int sys_getpgrp(void); }
+ SYS_SETPGID = 82 // { int sys_setpgid(pid_t pid, pid_t pgid); }
+ SYS_FUTEX = 83 // { int sys_futex(uint32_t *f, int op, int val, const struct timespec *timeout, uint32_t *g); }
+ SYS_UTIMENSAT = 84 // { int sys_utimensat(int fd, const char *path, const struct timespec *times, int flag); }
+ SYS_FUTIMENS = 85 // { int sys_futimens(int fd, const struct timespec *times); }
+ SYS_KBIND = 86 // { int sys_kbind(const struct __kbind *param, size_t psize, int64_t proc_cookie); }
+ SYS_CLOCK_GETTIME = 87 // { int sys_clock_gettime(clockid_t clock_id, struct timespec *tp); }
+ SYS_CLOCK_SETTIME = 88 // { int sys_clock_settime(clockid_t clock_id, const struct timespec *tp); }
+ SYS_CLOCK_GETRES = 89 // { int sys_clock_getres(clockid_t clock_id, struct timespec *tp); }
+ SYS_DUP2 = 90 // { int sys_dup2(int from, int to); }
+ SYS_NANOSLEEP = 91 // { int sys_nanosleep(const struct timespec *rqtp, struct timespec *rmtp); }
+ SYS_FCNTL = 92 // { int sys_fcntl(int fd, int cmd, ... void *arg); }
+ SYS_ACCEPT4 = 93 // { int sys_accept4(int s, struct sockaddr *name, socklen_t *anamelen, int flags); }
+ SYS___THRSLEEP = 94 // { int sys___thrsleep(const volatile void *ident, clockid_t clock_id, const struct timespec *tp, void *lock, const int *abort); }
+ SYS_FSYNC = 95 // { int sys_fsync(int fd); }
+ SYS_SETPRIORITY = 96 // { int sys_setpriority(int which, id_t who, int prio); }
+ SYS_SOCKET = 97 // { int sys_socket(int domain, int type, int protocol); }
+ SYS_CONNECT = 98 // { int sys_connect(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_GETDENTS = 99 // { int sys_getdents(int fd, void *buf, size_t buflen); }
+ SYS_GETPRIORITY = 100 // { int sys_getpriority(int which, id_t who); }
+ SYS_PIPE2 = 101 // { int sys_pipe2(int *fdp, int flags); }
+ SYS_DUP3 = 102 // { int sys_dup3(int from, int to, int flags); }
+ SYS_SIGRETURN = 103 // { int sys_sigreturn(struct sigcontext *sigcntxp); }
+ SYS_BIND = 104 // { int sys_bind(int s, const struct sockaddr *name, socklen_t namelen); }
+ SYS_SETSOCKOPT = 105 // { int sys_setsockopt(int s, int level, int name, const void *val, socklen_t valsize); }
+ SYS_LISTEN = 106 // { int sys_listen(int s, int backlog); }
+ SYS_CHFLAGSAT = 107 // { int sys_chflagsat(int fd, const char *path, u_int flags, int atflags); }
+ SYS_PLEDGE = 108 // { int sys_pledge(const char *promises, const char *execpromises); }
+ SYS_PPOLL = 109 // { int sys_ppoll(struct pollfd *fds, u_int nfds, const struct timespec *ts, const sigset_t *mask); }
+ SYS_PSELECT = 110 // { int sys_pselect(int nd, fd_set *in, fd_set *ou, fd_set *ex, const struct timespec *ts, const sigset_t *mask); }
+ SYS_SIGSUSPEND = 111 // { int sys_sigsuspend(int mask); }
+ SYS_SENDSYSLOG = 112 // { int sys_sendsyslog(const char *buf, size_t nbyte, int flags); }
+ SYS_UNVEIL = 114 // { int sys_unveil(const char *path, const char *permissions); }
+ SYS_GETSOCKOPT = 118 // { int sys_getsockopt(int s, int level, int name, void *val, socklen_t *avalsize); }
+ SYS_THRKILL = 119 // { int sys_thrkill(pid_t tid, int signum, void *tcb); }
+ SYS_READV = 120 // { ssize_t sys_readv(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_WRITEV = 121 // { ssize_t sys_writev(int fd, const struct iovec *iovp, int iovcnt); }
+ SYS_KILL = 122 // { int sys_kill(int pid, int signum); }
+ SYS_FCHOWN = 123 // { int sys_fchown(int fd, uid_t uid, gid_t gid); }
+ SYS_FCHMOD = 124 // { int sys_fchmod(int fd, mode_t mode); }
+ SYS_SETREUID = 126 // { int sys_setreuid(uid_t ruid, uid_t euid); }
+ SYS_SETREGID = 127 // { int sys_setregid(gid_t rgid, gid_t egid); }
+ SYS_RENAME = 128 // { int sys_rename(const char *from, const char *to); }
+ SYS_FLOCK = 131 // { int sys_flock(int fd, int how); }
+ SYS_MKFIFO = 132 // { int sys_mkfifo(const char *path, mode_t mode); }
+ SYS_SENDTO = 133 // { ssize_t sys_sendto(int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); }
+ SYS_SHUTDOWN = 134 // { int sys_shutdown(int s, int how); }
+ SYS_SOCKETPAIR = 135 // { int sys_socketpair(int domain, int type, int protocol, int *rsv); }
+ SYS_MKDIR = 136 // { int sys_mkdir(const char *path, mode_t mode); }
+ SYS_RMDIR = 137 // { int sys_rmdir(const char *path); }
+ SYS_ADJTIME = 140 // { int sys_adjtime(const struct timeval *delta, struct timeval *olddelta); }
+ SYS_GETLOGIN_R = 141 // { int sys_getlogin_r(char *namebuf, u_int namelen); }
+ SYS_SETSID = 147 // { int sys_setsid(void); }
+ SYS_QUOTACTL = 148 // { int sys_quotactl(const char *path, int cmd, int uid, char *arg); }
+ SYS_NFSSVC = 155 // { int sys_nfssvc(int flag, void *argp); }
+ SYS_GETFH = 161 // { int sys_getfh(const char *fname, fhandle_t *fhp); }
+ SYS_SYSARCH = 165 // { int sys_sysarch(int op, void *parms); }
+ SYS_PREAD = 173 // { ssize_t sys_pread(int fd, void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_PWRITE = 174 // { ssize_t sys_pwrite(int fd, const void *buf, size_t nbyte, int pad, off_t offset); }
+ SYS_SETGID = 181 // { int sys_setgid(gid_t gid); }
+ SYS_SETEGID = 182 // { int sys_setegid(gid_t egid); }
+ SYS_SETEUID = 183 // { int sys_seteuid(uid_t euid); }
+ SYS_PATHCONF = 191 // { long sys_pathconf(const char *path, int name); }
+ SYS_FPATHCONF = 192 // { long sys_fpathconf(int fd, int name); }
+ SYS_SWAPCTL = 193 // { int sys_swapctl(int cmd, const void *arg, int misc); }
+ SYS_GETRLIMIT = 194 // { int sys_getrlimit(int which, struct rlimit *rlp); }
+ SYS_SETRLIMIT = 195 // { int sys_setrlimit(int which, const struct rlimit *rlp); }
+ SYS_MMAP = 197 // { void *sys_mmap(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_LSEEK = 199 // { off_t sys_lseek(int fd, int pad, off_t offset, int whence); }
+ SYS_TRUNCATE = 200 // { int sys_truncate(const char *path, int pad, off_t length); }
+ SYS_FTRUNCATE = 201 // { int sys_ftruncate(int fd, int pad, off_t length); }
+ SYS_SYSCTL = 202 // { int sys_sysctl(const int *name, u_int namelen, void *old, size_t *oldlenp, void *new, size_t newlen); }
+ SYS_MLOCK = 203 // { int sys_mlock(const void *addr, size_t len); }
+ SYS_MUNLOCK = 204 // { int sys_munlock(const void *addr, size_t len); }
+ SYS_GETPGID = 207 // { pid_t sys_getpgid(pid_t pid); }
+ SYS_UTRACE = 209 // { int sys_utrace(const char *label, const void *addr, size_t len); }
+ SYS_SEMGET = 221 // { int sys_semget(key_t key, int nsems, int semflg); }
+ SYS_MSGGET = 225 // { int sys_msgget(key_t key, int msgflg); }
+ SYS_MSGSND = 226 // { int sys_msgsnd(int msqid, const void *msgp, size_t msgsz, int msgflg); }
+ SYS_MSGRCV = 227 // { int sys_msgrcv(int msqid, void *msgp, size_t msgsz, long msgtyp, int msgflg); }
+ SYS_SHMAT = 228 // { void *sys_shmat(int shmid, const void *shmaddr, int shmflg); }
+ SYS_SHMDT = 230 // { int sys_shmdt(const void *shmaddr); }
+ SYS_MINHERIT = 250 // { int sys_minherit(void *addr, size_t len, int inherit); }
+ SYS_POLL = 252 // { int sys_poll(struct pollfd *fds, u_int nfds, int timeout); }
+ SYS_ISSETUGID = 253 // { int sys_issetugid(void); }
+ SYS_LCHOWN = 254 // { int sys_lchown(const char *path, uid_t uid, gid_t gid); }
+ SYS_GETSID = 255 // { pid_t sys_getsid(pid_t pid); }
+ SYS_MSYNC = 256 // { int sys_msync(void *addr, size_t len, int flags); }
+ SYS_PIPE = 263 // { int sys_pipe(int *fdp); }
+ SYS_FHOPEN = 264 // { int sys_fhopen(const fhandle_t *fhp, int flags); }
+ SYS_PREADV = 267 // { ssize_t sys_preadv(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_PWRITEV = 268 // { ssize_t sys_pwritev(int fd, const struct iovec *iovp, int iovcnt, int pad, off_t offset); }
+ SYS_KQUEUE = 269 // { int sys_kqueue(void); }
+ SYS_MLOCKALL = 271 // { int sys_mlockall(int flags); }
+ SYS_MUNLOCKALL = 272 // { int sys_munlockall(void); }
+ SYS_GETRESUID = 281 // { int sys_getresuid(uid_t *ruid, uid_t *euid, uid_t *suid); }
+ SYS_SETRESUID = 282 // { int sys_setresuid(uid_t ruid, uid_t euid, uid_t suid); }
+ SYS_GETRESGID = 283 // { int sys_getresgid(gid_t *rgid, gid_t *egid, gid_t *sgid); }
+ SYS_SETRESGID = 284 // { int sys_setresgid(gid_t rgid, gid_t egid, gid_t sgid); }
+ SYS_MQUERY = 286 // { void *sys_mquery(void *addr, size_t len, int prot, int flags, int fd, long pad, off_t pos); }
+ SYS_CLOSEFROM = 287 // { int sys_closefrom(int fd); }
+ SYS_SIGALTSTACK = 288 // { int sys_sigaltstack(const struct sigaltstack *nss, struct sigaltstack *oss); }
+ SYS_SHMGET = 289 // { int sys_shmget(key_t key, size_t size, int shmflg); }
+ SYS_SEMOP = 290 // { int sys_semop(int semid, struct sembuf *sops, size_t nsops); }
+ SYS_FHSTAT = 294 // { int sys_fhstat(const fhandle_t *fhp, struct stat *sb); }
+ SYS___SEMCTL = 295 // { int sys___semctl(int semid, int semnum, int cmd, union semun *arg); }
+ SYS_SHMCTL = 296 // { int sys_shmctl(int shmid, int cmd, struct shmid_ds *buf); }
+ SYS_MSGCTL = 297 // { int sys_msgctl(int msqid, int cmd, struct msqid_ds *buf); }
+ SYS_SCHED_YIELD = 298 // { int sys_sched_yield(void); }
+ SYS_GETTHRID = 299 // { pid_t sys_getthrid(void); }
+ SYS___THRWAKEUP = 301 // { int sys___thrwakeup(const volatile void *ident, int n); }
+ SYS___THREXIT = 302 // { void sys___threxit(pid_t *notdead); }
+ SYS___THRSIGDIVERT = 303 // { int sys___thrsigdivert(sigset_t sigmask, siginfo_t *info, const struct timespec *timeout); }
+ SYS___GETCWD = 304 // { int sys___getcwd(char *buf, size_t len); }
+ SYS_ADJFREQ = 305 // { int sys_adjfreq(const int64_t *freq, int64_t *oldfreq); }
+ SYS_SETRTABLE = 310 // { int sys_setrtable(int rtableid); }
+ SYS_GETRTABLE = 311 // { int sys_getrtable(void); }
+ SYS_FACCESSAT = 313 // { int sys_faccessat(int fd, const char *path, int amode, int flag); }
+ SYS_FCHMODAT = 314 // { int sys_fchmodat(int fd, const char *path, mode_t mode, int flag); }
+ SYS_FCHOWNAT = 315 // { int sys_fchownat(int fd, const char *path, uid_t uid, gid_t gid, int flag); }
+ SYS_LINKAT = 317 // { int sys_linkat(int fd1, const char *path1, int fd2, const char *path2, int flag); }
+ SYS_MKDIRAT = 318 // { int sys_mkdirat(int fd, const char *path, mode_t mode); }
+ SYS_MKFIFOAT = 319 // { int sys_mkfifoat(int fd, const char *path, mode_t mode); }
+ SYS_MKNODAT = 320 // { int sys_mknodat(int fd, const char *path, mode_t mode, dev_t dev); }
+ SYS_OPENAT = 321 // { int sys_openat(int fd, const char *path, int flags, ... mode_t mode); }
+ SYS_READLINKAT = 322 // { ssize_t sys_readlinkat(int fd, const char *path, char *buf, size_t count); }
+ SYS_RENAMEAT = 323 // { int sys_renameat(int fromfd, const char *from, int tofd, const char *to); }
+ SYS_SYMLINKAT = 324 // { int sys_symlinkat(const char *path, int fd, const char *link); }
+ SYS_UNLINKAT = 325 // { int sys_unlinkat(int fd, const char *path, int flag); }
+ SYS___SET_TCB = 329 // { void sys___set_tcb(void *tcb); }
+ SYS___GET_TCB = 330 // { void *sys___get_tcb(void); }
+)
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
index dea0c9a60..d9c78cdcb 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_386.go
@@ -294,7 +294,7 @@ type PtraceLwpInfoStruct struct {
Flags int32
Sigmask Sigset_t
Siglist Sigset_t
- Siginfo __Siginfo
+ Siginfo __PtraceSiginfo
Tdname [20]int8
Child_pid int32
Syscall_code uint32
@@ -312,6 +312,17 @@ type __Siginfo struct {
Value [4]byte
_ [32]byte
}
+type __PtraceSiginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr uintptr
+ Value [4]byte
+ _ [32]byte
+}
type Sigset_t struct {
Val [4]uint32
@@ -350,8 +361,8 @@ type FpExtendedPrecision struct{}
type PtraceIoDesc struct {
Op int32
- Offs *byte
- Addr *byte
+ Offs uintptr
+ Addr uintptr
Len uint32
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
index da0ea0d60..26991b165 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_amd64.go
@@ -291,7 +291,7 @@ type PtraceLwpInfoStruct struct {
Flags int32
Sigmask Sigset_t
Siglist Sigset_t
- Siginfo __Siginfo
+ Siginfo __PtraceSiginfo
Tdname [20]int8
Child_pid int32
Syscall_code uint32
@@ -310,6 +310,18 @@ type __Siginfo struct {
_ [40]byte
}
+type __PtraceSiginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr uintptr
+ Value [8]byte
+ _ [40]byte
+}
+
type Sigset_t struct {
Val [4]uint32
}
@@ -354,8 +366,8 @@ type FpExtendedPrecision struct{}
type PtraceIoDesc struct {
Op int32
- Offs *byte
- Addr *byte
+ Offs uintptr
+ Addr uintptr
Len uint64
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
index da8f74045..f8324e7e7 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm.go
@@ -293,7 +293,7 @@ type PtraceLwpInfoStruct struct {
Flags int32
Sigmask Sigset_t
Siglist Sigset_t
- Siginfo __Siginfo
+ Siginfo __PtraceSiginfo
Tdname [20]int8
Child_pid int32
Syscall_code uint32
@@ -312,6 +312,18 @@ type __Siginfo struct {
_ [32]byte
}
+type __PtraceSiginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr uintptr
+ Value [4]byte
+ _ [32]byte
+}
+
type Sigset_t struct {
Val [4]uint32
}
@@ -337,8 +349,8 @@ type FpExtendedPrecision struct {
type PtraceIoDesc struct {
Op int32
- Offs *byte
- Addr *byte
+ Offs uintptr
+ Addr uintptr
Len uint32
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
index d69988e5e..4220411f3 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_arm64.go
@@ -291,7 +291,7 @@ type PtraceLwpInfoStruct struct {
Flags int32
Sigmask Sigset_t
Siglist Sigset_t
- Siginfo __Siginfo
+ Siginfo __PtraceSiginfo
Tdname [20]int8
Child_pid int32
Syscall_code uint32
@@ -310,6 +310,18 @@ type __Siginfo struct {
_ [40]byte
}
+type __PtraceSiginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr uintptr
+ Value [8]byte
+ _ [40]byte
+}
+
type Sigset_t struct {
Val [4]uint32
}
@@ -334,8 +346,8 @@ type FpExtendedPrecision struct{}
type PtraceIoDesc struct {
Op int32
- Offs *byte
- Addr *byte
+ Offs uintptr
+ Addr uintptr
Len uint64
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
index d6fd9e883..0660fd45c 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_freebsd_riscv64.go
@@ -291,7 +291,7 @@ type PtraceLwpInfoStruct struct {
Flags int32
Sigmask Sigset_t
Siglist Sigset_t
- Siginfo __Siginfo
+ Siginfo __PtraceSiginfo
Tdname [20]int8
Child_pid int32
Syscall_code uint32
@@ -310,6 +310,18 @@ type __Siginfo struct {
_ [40]byte
}
+type __PtraceSiginfo struct {
+ Signo int32
+ Errno int32
+ Code int32
+ Pid int32
+ Uid uint32
+ Status int32
+ Addr uintptr
+ Value [8]byte
+ _ [40]byte
+}
+
type Sigset_t struct {
Val [4]uint32
}
@@ -335,8 +347,8 @@ type FpExtendedPrecision struct{}
type PtraceIoDesc struct {
Op int32
- Offs *byte
- Addr *byte
+ Offs uintptr
+ Addr uintptr
Len uint64
}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
deleted file mode 100644
index 4c485261d..000000000
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go
+++ /dev/null
@@ -1,42 +0,0 @@
-// cgo -godefs types_illumos.go | go run mkpost.go
-// Code generated by the command above; see README.md. DO NOT EDIT.
-
-//go:build amd64 && illumos
-// +build amd64,illumos
-
-package unix
-
-const (
- TUNNEWPPA = 0x540001
- TUNSETPPA = 0x540002
-
- I_STR = 0x5308
- I_POP = 0x5303
- I_PUSH = 0x5302
- I_LINK = 0x530c
- I_UNLINK = 0x530d
- I_PLINK = 0x5316
- I_PUNLINK = 0x5317
-
- IF_UNITSEL = -0x7ffb8cca
-)
-
-type strbuf struct {
- Maxlen int32
- Len int32
- Buf *int8
-}
-
-type Strioctl struct {
- Cmd int32
- Timout int32
- Len int32
- Dp *int8
-}
-
-type Lifreq struct {
- Name [32]int8
- Lifru1 [4]byte
- Type uint32
- Lifru [336]byte
-}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_386.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
index 263604401..89c516a29 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_386.go
@@ -254,6 +254,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
index 8187489d1..62b4fb269 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_amd64.go
@@ -269,6 +269,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
index d1612335f..e86b35893 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_arm.go
@@ -245,6 +245,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
index c28e5556b..6c6be4c91 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_arm64.go
@@ -248,6 +248,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
index 187061f9f..4982ea355 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_loong64.go
@@ -249,6 +249,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
index 369129917..173141a67 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips.go
@@ -250,6 +250,12 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+const (
+ SIG_BLOCK = 0x1
+ SIG_UNBLOCK = 0x2
+ SIG_SETMASK = 0x3
+)
+
type Siginfo struct {
Signo int32
Code int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
index 7473468d7..93ae4c516 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips64.go
@@ -251,6 +251,12 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+const (
+ SIG_BLOCK = 0x1
+ SIG_UNBLOCK = 0x2
+ SIG_SETMASK = 0x3
+)
+
type Siginfo struct {
Signo int32
Code int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
index ed9448524..4e4e510ca 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mips64le.go
@@ -251,6 +251,12 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+const (
+ SIG_BLOCK = 0x1
+ SIG_UNBLOCK = 0x2
+ SIG_SETMASK = 0x3
+)
+
type Siginfo struct {
Signo int32
Code int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
index 0892a73a4..3f5ba013d 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_mipsle.go
@@ -250,6 +250,12 @@ type Sigset_t struct {
const _C__NSIG = 0x80
+const (
+ SIG_BLOCK = 0x1
+ SIG_UNBLOCK = 0x2
+ SIG_SETMASK = 0x3
+)
+
type Siginfo struct {
Signo int32
Code int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
index e1dd48333..71dfe7cdb 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc.go
@@ -257,6 +257,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
index d9f654c7b..3a2b7f0a6 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64.go
@@ -258,6 +258,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
index 74acda9fe..a52d62756 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_ppc64le.go
@@ -258,6 +258,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
index 50ebe69eb..dfc007d8a 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_riscv64.go
@@ -276,6 +276,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
index 75b34c259..b53cb9103 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_s390x.go
@@ -271,6 +271,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x0
+ SIG_UNBLOCK = 0x1
+ SIG_SETMASK = 0x2
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
index 429c3bf7d..fe0aa3547 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_linux_sparc64.go
@@ -253,6 +253,12 @@ type Sigset_t struct {
const _C__NSIG = 0x41
+const (
+ SIG_BLOCK = 0x1
+ SIG_UNBLOCK = 0x2
+ SIG_SETMASK = 0x4
+)
+
type Siginfo struct {
Signo int32
Errno int32
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go
new file mode 100644
index 000000000..d6724c010
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_openbsd_ppc64.go
@@ -0,0 +1,571 @@
+// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build ppc64 && openbsd
+// +build ppc64,openbsd
+
+package unix
+
+const (
+ SizeofPtr = 0x8
+ SizeofShort = 0x2
+ SizeofInt = 0x4
+ SizeofLong = 0x8
+ SizeofLongLong = 0x8
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type _Gid_t uint32
+
+type Stat_t struct {
+ Mode uint32
+ Dev int32
+ Ino uint64
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev int32
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ Size int64
+ Blocks int64
+ Blksize int32
+ Flags uint32
+ Gen uint32
+ _ Timespec
+}
+
+type Statfs_t struct {
+ F_flags uint32
+ F_bsize uint32
+ F_iosize uint32
+ F_blocks uint64
+ F_bfree uint64
+ F_bavail int64
+ F_files uint64
+ F_ffree uint64
+ F_favail int64
+ F_syncwrites uint64
+ F_syncreads uint64
+ F_asyncwrites uint64
+ F_asyncreads uint64
+ F_fsid Fsid
+ F_namemax uint32
+ F_owner uint32
+ F_ctime uint64
+ F_fstypename [16]byte
+ F_mntonname [90]byte
+ F_mntfromname [90]byte
+ F_mntfromspec [90]byte
+ _ [2]byte
+ Mount_info [160]byte
+}
+
+type Flock_t struct {
+ Start int64
+ Len int64
+ Pid int32
+ Type int16
+ Whence int16
+}
+
+type Dirent struct {
+ Fileno uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Namlen uint8
+ _ [4]uint8
+ Name [256]int8
+}
+
+type Fsid struct {
+ Val [2]int32
+}
+
+const (
+ PathMax = 0x400
+)
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [104]int8
+}
+
+type RawSockaddrDatalink struct {
+ Len uint8
+ Family uint8
+ Index uint16
+ Type uint8
+ Nlen uint8
+ Alen uint8
+ Slen uint8
+ Data [24]int8
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]int8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [92]int8
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *Iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type Cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Filt [8]uint32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x6c
+ SizeofSockaddrUnix = 0x6a
+ SizeofSockaddrDatalink = 0x20
+ SizeofLinger = 0x8
+ SizeofIovec = 0x10
+ SizeofIPMreq = 0x8
+ SizeofIPv6Mreq = 0x14
+ SizeofMsghdr = 0x30
+ SizeofCmsghdr = 0xc
+ SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
+)
+
+const (
+ PTRACE_TRACEME = 0x0
+ PTRACE_CONT = 0x7
+ PTRACE_KILL = 0x8
+)
+
+type Kevent_t struct {
+ Ident uint64
+ Filter int16
+ Flags uint16
+ Fflags uint32
+ Data int64
+ Udata *byte
+}
+
+type FdSet struct {
+ Bits [32]uint32
+}
+
+const (
+ SizeofIfMsghdr = 0xa8
+ SizeofIfData = 0x90
+ SizeofIfaMsghdr = 0x18
+ SizeofIfAnnounceMsghdr = 0x1a
+ SizeofRtMsghdr = 0x60
+ SizeofRtMetrics = 0x38
+)
+
+type IfMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Xflags int32
+ Data IfData
+}
+
+type IfData struct {
+ Type uint8
+ Addrlen uint8
+ Hdrlen uint8
+ Link_state uint8
+ Mtu uint32
+ Metric uint32
+ Rdomain uint32
+ Baudrate uint64
+ Ipackets uint64
+ Ierrors uint64
+ Opackets uint64
+ Oerrors uint64
+ Collisions uint64
+ Ibytes uint64
+ Obytes uint64
+ Imcasts uint64
+ Omcasts uint64
+ Iqdrops uint64
+ Oqdrops uint64
+ Noproto uint64
+ Capabilities uint32
+ Lastchange Timeval
+}
+
+type IfaMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Metric int32
+}
+
+type IfAnnounceMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ What uint16
+ Name [16]int8
+}
+
+type RtMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Priority uint8
+ Mpls uint8
+ Addrs int32
+ Flags int32
+ Fmask int32
+ Pid int32
+ Seq int32
+ Errno int32
+ Inits uint32
+ Rmx RtMetrics
+}
+
+type RtMetrics struct {
+ Pksent uint64
+ Expire int64
+ Locks uint32
+ Mtu uint32
+ Refcnt uint32
+ Hopcount uint32
+ Recvpipe uint32
+ Sendpipe uint32
+ Ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Pad uint32
+}
+
+type Mclpool struct{}
+
+const (
+ SizeofBpfVersion = 0x4
+ SizeofBpfStat = 0x8
+ SizeofBpfProgram = 0x10
+ SizeofBpfInsn = 0x8
+ SizeofBpfHdr = 0x18
+)
+
+type BpfVersion struct {
+ Major uint16
+ Minor uint16
+}
+
+type BpfStat struct {
+ Recv uint32
+ Drop uint32
+}
+
+type BpfProgram struct {
+ Len uint32
+ Insns *BpfInsn
+}
+
+type BpfInsn struct {
+ Code uint16
+ Jt uint8
+ Jf uint8
+ K uint32
+}
+
+type BpfHdr struct {
+ Tstamp BpfTimeval
+ Caplen uint32
+ Datalen uint32
+ Hdrlen uint16
+ Ifidx uint16
+ Flowid uint16
+ Flags uint8
+ Drops uint8
+}
+
+type BpfTimeval struct {
+ Sec uint32
+ Usec uint32
+}
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]uint8
+ Ispeed int32
+ Ospeed int32
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+const (
+ AT_FDCWD = -0x64
+ AT_EACCESS = 0x1
+ AT_SYMLINK_NOFOLLOW = 0x2
+ AT_SYMLINK_FOLLOW = 0x4
+ AT_REMOVEDIR = 0x8
+)
+
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+const (
+ POLLERR = 0x8
+ POLLHUP = 0x10
+ POLLIN = 0x1
+ POLLNVAL = 0x20
+ POLLOUT = 0x4
+ POLLPRI = 0x2
+ POLLRDBAND = 0x80
+ POLLRDNORM = 0x40
+ POLLWRBAND = 0x100
+ POLLWRNORM = 0x4
+)
+
+type Sigset_t uint32
+
+type Utsname struct {
+ Sysname [256]byte
+ Nodename [256]byte
+ Release [256]byte
+ Version [256]byte
+ Machine [256]byte
+}
+
+const SizeofUvmexp = 0x158
+
+type Uvmexp struct {
+ Pagesize int32
+ Pagemask int32
+ Pageshift int32
+ Npages int32
+ Free int32
+ Active int32
+ Inactive int32
+ Paging int32
+ Wired int32
+ Zeropages int32
+ Reserve_pagedaemon int32
+ Reserve_kernel int32
+ Unused01 int32
+ Vnodepages int32
+ Vtextpages int32
+ Freemin int32
+ Freetarg int32
+ Inactarg int32
+ Wiredmax int32
+ Anonmin int32
+ Vtextmin int32
+ Vnodemin int32
+ Anonminpct int32
+ Vtextminpct int32
+ Vnodeminpct int32
+ Nswapdev int32
+ Swpages int32
+ Swpginuse int32
+ Swpgonly int32
+ Nswget int32
+ Nanon int32
+ Unused05 int32
+ Unused06 int32
+ Faults int32
+ Traps int32
+ Intrs int32
+ Swtch int32
+ Softs int32
+ Syscalls int32
+ Pageins int32
+ Unused07 int32
+ Unused08 int32
+ Pgswapin int32
+ Pgswapout int32
+ Forks int32
+ Forks_ppwait int32
+ Forks_sharevm int32
+ Pga_zerohit int32
+ Pga_zeromiss int32
+ Unused09 int32
+ Fltnoram int32
+ Fltnoanon int32
+ Fltnoamap int32
+ Fltpgwait int32
+ Fltpgrele int32
+ Fltrelck int32
+ Fltrelckok int32
+ Fltanget int32
+ Fltanretry int32
+ Fltamcopy int32
+ Fltnamap int32
+ Fltnomap int32
+ Fltlget int32
+ Fltget int32
+ Flt_anon int32
+ Flt_acow int32
+ Flt_obj int32
+ Flt_prcopy int32
+ Flt_przero int32
+ Pdwoke int32
+ Pdrevs int32
+ Pdswout int32
+ Pdfreed int32
+ Pdscans int32
+ Pdanscan int32
+ Pdobscan int32
+ Pdreact int32
+ Pdbusy int32
+ Pdpageouts int32
+ Pdpending int32
+ Pddeact int32
+ Unused11 int32
+ Unused12 int32
+ Unused13 int32
+ Fpswtch int32
+ Kmapent int32
+}
+
+const SizeofClockinfo = 0x10
+
+type Clockinfo struct {
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go
new file mode 100644
index 000000000..ddfd27a43
--- /dev/null
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_openbsd_riscv64.go
@@ -0,0 +1,571 @@
+// cgo -godefs -- -fsigned-char types_openbsd.go | go run mkpost.go
+// Code generated by the command above; see README.md. DO NOT EDIT.
+
+//go:build riscv64 && openbsd
+// +build riscv64,openbsd
+
+package unix
+
+const (
+ SizeofPtr = 0x8
+ SizeofShort = 0x2
+ SizeofInt = 0x4
+ SizeofLong = 0x8
+ SizeofLongLong = 0x8
+)
+
+type (
+ _C_short int16
+ _C_int int32
+ _C_long int64
+ _C_long_long int64
+)
+
+type Timespec struct {
+ Sec int64
+ Nsec int64
+}
+
+type Timeval struct {
+ Sec int64
+ Usec int64
+}
+
+type Rusage struct {
+ Utime Timeval
+ Stime Timeval
+ Maxrss int64
+ Ixrss int64
+ Idrss int64
+ Isrss int64
+ Minflt int64
+ Majflt int64
+ Nswap int64
+ Inblock int64
+ Oublock int64
+ Msgsnd int64
+ Msgrcv int64
+ Nsignals int64
+ Nvcsw int64
+ Nivcsw int64
+}
+
+type Rlimit struct {
+ Cur uint64
+ Max uint64
+}
+
+type _Gid_t uint32
+
+type Stat_t struct {
+ Mode uint32
+ Dev int32
+ Ino uint64
+ Nlink uint32
+ Uid uint32
+ Gid uint32
+ Rdev int32
+ Atim Timespec
+ Mtim Timespec
+ Ctim Timespec
+ Size int64
+ Blocks int64
+ Blksize int32
+ Flags uint32
+ Gen uint32
+ _ Timespec
+}
+
+type Statfs_t struct {
+ F_flags uint32
+ F_bsize uint32
+ F_iosize uint32
+ F_blocks uint64
+ F_bfree uint64
+ F_bavail int64
+ F_files uint64
+ F_ffree uint64
+ F_favail int64
+ F_syncwrites uint64
+ F_syncreads uint64
+ F_asyncwrites uint64
+ F_asyncreads uint64
+ F_fsid Fsid
+ F_namemax uint32
+ F_owner uint32
+ F_ctime uint64
+ F_fstypename [16]byte
+ F_mntonname [90]byte
+ F_mntfromname [90]byte
+ F_mntfromspec [90]byte
+ _ [2]byte
+ Mount_info [160]byte
+}
+
+type Flock_t struct {
+ Start int64
+ Len int64
+ Pid int32
+ Type int16
+ Whence int16
+}
+
+type Dirent struct {
+ Fileno uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Namlen uint8
+ _ [4]uint8
+ Name [256]int8
+}
+
+type Fsid struct {
+ Val [2]int32
+}
+
+const (
+ PathMax = 0x400
+)
+
+type RawSockaddrInet4 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Addr [4]byte /* in_addr */
+ Zero [8]int8
+}
+
+type RawSockaddrInet6 struct {
+ Len uint8
+ Family uint8
+ Port uint16
+ Flowinfo uint32
+ Addr [16]byte /* in6_addr */
+ Scope_id uint32
+}
+
+type RawSockaddrUnix struct {
+ Len uint8
+ Family uint8
+ Path [104]int8
+}
+
+type RawSockaddrDatalink struct {
+ Len uint8
+ Family uint8
+ Index uint16
+ Type uint8
+ Nlen uint8
+ Alen uint8
+ Slen uint8
+ Data [24]int8
+}
+
+type RawSockaddr struct {
+ Len uint8
+ Family uint8
+ Data [14]int8
+}
+
+type RawSockaddrAny struct {
+ Addr RawSockaddr
+ Pad [92]int8
+}
+
+type _Socklen uint32
+
+type Linger struct {
+ Onoff int32
+ Linger int32
+}
+
+type Iovec struct {
+ Base *byte
+ Len uint64
+}
+
+type IPMreq struct {
+ Multiaddr [4]byte /* in_addr */
+ Interface [4]byte /* in_addr */
+}
+
+type IPv6Mreq struct {
+ Multiaddr [16]byte /* in6_addr */
+ Interface uint32
+}
+
+type Msghdr struct {
+ Name *byte
+ Namelen uint32
+ Iov *Iovec
+ Iovlen uint32
+ Control *byte
+ Controllen uint32
+ Flags int32
+}
+
+type Cmsghdr struct {
+ Len uint32
+ Level int32
+ Type int32
+}
+
+type Inet6Pktinfo struct {
+ Addr [16]byte /* in6_addr */
+ Ifindex uint32
+}
+
+type IPv6MTUInfo struct {
+ Addr RawSockaddrInet6
+ Mtu uint32
+}
+
+type ICMPv6Filter struct {
+ Filt [8]uint32
+}
+
+const (
+ SizeofSockaddrInet4 = 0x10
+ SizeofSockaddrInet6 = 0x1c
+ SizeofSockaddrAny = 0x6c
+ SizeofSockaddrUnix = 0x6a
+ SizeofSockaddrDatalink = 0x20
+ SizeofLinger = 0x8
+ SizeofIovec = 0x10
+ SizeofIPMreq = 0x8
+ SizeofIPv6Mreq = 0x14
+ SizeofMsghdr = 0x30
+ SizeofCmsghdr = 0xc
+ SizeofInet6Pktinfo = 0x14
+ SizeofIPv6MTUInfo = 0x20
+ SizeofICMPv6Filter = 0x20
+)
+
+const (
+ PTRACE_TRACEME = 0x0
+ PTRACE_CONT = 0x7
+ PTRACE_KILL = 0x8
+)
+
+type Kevent_t struct {
+ Ident uint64
+ Filter int16
+ Flags uint16
+ Fflags uint32
+ Data int64
+ Udata *byte
+}
+
+type FdSet struct {
+ Bits [32]uint32
+}
+
+const (
+ SizeofIfMsghdr = 0xa8
+ SizeofIfData = 0x90
+ SizeofIfaMsghdr = 0x18
+ SizeofIfAnnounceMsghdr = 0x1a
+ SizeofRtMsghdr = 0x60
+ SizeofRtMetrics = 0x38
+)
+
+type IfMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Xflags int32
+ Data IfData
+}
+
+type IfData struct {
+ Type uint8
+ Addrlen uint8
+ Hdrlen uint8
+ Link_state uint8
+ Mtu uint32
+ Metric uint32
+ Rdomain uint32
+ Baudrate uint64
+ Ipackets uint64
+ Ierrors uint64
+ Opackets uint64
+ Oerrors uint64
+ Collisions uint64
+ Ibytes uint64
+ Obytes uint64
+ Imcasts uint64
+ Omcasts uint64
+ Iqdrops uint64
+ Oqdrops uint64
+ Noproto uint64
+ Capabilities uint32
+ Lastchange Timeval
+}
+
+type IfaMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Pad1 uint8
+ Pad2 uint8
+ Addrs int32
+ Flags int32
+ Metric int32
+}
+
+type IfAnnounceMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ What uint16
+ Name [16]int8
+}
+
+type RtMsghdr struct {
+ Msglen uint16
+ Version uint8
+ Type uint8
+ Hdrlen uint16
+ Index uint16
+ Tableid uint16
+ Priority uint8
+ Mpls uint8
+ Addrs int32
+ Flags int32
+ Fmask int32
+ Pid int32
+ Seq int32
+ Errno int32
+ Inits uint32
+ Rmx RtMetrics
+}
+
+type RtMetrics struct {
+ Pksent uint64
+ Expire int64
+ Locks uint32
+ Mtu uint32
+ Refcnt uint32
+ Hopcount uint32
+ Recvpipe uint32
+ Sendpipe uint32
+ Ssthresh uint32
+ Rtt uint32
+ Rttvar uint32
+ Pad uint32
+}
+
+type Mclpool struct{}
+
+const (
+ SizeofBpfVersion = 0x4
+ SizeofBpfStat = 0x8
+ SizeofBpfProgram = 0x10
+ SizeofBpfInsn = 0x8
+ SizeofBpfHdr = 0x18
+)
+
+type BpfVersion struct {
+ Major uint16
+ Minor uint16
+}
+
+type BpfStat struct {
+ Recv uint32
+ Drop uint32
+}
+
+type BpfProgram struct {
+ Len uint32
+ Insns *BpfInsn
+}
+
+type BpfInsn struct {
+ Code uint16
+ Jt uint8
+ Jf uint8
+ K uint32
+}
+
+type BpfHdr struct {
+ Tstamp BpfTimeval
+ Caplen uint32
+ Datalen uint32
+ Hdrlen uint16
+ Ifidx uint16
+ Flowid uint16
+ Flags uint8
+ Drops uint8
+}
+
+type BpfTimeval struct {
+ Sec uint32
+ Usec uint32
+}
+
+type Termios struct {
+ Iflag uint32
+ Oflag uint32
+ Cflag uint32
+ Lflag uint32
+ Cc [20]uint8
+ Ispeed int32
+ Ospeed int32
+}
+
+type Winsize struct {
+ Row uint16
+ Col uint16
+ Xpixel uint16
+ Ypixel uint16
+}
+
+const (
+ AT_FDCWD = -0x64
+ AT_EACCESS = 0x1
+ AT_SYMLINK_NOFOLLOW = 0x2
+ AT_SYMLINK_FOLLOW = 0x4
+ AT_REMOVEDIR = 0x8
+)
+
+type PollFd struct {
+ Fd int32
+ Events int16
+ Revents int16
+}
+
+const (
+ POLLERR = 0x8
+ POLLHUP = 0x10
+ POLLIN = 0x1
+ POLLNVAL = 0x20
+ POLLOUT = 0x4
+ POLLPRI = 0x2
+ POLLRDBAND = 0x80
+ POLLRDNORM = 0x40
+ POLLWRBAND = 0x100
+ POLLWRNORM = 0x4
+)
+
+type Sigset_t uint32
+
+type Utsname struct {
+ Sysname [256]byte
+ Nodename [256]byte
+ Release [256]byte
+ Version [256]byte
+ Machine [256]byte
+}
+
+const SizeofUvmexp = 0x158
+
+type Uvmexp struct {
+ Pagesize int32
+ Pagemask int32
+ Pageshift int32
+ Npages int32
+ Free int32
+ Active int32
+ Inactive int32
+ Paging int32
+ Wired int32
+ Zeropages int32
+ Reserve_pagedaemon int32
+ Reserve_kernel int32
+ Unused01 int32
+ Vnodepages int32
+ Vtextpages int32
+ Freemin int32
+ Freetarg int32
+ Inactarg int32
+ Wiredmax int32
+ Anonmin int32
+ Vtextmin int32
+ Vnodemin int32
+ Anonminpct int32
+ Vtextminpct int32
+ Vnodeminpct int32
+ Nswapdev int32
+ Swpages int32
+ Swpginuse int32
+ Swpgonly int32
+ Nswget int32
+ Nanon int32
+ Unused05 int32
+ Unused06 int32
+ Faults int32
+ Traps int32
+ Intrs int32
+ Swtch int32
+ Softs int32
+ Syscalls int32
+ Pageins int32
+ Unused07 int32
+ Unused08 int32
+ Pgswapin int32
+ Pgswapout int32
+ Forks int32
+ Forks_ppwait int32
+ Forks_sharevm int32
+ Pga_zerohit int32
+ Pga_zeromiss int32
+ Unused09 int32
+ Fltnoram int32
+ Fltnoanon int32
+ Fltnoamap int32
+ Fltpgwait int32
+ Fltpgrele int32
+ Fltrelck int32
+ Fltrelckok int32
+ Fltanget int32
+ Fltanretry int32
+ Fltamcopy int32
+ Fltnamap int32
+ Fltnomap int32
+ Fltlget int32
+ Fltget int32
+ Flt_anon int32
+ Flt_acow int32
+ Flt_obj int32
+ Flt_prcopy int32
+ Flt_przero int32
+ Pdwoke int32
+ Pdrevs int32
+ Pdswout int32
+ Pdfreed int32
+ Pdscans int32
+ Pdanscan int32
+ Pdobscan int32
+ Pdreact int32
+ Pdbusy int32
+ Pdpageouts int32
+ Pdpending int32
+ Pddeact int32
+ Unused11 int32
+ Unused12 int32
+ Unused13 int32
+ Fpswtch int32
+ Kmapent int32
+}
+
+const SizeofClockinfo = 0x10
+
+type Clockinfo struct {
+ Hz int32
+ Tick int32
+ Stathz int32
+ Profhz int32
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
index c1a9b83ad..0400747c6 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_solaris_amd64.go
@@ -480,3 +480,38 @@ const (
MOUNTEDOVER = 0x40000000
FILE_EXCEPTION = 0x60000070
)
+
+const (
+ TUNNEWPPA = 0x540001
+ TUNSETPPA = 0x540002
+
+ I_STR = 0x5308
+ I_POP = 0x5303
+ I_PUSH = 0x5302
+ I_LINK = 0x530c
+ I_UNLINK = 0x530d
+ I_PLINK = 0x5316
+ I_PUNLINK = 0x5317
+
+ IF_UNITSEL = -0x7ffb8cca
+)
+
+type strbuf struct {
+ Maxlen int32
+ Len int32
+ Buf *int8
+}
+
+type Strioctl struct {
+ Cmd int32
+ Timout int32
+ Len int32
+ Dp *int8
+}
+
+type Lifreq struct {
+ Name [32]int8
+ Lifru1 [4]byte
+ Type uint32
+ Lifru [336]byte
+}
diff --git a/test/performance/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go b/test/performance/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
index 4ab638cb9..aec1efcb3 100644
--- a/test/performance/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
+++ b/test/performance/vendor/golang.org/x/sys/unix/ztypes_zos_s390x.go
@@ -339,7 +339,7 @@ type Statfs_t struct {
Flags uint64
}
-type Dirent struct {
+type direntLE struct {
Reclen uint16
Namlen uint16
Ino uint32
@@ -347,6 +347,15 @@ type Dirent struct {
Name [256]byte
}
+type Dirent struct {
+ Ino uint64
+ Off int64
+ Reclen uint16
+ Type uint8
+ Name [256]uint8
+ _ [5]byte
+}
+
type FdSet struct {
Bits [64]int32
}
diff --git a/test/performance/vendor/golang.org/x/sys/windows/setupapi_windows.go b/test/performance/vendor/golang.org/x/sys/windows/setupapi_windows.go
index 14027da3f..f8126482f 100644
--- a/test/performance/vendor/golang.org/x/sys/windows/setupapi_windows.go
+++ b/test/performance/vendor/golang.org/x/sys/windows/setupapi_windows.go
@@ -296,7 +296,7 @@ const (
// Flag to indicate that the sorting from the INF file should be used.
DI_INF_IS_SORTED DI_FLAGS = 0x00008000
- // Flag to indicate that only the the INF specified by SP_DEVINSTALL_PARAMS.DriverPath should be searched.
+ // Flag to indicate that only the INF specified by SP_DEVINSTALL_PARAMS.DriverPath should be searched.
DI_ENUMSINGLEINF DI_FLAGS = 0x00010000
// Flag that prevents ConfigMgr from removing/re-enumerating devices during device
diff --git a/test/performance/vendor/golang.org/x/sys/windows/syscall.go b/test/performance/vendor/golang.org/x/sys/windows/syscall.go
index 72074d582..8732cdb95 100644
--- a/test/performance/vendor/golang.org/x/sys/windows/syscall.go
+++ b/test/performance/vendor/golang.org/x/sys/windows/syscall.go
@@ -30,8 +30,6 @@ import (
"strings"
"syscall"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
@@ -83,13 +81,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
- var s []byte
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(s)
+ return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.
diff --git a/test/performance/vendor/golang.org/x/sys/windows/syscall_windows.go b/test/performance/vendor/golang.org/x/sys/windows/syscall_windows.go
index e27913817..a49853e9d 100644
--- a/test/performance/vendor/golang.org/x/sys/windows/syscall_windows.go
+++ b/test/performance/vendor/golang.org/x/sys/windows/syscall_windows.go
@@ -138,13 +138,7 @@ func UTF16PtrToString(p *uint16) string {
ptr = unsafe.Pointer(uintptr(ptr) + unsafe.Sizeof(*p))
}
- var s []uint16
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(utf16.Decode(s))
+ return string(utf16.Decode(unsafe.Slice(p, n)))
}
func Getpagesize() int { return 4096 }
@@ -364,6 +358,16 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys SetCommTimeouts(handle Handle, timeouts *CommTimeouts) (err error)
//sys GetActiveProcessorCount(groupNumber uint16) (ret uint32)
//sys GetMaximumProcessorCount(groupNumber uint16) (ret uint32)
+//sys EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) = user32.EnumWindows
+//sys EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) = user32.EnumChildWindows
+//sys GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) = user32.GetClassNameW
+//sys GetDesktopWindow() (hwnd HWND) = user32.GetDesktopWindow
+//sys GetForegroundWindow() (hwnd HWND) = user32.GetForegroundWindow
+//sys IsWindow(hwnd HWND) (isWindow bool) = user32.IsWindow
+//sys IsWindowUnicode(hwnd HWND) (isUnicode bool) = user32.IsWindowUnicode
+//sys IsWindowVisible(hwnd HWND) (isVisible bool) = user32.IsWindowVisible
+//sys GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) = user32.GetGUIThreadInfo
+//sys GetLargePageMinimum() (size uintptr)
// Volume Management Functions
//sys DefineDosDevice(flags uint32, deviceName *uint16, targetPath *uint16) (err error) = DefineDosDeviceW
@@ -439,6 +443,10 @@ func NewCallbackCDecl(fn interface{}) uintptr {
//sys RtlAddFunctionTable(functionTable *RUNTIME_FUNCTION, entryCount uint32, baseAddress uintptr) (ret bool) = ntdll.RtlAddFunctionTable
//sys RtlDeleteFunctionTable(functionTable *RUNTIME_FUNCTION) (ret bool) = ntdll.RtlDeleteFunctionTable
+// Desktop Window Manager API (Dwmapi)
+//sys DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmGetWindowAttribute
+//sys DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) = dwmapi.DwmSetWindowAttribute
+
// syscall interface implementation for other packages
// GetCurrentProcess returns the handle for the current process.
@@ -748,7 +756,7 @@ func Utimes(path string, tv []Timeval) (err error) {
if e != nil {
return e
}
- defer Close(h)
+ defer CloseHandle(h)
a := NsecToFiletime(tv[0].Nanoseconds())
w := NsecToFiletime(tv[1].Nanoseconds())
return SetFileTime(h, nil, &a, &w)
@@ -768,7 +776,7 @@ func UtimesNano(path string, ts []Timespec) (err error) {
if e != nil {
return e
}
- defer Close(h)
+ defer CloseHandle(h)
a := NsecToFiletime(TimespecToNsec(ts[0]))
w := NsecToFiletime(TimespecToNsec(ts[1]))
return SetFileTime(h, nil, &a, &w)
@@ -1108,9 +1116,13 @@ func Shutdown(fd Handle, how int) (err error) {
}
func WSASendto(s Handle, bufs *WSABuf, bufcnt uint32, sent *uint32, flags uint32, to Sockaddr, overlapped *Overlapped, croutine *byte) (err error) {
- rsa, l, err := to.sockaddr()
- if err != nil {
- return err
+ var rsa unsafe.Pointer
+ var l int32
+ if to != nil {
+ rsa, l, err = to.sockaddr()
+ if err != nil {
+ return err
+ }
}
return WSASendTo(s, bufs, bufcnt, sent, flags, (*RawSockaddrAny)(unsafe.Pointer(rsa)), l, overlapped, croutine)
}
diff --git a/test/performance/vendor/golang.org/x/sys/windows/types_windows.go b/test/performance/vendor/golang.org/x/sys/windows/types_windows.go
index f9eaca528..0c4add974 100644
--- a/test/performance/vendor/golang.org/x/sys/windows/types_windows.go
+++ b/test/performance/vendor/golang.org/x/sys/windows/types_windows.go
@@ -3213,3 +3213,48 @@ type ModuleInfo struct {
}
const ALL_PROCESSOR_GROUPS = 0xFFFF
+
+type Rect struct {
+ Left int32
+ Top int32
+ Right int32
+ Bottom int32
+}
+
+type GUIThreadInfo struct {
+ Size uint32
+ Flags uint32
+ Active HWND
+ Focus HWND
+ Capture HWND
+ MenuOwner HWND
+ MoveSize HWND
+ CaretHandle HWND
+ CaretRect Rect
+}
+
+const (
+ DWMWA_NCRENDERING_ENABLED = 1
+ DWMWA_NCRENDERING_POLICY = 2
+ DWMWA_TRANSITIONS_FORCEDISABLED = 3
+ DWMWA_ALLOW_NCPAINT = 4
+ DWMWA_CAPTION_BUTTON_BOUNDS = 5
+ DWMWA_NONCLIENT_RTL_LAYOUT = 6
+ DWMWA_FORCE_ICONIC_REPRESENTATION = 7
+ DWMWA_FLIP3D_POLICY = 8
+ DWMWA_EXTENDED_FRAME_BOUNDS = 9
+ DWMWA_HAS_ICONIC_BITMAP = 10
+ DWMWA_DISALLOW_PEEK = 11
+ DWMWA_EXCLUDED_FROM_PEEK = 12
+ DWMWA_CLOAK = 13
+ DWMWA_CLOAKED = 14
+ DWMWA_FREEZE_REPRESENTATION = 15
+ DWMWA_PASSIVE_UPDATE_MODE = 16
+ DWMWA_USE_HOSTBACKDROPBRUSH = 17
+ DWMWA_USE_IMMERSIVE_DARK_MODE = 20
+ DWMWA_WINDOW_CORNER_PREFERENCE = 33
+ DWMWA_BORDER_COLOR = 34
+ DWMWA_CAPTION_COLOR = 35
+ DWMWA_TEXT_COLOR = 36
+ DWMWA_VISIBLE_FRAME_BORDER_THICKNESS = 37
+)
diff --git a/test/performance/vendor/golang.org/x/sys/windows/zsyscall_windows.go b/test/performance/vendor/golang.org/x/sys/windows/zsyscall_windows.go
index 52d4742cb..ac60052e4 100644
--- a/test/performance/vendor/golang.org/x/sys/windows/zsyscall_windows.go
+++ b/test/performance/vendor/golang.org/x/sys/windows/zsyscall_windows.go
@@ -40,6 +40,7 @@ var (
modadvapi32 = NewLazySystemDLL("advapi32.dll")
modcrypt32 = NewLazySystemDLL("crypt32.dll")
moddnsapi = NewLazySystemDLL("dnsapi.dll")
+ moddwmapi = NewLazySystemDLL("dwmapi.dll")
modiphlpapi = NewLazySystemDLL("iphlpapi.dll")
modkernel32 = NewLazySystemDLL("kernel32.dll")
modmswsock = NewLazySystemDLL("mswsock.dll")
@@ -175,6 +176,8 @@ var (
procDnsNameCompare_W = moddnsapi.NewProc("DnsNameCompare_W")
procDnsQuery_W = moddnsapi.NewProc("DnsQuery_W")
procDnsRecordListFree = moddnsapi.NewProc("DnsRecordListFree")
+ procDwmGetWindowAttribute = moddwmapi.NewProc("DwmGetWindowAttribute")
+ procDwmSetWindowAttribute = moddwmapi.NewProc("DwmSetWindowAttribute")
procGetAdaptersAddresses = modiphlpapi.NewProc("GetAdaptersAddresses")
procGetAdaptersInfo = modiphlpapi.NewProc("GetAdaptersInfo")
procGetBestInterfaceEx = modiphlpapi.NewProc("GetBestInterfaceEx")
@@ -249,6 +252,7 @@ var (
procGetFileType = modkernel32.NewProc("GetFileType")
procGetFinalPathNameByHandleW = modkernel32.NewProc("GetFinalPathNameByHandleW")
procGetFullPathNameW = modkernel32.NewProc("GetFullPathNameW")
+ procGetLargePageMinimum = modkernel32.NewProc("GetLargePageMinimum")
procGetLastError = modkernel32.NewProc("GetLastError")
procGetLogicalDriveStringsW = modkernel32.NewProc("GetLogicalDriveStringsW")
procGetLogicalDrives = modkernel32.NewProc("GetLogicalDrives")
@@ -444,9 +448,18 @@ var (
procCommandLineToArgvW = modshell32.NewProc("CommandLineToArgvW")
procSHGetKnownFolderPath = modshell32.NewProc("SHGetKnownFolderPath")
procShellExecuteW = modshell32.NewProc("ShellExecuteW")
+ procEnumChildWindows = moduser32.NewProc("EnumChildWindows")
+ procEnumWindows = moduser32.NewProc("EnumWindows")
procExitWindowsEx = moduser32.NewProc("ExitWindowsEx")
+ procGetClassNameW = moduser32.NewProc("GetClassNameW")
+ procGetDesktopWindow = moduser32.NewProc("GetDesktopWindow")
+ procGetForegroundWindow = moduser32.NewProc("GetForegroundWindow")
+ procGetGUIThreadInfo = moduser32.NewProc("GetGUIThreadInfo")
procGetShellWindow = moduser32.NewProc("GetShellWindow")
procGetWindowThreadProcessId = moduser32.NewProc("GetWindowThreadProcessId")
+ procIsWindow = moduser32.NewProc("IsWindow")
+ procIsWindowUnicode = moduser32.NewProc("IsWindowUnicode")
+ procIsWindowVisible = moduser32.NewProc("IsWindowVisible")
procMessageBoxW = moduser32.NewProc("MessageBoxW")
procCreateEnvironmentBlock = moduserenv.NewProc("CreateEnvironmentBlock")
procDestroyEnvironmentBlock = moduserenv.NewProc("DestroyEnvironmentBlock")
@@ -1525,6 +1538,22 @@ func DnsRecordListFree(rl *DNSRecord, freetype uint32) {
return
}
+func DwmGetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
+ r0, _, _ := syscall.Syscall6(procDwmGetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
+func DwmSetWindowAttribute(hwnd HWND, attribute uint32, value unsafe.Pointer, size uint32) (ret error) {
+ r0, _, _ := syscall.Syscall6(procDwmSetWindowAttribute.Addr(), 4, uintptr(hwnd), uintptr(attribute), uintptr(value), uintptr(size), 0, 0)
+ if r0 != 0 {
+ ret = syscall.Errno(r0)
+ }
+ return
+}
+
func GetAdaptersAddresses(family uint32, flags uint32, reserved uintptr, adapterAddresses *IpAdapterAddresses, sizePointer *uint32) (errcode error) {
r0, _, _ := syscall.Syscall6(procGetAdaptersAddresses.Addr(), 5, uintptr(family), uintptr(flags), uintptr(reserved), uintptr(unsafe.Pointer(adapterAddresses)), uintptr(unsafe.Pointer(sizePointer)), 0)
if r0 != 0 {
@@ -2152,6 +2181,12 @@ func GetFullPathName(path *uint16, buflen uint32, buf *uint16, fname **uint16) (
return
}
+func GetLargePageMinimum() (size uintptr) {
+ r0, _, _ := syscall.Syscall(procGetLargePageMinimum.Addr(), 0, 0, 0, 0)
+ size = uintptr(r0)
+ return
+}
+
func GetLastError() (lasterr error) {
r0, _, _ := syscall.Syscall(procGetLastError.Addr(), 0, 0, 0, 0)
if r0 != 0 {
@@ -3802,6 +3837,19 @@ func ShellExecute(hwnd Handle, verb *uint16, file *uint16, args *uint16, cwd *ui
return
}
+func EnumChildWindows(hwnd HWND, enumFunc uintptr, param unsafe.Pointer) {
+ syscall.Syscall(procEnumChildWindows.Addr(), 3, uintptr(hwnd), uintptr(enumFunc), uintptr(param))
+ return
+}
+
+func EnumWindows(enumFunc uintptr, param unsafe.Pointer) (err error) {
+ r1, _, e1 := syscall.Syscall(procEnumWindows.Addr(), 2, uintptr(enumFunc), uintptr(param), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func ExitWindowsEx(flags uint32, reason uint32) (err error) {
r1, _, e1 := syscall.Syscall(procExitWindowsEx.Addr(), 2, uintptr(flags), uintptr(reason), 0)
if r1 == 0 {
@@ -3810,6 +3858,35 @@ func ExitWindowsEx(flags uint32, reason uint32) (err error) {
return
}
+func GetClassName(hwnd HWND, className *uint16, maxCount int32) (copied int32, err error) {
+ r0, _, e1 := syscall.Syscall(procGetClassNameW.Addr(), 3, uintptr(hwnd), uintptr(unsafe.Pointer(className)), uintptr(maxCount))
+ copied = int32(r0)
+ if copied == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func GetDesktopWindow() (hwnd HWND) {
+ r0, _, _ := syscall.Syscall(procGetDesktopWindow.Addr(), 0, 0, 0, 0)
+ hwnd = HWND(r0)
+ return
+}
+
+func GetForegroundWindow() (hwnd HWND) {
+ r0, _, _ := syscall.Syscall(procGetForegroundWindow.Addr(), 0, 0, 0, 0)
+ hwnd = HWND(r0)
+ return
+}
+
+func GetGUIThreadInfo(thread uint32, info *GUIThreadInfo) (err error) {
+ r1, _, e1 := syscall.Syscall(procGetGUIThreadInfo.Addr(), 2, uintptr(thread), uintptr(unsafe.Pointer(info)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
func GetShellWindow() (shellWindow HWND) {
r0, _, _ := syscall.Syscall(procGetShellWindow.Addr(), 0, 0, 0, 0)
shellWindow = HWND(r0)
@@ -3825,6 +3902,24 @@ func GetWindowThreadProcessId(hwnd HWND, pid *uint32) (tid uint32, err error) {
return
}
+func IsWindow(hwnd HWND) (isWindow bool) {
+ r0, _, _ := syscall.Syscall(procIsWindow.Addr(), 1, uintptr(hwnd), 0, 0)
+ isWindow = r0 != 0
+ return
+}
+
+func IsWindowUnicode(hwnd HWND) (isUnicode bool) {
+ r0, _, _ := syscall.Syscall(procIsWindowUnicode.Addr(), 1, uintptr(hwnd), 0, 0)
+ isUnicode = r0 != 0
+ return
+}
+
+func IsWindowVisible(hwnd HWND) (isVisible bool) {
+ r0, _, _ := syscall.Syscall(procIsWindowVisible.Addr(), 1, uintptr(hwnd), 0, 0)
+ isVisible = r0 != 0
+ return
+}
+
func MessageBox(hwnd HWND, text *uint16, caption *uint16, boxtype uint32) (ret int32, err error) {
r0, _, e1 := syscall.Syscall6(procMessageBoxW.Addr(), 4, uintptr(hwnd), uintptr(unsafe.Pointer(text)), uintptr(unsafe.Pointer(caption)), uintptr(boxtype), 0, 0)
ret = int32(r0)
diff --git a/test/performance/vendor/golang.org/x/text/unicode/bidi/trieval.go b/test/performance/vendor/golang.org/x/text/unicode/bidi/trieval.go
index 4c459c4b7..6a796e221 100644
--- a/test/performance/vendor/golang.org/x/text/unicode/bidi/trieval.go
+++ b/test/performance/vendor/golang.org/x/text/unicode/bidi/trieval.go
@@ -37,18 +37,6 @@ const (
unknownClass = ^Class(0)
)
-var controlToClass = map[rune]Class{
- 0x202D: LRO, // LeftToRightOverride,
- 0x202E: RLO, // RightToLeftOverride,
- 0x202A: LRE, // LeftToRightEmbedding,
- 0x202B: RLE, // RightToLeftEmbedding,
- 0x202C: PDF, // PopDirectionalFormat,
- 0x2066: LRI, // LeftToRightIsolate,
- 0x2067: RLI, // RightToLeftIsolate,
- 0x2068: FSI, // FirstStrongIsolate,
- 0x2069: PDI, // PopDirectionalIsolate,
-}
-
// A trie entry has the following bits:
// 7..5 XOR mask for brackets
// 4 1: Bracket open, 0: Bracket close
diff --git a/test/performance/vendor/google.golang.org/grpc/attributes/attributes.go b/test/performance/vendor/google.golang.org/grpc/attributes/attributes.go
index ae13ddac1..02f5dc531 100644
--- a/test/performance/vendor/google.golang.org/grpc/attributes/attributes.go
+++ b/test/performance/vendor/google.golang.org/grpc/attributes/attributes.go
@@ -19,7 +19,7 @@
// Package attributes defines a generic key/value store used in various gRPC
// components.
//
-// Experimental
+// # Experimental
//
// Notice: This package is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/test/performance/vendor/google.golang.org/grpc/backoff.go b/test/performance/vendor/google.golang.org/grpc/backoff.go
index 542594f5c..29475e31c 100644
--- a/test/performance/vendor/google.golang.org/grpc/backoff.go
+++ b/test/performance/vendor/google.golang.org/grpc/backoff.go
@@ -48,7 +48,7 @@ type BackoffConfig struct {
// here for more details:
// https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/test/performance/vendor/google.golang.org/grpc/balancer/balancer.go b/test/performance/vendor/google.golang.org/grpc/balancer/balancer.go
index f7a7697ca..392b21fb2 100644
--- a/test/performance/vendor/google.golang.org/grpc/balancer/balancer.go
+++ b/test/performance/vendor/google.golang.org/grpc/balancer/balancer.go
@@ -110,6 +110,11 @@ type SubConn interface {
UpdateAddresses([]resolver.Address)
// Connect starts the connecting for this SubConn.
Connect()
+ // GetOrBuildProducer returns a reference to the existing Producer for this
+ // ProducerBuilder in this SubConn, or, if one does not currently exist,
+ // creates a new one and returns it. Returns a close function which must
+ // be called when the Producer is no longer needed.
+ GetOrBuildProducer(ProducerBuilder) (p Producer, close func())
}
// NewSubConnOptions contains options to create new SubConn.
@@ -244,7 +249,7 @@ type DoneInfo struct {
// ServerLoad is the load received from server. It's usually sent as part of
// trailing metadata.
//
- // The only supported type now is *orca_v1.LoadReport.
+ // The only supported type now is *orca_v3.LoadReport.
ServerLoad interface{}
}
@@ -372,55 +377,20 @@ type ClientConnState struct {
// problem with the provided name resolver data.
var ErrBadResolverState = errors.New("bad resolver state")
-// ConnectivityStateEvaluator takes the connectivity states of multiple SubConns
-// and returns one aggregated connectivity state.
-//
-// It's not thread safe.
-type ConnectivityStateEvaluator struct {
- numReady uint64 // Number of addrConns in ready state.
- numConnecting uint64 // Number of addrConns in connecting state.
- numTransientFailure uint64 // Number of addrConns in transient failure state.
- numIdle uint64 // Number of addrConns in idle state.
+// A ProducerBuilder is a simple constructor for a Producer. It is used by the
+// SubConn to create producers when needed.
+type ProducerBuilder interface {
+ // Build creates a Producer. The first parameter is always a
+ // grpc.ClientConnInterface (a type to allow creating RPCs/streams on the
+ // associated SubConn), but is declared as interface{} to avoid a
+ // dependency cycle. Should also return a close function that will be
+ // called when all references to the Producer have been given up.
+ Build(grpcClientConnInterface interface{}) (p Producer, close func())
}
-// RecordTransition records state change happening in subConn and based on that
-// it evaluates what aggregated state should be.
-//
-// - If at least one SubConn in Ready, the aggregated state is Ready;
-// - Else if at least one SubConn in Connecting, the aggregated state is Connecting;
-// - Else if at least one SubConn is TransientFailure, the aggregated state is Transient Failure;
-// - Else if at least one SubConn is Idle, the aggregated state is Idle;
-// - Else there are no subconns and the aggregated state is Transient Failure
-//
-// Shutdown is not considered.
-func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState connectivity.State) connectivity.State {
- // Update counters.
- for idx, state := range []connectivity.State{oldState, newState} {
- updateVal := 2*uint64(idx) - 1 // -1 for oldState and +1 for new.
- switch state {
- case connectivity.Ready:
- cse.numReady += updateVal
- case connectivity.Connecting:
- cse.numConnecting += updateVal
- case connectivity.TransientFailure:
- cse.numTransientFailure += updateVal
- case connectivity.Idle:
- cse.numIdle += updateVal
- }
- }
-
- // Evaluate.
- if cse.numReady > 0 {
- return connectivity.Ready
- }
- if cse.numConnecting > 0 {
- return connectivity.Connecting
- }
- if cse.numTransientFailure > 0 {
- return connectivity.TransientFailure
- }
- if cse.numIdle > 0 {
- return connectivity.Idle
- }
- return connectivity.TransientFailure
+// A Producer is a type shared among potentially many consumers. It is
+// associated with a SubConn, and an implementation will typically contain
+// other methods to provide additional functionality, e.g. configuration or
+// subscription registration.
+type Producer interface {
}
diff --git a/test/performance/vendor/google.golang.org/grpc/balancer/base/balancer.go b/test/performance/vendor/google.golang.org/grpc/balancer/base/balancer.go
index e8dfc828a..3929c26d3 100644
--- a/test/performance/vendor/google.golang.org/grpc/balancer/base/balancer.go
+++ b/test/performance/vendor/google.golang.org/grpc/balancer/base/balancer.go
@@ -157,8 +157,8 @@ func (b *baseBalancer) mergeErrors() error {
// regeneratePicker takes a snapshot of the balancer, and generates a picker
// from it. The picker is
-// - errPicker if the balancer is in TransientFailure,
-// - built by the pickerBuilder with all READY SubConns otherwise.
+// - errPicker if the balancer is in TransientFailure,
+// - built by the pickerBuilder with all READY SubConns otherwise.
func (b *baseBalancer) regeneratePicker() {
if b.state == connectivity.TransientFailure {
b.picker = NewErrPicker(b.mergeErrors())
diff --git a/test/performance/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go b/test/performance/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go
new file mode 100644
index 000000000..c33413581
--- /dev/null
+++ b/test/performance/vendor/google.golang.org/grpc/balancer/conn_state_evaluator.go
@@ -0,0 +1,74 @@
+/*
+ *
+ * Copyright 2022 gRPC 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 balancer
+
+import "google.golang.org/grpc/connectivity"
+
+// ConnectivityStateEvaluator takes the connectivity states of multiple SubConns
+// and returns one aggregated connectivity state.
+//
+// It's not thread safe.
+type ConnectivityStateEvaluator struct {
+ numReady uint64 // Number of addrConns in ready state.
+ numConnecting uint64 // Number of addrConns in connecting state.
+ numTransientFailure uint64 // Number of addrConns in transient failure state.
+ numIdle uint64 // Number of addrConns in idle state.
+}
+
+// RecordTransition records state change happening in subConn and based on that
+// it evaluates what aggregated state should be.
+//
+// - If at least one SubConn in Ready, the aggregated state is Ready;
+// - Else if at least one SubConn in Connecting, the aggregated state is Connecting;
+// - Else if at least one SubConn is Idle, the aggregated state is Idle;
+// - Else if at least one SubConn is TransientFailure (or there are no SubConns), the aggregated state is Transient Failure.
+//
+// Shutdown is not considered.
+func (cse *ConnectivityStateEvaluator) RecordTransition(oldState, newState connectivity.State) connectivity.State {
+ // Update counters.
+ for idx, state := range []connectivity.State{oldState, newState} {
+ updateVal := 2*uint64(idx) - 1 // -1 for oldState and +1 for new.
+ switch state {
+ case connectivity.Ready:
+ cse.numReady += updateVal
+ case connectivity.Connecting:
+ cse.numConnecting += updateVal
+ case connectivity.TransientFailure:
+ cse.numTransientFailure += updateVal
+ case connectivity.Idle:
+ cse.numIdle += updateVal
+ }
+ }
+ return cse.CurrentState()
+}
+
+// CurrentState returns the current aggregate conn state by evaluating the counters
+func (cse *ConnectivityStateEvaluator) CurrentState() connectivity.State {
+ // Evaluate.
+ if cse.numReady > 0 {
+ return connectivity.Ready
+ }
+ if cse.numConnecting > 0 {
+ return connectivity.Connecting
+ }
+ if cse.numIdle > 0 {
+ return connectivity.Idle
+ }
+ return connectivity.TransientFailure
+}
diff --git a/test/performance/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go b/test/performance/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
index 274eb2f85..f7031ad22 100644
--- a/test/performance/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
+++ b/test/performance/vendor/google.golang.org/grpc/balancer/roundrobin/roundrobin.go
@@ -22,7 +22,7 @@
package roundrobin
import (
- "sync"
+ "sync/atomic"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/balancer/base"
@@ -60,7 +60,7 @@ func (*rrPickerBuilder) Build(info base.PickerBuildInfo) balancer.Picker {
// Start at a random index, as the same RR balancer rebuilds a new
// picker when SubConn states change, and we don't want to apply excess
// load to the first server in the list.
- next: grpcrand.Intn(len(scs)),
+ next: uint32(grpcrand.Intn(len(scs))),
}
}
@@ -69,15 +69,13 @@ type rrPicker struct {
// created. The slice is immutable. Each Get() will do a round robin
// selection from it and return the selected SubConn.
subConns []balancer.SubConn
-
- mu sync.Mutex
- next int
+ next uint32
}
func (p *rrPicker) Pick(balancer.PickInfo) (balancer.PickResult, error) {
- p.mu.Lock()
- sc := p.subConns[p.next]
- p.next = (p.next + 1) % len(p.subConns)
- p.mu.Unlock()
+ subConnsLen := uint32(len(p.subConns))
+ nextIndex := atomic.AddUint32(&p.next, 1)
+
+ sc := p.subConns[nextIndex%subConnsLen]
return balancer.PickResult{SubConn: sc}, nil
}
diff --git a/test/performance/vendor/google.golang.org/grpc/balancer_conn_wrappers.go b/test/performance/vendor/google.golang.org/grpc/balancer_conn_wrappers.go
index b1c23eaae..0359956d3 100644
--- a/test/performance/vendor/google.golang.org/grpc/balancer_conn_wrappers.go
+++ b/test/performance/vendor/google.golang.org/grpc/balancer_conn_wrappers.go
@@ -19,17 +19,20 @@
package grpc
import (
+ "context"
"fmt"
"strings"
"sync"
"google.golang.org/grpc/balancer"
+ "google.golang.org/grpc/codes"
"google.golang.org/grpc/connectivity"
"google.golang.org/grpc/internal/balancer/gracefulswitch"
"google.golang.org/grpc/internal/buffer"
"google.golang.org/grpc/internal/channelz"
"google.golang.org/grpc/internal/grpcsync"
"google.golang.org/grpc/resolver"
+ "google.golang.org/grpc/status"
)
// ccBalancerWrapper sits between the ClientConn and the Balancer.
@@ -305,7 +308,7 @@ func (ccb *ccBalancerWrapper) NewSubConn(addrs []resolver.Address, opts balancer
channelz.Warningf(logger, ccb.cc.channelzID, "acBalancerWrapper: NewSubConn: failed to newAddrConn: %v", err)
return nil, err
}
- acbw := &acBalancerWrapper{ac: ac}
+ acbw := &acBalancerWrapper{ac: ac, producers: make(map[balancer.ProducerBuilder]*refCountedProducer)}
acbw.ac.mu.Lock()
ac.acbw = acbw
acbw.ac.mu.Unlock()
@@ -359,8 +362,9 @@ func (ccb *ccBalancerWrapper) Target() string {
// acBalancerWrapper is a wrapper on top of ac for balancers.
// It implements balancer.SubConn interface.
type acBalancerWrapper struct {
- mu sync.Mutex
- ac *addrConn
+ mu sync.Mutex
+ ac *addrConn
+ producers map[balancer.ProducerBuilder]*refCountedProducer
}
func (acbw *acBalancerWrapper) UpdateAddresses(addrs []resolver.Address) {
@@ -414,3 +418,64 @@ func (acbw *acBalancerWrapper) getAddrConn() *addrConn {
defer acbw.mu.Unlock()
return acbw.ac
}
+
+var errSubConnNotReady = status.Error(codes.Unavailable, "SubConn not currently connected")
+
+// NewStream begins a streaming RPC on the addrConn. If the addrConn is not
+// ready, returns errSubConnNotReady.
+func (acbw *acBalancerWrapper) NewStream(ctx context.Context, desc *StreamDesc, method string, opts ...CallOption) (ClientStream, error) {
+ transport := acbw.ac.getReadyTransport()
+ if transport == nil {
+ return nil, errSubConnNotReady
+ }
+ return newNonRetryClientStream(ctx, desc, method, transport, acbw.ac, opts...)
+}
+
+// Invoke performs a unary RPC. If the addrConn is not ready, returns
+// errSubConnNotReady.
+func (acbw *acBalancerWrapper) Invoke(ctx context.Context, method string, args interface{}, reply interface{}, opts ...CallOption) error {
+ cs, err := acbw.NewStream(ctx, unaryStreamDesc, method, opts...)
+ if err != nil {
+ return err
+ }
+ if err := cs.SendMsg(args); err != nil {
+ return err
+ }
+ return cs.RecvMsg(reply)
+}
+
+type refCountedProducer struct {
+ producer balancer.Producer
+ refs int // number of current refs to the producer
+ close func() // underlying producer's close function
+}
+
+func (acbw *acBalancerWrapper) GetOrBuildProducer(pb balancer.ProducerBuilder) (balancer.Producer, func()) {
+ acbw.mu.Lock()
+ defer acbw.mu.Unlock()
+
+ // Look up existing producer from this builder.
+ pData := acbw.producers[pb]
+ if pData == nil {
+ // Not found; create a new one and add it to the producers map.
+ p, close := pb.Build(acbw)
+ pData = &refCountedProducer{producer: p, close: close}
+ acbw.producers[pb] = pData
+ }
+ // Account for this new reference.
+ pData.refs++
+
+ // Return a cleanup function wrapped in a OnceFunc to remove this reference
+ // and delete the refCountedProducer from the map if the total reference
+ // count goes to zero.
+ unref := func() {
+ acbw.mu.Lock()
+ pData.refs--
+ if pData.refs == 0 {
+ defer pData.close() // Run outside the acbw mutex
+ delete(acbw.producers, pb)
+ }
+ acbw.mu.Unlock()
+ }
+ return pData.producer, grpcsync.OnceFunc(unref)
+}
diff --git a/test/performance/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go b/test/performance/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
index ed75290cd..64a232f28 100644
--- a/test/performance/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
+++ b/test/performance/vendor/google.golang.org/grpc/binarylog/grpc_binarylog_v1/binarylog.pb.go
@@ -261,6 +261,7 @@ type GrpcLogEntry struct {
// according to the type of the log entry.
//
// Types that are assignable to Payload:
+ //
// *GrpcLogEntry_ClientHeader
// *GrpcLogEntry_ServerHeader
// *GrpcLogEntry_Message
@@ -694,12 +695,12 @@ func (x *Message) GetData() []byte {
// Header keys added by gRPC are omitted. To be more specific,
// implementations will not log the following entries, and this is
// not to be treated as a truncation:
-// - entries handled by grpc that are not user visible, such as those
-// that begin with 'grpc-' (with exception of grpc-trace-bin)
-// or keys like 'lb-token'
-// - transport specific entries, including but not limited to:
-// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc
-// - entries added for call credentials
+// - entries handled by grpc that are not user visible, such as those
+// that begin with 'grpc-' (with exception of grpc-trace-bin)
+// or keys like 'lb-token'
+// - transport specific entries, including but not limited to:
+// ':path', ':authority', 'content-encoding', 'user-agent', 'te', etc
+// - entries added for call credentials
//
// Implementations must always log grpc-trace-bin if it is present.
// Practically speaking it will only be visible on server side because
diff --git a/test/performance/vendor/google.golang.org/grpc/channelz/channelz.go b/test/performance/vendor/google.golang.org/grpc/channelz/channelz.go
index a220c47c5..32b7fa579 100644
--- a/test/performance/vendor/google.golang.org/grpc/channelz/channelz.go
+++ b/test/performance/vendor/google.golang.org/grpc/channelz/channelz.go
@@ -23,7 +23,7 @@
// https://github.com/grpc/proposal/blob/master/A14-channelz.md, is provided by
// the `internal/channelz` package.
//
-// Experimental
+// # Experimental
//
// Notice: All APIs in this package are experimental and may be removed in a
// later release.
diff --git a/test/performance/vendor/google.golang.org/grpc/clientconn.go b/test/performance/vendor/google.golang.org/grpc/clientconn.go
index 0d21f2210..422639c79 100644
--- a/test/performance/vendor/google.golang.org/grpc/clientconn.go
+++ b/test/performance/vendor/google.golang.org/grpc/clientconn.go
@@ -503,7 +503,7 @@ type ClientConn struct {
// WaitForStateChange waits until the connectivity.State of ClientConn changes from sourceState or
// ctx expires. A true value is returned in former case and false in latter.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -522,7 +522,7 @@ func (cc *ClientConn) WaitForStateChange(ctx context.Context, sourceState connec
// GetState returns the connectivity.State of ClientConn.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a later
// release.
@@ -534,7 +534,7 @@ func (cc *ClientConn) GetState() connectivity.State {
// the channel is idle. Does not wait for the connection attempts to begin
// before returning.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a later
// release.
@@ -712,8 +712,8 @@ func (cc *ClientConn) newAddrConn(addrs []resolver.Address, opts balancer.NewSub
ac.ctx, ac.cancel = context.WithCancel(cc.ctx)
// Track ac in cc. This needs to be done before any getTransport(...) is called.
cc.mu.Lock()
+ defer cc.mu.Unlock()
if cc.conns == nil {
- cc.mu.Unlock()
return nil, ErrClientConnClosing
}
@@ -732,7 +732,6 @@ func (cc *ClientConn) newAddrConn(addrs []resolver.Address, opts balancer.NewSub
})
cc.conns[ac] = struct{}{}
- cc.mu.Unlock()
return ac, nil
}
@@ -762,7 +761,7 @@ func (cc *ClientConn) channelzMetric() *channelz.ChannelInternalMetric {
// Target returns the target string of the ClientConn.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -832,9 +831,9 @@ func equalAddresses(a, b []resolver.Address) bool {
//
// If ac is Ready, it checks whether current connected address of ac is in the
// new addrs list.
-// - If true, it updates ac.addrs and returns true. The ac will keep using
-// the existing connection.
-// - If false, it does nothing and returns false.
+// - If true, it updates ac.addrs and returns true. The ac will keep using
+// the existing connection.
+// - If false, it does nothing and returns false.
func (ac *addrConn) tryUpdateAddrs(addrs []resolver.Address) bool {
ac.mu.Lock()
defer ac.mu.Unlock()
@@ -999,7 +998,7 @@ func (cc *ClientConn) resolveNow(o resolver.ResolveNowOptions) {
// However, if a previously unavailable network becomes available, this may be
// used to trigger an immediate reconnect.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -1229,38 +1228,33 @@ func (ac *addrConn) tryAllAddrs(addrs []resolver.Address, connectDeadline time.T
// address was not successfully connected, or updates ac appropriately with the
// new transport.
func (ac *addrConn) createTransport(addr resolver.Address, copts transport.ConnectOptions, connectDeadline time.Time) error {
- // TODO: Delete prefaceReceived and move the logic to wait for it into the
- // transport.
- prefaceReceived := grpcsync.NewEvent()
- connClosed := grpcsync.NewEvent()
-
addr.ServerName = ac.cc.getServerName(addr)
hctx, hcancel := context.WithCancel(ac.ctx)
- hcStarted := false // protected by ac.mu
- onClose := func() {
+ onClose := grpcsync.OnceFunc(func() {
ac.mu.Lock()
defer ac.mu.Unlock()
- defer connClosed.Fire()
- defer hcancel()
- if !hcStarted || hctx.Err() != nil {
- // We didn't start the health check or set the state to READY, so
- // no need to do anything else here.
- //
- // OR, we have already cancelled the health check context, meaning
- // we have already called onClose once for this transport. In this
- // case it would be dangerous to clear the transport and update the
- // state, since there may be a new transport in this addrConn.
+ if ac.state == connectivity.Shutdown {
+ // Already shut down. tearDown() already cleared the transport and
+ // canceled hctx via ac.ctx, and we expected this connection to be
+ // closed, so do nothing here.
+ return
+ }
+ hcancel()
+ if ac.transport == nil {
+ // We're still connecting to this address, which could error. Do
+ // not update the connectivity state or resolve; these will happen
+ // at the end of the tryAllAddrs connection loop in the event of an
+ // error.
return
}
ac.transport = nil
- // Refresh the name resolver
+ // Refresh the name resolver on any connection loss.
ac.cc.resolveNow(resolver.ResolveNowOptions{})
- if ac.state != connectivity.Shutdown {
- ac.updateConnectivityState(connectivity.Idle, nil)
- }
- }
-
+ // Always go idle and wait for the LB policy to initiate a new
+ // connection attempt.
+ ac.updateConnectivityState(connectivity.Idle, nil)
+ })
onGoAway := func(r transport.GoAwayReason) {
ac.mu.Lock()
ac.adjustParams(r)
@@ -1272,7 +1266,7 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne
defer cancel()
copts.ChannelzParentID = ac.channelzID
- newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, func() { prefaceReceived.Fire() }, onGoAway, onClose)
+ newTr, err := transport.NewClientTransport(connectCtx, ac.cc.ctx, addr, copts, onGoAway, onClose)
if err != nil {
// newTr is either nil, or closed.
hcancel()
@@ -1280,60 +1274,34 @@ func (ac *addrConn) createTransport(addr resolver.Address, copts transport.Conne
return err
}
- select {
- case <-connectCtx.Done():
- // We didn't get the preface in time.
+ ac.mu.Lock()
+ defer ac.mu.Unlock()
+ if ac.state == connectivity.Shutdown {
+ // This can happen if the subConn was removed while in `Connecting`
+ // state. tearDown() would have set the state to `Shutdown`, but
+ // would not have closed the transport since ac.transport would not
+ // have been set at that point.
+ //
+ // We run this in a goroutine because newTr.Close() calls onClose()
+ // inline, which requires locking ac.mu.
+ //
// The error we pass to Close() is immaterial since there are no open
// streams at this point, so no trailers with error details will be sent
// out. We just need to pass a non-nil error.
- newTr.Close(transport.ErrConnClosing)
- if connectCtx.Err() == context.DeadlineExceeded {
- err := errors.New("failed to receive server preface within timeout")
- channelz.Warningf(logger, ac.channelzID, "grpc: addrConn.createTransport failed to connect to %s: %v", addr, err)
- return err
- }
+ go newTr.Close(transport.ErrConnClosing)
return nil
- case <-prefaceReceived.Done():
- // We got the preface - huzzah! things are good.
- ac.mu.Lock()
- defer ac.mu.Unlock()
- if connClosed.HasFired() {
- // onClose called first; go idle but do nothing else.
- if ac.state != connectivity.Shutdown {
- ac.updateConnectivityState(connectivity.Idle, nil)
- }
- return nil
- }
- if ac.state == connectivity.Shutdown {
- // This can happen if the subConn was removed while in `Connecting`
- // state. tearDown() would have set the state to `Shutdown`, but
- // would not have closed the transport since ac.transport would not
- // been set at that point.
- //
- // We run this in a goroutine because newTr.Close() calls onClose()
- // inline, which requires locking ac.mu.
- //
- // The error we pass to Close() is immaterial since there are no open
- // streams at this point, so no trailers with error details will be sent
- // out. We just need to pass a non-nil error.
- go newTr.Close(transport.ErrConnClosing)
- return nil
- }
- ac.curAddr = addr
- ac.transport = newTr
- hcStarted = true
- ac.startHealthCheck(hctx) // Will set state to READY if appropriate.
+ }
+ if hctx.Err() != nil {
+ // onClose was already called for this connection, but the connection
+ // was successfully established first. Consider it a success and set
+ // the new state to Idle.
+ ac.updateConnectivityState(connectivity.Idle, nil)
return nil
- case <-connClosed.Done():
- // The transport has already closed. If we received the preface, too,
- // this is not an error.
- select {
- case <-prefaceReceived.Done():
- return nil
- default:
- return errors.New("connection closed before server preface received")
- }
}
+ ac.curAddr = addr
+ ac.transport = newTr
+ ac.startHealthCheck(hctx) // Will set state to READY if appropriate.
+ return nil
}
// startHealthCheck starts the health checking stream (RPC) to watch the health
@@ -1584,7 +1552,7 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) {
channelz.Infof(logger, cc.channelzID, "dial target %q parse failed: %v", cc.target, err)
} else {
channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget)
- rb = cc.getResolver(parsedTarget.Scheme)
+ rb = cc.getResolver(parsedTarget.URL.Scheme)
if rb != nil {
cc.parsedTarget = parsedTarget
return rb, nil
@@ -1605,9 +1573,9 @@ func (cc *ClientConn) parseTargetAndFindResolver() (resolver.Builder, error) {
return nil, err
}
channelz.Infof(logger, cc.channelzID, "parsed dial target is: %+v", parsedTarget)
- rb = cc.getResolver(parsedTarget.Scheme)
+ rb = cc.getResolver(parsedTarget.URL.Scheme)
if rb == nil {
- return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.Scheme)
+ return nil, fmt.Errorf("could not get resolver for default scheme: %q", parsedTarget.URL.Scheme)
}
cc.parsedTarget = parsedTarget
return rb, nil
diff --git a/test/performance/vendor/google.golang.org/grpc/credentials/credentials.go b/test/performance/vendor/google.golang.org/grpc/credentials/credentials.go
index 96ff1877e..5feac3aa0 100644
--- a/test/performance/vendor/google.golang.org/grpc/credentials/credentials.go
+++ b/test/performance/vendor/google.golang.org/grpc/credentials/credentials.go
@@ -36,16 +36,16 @@ import (
// PerRPCCredentials defines the common interface for the credentials which need to
// attach security information to every RPC (e.g., oauth2).
type PerRPCCredentials interface {
- // GetRequestMetadata gets the current request metadata, refreshing
- // tokens if required. This should be called by the transport layer on
- // each request, and the data should be populated in headers or other
- // context. If a status code is returned, it will be used as the status
- // for the RPC. uri is the URI of the entry point for the request.
- // When supported by the underlying implementation, ctx can be used for
- // timeout and cancellation. Additionally, RequestInfo data will be
- // available via ctx to this call.
- // TODO(zhaoq): Define the set of the qualified keys instead of leaving
- // it as an arbitrary string.
+ // GetRequestMetadata gets the current request metadata, refreshing tokens
+ // if required. This should be called by the transport layer on each
+ // request, and the data should be populated in headers or other
+ // context. If a status code is returned, it will be used as the status for
+ // the RPC (restricted to an allowable set of codes as defined by gRFC
+ // A54). uri is the URI of the entry point for the request. When supported
+ // by the underlying implementation, ctx can be used for timeout and
+ // cancellation. Additionally, RequestInfo data will be available via ctx
+ // to this call. TODO(zhaoq): Define the set of the qualified keys instead
+ // of leaving it as an arbitrary string.
GetRequestMetadata(ctx context.Context, uri ...string) (map[string]string, error)
// RequireTransportSecurity indicates whether the credentials requires
// transport security.
diff --git a/test/performance/vendor/google.golang.org/grpc/credentials/tls.go b/test/performance/vendor/google.golang.org/grpc/credentials/tls.go
index 784822d05..ce2bbc10a 100644
--- a/test/performance/vendor/google.golang.org/grpc/credentials/tls.go
+++ b/test/performance/vendor/google.golang.org/grpc/credentials/tls.go
@@ -195,7 +195,7 @@ func NewServerTLSFromFile(certFile, keyFile string) (TransportCredentials, error
// TLSChannelzSecurityValue defines the struct that TLS protocol should return
// from GetSecurityValue(), containing security info like cipher and certificate used.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/test/performance/vendor/google.golang.org/grpc/dialoptions.go b/test/performance/vendor/google.golang.org/grpc/dialoptions.go
index 75d01ba77..9372dc322 100644
--- a/test/performance/vendor/google.golang.org/grpc/dialoptions.go
+++ b/test/performance/vendor/google.golang.org/grpc/dialoptions.go
@@ -29,6 +29,7 @@ import (
"google.golang.org/grpc/credentials/insecure"
"google.golang.org/grpc/internal"
internalbackoff "google.golang.org/grpc/internal/backoff"
+ "google.golang.org/grpc/internal/binarylog"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/keepalive"
"google.golang.org/grpc/resolver"
@@ -36,12 +37,13 @@ import (
)
func init() {
- internal.AddExtraDialOptions = func(opt ...DialOption) {
+ internal.AddGlobalDialOptions = func(opt ...DialOption) {
extraDialOptions = append(extraDialOptions, opt...)
}
- internal.ClearExtraDialOptions = func() {
+ internal.ClearGlobalDialOptions = func() {
extraDialOptions = nil
}
+ internal.WithBinaryLogger = withBinaryLogger
}
// dialOptions configure a Dial call. dialOptions are set by the DialOption
@@ -61,6 +63,7 @@ type dialOptions struct {
timeout time.Duration
scChan <-chan ServiceConfig
authority string
+ binaryLogger binarylog.Logger
copts transport.ConnectOptions
callOptions []CallOption
channelzParentID *channelz.Identifier
@@ -84,7 +87,7 @@ var extraDialOptions []DialOption
// EmptyDialOption does not alter the dial configuration. It can be embedded in
// another structure to build custom dial options.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -275,7 +278,7 @@ func WithBlock() DialOption {
// the context.DeadlineExceeded error.
// Implies WithBlock()
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -304,7 +307,7 @@ func WithInsecure() DialOption {
// WithNoProxy returns a DialOption which disables the use of proxies for this
// ClientConn. This is ignored if WithDialer or WithContextDialer are used.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -335,7 +338,7 @@ func WithPerRPCCredentials(creds credentials.PerRPCCredentials) DialOption {
// the ClientConn.WithCreds. This should not be used together with
// WithTransportCredentials.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -391,10 +394,24 @@ func WithDialer(f func(string, time.Duration) (net.Conn, error)) DialOption {
// all the RPCs and underlying network connections in this ClientConn.
func WithStatsHandler(h stats.Handler) DialOption {
return newFuncDialOption(func(o *dialOptions) {
+ if h == nil {
+ logger.Error("ignoring nil parameter in grpc.WithStatsHandler ClientOption")
+ // Do not allow a nil stats handler, which would otherwise cause
+ // panics.
+ return
+ }
o.copts.StatsHandlers = append(o.copts.StatsHandlers, h)
})
}
+// withBinaryLogger returns a DialOption that specifies the binary logger for
+// this ClientConn.
+func withBinaryLogger(bl binarylog.Logger) DialOption {
+ return newFuncDialOption(func(o *dialOptions) {
+ o.binaryLogger = bl
+ })
+}
+
// FailOnNonTempDialError returns a DialOption that specifies if gRPC fails on
// non-temporary dial errors. If f is true, and dialer returns a non-temporary
// error, gRPC will fail the connection to the network address and won't try to
@@ -403,7 +420,7 @@ func WithStatsHandler(h stats.Handler) DialOption {
// FailOnNonTempDialError only affects the initial dial, and does not do
// anything useful unless you are also using WithBlock().
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -483,7 +500,7 @@ func WithAuthority(a string) DialOption {
// current ClientConn's parent. This function is used in nested channel creation
// (e.g. grpclb dial).
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -528,9 +545,6 @@ func WithDefaultServiceConfig(s string) DialOption {
// service config enables them. This does not impact transparent retries, which
// will happen automatically if no data is written to the wire or if the RPC is
// unprocessed by the remote server.
-//
-// Retry support is currently enabled by default, but may be disabled by
-// setting the environment variable "GRPC_GO_RETRY" to "off".
func WithDisableRetry() DialOption {
return newFuncDialOption(func(o *dialOptions) {
o.disableRetry = true
@@ -548,7 +562,7 @@ func WithMaxHeaderListSize(s uint32) DialOption {
// WithDisableHealthCheck disables the LB channel health checking for all
// SubConns of this ClientConn.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -595,7 +609,7 @@ func withMinConnectDeadline(f func() time.Duration) DialOption {
// resolver.Register. They will be matched against the scheme used for the
// current Dial only, and will take precedence over the global registry.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/test/performance/vendor/google.golang.org/grpc/encoding/encoding.go b/test/performance/vendor/google.golang.org/grpc/encoding/encoding.go
index 18e530fc9..711763d54 100644
--- a/test/performance/vendor/google.golang.org/grpc/encoding/encoding.go
+++ b/test/performance/vendor/google.golang.org/grpc/encoding/encoding.go
@@ -19,7 +19,7 @@
// Package encoding defines the interface for the compressor and codec, and
// functions to register and retrieve compressors and codecs.
//
-// Experimental
+// # Experimental
//
// Notice: This package is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -28,6 +28,8 @@ package encoding
import (
"io"
"strings"
+
+ "google.golang.org/grpc/internal/grpcutil"
)
// Identity specifies the optional encoding for uncompressed streams.
@@ -73,6 +75,7 @@ var registeredCompressor = make(map[string]Compressor)
// registered with the same name, the one registered last will take effect.
func RegisterCompressor(c Compressor) {
registeredCompressor[c.Name()] = c
+ grpcutil.RegisteredCompressorNames = append(grpcutil.RegisteredCompressorNames, c.Name())
}
// GetCompressor returns Compressor for the given compressor name.
diff --git a/test/performance/vendor/google.golang.org/grpc/grpclog/loggerv2.go b/test/performance/vendor/google.golang.org/grpc/grpclog/loggerv2.go
index 7c1f66409..b5560b47e 100644
--- a/test/performance/vendor/google.golang.org/grpc/grpclog/loggerv2.go
+++ b/test/performance/vendor/google.golang.org/grpc/grpclog/loggerv2.go
@@ -242,7 +242,7 @@ func (g *loggerT) V(l int) bool {
// DepthLoggerV2, the below functions will be called with the appropriate stack
// depth set for trivial functions the logger may ignore.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go b/test/performance/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go
index e3dfe204f..809d73cca 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/binarylog/binarylog.go
@@ -37,7 +37,7 @@ type Logger interface {
// binLogger is the global binary logger for the binary. One of this should be
// built at init time from the configuration (environment variable or flags).
//
-// It is used to get a methodLogger for each individual method.
+// It is used to get a MethodLogger for each individual method.
var binLogger Logger
var grpclogLogger = grpclog.Component("binarylog")
@@ -56,11 +56,11 @@ func GetLogger() Logger {
return binLogger
}
-// GetMethodLogger returns the methodLogger for the given methodName.
+// GetMethodLogger returns the MethodLogger for the given methodName.
//
// methodName should be in the format of "/service/method".
//
-// Each methodLogger returned by this method is a new instance. This is to
+// Each MethodLogger returned by this method is a new instance. This is to
// generate sequence id within the call.
func GetMethodLogger(methodName string) MethodLogger {
if binLogger == nil {
@@ -117,7 +117,7 @@ func (l *logger) setDefaultMethodLogger(ml *MethodLoggerConfig) error {
// Set method logger for "service/*".
//
-// New methodLogger with same service overrides the old one.
+// New MethodLogger with same service overrides the old one.
func (l *logger) setServiceMethodLogger(service string, ml *MethodLoggerConfig) error {
if _, ok := l.config.Services[service]; ok {
return fmt.Errorf("conflicting service rules for service %v found", service)
@@ -131,7 +131,7 @@ func (l *logger) setServiceMethodLogger(service string, ml *MethodLoggerConfig)
// Set method logger for "service/method".
//
-// New methodLogger with same method overrides the old one.
+// New MethodLogger with same method overrides the old one.
func (l *logger) setMethodMethodLogger(method string, ml *MethodLoggerConfig) error {
if _, ok := l.config.Blacklist[method]; ok {
return fmt.Errorf("conflicting blacklist rules for method %v found", method)
@@ -161,11 +161,11 @@ func (l *logger) setBlacklist(method string) error {
return nil
}
-// getMethodLogger returns the methodLogger for the given methodName.
+// getMethodLogger returns the MethodLogger for the given methodName.
//
// methodName should be in the format of "/service/method".
//
-// Each methodLogger returned by this method is a new instance. This is to
+// Each MethodLogger returned by this method is a new instance. This is to
// generate sequence id within the call.
func (l *logger) GetMethodLogger(methodName string) MethodLogger {
s, m, err := grpcutil.ParseMethod(methodName)
@@ -174,16 +174,16 @@ func (l *logger) GetMethodLogger(methodName string) MethodLogger {
return nil
}
if ml, ok := l.config.Methods[s+"/"+m]; ok {
- return newMethodLogger(ml.Header, ml.Message)
+ return NewTruncatingMethodLogger(ml.Header, ml.Message)
}
if _, ok := l.config.Blacklist[s+"/"+m]; ok {
return nil
}
if ml, ok := l.config.Services[s]; ok {
- return newMethodLogger(ml.Header, ml.Message)
+ return NewTruncatingMethodLogger(ml.Header, ml.Message)
}
if l.config.All == nil {
return nil
}
- return newMethodLogger(l.config.All.Header, l.config.All.Message)
+ return NewTruncatingMethodLogger(l.config.All.Header, l.config.All.Message)
}
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/binarylog/env_config.go b/test/performance/vendor/google.golang.org/grpc/internal/binarylog/env_config.go
index ab589a76b..f9e80e27a 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/binarylog/env_config.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/binarylog/env_config.go
@@ -30,15 +30,15 @@ import (
// to build a new logger and assign it to binarylog.Logger.
//
// Example filter config strings:
-// - "" Nothing will be logged
-// - "*" All headers and messages will be fully logged.
-// - "*{h}" Only headers will be logged.
-// - "*{m:256}" Only the first 256 bytes of each message will be logged.
-// - "Foo/*" Logs every method in service Foo
-// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar
-// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method
-// /Foo/Bar, logs all headers and messages in every other method in service
-// Foo.
+// - "" Nothing will be logged
+// - "*" All headers and messages will be fully logged.
+// - "*{h}" Only headers will be logged.
+// - "*{m:256}" Only the first 256 bytes of each message will be logged.
+// - "Foo/*" Logs every method in service Foo
+// - "Foo/*,-Foo/Bar" Logs every method in service Foo except method /Foo/Bar
+// - "Foo/*,Foo/Bar{m:256}" Logs the first 256 bytes of each message in method
+// /Foo/Bar, logs all headers and messages in every other method in service
+// Foo.
//
// If two configs exist for one certain method or service, the one specified
// later overrides the previous config.
@@ -57,7 +57,7 @@ func NewLoggerFromConfigString(s string) Logger {
return l
}
-// fillMethodLoggerWithConfigString parses config, creates methodLogger and adds
+// fillMethodLoggerWithConfigString parses config, creates TruncatingMethodLogger and adds
// it to the right map in the logger.
func (l *logger) fillMethodLoggerWithConfigString(config string) error {
// "" is invalid.
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go b/test/performance/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go
index 24df0a1a0..179f4a26d 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/binarylog/method_logger.go
@@ -52,7 +52,9 @@ type MethodLogger interface {
Log(LogEntryConfig)
}
-type methodLogger struct {
+// TruncatingMethodLogger is a method logger that truncates headers and messages
+// based on configured fields.
+type TruncatingMethodLogger struct {
headerMaxLen, messageMaxLen uint64
callID uint64
@@ -61,8 +63,9 @@ type methodLogger struct {
sink Sink // TODO(blog): make this plugable.
}
-func newMethodLogger(h, m uint64) *methodLogger {
- return &methodLogger{
+// NewTruncatingMethodLogger returns a new truncating method logger.
+func NewTruncatingMethodLogger(h, m uint64) *TruncatingMethodLogger {
+ return &TruncatingMethodLogger{
headerMaxLen: h,
messageMaxLen: m,
@@ -75,8 +78,8 @@ func newMethodLogger(h, m uint64) *methodLogger {
// Build is an internal only method for building the proto message out of the
// input event. It's made public to enable other library to reuse as much logic
-// in methodLogger as possible.
-func (ml *methodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry {
+// in TruncatingMethodLogger as possible.
+func (ml *TruncatingMethodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry {
m := c.toProto()
timestamp, _ := ptypes.TimestampProto(time.Now())
m.Timestamp = timestamp
@@ -95,11 +98,11 @@ func (ml *methodLogger) Build(c LogEntryConfig) *pb.GrpcLogEntry {
}
// Log creates a proto binary log entry, and logs it to the sink.
-func (ml *methodLogger) Log(c LogEntryConfig) {
+func (ml *TruncatingMethodLogger) Log(c LogEntryConfig) {
ml.sink.Write(ml.Build(c))
}
-func (ml *methodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) {
+func (ml *TruncatingMethodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) {
if ml.headerMaxLen == maxUInt {
return false
}
@@ -129,7 +132,7 @@ func (ml *methodLogger) truncateMetadata(mdPb *pb.Metadata) (truncated bool) {
return truncated
}
-func (ml *methodLogger) truncateMessage(msgPb *pb.Message) (truncated bool) {
+func (ml *TruncatingMethodLogger) truncateMessage(msgPb *pb.Message) (truncated bool) {
if ml.messageMaxLen == maxUInt {
return false
}
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/channelz/types.go b/test/performance/vendor/google.golang.org/grpc/internal/channelz/types.go
index ad0ce4dab..7b2f350e2 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/channelz/types.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/channelz/types.go
@@ -273,10 +273,10 @@ func (c *channel) deleteSelfFromMap() (delete bool) {
// deleteSelfIfReady tries to delete the channel itself from the channelz database.
// The delete process includes two steps:
-// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its
-// parent's child list.
-// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id
-// will return entry not found error.
+// 1. delete the channel from the entry relation tree, i.e. delete the channel reference from its
+// parent's child list.
+// 2. delete the channel from the map, i.e. delete the channel entirely from channelz. Lookup by id
+// will return entry not found error.
func (c *channel) deleteSelfIfReady() {
if !c.deleteSelfFromTree() {
return
@@ -381,10 +381,10 @@ func (sc *subChannel) deleteSelfFromMap() (delete bool) {
// deleteSelfIfReady tries to delete the subchannel itself from the channelz database.
// The delete process includes two steps:
-// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from
-// its parent's child list.
-// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup
-// by id will return entry not found error.
+// 1. delete the subchannel from the entry relation tree, i.e. delete the subchannel reference from
+// its parent's child list.
+// 2. delete the subchannel from the map, i.e. delete the subchannel entirely from channelz. Lookup
+// by id will return entry not found error.
func (sc *subChannel) deleteSelfIfReady() {
if !sc.deleteSelfFromTree() {
return
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go b/test/performance/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
index 6f0272543..7edd196bd 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/envconfig/envconfig.go
@@ -25,11 +25,15 @@ import (
)
const (
- prefix = "GRPC_GO_"
- txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS"
+ prefix = "GRPC_GO_"
+ txtErrIgnoreStr = prefix + "IGNORE_TXT_ERRORS"
+ advertiseCompressorsStr = prefix + "ADVERTISE_COMPRESSORS"
)
var (
// TXTErrIgnore is set if TXT errors should be ignored ("GRPC_GO_IGNORE_TXT_ERRORS" is not "false").
TXTErrIgnore = !strings.EqualFold(os.Getenv(txtErrIgnoreStr), "false")
+ // AdvertiseCompressors is set if registered compressor should be advertised
+ // ("GRPC_GO_ADVERTISE_COMPRESSORS" is not "false").
+ AdvertiseCompressors = !strings.EqualFold(os.Getenv(advertiseCompressorsStr), "false")
)
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/envconfig/observability.go b/test/performance/vendor/google.golang.org/grpc/internal/envconfig/observability.go
new file mode 100644
index 000000000..821dd0a7c
--- /dev/null
+++ b/test/performance/vendor/google.golang.org/grpc/internal/envconfig/observability.go
@@ -0,0 +1,36 @@
+/*
+ *
+ * Copyright 2022 gRPC 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 envconfig
+
+import "os"
+
+const (
+ envObservabilityConfig = "GRPC_GCP_OBSERVABILITY_CONFIG"
+ envObservabilityConfigFile = "GRPC_GCP_OBSERVABILITY_CONFIG_FILE"
+)
+
+var (
+ // ObservabilityConfig is the json configuration for the gcp/observability
+ // package specified directly in the envObservabilityConfig env var.
+ ObservabilityConfig = os.Getenv(envObservabilityConfig)
+ // ObservabilityConfigFile is the json configuration for the
+ // gcp/observability specified in a file with the location specified in
+ // envObservabilityConfigFile env var.
+ ObservabilityConfigFile = os.Getenv(envObservabilityConfigFile)
+)
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/envconfig/xds.go b/test/performance/vendor/google.golang.org/grpc/internal/envconfig/xds.go
index 55aaeea8b..af09711a3 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/envconfig/xds.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/envconfig/xds.go
@@ -84,9 +84,9 @@ var (
// "GRPC_XDS_EXPERIMENTAL_RBAC" to "false".
XDSRBAC = !strings.EqualFold(os.Getenv(rbacSupportEnv), "false")
// XDSOutlierDetection indicates whether outlier detection support is
- // enabled, which can be enabled by setting the environment variable
- // "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "true".
- XDSOutlierDetection = strings.EqualFold(os.Getenv(outlierDetectionSupportEnv), "true")
+ // enabled, which can be disabled by setting the environment variable
+ // "GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION" to "false".
+ XDSOutlierDetection = !strings.EqualFold(os.Getenv(outlierDetectionSupportEnv), "false")
// XDSFederation indicates whether federation support is enabled.
XDSFederation = strings.EqualFold(os.Getenv(federationEnv), "true")
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go b/test/performance/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go
index 30a3b4258..b68e26a36 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/grpclog/grpclog.go
@@ -110,7 +110,7 @@ type LoggerV2 interface {
// This is a copy of the DepthLoggerV2 defined in the external grpclog package.
// It is defined here to avoid a circular dependency.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go b/test/performance/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go
index 740f83c2b..517ea7064 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/grpcrand/grpcrand.go
@@ -52,6 +52,13 @@ func Intn(n int) int {
return r.Intn(n)
}
+// Int31n implements rand.Int31n on the grpcrand global source.
+func Int31n(n int32) int32 {
+ mu.Lock()
+ defer mu.Unlock()
+ return r.Int31n(n)
+}
+
// Float64 implements rand.Float64 on the grpcrand global source.
func Float64() float64 {
mu.Lock()
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go b/test/performance/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go
new file mode 100644
index 000000000..6635f7bca
--- /dev/null
+++ b/test/performance/vendor/google.golang.org/grpc/internal/grpcsync/oncefunc.go
@@ -0,0 +1,32 @@
+/*
+ *
+ * Copyright 2022 gRPC 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 grpcsync
+
+import (
+ "sync"
+)
+
+// OnceFunc returns a function wrapping f which ensures f is only executed
+// once even if the returned function is executed multiple times.
+func OnceFunc(f func()) func() {
+ var once sync.Once
+ return func() {
+ once.Do(f)
+ }
+}
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go b/test/performance/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go
new file mode 100644
index 000000000..9f4090967
--- /dev/null
+++ b/test/performance/vendor/google.golang.org/grpc/internal/grpcutil/compressor.go
@@ -0,0 +1,47 @@
+/*
+ *
+ * Copyright 2022 gRPC 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 grpcutil
+
+import (
+ "strings"
+
+ "google.golang.org/grpc/internal/envconfig"
+)
+
+// RegisteredCompressorNames holds names of the registered compressors.
+var RegisteredCompressorNames []string
+
+// IsCompressorNameRegistered returns true when name is available in registry.
+func IsCompressorNameRegistered(name string) bool {
+ for _, compressor := range RegisteredCompressorNames {
+ if compressor == name {
+ return true
+ }
+ }
+ return false
+}
+
+// RegisteredCompressors returns a string of registered compressor names
+// separated by comma.
+func RegisteredCompressors() string {
+ if !envconfig.AdvertiseCompressors {
+ return ""
+ }
+ return strings.Join(RegisteredCompressorNames, ",")
+}
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/grpcutil/method.go b/test/performance/vendor/google.golang.org/grpc/internal/grpcutil/method.go
index 4e7475060..ec62b4775 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/grpcutil/method.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/grpcutil/method.go
@@ -25,7 +25,6 @@ import (
// ParseMethod splits service and method from the input. It expects format
// "/service/method".
-//
func ParseMethod(methodName string) (service, method string, _ error) {
if !strings.HasPrefix(methodName, "/") {
return "", "", errors.New("invalid method name: should start with /")
@@ -39,6 +38,11 @@ func ParseMethod(methodName string) (service, method string, _ error) {
return methodName[:pos], methodName[pos+1:], nil
}
+// baseContentType is the base content-type for gRPC. This is a valid
+// content-type on it's own, but can also include a content-subtype such as
+// "proto" as a suffix after "+" or ";". See
+// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests
+// for more details.
const baseContentType = "application/grpc"
// ContentSubtype returns the content-subtype for the given content-type. The
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/internal.go b/test/performance/vendor/google.golang.org/grpc/internal/internal.go
index 83018be7c..fd0ee3dca 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/internal.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/internal.go
@@ -63,20 +63,30 @@ var (
// xDS-enabled server invokes this method on a grpc.Server when a particular
// listener moves to "not-serving" mode.
DrainServerTransports interface{} // func(*grpc.Server, string)
- // AddExtraServerOptions adds an array of ServerOption that will be
+ // AddGlobalServerOptions adds an array of ServerOption that will be
// effective globally for newly created servers. The priority will be: 1.
// user-provided; 2. this method; 3. default values.
- AddExtraServerOptions interface{} // func(opt ...ServerOption)
- // ClearExtraServerOptions clears the array of extra ServerOption. This
+ AddGlobalServerOptions interface{} // func(opt ...ServerOption)
+ // ClearGlobalServerOptions clears the array of extra ServerOption. This
// method is useful in testing and benchmarking.
- ClearExtraServerOptions func()
- // AddExtraDialOptions adds an array of DialOption that will be effective
+ ClearGlobalServerOptions func()
+ // AddGlobalDialOptions adds an array of DialOption that will be effective
// globally for newly created client channels. The priority will be: 1.
// user-provided; 2. this method; 3. default values.
- AddExtraDialOptions interface{} // func(opt ...DialOption)
- // ClearExtraDialOptions clears the array of extra DialOption. This
+ AddGlobalDialOptions interface{} // func(opt ...DialOption)
+ // ClearGlobalDialOptions clears the array of extra DialOption. This
// method is useful in testing and benchmarking.
- ClearExtraDialOptions func()
+ ClearGlobalDialOptions func()
+ // JoinServerOptions combines the server options passed as arguments into a
+ // single server option.
+ JoinServerOptions interface{} // func(...grpc.ServerOption) grpc.ServerOption
+
+ // WithBinaryLogger returns a DialOption that specifies the binary logger
+ // for a ClientConn.
+ WithBinaryLogger interface{} // func(binarylog.Logger) grpc.DialOption
+ // BinaryLogger returns a ServerOption that can set the binary logger for a
+ // server.
+ BinaryLogger interface{} // func(binarylog.Logger) grpc.ServerOption
// NewXDSResolverWithConfigForTesting creates a new xds resolver builder using
// the provided xds bootstrap config instead of the global configuration from
@@ -117,22 +127,6 @@ var (
//
// TODO: Remove this function once the RBAC env var is removed.
UnregisterRBACHTTPFilterForTesting func()
-
- // RegisterOutlierDetectionBalancerForTesting registers the Outlier
- // Detection Balancer for testing purposes, regardless of the Outlier
- // Detection environment variable.
- //
- // TODO: Remove this function once the Outlier Detection env var is removed.
- RegisterOutlierDetectionBalancerForTesting func()
-
- // UnregisterOutlierDetectionBalancerForTesting unregisters the Outlier
- // Detection Balancer for testing purposes. This is needed because there is
- // no way to unregister the Outlier Detection Balancer after registering it
- // solely for testing purposes using
- // RegisterOutlierDetectionBalancerForTesting().
- //
- // TODO: Remove this function once the Outlier Detection env var is removed.
- UnregisterOutlierDetectionBalancerForTesting func()
)
// HealthChecker defines the signature of the client-side LB channel health checking function.
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go b/test/performance/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
index 20852e59d..7f1a702ca 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/resolver/unix/unix.go
@@ -49,8 +49,9 @@ func (b *builder) Build(target resolver.Target, cc resolver.ClientConn, _ resolv
}
addr := resolver.Address{Addr: endpoint}
if b.scheme == unixAbstractScheme {
- // prepend "\x00" to address for unix-abstract
- addr.Addr = "\x00" + addr.Addr
+ // We can not prepend \0 as c++ gRPC does, as in Golang '@' is used to signify we do
+ // not want trailing \0 in address.
+ addr.Addr = "@" + addr.Addr
}
cc.UpdateState(resolver.State{Addresses: []resolver.Address{networktype.Set(addr, "unix")}})
return &nopResolver{}, nil
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go b/test/performance/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go
index badbdbf59..51e733e49 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/serviceconfig/serviceconfig.go
@@ -67,10 +67,10 @@ func (bc *BalancerConfig) MarshalJSON() ([]byte, error) {
// ServiceConfig contains a list of loadBalancingConfigs, each with a name and
// config. This method iterates through that list in order, and stops at the
// first policy that is supported.
-// - If the config for the first supported policy is invalid, the whole service
-// config is invalid.
-// - If the list doesn't contain any supported policy, the whole service config
-// is invalid.
+// - If the config for the first supported policy is invalid, the whole service
+// config is invalid.
+// - If the list doesn't contain any supported policy, the whole service config
+// is invalid.
func (bc *BalancerConfig) UnmarshalJSON(b []byte) error {
var ir intermediateBalancerConfig
err := json.Unmarshal(b, &ir)
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/status/status.go b/test/performance/vendor/google.golang.org/grpc/internal/status/status.go
index e5c6513ed..b0ead4f54 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/status/status.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/status/status.go
@@ -164,3 +164,13 @@ func (e *Error) Is(target error) bool {
}
return proto.Equal(e.s.s, tse.s.s)
}
+
+// IsRestrictedControlPlaneCode returns whether the status includes a code
+// restricted for control plane usage as defined by gRFC A54.
+func IsRestrictedControlPlaneCode(s *Status) bool {
+ switch s.Code() {
+ case codes.InvalidArgument, codes.NotFound, codes.AlreadyExists, codes.FailedPrecondition, codes.Aborted, codes.OutOfRange, codes.DataLoss:
+ return true
+ }
+ return false
+}
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/transport/controlbuf.go b/test/performance/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
index 244f4b081..409769f48 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/transport/controlbuf.go
@@ -886,9 +886,9 @@ func (l *loopyWriter) processData() (bool, error) {
dataItem := str.itl.peek().(*dataFrame) // Peek at the first data item this stream.
// A data item is represented by a dataFrame, since it later translates into
// multiple HTTP2 data frames.
- // Every dataFrame has two buffers; h that keeps grpc-message header and d that is acutal data.
+ // Every dataFrame has two buffers; h that keeps grpc-message header and d that is actual data.
// As an optimization to keep wire traffic low, data from d is copied to h to make as big as the
- // maximum possilbe HTTP2 frame size.
+ // maximum possible HTTP2 frame size.
if len(dataItem.h) == 0 && len(dataItem.d) == 0 { // Empty data frame
// Client sends out empty data frame with endStream = true
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/transport/handler_server.go b/test/performance/vendor/google.golang.org/grpc/internal/transport/handler_server.go
index 090120925..fb272235d 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/transport/handler_server.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/transport/handler_server.go
@@ -442,10 +442,10 @@ func (ht *serverHandlerTransport) Drain() {
// mapRecvMsgError returns the non-nil err into the appropriate
// error value as expected by callers of *grpc.parser.recvMsg.
// In particular, in can only be:
-// * io.EOF
-// * io.ErrUnexpectedEOF
-// * of type transport.ConnectionError
-// * an error from the status package
+// - io.EOF
+// - io.ErrUnexpectedEOF
+// - of type transport.ConnectionError
+// - an error from the status package
func mapRecvMsgError(err error) error {
if err == io.EOF || err == io.ErrUnexpectedEOF {
return err
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/transport/http2_client.go b/test/performance/vendor/google.golang.org/grpc/internal/transport/http2_client.go
index be371c6e0..d518b07e1 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/transport/http2_client.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/transport/http2_client.go
@@ -38,8 +38,10 @@ import (
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/internal/channelz"
icredentials "google.golang.org/grpc/internal/credentials"
+ "google.golang.org/grpc/internal/grpcsync"
"google.golang.org/grpc/internal/grpcutil"
imetadata "google.golang.org/grpc/internal/metadata"
+ istatus "google.golang.org/grpc/internal/status"
"google.golang.org/grpc/internal/syscall"
"google.golang.org/grpc/internal/transport/networktype"
"google.golang.org/grpc/keepalive"
@@ -78,6 +80,7 @@ type http2Client struct {
framer *framer
// controlBuf delivers all the control related tasks (e.g., window
// updates, reset streams, and various settings) to the controller.
+ // Do not access controlBuf with mu held.
controlBuf *controlBuffer
fc *trInFlow
// The scheme used: https if TLS is on, http otherwise.
@@ -98,17 +101,15 @@ type http2Client struct {
maxSendHeaderListSize *uint32
bdpEst *bdpEstimator
- // onPrefaceReceipt is a callback that client transport calls upon
- // receiving server preface to signal that a succefull HTTP2
- // connection was established.
- onPrefaceReceipt func()
maxConcurrentStreams uint32
streamQuota int64
streamsQuotaAvailable chan struct{}
waitingStreams uint32
nextID uint32
+ registeredCompressors string
+ // Do not access controlBuf with mu held.
mu sync.Mutex // guard the following variables
state transportState
activeStreams map[uint32]*Stream
@@ -192,7 +193,7 @@ func isTemporary(err error) bool {
// newHTTP2Client constructs a connected ClientTransport to addr based on HTTP2
// and starts to receive messages on it. Non-nil error returns if construction
// fails.
-func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) {
+func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (_ *http2Client, err error) {
scheme := "http"
ctx, cancel := context.WithCancel(ctx)
defer func() {
@@ -214,12 +215,35 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
}
return nil, connectionErrorf(true, err, "transport: Error while dialing %v", err)
}
+
// Any further errors will close the underlying connection
defer func(conn net.Conn) {
if err != nil {
conn.Close()
}
}(conn)
+
+ // The following defer and goroutine monitor the connectCtx for cancelation
+ // and deadline. On context expiration, the connection is hard closed and
+ // this function will naturally fail as a result. Otherwise, the defer
+ // waits for the goroutine to exit to prevent the context from being
+ // monitored (and to prevent the connection from ever being closed) after
+ // returning from this function.
+ ctxMonitorDone := grpcsync.NewEvent()
+ newClientCtx, newClientDone := context.WithCancel(connectCtx)
+ defer func() {
+ newClientDone() // Awaken the goroutine below if connectCtx hasn't expired.
+ <-ctxMonitorDone.Done() // Wait for the goroutine below to exit.
+ }()
+ go func(conn net.Conn) {
+ defer ctxMonitorDone.Fire() // Signal this goroutine has exited.
+ <-newClientCtx.Done() // Block until connectCtx expires or the defer above executes.
+ if connectCtx.Err() != nil {
+ // connectCtx expired before exiting the function. Hard close the connection.
+ conn.Close()
+ }
+ }(conn)
+
kp := opts.KeepaliveParams
// Validate keepalive parameters.
if kp.Time == 0 {
@@ -251,15 +275,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
}
}
if transportCreds != nil {
- rawConn := conn
- // Pull the deadline from the connectCtx, which will be used for
- // timeouts in the authentication protocol handshake. Can ignore the
- // boolean as the deadline will return the zero value, which will make
- // the conn not timeout on I/O operations.
- deadline, _ := connectCtx.Deadline()
- rawConn.SetDeadline(deadline)
- conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, rawConn)
- rawConn.SetDeadline(time.Time{})
+ conn, authInfo, err = transportCreds.ClientHandshake(connectCtx, addr.ServerName, conn)
if err != nil {
return nil, connectionErrorf(isTemporary(err), err, "transport: authentication handshake failed: %v", err)
}
@@ -297,6 +313,7 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
ctxDone: ctx.Done(), // Cache Done chan.
cancel: cancel,
userAgent: opts.UserAgent,
+ registeredCompressors: grpcutil.RegisteredCompressors(),
conn: conn,
remoteAddr: conn.RemoteAddr(),
localAddr: conn.LocalAddr(),
@@ -313,17 +330,18 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
kp: kp,
statsHandlers: opts.StatsHandlers,
initialWindowSize: initialWindowSize,
- onPrefaceReceipt: onPrefaceReceipt,
nextID: 1,
maxConcurrentStreams: defaultMaxStreamsClient,
streamQuota: defaultMaxStreamsClient,
streamsQuotaAvailable: make(chan struct{}, 1),
czData: new(channelzData),
onGoAway: onGoAway,
- onClose: onClose,
keepaliveEnabled: keepaliveEnabled,
bufferPool: newBufferPool(),
+ onClose: onClose,
}
+ // Add peer information to the http2client context.
+ t.ctx = peer.NewContext(t.ctx, t.getPeer())
if md, ok := addr.Metadata.(*metadata.MD); ok {
t.md = *md
@@ -359,21 +377,32 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
t.kpDormancyCond = sync.NewCond(&t.mu)
go t.keepalive()
}
- // Start the reader goroutine for incoming message. Each transport has
- // a dedicated goroutine which reads HTTP2 frame from network. Then it
- // dispatches the frame to the corresponding stream entity.
- go t.reader()
+
+ // Start the reader goroutine for incoming messages. Each transport has a
+ // dedicated goroutine which reads HTTP2 frames from the network. Then it
+ // dispatches the frame to the corresponding stream entity. When the
+ // server preface is received, readerErrCh is closed. If an error occurs
+ // first, an error is pushed to the channel. This must be checked before
+ // returning from this function.
+ readerErrCh := make(chan error, 1)
+ go t.reader(readerErrCh)
+ defer func() {
+ if err == nil {
+ err = <-readerErrCh
+ }
+ if err != nil {
+ t.Close(err)
+ }
+ }()
// Send connection preface to server.
n, err := t.conn.Write(clientPreface)
if err != nil {
err = connectionErrorf(true, err, "transport: failed to write client preface: %v", err)
- t.Close(err)
return nil, err
}
if n != len(clientPreface) {
err = connectionErrorf(true, nil, "transport: preface mismatch, wrote %d bytes; want %d", n, len(clientPreface))
- t.Close(err)
return nil, err
}
var ss []http2.Setting
@@ -393,14 +422,12 @@ func newHTTP2Client(connectCtx, ctx context.Context, addr resolver.Address, opts
err = t.framer.fr.WriteSettings(ss...)
if err != nil {
err = connectionErrorf(true, err, "transport: failed to write initial settings frame: %v", err)
- t.Close(err)
return nil, err
}
// Adjust the connection flow control window if needed.
if delta := uint32(icwz - defaultWindowSize); delta > 0 {
if err := t.framer.fr.WriteWindowUpdate(0, delta); err != nil {
err = connectionErrorf(true, err, "transport: failed to write window update: %v", err)
- t.Close(err)
return nil, err
}
}
@@ -467,7 +494,7 @@ func (t *http2Client) newStream(ctx context.Context, callHdr *CallHdr) *Stream {
func (t *http2Client) getPeer() *peer.Peer {
return &peer.Peer{
Addr: t.remoteAddr,
- AuthInfo: t.authInfo,
+ AuthInfo: t.authInfo, // Can be nil
}
}
@@ -503,9 +530,22 @@ func (t *http2Client) createHeaderFields(ctx context.Context, callHdr *CallHdr)
headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-previous-rpc-attempts", Value: strconv.Itoa(callHdr.PreviousAttempts)})
}
+ registeredCompressors := t.registeredCompressors
if callHdr.SendCompress != "" {
headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-encoding", Value: callHdr.SendCompress})
- headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: callHdr.SendCompress})
+ // Include the outgoing compressor name when compressor is not registered
+ // via encoding.RegisterCompressor. This is possible when client uses
+ // WithCompressor dial option.
+ if !grpcutil.IsCompressorNameRegistered(callHdr.SendCompress) {
+ if registeredCompressors != "" {
+ registeredCompressors += ","
+ }
+ registeredCompressors += callHdr.SendCompress
+ }
+ }
+
+ if registeredCompressors != "" {
+ headerFields = append(headerFields, hpack.HeaderField{Name: "grpc-accept-encoding", Value: registeredCompressors})
}
if dl, ok := ctx.Deadline(); ok {
// Send out timeout regardless its value. The server can detect timeout context by itself.
@@ -585,7 +625,11 @@ func (t *http2Client) getTrAuthData(ctx context.Context, audience string) (map[s
for _, c := range t.perRPCCreds {
data, err := c.GetRequestMetadata(ctx, audience)
if err != nil {
- if _, ok := status.FromError(err); ok {
+ if st, ok := status.FromError(err); ok {
+ // Restrict the code to the list allowed by gRFC A54.
+ if istatus.IsRestrictedControlPlaneCode(st) {
+ err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err)
+ }
return nil, err
}
@@ -614,7 +658,14 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call
}
data, err := callCreds.GetRequestMetadata(ctx, audience)
if err != nil {
- return nil, status.Errorf(codes.Internal, "transport: %v", err)
+ if st, ok := status.FromError(err); ok {
+ // Restrict the code to the list allowed by gRFC A54.
+ if istatus.IsRestrictedControlPlaneCode(st) {
+ err = status.Errorf(codes.Internal, "transport: received per-RPC creds error with illegal status: %v", err)
+ }
+ return nil, err
+ }
+ return nil, status.Errorf(codes.Internal, "transport: per-RPC creds failed due to error: %v", err)
}
callAuthData = make(map[string]string, len(data))
for k, v := range data {
@@ -630,13 +681,13 @@ func (t *http2Client) getCallAuthData(ctx context.Context, audience string, call
// NewStream errors result in transparent retry, as they mean nothing went onto
// the wire. However, there are two notable exceptions:
//
-// 1. If the stream headers violate the max header list size allowed by the
-// server. It's possible this could succeed on another transport, even if
-// it's unlikely, but do not transparently retry.
-// 2. If the credentials errored when requesting their headers. In this case,
-// it's possible a retry can fix the problem, but indefinitely transparently
-// retrying is not appropriate as it is likely the credentials, if they can
-// eventually succeed, would need I/O to do so.
+// 1. If the stream headers violate the max header list size allowed by the
+// server. It's possible this could succeed on another transport, even if
+// it's unlikely, but do not transparently retry.
+// 2. If the credentials errored when requesting their headers. In this case,
+// it's possible a retry can fix the problem, but indefinitely transparently
+// retrying is not appropriate as it is likely the credentials, if they can
+// eventually succeed, would need I/O to do so.
type NewStreamError struct {
Err error
@@ -685,7 +736,6 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream,
cleanup(err)
return err
}
- t.activeStreams[id] = s
if channelz.IsOn() {
atomic.AddInt64(&t.czData.streamsStarted, 1)
atomic.StoreInt64(&t.czData.lastStreamCreatedTime, time.Now().UnixNano())
@@ -719,6 +769,13 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream,
t.nextID += 2
s.id = h.streamID
s.fc = &inFlow{limit: uint32(t.initialWindowSize)}
+ t.mu.Lock()
+ if t.activeStreams == nil { // Can be niled from Close().
+ t.mu.Unlock()
+ return false // Don't create a stream if the transport is already closed.
+ }
+ t.activeStreams[s.id] = s
+ t.mu.Unlock()
if t.streamQuota > 0 && t.waitingStreams > 0 {
select {
case t.streamsQuotaAvailable <- struct{}{}:
@@ -744,13 +801,7 @@ func (t *http2Client) NewStream(ctx context.Context, callHdr *CallHdr) (*Stream,
}
for {
success, err := t.controlBuf.executeAndPut(func(it interface{}) bool {
- if !checkForStreamQuota(it) {
- return false
- }
- if !checkForHeaderListSize(it) {
- return false
- }
- return true
+ return checkForHeaderListSize(it) && checkForStreamQuota(it)
}, hdr)
if err != nil {
// Connection closed.
@@ -876,19 +927,15 @@ func (t *http2Client) closeStream(s *Stream, err error, rst bool, rstCode http2.
// Close kicks off the shutdown process of the transport. This should be called
// only once on a transport. Once it is called, the transport should not be
// accessed any more.
-//
-// This method blocks until the addrConn that initiated this transport is
-// re-connected. This happens because t.onClose() begins reconnect logic at the
-// addrConn level and blocks until the addrConn is successfully connected.
func (t *http2Client) Close(err error) {
t.mu.Lock()
- // Make sure we only Close once.
+ // Make sure we only close once.
if t.state == closing {
t.mu.Unlock()
return
}
- // Call t.onClose before setting the state to closing to prevent the client
- // from attempting to create new streams ASAP.
+ // Call t.onClose ASAP to prevent the client from attempting to create new
+ // streams.
t.onClose()
t.state = closing
streams := t.activeStreams
@@ -1003,13 +1050,13 @@ func (t *http2Client) updateWindow(s *Stream, n uint32) {
// for the transport and the stream based on the current bdp
// estimation.
func (t *http2Client) updateFlowControl(n uint32) {
- t.mu.Lock()
- for _, s := range t.activeStreams {
- s.fc.newLimit(n)
- }
- t.mu.Unlock()
updateIWS := func(interface{}) bool {
t.initialWindowSize = int32(n)
+ t.mu.Lock()
+ for _, s := range t.activeStreams {
+ s.fc.newLimit(n)
+ }
+ t.mu.Unlock()
return true
}
t.controlBuf.executeAndPut(updateIWS, &outgoingWindowUpdate{streamID: 0, increment: t.fc.newLimit(n)})
@@ -1215,7 +1262,7 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) {
default:
t.setGoAwayReason(f)
close(t.goAway)
- t.controlBuf.put(&incomingGoAway{})
+ defer t.controlBuf.put(&incomingGoAway{}) // Defer as t.mu is currently held.
// Notify the clientconn about the GOAWAY before we set the state to
// draining, to allow the client to stop attempting to create streams
// before disallowing new streams on this connection.
@@ -1228,18 +1275,29 @@ func (t *http2Client) handleGoAway(f *http2.GoAwayFrame) {
if upperLimit == 0 { // This is the first GoAway Frame.
upperLimit = math.MaxUint32 // Kill all streams after the GoAway ID.
}
+
+ t.prevGoAwayID = id
+ if len(t.activeStreams) == 0 {
+ t.mu.Unlock()
+ t.Close(connectionErrorf(true, nil, "received goaway and there are no active streams"))
+ return
+ }
+
+ streamsToClose := make([]*Stream, 0)
for streamID, stream := range t.activeStreams {
if streamID > id && streamID <= upperLimit {
// The stream was unprocessed by the server.
- atomic.StoreUint32(&stream.unprocessed, 1)
- t.closeStream(stream, errStreamDrain, false, http2.ErrCodeNo, statusGoAway, nil, false)
+ if streamID > id && streamID <= upperLimit {
+ atomic.StoreUint32(&stream.unprocessed, 1)
+ streamsToClose = append(streamsToClose, stream)
+ }
}
}
- t.prevGoAwayID = id
- active := len(t.activeStreams)
t.mu.Unlock()
- if active == 0 {
- t.Close(connectionErrorf(true, nil, "received goaway and there are no active streams"))
+ // Called outside t.mu because closeStream can take controlBuf's mu, which
+ // could induce deadlock and is not allowed.
+ for _, stream := range streamsToClose {
+ t.closeStream(stream, errStreamDrain, false, http2.ErrCodeNo, statusGoAway, nil, false)
}
}
@@ -1467,33 +1525,35 @@ func (t *http2Client) operateHeaders(frame *http2.MetaHeadersFrame) {
t.closeStream(s, io.EOF, rst, http2.ErrCodeNo, statusGen, mdata, true)
}
-// reader runs as a separate goroutine in charge of reading data from network
-// connection.
-//
-// TODO(zhaoq): currently one reader per transport. Investigate whether this is
-// optimal.
-// TODO(zhaoq): Check the validity of the incoming frame sequence.
-func (t *http2Client) reader() {
- defer close(t.readerDone)
- // Check the validity of server preface.
+// readServerPreface reads and handles the initial settings frame from the
+// server.
+func (t *http2Client) readServerPreface() error {
frame, err := t.framer.fr.ReadFrame()
if err != nil {
- err = connectionErrorf(true, err, "error reading server preface: %v", err)
- t.Close(err) // this kicks off resetTransport, so must be last before return
- return
- }
- t.conn.SetReadDeadline(time.Time{}) // reset deadline once we get the settings frame (we didn't time out, yay!)
- if t.keepaliveEnabled {
- atomic.StoreInt64(&t.lastRead, time.Now().UnixNano())
+ return connectionErrorf(true, err, "error reading server preface: %v", err)
}
sf, ok := frame.(*http2.SettingsFrame)
if !ok {
- // this kicks off resetTransport, so must be last before return
- t.Close(connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame))
- return
+ return connectionErrorf(true, nil, "initial http2 frame from server is not a settings frame: %T", frame)
}
- t.onPrefaceReceipt()
t.handleSettings(sf, true)
+ return nil
+}
+
+// reader verifies the server preface and reads all subsequent data from
+// network connection. If the server preface is not read successfully, an
+// error is pushed to errCh; otherwise errCh is closed with no error.
+func (t *http2Client) reader(errCh chan<- error) {
+ defer close(t.readerDone)
+
+ if err := t.readServerPreface(); err != nil {
+ errCh <- err
+ return
+ }
+ close(errCh)
+ if t.keepaliveEnabled {
+ atomic.StoreInt64(&t.lastRead, time.Now().UnixNano())
+ }
// loop to keep reading incoming messages on this transport.
for {
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/transport/http2_server.go b/test/performance/vendor/google.golang.org/grpc/internal/transport/http2_server.go
index 2b0fde334..3dd15647b 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/transport/http2_server.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/transport/http2_server.go
@@ -265,6 +265,9 @@ func NewServerTransport(conn net.Conn, config *ServerConfig) (_ ServerTransport,
czData: new(channelzData),
bufferPool: newBufferPool(),
}
+ // Add peer information to the http2server context.
+ t.ctx = peer.NewContext(t.ctx, t.getPeer())
+
t.controlBuf = newControlBuffer(t.done)
if dynamicWindow {
t.bdpEst = &bdpEstimator{
@@ -485,14 +488,7 @@ func (t *http2Server) operateHeaders(frame *http2.MetaHeadersFrame, handle func(
} else {
s.ctx, s.cancel = context.WithCancel(t.ctx)
}
- pr := &peer.Peer{
- Addr: t.remoteAddr,
- }
- // Attach Auth info if there is any.
- if t.authInfo != nil {
- pr.AuthInfo = t.authInfo
- }
- s.ctx = peer.NewContext(s.ctx, pr)
+
// Attach the received metadata to the context.
if len(mdata) > 0 {
s.ctx = metadata.NewIncomingContext(s.ctx, mdata)
@@ -945,15 +941,16 @@ func (t *http2Server) streamContextErr(s *Stream) error {
// WriteHeader sends the header metadata md back to the client.
func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error {
- if s.updateHeaderSent() {
- return ErrIllegalHeaderWrite
- }
-
+ s.hdrMu.Lock()
+ defer s.hdrMu.Unlock()
if s.getState() == streamDone {
return t.streamContextErr(s)
}
- s.hdrMu.Lock()
+ if s.updateHeaderSent() {
+ return ErrIllegalHeaderWrite
+ }
+
if md.Len() > 0 {
if s.header.Len() > 0 {
s.header = metadata.Join(s.header, md)
@@ -962,10 +959,8 @@ func (t *http2Server) WriteHeader(s *Stream, md metadata.MD) error {
}
}
if err := t.writeHeaderLocked(s); err != nil {
- s.hdrMu.Unlock()
return status.Convert(err).Err()
}
- s.hdrMu.Unlock()
return nil
}
@@ -1013,17 +1008,19 @@ func (t *http2Server) writeHeaderLocked(s *Stream) error {
// TODO(zhaoq): Now it indicates the end of entire stream. Revisit if early
// OK is adopted.
func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error {
+ s.hdrMu.Lock()
+ defer s.hdrMu.Unlock()
+
if s.getState() == streamDone {
return nil
}
- s.hdrMu.Lock()
+
// TODO(mmukhi): Benchmark if the performance gets better if count the metadata and other header fields
// first and create a slice of that exact size.
headerFields := make([]hpack.HeaderField, 0, 2) // grpc-status and grpc-message will be there if none else.
if !s.updateHeaderSent() { // No headers have been sent.
if len(s.header) > 0 { // Send a separate header frame.
if err := t.writeHeaderLocked(s); err != nil {
- s.hdrMu.Unlock()
return err
}
} else { // Send a trailer only response.
@@ -1052,7 +1049,7 @@ func (t *http2Server) WriteStatus(s *Stream, st *status.Status) error {
endStream: true,
onWrite: t.setResetPingStrikes,
}
- s.hdrMu.Unlock()
+
success, err := t.controlBuf.execute(t.checkForHeaderListSize, trailingHeader)
if !success {
if err != nil {
@@ -1415,6 +1412,13 @@ func (t *http2Server) getOutFlowWindow() int64 {
}
}
+func (t *http2Server) getPeer() *peer.Peer {
+ return &peer.Peer{
+ Addr: t.remoteAddr,
+ AuthInfo: t.authInfo, // Can be nil
+ }
+}
+
func getJitter(v time.Duration) time.Duration {
if v == infinity {
return 0
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/transport/http_util.go b/test/performance/vendor/google.golang.org/grpc/internal/transport/http_util.go
index b77513068..2c601a864 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/transport/http_util.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/transport/http_util.go
@@ -20,7 +20,6 @@ package transport
import (
"bufio"
- "bytes"
"encoding/base64"
"fmt"
"io"
@@ -45,14 +44,8 @@ import (
const (
// http2MaxFrameLen specifies the max length of a HTTP2 frame.
http2MaxFrameLen = 16384 // 16KB frame
- // http://http2.github.io/http2-spec/#SettingValues
+ // https://httpwg.org/specs/rfc7540.html#SettingValues
http2InitHeaderTableSize = 4096
- // baseContentType is the base content-type for gRPC. This is a valid
- // content-type on it's own, but can also include a content-subtype such as
- // "proto" as a suffix after "+" or ";". See
- // https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#requests
- // for more details.
-
)
var (
@@ -257,13 +250,13 @@ func encodeGrpcMessage(msg string) string {
}
func encodeGrpcMessageUnchecked(msg string) string {
- var buf bytes.Buffer
+ var sb strings.Builder
for len(msg) > 0 {
r, size := utf8.DecodeRuneInString(msg)
for _, b := range []byte(string(r)) {
if size > 1 {
// If size > 1, r is not ascii. Always do percent encoding.
- buf.WriteString(fmt.Sprintf("%%%02X", b))
+ fmt.Fprintf(&sb, "%%%02X", b)
continue
}
@@ -272,14 +265,14 @@ func encodeGrpcMessageUnchecked(msg string) string {
//
// fmt.Sprintf("%%%02X", utf8.RuneError) gives "%FFFD".
if b >= spaceByte && b <= tildeByte && b != percentByte {
- buf.WriteByte(b)
+ sb.WriteByte(b)
} else {
- buf.WriteString(fmt.Sprintf("%%%02X", b))
+ fmt.Fprintf(&sb, "%%%02X", b)
}
}
msg = msg[size:]
}
- return buf.String()
+ return sb.String()
}
// decodeGrpcMessage decodes the msg encoded by encodeGrpcMessage.
@@ -297,23 +290,23 @@ func decodeGrpcMessage(msg string) string {
}
func decodeGrpcMessageUnchecked(msg string) string {
- var buf bytes.Buffer
+ var sb strings.Builder
lenMsg := len(msg)
for i := 0; i < lenMsg; i++ {
c := msg[i]
if c == percentByte && i+2 < lenMsg {
parsed, err := strconv.ParseUint(msg[i+1:i+3], 16, 8)
if err != nil {
- buf.WriteByte(c)
+ sb.WriteByte(c)
} else {
- buf.WriteByte(byte(parsed))
+ sb.WriteByte(byte(parsed))
i += 2
}
} else {
- buf.WriteByte(c)
+ sb.WriteByte(c)
}
}
- return buf.String()
+ return sb.String()
}
type bufWriter struct {
diff --git a/test/performance/vendor/google.golang.org/grpc/internal/transport/transport.go b/test/performance/vendor/google.golang.org/grpc/internal/transport/transport.go
index 6c3ba8515..2e615ee20 100644
--- a/test/performance/vendor/google.golang.org/grpc/internal/transport/transport.go
+++ b/test/performance/vendor/google.golang.org/grpc/internal/transport/transport.go
@@ -43,6 +43,10 @@ import (
"google.golang.org/grpc/tap"
)
+// ErrNoHeaders is used as a signal that a trailers only response was received,
+// and is not a real error.
+var ErrNoHeaders = errors.New("stream has no headers")
+
const logLevel = 2
type bufferPool struct {
@@ -366,9 +370,15 @@ func (s *Stream) Header() (metadata.MD, error) {
return s.header.Copy(), nil
}
s.waitOnHeader()
+
if !s.headerValid {
return nil, s.status.Err()
}
+
+ if s.noHeaders {
+ return nil, ErrNoHeaders
+ }
+
return s.header.Copy(), nil
}
@@ -573,8 +583,8 @@ type ConnectOptions struct {
// NewClientTransport establishes the transport with the required ConnectOptions
// and returns it to the caller.
-func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onPrefaceReceipt func(), onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) {
- return newHTTP2Client(connectCtx, ctx, addr, opts, onPrefaceReceipt, onGoAway, onClose)
+func NewClientTransport(connectCtx, ctx context.Context, addr resolver.Address, opts ConnectOptions, onGoAway func(GoAwayReason), onClose func()) (ClientTransport, error) {
+ return newHTTP2Client(connectCtx, ctx, addr, opts, onGoAway, onClose)
}
// Options provides additional hints and information for message
diff --git a/test/performance/vendor/google.golang.org/grpc/metadata/metadata.go b/test/performance/vendor/google.golang.org/grpc/metadata/metadata.go
index 8e0f6abe8..fb4a88f59 100644
--- a/test/performance/vendor/google.golang.org/grpc/metadata/metadata.go
+++ b/test/performance/vendor/google.golang.org/grpc/metadata/metadata.go
@@ -41,16 +41,17 @@ type MD map[string][]string
// New creates an MD from a given key-value map.
//
// Only the following ASCII characters are allowed in keys:
-// - digits: 0-9
-// - uppercase letters: A-Z (normalized to lower)
-// - lowercase letters: a-z
-// - special characters: -_.
+// - digits: 0-9
+// - uppercase letters: A-Z (normalized to lower)
+// - lowercase letters: a-z
+// - special characters: -_.
+//
// Uppercase letters are automatically converted to lowercase.
//
// Keys beginning with "grpc-" are reserved for grpc-internal use only and may
// result in errors if set in metadata.
func New(m map[string]string) MD {
- md := MD{}
+ md := make(MD, len(m))
for k, val := range m {
key := strings.ToLower(k)
md[key] = append(md[key], val)
@@ -62,10 +63,11 @@ func New(m map[string]string) MD {
// Pairs panics if len(kv) is odd.
//
// Only the following ASCII characters are allowed in keys:
-// - digits: 0-9
-// - uppercase letters: A-Z (normalized to lower)
-// - lowercase letters: a-z
-// - special characters: -_.
+// - digits: 0-9
+// - uppercase letters: A-Z (normalized to lower)
+// - lowercase letters: a-z
+// - special characters: -_.
+//
// Uppercase letters are automatically converted to lowercase.
//
// Keys beginning with "grpc-" are reserved for grpc-internal use only and may
@@ -74,7 +76,7 @@ func Pairs(kv ...string) MD {
if len(kv)%2 == 1 {
panic(fmt.Sprintf("metadata: Pairs got the odd number of input pairs for metadata: %d", len(kv)))
}
- md := MD{}
+ md := make(MD, len(kv)/2)
for i := 0; i < len(kv); i += 2 {
key := strings.ToLower(kv[i])
md[key] = append(md[key], kv[i+1])
@@ -182,19 +184,51 @@ func FromIncomingContext(ctx context.Context) (MD, bool) {
if !ok {
return nil, false
}
- out := MD{}
+ out := make(MD, len(md))
for k, v := range md {
// We need to manually convert all keys to lower case, because MD is a
// map, and there's no guarantee that the MD attached to the context is
// created using our helper functions.
key := strings.ToLower(k)
- s := make([]string, len(v))
- copy(s, v)
- out[key] = s
+ out[key] = copyOf(v)
}
return out, true
}
+// ValueFromIncomingContext returns the metadata value corresponding to the metadata
+// key from the incoming metadata if it exists. Key must be lower-case.
+//
+// # Experimental
+//
+// Notice: This API is EXPERIMENTAL and may be changed or removed in a
+// later release.
+func ValueFromIncomingContext(ctx context.Context, key string) []string {
+ md, ok := ctx.Value(mdIncomingKey{}).(MD)
+ if !ok {
+ return nil
+ }
+
+ if v, ok := md[key]; ok {
+ return copyOf(v)
+ }
+ for k, v := range md {
+ // We need to manually convert all keys to lower case, because MD is a
+ // map, and there's no guarantee that the MD attached to the context is
+ // created using our helper functions.
+ if strings.ToLower(k) == key {
+ return copyOf(v)
+ }
+ }
+ return nil
+}
+
+// the returned slice must not be modified in place
+func copyOf(v []string) []string {
+ vals := make([]string, len(v))
+ copy(vals, v)
+ return vals
+}
+
// FromOutgoingContextRaw returns the un-merged, intermediary contents of rawMD.
//
// Remember to perform strings.ToLower on the keys, for both the returned MD (MD
@@ -222,15 +256,18 @@ func FromOutgoingContext(ctx context.Context) (MD, bool) {
return nil, false
}
- out := MD{}
+ mdSize := len(raw.md)
+ for i := range raw.added {
+ mdSize += len(raw.added[i]) / 2
+ }
+
+ out := make(MD, mdSize)
for k, v := range raw.md {
// We need to manually convert all keys to lower case, because MD is a
// map, and there's no guarantee that the MD attached to the context is
// created using our helper functions.
key := strings.ToLower(k)
- s := make([]string, len(v))
- copy(s, v)
- out[key] = s
+ out[key] = copyOf(v)
}
for _, added := range raw.added {
if len(added)%2 == 1 {
diff --git a/test/performance/vendor/google.golang.org/grpc/picker_wrapper.go b/test/performance/vendor/google.golang.org/grpc/picker_wrapper.go
index 843633c91..a5d5516ee 100644
--- a/test/performance/vendor/google.golang.org/grpc/picker_wrapper.go
+++ b/test/performance/vendor/google.golang.org/grpc/picker_wrapper.go
@@ -26,6 +26,7 @@ import (
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/codes"
"google.golang.org/grpc/internal/channelz"
+ istatus "google.golang.org/grpc/internal/status"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/status"
)
@@ -129,8 +130,12 @@ func (pw *pickerWrapper) pick(ctx context.Context, failfast bool, info balancer.
if err == balancer.ErrNoSubConnAvailable {
continue
}
- if _, ok := status.FromError(err); ok {
+ if st, ok := status.FromError(err); ok {
// Status error: end the RPC unconditionally with this status.
+ // First restrict the code to the list allowed by gRFC A54.
+ if istatus.IsRestrictedControlPlaneCode(st) {
+ err = status.Errorf(codes.Internal, "received picker error with illegal status: %v", err)
+ }
return nil, nil, dropError{error: err}
}
// For all other errors, wait for ready RPCs should block and other
diff --git a/test/performance/vendor/google.golang.org/grpc/preloader.go b/test/performance/vendor/google.golang.org/grpc/preloader.go
index 0a1e975ad..cd4554785 100644
--- a/test/performance/vendor/google.golang.org/grpc/preloader.go
+++ b/test/performance/vendor/google.golang.org/grpc/preloader.go
@@ -25,7 +25,7 @@ import (
// PreparedMsg is responsible for creating a Marshalled and Compressed object.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/test/performance/vendor/google.golang.org/grpc/resolver/resolver.go b/test/performance/vendor/google.golang.org/grpc/resolver/resolver.go
index ca2e35a35..967cbc737 100644
--- a/test/performance/vendor/google.golang.org/grpc/resolver/resolver.go
+++ b/test/performance/vendor/google.golang.org/grpc/resolver/resolver.go
@@ -96,7 +96,7 @@ const (
// Address represents a server the client connects to.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -236,12 +236,12 @@ type ClientConn interface {
//
// Examples:
//
-// - "dns://some_authority/foo.bar"
-// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"}
-// - "foo.bar"
-// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"}
-// - "unknown_scheme://authority/endpoint"
-// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"}
+// - "dns://some_authority/foo.bar"
+// Target{Scheme: "dns", Authority: "some_authority", Endpoint: "foo.bar"}
+// - "foo.bar"
+// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "foo.bar"}
+// - "unknown_scheme://authority/endpoint"
+// Target{Scheme: resolver.GetDefaultScheme(), Endpoint: "unknown_scheme://authority/endpoint"}
type Target struct {
// Deprecated: use URL.Scheme instead.
Scheme string
diff --git a/test/performance/vendor/google.golang.org/grpc/rpc_util.go b/test/performance/vendor/google.golang.org/grpc/rpc_util.go
index 5d407b004..934fc1aa0 100644
--- a/test/performance/vendor/google.golang.org/grpc/rpc_util.go
+++ b/test/performance/vendor/google.golang.org/grpc/rpc_util.go
@@ -198,7 +198,7 @@ func Header(md *metadata.MD) CallOption {
// HeaderCallOption is a CallOption for collecting response header metadata.
// The metadata field will be populated *after* the RPC completes.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -220,7 +220,7 @@ func Trailer(md *metadata.MD) CallOption {
// TrailerCallOption is a CallOption for collecting response trailer metadata.
// The metadata field will be populated *after* the RPC completes.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -242,7 +242,7 @@ func Peer(p *peer.Peer) CallOption {
// PeerCallOption is a CallOption for collecting the identity of the remote
// peer. The peer field will be populated *after* the RPC completes.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -282,7 +282,7 @@ func FailFast(failFast bool) CallOption {
// FailFastCallOption is a CallOption for indicating whether an RPC should fail
// fast or not.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -305,7 +305,7 @@ func MaxCallRecvMsgSize(bytes int) CallOption {
// MaxRecvMsgSizeCallOption is a CallOption that indicates the maximum message
// size in bytes the client can receive.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -328,7 +328,7 @@ func MaxCallSendMsgSize(bytes int) CallOption {
// MaxSendMsgSizeCallOption is a CallOption that indicates the maximum message
// size in bytes the client can send.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -351,7 +351,7 @@ func PerRPCCredentials(creds credentials.PerRPCCredentials) CallOption {
// PerRPCCredsCallOption is a CallOption that indicates the per-RPC
// credentials to use for the call.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -369,7 +369,7 @@ func (o PerRPCCredsCallOption) after(c *callInfo, attempt *csAttempt) {}
// sending the request. If WithCompressor is also set, UseCompressor has
// higher priority.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -379,7 +379,7 @@ func UseCompressor(name string) CallOption {
// CompressorCallOption is a CallOption that indicates the compressor to use.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -416,7 +416,7 @@ func CallContentSubtype(contentSubtype string) CallOption {
// ContentSubtypeCallOption is a CallOption that indicates the content-subtype
// used for marshaling messages.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -444,7 +444,7 @@ func (o ContentSubtypeCallOption) after(c *callInfo, attempt *csAttempt) {}
// This function is provided for advanced users; prefer to use only
// CallContentSubtype to select a registered codec instead.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -455,7 +455,7 @@ func ForceCodec(codec encoding.Codec) CallOption {
// ForceCodecCallOption is a CallOption that indicates the codec used for
// marshaling messages.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -480,7 +480,7 @@ func CallCustomCodec(codec Codec) CallOption {
// CustomCodecCallOption is a CallOption that indicates the codec used for
// marshaling messages.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -497,7 +497,7 @@ func (o CustomCodecCallOption) after(c *callInfo, attempt *csAttempt) {}
// MaxRetryRPCBufferSize returns a CallOption that limits the amount of memory
// used for buffering this RPC's requests for retry purposes.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -508,7 +508,7 @@ func MaxRetryRPCBufferSize(bytes int) CallOption {
// MaxRetryRPCBufferSizeCallOption is a CallOption indicating the amount of
// memory to be used for caching this RPC for retry purposes.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -548,10 +548,11 @@ type parser struct {
// format. The caller owns the returned msg memory.
//
// If there is an error, possible values are:
-// * io.EOF, when no messages remain
-// * io.ErrUnexpectedEOF
-// * of type transport.ConnectionError
-// * an error from the status package
+// - io.EOF, when no messages remain
+// - io.ErrUnexpectedEOF
+// - of type transport.ConnectionError
+// - an error from the status package
+//
// No other error values or types must be returned, which also means
// that the underlying io.Reader must not return an incompatible
// error.
diff --git a/test/performance/vendor/google.golang.org/grpc/server.go b/test/performance/vendor/google.golang.org/grpc/server.go
index b54f5bb57..f4dde72b4 100644
--- a/test/performance/vendor/google.golang.org/grpc/server.go
+++ b/test/performance/vendor/google.golang.org/grpc/server.go
@@ -73,12 +73,14 @@ func init() {
internal.DrainServerTransports = func(srv *Server, addr string) {
srv.drainServerTransports(addr)
}
- internal.AddExtraServerOptions = func(opt ...ServerOption) {
- extraServerOptions = opt
+ internal.AddGlobalServerOptions = func(opt ...ServerOption) {
+ extraServerOptions = append(extraServerOptions, opt...)
}
- internal.ClearExtraServerOptions = func() {
+ internal.ClearGlobalServerOptions = func() {
extraServerOptions = nil
}
+ internal.BinaryLogger = binaryLogger
+ internal.JoinServerOptions = newJoinServerOption
}
var statusOK = status.New(codes.OK, "")
@@ -155,6 +157,7 @@ type serverOptions struct {
streamInt StreamServerInterceptor
chainUnaryInts []UnaryServerInterceptor
chainStreamInts []StreamServerInterceptor
+ binaryLogger binarylog.Logger
inTapHandle tap.ServerInHandle
statsHandlers []stats.Handler
maxConcurrentStreams uint32
@@ -190,7 +193,7 @@ type ServerOption interface {
// EmptyServerOption does not alter the server configuration. It can be embedded
// in another structure to build custom server options.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -214,6 +217,22 @@ func newFuncServerOption(f func(*serverOptions)) *funcServerOption {
}
}
+// joinServerOption provides a way to combine arbitrary number of server
+// options into one.
+type joinServerOption struct {
+ opts []ServerOption
+}
+
+func (mdo *joinServerOption) apply(do *serverOptions) {
+ for _, opt := range mdo.opts {
+ opt.apply(do)
+ }
+}
+
+func newJoinServerOption(opts ...ServerOption) ServerOption {
+ return &joinServerOption{opts: opts}
+}
+
// WriteBufferSize determines how much data can be batched before doing a write on the wire.
// The corresponding memory allocation for this buffer will be twice the size to keep syscalls low.
// The default value for this buffer is 32KB.
@@ -305,7 +324,7 @@ func CustomCodec(codec Codec) ServerOption {
// https://github.com/grpc/grpc-go/blob/master/Documentation/encoding.md#using-a-codec.
// Will be supported throughout 1.x.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -426,7 +445,7 @@ func ChainStreamInterceptor(interceptors ...StreamServerInterceptor) ServerOptio
// InTapHandle returns a ServerOption that sets the tap handle for all the server
// transport to be created. Only one can be installed.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -442,10 +461,24 @@ func InTapHandle(h tap.ServerInHandle) ServerOption {
// StatsHandler returns a ServerOption that sets the stats handler for the server.
func StatsHandler(h stats.Handler) ServerOption {
return newFuncServerOption(func(o *serverOptions) {
+ if h == nil {
+ logger.Error("ignoring nil parameter in grpc.StatsHandler ServerOption")
+ // Do not allow a nil stats handler, which would otherwise cause
+ // panics.
+ return
+ }
o.statsHandlers = append(o.statsHandlers, h)
})
}
+// binaryLogger returns a ServerOption that can set the binary logger for the
+// server.
+func binaryLogger(bl binarylog.Logger) ServerOption {
+ return newFuncServerOption(func(o *serverOptions) {
+ o.binaryLogger = bl
+ })
+}
+
// UnknownServiceHandler returns a ServerOption that allows for adding a custom
// unknown service handler. The provided method is a bidi-streaming RPC service
// handler that will be invoked instead of returning the "unimplemented" gRPC
@@ -469,7 +502,7 @@ func UnknownServiceHandler(streamHandler StreamHandler) ServerOption {
// new connections. If this is not set, the default is 120 seconds. A zero or
// negative value will result in an immediate timeout.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -490,7 +523,7 @@ func MaxHeaderListSize(s uint32) ServerOption {
// HeaderTableSize returns a ServerOption that sets the size of dynamic
// header table for stream.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -505,7 +538,7 @@ func HeaderTableSize(s uint32) ServerOption {
// zero (default) will disable workers and spawn a new goroutine for each
// stream.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -898,7 +931,7 @@ func (s *Server) newHTTP2Transport(c net.Conn) transport.ServerTransport {
if err != credentials.ErrConnDispatched {
// Don't log on ErrConnDispatched and io.EOF to prevent log spam.
if err != io.EOF {
- channelz.Warning(logger, s.channelzID, "grpc: Server.Serve failed to create ServerTransport: ", err)
+ channelz.Info(logger, s.channelzID, "grpc: Server.Serve failed to create ServerTransport: ", err)
}
c.Close()
}
@@ -956,19 +989,19 @@ var _ http.Handler = (*Server)(nil)
// To share one port (such as 443 for https) between gRPC and an
// existing http.Handler, use a root http.Handler such as:
//
-// if r.ProtoMajor == 2 && strings.HasPrefix(
-// r.Header.Get("Content-Type"), "application/grpc") {
-// grpcServer.ServeHTTP(w, r)
-// } else {
-// yourMux.ServeHTTP(w, r)
-// }
+// if r.ProtoMajor == 2 && strings.HasPrefix(
+// r.Header.Get("Content-Type"), "application/grpc") {
+// grpcServer.ServeHTTP(w, r)
+// } else {
+// yourMux.ServeHTTP(w, r)
+// }
//
// Note that ServeHTTP uses Go's HTTP/2 server implementation which is totally
// separate from grpc-go's HTTP/2 server. Performance and features may vary
// between the two paths. ServeHTTP does not support some gRPC features
// available through grpc-go's HTTP/2 server.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -1193,9 +1226,16 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
}
}()
}
-
- binlog := binarylog.GetMethodLogger(stream.Method())
- if binlog != nil {
+ var binlogs []binarylog.MethodLogger
+ if ml := binarylog.GetMethodLogger(stream.Method()); ml != nil {
+ binlogs = append(binlogs, ml)
+ }
+ if s.opts.binaryLogger != nil {
+ if ml := s.opts.binaryLogger.GetMethodLogger(stream.Method()); ml != nil {
+ binlogs = append(binlogs, ml)
+ }
+ }
+ if len(binlogs) != 0 {
ctx := stream.Context()
md, _ := metadata.FromIncomingContext(ctx)
logEntry := &binarylog.ClientHeader{
@@ -1215,7 +1255,9 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
if peer, ok := peer.FromContext(ctx); ok {
logEntry.PeerAddr = peer.Addr
}
- binlog.Log(logEntry)
+ for _, binlog := range binlogs {
+ binlog.Log(logEntry)
+ }
}
// comp and cp are used for compression. decomp and dc are used for
@@ -1255,7 +1297,7 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
}
var payInfo *payloadInfo
- if len(shs) != 0 || binlog != nil {
+ if len(shs) != 0 || len(binlogs) != 0 {
payInfo = &payloadInfo{}
}
d, err := recvAndDecompress(&parser{r: stream}, stream, dc, s.opts.maxReceiveMessageSize, payInfo, decomp)
@@ -1281,10 +1323,13 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
Length: len(d),
})
}
- if binlog != nil {
- binlog.Log(&binarylog.ClientMessage{
+ if len(binlogs) != 0 {
+ cm := &binarylog.ClientMessage{
Message: d,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(cm)
+ }
}
if trInfo != nil {
trInfo.tr.LazyLog(&payload{sent: false, msg: v}, true)
@@ -1308,18 +1353,24 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
if e := t.WriteStatus(stream, appStatus); e != nil {
channelz.Warningf(logger, s.channelzID, "grpc: Server.processUnaryRPC failed to write status: %v", e)
}
- if binlog != nil {
+ if len(binlogs) != 0 {
if h, _ := stream.Header(); h.Len() > 0 {
// Only log serverHeader if there was header. Otherwise it can
// be trailer only.
- binlog.Log(&binarylog.ServerHeader{
+ sh := &binarylog.ServerHeader{
Header: h,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(sh)
+ }
}
- binlog.Log(&binarylog.ServerTrailer{
+ st := &binarylog.ServerTrailer{
Trailer: stream.Trailer(),
Err: appErr,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(st)
+ }
}
return appErr
}
@@ -1345,26 +1396,34 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
panic(fmt.Sprintf("grpc: Unexpected error (%T) from sendResponse: %v", st, st))
}
}
- if binlog != nil {
+ if len(binlogs) != 0 {
h, _ := stream.Header()
- binlog.Log(&binarylog.ServerHeader{
+ sh := &binarylog.ServerHeader{
Header: h,
- })
- binlog.Log(&binarylog.ServerTrailer{
+ }
+ st := &binarylog.ServerTrailer{
Trailer: stream.Trailer(),
Err: appErr,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(sh)
+ binlog.Log(st)
+ }
}
return err
}
- if binlog != nil {
+ if len(binlogs) != 0 {
h, _ := stream.Header()
- binlog.Log(&binarylog.ServerHeader{
+ sh := &binarylog.ServerHeader{
Header: h,
- })
- binlog.Log(&binarylog.ServerMessage{
+ }
+ sm := &binarylog.ServerMessage{
Message: reply,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(sh)
+ binlog.Log(sm)
+ }
}
if channelz.IsOn() {
t.IncrMsgSent()
@@ -1376,11 +1435,14 @@ func (s *Server) processUnaryRPC(t transport.ServerTransport, stream *transport.
// Should the logging be in WriteStatus? Should we ignore the WriteStatus
// error or allow the stats handler to see it?
err = t.WriteStatus(stream, statusOK)
- if binlog != nil {
- binlog.Log(&binarylog.ServerTrailer{
+ if len(binlogs) != 0 {
+ st := &binarylog.ServerTrailer{
Trailer: stream.Trailer(),
Err: appErr,
- })
+ }
+ for _, binlog := range binlogs {
+ binlog.Log(st)
+ }
}
return err
}
@@ -1493,8 +1555,15 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
}()
}
- ss.binlog = binarylog.GetMethodLogger(stream.Method())
- if ss.binlog != nil {
+ if ml := binarylog.GetMethodLogger(stream.Method()); ml != nil {
+ ss.binlogs = append(ss.binlogs, ml)
+ }
+ if s.opts.binaryLogger != nil {
+ if ml := s.opts.binaryLogger.GetMethodLogger(stream.Method()); ml != nil {
+ ss.binlogs = append(ss.binlogs, ml)
+ }
+ }
+ if len(ss.binlogs) != 0 {
md, _ := metadata.FromIncomingContext(ctx)
logEntry := &binarylog.ClientHeader{
Header: md,
@@ -1513,7 +1582,9 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
if peer, ok := peer.FromContext(ss.Context()); ok {
logEntry.PeerAddr = peer.Addr
}
- ss.binlog.Log(logEntry)
+ for _, binlog := range ss.binlogs {
+ binlog.Log(logEntry)
+ }
}
// If dc is set and matches the stream's compression, use it. Otherwise, try
@@ -1579,11 +1650,14 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
ss.mu.Unlock()
}
t.WriteStatus(ss.s, appStatus)
- if ss.binlog != nil {
- ss.binlog.Log(&binarylog.ServerTrailer{
+ if len(ss.binlogs) != 0 {
+ st := &binarylog.ServerTrailer{
Trailer: ss.s.Trailer(),
Err: appErr,
- })
+ }
+ for _, binlog := range ss.binlogs {
+ binlog.Log(st)
+ }
}
// TODO: Should we log an error from WriteStatus here and below?
return appErr
@@ -1594,11 +1668,14 @@ func (s *Server) processStreamingRPC(t transport.ServerTransport, stream *transp
ss.mu.Unlock()
}
err = t.WriteStatus(ss.s, statusOK)
- if ss.binlog != nil {
- ss.binlog.Log(&binarylog.ServerTrailer{
+ if len(ss.binlogs) != 0 {
+ st := &binarylog.ServerTrailer{
Trailer: ss.s.Trailer(),
Err: appErr,
- })
+ }
+ for _, binlog := range ss.binlogs {
+ binlog.Log(st)
+ }
}
return err
}
@@ -1674,7 +1751,7 @@ type streamKey struct{}
// NewContextWithServerTransportStream creates a new context from ctx and
// attaches stream to it.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -1689,7 +1766,7 @@ func NewContextWithServerTransportStream(ctx context.Context, stream ServerTrans
//
// See also NewContextWithServerTransportStream.
//
-// Experimental
+// # Experimental
//
// Notice: This type is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -1704,7 +1781,7 @@ type ServerTransportStream interface {
// ctx. Returns nil if the given context has no stream associated with it
// (which implies it is not an RPC invocation context).
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
@@ -1825,12 +1902,12 @@ func (s *Server) getCodec(contentSubtype string) baseCodec {
// When called multiple times, all the provided metadata will be merged. All
// the metadata will be sent out when one of the following happens:
//
-// - grpc.SendHeader is called, or for streaming handlers, stream.SendHeader.
-// - The first response message is sent. For unary handlers, this occurs when
-// the handler returns; for streaming handlers, this can happen when stream's
-// SendMsg method is called.
-// - An RPC status is sent out (error or success). This occurs when the handler
-// returns.
+// - grpc.SendHeader is called, or for streaming handlers, stream.SendHeader.
+// - The first response message is sent. For unary handlers, this occurs when
+// the handler returns; for streaming handlers, this can happen when stream's
+// SendMsg method is called.
+// - An RPC status is sent out (error or success). This occurs when the handler
+// returns.
//
// SetHeader will fail if called after any of the events above.
//
diff --git a/test/performance/vendor/google.golang.org/grpc/service_config.go b/test/performance/vendor/google.golang.org/grpc/service_config.go
index b01c548bb..01bbb2025 100644
--- a/test/performance/vendor/google.golang.org/grpc/service_config.go
+++ b/test/performance/vendor/google.golang.org/grpc/service_config.go
@@ -57,10 +57,9 @@ type lbConfig struct {
type ServiceConfig struct {
serviceconfig.Config
- // LB is the load balancer the service providers recommends. The balancer
- // specified via grpc.WithBalancerName will override this. This is deprecated;
- // lbConfigs is preferred. If lbConfig and LB are both present, lbConfig
- // will be used.
+ // LB is the load balancer the service providers recommends. This is
+ // deprecated; lbConfigs is preferred. If lbConfig and LB are both present,
+ // lbConfig will be used.
LB *string
// lbConfig is the service config's load balancing configuration. If
diff --git a/test/performance/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go b/test/performance/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go
index 73a2f9266..35e7a20a0 100644
--- a/test/performance/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go
+++ b/test/performance/vendor/google.golang.org/grpc/serviceconfig/serviceconfig.go
@@ -19,7 +19,7 @@
// Package serviceconfig defines types and methods for operating on gRPC
// service configs.
//
-// Experimental
+// # Experimental
//
// Notice: This package is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/test/performance/vendor/google.golang.org/grpc/status/status.go b/test/performance/vendor/google.golang.org/grpc/status/status.go
index 6d163b6e3..623be39f2 100644
--- a/test/performance/vendor/google.golang.org/grpc/status/status.go
+++ b/test/performance/vendor/google.golang.org/grpc/status/status.go
@@ -76,14 +76,14 @@ func FromProto(s *spb.Status) *Status {
// FromError returns a Status representation of err.
//
-// - If err was produced by this package or implements the method `GRPCStatus()
-// *Status`, the appropriate Status is returned.
+// - If err was produced by this package or implements the method `GRPCStatus()
+// *Status`, the appropriate Status is returned.
//
-// - If err is nil, a Status is returned with codes.OK and no message.
+// - If err is nil, a Status is returned with codes.OK and no message.
//
-// - Otherwise, err is an error not compatible with this package. In this
-// case, a Status is returned with codes.Unknown and err's Error() message,
-// and ok is false.
+// - Otherwise, err is an error not compatible with this package. In this
+// case, a Status is returned with codes.Unknown and err's Error() message,
+// and ok is false.
func FromError(err error) (s *Status, ok bool) {
if err == nil {
return nil, true
diff --git a/test/performance/vendor/google.golang.org/grpc/stream.go b/test/performance/vendor/google.golang.org/grpc/stream.go
index 6d82e0d7c..960c3e33d 100644
--- a/test/performance/vendor/google.golang.org/grpc/stream.go
+++ b/test/performance/vendor/google.golang.org/grpc/stream.go
@@ -39,6 +39,7 @@ import (
imetadata "google.golang.org/grpc/internal/metadata"
iresolver "google.golang.org/grpc/internal/resolver"
"google.golang.org/grpc/internal/serviceconfig"
+ istatus "google.golang.org/grpc/internal/status"
"google.golang.org/grpc/internal/transport"
"google.golang.org/grpc/metadata"
"google.golang.org/grpc/peer"
@@ -140,13 +141,13 @@ type ClientStream interface {
// To ensure resources are not leaked due to the stream returned, one of the following
// actions must be performed:
//
-// 1. Call Close on the ClientConn.
-// 2. Cancel the context provided.
-// 3. Call RecvMsg until a non-nil error is returned. A protobuf-generated
-// client-streaming RPC, for instance, might use the helper function
-// CloseAndRecv (note that CloseSend does not Recv, therefore is not
-// guaranteed to release all resources).
-// 4. Receive a non-nil, non-io.EOF error from Header or SendMsg.
+// 1. Call Close on the ClientConn.
+// 2. Cancel the context provided.
+// 3. Call RecvMsg until a non-nil error is returned. A protobuf-generated
+// client-streaming RPC, for instance, might use the helper function
+// CloseAndRecv (note that CloseSend does not Recv, therefore is not
+// guaranteed to release all resources).
+// 4. Receive a non-nil, non-io.EOF error from Header or SendMsg.
//
// If none of the above happen, a goroutine and a context will be leaked, and grpc
// will not call the optionally-configured stats handler with a stats.End message.
@@ -195,6 +196,13 @@ func newClientStream(ctx context.Context, desc *StreamDesc, cc *ClientConn, meth
rpcInfo := iresolver.RPCInfo{Context: ctx, Method: method}
rpcConfig, err := cc.safeConfigSelector.SelectConfig(rpcInfo)
if err != nil {
+ if st, ok := status.FromError(err); ok {
+ // Restrict the code to the list allowed by gRFC A54.
+ if istatus.IsRestrictedControlPlaneCode(st) {
+ err = status.Errorf(codes.Internal, "config selector returned illegal status: %v", err)
+ }
+ return nil, err
+ }
return nil, toRPCErr(err)
}
@@ -301,12 +309,13 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
if !cc.dopts.disableRetry {
cs.retryThrottler = cc.retryThrottler.Load().(*retryThrottler)
}
- cs.binlog = binarylog.GetMethodLogger(method)
-
- cs.attempt, err = cs.newAttemptLocked(false /* isTransparent */)
- if err != nil {
- cs.finish(err)
- return nil, err
+ if ml := binarylog.GetMethodLogger(method); ml != nil {
+ cs.binlogs = append(cs.binlogs, ml)
+ }
+ if cc.dopts.binaryLogger != nil {
+ if ml := cc.dopts.binaryLogger.GetMethodLogger(method); ml != nil {
+ cs.binlogs = append(cs.binlogs, ml)
+ }
}
// Pick the transport to use and create a new stream on the transport.
@@ -328,7 +337,7 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
return nil, err
}
- if cs.binlog != nil {
+ if len(cs.binlogs) != 0 {
md, _ := metadata.FromOutgoingContext(ctx)
logEntry := &binarylog.ClientHeader{
OnClientSide: true,
@@ -342,7 +351,9 @@ func newClientStreamWithParams(ctx context.Context, desc *StreamDesc, cc *Client
logEntry.Timeout = 0
}
}
- cs.binlog.Log(logEntry)
+ for _, binlog := range cs.binlogs {
+ binlog.Log(logEntry)
+ }
}
if desc != unaryStreamDesc {
@@ -486,7 +497,7 @@ type clientStream struct {
retryThrottler *retryThrottler // The throttler active when the RPC began.
- binlog binarylog.MethodLogger // Binary logger, can be nil.
+ binlogs []binarylog.MethodLogger
// serverHeaderBinlogged is a boolean for whether server header has been
// logged. Server header will be logged when the first time one of those
// happens: stream.Header(), stream.Recv().
@@ -704,6 +715,18 @@ func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func())
// already be status errors.
return toRPCErr(op(cs.attempt))
}
+ if len(cs.buffer) == 0 {
+ // For the first op, which controls creation of the stream and
+ // assigns cs.attempt, we need to create a new attempt inline
+ // before executing the first op. On subsequent ops, the attempt
+ // is created immediately before replaying the ops.
+ var err error
+ if cs.attempt, err = cs.newAttemptLocked(false /* isTransparent */); err != nil {
+ cs.mu.Unlock()
+ cs.finish(err)
+ return err
+ }
+ }
a := cs.attempt
cs.mu.Unlock()
err := op(a)
@@ -729,17 +752,25 @@ func (cs *clientStream) withRetry(op func(a *csAttempt) error, onSuccess func())
func (cs *clientStream) Header() (metadata.MD, error) {
var m metadata.MD
+ noHeader := false
err := cs.withRetry(func(a *csAttempt) error {
var err error
m, err = a.s.Header()
+ if err == transport.ErrNoHeaders {
+ noHeader = true
+ return nil
+ }
return toRPCErr(err)
}, cs.commitAttemptLocked)
+
if err != nil {
cs.finish(err)
return nil, err
}
- if cs.binlog != nil && !cs.serverHeaderBinlogged {
- // Only log if binary log is on and header has not been logged.
+
+ if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged && !noHeader {
+ // Only log if binary log is on and header has not been logged, and
+ // there is actually headers to log.
logEntry := &binarylog.ServerHeader{
OnClientSide: true,
Header: m,
@@ -748,8 +779,10 @@ func (cs *clientStream) Header() (metadata.MD, error) {
if peer, ok := peer.FromContext(cs.Context()); ok {
logEntry.PeerAddr = peer.Addr
}
- cs.binlog.Log(logEntry)
cs.serverHeaderBinlogged = true
+ for _, binlog := range cs.binlogs {
+ binlog.Log(logEntry)
+ }
}
return m, nil
}
@@ -823,38 +856,44 @@ func (cs *clientStream) SendMsg(m interface{}) (err error) {
return a.sendMsg(m, hdr, payload, data)
}
err = cs.withRetry(op, func() { cs.bufferForRetryLocked(len(hdr)+len(payload), op) })
- if cs.binlog != nil && err == nil {
- cs.binlog.Log(&binarylog.ClientMessage{
+ if len(cs.binlogs) != 0 && err == nil {
+ cm := &binarylog.ClientMessage{
OnClientSide: true,
Message: data,
- })
+ }
+ for _, binlog := range cs.binlogs {
+ binlog.Log(cm)
+ }
}
return err
}
func (cs *clientStream) RecvMsg(m interface{}) error {
- if cs.binlog != nil && !cs.serverHeaderBinlogged {
+ if len(cs.binlogs) != 0 && !cs.serverHeaderBinlogged {
// Call Header() to binary log header if it's not already logged.
cs.Header()
}
var recvInfo *payloadInfo
- if cs.binlog != nil {
+ if len(cs.binlogs) != 0 {
recvInfo = &payloadInfo{}
}
err := cs.withRetry(func(a *csAttempt) error {
return a.recvMsg(m, recvInfo)
}, cs.commitAttemptLocked)
- if cs.binlog != nil && err == nil {
- cs.binlog.Log(&binarylog.ServerMessage{
+ if len(cs.binlogs) != 0 && err == nil {
+ sm := &binarylog.ServerMessage{
OnClientSide: true,
Message: recvInfo.uncompressedBytes,
- })
+ }
+ for _, binlog := range cs.binlogs {
+ binlog.Log(sm)
+ }
}
if err != nil || !cs.desc.ServerStreams {
// err != nil or non-server-streaming indicates end of stream.
cs.finish(err)
- if cs.binlog != nil {
+ if len(cs.binlogs) != 0 {
// finish will not log Trailer. Log Trailer here.
logEntry := &binarylog.ServerTrailer{
OnClientSide: true,
@@ -867,7 +906,9 @@ func (cs *clientStream) RecvMsg(m interface{}) error {
if peer, ok := peer.FromContext(cs.Context()); ok {
logEntry.PeerAddr = peer.Addr
}
- cs.binlog.Log(logEntry)
+ for _, binlog := range cs.binlogs {
+ binlog.Log(logEntry)
+ }
}
}
return err
@@ -888,10 +929,13 @@ func (cs *clientStream) CloseSend() error {
return nil
}
cs.withRetry(op, func() { cs.bufferForRetryLocked(0, op) })
- if cs.binlog != nil {
- cs.binlog.Log(&binarylog.ClientHalfClose{
+ if len(cs.binlogs) != 0 {
+ chc := &binarylog.ClientHalfClose{
OnClientSide: true,
- })
+ }
+ for _, binlog := range cs.binlogs {
+ binlog.Log(chc)
+ }
}
// We never returned an error here for reasons.
return nil
@@ -924,10 +968,13 @@ func (cs *clientStream) finish(err error) {
//
// Only one of cancel or trailer needs to be logged. In the cases where
// users don't call RecvMsg, users must have already canceled the RPC.
- if cs.binlog != nil && status.Code(err) == codes.Canceled {
- cs.binlog.Log(&binarylog.Cancel{
+ if len(cs.binlogs) != 0 && status.Code(err) == codes.Canceled {
+ c := &binarylog.Cancel{
OnClientSide: true,
- })
+ }
+ for _, binlog := range cs.binlogs {
+ binlog.Log(c)
+ }
}
if err == nil {
cs.retryThrottler.successfulRPC()
@@ -999,6 +1046,7 @@ func (a *csAttempt) recvMsg(m interface{}, payInfo *payloadInfo) (err error) {
}
return io.EOF // indicates successful end of stream.
}
+
return toRPCErr(err)
}
if a.trInfo != nil {
@@ -1447,7 +1495,7 @@ type serverStream struct {
statsHandler []stats.Handler
- binlog binarylog.MethodLogger
+ binlogs []binarylog.MethodLogger
// serverHeaderBinlogged indicates whether server header has been logged. It
// will happen when one of the following two happens: stream.SendHeader(),
// stream.Send().
@@ -1481,12 +1529,15 @@ func (ss *serverStream) SendHeader(md metadata.MD) error {
}
err = ss.t.WriteHeader(ss.s, md)
- if ss.binlog != nil && !ss.serverHeaderBinlogged {
+ if len(ss.binlogs) != 0 && !ss.serverHeaderBinlogged {
h, _ := ss.s.Header()
- ss.binlog.Log(&binarylog.ServerHeader{
+ sh := &binarylog.ServerHeader{
Header: h,
- })
+ }
ss.serverHeaderBinlogged = true
+ for _, binlog := range ss.binlogs {
+ binlog.Log(sh)
+ }
}
return err
}
@@ -1543,17 +1594,23 @@ func (ss *serverStream) SendMsg(m interface{}) (err error) {
if err := ss.t.Write(ss.s, hdr, payload, &transport.Options{Last: false}); err != nil {
return toRPCErr(err)
}
- if ss.binlog != nil {
+ if len(ss.binlogs) != 0 {
if !ss.serverHeaderBinlogged {
h, _ := ss.s.Header()
- ss.binlog.Log(&binarylog.ServerHeader{
+ sh := &binarylog.ServerHeader{
Header: h,
- })
+ }
ss.serverHeaderBinlogged = true
+ for _, binlog := range ss.binlogs {
+ binlog.Log(sh)
+ }
}
- ss.binlog.Log(&binarylog.ServerMessage{
+ sm := &binarylog.ServerMessage{
Message: data,
- })
+ }
+ for _, binlog := range ss.binlogs {
+ binlog.Log(sm)
+ }
}
if len(ss.statsHandler) != 0 {
for _, sh := range ss.statsHandler {
@@ -1592,13 +1649,16 @@ func (ss *serverStream) RecvMsg(m interface{}) (err error) {
}
}()
var payInfo *payloadInfo
- if len(ss.statsHandler) != 0 || ss.binlog != nil {
+ if len(ss.statsHandler) != 0 || len(ss.binlogs) != 0 {
payInfo = &payloadInfo{}
}
if err := recv(ss.p, ss.codec, ss.s, ss.dc, m, ss.maxReceiveMessageSize, payInfo, ss.decomp); err != nil {
if err == io.EOF {
- if ss.binlog != nil {
- ss.binlog.Log(&binarylog.ClientHalfClose{})
+ if len(ss.binlogs) != 0 {
+ chc := &binarylog.ClientHalfClose{}
+ for _, binlog := range ss.binlogs {
+ binlog.Log(chc)
+ }
}
return err
}
@@ -1619,10 +1679,13 @@ func (ss *serverStream) RecvMsg(m interface{}) (err error) {
})
}
}
- if ss.binlog != nil {
- ss.binlog.Log(&binarylog.ClientMessage{
+ if len(ss.binlogs) != 0 {
+ cm := &binarylog.ClientMessage{
Message: payInfo.uncompressedBytes,
- })
+ }
+ for _, binlog := range ss.binlogs {
+ binlog.Log(cm)
+ }
}
return nil
}
diff --git a/test/performance/vendor/google.golang.org/grpc/tap/tap.go b/test/performance/vendor/google.golang.org/grpc/tap/tap.go
index dbf34e6bb..bfa5dfa40 100644
--- a/test/performance/vendor/google.golang.org/grpc/tap/tap.go
+++ b/test/performance/vendor/google.golang.org/grpc/tap/tap.go
@@ -19,7 +19,7 @@
// Package tap defines the function handles which are executed on the transport
// layer of gRPC-Go and related information.
//
-// Experimental
+// # Experimental
//
// Notice: This API is EXPERIMENTAL and may be changed or removed in a
// later release.
diff --git a/test/performance/vendor/google.golang.org/grpc/version.go b/test/performance/vendor/google.golang.org/grpc/version.go
index 0eb2998cb..2198e7098 100644
--- a/test/performance/vendor/google.golang.org/grpc/version.go
+++ b/test/performance/vendor/google.golang.org/grpc/version.go
@@ -19,4 +19,4 @@
package grpc
// Version is the current grpc version.
-const Version = "1.48.0"
+const Version = "1.51.0"
diff --git a/test/performance/vendor/google.golang.org/grpc/vet.sh b/test/performance/vendor/google.golang.org/grpc/vet.sh
index ceb436c6c..bd8e0cdb3 100644
--- a/test/performance/vendor/google.golang.org/grpc/vet.sh
+++ b/test/performance/vendor/google.golang.org/grpc/vet.sh
@@ -67,7 +67,9 @@ elif [[ "$#" -ne 0 ]]; then
fi
# - Ensure all source files contain a copyright message.
-not git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)\|DO NOT EDIT" -- '*.go'
+# (Done in two parts because Darwin "git grep" has broken support for compound
+# exclusion matches.)
+(grep -L "DO NOT EDIT" $(git grep -L "\(Copyright [0-9]\{4,\} gRPC authors\)" -- '*.go') || true) | fail_on_output
# - Make sure all tests in grpc and grpc/test use leakcheck via Teardown.
not grep 'func Test[^(]' *_test.go
@@ -81,7 +83,7 @@ not git grep -l 'x/net/context' -- "*.go"
git grep -l '"math/rand"' -- "*.go" 2>&1 | not grep -v '^examples\|^stress\|grpcrand\|^benchmark\|wrr_test'
# - Do not call grpclog directly. Use grpclog.Component instead.
-git grep -l 'grpclog.I\|grpclog.W\|grpclog.E\|grpclog.F\|grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go'
+git grep -l -e 'grpclog.I' --or -e 'grpclog.W' --or -e 'grpclog.E' --or -e 'grpclog.F' --or -e 'grpclog.V' -- "*.go" | not grep -v '^grpclog/component.go\|^internal/grpctest/tlogger_test.go'
# - Ensure all ptypes proto packages are renamed when importing.
not git grep "\(import \|^\s*\)\"github.com/golang/protobuf/ptypes/" -- "*.go"
@@ -147,7 +149,6 @@ grpc.NewGZIPDecompressor
grpc.RPCCompressor
grpc.RPCDecompressor
grpc.ServiceConfig
-grpc.WithBalancerName
grpc.WithCompressor
grpc.WithDecompressor
grpc.WithDialer
diff --git a/test/performance/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go b/test/performance/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
index c85f84694..6c37d4174 100644
--- a/test/performance/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
+++ b/test/performance/vendor/google.golang.org/protobuf/encoding/protojson/well_known_types.go
@@ -814,16 +814,22 @@ func (d decoder) unmarshalTimestamp(m protoreflect.Message) error {
return d.unexpectedTokenError(tok)
}
- t, err := time.Parse(time.RFC3339Nano, tok.ParsedString())
+ s := tok.ParsedString()
+ t, err := time.Parse(time.RFC3339Nano, s)
if err != nil {
return d.newError(tok.Pos(), "invalid %v value %v", genid.Timestamp_message_fullname, tok.RawString())
}
- // Validate seconds. No need to validate nanos because time.Parse would have
- // covered that already.
+ // Validate seconds.
secs := t.Unix()
if secs < minTimestampSeconds || secs > maxTimestampSeconds {
return d.newError(tok.Pos(), "%v value out of range: %v", genid.Timestamp_message_fullname, tok.RawString())
}
+ // Validate subseconds.
+ i := strings.LastIndexByte(s, '.') // start of subsecond field
+ j := strings.LastIndexAny(s, "Z-+") // start of timezone field
+ if i >= 0 && j >= i && j-i > len(".999999999") {
+ return d.newError(tok.Pos(), "invalid %v value %v", genid.Timestamp_message_fullname, tok.RawString())
+ }
fds := m.Descriptor().Fields()
fdSeconds := fds.ByNumber(genid.Timestamp_Seconds_field_number)
diff --git a/test/performance/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go b/test/performance/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
index e3cdf1c20..e7e65f509 100644
--- a/test/performance/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
+++ b/test/performance/vendor/google.golang.org/protobuf/internal/genid/descriptor_gen.go
@@ -528,6 +528,7 @@ const (
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_UninterpretedOption_field_name protoreflect.Name = "uninterpreted_option"
@@ -536,6 +537,7 @@ const (
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_UninterpretedOption_field_fullname protoreflect.FullName = "google.protobuf.FieldOptions.uninterpreted_option"
@@ -547,6 +549,7 @@ const (
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_UninterpretedOption_field_number protoreflect.FieldNumber = 999
diff --git a/test/performance/vendor/google.golang.org/protobuf/internal/version/version.go b/test/performance/vendor/google.golang.org/protobuf/internal/version/version.go
index b480c5010..6c25e588e 100644
--- a/test/performance/vendor/google.golang.org/protobuf/internal/version/version.go
+++ b/test/performance/vendor/google.golang.org/protobuf/internal/version/version.go
@@ -53,7 +53,7 @@ const (
Major = 1
Minor = 28
Patch = 1
- PreRelease = ""
+ PreRelease = "devel"
)
// String formats the version string for this module in semver format.
diff --git a/test/performance/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go b/test/performance/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
index b03c1223c..74d0ce9b2 100644
--- a/test/performance/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
+++ b/test/performance/vendor/google.golang.org/protobuf/reflect/protoreflect/source_gen.go
@@ -345,6 +345,8 @@ func (p *SourcePath) appendFieldOptions(b []byte) []byte {
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:
diff --git a/test/performance/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go b/test/performance/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
index abe4ab511..c62f27ad0 100644
--- a/test/performance/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
+++ b/test/performance/vendor/google.golang.org/protobuf/types/descriptorpb/descriptor.pb.go
@@ -860,7 +860,6 @@ type FieldDescriptorProto struct {
// 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.
- // TODO(kenton): Base-64 encode?
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.
@@ -1382,16 +1381,16 @@ type FileOptions struct {
// 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"`
- // If set, all the classes from the .proto file are wrapped in a single
- // outer class with the given name. This applies to both Proto1
- // (equivalent to the old "--one_java_file" option) and Proto2 (where
- // a .proto always translates to a single class, but you may want to
- // explicitly choose the class name).
+ // 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 set true, then the Java code generator will generate a separate .java
+ // 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 outer class
- // named by java_outer_classname. However, the outer class will still be
+ // 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"`
@@ -1849,7 +1848,17 @@ type FieldOptions struct {
// 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 2021, lazy does no correctness checks on the byte stream during
+ // parsing. This may lead to crashes if and when an invalid byte stream is
+ // finally parsed upon access.
+ //
+ // TODO(b/211906113): Enable validation on lazy fields.
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
@@ -1863,11 +1872,12 @@ type FieldOptions struct {
// Default values for FieldOptions fields.
const (
- Default_FieldOptions_Ctype = FieldOptions_STRING
- Default_FieldOptions_Jstype = FieldOptions_JS_NORMAL
- Default_FieldOptions_Lazy = bool(false)
- Default_FieldOptions_Deprecated = bool(false)
- Default_FieldOptions_Weak = bool(false)
+ 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)
)
func (x *FieldOptions) Reset() {
@@ -1930,6 +1940,13 @@ func (x *FieldOptions) GetLazy() bool {
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
@@ -2715,8 +2732,8 @@ func (x *EnumDescriptorProto_EnumReservedRange) GetEnd() int32 {
// 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], ["qux", false] } represents
-// "foo.(bar.baz).qux".
+// E.g.,{ ["foo", false], ["bar.baz", true], ["moo", false] } represents
+// "foo.(bar.baz).moo".
type UninterpretedOption_NamePart struct {
state protoimpl.MessageState
sizeCache protoimpl.SizeCache
@@ -2781,8 +2798,8 @@ type SourceCodeInfo_Location struct {
// location.
//
// Each element is a field number or an index. They form a path from
- // the root FileDescriptorProto to the place where the definition. For
- // example, this path:
+ // 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
@@ -2834,13 +2851,13 @@ type SourceCodeInfo_Location struct {
// // Comment attached to baz.
// // Another line attached to baz.
//
- // // Comment attached to qux.
+ // // Comment attached to moo.
// //
- // // Another line attached to qux.
- // optional double qux = 4;
+ // // Another line attached to moo.
+ // optional double moo = 4;
//
// // Detached comment for corge. This is not leading or trailing comments
- // // to qux or corge because there are blank lines separating it from
+ // // to moo or corge because there are blank lines separating it from
// // both.
//
// // Detached comment for corge paragraph 2.
@@ -3304,7 +3321,7 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{
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, 0xd1, 0x02, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70,
+ 0x10, 0x27, 0x22, 0xe3, 0x02, 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,
@@ -3324,166 +3341,170 @@ var file_google_protobuf_descriptor_proto_rawDesc = []byte{
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, 0x08, 0x10, 0x09,
- 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x22, 0xe2, 0x03, 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, 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, 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, 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, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10,
- 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x73, 0x0a, 0x0c, 0x4f,
- 0x6e, 0x65, 0x6f, 0x66, 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, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02,
- 0x22, 0xc0, 0x01, 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, 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, 0x9e, 0x01, 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,
+ 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, 0x92, 0x04, 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,
- 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, 0x9c, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 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, 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, 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, 0x2a, 0x09, 0x08, 0xe8,
+ 0x07, 0x10, 0x80, 0x80, 0x80, 0x80, 0x02, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x22, 0x73, 0x0a,
+ 0x0c, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 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, 0x2a, 0x09, 0x08, 0xe8, 0x07, 0x10, 0x80, 0x80, 0x80,
+ 0x80, 0x02, 0x22, 0xc0, 0x01, 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, 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, 0x9e, 0x01, 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, 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, 0x9c, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 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, 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, 0xe0, 0x02, 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, 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, 0xe0, 0x02, 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,
+ 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, 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,
- 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,
+ 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, 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, 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, 0xd1, 0x01,
- 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, 0x6d, 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, 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,
+ 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, 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,
+ 0xd1, 0x01, 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, 0x6d, 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, 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 (
diff --git a/test/performance/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go b/test/performance/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
index 8c10797b9..cc8449757 100644
--- a/test/performance/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
+++ b/test/performance/vendor/google.golang.org/protobuf/types/known/anypb/any.pb.go
@@ -153,7 +153,7 @@ import (
// foo = any.unpack(Foo.class);
// }
//
-// Example 3: Pack and unpack a message in Python.
+// Example 3: Pack and unpack a message in Python.
//
// foo = Foo(...)
// any = Any()
@@ -163,7 +163,7 @@ import (
// any.Unpack(foo)
// ...
//
-// Example 4: Pack and unpack a message in Go
+// Example 4: Pack and unpack a message in Go
//
// foo := &pb.Foo{...}
// any, err := anypb.New(foo)
@@ -184,7 +184,7 @@ import (
//
//
// JSON
-// ====
+//
// The JSON representation of an `Any` value uses the regular
// representation of the deserialized, embedded message, with an
// additional field `@type` which contains the type URL. Example:
diff --git a/test/performance/vendor/modules.txt b/test/performance/vendor/modules.txt
index 38b0e816d..4354183dc 100644
--- a/test/performance/vendor/modules.txt
+++ b/test/performance/vendor/modules.txt
@@ -32,7 +32,7 @@ github.com/golang/protobuf/ptypes
github.com/golang/protobuf/ptypes/any
github.com/golang/protobuf/ptypes/duration
github.com/golang/protobuf/ptypes/timestamp
-# github.com/google/go-cmp v0.5.8
+# github.com/google/go-cmp v0.5.9
## explicit; go 1.13
github.com/google/go-cmp/cmp
github.com/google/go-cmp/cmp/internal/diff
@@ -60,14 +60,14 @@ github.com/hashicorp/hcl/hcl/token
github.com/hashicorp/hcl/json/parser
github.com/hashicorp/hcl/json/scanner
github.com/hashicorp/hcl/json/token
-# github.com/inconshreveable/mousetrap v1.0.1
+# github.com/inconshreveable/mousetrap v1.1.0
## explicit; go 1.18
github.com/inconshreveable/mousetrap
# github.com/kelseyhightower/envconfig v1.4.0
## explicit
github.com/kelseyhightower/envconfig
-# github.com/klauspost/compress v1.15.9
-## explicit; go 1.16
+# github.com/klauspost/compress v1.15.13
+## explicit; go 1.17
github.com/klauspost/compress/s2
# github.com/klauspost/cpuid/v2 v2.1.0
## explicit; go 1.15
@@ -243,7 +243,7 @@ github.com/spf13/afero/mem
# github.com/spf13/cast v1.5.0
## explicit; go 1.18
github.com/spf13/cast
-# github.com/spf13/cobra v1.5.0
+# github.com/spf13/cobra v1.6.1
## explicit; go 1.15
github.com/spf13/cobra
# github.com/spf13/jwalterweatherman v1.1.0
@@ -263,10 +263,10 @@ github.com/spf13/viper/internal/encoding/javaproperties
github.com/spf13/viper/internal/encoding/json
github.com/spf13/viper/internal/encoding/toml
github.com/spf13/viper/internal/encoding/yaml
-# github.com/stretchr/objx v0.4.0
+# github.com/stretchr/objx v0.5.0
## explicit; go 1.12
github.com/stretchr/objx
-# github.com/stretchr/testify v1.8.0
+# github.com/stretchr/testify v1.8.1
## explicit; go 1.13
github.com/stretchr/testify/assert
github.com/stretchr/testify/mock
@@ -289,8 +289,8 @@ github.com/vardius/message-bus
# github.com/yusufpapurcu/wmi v1.2.2
## explicit; go 1.16
github.com/yusufpapurcu/wmi
-# go.uber.org/atomic v1.9.0
-## explicit; go 1.13
+# go.uber.org/atomic v1.10.0
+## explicit; go 1.18
go.uber.org/atomic
# golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa
## explicit; go 1.17
@@ -302,7 +302,7 @@ golang.org/x/crypto/ed25519
golang.org/x/crypto/internal/poly1305
golang.org/x/crypto/internal/subtle
golang.org/x/crypto/ocsp
-# golang.org/x/net v0.0.0-20220805013720-a33c5aa5df48
+# golang.org/x/net v0.4.0
## explicit; go 1.17
golang.org/x/net/http/httpguts
golang.org/x/net/http2
@@ -310,10 +310,10 @@ golang.org/x/net/http2/hpack
golang.org/x/net/idna
golang.org/x/net/internal/timeseries
golang.org/x/net/trace
-# golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4
+# golang.org/x/sync v0.1.0
## explicit
golang.org/x/sync/errgroup
-# golang.org/x/sys v0.0.0-20220804214406-8e32c043e418
+# golang.org/x/sys v0.3.0
## explicit; go 1.17
golang.org/x/sys/cpu
golang.org/x/sys/internal/unsafeheader
@@ -323,7 +323,7 @@ golang.org/x/sys/windows/registry
golang.org/x/sys/windows/svc
golang.org/x/sys/windows/svc/eventlog
golang.org/x/sys/windows/svc/mgr
-# golang.org/x/text v0.4.0
+# golang.org/x/text v0.5.0
## explicit; go 1.17
golang.org/x/text/runes
golang.org/x/text/secure/bidirule
@@ -333,11 +333,11 @@ golang.org/x/text/unicode/norm
# golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9
## explicit
golang.org/x/time/rate
-# google.golang.org/genproto v0.0.0-20220805133916-01dd62135a58
-## explicit; go 1.18
+# google.golang.org/genproto v0.0.0-20221207170731-23e4bf6bdc37
+## explicit; go 1.19
google.golang.org/genproto/googleapis/rpc/status
-# google.golang.org/grpc v1.48.0
-## explicit; go 1.14
+# google.golang.org/grpc v1.51.0
+## explicit; go 1.17
google.golang.org/grpc
google.golang.org/grpc/attributes
google.golang.org/grpc/backoff
@@ -386,7 +386,7 @@ google.golang.org/grpc/serviceconfig
google.golang.org/grpc/stats
google.golang.org/grpc/status
google.golang.org/grpc/tap
-# google.golang.org/protobuf v1.28.1
+# google.golang.org/protobuf v1.28.2-0.20220831092852-f930b1dc76e8
## explicit; go 1.11
google.golang.org/protobuf/encoding/protojson
google.golang.org/protobuf/encoding/prototext
diff --git a/vendor/github.com/Azure/go-ansiterm/LICENSE b/vendor/github.com/Azure/go-ansiterm/LICENSE
new file mode 100644
index 000000000..e3d9a64d1
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/LICENSE
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Microsoft Corporation
+
+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/Azure/go-ansiterm/README.md b/vendor/github.com/Azure/go-ansiterm/README.md
new file mode 100644
index 000000000..261c041e7
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/README.md
@@ -0,0 +1,12 @@
+# go-ansiterm
+
+This is a cross platform Ansi Terminal Emulation library. It reads a stream of Ansi characters and produces the appropriate function calls. The results of the function calls are platform dependent.
+
+For example the parser might receive "ESC, [, A" as a stream of three characters. This is the code for Cursor Up (http://www.vt100.net/docs/vt510-rm/CUU). The parser then calls the cursor up function (CUU()) on an event handler. The event handler determines what platform specific work must be done to cause the cursor to move up one position.
+
+The parser (parser.go) is a partial implementation of this state machine (http://vt100.net/emu/vt500_parser.png). There are also two event handler implementations, one for tests (test_event_handler.go) to validate that the expected events are being produced and called, the other is a Windows implementation (winterm/win_event_handler.go).
+
+See parser_test.go for examples exercising the state machine and generating appropriate function calls.
+
+-----
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
diff --git a/vendor/github.com/Azure/go-ansiterm/constants.go b/vendor/github.com/Azure/go-ansiterm/constants.go
new file mode 100644
index 000000000..96504a33b
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/constants.go
@@ -0,0 +1,188 @@
+package ansiterm
+
+const LogEnv = "DEBUG_TERMINAL"
+
+// ANSI constants
+// References:
+// -- http://www.ecma-international.org/publications/standards/Ecma-048.htm
+// -- http://man7.org/linux/man-pages/man4/console_codes.4.html
+// -- http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html
+// -- http://en.wikipedia.org/wiki/ANSI_escape_code
+// -- http://vt100.net/emu/dec_ansi_parser
+// -- http://vt100.net/emu/vt500_parser.svg
+// -- http://invisible-island.net/xterm/ctlseqs/ctlseqs.html
+// -- http://www.inwap.com/pdp10/ansicode.txt
+const (
+ // ECMA-48 Set Graphics Rendition
+ // Note:
+ // -- Constants leading with an underscore (e.g., _ANSI_xxx) are unsupported or reserved
+ // -- Fonts could possibly be supported via SetCurrentConsoleFontEx
+ // -- Windows does not expose the per-window cursor (i.e., caret) blink times
+ ANSI_SGR_RESET = 0
+ ANSI_SGR_BOLD = 1
+ ANSI_SGR_DIM = 2
+ _ANSI_SGR_ITALIC = 3
+ ANSI_SGR_UNDERLINE = 4
+ _ANSI_SGR_BLINKSLOW = 5
+ _ANSI_SGR_BLINKFAST = 6
+ ANSI_SGR_REVERSE = 7
+ _ANSI_SGR_INVISIBLE = 8
+ _ANSI_SGR_LINETHROUGH = 9
+ _ANSI_SGR_FONT_00 = 10
+ _ANSI_SGR_FONT_01 = 11
+ _ANSI_SGR_FONT_02 = 12
+ _ANSI_SGR_FONT_03 = 13
+ _ANSI_SGR_FONT_04 = 14
+ _ANSI_SGR_FONT_05 = 15
+ _ANSI_SGR_FONT_06 = 16
+ _ANSI_SGR_FONT_07 = 17
+ _ANSI_SGR_FONT_08 = 18
+ _ANSI_SGR_FONT_09 = 19
+ _ANSI_SGR_FONT_10 = 20
+ _ANSI_SGR_DOUBLEUNDERLINE = 21
+ ANSI_SGR_BOLD_DIM_OFF = 22
+ _ANSI_SGR_ITALIC_OFF = 23
+ ANSI_SGR_UNDERLINE_OFF = 24
+ _ANSI_SGR_BLINK_OFF = 25
+ _ANSI_SGR_RESERVED_00 = 26
+ ANSI_SGR_REVERSE_OFF = 27
+ _ANSI_SGR_INVISIBLE_OFF = 28
+ _ANSI_SGR_LINETHROUGH_OFF = 29
+ ANSI_SGR_FOREGROUND_BLACK = 30
+ ANSI_SGR_FOREGROUND_RED = 31
+ ANSI_SGR_FOREGROUND_GREEN = 32
+ ANSI_SGR_FOREGROUND_YELLOW = 33
+ ANSI_SGR_FOREGROUND_BLUE = 34
+ ANSI_SGR_FOREGROUND_MAGENTA = 35
+ ANSI_SGR_FOREGROUND_CYAN = 36
+ ANSI_SGR_FOREGROUND_WHITE = 37
+ _ANSI_SGR_RESERVED_01 = 38
+ ANSI_SGR_FOREGROUND_DEFAULT = 39
+ ANSI_SGR_BACKGROUND_BLACK = 40
+ ANSI_SGR_BACKGROUND_RED = 41
+ ANSI_SGR_BACKGROUND_GREEN = 42
+ ANSI_SGR_BACKGROUND_YELLOW = 43
+ ANSI_SGR_BACKGROUND_BLUE = 44
+ ANSI_SGR_BACKGROUND_MAGENTA = 45
+ ANSI_SGR_BACKGROUND_CYAN = 46
+ ANSI_SGR_BACKGROUND_WHITE = 47
+ _ANSI_SGR_RESERVED_02 = 48
+ ANSI_SGR_BACKGROUND_DEFAULT = 49
+ // 50 - 65: Unsupported
+
+ ANSI_MAX_CMD_LENGTH = 4096
+
+ MAX_INPUT_EVENTS = 128
+ DEFAULT_WIDTH = 80
+ DEFAULT_HEIGHT = 24
+
+ ANSI_BEL = 0x07
+ ANSI_BACKSPACE = 0x08
+ ANSI_TAB = 0x09
+ ANSI_LINE_FEED = 0x0A
+ ANSI_VERTICAL_TAB = 0x0B
+ ANSI_FORM_FEED = 0x0C
+ ANSI_CARRIAGE_RETURN = 0x0D
+ ANSI_ESCAPE_PRIMARY = 0x1B
+ ANSI_ESCAPE_SECONDARY = 0x5B
+ ANSI_OSC_STRING_ENTRY = 0x5D
+ ANSI_COMMAND_FIRST = 0x40
+ ANSI_COMMAND_LAST = 0x7E
+ DCS_ENTRY = 0x90
+ CSI_ENTRY = 0x9B
+ OSC_STRING = 0x9D
+ ANSI_PARAMETER_SEP = ";"
+ ANSI_CMD_G0 = '('
+ ANSI_CMD_G1 = ')'
+ ANSI_CMD_G2 = '*'
+ ANSI_CMD_G3 = '+'
+ ANSI_CMD_DECPNM = '>'
+ ANSI_CMD_DECPAM = '='
+ ANSI_CMD_OSC = ']'
+ ANSI_CMD_STR_TERM = '\\'
+
+ KEY_CONTROL_PARAM_2 = ";2"
+ KEY_CONTROL_PARAM_3 = ";3"
+ KEY_CONTROL_PARAM_4 = ";4"
+ KEY_CONTROL_PARAM_5 = ";5"
+ KEY_CONTROL_PARAM_6 = ";6"
+ KEY_CONTROL_PARAM_7 = ";7"
+ KEY_CONTROL_PARAM_8 = ";8"
+ KEY_ESC_CSI = "\x1B["
+ KEY_ESC_N = "\x1BN"
+ KEY_ESC_O = "\x1BO"
+
+ FILL_CHARACTER = ' '
+)
+
+func getByteRange(start byte, end byte) []byte {
+ bytes := make([]byte, 0, 32)
+ for i := start; i <= end; i++ {
+ bytes = append(bytes, byte(i))
+ }
+
+ return bytes
+}
+
+var toGroundBytes = getToGroundBytes()
+var executors = getExecuteBytes()
+
+// SPACE 20+A0 hex Always and everywhere a blank space
+// Intermediate 20-2F hex !"#$%&'()*+,-./
+var intermeds = getByteRange(0x20, 0x2F)
+
+// Parameters 30-3F hex 0123456789:;<=>?
+// CSI Parameters 30-39, 3B hex 0123456789;
+var csiParams = getByteRange(0x30, 0x3F)
+
+var csiCollectables = append(getByteRange(0x30, 0x39), getByteRange(0x3B, 0x3F)...)
+
+// Uppercase 40-5F hex @ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_
+var upperCase = getByteRange(0x40, 0x5F)
+
+// Lowercase 60-7E hex `abcdefghijlkmnopqrstuvwxyz{|}~
+var lowerCase = getByteRange(0x60, 0x7E)
+
+// Alphabetics 40-7E hex (all of upper and lower case)
+var alphabetics = append(upperCase, lowerCase...)
+
+var printables = getByteRange(0x20, 0x7F)
+
+var escapeIntermediateToGroundBytes = getByteRange(0x30, 0x7E)
+var escapeToGroundBytes = getEscapeToGroundBytes()
+
+// See http://www.vt100.net/emu/vt500_parser.png for description of the complex
+// byte ranges below
+
+func getEscapeToGroundBytes() []byte {
+ escapeToGroundBytes := getByteRange(0x30, 0x4F)
+ escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x51, 0x57)...)
+ escapeToGroundBytes = append(escapeToGroundBytes, 0x59)
+ escapeToGroundBytes = append(escapeToGroundBytes, 0x5A)
+ escapeToGroundBytes = append(escapeToGroundBytes, 0x5C)
+ escapeToGroundBytes = append(escapeToGroundBytes, getByteRange(0x60, 0x7E)...)
+ return escapeToGroundBytes
+}
+
+func getExecuteBytes() []byte {
+ executeBytes := getByteRange(0x00, 0x17)
+ executeBytes = append(executeBytes, 0x19)
+ executeBytes = append(executeBytes, getByteRange(0x1C, 0x1F)...)
+ return executeBytes
+}
+
+func getToGroundBytes() []byte {
+ groundBytes := []byte{0x18}
+ groundBytes = append(groundBytes, 0x1A)
+ groundBytes = append(groundBytes, getByteRange(0x80, 0x8F)...)
+ groundBytes = append(groundBytes, getByteRange(0x91, 0x97)...)
+ groundBytes = append(groundBytes, 0x99)
+ groundBytes = append(groundBytes, 0x9A)
+ groundBytes = append(groundBytes, 0x9C)
+ return groundBytes
+}
+
+// Delete 7F hex Always and everywhere ignored
+// C1 Control 80-9F hex 32 additional control characters
+// G1 Displayable A1-FE hex 94 additional displayable characters
+// Special A0+FF hex Same as SPACE and DELETE
diff --git a/vendor/github.com/Azure/go-ansiterm/context.go b/vendor/github.com/Azure/go-ansiterm/context.go
new file mode 100644
index 000000000..8d66e777c
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/context.go
@@ -0,0 +1,7 @@
+package ansiterm
+
+type ansiContext struct {
+ currentChar byte
+ paramBuffer []byte
+ interBuffer []byte
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go b/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go
new file mode 100644
index 000000000..bcbe00d0c
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/csi_entry_state.go
@@ -0,0 +1,49 @@
+package ansiterm
+
+type csiEntryState struct {
+ baseState
+}
+
+func (csiState csiEntryState) Handle(b byte) (s state, e error) {
+ csiState.parser.logf("CsiEntry::Handle %#x", b)
+
+ nextState, err := csiState.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case sliceContains(alphabetics, b):
+ return csiState.parser.ground, nil
+ case sliceContains(csiCollectables, b):
+ return csiState.parser.csiParam, nil
+ case sliceContains(executors, b):
+ return csiState, csiState.parser.execute()
+ }
+
+ return csiState, nil
+}
+
+func (csiState csiEntryState) Transition(s state) error {
+ csiState.parser.logf("CsiEntry::Transition %s --> %s", csiState.Name(), s.Name())
+ csiState.baseState.Transition(s)
+
+ switch s {
+ case csiState.parser.ground:
+ return csiState.parser.csiDispatch()
+ case csiState.parser.csiParam:
+ switch {
+ case sliceContains(csiParams, csiState.parser.context.currentChar):
+ csiState.parser.collectParam()
+ case sliceContains(intermeds, csiState.parser.context.currentChar):
+ csiState.parser.collectInter()
+ }
+ }
+
+ return nil
+}
+
+func (csiState csiEntryState) Enter() error {
+ csiState.parser.clear()
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/csi_param_state.go b/vendor/github.com/Azure/go-ansiterm/csi_param_state.go
new file mode 100644
index 000000000..7ed5e01c3
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/csi_param_state.go
@@ -0,0 +1,38 @@
+package ansiterm
+
+type csiParamState struct {
+ baseState
+}
+
+func (csiState csiParamState) Handle(b byte) (s state, e error) {
+ csiState.parser.logf("CsiParam::Handle %#x", b)
+
+ nextState, err := csiState.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case sliceContains(alphabetics, b):
+ return csiState.parser.ground, nil
+ case sliceContains(csiCollectables, b):
+ csiState.parser.collectParam()
+ return csiState, nil
+ case sliceContains(executors, b):
+ return csiState, csiState.parser.execute()
+ }
+
+ return csiState, nil
+}
+
+func (csiState csiParamState) Transition(s state) error {
+ csiState.parser.logf("CsiParam::Transition %s --> %s", csiState.Name(), s.Name())
+ csiState.baseState.Transition(s)
+
+ switch s {
+ case csiState.parser.ground:
+ return csiState.parser.csiDispatch()
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go b/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go
new file mode 100644
index 000000000..1c719db9e
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/escape_intermediate_state.go
@@ -0,0 +1,36 @@
+package ansiterm
+
+type escapeIntermediateState struct {
+ baseState
+}
+
+func (escState escapeIntermediateState) Handle(b byte) (s state, e error) {
+ escState.parser.logf("escapeIntermediateState::Handle %#x", b)
+ nextState, err := escState.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case sliceContains(intermeds, b):
+ return escState, escState.parser.collectInter()
+ case sliceContains(executors, b):
+ return escState, escState.parser.execute()
+ case sliceContains(escapeIntermediateToGroundBytes, b):
+ return escState.parser.ground, nil
+ }
+
+ return escState, nil
+}
+
+func (escState escapeIntermediateState) Transition(s state) error {
+ escState.parser.logf("escapeIntermediateState::Transition %s --> %s", escState.Name(), s.Name())
+ escState.baseState.Transition(s)
+
+ switch s {
+ case escState.parser.ground:
+ return escState.parser.escDispatch()
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/escape_state.go b/vendor/github.com/Azure/go-ansiterm/escape_state.go
new file mode 100644
index 000000000..6390abd23
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/escape_state.go
@@ -0,0 +1,47 @@
+package ansiterm
+
+type escapeState struct {
+ baseState
+}
+
+func (escState escapeState) Handle(b byte) (s state, e error) {
+ escState.parser.logf("escapeState::Handle %#x", b)
+ nextState, err := escState.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case b == ANSI_ESCAPE_SECONDARY:
+ return escState.parser.csiEntry, nil
+ case b == ANSI_OSC_STRING_ENTRY:
+ return escState.parser.oscString, nil
+ case sliceContains(executors, b):
+ return escState, escState.parser.execute()
+ case sliceContains(escapeToGroundBytes, b):
+ return escState.parser.ground, nil
+ case sliceContains(intermeds, b):
+ return escState.parser.escapeIntermediate, nil
+ }
+
+ return escState, nil
+}
+
+func (escState escapeState) Transition(s state) error {
+ escState.parser.logf("Escape::Transition %s --> %s", escState.Name(), s.Name())
+ escState.baseState.Transition(s)
+
+ switch s {
+ case escState.parser.ground:
+ return escState.parser.escDispatch()
+ case escState.parser.escapeIntermediate:
+ return escState.parser.collectInter()
+ }
+
+ return nil
+}
+
+func (escState escapeState) Enter() error {
+ escState.parser.clear()
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/event_handler.go b/vendor/github.com/Azure/go-ansiterm/event_handler.go
new file mode 100644
index 000000000..98087b38c
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/event_handler.go
@@ -0,0 +1,90 @@
+package ansiterm
+
+type AnsiEventHandler interface {
+ // Print
+ Print(b byte) error
+
+ // Execute C0 commands
+ Execute(b byte) error
+
+ // CUrsor Up
+ CUU(int) error
+
+ // CUrsor Down
+ CUD(int) error
+
+ // CUrsor Forward
+ CUF(int) error
+
+ // CUrsor Backward
+ CUB(int) error
+
+ // Cursor to Next Line
+ CNL(int) error
+
+ // Cursor to Previous Line
+ CPL(int) error
+
+ // Cursor Horizontal position Absolute
+ CHA(int) error
+
+ // Vertical line Position Absolute
+ VPA(int) error
+
+ // CUrsor Position
+ CUP(int, int) error
+
+ // Horizontal and Vertical Position (depends on PUM)
+ HVP(int, int) error
+
+ // Text Cursor Enable Mode
+ DECTCEM(bool) error
+
+ // Origin Mode
+ DECOM(bool) error
+
+ // 132 Column Mode
+ DECCOLM(bool) error
+
+ // Erase in Display
+ ED(int) error
+
+ // Erase in Line
+ EL(int) error
+
+ // Insert Line
+ IL(int) error
+
+ // Delete Line
+ DL(int) error
+
+ // Insert Character
+ ICH(int) error
+
+ // Delete Character
+ DCH(int) error
+
+ // Set Graphics Rendition
+ SGR([]int) error
+
+ // Pan Down
+ SU(int) error
+
+ // Pan Up
+ SD(int) error
+
+ // Device Attributes
+ DA([]string) error
+
+ // Set Top and Bottom Margins
+ DECSTBM(int, int) error
+
+ // Index
+ IND() error
+
+ // Reverse Index
+ RI() error
+
+ // Flush updates from previous commands
+ Flush() error
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/ground_state.go b/vendor/github.com/Azure/go-ansiterm/ground_state.go
new file mode 100644
index 000000000..52451e946
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/ground_state.go
@@ -0,0 +1,24 @@
+package ansiterm
+
+type groundState struct {
+ baseState
+}
+
+func (gs groundState) Handle(b byte) (s state, e error) {
+ gs.parser.context.currentChar = b
+
+ nextState, err := gs.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case sliceContains(printables, b):
+ return gs, gs.parser.print()
+
+ case sliceContains(executors, b):
+ return gs, gs.parser.execute()
+ }
+
+ return gs, nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/osc_string_state.go b/vendor/github.com/Azure/go-ansiterm/osc_string_state.go
new file mode 100644
index 000000000..593b10ab6
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/osc_string_state.go
@@ -0,0 +1,31 @@
+package ansiterm
+
+type oscStringState struct {
+ baseState
+}
+
+func (oscState oscStringState) Handle(b byte) (s state, e error) {
+ oscState.parser.logf("OscString::Handle %#x", b)
+ nextState, err := oscState.baseState.Handle(b)
+ if nextState != nil || err != nil {
+ return nextState, err
+ }
+
+ switch {
+ case isOscStringTerminator(b):
+ return oscState.parser.ground, nil
+ }
+
+ return oscState, nil
+}
+
+// See below for OSC string terminators for linux
+// http://man7.org/linux/man-pages/man4/console_codes.4.html
+func isOscStringTerminator(b byte) bool {
+
+ if b == ANSI_BEL || b == 0x5C {
+ return true
+ }
+
+ return false
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/parser.go b/vendor/github.com/Azure/go-ansiterm/parser.go
new file mode 100644
index 000000000..03cec7ada
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/parser.go
@@ -0,0 +1,151 @@
+package ansiterm
+
+import (
+ "errors"
+ "log"
+ "os"
+)
+
+type AnsiParser struct {
+ currState state
+ eventHandler AnsiEventHandler
+ context *ansiContext
+ csiEntry state
+ csiParam state
+ dcsEntry state
+ escape state
+ escapeIntermediate state
+ error state
+ ground state
+ oscString state
+ stateMap []state
+
+ logf func(string, ...interface{})
+}
+
+type Option func(*AnsiParser)
+
+func WithLogf(f func(string, ...interface{})) Option {
+ return func(ap *AnsiParser) {
+ ap.logf = f
+ }
+}
+
+func CreateParser(initialState string, evtHandler AnsiEventHandler, opts ...Option) *AnsiParser {
+ ap := &AnsiParser{
+ eventHandler: evtHandler,
+ context: &ansiContext{},
+ }
+ for _, o := range opts {
+ o(ap)
+ }
+
+ if isDebugEnv := os.Getenv(LogEnv); isDebugEnv == "1" {
+ logFile, _ := os.Create("ansiParser.log")
+ logger := log.New(logFile, "", log.LstdFlags)
+ if ap.logf != nil {
+ l := ap.logf
+ ap.logf = func(s string, v ...interface{}) {
+ l(s, v...)
+ logger.Printf(s, v...)
+ }
+ } else {
+ ap.logf = logger.Printf
+ }
+ }
+
+ if ap.logf == nil {
+ ap.logf = func(string, ...interface{}) {}
+ }
+
+ ap.csiEntry = csiEntryState{baseState{name: "CsiEntry", parser: ap}}
+ ap.csiParam = csiParamState{baseState{name: "CsiParam", parser: ap}}
+ ap.dcsEntry = dcsEntryState{baseState{name: "DcsEntry", parser: ap}}
+ ap.escape = escapeState{baseState{name: "Escape", parser: ap}}
+ ap.escapeIntermediate = escapeIntermediateState{baseState{name: "EscapeIntermediate", parser: ap}}
+ ap.error = errorState{baseState{name: "Error", parser: ap}}
+ ap.ground = groundState{baseState{name: "Ground", parser: ap}}
+ ap.oscString = oscStringState{baseState{name: "OscString", parser: ap}}
+
+ ap.stateMap = []state{
+ ap.csiEntry,
+ ap.csiParam,
+ ap.dcsEntry,
+ ap.escape,
+ ap.escapeIntermediate,
+ ap.error,
+ ap.ground,
+ ap.oscString,
+ }
+
+ ap.currState = getState(initialState, ap.stateMap)
+
+ ap.logf("CreateParser: parser %p", ap)
+ return ap
+}
+
+func getState(name string, states []state) state {
+ for _, el := range states {
+ if el.Name() == name {
+ return el
+ }
+ }
+
+ return nil
+}
+
+func (ap *AnsiParser) Parse(bytes []byte) (int, error) {
+ for i, b := range bytes {
+ if err := ap.handle(b); err != nil {
+ return i, err
+ }
+ }
+
+ return len(bytes), ap.eventHandler.Flush()
+}
+
+func (ap *AnsiParser) handle(b byte) error {
+ ap.context.currentChar = b
+ newState, err := ap.currState.Handle(b)
+ if err != nil {
+ return err
+ }
+
+ if newState == nil {
+ ap.logf("WARNING: newState is nil")
+ return errors.New("New state of 'nil' is invalid.")
+ }
+
+ if newState != ap.currState {
+ if err := ap.changeState(newState); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (ap *AnsiParser) changeState(newState state) error {
+ ap.logf("ChangeState %s --> %s", ap.currState.Name(), newState.Name())
+
+ // Exit old state
+ if err := ap.currState.Exit(); err != nil {
+ ap.logf("Exit state '%s' failed with : '%v'", ap.currState.Name(), err)
+ return err
+ }
+
+ // Perform transition action
+ if err := ap.currState.Transition(newState); err != nil {
+ ap.logf("Transition from '%s' to '%s' failed with: '%v'", ap.currState.Name(), newState.Name, err)
+ return err
+ }
+
+ // Enter new state
+ if err := newState.Enter(); err != nil {
+ ap.logf("Enter state '%s' failed with: '%v'", newState.Name(), err)
+ return err
+ }
+
+ ap.currState = newState
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go b/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go
new file mode 100644
index 000000000..de0a1f9cd
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/parser_action_helpers.go
@@ -0,0 +1,99 @@
+package ansiterm
+
+import (
+ "strconv"
+)
+
+func parseParams(bytes []byte) ([]string, error) {
+ paramBuff := make([]byte, 0, 0)
+ params := []string{}
+
+ for _, v := range bytes {
+ if v == ';' {
+ if len(paramBuff) > 0 {
+ // Completed parameter, append it to the list
+ s := string(paramBuff)
+ params = append(params, s)
+ paramBuff = make([]byte, 0, 0)
+ }
+ } else {
+ paramBuff = append(paramBuff, v)
+ }
+ }
+
+ // Last parameter may not be terminated with ';'
+ if len(paramBuff) > 0 {
+ s := string(paramBuff)
+ params = append(params, s)
+ }
+
+ return params, nil
+}
+
+func parseCmd(context ansiContext) (string, error) {
+ return string(context.currentChar), nil
+}
+
+func getInt(params []string, dflt int) int {
+ i := getInts(params, 1, dflt)[0]
+ return i
+}
+
+func getInts(params []string, minCount int, dflt int) []int {
+ ints := []int{}
+
+ for _, v := range params {
+ i, _ := strconv.Atoi(v)
+ // Zero is mapped to the default value in VT100.
+ if i == 0 {
+ i = dflt
+ }
+ ints = append(ints, i)
+ }
+
+ if len(ints) < minCount {
+ remaining := minCount - len(ints)
+ for i := 0; i < remaining; i++ {
+ ints = append(ints, dflt)
+ }
+ }
+
+ return ints
+}
+
+func (ap *AnsiParser) modeDispatch(param string, set bool) error {
+ switch param {
+ case "?3":
+ return ap.eventHandler.DECCOLM(set)
+ case "?6":
+ return ap.eventHandler.DECOM(set)
+ case "?25":
+ return ap.eventHandler.DECTCEM(set)
+ }
+ return nil
+}
+
+func (ap *AnsiParser) hDispatch(params []string) error {
+ if len(params) == 1 {
+ return ap.modeDispatch(params[0], true)
+ }
+
+ return nil
+}
+
+func (ap *AnsiParser) lDispatch(params []string) error {
+ if len(params) == 1 {
+ return ap.modeDispatch(params[0], false)
+ }
+
+ return nil
+}
+
+func getEraseParam(params []string) int {
+ param := getInt(params, 0)
+ if param < 0 || 3 < param {
+ param = 0
+ }
+
+ return param
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/parser_actions.go b/vendor/github.com/Azure/go-ansiterm/parser_actions.go
new file mode 100644
index 000000000..0bb5e51e9
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/parser_actions.go
@@ -0,0 +1,119 @@
+package ansiterm
+
+func (ap *AnsiParser) collectParam() error {
+ currChar := ap.context.currentChar
+ ap.logf("collectParam %#x", currChar)
+ ap.context.paramBuffer = append(ap.context.paramBuffer, currChar)
+ return nil
+}
+
+func (ap *AnsiParser) collectInter() error {
+ currChar := ap.context.currentChar
+ ap.logf("collectInter %#x", currChar)
+ ap.context.paramBuffer = append(ap.context.interBuffer, currChar)
+ return nil
+}
+
+func (ap *AnsiParser) escDispatch() error {
+ cmd, _ := parseCmd(*ap.context)
+ intermeds := ap.context.interBuffer
+ ap.logf("escDispatch currentChar: %#x", ap.context.currentChar)
+ ap.logf("escDispatch: %v(%v)", cmd, intermeds)
+
+ switch cmd {
+ case "D": // IND
+ return ap.eventHandler.IND()
+ case "E": // NEL, equivalent to CRLF
+ err := ap.eventHandler.Execute(ANSI_CARRIAGE_RETURN)
+ if err == nil {
+ err = ap.eventHandler.Execute(ANSI_LINE_FEED)
+ }
+ return err
+ case "M": // RI
+ return ap.eventHandler.RI()
+ }
+
+ return nil
+}
+
+func (ap *AnsiParser) csiDispatch() error {
+ cmd, _ := parseCmd(*ap.context)
+ params, _ := parseParams(ap.context.paramBuffer)
+ ap.logf("Parsed params: %v with length: %d", params, len(params))
+
+ ap.logf("csiDispatch: %v(%v)", cmd, params)
+
+ switch cmd {
+ case "@":
+ return ap.eventHandler.ICH(getInt(params, 1))
+ case "A":
+ return ap.eventHandler.CUU(getInt(params, 1))
+ case "B":
+ return ap.eventHandler.CUD(getInt(params, 1))
+ case "C":
+ return ap.eventHandler.CUF(getInt(params, 1))
+ case "D":
+ return ap.eventHandler.CUB(getInt(params, 1))
+ case "E":
+ return ap.eventHandler.CNL(getInt(params, 1))
+ case "F":
+ return ap.eventHandler.CPL(getInt(params, 1))
+ case "G":
+ return ap.eventHandler.CHA(getInt(params, 1))
+ case "H":
+ ints := getInts(params, 2, 1)
+ x, y := ints[0], ints[1]
+ return ap.eventHandler.CUP(x, y)
+ case "J":
+ param := getEraseParam(params)
+ return ap.eventHandler.ED(param)
+ case "K":
+ param := getEraseParam(params)
+ return ap.eventHandler.EL(param)
+ case "L":
+ return ap.eventHandler.IL(getInt(params, 1))
+ case "M":
+ return ap.eventHandler.DL(getInt(params, 1))
+ case "P":
+ return ap.eventHandler.DCH(getInt(params, 1))
+ case "S":
+ return ap.eventHandler.SU(getInt(params, 1))
+ case "T":
+ return ap.eventHandler.SD(getInt(params, 1))
+ case "c":
+ return ap.eventHandler.DA(params)
+ case "d":
+ return ap.eventHandler.VPA(getInt(params, 1))
+ case "f":
+ ints := getInts(params, 2, 1)
+ x, y := ints[0], ints[1]
+ return ap.eventHandler.HVP(x, y)
+ case "h":
+ return ap.hDispatch(params)
+ case "l":
+ return ap.lDispatch(params)
+ case "m":
+ return ap.eventHandler.SGR(getInts(params, 1, 0))
+ case "r":
+ ints := getInts(params, 2, 1)
+ top, bottom := ints[0], ints[1]
+ return ap.eventHandler.DECSTBM(top, bottom)
+ default:
+ ap.logf("ERROR: Unsupported CSI command: '%s', with full context: %v", cmd, ap.context)
+ return nil
+ }
+
+}
+
+func (ap *AnsiParser) print() error {
+ return ap.eventHandler.Print(ap.context.currentChar)
+}
+
+func (ap *AnsiParser) clear() error {
+ ap.context = &ansiContext{}
+ return nil
+}
+
+func (ap *AnsiParser) execute() error {
+ return ap.eventHandler.Execute(ap.context.currentChar)
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/states.go b/vendor/github.com/Azure/go-ansiterm/states.go
new file mode 100644
index 000000000..f2ea1fcd1
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/states.go
@@ -0,0 +1,71 @@
+package ansiterm
+
+type stateID int
+
+type state interface {
+ Enter() error
+ Exit() error
+ Handle(byte) (state, error)
+ Name() string
+ Transition(state) error
+}
+
+type baseState struct {
+ name string
+ parser *AnsiParser
+}
+
+func (base baseState) Enter() error {
+ return nil
+}
+
+func (base baseState) Exit() error {
+ return nil
+}
+
+func (base baseState) Handle(b byte) (s state, e error) {
+
+ switch {
+ case b == CSI_ENTRY:
+ return base.parser.csiEntry, nil
+ case b == DCS_ENTRY:
+ return base.parser.dcsEntry, nil
+ case b == ANSI_ESCAPE_PRIMARY:
+ return base.parser.escape, nil
+ case b == OSC_STRING:
+ return base.parser.oscString, nil
+ case sliceContains(toGroundBytes, b):
+ return base.parser.ground, nil
+ }
+
+ return nil, nil
+}
+
+func (base baseState) Name() string {
+ return base.name
+}
+
+func (base baseState) Transition(s state) error {
+ if s == base.parser.ground {
+ execBytes := []byte{0x18}
+ execBytes = append(execBytes, 0x1A)
+ execBytes = append(execBytes, getByteRange(0x80, 0x8F)...)
+ execBytes = append(execBytes, getByteRange(0x91, 0x97)...)
+ execBytes = append(execBytes, 0x99)
+ execBytes = append(execBytes, 0x9A)
+
+ if sliceContains(execBytes, base.parser.context.currentChar) {
+ return base.parser.execute()
+ }
+ }
+
+ return nil
+}
+
+type dcsEntryState struct {
+ baseState
+}
+
+type errorState struct {
+ baseState
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/utilities.go b/vendor/github.com/Azure/go-ansiterm/utilities.go
new file mode 100644
index 000000000..392114493
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/utilities.go
@@ -0,0 +1,21 @@
+package ansiterm
+
+import (
+ "strconv"
+)
+
+func sliceContains(bytes []byte, b byte) bool {
+ for _, v := range bytes {
+ if v == b {
+ return true
+ }
+ }
+
+ return false
+}
+
+func convertBytesToInteger(bytes []byte) int {
+ s := string(bytes)
+ i, _ := strconv.Atoi(s)
+ return i
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go b/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go
new file mode 100644
index 000000000..5599082ae
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/ansi.go
@@ -0,0 +1,196 @@
+// +build windows
+
+package winterm
+
+import (
+ "fmt"
+ "os"
+ "strconv"
+ "strings"
+ "syscall"
+
+ "github.com/Azure/go-ansiterm"
+ windows "golang.org/x/sys/windows"
+)
+
+// Windows keyboard constants
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx.
+const (
+ VK_PRIOR = 0x21 // PAGE UP key
+ VK_NEXT = 0x22 // PAGE DOWN key
+ VK_END = 0x23 // END key
+ VK_HOME = 0x24 // HOME key
+ VK_LEFT = 0x25 // LEFT ARROW key
+ VK_UP = 0x26 // UP ARROW key
+ VK_RIGHT = 0x27 // RIGHT ARROW key
+ VK_DOWN = 0x28 // DOWN ARROW key
+ VK_SELECT = 0x29 // SELECT key
+ VK_PRINT = 0x2A // PRINT key
+ VK_EXECUTE = 0x2B // EXECUTE key
+ VK_SNAPSHOT = 0x2C // PRINT SCREEN key
+ VK_INSERT = 0x2D // INS key
+ VK_DELETE = 0x2E // DEL key
+ VK_HELP = 0x2F // HELP key
+ VK_F1 = 0x70 // F1 key
+ VK_F2 = 0x71 // F2 key
+ VK_F3 = 0x72 // F3 key
+ VK_F4 = 0x73 // F4 key
+ VK_F5 = 0x74 // F5 key
+ VK_F6 = 0x75 // F6 key
+ VK_F7 = 0x76 // F7 key
+ VK_F8 = 0x77 // F8 key
+ VK_F9 = 0x78 // F9 key
+ VK_F10 = 0x79 // F10 key
+ VK_F11 = 0x7A // F11 key
+ VK_F12 = 0x7B // F12 key
+
+ RIGHT_ALT_PRESSED = 0x0001
+ LEFT_ALT_PRESSED = 0x0002
+ RIGHT_CTRL_PRESSED = 0x0004
+ LEFT_CTRL_PRESSED = 0x0008
+ SHIFT_PRESSED = 0x0010
+ NUMLOCK_ON = 0x0020
+ SCROLLLOCK_ON = 0x0040
+ CAPSLOCK_ON = 0x0080
+ ENHANCED_KEY = 0x0100
+)
+
+type ansiCommand struct {
+ CommandBytes []byte
+ Command string
+ Parameters []string
+ IsSpecial bool
+}
+
+func newAnsiCommand(command []byte) *ansiCommand {
+
+ if isCharacterSelectionCmdChar(command[1]) {
+ // Is Character Set Selection commands
+ return &ansiCommand{
+ CommandBytes: command,
+ Command: string(command),
+ IsSpecial: true,
+ }
+ }
+
+ // last char is command character
+ lastCharIndex := len(command) - 1
+
+ ac := &ansiCommand{
+ CommandBytes: command,
+ Command: string(command[lastCharIndex]),
+ IsSpecial: false,
+ }
+
+ // more than a single escape
+ if lastCharIndex != 0 {
+ start := 1
+ // skip if double char escape sequence
+ if command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_ESCAPE_SECONDARY {
+ start++
+ }
+ // convert this to GetNextParam method
+ ac.Parameters = strings.Split(string(command[start:lastCharIndex]), ansiterm.ANSI_PARAMETER_SEP)
+ }
+
+ return ac
+}
+
+func (ac *ansiCommand) paramAsSHORT(index int, defaultValue int16) int16 {
+ if index < 0 || index >= len(ac.Parameters) {
+ return defaultValue
+ }
+
+ param, err := strconv.ParseInt(ac.Parameters[index], 10, 16)
+ if err != nil {
+ return defaultValue
+ }
+
+ return int16(param)
+}
+
+func (ac *ansiCommand) String() string {
+ return fmt.Sprintf("0x%v \"%v\" (\"%v\")",
+ bytesToHex(ac.CommandBytes),
+ ac.Command,
+ strings.Join(ac.Parameters, "\",\""))
+}
+
+// isAnsiCommandChar returns true if the passed byte falls within the range of ANSI commands.
+// See http://manpages.ubuntu.com/manpages/intrepid/man4/console_codes.4.html.
+func isAnsiCommandChar(b byte) bool {
+ switch {
+ case ansiterm.ANSI_COMMAND_FIRST <= b && b <= ansiterm.ANSI_COMMAND_LAST && b != ansiterm.ANSI_ESCAPE_SECONDARY:
+ return true
+ case b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_OSC || b == ansiterm.ANSI_CMD_DECPAM || b == ansiterm.ANSI_CMD_DECPNM:
+ // non-CSI escape sequence terminator
+ return true
+ case b == ansiterm.ANSI_CMD_STR_TERM || b == ansiterm.ANSI_BEL:
+ // String escape sequence terminator
+ return true
+ }
+ return false
+}
+
+func isXtermOscSequence(command []byte, current byte) bool {
+ return (len(command) >= 2 && command[0] == ansiterm.ANSI_ESCAPE_PRIMARY && command[1] == ansiterm.ANSI_CMD_OSC && current != ansiterm.ANSI_BEL)
+}
+
+func isCharacterSelectionCmdChar(b byte) bool {
+ return (b == ansiterm.ANSI_CMD_G0 || b == ansiterm.ANSI_CMD_G1 || b == ansiterm.ANSI_CMD_G2 || b == ansiterm.ANSI_CMD_G3)
+}
+
+// bytesToHex converts a slice of bytes to a human-readable string.
+func bytesToHex(b []byte) string {
+ hex := make([]string, len(b))
+ for i, ch := range b {
+ hex[i] = fmt.Sprintf("%X", ch)
+ }
+ return strings.Join(hex, "")
+}
+
+// ensureInRange adjusts the passed value, if necessary, to ensure it is within
+// the passed min / max range.
+func ensureInRange(n int16, min int16, max int16) int16 {
+ if n < min {
+ return min
+ } else if n > max {
+ return max
+ } else {
+ return n
+ }
+}
+
+func GetStdFile(nFile int) (*os.File, uintptr) {
+ var file *os.File
+
+ // syscall uses negative numbers
+ // windows package uses very big uint32
+ // Keep these switches split so we don't have to convert ints too much.
+ switch uint32(nFile) {
+ case windows.STD_INPUT_HANDLE:
+ file = os.Stdin
+ case windows.STD_OUTPUT_HANDLE:
+ file = os.Stdout
+ case windows.STD_ERROR_HANDLE:
+ file = os.Stderr
+ default:
+ switch nFile {
+ case syscall.STD_INPUT_HANDLE:
+ file = os.Stdin
+ case syscall.STD_OUTPUT_HANDLE:
+ file = os.Stdout
+ case syscall.STD_ERROR_HANDLE:
+ file = os.Stderr
+ default:
+ panic(fmt.Errorf("Invalid standard handle identifier: %v", nFile))
+ }
+ }
+
+ fd, err := syscall.GetStdHandle(nFile)
+ if err != nil {
+ panic(fmt.Errorf("Invalid standard handle identifier: %v -- %v", nFile, err))
+ }
+
+ return file, uintptr(fd)
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/api.go b/vendor/github.com/Azure/go-ansiterm/winterm/api.go
new file mode 100644
index 000000000..6055e33b9
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/api.go
@@ -0,0 +1,327 @@
+// +build windows
+
+package winterm
+
+import (
+ "fmt"
+ "syscall"
+ "unsafe"
+)
+
+//===========================================================================================================
+// IMPORTANT NOTE:
+//
+// The methods below make extensive use of the "unsafe" package to obtain the required pointers.
+// Beginning in Go 1.3, the garbage collector may release local variables (e.g., incoming arguments, stack
+// variables) the pointers reference *before* the API completes.
+//
+// As a result, in those cases, the code must hint that the variables remain in active by invoking the
+// dummy method "use" (see below). Newer versions of Go are planned to change the mechanism to no longer
+// require unsafe pointers.
+//
+// If you add or modify methods, ENSURE protection of local variables through the "use" builtin to inform
+// the garbage collector the variables remain in use if:
+//
+// -- The value is not a pointer (e.g., int32, struct)
+// -- The value is not referenced by the method after passing the pointer to Windows
+//
+// See http://golang.org/doc/go1.3.
+//===========================================================================================================
+
+var (
+ kernel32DLL = syscall.NewLazyDLL("kernel32.dll")
+
+ getConsoleCursorInfoProc = kernel32DLL.NewProc("GetConsoleCursorInfo")
+ setConsoleCursorInfoProc = kernel32DLL.NewProc("SetConsoleCursorInfo")
+ setConsoleCursorPositionProc = kernel32DLL.NewProc("SetConsoleCursorPosition")
+ setConsoleModeProc = kernel32DLL.NewProc("SetConsoleMode")
+ getConsoleScreenBufferInfoProc = kernel32DLL.NewProc("GetConsoleScreenBufferInfo")
+ setConsoleScreenBufferSizeProc = kernel32DLL.NewProc("SetConsoleScreenBufferSize")
+ scrollConsoleScreenBufferProc = kernel32DLL.NewProc("ScrollConsoleScreenBufferA")
+ setConsoleTextAttributeProc = kernel32DLL.NewProc("SetConsoleTextAttribute")
+ setConsoleWindowInfoProc = kernel32DLL.NewProc("SetConsoleWindowInfo")
+ writeConsoleOutputProc = kernel32DLL.NewProc("WriteConsoleOutputW")
+ readConsoleInputProc = kernel32DLL.NewProc("ReadConsoleInputW")
+ waitForSingleObjectProc = kernel32DLL.NewProc("WaitForSingleObject")
+)
+
+// Windows Console constants
+const (
+ // Console modes
+ // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx.
+ ENABLE_PROCESSED_INPUT = 0x0001
+ ENABLE_LINE_INPUT = 0x0002
+ ENABLE_ECHO_INPUT = 0x0004
+ ENABLE_WINDOW_INPUT = 0x0008
+ ENABLE_MOUSE_INPUT = 0x0010
+ ENABLE_INSERT_MODE = 0x0020
+ ENABLE_QUICK_EDIT_MODE = 0x0040
+ ENABLE_EXTENDED_FLAGS = 0x0080
+ ENABLE_AUTO_POSITION = 0x0100
+ ENABLE_VIRTUAL_TERMINAL_INPUT = 0x0200
+
+ ENABLE_PROCESSED_OUTPUT = 0x0001
+ ENABLE_WRAP_AT_EOL_OUTPUT = 0x0002
+ ENABLE_VIRTUAL_TERMINAL_PROCESSING = 0x0004
+ DISABLE_NEWLINE_AUTO_RETURN = 0x0008
+ ENABLE_LVB_GRID_WORLDWIDE = 0x0010
+
+ // Character attributes
+ // Note:
+ // -- The attributes are combined to produce various colors (e.g., Blue + Green will create Cyan).
+ // Clearing all foreground or background colors results in black; setting all creates white.
+ // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682088(v=vs.85).aspx#_win32_character_attributes.
+ FOREGROUND_BLUE uint16 = 0x0001
+ FOREGROUND_GREEN uint16 = 0x0002
+ FOREGROUND_RED uint16 = 0x0004
+ FOREGROUND_INTENSITY uint16 = 0x0008
+ FOREGROUND_MASK uint16 = 0x000F
+
+ BACKGROUND_BLUE uint16 = 0x0010
+ BACKGROUND_GREEN uint16 = 0x0020
+ BACKGROUND_RED uint16 = 0x0040
+ BACKGROUND_INTENSITY uint16 = 0x0080
+ BACKGROUND_MASK uint16 = 0x00F0
+
+ COMMON_LVB_MASK uint16 = 0xFF00
+ COMMON_LVB_REVERSE_VIDEO uint16 = 0x4000
+ COMMON_LVB_UNDERSCORE uint16 = 0x8000
+
+ // Input event types
+ // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx.
+ KEY_EVENT = 0x0001
+ MOUSE_EVENT = 0x0002
+ WINDOW_BUFFER_SIZE_EVENT = 0x0004
+ MENU_EVENT = 0x0008
+ FOCUS_EVENT = 0x0010
+
+ // WaitForSingleObject return codes
+ WAIT_ABANDONED = 0x00000080
+ WAIT_FAILED = 0xFFFFFFFF
+ WAIT_SIGNALED = 0x0000000
+ WAIT_TIMEOUT = 0x00000102
+
+ // WaitForSingleObject wait duration
+ WAIT_INFINITE = 0xFFFFFFFF
+ WAIT_ONE_SECOND = 1000
+ WAIT_HALF_SECOND = 500
+ WAIT_QUARTER_SECOND = 250
+)
+
+// Windows API Console types
+// -- See https://msdn.microsoft.com/en-us/library/windows/desktop/ms682101(v=vs.85).aspx for Console specific types (e.g., COORD)
+// -- See https://msdn.microsoft.com/en-us/library/aa296569(v=vs.60).aspx for comments on alignment
+type (
+ CHAR_INFO struct {
+ UnicodeChar uint16
+ Attributes uint16
+ }
+
+ CONSOLE_CURSOR_INFO struct {
+ Size uint32
+ Visible int32
+ }
+
+ CONSOLE_SCREEN_BUFFER_INFO struct {
+ Size COORD
+ CursorPosition COORD
+ Attributes uint16
+ Window SMALL_RECT
+ MaximumWindowSize COORD
+ }
+
+ COORD struct {
+ X int16
+ Y int16
+ }
+
+ SMALL_RECT struct {
+ Left int16
+ Top int16
+ Right int16
+ Bottom int16
+ }
+
+ // INPUT_RECORD is a C/C++ union of which KEY_EVENT_RECORD is one case, it is also the largest
+ // See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683499(v=vs.85).aspx.
+ INPUT_RECORD struct {
+ EventType uint16
+ KeyEvent KEY_EVENT_RECORD
+ }
+
+ KEY_EVENT_RECORD struct {
+ KeyDown int32
+ RepeatCount uint16
+ VirtualKeyCode uint16
+ VirtualScanCode uint16
+ UnicodeChar uint16
+ ControlKeyState uint32
+ }
+
+ WINDOW_BUFFER_SIZE struct {
+ Size COORD
+ }
+)
+
+// boolToBOOL converts a Go bool into a Windows int32.
+func boolToBOOL(f bool) int32 {
+ if f {
+ return int32(1)
+ } else {
+ return int32(0)
+ }
+}
+
+// GetConsoleCursorInfo retrieves information about the size and visiblity of the console cursor.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms683163(v=vs.85).aspx.
+func GetConsoleCursorInfo(handle uintptr, cursorInfo *CONSOLE_CURSOR_INFO) error {
+ r1, r2, err := getConsoleCursorInfoProc.Call(handle, uintptr(unsafe.Pointer(cursorInfo)), 0)
+ return checkError(r1, r2, err)
+}
+
+// SetConsoleCursorInfo sets the size and visiblity of the console cursor.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686019(v=vs.85).aspx.
+func SetConsoleCursorInfo(handle uintptr, cursorInfo *CONSOLE_CURSOR_INFO) error {
+ r1, r2, err := setConsoleCursorInfoProc.Call(handle, uintptr(unsafe.Pointer(cursorInfo)), 0)
+ return checkError(r1, r2, err)
+}
+
+// SetConsoleCursorPosition location of the console cursor.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686025(v=vs.85).aspx.
+func SetConsoleCursorPosition(handle uintptr, coord COORD) error {
+ r1, r2, err := setConsoleCursorPositionProc.Call(handle, coordToPointer(coord))
+ use(coord)
+ return checkError(r1, r2, err)
+}
+
+// GetConsoleMode gets the console mode for given file descriptor
+// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683167(v=vs.85).aspx.
+func GetConsoleMode(handle uintptr) (mode uint32, err error) {
+ err = syscall.GetConsoleMode(syscall.Handle(handle), &mode)
+ return mode, err
+}
+
+// SetConsoleMode sets the console mode for given file descriptor
+// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686033(v=vs.85).aspx.
+func SetConsoleMode(handle uintptr, mode uint32) error {
+ r1, r2, err := setConsoleModeProc.Call(handle, uintptr(mode), 0)
+ use(mode)
+ return checkError(r1, r2, err)
+}
+
+// GetConsoleScreenBufferInfo retrieves information about the specified console screen buffer.
+// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms683171(v=vs.85).aspx.
+func GetConsoleScreenBufferInfo(handle uintptr) (*CONSOLE_SCREEN_BUFFER_INFO, error) {
+ info := CONSOLE_SCREEN_BUFFER_INFO{}
+ err := checkError(getConsoleScreenBufferInfoProc.Call(handle, uintptr(unsafe.Pointer(&info)), 0))
+ if err != nil {
+ return nil, err
+ }
+ return &info, nil
+}
+
+func ScrollConsoleScreenBuffer(handle uintptr, scrollRect SMALL_RECT, clipRect SMALL_RECT, destOrigin COORD, char CHAR_INFO) error {
+ r1, r2, err := scrollConsoleScreenBufferProc.Call(handle, uintptr(unsafe.Pointer(&scrollRect)), uintptr(unsafe.Pointer(&clipRect)), coordToPointer(destOrigin), uintptr(unsafe.Pointer(&char)))
+ use(scrollRect)
+ use(clipRect)
+ use(destOrigin)
+ use(char)
+ return checkError(r1, r2, err)
+}
+
+// SetConsoleScreenBufferSize sets the size of the console screen buffer.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686044(v=vs.85).aspx.
+func SetConsoleScreenBufferSize(handle uintptr, coord COORD) error {
+ r1, r2, err := setConsoleScreenBufferSizeProc.Call(handle, coordToPointer(coord))
+ use(coord)
+ return checkError(r1, r2, err)
+}
+
+// SetConsoleTextAttribute sets the attributes of characters written to the
+// console screen buffer by the WriteFile or WriteConsole function.
+// See http://msdn.microsoft.com/en-us/library/windows/desktop/ms686047(v=vs.85).aspx.
+func SetConsoleTextAttribute(handle uintptr, attribute uint16) error {
+ r1, r2, err := setConsoleTextAttributeProc.Call(handle, uintptr(attribute), 0)
+ use(attribute)
+ return checkError(r1, r2, err)
+}
+
+// SetConsoleWindowInfo sets the size and position of the console screen buffer's window.
+// Note that the size and location must be within and no larger than the backing console screen buffer.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms686125(v=vs.85).aspx.
+func SetConsoleWindowInfo(handle uintptr, isAbsolute bool, rect SMALL_RECT) error {
+ r1, r2, err := setConsoleWindowInfoProc.Call(handle, uintptr(boolToBOOL(isAbsolute)), uintptr(unsafe.Pointer(&rect)))
+ use(isAbsolute)
+ use(rect)
+ return checkError(r1, r2, err)
+}
+
+// WriteConsoleOutput writes the CHAR_INFOs from the provided buffer to the active console buffer.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687404(v=vs.85).aspx.
+func WriteConsoleOutput(handle uintptr, buffer []CHAR_INFO, bufferSize COORD, bufferCoord COORD, writeRegion *SMALL_RECT) error {
+ r1, r2, err := writeConsoleOutputProc.Call(handle, uintptr(unsafe.Pointer(&buffer[0])), coordToPointer(bufferSize), coordToPointer(bufferCoord), uintptr(unsafe.Pointer(writeRegion)))
+ use(buffer)
+ use(bufferSize)
+ use(bufferCoord)
+ return checkError(r1, r2, err)
+}
+
+// ReadConsoleInput reads (and removes) data from the console input buffer.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms684961(v=vs.85).aspx.
+func ReadConsoleInput(handle uintptr, buffer []INPUT_RECORD, count *uint32) error {
+ r1, r2, err := readConsoleInputProc.Call(handle, uintptr(unsafe.Pointer(&buffer[0])), uintptr(len(buffer)), uintptr(unsafe.Pointer(count)))
+ use(buffer)
+ return checkError(r1, r2, err)
+}
+
+// WaitForSingleObject waits for the passed handle to be signaled.
+// It returns true if the handle was signaled; false otherwise.
+// See https://msdn.microsoft.com/en-us/library/windows/desktop/ms687032(v=vs.85).aspx.
+func WaitForSingleObject(handle uintptr, msWait uint32) (bool, error) {
+ r1, _, err := waitForSingleObjectProc.Call(handle, uintptr(uint32(msWait)))
+ switch r1 {
+ case WAIT_ABANDONED, WAIT_TIMEOUT:
+ return false, nil
+ case WAIT_SIGNALED:
+ return true, nil
+ }
+ use(msWait)
+ return false, err
+}
+
+// String helpers
+func (info CONSOLE_SCREEN_BUFFER_INFO) String() string {
+ return fmt.Sprintf("Size(%v) Cursor(%v) Window(%v) Max(%v)", info.Size, info.CursorPosition, info.Window, info.MaximumWindowSize)
+}
+
+func (coord COORD) String() string {
+ return fmt.Sprintf("%v,%v", coord.X, coord.Y)
+}
+
+func (rect SMALL_RECT) String() string {
+ return fmt.Sprintf("(%v,%v),(%v,%v)", rect.Left, rect.Top, rect.Right, rect.Bottom)
+}
+
+// checkError evaluates the results of a Windows API call and returns the error if it failed.
+func checkError(r1, r2 uintptr, err error) error {
+ // Windows APIs return non-zero to indicate success
+ if r1 != 0 {
+ return nil
+ }
+
+ // Return the error if provided, otherwise default to EINVAL
+ if err != nil {
+ return err
+ }
+ return syscall.EINVAL
+}
+
+// coordToPointer converts a COORD into a uintptr (by fooling the type system).
+func coordToPointer(c COORD) uintptr {
+ // Note: This code assumes the two SHORTs are correctly laid out; the "cast" to uint32 is just to get a pointer to pass.
+ return uintptr(*((*uint32)(unsafe.Pointer(&c))))
+}
+
+// use is a no-op, but the compiler cannot see that it is.
+// Calling use(p) ensures that p is kept live until that point.
+func use(p interface{}) {}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go b/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go
new file mode 100644
index 000000000..cbec8f728
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/attr_translation.go
@@ -0,0 +1,100 @@
+// +build windows
+
+package winterm
+
+import "github.com/Azure/go-ansiterm"
+
+const (
+ FOREGROUND_COLOR_MASK = FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE
+ BACKGROUND_COLOR_MASK = BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE
+)
+
+// collectAnsiIntoWindowsAttributes modifies the passed Windows text mode flags to reflect the
+// request represented by the passed ANSI mode.
+func collectAnsiIntoWindowsAttributes(windowsMode uint16, inverted bool, baseMode uint16, ansiMode int16) (uint16, bool) {
+ switch ansiMode {
+
+ // Mode styles
+ case ansiterm.ANSI_SGR_BOLD:
+ windowsMode = windowsMode | FOREGROUND_INTENSITY
+
+ case ansiterm.ANSI_SGR_DIM, ansiterm.ANSI_SGR_BOLD_DIM_OFF:
+ windowsMode &^= FOREGROUND_INTENSITY
+
+ case ansiterm.ANSI_SGR_UNDERLINE:
+ windowsMode = windowsMode | COMMON_LVB_UNDERSCORE
+
+ case ansiterm.ANSI_SGR_REVERSE:
+ inverted = true
+
+ case ansiterm.ANSI_SGR_REVERSE_OFF:
+ inverted = false
+
+ case ansiterm.ANSI_SGR_UNDERLINE_OFF:
+ windowsMode &^= COMMON_LVB_UNDERSCORE
+
+ // Foreground colors
+ case ansiterm.ANSI_SGR_FOREGROUND_DEFAULT:
+ windowsMode = (windowsMode &^ FOREGROUND_MASK) | (baseMode & FOREGROUND_MASK)
+
+ case ansiterm.ANSI_SGR_FOREGROUND_BLACK:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK)
+
+ case ansiterm.ANSI_SGR_FOREGROUND_RED:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED
+
+ case ansiterm.ANSI_SGR_FOREGROUND_GREEN:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN
+
+ case ansiterm.ANSI_SGR_FOREGROUND_YELLOW:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN
+
+ case ansiterm.ANSI_SGR_FOREGROUND_BLUE:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_FOREGROUND_MAGENTA:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_FOREGROUND_CYAN:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_GREEN | FOREGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_FOREGROUND_WHITE:
+ windowsMode = (windowsMode &^ FOREGROUND_COLOR_MASK) | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE
+
+ // Background colors
+ case ansiterm.ANSI_SGR_BACKGROUND_DEFAULT:
+ // Black with no intensity
+ windowsMode = (windowsMode &^ BACKGROUND_MASK) | (baseMode & BACKGROUND_MASK)
+
+ case ansiterm.ANSI_SGR_BACKGROUND_BLACK:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK)
+
+ case ansiterm.ANSI_SGR_BACKGROUND_RED:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED
+
+ case ansiterm.ANSI_SGR_BACKGROUND_GREEN:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN
+
+ case ansiterm.ANSI_SGR_BACKGROUND_YELLOW:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN
+
+ case ansiterm.ANSI_SGR_BACKGROUND_BLUE:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_BACKGROUND_MAGENTA:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_BACKGROUND_CYAN:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_GREEN | BACKGROUND_BLUE
+
+ case ansiterm.ANSI_SGR_BACKGROUND_WHITE:
+ windowsMode = (windowsMode &^ BACKGROUND_COLOR_MASK) | BACKGROUND_RED | BACKGROUND_GREEN | BACKGROUND_BLUE
+ }
+
+ return windowsMode, inverted
+}
+
+// invertAttributes inverts the foreground and background colors of a Windows attributes value
+func invertAttributes(windowsMode uint16) uint16 {
+ return (COMMON_LVB_MASK & windowsMode) | ((FOREGROUND_MASK & windowsMode) << 4) | ((BACKGROUND_MASK & windowsMode) >> 4)
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go b/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go
new file mode 100644
index 000000000..3ee06ea72
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/cursor_helpers.go
@@ -0,0 +1,101 @@
+// +build windows
+
+package winterm
+
+const (
+ horizontal = iota
+ vertical
+)
+
+func (h *windowsAnsiEventHandler) getCursorWindow(info *CONSOLE_SCREEN_BUFFER_INFO) SMALL_RECT {
+ if h.originMode {
+ sr := h.effectiveSr(info.Window)
+ return SMALL_RECT{
+ Top: sr.top,
+ Bottom: sr.bottom,
+ Left: 0,
+ Right: info.Size.X - 1,
+ }
+ } else {
+ return SMALL_RECT{
+ Top: info.Window.Top,
+ Bottom: info.Window.Bottom,
+ Left: 0,
+ Right: info.Size.X - 1,
+ }
+ }
+}
+
+// setCursorPosition sets the cursor to the specified position, bounded to the screen size
+func (h *windowsAnsiEventHandler) setCursorPosition(position COORD, window SMALL_RECT) error {
+ position.X = ensureInRange(position.X, window.Left, window.Right)
+ position.Y = ensureInRange(position.Y, window.Top, window.Bottom)
+ err := SetConsoleCursorPosition(h.fd, position)
+ if err != nil {
+ return err
+ }
+ h.logf("Cursor position set: (%d, %d)", position.X, position.Y)
+ return err
+}
+
+func (h *windowsAnsiEventHandler) moveCursorVertical(param int) error {
+ return h.moveCursor(vertical, param)
+}
+
+func (h *windowsAnsiEventHandler) moveCursorHorizontal(param int) error {
+ return h.moveCursor(horizontal, param)
+}
+
+func (h *windowsAnsiEventHandler) moveCursor(moveMode int, param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ position := info.CursorPosition
+ switch moveMode {
+ case horizontal:
+ position.X += int16(param)
+ case vertical:
+ position.Y += int16(param)
+ }
+
+ if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) moveCursorLine(param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ position := info.CursorPosition
+ position.X = 0
+ position.Y += int16(param)
+
+ if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) moveCursorColumn(param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ position := info.CursorPosition
+ position.X = int16(param) - 1
+
+ if err = h.setCursorPosition(position, h.getCursorWindow(info)); err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go b/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go
new file mode 100644
index 000000000..244b5fa25
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/erase_helpers.go
@@ -0,0 +1,84 @@
+// +build windows
+
+package winterm
+
+import "github.com/Azure/go-ansiterm"
+
+func (h *windowsAnsiEventHandler) clearRange(attributes uint16, fromCoord COORD, toCoord COORD) error {
+ // Ignore an invalid (negative area) request
+ if toCoord.Y < fromCoord.Y {
+ return nil
+ }
+
+ var err error
+
+ var coordStart = COORD{}
+ var coordEnd = COORD{}
+
+ xCurrent, yCurrent := fromCoord.X, fromCoord.Y
+ xEnd, yEnd := toCoord.X, toCoord.Y
+
+ // Clear any partial initial line
+ if xCurrent > 0 {
+ coordStart.X, coordStart.Y = xCurrent, yCurrent
+ coordEnd.X, coordEnd.Y = xEnd, yCurrent
+
+ err = h.clearRect(attributes, coordStart, coordEnd)
+ if err != nil {
+ return err
+ }
+
+ xCurrent = 0
+ yCurrent += 1
+ }
+
+ // Clear intervening rectangular section
+ if yCurrent < yEnd {
+ coordStart.X, coordStart.Y = xCurrent, yCurrent
+ coordEnd.X, coordEnd.Y = xEnd, yEnd-1
+
+ err = h.clearRect(attributes, coordStart, coordEnd)
+ if err != nil {
+ return err
+ }
+
+ xCurrent = 0
+ yCurrent = yEnd
+ }
+
+ // Clear remaining partial ending line
+ coordStart.X, coordStart.Y = xCurrent, yCurrent
+ coordEnd.X, coordEnd.Y = xEnd, yEnd
+
+ err = h.clearRect(attributes, coordStart, coordEnd)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) clearRect(attributes uint16, fromCoord COORD, toCoord COORD) error {
+ region := SMALL_RECT{Top: fromCoord.Y, Left: fromCoord.X, Bottom: toCoord.Y, Right: toCoord.X}
+ width := toCoord.X - fromCoord.X + 1
+ height := toCoord.Y - fromCoord.Y + 1
+ size := uint32(width) * uint32(height)
+
+ if size <= 0 {
+ return nil
+ }
+
+ buffer := make([]CHAR_INFO, size)
+
+ char := CHAR_INFO{ansiterm.FILL_CHARACTER, attributes}
+ for i := 0; i < int(size); i++ {
+ buffer[i] = char
+ }
+
+ err := WriteConsoleOutput(h.fd, buffer, COORD{X: width, Y: height}, COORD{X: 0, Y: 0}, ®ion)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go b/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go
new file mode 100644
index 000000000..2d27fa1d0
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/scroll_helper.go
@@ -0,0 +1,118 @@
+// +build windows
+
+package winterm
+
+// effectiveSr gets the current effective scroll region in buffer coordinates
+func (h *windowsAnsiEventHandler) effectiveSr(window SMALL_RECT) scrollRegion {
+ top := addInRange(window.Top, h.sr.top, window.Top, window.Bottom)
+ bottom := addInRange(window.Top, h.sr.bottom, window.Top, window.Bottom)
+ if top >= bottom {
+ top = window.Top
+ bottom = window.Bottom
+ }
+ return scrollRegion{top: top, bottom: bottom}
+}
+
+func (h *windowsAnsiEventHandler) scrollUp(param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ sr := h.effectiveSr(info.Window)
+ return h.scroll(param, sr, info)
+}
+
+func (h *windowsAnsiEventHandler) scrollDown(param int) error {
+ return h.scrollUp(-param)
+}
+
+func (h *windowsAnsiEventHandler) deleteLines(param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ start := info.CursorPosition.Y
+ sr := h.effectiveSr(info.Window)
+ // Lines cannot be inserted or deleted outside the scrolling region.
+ if start >= sr.top && start <= sr.bottom {
+ sr.top = start
+ return h.scroll(param, sr, info)
+ } else {
+ return nil
+ }
+}
+
+func (h *windowsAnsiEventHandler) insertLines(param int) error {
+ return h.deleteLines(-param)
+}
+
+// scroll scrolls the provided scroll region by param lines. The scroll region is in buffer coordinates.
+func (h *windowsAnsiEventHandler) scroll(param int, sr scrollRegion, info *CONSOLE_SCREEN_BUFFER_INFO) error {
+ h.logf("scroll: scrollTop: %d, scrollBottom: %d", sr.top, sr.bottom)
+ h.logf("scroll: windowTop: %d, windowBottom: %d", info.Window.Top, info.Window.Bottom)
+
+ // Copy from and clip to the scroll region (full buffer width)
+ scrollRect := SMALL_RECT{
+ Top: sr.top,
+ Bottom: sr.bottom,
+ Left: 0,
+ Right: info.Size.X - 1,
+ }
+
+ // Origin to which area should be copied
+ destOrigin := COORD{
+ X: 0,
+ Y: sr.top - int16(param),
+ }
+
+ char := CHAR_INFO{
+ UnicodeChar: ' ',
+ Attributes: h.attributes,
+ }
+
+ if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) deleteCharacters(param int) error {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+ return h.scrollLine(param, info.CursorPosition, info)
+}
+
+func (h *windowsAnsiEventHandler) insertCharacters(param int) error {
+ return h.deleteCharacters(-param)
+}
+
+// scrollLine scrolls a line horizontally starting at the provided position by a number of columns.
+func (h *windowsAnsiEventHandler) scrollLine(columns int, position COORD, info *CONSOLE_SCREEN_BUFFER_INFO) error {
+ // Copy from and clip to the scroll region (full buffer width)
+ scrollRect := SMALL_RECT{
+ Top: position.Y,
+ Bottom: position.Y,
+ Left: position.X,
+ Right: info.Size.X - 1,
+ }
+
+ // Origin to which area should be copied
+ destOrigin := COORD{
+ X: position.X - int16(columns),
+ Y: position.Y,
+ }
+
+ char := CHAR_INFO{
+ UnicodeChar: ' ',
+ Attributes: h.attributes,
+ }
+
+ if err := ScrollConsoleScreenBuffer(h.fd, scrollRect, scrollRect, destOrigin, char); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go b/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go
new file mode 100644
index 000000000..afa7635d7
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/utilities.go
@@ -0,0 +1,9 @@
+// +build windows
+
+package winterm
+
+// AddInRange increments a value by the passed quantity while ensuring the values
+// always remain within the supplied min / max range.
+func addInRange(n int16, increment int16, min int16, max int16) int16 {
+ return ensureInRange(n+increment, min, max)
+}
diff --git a/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go
new file mode 100644
index 000000000..2d40fb75a
--- /dev/null
+++ b/vendor/github.com/Azure/go-ansiterm/winterm/win_event_handler.go
@@ -0,0 +1,743 @@
+// +build windows
+
+package winterm
+
+import (
+ "bytes"
+ "log"
+ "os"
+ "strconv"
+
+ "github.com/Azure/go-ansiterm"
+)
+
+type windowsAnsiEventHandler struct {
+ fd uintptr
+ file *os.File
+ infoReset *CONSOLE_SCREEN_BUFFER_INFO
+ sr scrollRegion
+ buffer bytes.Buffer
+ attributes uint16
+ inverted bool
+ wrapNext bool
+ drewMarginByte bool
+ originMode bool
+ marginByte byte
+ curInfo *CONSOLE_SCREEN_BUFFER_INFO
+ curPos COORD
+ logf func(string, ...interface{})
+}
+
+type Option func(*windowsAnsiEventHandler)
+
+func WithLogf(f func(string, ...interface{})) Option {
+ return func(w *windowsAnsiEventHandler) {
+ w.logf = f
+ }
+}
+
+func CreateWinEventHandler(fd uintptr, file *os.File, opts ...Option) ansiterm.AnsiEventHandler {
+ infoReset, err := GetConsoleScreenBufferInfo(fd)
+ if err != nil {
+ return nil
+ }
+
+ h := &windowsAnsiEventHandler{
+ fd: fd,
+ file: file,
+ infoReset: infoReset,
+ attributes: infoReset.Attributes,
+ }
+ for _, o := range opts {
+ o(h)
+ }
+
+ if isDebugEnv := os.Getenv(ansiterm.LogEnv); isDebugEnv == "1" {
+ logFile, _ := os.Create("winEventHandler.log")
+ logger := log.New(logFile, "", log.LstdFlags)
+ if h.logf != nil {
+ l := h.logf
+ h.logf = func(s string, v ...interface{}) {
+ l(s, v...)
+ logger.Printf(s, v...)
+ }
+ } else {
+ h.logf = logger.Printf
+ }
+ }
+
+ if h.logf == nil {
+ h.logf = func(string, ...interface{}) {}
+ }
+
+ return h
+}
+
+type scrollRegion struct {
+ top int16
+ bottom int16
+}
+
+// simulateLF simulates a LF or CR+LF by scrolling if necessary to handle the
+// current cursor position and scroll region settings, in which case it returns
+// true. If no special handling is necessary, then it does nothing and returns
+// false.
+//
+// In the false case, the caller should ensure that a carriage return
+// and line feed are inserted or that the text is otherwise wrapped.
+func (h *windowsAnsiEventHandler) simulateLF(includeCR bool) (bool, error) {
+ if h.wrapNext {
+ if err := h.Flush(); err != nil {
+ return false, err
+ }
+ h.clearWrap()
+ }
+ pos, info, err := h.getCurrentInfo()
+ if err != nil {
+ return false, err
+ }
+ sr := h.effectiveSr(info.Window)
+ if pos.Y == sr.bottom {
+ // Scrolling is necessary. Let Windows automatically scroll if the scrolling region
+ // is the full window.
+ if sr.top == info.Window.Top && sr.bottom == info.Window.Bottom {
+ if includeCR {
+ pos.X = 0
+ h.updatePos(pos)
+ }
+ return false, nil
+ }
+
+ // A custom scroll region is active. Scroll the window manually to simulate
+ // the LF.
+ if err := h.Flush(); err != nil {
+ return false, err
+ }
+ h.logf("Simulating LF inside scroll region")
+ if err := h.scrollUp(1); err != nil {
+ return false, err
+ }
+ if includeCR {
+ pos.X = 0
+ if err := SetConsoleCursorPosition(h.fd, pos); err != nil {
+ return false, err
+ }
+ }
+ return true, nil
+
+ } else if pos.Y < info.Window.Bottom {
+ // Let Windows handle the LF.
+ pos.Y++
+ if includeCR {
+ pos.X = 0
+ }
+ h.updatePos(pos)
+ return false, nil
+ } else {
+ // The cursor is at the bottom of the screen but outside the scroll
+ // region. Skip the LF.
+ h.logf("Simulating LF outside scroll region")
+ if includeCR {
+ if err := h.Flush(); err != nil {
+ return false, err
+ }
+ pos.X = 0
+ if err := SetConsoleCursorPosition(h.fd, pos); err != nil {
+ return false, err
+ }
+ }
+ return true, nil
+ }
+}
+
+// executeLF executes a LF without a CR.
+func (h *windowsAnsiEventHandler) executeLF() error {
+ handled, err := h.simulateLF(false)
+ if err != nil {
+ return err
+ }
+ if !handled {
+ // Windows LF will reset the cursor column position. Write the LF
+ // and restore the cursor position.
+ pos, _, err := h.getCurrentInfo()
+ if err != nil {
+ return err
+ }
+ h.buffer.WriteByte(ansiterm.ANSI_LINE_FEED)
+ if pos.X != 0 {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("Resetting cursor position for LF without CR")
+ if err := SetConsoleCursorPosition(h.fd, pos); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) Print(b byte) error {
+ if h.wrapNext {
+ h.buffer.WriteByte(h.marginByte)
+ h.clearWrap()
+ if _, err := h.simulateLF(true); err != nil {
+ return err
+ }
+ }
+ pos, info, err := h.getCurrentInfo()
+ if err != nil {
+ return err
+ }
+ if pos.X == info.Size.X-1 {
+ h.wrapNext = true
+ h.marginByte = b
+ } else {
+ pos.X++
+ h.updatePos(pos)
+ h.buffer.WriteByte(b)
+ }
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) Execute(b byte) error {
+ switch b {
+ case ansiterm.ANSI_TAB:
+ h.logf("Execute(TAB)")
+ // Move to the next tab stop, but preserve auto-wrap if already set.
+ if !h.wrapNext {
+ pos, info, err := h.getCurrentInfo()
+ if err != nil {
+ return err
+ }
+ pos.X = (pos.X + 8) - pos.X%8
+ if pos.X >= info.Size.X {
+ pos.X = info.Size.X - 1
+ }
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ if err := SetConsoleCursorPosition(h.fd, pos); err != nil {
+ return err
+ }
+ }
+ return nil
+
+ case ansiterm.ANSI_BEL:
+ h.buffer.WriteByte(ansiterm.ANSI_BEL)
+ return nil
+
+ case ansiterm.ANSI_BACKSPACE:
+ if h.wrapNext {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.clearWrap()
+ }
+ pos, _, err := h.getCurrentInfo()
+ if err != nil {
+ return err
+ }
+ if pos.X > 0 {
+ pos.X--
+ h.updatePos(pos)
+ h.buffer.WriteByte(ansiterm.ANSI_BACKSPACE)
+ }
+ return nil
+
+ case ansiterm.ANSI_VERTICAL_TAB, ansiterm.ANSI_FORM_FEED:
+ // Treat as true LF.
+ return h.executeLF()
+
+ case ansiterm.ANSI_LINE_FEED:
+ // Simulate a CR and LF for now since there is no way in go-ansiterm
+ // to tell if the LF should include CR (and more things break when it's
+ // missing than when it's incorrectly added).
+ handled, err := h.simulateLF(true)
+ if handled || err != nil {
+ return err
+ }
+ return h.buffer.WriteByte(ansiterm.ANSI_LINE_FEED)
+
+ case ansiterm.ANSI_CARRIAGE_RETURN:
+ if h.wrapNext {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.clearWrap()
+ }
+ pos, _, err := h.getCurrentInfo()
+ if err != nil {
+ return err
+ }
+ if pos.X != 0 {
+ pos.X = 0
+ h.updatePos(pos)
+ h.buffer.WriteByte(ansiterm.ANSI_CARRIAGE_RETURN)
+ }
+ return nil
+
+ default:
+ return nil
+ }
+}
+
+func (h *windowsAnsiEventHandler) CUU(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("CUU: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorVertical(-param)
+}
+
+func (h *windowsAnsiEventHandler) CUD(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("CUD: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorVertical(param)
+}
+
+func (h *windowsAnsiEventHandler) CUF(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("CUF: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorHorizontal(param)
+}
+
+func (h *windowsAnsiEventHandler) CUB(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("CUB: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorHorizontal(-param)
+}
+
+func (h *windowsAnsiEventHandler) CNL(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("CNL: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorLine(param)
+}
+
+func (h *windowsAnsiEventHandler) CPL(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("CPL: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorLine(-param)
+}
+
+func (h *windowsAnsiEventHandler) CHA(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("CHA: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.moveCursorColumn(param)
+}
+
+func (h *windowsAnsiEventHandler) VPA(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("VPA: [[%d]]", param)
+ h.clearWrap()
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+ window := h.getCursorWindow(info)
+ position := info.CursorPosition
+ position.Y = window.Top + int16(param) - 1
+ return h.setCursorPosition(position, window)
+}
+
+func (h *windowsAnsiEventHandler) CUP(row int, col int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("CUP: [[%d %d]]", row, col)
+ h.clearWrap()
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ window := h.getCursorWindow(info)
+ position := COORD{window.Left + int16(col) - 1, window.Top + int16(row) - 1}
+ return h.setCursorPosition(position, window)
+}
+
+func (h *windowsAnsiEventHandler) HVP(row int, col int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("HVP: [[%d %d]]", row, col)
+ h.clearWrap()
+ return h.CUP(row, col)
+}
+
+func (h *windowsAnsiEventHandler) DECTCEM(visible bool) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("DECTCEM: [%v]", []string{strconv.FormatBool(visible)})
+ h.clearWrap()
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) DECOM(enable bool) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("DECOM: [%v]", []string{strconv.FormatBool(enable)})
+ h.clearWrap()
+ h.originMode = enable
+ return h.CUP(1, 1)
+}
+
+func (h *windowsAnsiEventHandler) DECCOLM(use132 bool) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("DECCOLM: [%v]", []string{strconv.FormatBool(use132)})
+ h.clearWrap()
+ if err := h.ED(2); err != nil {
+ return err
+ }
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+ targetWidth := int16(80)
+ if use132 {
+ targetWidth = 132
+ }
+ if info.Size.X < targetWidth {
+ if err := SetConsoleScreenBufferSize(h.fd, COORD{targetWidth, info.Size.Y}); err != nil {
+ h.logf("set buffer failed: %v", err)
+ return err
+ }
+ }
+ window := info.Window
+ window.Left = 0
+ window.Right = targetWidth - 1
+ if err := SetConsoleWindowInfo(h.fd, true, window); err != nil {
+ h.logf("set window failed: %v", err)
+ return err
+ }
+ if info.Size.X > targetWidth {
+ if err := SetConsoleScreenBufferSize(h.fd, COORD{targetWidth, info.Size.Y}); err != nil {
+ h.logf("set buffer failed: %v", err)
+ return err
+ }
+ }
+ return SetConsoleCursorPosition(h.fd, COORD{0, 0})
+}
+
+func (h *windowsAnsiEventHandler) ED(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("ED: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+
+ // [J -- Erases from the cursor to the end of the screen, including the cursor position.
+ // [1J -- Erases from the beginning of the screen to the cursor, including the cursor position.
+ // [2J -- Erases the complete display. The cursor does not move.
+ // Notes:
+ // -- Clearing the entire buffer, versus just the Window, works best for Windows Consoles
+
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ var start COORD
+ var end COORD
+
+ switch param {
+ case 0:
+ start = info.CursorPosition
+ end = COORD{info.Size.X - 1, info.Size.Y - 1}
+
+ case 1:
+ start = COORD{0, 0}
+ end = info.CursorPosition
+
+ case 2:
+ start = COORD{0, 0}
+ end = COORD{info.Size.X - 1, info.Size.Y - 1}
+ }
+
+ err = h.clearRange(h.attributes, start, end)
+ if err != nil {
+ return err
+ }
+
+ // If the whole buffer was cleared, move the window to the top while preserving
+ // the window-relative cursor position.
+ if param == 2 {
+ pos := info.CursorPosition
+ window := info.Window
+ pos.Y -= window.Top
+ window.Bottom -= window.Top
+ window.Top = 0
+ if err := SetConsoleCursorPosition(h.fd, pos); err != nil {
+ return err
+ }
+ if err := SetConsoleWindowInfo(h.fd, true, window); err != nil {
+ return err
+ }
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) EL(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("EL: [%v]", strconv.Itoa(param))
+ h.clearWrap()
+
+ // [K -- Erases from the cursor to the end of the line, including the cursor position.
+ // [1K -- Erases from the beginning of the line to the cursor, including the cursor position.
+ // [2K -- Erases the complete line.
+
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ var start COORD
+ var end COORD
+
+ switch param {
+ case 0:
+ start = info.CursorPosition
+ end = COORD{info.Size.X, info.CursorPosition.Y}
+
+ case 1:
+ start = COORD{0, info.CursorPosition.Y}
+ end = info.CursorPosition
+
+ case 2:
+ start = COORD{0, info.CursorPosition.Y}
+ end = COORD{info.Size.X, info.CursorPosition.Y}
+ }
+
+ err = h.clearRange(h.attributes, start, end)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) IL(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("IL: [%v]", strconv.Itoa(param))
+ h.clearWrap()
+ return h.insertLines(param)
+}
+
+func (h *windowsAnsiEventHandler) DL(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("DL: [%v]", strconv.Itoa(param))
+ h.clearWrap()
+ return h.deleteLines(param)
+}
+
+func (h *windowsAnsiEventHandler) ICH(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("ICH: [%v]", strconv.Itoa(param))
+ h.clearWrap()
+ return h.insertCharacters(param)
+}
+
+func (h *windowsAnsiEventHandler) DCH(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("DCH: [%v]", strconv.Itoa(param))
+ h.clearWrap()
+ return h.deleteCharacters(param)
+}
+
+func (h *windowsAnsiEventHandler) SGR(params []int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ strings := []string{}
+ for _, v := range params {
+ strings = append(strings, strconv.Itoa(v))
+ }
+
+ h.logf("SGR: [%v]", strings)
+
+ if len(params) <= 0 {
+ h.attributes = h.infoReset.Attributes
+ h.inverted = false
+ } else {
+ for _, attr := range params {
+
+ if attr == ansiterm.ANSI_SGR_RESET {
+ h.attributes = h.infoReset.Attributes
+ h.inverted = false
+ continue
+ }
+
+ h.attributes, h.inverted = collectAnsiIntoWindowsAttributes(h.attributes, h.inverted, h.infoReset.Attributes, int16(attr))
+ }
+ }
+
+ attributes := h.attributes
+ if h.inverted {
+ attributes = invertAttributes(attributes)
+ }
+ err := SetConsoleTextAttribute(h.fd, attributes)
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) SU(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("SU: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.scrollUp(param)
+}
+
+func (h *windowsAnsiEventHandler) SD(param int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("SD: [%v]", []string{strconv.Itoa(param)})
+ h.clearWrap()
+ return h.scrollDown(param)
+}
+
+func (h *windowsAnsiEventHandler) DA(params []string) error {
+ h.logf("DA: [%v]", params)
+ // DA cannot be implemented because it must send data on the VT100 input stream,
+ // which is not available to go-ansiterm.
+ return nil
+}
+
+func (h *windowsAnsiEventHandler) DECSTBM(top int, bottom int) error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("DECSTBM: [%d, %d]", top, bottom)
+
+ // Windows is 0 indexed, Linux is 1 indexed
+ h.sr.top = int16(top - 1)
+ h.sr.bottom = int16(bottom - 1)
+
+ // This command also moves the cursor to the origin.
+ h.clearWrap()
+ return h.CUP(1, 1)
+}
+
+func (h *windowsAnsiEventHandler) RI() error {
+ if err := h.Flush(); err != nil {
+ return err
+ }
+ h.logf("RI: []")
+ h.clearWrap()
+
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ sr := h.effectiveSr(info.Window)
+ if info.CursorPosition.Y == sr.top {
+ return h.scrollDown(1)
+ }
+
+ return h.moveCursorVertical(-1)
+}
+
+func (h *windowsAnsiEventHandler) IND() error {
+ h.logf("IND: []")
+ return h.executeLF()
+}
+
+func (h *windowsAnsiEventHandler) Flush() error {
+ h.curInfo = nil
+ if h.buffer.Len() > 0 {
+ h.logf("Flush: [%s]", h.buffer.Bytes())
+ if _, err := h.buffer.WriteTo(h.file); err != nil {
+ return err
+ }
+ }
+
+ if h.wrapNext && !h.drewMarginByte {
+ h.logf("Flush: drawing margin byte '%c'", h.marginByte)
+
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return err
+ }
+
+ charInfo := []CHAR_INFO{{UnicodeChar: uint16(h.marginByte), Attributes: info.Attributes}}
+ size := COORD{1, 1}
+ position := COORD{0, 0}
+ region := SMALL_RECT{Left: info.CursorPosition.X, Top: info.CursorPosition.Y, Right: info.CursorPosition.X, Bottom: info.CursorPosition.Y}
+ if err := WriteConsoleOutput(h.fd, charInfo, size, position, ®ion); err != nil {
+ return err
+ }
+ h.drewMarginByte = true
+ }
+ return nil
+}
+
+// cacheConsoleInfo ensures that the current console screen information has been queried
+// since the last call to Flush(). It must be called before accessing h.curInfo or h.curPos.
+func (h *windowsAnsiEventHandler) getCurrentInfo() (COORD, *CONSOLE_SCREEN_BUFFER_INFO, error) {
+ if h.curInfo == nil {
+ info, err := GetConsoleScreenBufferInfo(h.fd)
+ if err != nil {
+ return COORD{}, nil, err
+ }
+ h.curInfo = info
+ h.curPos = info.CursorPosition
+ }
+ return h.curPos, h.curInfo, nil
+}
+
+func (h *windowsAnsiEventHandler) updatePos(pos COORD) {
+ if h.curInfo == nil {
+ panic("failed to call getCurrentInfo before calling updatePos")
+ }
+ h.curPos = pos
+}
+
+// clearWrap clears the state where the cursor is in the margin
+// waiting for the next character before wrapping the line. This must
+// be done before most operations that act on the cursor.
+func (h *windowsAnsiEventHandler) clearWrap() {
+ h.wrapNext = false
+ h.drewMarginByte = false
+}
diff --git a/vendor/github.com/Microsoft/go-winio/.gitattributes b/vendor/github.com/Microsoft/go-winio/.gitattributes
new file mode 100644
index 000000000..94f480de9
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/.gitattributes
@@ -0,0 +1 @@
+* text=auto eol=lf
\ No newline at end of file
diff --git a/vendor/github.com/Microsoft/go-winio/.gitignore b/vendor/github.com/Microsoft/go-winio/.gitignore
new file mode 100644
index 000000000..815e20660
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/.gitignore
@@ -0,0 +1,10 @@
+.vscode/
+
+*.exe
+
+# testing
+testdata
+
+# go workspaces
+go.work
+go.work.sum
diff --git a/vendor/github.com/Microsoft/go-winio/.golangci.yml b/vendor/github.com/Microsoft/go-winio/.golangci.yml
new file mode 100644
index 000000000..af403bb13
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/.golangci.yml
@@ -0,0 +1,144 @@
+run:
+ skip-dirs:
+ - pkg/etw/sample
+
+linters:
+ enable:
+ # style
+ - containedctx # struct contains a context
+ - dupl # duplicate code
+ - errname # erorrs are named correctly
+ - goconst # strings that should be constants
+ - godot # comments end in a period
+ - misspell
+ - nolintlint # "//nolint" directives are properly explained
+ - revive # golint replacement
+ - stylecheck # golint replacement, less configurable than revive
+ - unconvert # unnecessary conversions
+ - wastedassign
+
+ # bugs, performance, unused, etc ...
+ - contextcheck # function uses a non-inherited context
+ - errorlint # errors not wrapped for 1.13
+ - exhaustive # check exhaustiveness of enum switch statements
+ - gofmt # files are gofmt'ed
+ - gosec # security
+ - nestif # deeply nested ifs
+ - nilerr # returns nil even with non-nil error
+ - prealloc # slices that can be pre-allocated
+ - structcheck # unused struct fields
+ - unparam # unused function params
+
+issues:
+ exclude-rules:
+ # err is very often shadowed in nested scopes
+ - linters:
+ - govet
+ text: '^shadow: declaration of "err" shadows declaration'
+
+ # ignore long lines for skip autogen directives
+ - linters:
+ - revive
+ text: "^line-length-limit: "
+ source: "^//(go:generate|sys) "
+
+ # allow unjustified ignores of error checks in defer statements
+ - linters:
+ - nolintlint
+ text: "^directive `//nolint:errcheck` should provide explanation"
+ source: '^\s*defer '
+
+ # allow unjustified ignores of error lints for io.EOF
+ - linters:
+ - nolintlint
+ text: "^directive `//nolint:errorlint` should provide explanation"
+ source: '[=|!]= io.EOF'
+
+
+linters-settings:
+ govet:
+ enable-all: true
+ disable:
+ # struct order is often for Win32 compat
+ # also, ignore pointer bytes/GC issues for now until performance becomes an issue
+ - fieldalignment
+ check-shadowing: true
+ nolintlint:
+ allow-leading-space: false
+ require-explanation: true
+ require-specific: true
+ revive:
+ # revive is more configurable than static check, so likely the preferred alternative to static-check
+ # (once the perf issue is solved: https://github.com/golangci/golangci-lint/issues/2997)
+ enable-all-rules:
+ true
+ # https://github.com/mgechev/revive/blob/master/RULES_DESCRIPTIONS.md
+ rules:
+ # rules with required arguments
+ - name: argument-limit
+ disabled: true
+ - name: banned-characters
+ disabled: true
+ - name: cognitive-complexity
+ disabled: true
+ - name: cyclomatic
+ disabled: true
+ - name: file-header
+ disabled: true
+ - name: function-length
+ disabled: true
+ - name: function-result-limit
+ disabled: true
+ - name: max-public-structs
+ disabled: true
+ # geneally annoying rules
+ - name: add-constant # complains about any and all strings and integers
+ disabled: true
+ - name: confusing-naming # we frequently use "Foo()" and "foo()" together
+ disabled: true
+ - name: flag-parameter # excessive, and a common idiom we use
+ disabled: true
+ # general config
+ - name: line-length-limit
+ arguments:
+ - 140
+ - name: var-naming
+ arguments:
+ - []
+ - - CID
+ - CRI
+ - CTRD
+ - DACL
+ - DLL
+ - DOS
+ - ETW
+ - FSCTL
+ - GCS
+ - GMSA
+ - HCS
+ - HV
+ - IO
+ - LCOW
+ - LDAP
+ - LPAC
+ - LTSC
+ - MMIO
+ - NT
+ - OCI
+ - PMEM
+ - PWSH
+ - RX
+ - SACl
+ - SID
+ - SMB
+ - TX
+ - VHD
+ - VHDX
+ - VMID
+ - VPCI
+ - WCOW
+ - WIM
+ stylecheck:
+ checks:
+ - "all"
+ - "-ST1003" # use revive's var naming
diff --git a/vendor/github.com/Microsoft/go-winio/CODEOWNERS b/vendor/github.com/Microsoft/go-winio/CODEOWNERS
new file mode 100644
index 000000000..ae1b4942b
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/CODEOWNERS
@@ -0,0 +1 @@
+ * @microsoft/containerplat
diff --git a/vendor/github.com/Microsoft/go-winio/LICENSE b/vendor/github.com/Microsoft/go-winio/LICENSE
new file mode 100644
index 000000000..b8b569d77
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/LICENSE
@@ -0,0 +1,22 @@
+The MIT License (MIT)
+
+Copyright (c) 2015 Microsoft
+
+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/Microsoft/go-winio/README.md b/vendor/github.com/Microsoft/go-winio/README.md
new file mode 100644
index 000000000..7474b4f0b
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/README.md
@@ -0,0 +1,89 @@
+# go-winio [](https://github.com/microsoft/go-winio/actions/workflows/ci.yml)
+
+This repository contains utilities for efficiently performing Win32 IO operations in
+Go. Currently, this is focused on accessing named pipes and other file handles, and
+for using named pipes as a net transport.
+
+This code relies on IO completion ports to avoid blocking IO on system threads, allowing Go
+to reuse the thread to schedule another goroutine. This limits support to Windows Vista and
+newer operating systems. This is similar to the implementation of network sockets in Go's net
+package.
+
+Please see the LICENSE file for licensing information.
+
+## Contributing
+
+This project welcomes contributions and suggestions.
+Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that
+you have the right to, and actually do, grant us the rights to use your contribution.
+For details, visit [Microsoft CLA](https://cla.microsoft.com).
+
+When you submit a pull request, a CLA-bot will automatically determine whether you need to
+provide a CLA and decorate the PR appropriately (e.g., label, comment).
+Simply follow the instructions provided by the bot.
+You will only need to do this once across all repos using our CLA.
+
+Additionally, the pull request pipeline requires the following steps to be performed before
+mergining.
+
+### Code Sign-Off
+
+We require that contributors sign their commits using [`git commit --signoff`][git-commit-s]
+to certify they either authored the work themselves or otherwise have permission to use it in this project.
+
+A range of commits can be signed off using [`git rebase --signoff`][git-rebase-s].
+
+Please see [the developer certificate](https://developercertificate.org) for more info,
+as well as to make sure that you can attest to the rules listed.
+Our CI uses the DCO Github app to ensure that all commits in a given PR are signed-off.
+
+### Linting
+
+Code must pass a linting stage, which uses [`golangci-lint`][lint].
+The linting settings are stored in [`.golangci.yaml`](./.golangci.yaml), and can be run
+automatically with VSCode by adding the following to your workspace or folder settings:
+
+```json
+ "go.lintTool": "golangci-lint",
+ "go.lintOnSave": "package",
+```
+
+Additional editor [integrations options are also available][lint-ide].
+
+Alternatively, `golangci-lint` can be [installed locally][lint-install] and run from the repo root:
+
+```shell
+# use . or specify a path to only lint a package
+# to show all lint errors, use flags "--max-issues-per-linter=0 --max-same-issues=0"
+> golangci-lint run ./...
+```
+
+### Go Generate
+
+The pipeline checks that auto-generated code, via `go generate`, are up to date.
+
+This can be done for the entire repo:
+
+```shell
+> go generate ./...
+```
+
+## Code of Conduct
+
+This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
+For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
+contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
+
+## Special Thanks
+
+Thanks to [natefinch][natefinch] for the inspiration for this library.
+See [npipe](https://github.com/natefinch/npipe) for another named pipe implementation.
+
+[lint]: https://golangci-lint.run/
+[lint-ide]: https://golangci-lint.run/usage/integrations/#editor-integration
+[lint-install]: https://golangci-lint.run/usage/install/#local-installation
+
+[git-commit-s]: https://git-scm.com/docs/git-commit#Documentation/git-commit.txt--s
+[git-rebase-s]: https://git-scm.com/docs/git-rebase#Documentation/git-rebase.txt---signoff
+
+[natefinch]: https://github.com/natefinch
diff --git a/vendor/github.com/Microsoft/go-winio/SECURITY.md b/vendor/github.com/Microsoft/go-winio/SECURITY.md
new file mode 100644
index 000000000..869fdfe2b
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/SECURITY.md
@@ -0,0 +1,41 @@
+
+
+## Security
+
+Microsoft takes the security of our software products and services seriously, which includes all source code repositories managed through our GitHub organizations, which include [Microsoft](https://github.com/Microsoft), [Azure](https://github.com/Azure), [DotNet](https://github.com/dotnet), [AspNet](https://github.com/aspnet), [Xamarin](https://github.com/xamarin), and [our GitHub organizations](https://opensource.microsoft.com/).
+
+If you believe you have found a security vulnerability in any Microsoft-owned repository that meets [Microsoft's definition of a security vulnerability](https://aka.ms/opensource/security/definition), please report it to us as described below.
+
+## Reporting Security Issues
+
+**Please do not report security vulnerabilities through public GitHub issues.**
+
+Instead, please report them to the Microsoft Security Response Center (MSRC) at [https://msrc.microsoft.com/create-report](https://aka.ms/opensource/security/create-report).
+
+If you prefer to submit without logging in, send email to [secure@microsoft.com](mailto:secure@microsoft.com). If possible, encrypt your message with our PGP key; please download it from the [Microsoft Security Response Center PGP Key page](https://aka.ms/opensource/security/pgpkey).
+
+You should receive a response within 24 hours. If for some reason you do not, please follow up via email to ensure we received your original message. Additional information can be found at [microsoft.com/msrc](https://aka.ms/opensource/security/msrc).
+
+Please include the requested information listed below (as much as you can provide) to help us better understand the nature and scope of the possible issue:
+
+ * Type of issue (e.g. buffer overflow, SQL injection, cross-site scripting, etc.)
+ * Full paths of source file(s) related to the manifestation of the issue
+ * The location of the affected source code (tag/branch/commit or direct URL)
+ * Any special configuration required to reproduce the issue
+ * Step-by-step instructions to reproduce the issue
+ * Proof-of-concept or exploit code (if possible)
+ * Impact of the issue, including how an attacker might exploit the issue
+
+This information will help us triage your report more quickly.
+
+If you are reporting for a bug bounty, more complete reports can contribute to a higher bounty award. Please visit our [Microsoft Bug Bounty Program](https://aka.ms/opensource/security/bounty) page for more details about our active programs.
+
+## Preferred Languages
+
+We prefer all communications to be in English.
+
+## Policy
+
+Microsoft follows the principle of [Coordinated Vulnerability Disclosure](https://aka.ms/opensource/security/cvd).
+
+
diff --git a/vendor/github.com/Microsoft/go-winio/backup.go b/vendor/github.com/Microsoft/go-winio/backup.go
new file mode 100644
index 000000000..09621c884
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/backup.go
@@ -0,0 +1,290 @@
+//go:build windows
+// +build windows
+
+package winio
+
+import (
+ "encoding/binary"
+ "errors"
+ "fmt"
+ "io"
+ "os"
+ "runtime"
+ "syscall"
+ "unicode/utf16"
+
+ "golang.org/x/sys/windows"
+)
+
+//sys backupRead(h syscall.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupRead
+//sys backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) = BackupWrite
+
+const (
+ BackupData = uint32(iota + 1)
+ BackupEaData
+ BackupSecurity
+ BackupAlternateData
+ BackupLink
+ BackupPropertyData
+ BackupObjectId //revive:disable-line:var-naming ID, not Id
+ BackupReparseData
+ BackupSparseBlock
+ BackupTxfsData
+)
+
+const (
+ StreamSparseAttributes = uint32(8)
+)
+
+//nolint:revive // var-naming: ALL_CAPS
+const (
+ WRITE_DAC = windows.WRITE_DAC
+ WRITE_OWNER = windows.WRITE_OWNER
+ ACCESS_SYSTEM_SECURITY = windows.ACCESS_SYSTEM_SECURITY
+)
+
+// BackupHeader represents a backup stream of a file.
+type BackupHeader struct {
+ //revive:disable-next-line:var-naming ID, not Id
+ Id uint32 // The backup stream ID
+ Attributes uint32 // Stream attributes
+ Size int64 // The size of the stream in bytes
+ Name string // The name of the stream (for BackupAlternateData only).
+ Offset int64 // The offset of the stream in the file (for BackupSparseBlock only).
+}
+
+type win32StreamID struct {
+ StreamID uint32
+ Attributes uint32
+ Size uint64
+ NameSize uint32
+}
+
+// BackupStreamReader reads from a stream produced by the BackupRead Win32 API and produces a series
+// of BackupHeader values.
+type BackupStreamReader struct {
+ r io.Reader
+ bytesLeft int64
+}
+
+// NewBackupStreamReader produces a BackupStreamReader from any io.Reader.
+func NewBackupStreamReader(r io.Reader) *BackupStreamReader {
+ return &BackupStreamReader{r, 0}
+}
+
+// Next returns the next backup stream and prepares for calls to Read(). It skips the remainder of the current stream if
+// it was not completely read.
+func (r *BackupStreamReader) Next() (*BackupHeader, error) {
+ if r.bytesLeft > 0 { //nolint:nestif // todo: flatten this
+ if s, ok := r.r.(io.Seeker); ok {
+ // Make sure Seek on io.SeekCurrent sometimes succeeds
+ // before trying the actual seek.
+ if _, err := s.Seek(0, io.SeekCurrent); err == nil {
+ if _, err = s.Seek(r.bytesLeft, io.SeekCurrent); err != nil {
+ return nil, err
+ }
+ r.bytesLeft = 0
+ }
+ }
+ if _, err := io.Copy(io.Discard, r); err != nil {
+ return nil, err
+ }
+ }
+ var wsi win32StreamID
+ if err := binary.Read(r.r, binary.LittleEndian, &wsi); err != nil {
+ return nil, err
+ }
+ hdr := &BackupHeader{
+ Id: wsi.StreamID,
+ Attributes: wsi.Attributes,
+ Size: int64(wsi.Size),
+ }
+ if wsi.NameSize != 0 {
+ name := make([]uint16, int(wsi.NameSize/2))
+ if err := binary.Read(r.r, binary.LittleEndian, name); err != nil {
+ return nil, err
+ }
+ hdr.Name = syscall.UTF16ToString(name)
+ }
+ if wsi.StreamID == BackupSparseBlock {
+ if err := binary.Read(r.r, binary.LittleEndian, &hdr.Offset); err != nil {
+ return nil, err
+ }
+ hdr.Size -= 8
+ }
+ r.bytesLeft = hdr.Size
+ return hdr, nil
+}
+
+// Read reads from the current backup stream.
+func (r *BackupStreamReader) Read(b []byte) (int, error) {
+ if r.bytesLeft == 0 {
+ return 0, io.EOF
+ }
+ if int64(len(b)) > r.bytesLeft {
+ b = b[:r.bytesLeft]
+ }
+ n, err := r.r.Read(b)
+ r.bytesLeft -= int64(n)
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ } else if r.bytesLeft == 0 && err == nil {
+ err = io.EOF
+ }
+ return n, err
+}
+
+// BackupStreamWriter writes a stream compatible with the BackupWrite Win32 API.
+type BackupStreamWriter struct {
+ w io.Writer
+ bytesLeft int64
+}
+
+// NewBackupStreamWriter produces a BackupStreamWriter on top of an io.Writer.
+func NewBackupStreamWriter(w io.Writer) *BackupStreamWriter {
+ return &BackupStreamWriter{w, 0}
+}
+
+// WriteHeader writes the next backup stream header and prepares for calls to Write().
+func (w *BackupStreamWriter) WriteHeader(hdr *BackupHeader) error {
+ if w.bytesLeft != 0 {
+ return fmt.Errorf("missing %d bytes", w.bytesLeft)
+ }
+ name := utf16.Encode([]rune(hdr.Name))
+ wsi := win32StreamID{
+ StreamID: hdr.Id,
+ Attributes: hdr.Attributes,
+ Size: uint64(hdr.Size),
+ NameSize: uint32(len(name) * 2),
+ }
+ if hdr.Id == BackupSparseBlock {
+ // Include space for the int64 block offset
+ wsi.Size += 8
+ }
+ if err := binary.Write(w.w, binary.LittleEndian, &wsi); err != nil {
+ return err
+ }
+ if len(name) != 0 {
+ if err := binary.Write(w.w, binary.LittleEndian, name); err != nil {
+ return err
+ }
+ }
+ if hdr.Id == BackupSparseBlock {
+ if err := binary.Write(w.w, binary.LittleEndian, hdr.Offset); err != nil {
+ return err
+ }
+ }
+ w.bytesLeft = hdr.Size
+ return nil
+}
+
+// Write writes to the current backup stream.
+func (w *BackupStreamWriter) Write(b []byte) (int, error) {
+ if w.bytesLeft < int64(len(b)) {
+ return 0, fmt.Errorf("too many bytes by %d", int64(len(b))-w.bytesLeft)
+ }
+ n, err := w.w.Write(b)
+ w.bytesLeft -= int64(n)
+ return n, err
+}
+
+// BackupFileReader provides an io.ReadCloser interface on top of the BackupRead Win32 API.
+type BackupFileReader struct {
+ f *os.File
+ includeSecurity bool
+ ctx uintptr
+}
+
+// NewBackupFileReader returns a new BackupFileReader from a file handle. If includeSecurity is true,
+// Read will attempt to read the security descriptor of the file.
+func NewBackupFileReader(f *os.File, includeSecurity bool) *BackupFileReader {
+ r := &BackupFileReader{f, includeSecurity, 0}
+ return r
+}
+
+// Read reads a backup stream from the file by calling the Win32 API BackupRead().
+func (r *BackupFileReader) Read(b []byte) (int, error) {
+ var bytesRead uint32
+ err := backupRead(syscall.Handle(r.f.Fd()), b, &bytesRead, false, r.includeSecurity, &r.ctx)
+ if err != nil {
+ return 0, &os.PathError{Op: "BackupRead", Path: r.f.Name(), Err: err}
+ }
+ runtime.KeepAlive(r.f)
+ if bytesRead == 0 {
+ return 0, io.EOF
+ }
+ return int(bytesRead), nil
+}
+
+// Close frees Win32 resources associated with the BackupFileReader. It does not close
+// the underlying file.
+func (r *BackupFileReader) Close() error {
+ if r.ctx != 0 {
+ _ = backupRead(syscall.Handle(r.f.Fd()), nil, nil, true, false, &r.ctx)
+ runtime.KeepAlive(r.f)
+ r.ctx = 0
+ }
+ return nil
+}
+
+// BackupFileWriter provides an io.WriteCloser interface on top of the BackupWrite Win32 API.
+type BackupFileWriter struct {
+ f *os.File
+ includeSecurity bool
+ ctx uintptr
+}
+
+// NewBackupFileWriter returns a new BackupFileWriter from a file handle. If includeSecurity is true,
+// Write() will attempt to restore the security descriptor from the stream.
+func NewBackupFileWriter(f *os.File, includeSecurity bool) *BackupFileWriter {
+ w := &BackupFileWriter{f, includeSecurity, 0}
+ return w
+}
+
+// Write restores a portion of the file using the provided backup stream.
+func (w *BackupFileWriter) Write(b []byte) (int, error) {
+ var bytesWritten uint32
+ err := backupWrite(syscall.Handle(w.f.Fd()), b, &bytesWritten, false, w.includeSecurity, &w.ctx)
+ if err != nil {
+ return 0, &os.PathError{Op: "BackupWrite", Path: w.f.Name(), Err: err}
+ }
+ runtime.KeepAlive(w.f)
+ if int(bytesWritten) != len(b) {
+ return int(bytesWritten), errors.New("not all bytes could be written")
+ }
+ return len(b), nil
+}
+
+// Close frees Win32 resources associated with the BackupFileWriter. It does not
+// close the underlying file.
+func (w *BackupFileWriter) Close() error {
+ if w.ctx != 0 {
+ _ = backupWrite(syscall.Handle(w.f.Fd()), nil, nil, true, false, &w.ctx)
+ runtime.KeepAlive(w.f)
+ w.ctx = 0
+ }
+ return nil
+}
+
+// OpenForBackup opens a file or directory, potentially skipping access checks if the backup
+// or restore privileges have been acquired.
+//
+// If the file opened was a directory, it cannot be used with Readdir().
+func OpenForBackup(path string, access uint32, share uint32, createmode uint32) (*os.File, error) {
+ winPath, err := syscall.UTF16FromString(path)
+ if err != nil {
+ return nil, err
+ }
+ h, err := syscall.CreateFile(&winPath[0],
+ access,
+ share,
+ nil,
+ createmode,
+ syscall.FILE_FLAG_BACKUP_SEMANTICS|syscall.FILE_FLAG_OPEN_REPARSE_POINT,
+ 0)
+ if err != nil {
+ err = &os.PathError{Op: "open", Path: path, Err: err}
+ return nil, err
+ }
+ return os.NewFile(uintptr(h), path), nil
+}
diff --git a/vendor/github.com/Microsoft/go-winio/doc.go b/vendor/github.com/Microsoft/go-winio/doc.go
new file mode 100644
index 000000000..1f5bfe2d5
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/doc.go
@@ -0,0 +1,22 @@
+// This package provides utilities for efficiently performing Win32 IO operations in Go.
+// Currently, this package is provides support for genreal IO and management of
+// - named pipes
+// - files
+// - [Hyper-V sockets]
+//
+// This code is similar to Go's [net] package, and uses IO completion ports to avoid
+// blocking IO on system threads, allowing Go to reuse the thread to schedule other goroutines.
+//
+// This limits support to Windows Vista and newer operating systems.
+//
+// Additionally, this package provides support for:
+// - creating and managing GUIDs
+// - writing to [ETW]
+// - opening and manageing VHDs
+// - parsing [Windows Image files]
+// - auto-generating Win32 API code
+//
+// [Hyper-V sockets]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service
+// [ETW]: https://docs.microsoft.com/en-us/windows-hardware/drivers/devtest/event-tracing-for-windows--etw-
+// [Windows Image files]: https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/work-with-windows-images
+package winio
diff --git a/vendor/github.com/Microsoft/go-winio/ea.go b/vendor/github.com/Microsoft/go-winio/ea.go
new file mode 100644
index 000000000..e104dbdfd
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/ea.go
@@ -0,0 +1,137 @@
+package winio
+
+import (
+ "bytes"
+ "encoding/binary"
+ "errors"
+)
+
+type fileFullEaInformation struct {
+ NextEntryOffset uint32
+ Flags uint8
+ NameLength uint8
+ ValueLength uint16
+}
+
+var (
+ fileFullEaInformationSize = binary.Size(&fileFullEaInformation{})
+
+ errInvalidEaBuffer = errors.New("invalid extended attribute buffer")
+ errEaNameTooLarge = errors.New("extended attribute name too large")
+ errEaValueTooLarge = errors.New("extended attribute value too large")
+)
+
+// ExtendedAttribute represents a single Windows EA.
+type ExtendedAttribute struct {
+ Name string
+ Value []byte
+ Flags uint8
+}
+
+func parseEa(b []byte) (ea ExtendedAttribute, nb []byte, err error) {
+ var info fileFullEaInformation
+ err = binary.Read(bytes.NewReader(b), binary.LittleEndian, &info)
+ if err != nil {
+ err = errInvalidEaBuffer
+ return ea, nb, err
+ }
+
+ nameOffset := fileFullEaInformationSize
+ nameLen := int(info.NameLength)
+ valueOffset := nameOffset + int(info.NameLength) + 1
+ valueLen := int(info.ValueLength)
+ nextOffset := int(info.NextEntryOffset)
+ if valueLen+valueOffset > len(b) || nextOffset < 0 || nextOffset > len(b) {
+ err = errInvalidEaBuffer
+ return ea, nb, err
+ }
+
+ ea.Name = string(b[nameOffset : nameOffset+nameLen])
+ ea.Value = b[valueOffset : valueOffset+valueLen]
+ ea.Flags = info.Flags
+ if info.NextEntryOffset != 0 {
+ nb = b[info.NextEntryOffset:]
+ }
+ return ea, nb, err
+}
+
+// DecodeExtendedAttributes decodes a list of EAs from a FILE_FULL_EA_INFORMATION
+// buffer retrieved from BackupRead, ZwQueryEaFile, etc.
+func DecodeExtendedAttributes(b []byte) (eas []ExtendedAttribute, err error) {
+ for len(b) != 0 {
+ ea, nb, err := parseEa(b)
+ if err != nil {
+ return nil, err
+ }
+
+ eas = append(eas, ea)
+ b = nb
+ }
+ return eas, err
+}
+
+func writeEa(buf *bytes.Buffer, ea *ExtendedAttribute, last bool) error {
+ if int(uint8(len(ea.Name))) != len(ea.Name) {
+ return errEaNameTooLarge
+ }
+ if int(uint16(len(ea.Value))) != len(ea.Value) {
+ return errEaValueTooLarge
+ }
+ entrySize := uint32(fileFullEaInformationSize + len(ea.Name) + 1 + len(ea.Value))
+ withPadding := (entrySize + 3) &^ 3
+ nextOffset := uint32(0)
+ if !last {
+ nextOffset = withPadding
+ }
+ info := fileFullEaInformation{
+ NextEntryOffset: nextOffset,
+ Flags: ea.Flags,
+ NameLength: uint8(len(ea.Name)),
+ ValueLength: uint16(len(ea.Value)),
+ }
+
+ err := binary.Write(buf, binary.LittleEndian, &info)
+ if err != nil {
+ return err
+ }
+
+ _, err = buf.Write([]byte(ea.Name))
+ if err != nil {
+ return err
+ }
+
+ err = buf.WriteByte(0)
+ if err != nil {
+ return err
+ }
+
+ _, err = buf.Write(ea.Value)
+ if err != nil {
+ return err
+ }
+
+ _, err = buf.Write([]byte{0, 0, 0}[0 : withPadding-entrySize])
+ if err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// EncodeExtendedAttributes encodes a list of EAs into a FILE_FULL_EA_INFORMATION
+// buffer for use with BackupWrite, ZwSetEaFile, etc.
+func EncodeExtendedAttributes(eas []ExtendedAttribute) ([]byte, error) {
+ var buf bytes.Buffer
+ for i := range eas {
+ last := false
+ if i == len(eas)-1 {
+ last = true
+ }
+
+ err := writeEa(&buf, &eas[i], last)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return buf.Bytes(), nil
+}
diff --git a/vendor/github.com/Microsoft/go-winio/file.go b/vendor/github.com/Microsoft/go-winio/file.go
new file mode 100644
index 000000000..175a99d3f
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/file.go
@@ -0,0 +1,331 @@
+//go:build windows
+// +build windows
+
+package winio
+
+import (
+ "errors"
+ "io"
+ "runtime"
+ "sync"
+ "sync/atomic"
+ "syscall"
+ "time"
+
+ "golang.org/x/sys/windows"
+)
+
+//sys cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) = CancelIoEx
+//sys createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) = CreateIoCompletionPort
+//sys getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) = GetQueuedCompletionStatus
+//sys setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err error) = SetFileCompletionNotificationModes
+//sys wsaGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) = ws2_32.WSAGetOverlappedResult
+
+type atomicBool int32
+
+func (b *atomicBool) isSet() bool { return atomic.LoadInt32((*int32)(b)) != 0 }
+func (b *atomicBool) setFalse() { atomic.StoreInt32((*int32)(b), 0) }
+func (b *atomicBool) setTrue() { atomic.StoreInt32((*int32)(b), 1) }
+
+//revive:disable-next-line:predeclared Keep "new" to maintain consistency with "atomic" pkg
+func (b *atomicBool) swap(new bool) bool {
+ var newInt int32
+ if new {
+ newInt = 1
+ }
+ return atomic.SwapInt32((*int32)(b), newInt) == 1
+}
+
+var (
+ ErrFileClosed = errors.New("file has already been closed")
+ ErrTimeout = &timeoutError{}
+)
+
+type timeoutError struct{}
+
+func (*timeoutError) Error() string { return "i/o timeout" }
+func (*timeoutError) Timeout() bool { return true }
+func (*timeoutError) Temporary() bool { return true }
+
+type timeoutChan chan struct{}
+
+var ioInitOnce sync.Once
+var ioCompletionPort syscall.Handle
+
+// ioResult contains the result of an asynchronous IO operation.
+type ioResult struct {
+ bytes uint32
+ err error
+}
+
+// ioOperation represents an outstanding asynchronous Win32 IO.
+type ioOperation struct {
+ o syscall.Overlapped
+ ch chan ioResult
+}
+
+func initIO() {
+ h, err := createIoCompletionPort(syscall.InvalidHandle, 0, 0, 0xffffffff)
+ if err != nil {
+ panic(err)
+ }
+ ioCompletionPort = h
+ go ioCompletionProcessor(h)
+}
+
+// win32File implements Reader, Writer, and Closer on a Win32 handle without blocking in a syscall.
+// It takes ownership of this handle and will close it if it is garbage collected.
+type win32File struct {
+ handle syscall.Handle
+ wg sync.WaitGroup
+ wgLock sync.RWMutex
+ closing atomicBool
+ socket bool
+ readDeadline deadlineHandler
+ writeDeadline deadlineHandler
+}
+
+type deadlineHandler struct {
+ setLock sync.Mutex
+ channel timeoutChan
+ channelLock sync.RWMutex
+ timer *time.Timer
+ timedout atomicBool
+}
+
+// makeWin32File makes a new win32File from an existing file handle.
+func makeWin32File(h syscall.Handle) (*win32File, error) {
+ f := &win32File{handle: h}
+ ioInitOnce.Do(initIO)
+ _, err := createIoCompletionPort(h, ioCompletionPort, 0, 0xffffffff)
+ if err != nil {
+ return nil, err
+ }
+ err = setFileCompletionNotificationModes(h, windows.FILE_SKIP_COMPLETION_PORT_ON_SUCCESS|windows.FILE_SKIP_SET_EVENT_ON_HANDLE)
+ if err != nil {
+ return nil, err
+ }
+ f.readDeadline.channel = make(timeoutChan)
+ f.writeDeadline.channel = make(timeoutChan)
+ return f, nil
+}
+
+func MakeOpenFile(h syscall.Handle) (io.ReadWriteCloser, error) {
+ // If we return the result of makeWin32File directly, it can result in an
+ // interface-wrapped nil, rather than a nil interface value.
+ f, err := makeWin32File(h)
+ if err != nil {
+ return nil, err
+ }
+ return f, nil
+}
+
+// closeHandle closes the resources associated with a Win32 handle.
+func (f *win32File) closeHandle() {
+ f.wgLock.Lock()
+ // Atomically set that we are closing, releasing the resources only once.
+ if !f.closing.swap(true) {
+ f.wgLock.Unlock()
+ // cancel all IO and wait for it to complete
+ _ = cancelIoEx(f.handle, nil)
+ f.wg.Wait()
+ // at this point, no new IO can start
+ syscall.Close(f.handle)
+ f.handle = 0
+ } else {
+ f.wgLock.Unlock()
+ }
+}
+
+// Close closes a win32File.
+func (f *win32File) Close() error {
+ f.closeHandle()
+ return nil
+}
+
+// IsClosed checks if the file has been closed.
+func (f *win32File) IsClosed() bool {
+ return f.closing.isSet()
+}
+
+// prepareIO prepares for a new IO operation.
+// The caller must call f.wg.Done() when the IO is finished, prior to Close() returning.
+func (f *win32File) prepareIO() (*ioOperation, error) {
+ f.wgLock.RLock()
+ if f.closing.isSet() {
+ f.wgLock.RUnlock()
+ return nil, ErrFileClosed
+ }
+ f.wg.Add(1)
+ f.wgLock.RUnlock()
+ c := &ioOperation{}
+ c.ch = make(chan ioResult)
+ return c, nil
+}
+
+// ioCompletionProcessor processes completed async IOs forever.
+func ioCompletionProcessor(h syscall.Handle) {
+ for {
+ var bytes uint32
+ var key uintptr
+ var op *ioOperation
+ err := getQueuedCompletionStatus(h, &bytes, &key, &op, syscall.INFINITE)
+ if op == nil {
+ panic(err)
+ }
+ op.ch <- ioResult{bytes, err}
+ }
+}
+
+// todo: helsaawy - create an asyncIO version that takes a context
+
+// asyncIO processes the return value from ReadFile or WriteFile, blocking until
+// the operation has actually completed.
+func (f *win32File) asyncIO(c *ioOperation, d *deadlineHandler, bytes uint32, err error) (int, error) {
+ if err != syscall.ERROR_IO_PENDING { //nolint:errorlint // err is Errno
+ return int(bytes), err
+ }
+
+ if f.closing.isSet() {
+ _ = cancelIoEx(f.handle, &c.o)
+ }
+
+ var timeout timeoutChan
+ if d != nil {
+ d.channelLock.Lock()
+ timeout = d.channel
+ d.channelLock.Unlock()
+ }
+
+ var r ioResult
+ select {
+ case r = <-c.ch:
+ err = r.err
+ if err == syscall.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno
+ if f.closing.isSet() {
+ err = ErrFileClosed
+ }
+ } else if err != nil && f.socket {
+ // err is from Win32. Query the overlapped structure to get the winsock error.
+ var bytes, flags uint32
+ err = wsaGetOverlappedResult(f.handle, &c.o, &bytes, false, &flags)
+ }
+ case <-timeout:
+ _ = cancelIoEx(f.handle, &c.o)
+ r = <-c.ch
+ err = r.err
+ if err == syscall.ERROR_OPERATION_ABORTED { //nolint:errorlint // err is Errno
+ err = ErrTimeout
+ }
+ }
+
+ // runtime.KeepAlive is needed, as c is passed via native
+ // code to ioCompletionProcessor, c must remain alive
+ // until the channel read is complete.
+ // todo: (de)allocate *ioOperation via win32 heap functions, instead of needing to KeepAlive?
+ runtime.KeepAlive(c)
+ return int(r.bytes), err
+}
+
+// Read reads from a file handle.
+func (f *win32File) Read(b []byte) (int, error) {
+ c, err := f.prepareIO()
+ if err != nil {
+ return 0, err
+ }
+ defer f.wg.Done()
+
+ if f.readDeadline.timedout.isSet() {
+ return 0, ErrTimeout
+ }
+
+ var bytes uint32
+ err = syscall.ReadFile(f.handle, b, &bytes, &c.o)
+ n, err := f.asyncIO(c, &f.readDeadline, bytes, err)
+ runtime.KeepAlive(b)
+
+ // Handle EOF conditions.
+ if err == nil && n == 0 && len(b) != 0 {
+ return 0, io.EOF
+ } else if err == syscall.ERROR_BROKEN_PIPE { //nolint:errorlint // err is Errno
+ return 0, io.EOF
+ } else {
+ return n, err
+ }
+}
+
+// Write writes to a file handle.
+func (f *win32File) Write(b []byte) (int, error) {
+ c, err := f.prepareIO()
+ if err != nil {
+ return 0, err
+ }
+ defer f.wg.Done()
+
+ if f.writeDeadline.timedout.isSet() {
+ return 0, ErrTimeout
+ }
+
+ var bytes uint32
+ err = syscall.WriteFile(f.handle, b, &bytes, &c.o)
+ n, err := f.asyncIO(c, &f.writeDeadline, bytes, err)
+ runtime.KeepAlive(b)
+ return n, err
+}
+
+func (f *win32File) SetReadDeadline(deadline time.Time) error {
+ return f.readDeadline.set(deadline)
+}
+
+func (f *win32File) SetWriteDeadline(deadline time.Time) error {
+ return f.writeDeadline.set(deadline)
+}
+
+func (f *win32File) Flush() error {
+ return syscall.FlushFileBuffers(f.handle)
+}
+
+func (f *win32File) Fd() uintptr {
+ return uintptr(f.handle)
+}
+
+func (d *deadlineHandler) set(deadline time.Time) error {
+ d.setLock.Lock()
+ defer d.setLock.Unlock()
+
+ if d.timer != nil {
+ if !d.timer.Stop() {
+ <-d.channel
+ }
+ d.timer = nil
+ }
+ d.timedout.setFalse()
+
+ select {
+ case <-d.channel:
+ d.channelLock.Lock()
+ d.channel = make(chan struct{})
+ d.channelLock.Unlock()
+ default:
+ }
+
+ if deadline.IsZero() {
+ return nil
+ }
+
+ timeoutIO := func() {
+ d.timedout.setTrue()
+ close(d.channel)
+ }
+
+ now := time.Now()
+ duration := deadline.Sub(now)
+ if deadline.After(now) {
+ // Deadline is in the future, set a timer to wait
+ d.timer = time.AfterFunc(duration, timeoutIO)
+ } else {
+ // Deadline is in the past. Cancel all pending IO now.
+ timeoutIO()
+ }
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/go-winio/fileinfo.go b/vendor/github.com/Microsoft/go-winio/fileinfo.go
new file mode 100644
index 000000000..702950e72
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/fileinfo.go
@@ -0,0 +1,92 @@
+//go:build windows
+// +build windows
+
+package winio
+
+import (
+ "os"
+ "runtime"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+// FileBasicInfo contains file access time and file attributes information.
+type FileBasicInfo struct {
+ CreationTime, LastAccessTime, LastWriteTime, ChangeTime windows.Filetime
+ FileAttributes uint32
+ _ uint32 // padding
+}
+
+// GetFileBasicInfo retrieves times and attributes for a file.
+func GetFileBasicInfo(f *os.File) (*FileBasicInfo, error) {
+ bi := &FileBasicInfo{}
+ if err := windows.GetFileInformationByHandleEx(
+ windows.Handle(f.Fd()),
+ windows.FileBasicInfo,
+ (*byte)(unsafe.Pointer(bi)),
+ uint32(unsafe.Sizeof(*bi)),
+ ); err != nil {
+ return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
+ }
+ runtime.KeepAlive(f)
+ return bi, nil
+}
+
+// SetFileBasicInfo sets times and attributes for a file.
+func SetFileBasicInfo(f *os.File, bi *FileBasicInfo) error {
+ if err := windows.SetFileInformationByHandle(
+ windows.Handle(f.Fd()),
+ windows.FileBasicInfo,
+ (*byte)(unsafe.Pointer(bi)),
+ uint32(unsafe.Sizeof(*bi)),
+ ); err != nil {
+ return &os.PathError{Op: "SetFileInformationByHandle", Path: f.Name(), Err: err}
+ }
+ runtime.KeepAlive(f)
+ return nil
+}
+
+// FileStandardInfo contains extended information for the file.
+// FILE_STANDARD_INFO in WinBase.h
+// https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-file_standard_info
+type FileStandardInfo struct {
+ AllocationSize, EndOfFile int64
+ NumberOfLinks uint32
+ DeletePending, Directory bool
+}
+
+// GetFileStandardInfo retrieves ended information for the file.
+func GetFileStandardInfo(f *os.File) (*FileStandardInfo, error) {
+ si := &FileStandardInfo{}
+ if err := windows.GetFileInformationByHandleEx(windows.Handle(f.Fd()),
+ windows.FileStandardInfo,
+ (*byte)(unsafe.Pointer(si)),
+ uint32(unsafe.Sizeof(*si))); err != nil {
+ return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
+ }
+ runtime.KeepAlive(f)
+ return si, nil
+}
+
+// FileIDInfo contains the volume serial number and file ID for a file. This pair should be
+// unique on a system.
+type FileIDInfo struct {
+ VolumeSerialNumber uint64
+ FileID [16]byte
+}
+
+// GetFileID retrieves the unique (volume, file ID) pair for a file.
+func GetFileID(f *os.File) (*FileIDInfo, error) {
+ fileID := &FileIDInfo{}
+ if err := windows.GetFileInformationByHandleEx(
+ windows.Handle(f.Fd()),
+ windows.FileIdInfo,
+ (*byte)(unsafe.Pointer(fileID)),
+ uint32(unsafe.Sizeof(*fileID)),
+ ); err != nil {
+ return nil, &os.PathError{Op: "GetFileInformationByHandleEx", Path: f.Name(), Err: err}
+ }
+ runtime.KeepAlive(f)
+ return fileID, nil
+}
diff --git a/vendor/github.com/Microsoft/go-winio/hvsock.go b/vendor/github.com/Microsoft/go-winio/hvsock.go
new file mode 100644
index 000000000..52f1c280f
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/hvsock.go
@@ -0,0 +1,575 @@
+//go:build windows
+// +build windows
+
+package winio
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "net"
+ "os"
+ "syscall"
+ "time"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+
+ "github.com/Microsoft/go-winio/internal/socket"
+ "github.com/Microsoft/go-winio/pkg/guid"
+)
+
+const afHVSock = 34 // AF_HYPERV
+
+// Well known Service and VM IDs
+//https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/user-guide/make-integration-service#vmid-wildcards
+
+// HvsockGUIDWildcard is the wildcard VmId for accepting connections from all partitions.
+func HvsockGUIDWildcard() guid.GUID { // 00000000-0000-0000-0000-000000000000
+ return guid.GUID{}
+}
+
+// HvsockGUIDBroadcast is the wildcard VmId for broadcasting sends to all partitions.
+func HvsockGUIDBroadcast() guid.GUID { //ffffffff-ffff-ffff-ffff-ffffffffffff
+ return guid.GUID{
+ Data1: 0xffffffff,
+ Data2: 0xffff,
+ Data3: 0xffff,
+ Data4: [8]uint8{0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff},
+ }
+}
+
+// HvsockGUIDLoopback is the Loopback VmId for accepting connections to the same partition as the connector.
+func HvsockGUIDLoopback() guid.GUID { // e0e16197-dd56-4a10-9195-5ee7a155a838
+ return guid.GUID{
+ Data1: 0xe0e16197,
+ Data2: 0xdd56,
+ Data3: 0x4a10,
+ Data4: [8]uint8{0x91, 0x95, 0x5e, 0xe7, 0xa1, 0x55, 0xa8, 0x38},
+ }
+}
+
+// HvsockGUIDSiloHost is the address of a silo's host partition:
+// - The silo host of a hosted silo is the utility VM.
+// - The silo host of a silo on a physical host is the physical host.
+func HvsockGUIDSiloHost() guid.GUID { // 36bd0c5c-7276-4223-88ba-7d03b654c568
+ return guid.GUID{
+ Data1: 0x36bd0c5c,
+ Data2: 0x7276,
+ Data3: 0x4223,
+ Data4: [8]byte{0x88, 0xba, 0x7d, 0x03, 0xb6, 0x54, 0xc5, 0x68},
+ }
+}
+
+// HvsockGUIDChildren is the wildcard VmId for accepting connections from the connector's child partitions.
+func HvsockGUIDChildren() guid.GUID { // 90db8b89-0d35-4f79-8ce9-49ea0ac8b7cd
+ return guid.GUID{
+ Data1: 0x90db8b89,
+ Data2: 0xd35,
+ Data3: 0x4f79,
+ Data4: [8]uint8{0x8c, 0xe9, 0x49, 0xea, 0xa, 0xc8, 0xb7, 0xcd},
+ }
+}
+
+// HvsockGUIDParent is the wildcard VmId for accepting connections from the connector's parent partition.
+// Listening on this VmId accepts connection from:
+// - Inside silos: silo host partition.
+// - Inside hosted silo: host of the VM.
+// - Inside VM: VM host.
+// - Physical host: Not supported.
+func HvsockGUIDParent() guid.GUID { // a42e7cda-d03f-480c-9cc2-a4de20abb878
+ return guid.GUID{
+ Data1: 0xa42e7cda,
+ Data2: 0xd03f,
+ Data3: 0x480c,
+ Data4: [8]uint8{0x9c, 0xc2, 0xa4, 0xde, 0x20, 0xab, 0xb8, 0x78},
+ }
+}
+
+// hvsockVsockServiceTemplate is the Service GUID used for the VSOCK protocol.
+func hvsockVsockServiceTemplate() guid.GUID { // 00000000-facb-11e6-bd58-64006a7986d3
+ return guid.GUID{
+ Data2: 0xfacb,
+ Data3: 0x11e6,
+ Data4: [8]uint8{0xbd, 0x58, 0x64, 0x00, 0x6a, 0x79, 0x86, 0xd3},
+ }
+}
+
+// An HvsockAddr is an address for a AF_HYPERV socket.
+type HvsockAddr struct {
+ VMID guid.GUID
+ ServiceID guid.GUID
+}
+
+type rawHvsockAddr struct {
+ Family uint16
+ _ uint16
+ VMID guid.GUID
+ ServiceID guid.GUID
+}
+
+var _ socket.RawSockaddr = &rawHvsockAddr{}
+
+// Network returns the address's network name, "hvsock".
+func (*HvsockAddr) Network() string {
+ return "hvsock"
+}
+
+func (addr *HvsockAddr) String() string {
+ return fmt.Sprintf("%s:%s", &addr.VMID, &addr.ServiceID)
+}
+
+// VsockServiceID returns an hvsock service ID corresponding to the specified AF_VSOCK port.
+func VsockServiceID(port uint32) guid.GUID {
+ g := hvsockVsockServiceTemplate() // make a copy
+ g.Data1 = port
+ return g
+}
+
+func (addr *HvsockAddr) raw() rawHvsockAddr {
+ return rawHvsockAddr{
+ Family: afHVSock,
+ VMID: addr.VMID,
+ ServiceID: addr.ServiceID,
+ }
+}
+
+func (addr *HvsockAddr) fromRaw(raw *rawHvsockAddr) {
+ addr.VMID = raw.VMID
+ addr.ServiceID = raw.ServiceID
+}
+
+// Sockaddr returns a pointer to and the size of this struct.
+//
+// Implements the [socket.RawSockaddr] interface, and allows use in
+// [socket.Bind] and [socket.ConnectEx].
+func (r *rawHvsockAddr) Sockaddr() (unsafe.Pointer, int32, error) {
+ return unsafe.Pointer(r), int32(unsafe.Sizeof(rawHvsockAddr{})), nil
+}
+
+// Sockaddr interface allows use with `sockets.Bind()` and `.ConnectEx()`.
+func (r *rawHvsockAddr) FromBytes(b []byte) error {
+ n := int(unsafe.Sizeof(rawHvsockAddr{}))
+
+ if len(b) < n {
+ return fmt.Errorf("got %d, want %d: %w", len(b), n, socket.ErrBufferSize)
+ }
+
+ copy(unsafe.Slice((*byte)(unsafe.Pointer(r)), n), b[:n])
+ if r.Family != afHVSock {
+ return fmt.Errorf("got %d, want %d: %w", r.Family, afHVSock, socket.ErrAddrFamily)
+ }
+
+ return nil
+}
+
+// HvsockListener is a socket listener for the AF_HYPERV address family.
+type HvsockListener struct {
+ sock *win32File
+ addr HvsockAddr
+}
+
+var _ net.Listener = &HvsockListener{}
+
+// HvsockConn is a connected socket of the AF_HYPERV address family.
+type HvsockConn struct {
+ sock *win32File
+ local, remote HvsockAddr
+}
+
+var _ net.Conn = &HvsockConn{}
+
+func newHVSocket() (*win32File, error) {
+ fd, err := syscall.Socket(afHVSock, syscall.SOCK_STREAM, 1)
+ if err != nil {
+ return nil, os.NewSyscallError("socket", err)
+ }
+ f, err := makeWin32File(fd)
+ if err != nil {
+ syscall.Close(fd)
+ return nil, err
+ }
+ f.socket = true
+ return f, nil
+}
+
+// ListenHvsock listens for connections on the specified hvsock address.
+func ListenHvsock(addr *HvsockAddr) (_ *HvsockListener, err error) {
+ l := &HvsockListener{addr: *addr}
+ sock, err := newHVSocket()
+ if err != nil {
+ return nil, l.opErr("listen", err)
+ }
+ sa := addr.raw()
+ err = socket.Bind(windows.Handle(sock.handle), &sa)
+ if err != nil {
+ return nil, l.opErr("listen", os.NewSyscallError("socket", err))
+ }
+ err = syscall.Listen(sock.handle, 16)
+ if err != nil {
+ return nil, l.opErr("listen", os.NewSyscallError("listen", err))
+ }
+ return &HvsockListener{sock: sock, addr: *addr}, nil
+}
+
+func (l *HvsockListener) opErr(op string, err error) error {
+ return &net.OpError{Op: op, Net: "hvsock", Addr: &l.addr, Err: err}
+}
+
+// Addr returns the listener's network address.
+func (l *HvsockListener) Addr() net.Addr {
+ return &l.addr
+}
+
+// Accept waits for the next connection and returns it.
+func (l *HvsockListener) Accept() (_ net.Conn, err error) {
+ sock, err := newHVSocket()
+ if err != nil {
+ return nil, l.opErr("accept", err)
+ }
+ defer func() {
+ if sock != nil {
+ sock.Close()
+ }
+ }()
+ c, err := l.sock.prepareIO()
+ if err != nil {
+ return nil, l.opErr("accept", err)
+ }
+ defer l.sock.wg.Done()
+
+ // AcceptEx, per documentation, requires an extra 16 bytes per address.
+ //
+ // https://docs.microsoft.com/en-us/windows/win32/api/mswsock/nf-mswsock-acceptex
+ const addrlen = uint32(16 + unsafe.Sizeof(rawHvsockAddr{}))
+ var addrbuf [addrlen * 2]byte
+
+ var bytes uint32
+ err = syscall.AcceptEx(l.sock.handle, sock.handle, &addrbuf[0], 0 /*rxdatalen*/, addrlen, addrlen, &bytes, &c.o)
+ if _, err = l.sock.asyncIO(c, nil, bytes, err); err != nil {
+ return nil, l.opErr("accept", os.NewSyscallError("acceptex", err))
+ }
+
+ conn := &HvsockConn{
+ sock: sock,
+ }
+ // The local address returned in the AcceptEx buffer is the same as the Listener socket's
+ // address. However, the service GUID reported by GetSockName is different from the Listeners
+ // socket, and is sometimes the same as the local address of the socket that dialed the
+ // address, with the service GUID.Data1 incremented, but othertimes is different.
+ // todo: does the local address matter? is the listener's address or the actual address appropriate?
+ conn.local.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[0])))
+ conn.remote.fromRaw((*rawHvsockAddr)(unsafe.Pointer(&addrbuf[addrlen])))
+
+ // initialize the accepted socket and update its properties with those of the listening socket
+ if err = windows.Setsockopt(windows.Handle(sock.handle),
+ windows.SOL_SOCKET, windows.SO_UPDATE_ACCEPT_CONTEXT,
+ (*byte)(unsafe.Pointer(&l.sock.handle)), int32(unsafe.Sizeof(l.sock.handle))); err != nil {
+ return nil, conn.opErr("accept", os.NewSyscallError("setsockopt", err))
+ }
+
+ sock = nil
+ return conn, nil
+}
+
+// Close closes the listener, causing any pending Accept calls to fail.
+func (l *HvsockListener) Close() error {
+ return l.sock.Close()
+}
+
+// HvsockDialer configures and dials a Hyper-V Socket (ie, [HvsockConn]).
+type HvsockDialer struct {
+ // Deadline is the time the Dial operation must connect before erroring.
+ Deadline time.Time
+
+ // Retries is the number of additional connects to try if the connection times out, is refused,
+ // or the host is unreachable
+ Retries uint
+
+ // RetryWait is the time to wait after a connection error to retry
+ RetryWait time.Duration
+
+ rt *time.Timer // redial wait timer
+}
+
+// Dial the Hyper-V socket at addr.
+//
+// See [HvsockDialer.Dial] for more information.
+func Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) {
+ return (&HvsockDialer{}).Dial(ctx, addr)
+}
+
+// Dial attempts to connect to the Hyper-V socket at addr, and returns a connection if successful.
+// Will attempt (HvsockDialer).Retries if dialing fails, waiting (HvsockDialer).RetryWait between
+// retries.
+//
+// Dialing can be cancelled either by providing (HvsockDialer).Deadline, or cancelling ctx.
+func (d *HvsockDialer) Dial(ctx context.Context, addr *HvsockAddr) (conn *HvsockConn, err error) {
+ op := "dial"
+ // create the conn early to use opErr()
+ conn = &HvsockConn{
+ remote: *addr,
+ }
+
+ if !d.Deadline.IsZero() {
+ var cancel context.CancelFunc
+ ctx, cancel = context.WithDeadline(ctx, d.Deadline)
+ defer cancel()
+ }
+
+ // preemptive timeout/cancellation check
+ if err = ctx.Err(); err != nil {
+ return nil, conn.opErr(op, err)
+ }
+
+ sock, err := newHVSocket()
+ if err != nil {
+ return nil, conn.opErr(op, err)
+ }
+ defer func() {
+ if sock != nil {
+ sock.Close()
+ }
+ }()
+
+ sa := addr.raw()
+ err = socket.Bind(windows.Handle(sock.handle), &sa)
+ if err != nil {
+ return nil, conn.opErr(op, os.NewSyscallError("bind", err))
+ }
+
+ c, err := sock.prepareIO()
+ if err != nil {
+ return nil, conn.opErr(op, err)
+ }
+ defer sock.wg.Done()
+ var bytes uint32
+ for i := uint(0); i <= d.Retries; i++ {
+ err = socket.ConnectEx(
+ windows.Handle(sock.handle),
+ &sa,
+ nil, // sendBuf
+ 0, // sendDataLen
+ &bytes,
+ (*windows.Overlapped)(unsafe.Pointer(&c.o)))
+ _, err = sock.asyncIO(c, nil, bytes, err)
+ if i < d.Retries && canRedial(err) {
+ if err = d.redialWait(ctx); err == nil {
+ continue
+ }
+ }
+ break
+ }
+ if err != nil {
+ return nil, conn.opErr(op, os.NewSyscallError("connectex", err))
+ }
+
+ // update the connection properties, so shutdown can be used
+ if err = windows.Setsockopt(
+ windows.Handle(sock.handle),
+ windows.SOL_SOCKET,
+ windows.SO_UPDATE_CONNECT_CONTEXT,
+ nil, // optvalue
+ 0, // optlen
+ ); err != nil {
+ return nil, conn.opErr(op, os.NewSyscallError("setsockopt", err))
+ }
+
+ // get the local name
+ var sal rawHvsockAddr
+ err = socket.GetSockName(windows.Handle(sock.handle), &sal)
+ if err != nil {
+ return nil, conn.opErr(op, os.NewSyscallError("getsockname", err))
+ }
+ conn.local.fromRaw(&sal)
+
+ // one last check for timeout, since asyncIO doesn't check the context
+ if err = ctx.Err(); err != nil {
+ return nil, conn.opErr(op, err)
+ }
+
+ conn.sock = sock
+ sock = nil
+
+ return conn, nil
+}
+
+// redialWait waits before attempting to redial, resetting the timer as appropriate.
+func (d *HvsockDialer) redialWait(ctx context.Context) (err error) {
+ if d.RetryWait == 0 {
+ return nil
+ }
+
+ if d.rt == nil {
+ d.rt = time.NewTimer(d.RetryWait)
+ } else {
+ // should already be stopped and drained
+ d.rt.Reset(d.RetryWait)
+ }
+
+ select {
+ case <-ctx.Done():
+ case <-d.rt.C:
+ return nil
+ }
+
+ // stop and drain the timer
+ if !d.rt.Stop() {
+ <-d.rt.C
+ }
+ return ctx.Err()
+}
+
+// assumes error is a plain, unwrapped syscall.Errno provided by direct syscall.
+func canRedial(err error) bool {
+ //nolint:errorlint // guaranteed to be an Errno
+ switch err {
+ case windows.WSAECONNREFUSED, windows.WSAENETUNREACH, windows.WSAETIMEDOUT,
+ windows.ERROR_CONNECTION_REFUSED, windows.ERROR_CONNECTION_UNAVAIL:
+ return true
+ default:
+ return false
+ }
+}
+
+func (conn *HvsockConn) opErr(op string, err error) error {
+ // translate from "file closed" to "socket closed"
+ if errors.Is(err, ErrFileClosed) {
+ err = socket.ErrSocketClosed
+ }
+ return &net.OpError{Op: op, Net: "hvsock", Source: &conn.local, Addr: &conn.remote, Err: err}
+}
+
+func (conn *HvsockConn) Read(b []byte) (int, error) {
+ c, err := conn.sock.prepareIO()
+ if err != nil {
+ return 0, conn.opErr("read", err)
+ }
+ defer conn.sock.wg.Done()
+ buf := syscall.WSABuf{Buf: &b[0], Len: uint32(len(b))}
+ var flags, bytes uint32
+ err = syscall.WSARecv(conn.sock.handle, &buf, 1, &bytes, &flags, &c.o, nil)
+ n, err := conn.sock.asyncIO(c, &conn.sock.readDeadline, bytes, err)
+ if err != nil {
+ var eno windows.Errno
+ if errors.As(err, &eno) {
+ err = os.NewSyscallError("wsarecv", eno)
+ }
+ return 0, conn.opErr("read", err)
+ } else if n == 0 {
+ err = io.EOF
+ }
+ return n, err
+}
+
+func (conn *HvsockConn) Write(b []byte) (int, error) {
+ t := 0
+ for len(b) != 0 {
+ n, err := conn.write(b)
+ if err != nil {
+ return t + n, err
+ }
+ t += n
+ b = b[n:]
+ }
+ return t, nil
+}
+
+func (conn *HvsockConn) write(b []byte) (int, error) {
+ c, err := conn.sock.prepareIO()
+ if err != nil {
+ return 0, conn.opErr("write", err)
+ }
+ defer conn.sock.wg.Done()
+ buf := syscall.WSABuf{Buf: &b[0], Len: uint32(len(b))}
+ var bytes uint32
+ err = syscall.WSASend(conn.sock.handle, &buf, 1, &bytes, 0, &c.o, nil)
+ n, err := conn.sock.asyncIO(c, &conn.sock.writeDeadline, bytes, err)
+ if err != nil {
+ var eno windows.Errno
+ if errors.As(err, &eno) {
+ err = os.NewSyscallError("wsasend", eno)
+ }
+ return 0, conn.opErr("write", err)
+ }
+ return n, err
+}
+
+// Close closes the socket connection, failing any pending read or write calls.
+func (conn *HvsockConn) Close() error {
+ return conn.sock.Close()
+}
+
+func (conn *HvsockConn) IsClosed() bool {
+ return conn.sock.IsClosed()
+}
+
+// shutdown disables sending or receiving on a socket.
+func (conn *HvsockConn) shutdown(how int) error {
+ if conn.IsClosed() {
+ return socket.ErrSocketClosed
+ }
+
+ err := syscall.Shutdown(conn.sock.handle, how)
+ if err != nil {
+ // If the connection was closed, shutdowns fail with "not connected"
+ if errors.Is(err, windows.WSAENOTCONN) ||
+ errors.Is(err, windows.WSAESHUTDOWN) {
+ err = socket.ErrSocketClosed
+ }
+ return os.NewSyscallError("shutdown", err)
+ }
+ return nil
+}
+
+// CloseRead shuts down the read end of the socket, preventing future read operations.
+func (conn *HvsockConn) CloseRead() error {
+ err := conn.shutdown(syscall.SHUT_RD)
+ if err != nil {
+ return conn.opErr("closeread", err)
+ }
+ return nil
+}
+
+// CloseWrite shuts down the write end of the socket, preventing future write operations and
+// notifying the other endpoint that no more data will be written.
+func (conn *HvsockConn) CloseWrite() error {
+ err := conn.shutdown(syscall.SHUT_WR)
+ if err != nil {
+ return conn.opErr("closewrite", err)
+ }
+ return nil
+}
+
+// LocalAddr returns the local address of the connection.
+func (conn *HvsockConn) LocalAddr() net.Addr {
+ return &conn.local
+}
+
+// RemoteAddr returns the remote address of the connection.
+func (conn *HvsockConn) RemoteAddr() net.Addr {
+ return &conn.remote
+}
+
+// SetDeadline implements the net.Conn SetDeadline method.
+func (conn *HvsockConn) SetDeadline(t time.Time) error {
+ // todo: implement `SetDeadline` for `win32File`
+ if err := conn.SetReadDeadline(t); err != nil {
+ return fmt.Errorf("set read deadline: %w", err)
+ }
+ if err := conn.SetWriteDeadline(t); err != nil {
+ return fmt.Errorf("set write deadline: %w", err)
+ }
+ return nil
+}
+
+// SetReadDeadline implements the net.Conn SetReadDeadline method.
+func (conn *HvsockConn) SetReadDeadline(t time.Time) error {
+ return conn.sock.SetReadDeadline(t)
+}
+
+// SetWriteDeadline implements the net.Conn SetWriteDeadline method.
+func (conn *HvsockConn) SetWriteDeadline(t time.Time) error {
+ return conn.sock.SetWriteDeadline(t)
+}
diff --git a/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go b/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go
new file mode 100644
index 000000000..7e82f9afa
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/internal/socket/rawaddr.go
@@ -0,0 +1,20 @@
+package socket
+
+import (
+ "unsafe"
+)
+
+// RawSockaddr allows structs to be used with [Bind] and [ConnectEx]. The
+// struct must meet the Win32 sockaddr requirements specified here:
+// https://docs.microsoft.com/en-us/windows/win32/winsock/sockaddr-2
+//
+// Specifically, the struct size must be least larger than an int16 (unsigned short)
+// for the address family.
+type RawSockaddr interface {
+ // Sockaddr returns a pointer to the RawSockaddr and its struct size, allowing
+ // for the RawSockaddr's data to be overwritten by syscalls (if necessary).
+ //
+ // It is the callers responsibility to validate that the values are valid; invalid
+ // pointers or size can cause a panic.
+ Sockaddr() (unsafe.Pointer, int32, error)
+}
diff --git a/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go b/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go
new file mode 100644
index 000000000..39e8c05f8
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/internal/socket/socket.go
@@ -0,0 +1,179 @@
+//go:build windows
+
+package socket
+
+import (
+ "errors"
+ "fmt"
+ "net"
+ "sync"
+ "syscall"
+ "unsafe"
+
+ "github.com/Microsoft/go-winio/pkg/guid"
+ "golang.org/x/sys/windows"
+)
+
+//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go socket.go
+
+//sys getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getsockname
+//sys getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) [failretval==socketError] = ws2_32.getpeername
+//sys bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) [failretval==socketError] = ws2_32.bind
+
+const socketError = uintptr(^uint32(0))
+
+var (
+ // todo(helsaawy): create custom error types to store the desired vs actual size and addr family?
+
+ ErrBufferSize = errors.New("buffer size")
+ ErrAddrFamily = errors.New("address family")
+ ErrInvalidPointer = errors.New("invalid pointer")
+ ErrSocketClosed = fmt.Errorf("socket closed: %w", net.ErrClosed)
+)
+
+// todo(helsaawy): replace these with generics, ie: GetSockName[S RawSockaddr](s windows.Handle) (S, error)
+
+// GetSockName writes the local address of socket s to the [RawSockaddr] rsa.
+// If rsa is not large enough, the [windows.WSAEFAULT] is returned.
+func GetSockName(s windows.Handle, rsa RawSockaddr) error {
+ ptr, l, err := rsa.Sockaddr()
+ if err != nil {
+ return fmt.Errorf("could not retrieve socket pointer and size: %w", err)
+ }
+
+ // although getsockname returns WSAEFAULT if the buffer is too small, it does not set
+ // &l to the correct size, so--apart from doubling the buffer repeatedly--there is no remedy
+ return getsockname(s, ptr, &l)
+}
+
+// GetPeerName returns the remote address the socket is connected to.
+//
+// See [GetSockName] for more information.
+func GetPeerName(s windows.Handle, rsa RawSockaddr) error {
+ ptr, l, err := rsa.Sockaddr()
+ if err != nil {
+ return fmt.Errorf("could not retrieve socket pointer and size: %w", err)
+ }
+
+ return getpeername(s, ptr, &l)
+}
+
+func Bind(s windows.Handle, rsa RawSockaddr) (err error) {
+ ptr, l, err := rsa.Sockaddr()
+ if err != nil {
+ return fmt.Errorf("could not retrieve socket pointer and size: %w", err)
+ }
+
+ return bind(s, ptr, l)
+}
+
+// "golang.org/x/sys/windows".ConnectEx and .Bind only accept internal implementations of the
+// their sockaddr interface, so they cannot be used with HvsockAddr
+// Replicate functionality here from
+// https://cs.opensource.google/go/x/sys/+/master:windows/syscall_windows.go
+
+// The function pointers to `AcceptEx`, `ConnectEx` and `GetAcceptExSockaddrs` must be loaded at
+// runtime via a WSAIoctl call:
+// https://docs.microsoft.com/en-us/windows/win32/api/Mswsock/nc-mswsock-lpfn_connectex#remarks
+
+type runtimeFunc struct {
+ id guid.GUID
+ once sync.Once
+ addr uintptr
+ err error
+}
+
+func (f *runtimeFunc) Load() error {
+ f.once.Do(func() {
+ var s windows.Handle
+ s, f.err = windows.Socket(windows.AF_INET, windows.SOCK_STREAM, windows.IPPROTO_TCP)
+ if f.err != nil {
+ return
+ }
+ defer windows.CloseHandle(s) //nolint:errcheck
+
+ var n uint32
+ f.err = windows.WSAIoctl(s,
+ windows.SIO_GET_EXTENSION_FUNCTION_POINTER,
+ (*byte)(unsafe.Pointer(&f.id)),
+ uint32(unsafe.Sizeof(f.id)),
+ (*byte)(unsafe.Pointer(&f.addr)),
+ uint32(unsafe.Sizeof(f.addr)),
+ &n,
+ nil, //overlapped
+ 0, //completionRoutine
+ )
+ })
+ return f.err
+}
+
+var (
+ // todo: add `AcceptEx` and `GetAcceptExSockaddrs`
+ WSAID_CONNECTEX = guid.GUID{ //revive:disable-line:var-naming ALL_CAPS
+ Data1: 0x25a207b9,
+ Data2: 0xddf3,
+ Data3: 0x4660,
+ Data4: [8]byte{0x8e, 0xe9, 0x76, 0xe5, 0x8c, 0x74, 0x06, 0x3e},
+ }
+
+ connectExFunc = runtimeFunc{id: WSAID_CONNECTEX}
+)
+
+func ConnectEx(
+ fd windows.Handle,
+ rsa RawSockaddr,
+ sendBuf *byte,
+ sendDataLen uint32,
+ bytesSent *uint32,
+ overlapped *windows.Overlapped,
+) error {
+ if err := connectExFunc.Load(); err != nil {
+ return fmt.Errorf("failed to load ConnectEx function pointer: %w", err)
+ }
+ ptr, n, err := rsa.Sockaddr()
+ if err != nil {
+ return err
+ }
+ return connectEx(fd, ptr, n, sendBuf, sendDataLen, bytesSent, overlapped)
+}
+
+// BOOL LpfnConnectex(
+// [in] SOCKET s,
+// [in] const sockaddr *name,
+// [in] int namelen,
+// [in, optional] PVOID lpSendBuffer,
+// [in] DWORD dwSendDataLength,
+// [out] LPDWORD lpdwBytesSent,
+// [in] LPOVERLAPPED lpOverlapped
+// )
+
+func connectEx(
+ s windows.Handle,
+ name unsafe.Pointer,
+ namelen int32,
+ sendBuf *byte,
+ sendDataLen uint32,
+ bytesSent *uint32,
+ overlapped *windows.Overlapped,
+) (err error) {
+ // todo: after upgrading to 1.18, switch from syscall.Syscall9 to syscall.SyscallN
+ r1, _, e1 := syscall.Syscall9(connectExFunc.addr,
+ 7,
+ uintptr(s),
+ uintptr(name),
+ uintptr(namelen),
+ uintptr(unsafe.Pointer(sendBuf)),
+ uintptr(sendDataLen),
+ uintptr(unsafe.Pointer(bytesSent)),
+ uintptr(unsafe.Pointer(overlapped)),
+ 0,
+ 0)
+ if r1 == 0 {
+ if e1 != 0 {
+ err = error(e1)
+ } else {
+ err = syscall.EINVAL
+ }
+ }
+ return err
+}
diff --git a/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go b/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go
new file mode 100644
index 000000000..6d2e1a9e4
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/internal/socket/zsyscall_windows.go
@@ -0,0 +1,72 @@
+//go:build windows
+
+// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT.
+
+package socket
+
+import (
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+var _ unsafe.Pointer
+
+// Do the interface allocations only once for common
+// Errno values.
+const (
+ errnoERROR_IO_PENDING = 997
+)
+
+var (
+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
+ errERROR_EINVAL error = syscall.EINVAL
+)
+
+// errnoErr returns common boxed Errno values, to prevent
+// allocations at runtime.
+func errnoErr(e syscall.Errno) error {
+ switch e {
+ case 0:
+ return errERROR_EINVAL
+ case errnoERROR_IO_PENDING:
+ return errERROR_IO_PENDING
+ }
+ // TODO: add more here, after collecting data on the common
+ // error values see on Windows. (perhaps when running
+ // all.bat?)
+ return e
+}
+
+var (
+ modws2_32 = windows.NewLazySystemDLL("ws2_32.dll")
+
+ procbind = modws2_32.NewProc("bind")
+ procgetpeername = modws2_32.NewProc("getpeername")
+ procgetsockname = modws2_32.NewProc("getsockname")
+)
+
+func bind(s windows.Handle, name unsafe.Pointer, namelen int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procbind.Addr(), 3, uintptr(s), uintptr(name), uintptr(namelen))
+ if r1 == socketError {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func getpeername(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procgetpeername.Addr(), 3, uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen)))
+ if r1 == socketError {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func getsockname(s windows.Handle, name unsafe.Pointer, namelen *int32) (err error) {
+ r1, _, e1 := syscall.Syscall(procgetsockname.Addr(), 3, uintptr(s), uintptr(name), uintptr(unsafe.Pointer(namelen)))
+ if r1 == socketError {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/vendor/github.com/Microsoft/go-winio/pipe.go b/vendor/github.com/Microsoft/go-winio/pipe.go
new file mode 100644
index 000000000..ca6e38fc0
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/pipe.go
@@ -0,0 +1,521 @@
+//go:build windows
+// +build windows
+
+package winio
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "net"
+ "os"
+ "runtime"
+ "syscall"
+ "time"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+//sys connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) = ConnectNamedPipe
+//sys createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *syscall.SecurityAttributes) (handle syscall.Handle, err error) [failretval==syscall.InvalidHandle] = CreateNamedPipeW
+//sys createFile(name string, access uint32, mode uint32, sa *syscall.SecurityAttributes, createmode uint32, attrs uint32, templatefile syscall.Handle) (handle syscall.Handle, err error) [failretval==syscall.InvalidHandle] = CreateFileW
+//sys getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) = GetNamedPipeInfo
+//sys getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) = GetNamedPipeHandleStateW
+//sys localAlloc(uFlags uint32, length uint32) (ptr uintptr) = LocalAlloc
+//sys ntCreateNamedPipeFile(pipe *syscall.Handle, access uint32, oa *objectAttributes, iosb *ioStatusBlock, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntStatus) = ntdll.NtCreateNamedPipeFile
+//sys rtlNtStatusToDosError(status ntStatus) (winerr error) = ntdll.RtlNtStatusToDosErrorNoTeb
+//sys rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) = ntdll.RtlDosPathNameToNtPathName_U
+//sys rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) = ntdll.RtlDefaultNpAcl
+
+type ioStatusBlock struct {
+ Status, Information uintptr
+}
+
+type objectAttributes struct {
+ Length uintptr
+ RootDirectory uintptr
+ ObjectName *unicodeString
+ Attributes uintptr
+ SecurityDescriptor *securityDescriptor
+ SecurityQoS uintptr
+}
+
+type unicodeString struct {
+ Length uint16
+ MaximumLength uint16
+ Buffer uintptr
+}
+
+type securityDescriptor struct {
+ Revision byte
+ Sbz1 byte
+ Control uint16
+ Owner uintptr
+ Group uintptr
+ Sacl uintptr //revive:disable-line:var-naming SACL, not Sacl
+ Dacl uintptr //revive:disable-line:var-naming DACL, not Dacl
+}
+
+type ntStatus int32
+
+func (status ntStatus) Err() error {
+ if status >= 0 {
+ return nil
+ }
+ return rtlNtStatusToDosError(status)
+}
+
+var (
+ // ErrPipeListenerClosed is returned for pipe operations on listeners that have been closed.
+ ErrPipeListenerClosed = net.ErrClosed
+
+ errPipeWriteClosed = errors.New("pipe has been closed for write")
+)
+
+type win32Pipe struct {
+ *win32File
+ path string
+}
+
+type win32MessageBytePipe struct {
+ win32Pipe
+ writeClosed bool
+ readEOF bool
+}
+
+type pipeAddress string
+
+func (f *win32Pipe) LocalAddr() net.Addr {
+ return pipeAddress(f.path)
+}
+
+func (f *win32Pipe) RemoteAddr() net.Addr {
+ return pipeAddress(f.path)
+}
+
+func (f *win32Pipe) SetDeadline(t time.Time) error {
+ if err := f.SetReadDeadline(t); err != nil {
+ return err
+ }
+ return f.SetWriteDeadline(t)
+}
+
+// CloseWrite closes the write side of a message pipe in byte mode.
+func (f *win32MessageBytePipe) CloseWrite() error {
+ if f.writeClosed {
+ return errPipeWriteClosed
+ }
+ err := f.win32File.Flush()
+ if err != nil {
+ return err
+ }
+ _, err = f.win32File.Write(nil)
+ if err != nil {
+ return err
+ }
+ f.writeClosed = true
+ return nil
+}
+
+// Write writes bytes to a message pipe in byte mode. Zero-byte writes are ignored, since
+// they are used to implement CloseWrite().
+func (f *win32MessageBytePipe) Write(b []byte) (int, error) {
+ if f.writeClosed {
+ return 0, errPipeWriteClosed
+ }
+ if len(b) == 0 {
+ return 0, nil
+ }
+ return f.win32File.Write(b)
+}
+
+// Read reads bytes from a message pipe in byte mode. A read of a zero-byte message on a message
+// mode pipe will return io.EOF, as will all subsequent reads.
+func (f *win32MessageBytePipe) Read(b []byte) (int, error) {
+ if f.readEOF {
+ return 0, io.EOF
+ }
+ n, err := f.win32File.Read(b)
+ if err == io.EOF { //nolint:errorlint
+ // If this was the result of a zero-byte read, then
+ // it is possible that the read was due to a zero-size
+ // message. Since we are simulating CloseWrite with a
+ // zero-byte message, ensure that all future Read() calls
+ // also return EOF.
+ f.readEOF = true
+ } else if err == syscall.ERROR_MORE_DATA { //nolint:errorlint // err is Errno
+ // ERROR_MORE_DATA indicates that the pipe's read mode is message mode
+ // and the message still has more bytes. Treat this as a success, since
+ // this package presents all named pipes as byte streams.
+ err = nil
+ }
+ return n, err
+}
+
+func (pipeAddress) Network() string {
+ return "pipe"
+}
+
+func (s pipeAddress) String() string {
+ return string(s)
+}
+
+// tryDialPipe attempts to dial the pipe at `path` until `ctx` cancellation or timeout.
+func tryDialPipe(ctx context.Context, path *string, access uint32) (syscall.Handle, error) {
+ for {
+ select {
+ case <-ctx.Done():
+ return syscall.Handle(0), ctx.Err()
+ default:
+ h, err := createFile(*path,
+ access,
+ 0,
+ nil,
+ syscall.OPEN_EXISTING,
+ windows.FILE_FLAG_OVERLAPPED|windows.SECURITY_SQOS_PRESENT|windows.SECURITY_ANONYMOUS,
+ 0)
+ if err == nil {
+ return h, nil
+ }
+ if err != windows.ERROR_PIPE_BUSY { //nolint:errorlint // err is Errno
+ return h, &os.PathError{Err: err, Op: "open", Path: *path}
+ }
+ // Wait 10 msec and try again. This is a rather simplistic
+ // view, as we always try each 10 milliseconds.
+ time.Sleep(10 * time.Millisecond)
+ }
+ }
+}
+
+// DialPipe connects to a named pipe by path, timing out if the connection
+// takes longer than the specified duration. If timeout is nil, then we use
+// a default timeout of 2 seconds. (We do not use WaitNamedPipe.)
+func DialPipe(path string, timeout *time.Duration) (net.Conn, error) {
+ var absTimeout time.Time
+ if timeout != nil {
+ absTimeout = time.Now().Add(*timeout)
+ } else {
+ absTimeout = time.Now().Add(2 * time.Second)
+ }
+ ctx, cancel := context.WithDeadline(context.Background(), absTimeout)
+ defer cancel()
+ conn, err := DialPipeContext(ctx, path)
+ if errors.Is(err, context.DeadlineExceeded) {
+ return nil, ErrTimeout
+ }
+ return conn, err
+}
+
+// DialPipeContext attempts to connect to a named pipe by `path` until `ctx`
+// cancellation or timeout.
+func DialPipeContext(ctx context.Context, path string) (net.Conn, error) {
+ return DialPipeAccess(ctx, path, syscall.GENERIC_READ|syscall.GENERIC_WRITE)
+}
+
+// DialPipeAccess attempts to connect to a named pipe by `path` with `access` until `ctx`
+// cancellation or timeout.
+func DialPipeAccess(ctx context.Context, path string, access uint32) (net.Conn, error) {
+ var err error
+ var h syscall.Handle
+ h, err = tryDialPipe(ctx, &path, access)
+ if err != nil {
+ return nil, err
+ }
+
+ var flags uint32
+ err = getNamedPipeInfo(h, &flags, nil, nil, nil)
+ if err != nil {
+ return nil, err
+ }
+
+ f, err := makeWin32File(h)
+ if err != nil {
+ syscall.Close(h)
+ return nil, err
+ }
+
+ // If the pipe is in message mode, return a message byte pipe, which
+ // supports CloseWrite().
+ if flags&windows.PIPE_TYPE_MESSAGE != 0 {
+ return &win32MessageBytePipe{
+ win32Pipe: win32Pipe{win32File: f, path: path},
+ }, nil
+ }
+ return &win32Pipe{win32File: f, path: path}, nil
+}
+
+type acceptResponse struct {
+ f *win32File
+ err error
+}
+
+type win32PipeListener struct {
+ firstHandle syscall.Handle
+ path string
+ config PipeConfig
+ acceptCh chan (chan acceptResponse)
+ closeCh chan int
+ doneCh chan int
+}
+
+func makeServerPipeHandle(path string, sd []byte, c *PipeConfig, first bool) (syscall.Handle, error) {
+ path16, err := syscall.UTF16FromString(path)
+ if err != nil {
+ return 0, &os.PathError{Op: "open", Path: path, Err: err}
+ }
+
+ var oa objectAttributes
+ oa.Length = unsafe.Sizeof(oa)
+
+ var ntPath unicodeString
+ if err := rtlDosPathNameToNtPathName(&path16[0],
+ &ntPath,
+ 0,
+ 0,
+ ).Err(); err != nil {
+ return 0, &os.PathError{Op: "open", Path: path, Err: err}
+ }
+ defer localFree(ntPath.Buffer)
+ oa.ObjectName = &ntPath
+
+ // The security descriptor is only needed for the first pipe.
+ if first {
+ if sd != nil {
+ l := uint32(len(sd))
+ sdb := localAlloc(0, l)
+ defer localFree(sdb)
+ copy((*[0xffff]byte)(unsafe.Pointer(sdb))[:], sd)
+ oa.SecurityDescriptor = (*securityDescriptor)(unsafe.Pointer(sdb))
+ } else {
+ // Construct the default named pipe security descriptor.
+ var dacl uintptr
+ if err := rtlDefaultNpAcl(&dacl).Err(); err != nil {
+ return 0, fmt.Errorf("getting default named pipe ACL: %w", err)
+ }
+ defer localFree(dacl)
+
+ sdb := &securityDescriptor{
+ Revision: 1,
+ Control: windows.SE_DACL_PRESENT,
+ Dacl: dacl,
+ }
+ oa.SecurityDescriptor = sdb
+ }
+ }
+
+ typ := uint32(windows.FILE_PIPE_REJECT_REMOTE_CLIENTS)
+ if c.MessageMode {
+ typ |= windows.FILE_PIPE_MESSAGE_TYPE
+ }
+
+ disposition := uint32(windows.FILE_OPEN)
+ access := uint32(syscall.GENERIC_READ | syscall.GENERIC_WRITE | syscall.SYNCHRONIZE)
+ if first {
+ disposition = windows.FILE_CREATE
+ // By not asking for read or write access, the named pipe file system
+ // will put this pipe into an initially disconnected state, blocking
+ // client connections until the next call with first == false.
+ access = syscall.SYNCHRONIZE
+ }
+
+ timeout := int64(-50 * 10000) // 50ms
+
+ var (
+ h syscall.Handle
+ iosb ioStatusBlock
+ )
+ err = ntCreateNamedPipeFile(&h,
+ access,
+ &oa,
+ &iosb,
+ syscall.FILE_SHARE_READ|syscall.FILE_SHARE_WRITE,
+ disposition,
+ 0,
+ typ,
+ 0,
+ 0,
+ 0xffffffff,
+ uint32(c.InputBufferSize),
+ uint32(c.OutputBufferSize),
+ &timeout).Err()
+ if err != nil {
+ return 0, &os.PathError{Op: "open", Path: path, Err: err}
+ }
+
+ runtime.KeepAlive(ntPath)
+ return h, nil
+}
+
+func (l *win32PipeListener) makeServerPipe() (*win32File, error) {
+ h, err := makeServerPipeHandle(l.path, nil, &l.config, false)
+ if err != nil {
+ return nil, err
+ }
+ f, err := makeWin32File(h)
+ if err != nil {
+ syscall.Close(h)
+ return nil, err
+ }
+ return f, nil
+}
+
+func (l *win32PipeListener) makeConnectedServerPipe() (*win32File, error) {
+ p, err := l.makeServerPipe()
+ if err != nil {
+ return nil, err
+ }
+
+ // Wait for the client to connect.
+ ch := make(chan error)
+ go func(p *win32File) {
+ ch <- connectPipe(p)
+ }(p)
+
+ select {
+ case err = <-ch:
+ if err != nil {
+ p.Close()
+ p = nil
+ }
+ case <-l.closeCh:
+ // Abort the connect request by closing the handle.
+ p.Close()
+ p = nil
+ err = <-ch
+ if err == nil || err == ErrFileClosed { //nolint:errorlint // err is Errno
+ err = ErrPipeListenerClosed
+ }
+ }
+ return p, err
+}
+
+func (l *win32PipeListener) listenerRoutine() {
+ closed := false
+ for !closed {
+ select {
+ case <-l.closeCh:
+ closed = true
+ case responseCh := <-l.acceptCh:
+ var (
+ p *win32File
+ err error
+ )
+ for {
+ p, err = l.makeConnectedServerPipe()
+ // If the connection was immediately closed by the client, try
+ // again.
+ if err != windows.ERROR_NO_DATA { //nolint:errorlint // err is Errno
+ break
+ }
+ }
+ responseCh <- acceptResponse{p, err}
+ closed = err == ErrPipeListenerClosed //nolint:errorlint // err is Errno
+ }
+ }
+ syscall.Close(l.firstHandle)
+ l.firstHandle = 0
+ // Notify Close() and Accept() callers that the handle has been closed.
+ close(l.doneCh)
+}
+
+// PipeConfig contain configuration for the pipe listener.
+type PipeConfig struct {
+ // SecurityDescriptor contains a Windows security descriptor in SDDL format.
+ SecurityDescriptor string
+
+ // MessageMode determines whether the pipe is in byte or message mode. In either
+ // case the pipe is read in byte mode by default. The only practical difference in
+ // this implementation is that CloseWrite() is only supported for message mode pipes;
+ // CloseWrite() is implemented as a zero-byte write, but zero-byte writes are only
+ // transferred to the reader (and returned as io.EOF in this implementation)
+ // when the pipe is in message mode.
+ MessageMode bool
+
+ // InputBufferSize specifies the size of the input buffer, in bytes.
+ InputBufferSize int32
+
+ // OutputBufferSize specifies the size of the output buffer, in bytes.
+ OutputBufferSize int32
+}
+
+// ListenPipe creates a listener on a Windows named pipe path, e.g. \\.\pipe\mypipe.
+// The pipe must not already exist.
+func ListenPipe(path string, c *PipeConfig) (net.Listener, error) {
+ var (
+ sd []byte
+ err error
+ )
+ if c == nil {
+ c = &PipeConfig{}
+ }
+ if c.SecurityDescriptor != "" {
+ sd, err = SddlToSecurityDescriptor(c.SecurityDescriptor)
+ if err != nil {
+ return nil, err
+ }
+ }
+ h, err := makeServerPipeHandle(path, sd, c, true)
+ if err != nil {
+ return nil, err
+ }
+ l := &win32PipeListener{
+ firstHandle: h,
+ path: path,
+ config: *c,
+ acceptCh: make(chan (chan acceptResponse)),
+ closeCh: make(chan int),
+ doneCh: make(chan int),
+ }
+ go l.listenerRoutine()
+ return l, nil
+}
+
+func connectPipe(p *win32File) error {
+ c, err := p.prepareIO()
+ if err != nil {
+ return err
+ }
+ defer p.wg.Done()
+
+ err = connectNamedPipe(p.handle, &c.o)
+ _, err = p.asyncIO(c, nil, 0, err)
+ if err != nil && err != windows.ERROR_PIPE_CONNECTED { //nolint:errorlint // err is Errno
+ return err
+ }
+ return nil
+}
+
+func (l *win32PipeListener) Accept() (net.Conn, error) {
+ ch := make(chan acceptResponse)
+ select {
+ case l.acceptCh <- ch:
+ response := <-ch
+ err := response.err
+ if err != nil {
+ return nil, err
+ }
+ if l.config.MessageMode {
+ return &win32MessageBytePipe{
+ win32Pipe: win32Pipe{win32File: response.f, path: l.path},
+ }, nil
+ }
+ return &win32Pipe{win32File: response.f, path: l.path}, nil
+ case <-l.doneCh:
+ return nil, ErrPipeListenerClosed
+ }
+}
+
+func (l *win32PipeListener) Close() error {
+ select {
+ case l.closeCh <- 1:
+ <-l.doneCh
+ case <-l.doneCh:
+ }
+ return nil
+}
+
+func (l *win32PipeListener) Addr() net.Addr {
+ return pipeAddress(l.path)
+}
diff --git a/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go
new file mode 100644
index 000000000..48ce4e924
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid.go
@@ -0,0 +1,232 @@
+// Package guid provides a GUID type. The backing structure for a GUID is
+// identical to that used by the golang.org/x/sys/windows GUID type.
+// There are two main binary encodings used for a GUID, the big-endian encoding,
+// and the Windows (mixed-endian) encoding. See here for details:
+// https://en.wikipedia.org/wiki/Universally_unique_identifier#Encoding
+package guid
+
+import (
+ "crypto/rand"
+ "crypto/sha1" //nolint:gosec // not used for secure application
+ "encoding"
+ "encoding/binary"
+ "fmt"
+ "strconv"
+)
+
+//go:generate go run golang.org/x/tools/cmd/stringer -type=Variant -trimprefix=Variant -linecomment
+
+// Variant specifies which GUID variant (or "type") of the GUID. It determines
+// how the entirety of the rest of the GUID is interpreted.
+type Variant uint8
+
+// The variants specified by RFC 4122 section 4.1.1.
+const (
+ // VariantUnknown specifies a GUID variant which does not conform to one of
+ // the variant encodings specified in RFC 4122.
+ VariantUnknown Variant = iota
+ VariantNCS
+ VariantRFC4122 // RFC 4122
+ VariantMicrosoft
+ VariantFuture
+)
+
+// Version specifies how the bits in the GUID were generated. For instance, a
+// version 4 GUID is randomly generated, and a version 5 is generated from the
+// hash of an input string.
+type Version uint8
+
+func (v Version) String() string {
+ return strconv.FormatUint(uint64(v), 10)
+}
+
+var _ = (encoding.TextMarshaler)(GUID{})
+var _ = (encoding.TextUnmarshaler)(&GUID{})
+
+// NewV4 returns a new version 4 (pseudorandom) GUID, as defined by RFC 4122.
+func NewV4() (GUID, error) {
+ var b [16]byte
+ if _, err := rand.Read(b[:]); err != nil {
+ return GUID{}, err
+ }
+
+ g := FromArray(b)
+ g.setVersion(4) // Version 4 means randomly generated.
+ g.setVariant(VariantRFC4122)
+
+ return g, nil
+}
+
+// NewV5 returns a new version 5 (generated from a string via SHA-1 hashing)
+// GUID, as defined by RFC 4122. The RFC is unclear on the encoding of the name,
+// and the sample code treats it as a series of bytes, so we do the same here.
+//
+// Some implementations, such as those found on Windows, treat the name as a
+// big-endian UTF16 stream of bytes. If that is desired, the string can be
+// encoded as such before being passed to this function.
+func NewV5(namespace GUID, name []byte) (GUID, error) {
+ b := sha1.New() //nolint:gosec // not used for secure application
+ namespaceBytes := namespace.ToArray()
+ b.Write(namespaceBytes[:])
+ b.Write(name)
+
+ a := [16]byte{}
+ copy(a[:], b.Sum(nil))
+
+ g := FromArray(a)
+ g.setVersion(5) // Version 5 means generated from a string.
+ g.setVariant(VariantRFC4122)
+
+ return g, nil
+}
+
+func fromArray(b [16]byte, order binary.ByteOrder) GUID {
+ var g GUID
+ g.Data1 = order.Uint32(b[0:4])
+ g.Data2 = order.Uint16(b[4:6])
+ g.Data3 = order.Uint16(b[6:8])
+ copy(g.Data4[:], b[8:16])
+ return g
+}
+
+func (g GUID) toArray(order binary.ByteOrder) [16]byte {
+ b := [16]byte{}
+ order.PutUint32(b[0:4], g.Data1)
+ order.PutUint16(b[4:6], g.Data2)
+ order.PutUint16(b[6:8], g.Data3)
+ copy(b[8:16], g.Data4[:])
+ return b
+}
+
+// FromArray constructs a GUID from a big-endian encoding array of 16 bytes.
+func FromArray(b [16]byte) GUID {
+ return fromArray(b, binary.BigEndian)
+}
+
+// ToArray returns an array of 16 bytes representing the GUID in big-endian
+// encoding.
+func (g GUID) ToArray() [16]byte {
+ return g.toArray(binary.BigEndian)
+}
+
+// FromWindowsArray constructs a GUID from a Windows encoding array of bytes.
+func FromWindowsArray(b [16]byte) GUID {
+ return fromArray(b, binary.LittleEndian)
+}
+
+// ToWindowsArray returns an array of 16 bytes representing the GUID in Windows
+// encoding.
+func (g GUID) ToWindowsArray() [16]byte {
+ return g.toArray(binary.LittleEndian)
+}
+
+func (g GUID) String() string {
+ return fmt.Sprintf(
+ "%08x-%04x-%04x-%04x-%012x",
+ g.Data1,
+ g.Data2,
+ g.Data3,
+ g.Data4[:2],
+ g.Data4[2:])
+}
+
+// FromString parses a string containing a GUID and returns the GUID. The only
+// format currently supported is the `xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx`
+// format.
+func FromString(s string) (GUID, error) {
+ if len(s) != 36 {
+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
+ }
+ if s[8] != '-' || s[13] != '-' || s[18] != '-' || s[23] != '-' {
+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
+ }
+
+ var g GUID
+
+ data1, err := strconv.ParseUint(s[0:8], 16, 32)
+ if err != nil {
+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
+ }
+ g.Data1 = uint32(data1)
+
+ data2, err := strconv.ParseUint(s[9:13], 16, 16)
+ if err != nil {
+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
+ }
+ g.Data2 = uint16(data2)
+
+ data3, err := strconv.ParseUint(s[14:18], 16, 16)
+ if err != nil {
+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
+ }
+ g.Data3 = uint16(data3)
+
+ for i, x := range []int{19, 21, 24, 26, 28, 30, 32, 34} {
+ v, err := strconv.ParseUint(s[x:x+2], 16, 8)
+ if err != nil {
+ return GUID{}, fmt.Errorf("invalid GUID %q", s)
+ }
+ g.Data4[i] = uint8(v)
+ }
+
+ return g, nil
+}
+
+func (g *GUID) setVariant(v Variant) {
+ d := g.Data4[0]
+ switch v {
+ case VariantNCS:
+ d = (d & 0x7f)
+ case VariantRFC4122:
+ d = (d & 0x3f) | 0x80
+ case VariantMicrosoft:
+ d = (d & 0x1f) | 0xc0
+ case VariantFuture:
+ d = (d & 0x0f) | 0xe0
+ case VariantUnknown:
+ fallthrough
+ default:
+ panic(fmt.Sprintf("invalid variant: %d", v))
+ }
+ g.Data4[0] = d
+}
+
+// Variant returns the GUID variant, as defined in RFC 4122.
+func (g GUID) Variant() Variant {
+ b := g.Data4[0]
+ if b&0x80 == 0 {
+ return VariantNCS
+ } else if b&0xc0 == 0x80 {
+ return VariantRFC4122
+ } else if b&0xe0 == 0xc0 {
+ return VariantMicrosoft
+ } else if b&0xe0 == 0xe0 {
+ return VariantFuture
+ }
+ return VariantUnknown
+}
+
+func (g *GUID) setVersion(v Version) {
+ g.Data3 = (g.Data3 & 0x0fff) | (uint16(v) << 12)
+}
+
+// Version returns the GUID version, as defined in RFC 4122.
+func (g GUID) Version() Version {
+ return Version((g.Data3 & 0xF000) >> 12)
+}
+
+// MarshalText returns the textual representation of the GUID.
+func (g GUID) MarshalText() ([]byte, error) {
+ return []byte(g.String()), nil
+}
+
+// UnmarshalText takes the textual representation of a GUID, and unmarhals it
+// into this GUID.
+func (g *GUID) UnmarshalText(text []byte) error {
+ g2, err := FromString(string(text))
+ if err != nil {
+ return err
+ }
+ *g = g2
+ return nil
+}
diff --git a/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go
new file mode 100644
index 000000000..805bd3548
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_nonwindows.go
@@ -0,0 +1,16 @@
+//go:build !windows
+// +build !windows
+
+package guid
+
+// GUID represents a GUID/UUID. It has the same structure as
+// golang.org/x/sys/windows.GUID so that it can be used with functions expecting
+// that type. It is defined as its own type as that is only available to builds
+// targeted at `windows`. The representation matches that used by native Windows
+// code.
+type GUID struct {
+ Data1 uint32
+ Data2 uint16
+ Data3 uint16
+ Data4 [8]byte
+}
diff --git a/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go
new file mode 100644
index 000000000..27e45ee5c
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/pkg/guid/guid_windows.go
@@ -0,0 +1,13 @@
+//go:build windows
+// +build windows
+
+package guid
+
+import "golang.org/x/sys/windows"
+
+// GUID represents a GUID/UUID. It has the same structure as
+// golang.org/x/sys/windows.GUID so that it can be used with functions expecting
+// that type. It is defined as its own type so that stringification and
+// marshaling can be supported. The representation matches that used by native
+// Windows code.
+type GUID windows.GUID
diff --git a/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go b/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go
new file mode 100644
index 000000000..4076d3132
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/pkg/guid/variant_string.go
@@ -0,0 +1,27 @@
+// Code generated by "stringer -type=Variant -trimprefix=Variant -linecomment"; DO NOT EDIT.
+
+package guid
+
+import "strconv"
+
+func _() {
+ // An "invalid array index" compiler error signifies that the constant values have changed.
+ // Re-run the stringer command to generate them again.
+ var x [1]struct{}
+ _ = x[VariantUnknown-0]
+ _ = x[VariantNCS-1]
+ _ = x[VariantRFC4122-2]
+ _ = x[VariantMicrosoft-3]
+ _ = x[VariantFuture-4]
+}
+
+const _Variant_name = "UnknownNCSRFC 4122MicrosoftFuture"
+
+var _Variant_index = [...]uint8{0, 7, 10, 18, 27, 33}
+
+func (i Variant) String() string {
+ if i >= Variant(len(_Variant_index)-1) {
+ return "Variant(" + strconv.FormatInt(int64(i), 10) + ")"
+ }
+ return _Variant_name[_Variant_index[i]:_Variant_index[i+1]]
+}
diff --git a/vendor/github.com/Microsoft/go-winio/privilege.go b/vendor/github.com/Microsoft/go-winio/privilege.go
new file mode 100644
index 000000000..0ff9dac90
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/privilege.go
@@ -0,0 +1,197 @@
+//go:build windows
+// +build windows
+
+package winio
+
+import (
+ "bytes"
+ "encoding/binary"
+ "fmt"
+ "runtime"
+ "sync"
+ "syscall"
+ "unicode/utf16"
+
+ "golang.org/x/sys/windows"
+)
+
+//sys adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) [true] = advapi32.AdjustTokenPrivileges
+//sys impersonateSelf(level uint32) (err error) = advapi32.ImpersonateSelf
+//sys revertToSelf() (err error) = advapi32.RevertToSelf
+//sys openThreadToken(thread syscall.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) = advapi32.OpenThreadToken
+//sys getCurrentThread() (h syscall.Handle) = GetCurrentThread
+//sys lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) = advapi32.LookupPrivilegeValueW
+//sys lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) = advapi32.LookupPrivilegeNameW
+//sys lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) = advapi32.LookupPrivilegeDisplayNameW
+
+const (
+ //revive:disable-next-line:var-naming ALL_CAPS
+ SE_PRIVILEGE_ENABLED = windows.SE_PRIVILEGE_ENABLED
+
+ //revive:disable-next-line:var-naming ALL_CAPS
+ ERROR_NOT_ALL_ASSIGNED syscall.Errno = windows.ERROR_NOT_ALL_ASSIGNED
+
+ SeBackupPrivilege = "SeBackupPrivilege"
+ SeRestorePrivilege = "SeRestorePrivilege"
+ SeSecurityPrivilege = "SeSecurityPrivilege"
+)
+
+var (
+ privNames = make(map[string]uint64)
+ privNameMutex sync.Mutex
+)
+
+// PrivilegeError represents an error enabling privileges.
+type PrivilegeError struct {
+ privileges []uint64
+}
+
+func (e *PrivilegeError) Error() string {
+ s := "Could not enable privilege "
+ if len(e.privileges) > 1 {
+ s = "Could not enable privileges "
+ }
+ for i, p := range e.privileges {
+ if i != 0 {
+ s += ", "
+ }
+ s += `"`
+ s += getPrivilegeName(p)
+ s += `"`
+ }
+ return s
+}
+
+// RunWithPrivilege enables a single privilege for a function call.
+func RunWithPrivilege(name string, fn func() error) error {
+ return RunWithPrivileges([]string{name}, fn)
+}
+
+// RunWithPrivileges enables privileges for a function call.
+func RunWithPrivileges(names []string, fn func() error) error {
+ privileges, err := mapPrivileges(names)
+ if err != nil {
+ return err
+ }
+ runtime.LockOSThread()
+ defer runtime.UnlockOSThread()
+ token, err := newThreadToken()
+ if err != nil {
+ return err
+ }
+ defer releaseThreadToken(token)
+ err = adjustPrivileges(token, privileges, SE_PRIVILEGE_ENABLED)
+ if err != nil {
+ return err
+ }
+ return fn()
+}
+
+func mapPrivileges(names []string) ([]uint64, error) {
+ privileges := make([]uint64, 0, len(names))
+ privNameMutex.Lock()
+ defer privNameMutex.Unlock()
+ for _, name := range names {
+ p, ok := privNames[name]
+ if !ok {
+ err := lookupPrivilegeValue("", name, &p)
+ if err != nil {
+ return nil, err
+ }
+ privNames[name] = p
+ }
+ privileges = append(privileges, p)
+ }
+ return privileges, nil
+}
+
+// EnableProcessPrivileges enables privileges globally for the process.
+func EnableProcessPrivileges(names []string) error {
+ return enableDisableProcessPrivilege(names, SE_PRIVILEGE_ENABLED)
+}
+
+// DisableProcessPrivileges disables privileges globally for the process.
+func DisableProcessPrivileges(names []string) error {
+ return enableDisableProcessPrivilege(names, 0)
+}
+
+func enableDisableProcessPrivilege(names []string, action uint32) error {
+ privileges, err := mapPrivileges(names)
+ if err != nil {
+ return err
+ }
+
+ p := windows.CurrentProcess()
+ var token windows.Token
+ err = windows.OpenProcessToken(p, windows.TOKEN_ADJUST_PRIVILEGES|windows.TOKEN_QUERY, &token)
+ if err != nil {
+ return err
+ }
+
+ defer token.Close()
+ return adjustPrivileges(token, privileges, action)
+}
+
+func adjustPrivileges(token windows.Token, privileges []uint64, action uint32) error {
+ var b bytes.Buffer
+ _ = binary.Write(&b, binary.LittleEndian, uint32(len(privileges)))
+ for _, p := range privileges {
+ _ = binary.Write(&b, binary.LittleEndian, p)
+ _ = binary.Write(&b, binary.LittleEndian, action)
+ }
+ prevState := make([]byte, b.Len())
+ reqSize := uint32(0)
+ success, err := adjustTokenPrivileges(token, false, &b.Bytes()[0], uint32(len(prevState)), &prevState[0], &reqSize)
+ if !success {
+ return err
+ }
+ if err == ERROR_NOT_ALL_ASSIGNED { //nolint:errorlint // err is Errno
+ return &PrivilegeError{privileges}
+ }
+ return nil
+}
+
+func getPrivilegeName(luid uint64) string {
+ var nameBuffer [256]uint16
+ bufSize := uint32(len(nameBuffer))
+ err := lookupPrivilegeName("", &luid, &nameBuffer[0], &bufSize)
+ if err != nil {
+ return fmt.Sprintf("", luid)
+ }
+
+ var displayNameBuffer [256]uint16
+ displayBufSize := uint32(len(displayNameBuffer))
+ var langID uint32
+ err = lookupPrivilegeDisplayName("", &nameBuffer[0], &displayNameBuffer[0], &displayBufSize, &langID)
+ if err != nil {
+ return fmt.Sprintf("", string(utf16.Decode(nameBuffer[:bufSize])))
+ }
+
+ return string(utf16.Decode(displayNameBuffer[:displayBufSize]))
+}
+
+func newThreadToken() (windows.Token, error) {
+ err := impersonateSelf(windows.SecurityImpersonation)
+ if err != nil {
+ return 0, err
+ }
+
+ var token windows.Token
+ err = openThreadToken(getCurrentThread(), syscall.TOKEN_ADJUST_PRIVILEGES|syscall.TOKEN_QUERY, false, &token)
+ if err != nil {
+ rerr := revertToSelf()
+ if rerr != nil {
+ panic(rerr)
+ }
+ return 0, err
+ }
+ return token, nil
+}
+
+func releaseThreadToken(h windows.Token) {
+ err := revertToSelf()
+ if err != nil {
+ panic(err)
+ }
+ h.Close()
+}
diff --git a/vendor/github.com/Microsoft/go-winio/reparse.go b/vendor/github.com/Microsoft/go-winio/reparse.go
new file mode 100644
index 000000000..67d1a104a
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/reparse.go
@@ -0,0 +1,131 @@
+//go:build windows
+// +build windows
+
+package winio
+
+import (
+ "bytes"
+ "encoding/binary"
+ "fmt"
+ "strings"
+ "unicode/utf16"
+ "unsafe"
+)
+
+const (
+ reparseTagMountPoint = 0xA0000003
+ reparseTagSymlink = 0xA000000C
+)
+
+type reparseDataBuffer struct {
+ ReparseTag uint32
+ ReparseDataLength uint16
+ Reserved uint16
+ SubstituteNameOffset uint16
+ SubstituteNameLength uint16
+ PrintNameOffset uint16
+ PrintNameLength uint16
+}
+
+// ReparsePoint describes a Win32 symlink or mount point.
+type ReparsePoint struct {
+ Target string
+ IsMountPoint bool
+}
+
+// UnsupportedReparsePointError is returned when trying to decode a non-symlink or
+// mount point reparse point.
+type UnsupportedReparsePointError struct {
+ Tag uint32
+}
+
+func (e *UnsupportedReparsePointError) Error() string {
+ return fmt.Sprintf("unsupported reparse point %x", e.Tag)
+}
+
+// DecodeReparsePoint decodes a Win32 REPARSE_DATA_BUFFER structure containing either a symlink
+// or a mount point.
+func DecodeReparsePoint(b []byte) (*ReparsePoint, error) {
+ tag := binary.LittleEndian.Uint32(b[0:4])
+ return DecodeReparsePointData(tag, b[8:])
+}
+
+func DecodeReparsePointData(tag uint32, b []byte) (*ReparsePoint, error) {
+ isMountPoint := false
+ switch tag {
+ case reparseTagMountPoint:
+ isMountPoint = true
+ case reparseTagSymlink:
+ default:
+ return nil, &UnsupportedReparsePointError{tag}
+ }
+ nameOffset := 8 + binary.LittleEndian.Uint16(b[4:6])
+ if !isMountPoint {
+ nameOffset += 4
+ }
+ nameLength := binary.LittleEndian.Uint16(b[6:8])
+ name := make([]uint16, nameLength/2)
+ err := binary.Read(bytes.NewReader(b[nameOffset:nameOffset+nameLength]), binary.LittleEndian, &name)
+ if err != nil {
+ return nil, err
+ }
+ return &ReparsePoint{string(utf16.Decode(name)), isMountPoint}, nil
+}
+
+func isDriveLetter(c byte) bool {
+ return (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z')
+}
+
+// EncodeReparsePoint encodes a Win32 REPARSE_DATA_BUFFER structure describing a symlink or
+// mount point.
+func EncodeReparsePoint(rp *ReparsePoint) []byte {
+ // Generate an NT path and determine if this is a relative path.
+ var ntTarget string
+ relative := false
+ if strings.HasPrefix(rp.Target, `\\?\`) {
+ ntTarget = `\??\` + rp.Target[4:]
+ } else if strings.HasPrefix(rp.Target, `\\`) {
+ ntTarget = `\??\UNC\` + rp.Target[2:]
+ } else if len(rp.Target) >= 2 && isDriveLetter(rp.Target[0]) && rp.Target[1] == ':' {
+ ntTarget = `\??\` + rp.Target
+ } else {
+ ntTarget = rp.Target
+ relative = true
+ }
+
+ // The paths must be NUL-terminated even though they are counted strings.
+ target16 := utf16.Encode([]rune(rp.Target + "\x00"))
+ ntTarget16 := utf16.Encode([]rune(ntTarget + "\x00"))
+
+ size := int(unsafe.Sizeof(reparseDataBuffer{})) - 8
+ size += len(ntTarget16)*2 + len(target16)*2
+
+ tag := uint32(reparseTagMountPoint)
+ if !rp.IsMountPoint {
+ tag = reparseTagSymlink
+ size += 4 // Add room for symlink flags
+ }
+
+ data := reparseDataBuffer{
+ ReparseTag: tag,
+ ReparseDataLength: uint16(size),
+ SubstituteNameOffset: 0,
+ SubstituteNameLength: uint16((len(ntTarget16) - 1) * 2),
+ PrintNameOffset: uint16(len(ntTarget16) * 2),
+ PrintNameLength: uint16((len(target16) - 1) * 2),
+ }
+
+ var b bytes.Buffer
+ _ = binary.Write(&b, binary.LittleEndian, &data)
+ if !rp.IsMountPoint {
+ flags := uint32(0)
+ if relative {
+ flags |= 1
+ }
+ _ = binary.Write(&b, binary.LittleEndian, flags)
+ }
+
+ _ = binary.Write(&b, binary.LittleEndian, ntTarget16)
+ _ = binary.Write(&b, binary.LittleEndian, target16)
+ return b.Bytes()
+}
diff --git a/vendor/github.com/Microsoft/go-winio/sd.go b/vendor/github.com/Microsoft/go-winio/sd.go
new file mode 100644
index 000000000..5550ef6b6
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/sd.go
@@ -0,0 +1,144 @@
+//go:build windows
+// +build windows
+
+package winio
+
+import (
+ "errors"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+//sys lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountNameW
+//sys lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) = advapi32.LookupAccountSidW
+//sys convertSidToStringSid(sid *byte, str **uint16) (err error) = advapi32.ConvertSidToStringSidW
+//sys convertStringSidToSid(str *uint16, sid **byte) (err error) = advapi32.ConvertStringSidToSidW
+//sys convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd *uintptr, size *uint32) (err error) = advapi32.ConvertStringSecurityDescriptorToSecurityDescriptorW
+//sys convertSecurityDescriptorToStringSecurityDescriptor(sd *byte, revision uint32, secInfo uint32, sddl **uint16, sddlSize *uint32) (err error) = advapi32.ConvertSecurityDescriptorToStringSecurityDescriptorW
+//sys localFree(mem uintptr) = LocalFree
+//sys getSecurityDescriptorLength(sd uintptr) (len uint32) = advapi32.GetSecurityDescriptorLength
+
+type AccountLookupError struct {
+ Name string
+ Err error
+}
+
+func (e *AccountLookupError) Error() string {
+ if e.Name == "" {
+ return "lookup account: empty account name specified"
+ }
+ var s string
+ switch {
+ case errors.Is(e.Err, windows.ERROR_INVALID_SID):
+ s = "the security ID structure is invalid"
+ case errors.Is(e.Err, windows.ERROR_NONE_MAPPED):
+ s = "not found"
+ default:
+ s = e.Err.Error()
+ }
+ return "lookup account " + e.Name + ": " + s
+}
+
+func (e *AccountLookupError) Unwrap() error { return e.Err }
+
+type SddlConversionError struct {
+ Sddl string
+ Err error
+}
+
+func (e *SddlConversionError) Error() string {
+ return "convert " + e.Sddl + ": " + e.Err.Error()
+}
+
+func (e *SddlConversionError) Unwrap() error { return e.Err }
+
+// LookupSidByName looks up the SID of an account by name
+//
+//revive:disable-next-line:var-naming SID, not Sid
+func LookupSidByName(name string) (sid string, err error) {
+ if name == "" {
+ return "", &AccountLookupError{name, windows.ERROR_NONE_MAPPED}
+ }
+
+ var sidSize, sidNameUse, refDomainSize uint32
+ err = lookupAccountName(nil, name, nil, &sidSize, nil, &refDomainSize, &sidNameUse)
+ if err != nil && err != syscall.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno
+ return "", &AccountLookupError{name, err}
+ }
+ sidBuffer := make([]byte, sidSize)
+ refDomainBuffer := make([]uint16, refDomainSize)
+ err = lookupAccountName(nil, name, &sidBuffer[0], &sidSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse)
+ if err != nil {
+ return "", &AccountLookupError{name, err}
+ }
+ var strBuffer *uint16
+ err = convertSidToStringSid(&sidBuffer[0], &strBuffer)
+ if err != nil {
+ return "", &AccountLookupError{name, err}
+ }
+ sid = syscall.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(strBuffer))[:])
+ localFree(uintptr(unsafe.Pointer(strBuffer)))
+ return sid, nil
+}
+
+// LookupNameBySid looks up the name of an account by SID
+//
+//revive:disable-next-line:var-naming SID, not Sid
+func LookupNameBySid(sid string) (name string, err error) {
+ if sid == "" {
+ return "", &AccountLookupError{sid, windows.ERROR_NONE_MAPPED}
+ }
+
+ sidBuffer, err := windows.UTF16PtrFromString(sid)
+ if err != nil {
+ return "", &AccountLookupError{sid, err}
+ }
+
+ var sidPtr *byte
+ if err = convertStringSidToSid(sidBuffer, &sidPtr); err != nil {
+ return "", &AccountLookupError{sid, err}
+ }
+ defer localFree(uintptr(unsafe.Pointer(sidPtr)))
+
+ var nameSize, refDomainSize, sidNameUse uint32
+ err = lookupAccountSid(nil, sidPtr, nil, &nameSize, nil, &refDomainSize, &sidNameUse)
+ if err != nil && err != windows.ERROR_INSUFFICIENT_BUFFER { //nolint:errorlint // err is Errno
+ return "", &AccountLookupError{sid, err}
+ }
+
+ nameBuffer := make([]uint16, nameSize)
+ refDomainBuffer := make([]uint16, refDomainSize)
+ err = lookupAccountSid(nil, sidPtr, &nameBuffer[0], &nameSize, &refDomainBuffer[0], &refDomainSize, &sidNameUse)
+ if err != nil {
+ return "", &AccountLookupError{sid, err}
+ }
+
+ name = windows.UTF16ToString(nameBuffer)
+ return name, nil
+}
+
+func SddlToSecurityDescriptor(sddl string) ([]byte, error) {
+ var sdBuffer uintptr
+ err := convertStringSecurityDescriptorToSecurityDescriptor(sddl, 1, &sdBuffer, nil)
+ if err != nil {
+ return nil, &SddlConversionError{sddl, err}
+ }
+ defer localFree(sdBuffer)
+ sd := make([]byte, getSecurityDescriptorLength(sdBuffer))
+ copy(sd, (*[0xffff]byte)(unsafe.Pointer(sdBuffer))[:len(sd)])
+ return sd, nil
+}
+
+func SecurityDescriptorToSddl(sd []byte) (string, error) {
+ var sddl *uint16
+ // The returned string length seems to include an arbitrary number of terminating NULs.
+ // Don't use it.
+ err := convertSecurityDescriptorToStringSecurityDescriptor(&sd[0], 1, 0xff, &sddl, nil)
+ if err != nil {
+ return "", err
+ }
+ defer localFree(uintptr(unsafe.Pointer(sddl)))
+ return syscall.UTF16ToString((*[0xffff]uint16)(unsafe.Pointer(sddl))[:]), nil
+}
diff --git a/vendor/github.com/Microsoft/go-winio/syscall.go b/vendor/github.com/Microsoft/go-winio/syscall.go
new file mode 100644
index 000000000..a6ca111b3
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/syscall.go
@@ -0,0 +1,5 @@
+//go:build windows
+
+package winio
+
+//go:generate go run github.com/Microsoft/go-winio/tools/mkwinsyscall -output zsyscall_windows.go ./*.go
diff --git a/vendor/github.com/Microsoft/go-winio/tools.go b/vendor/github.com/Microsoft/go-winio/tools.go
new file mode 100644
index 000000000..2aa045843
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/tools.go
@@ -0,0 +1,5 @@
+//go:build tools
+
+package winio
+
+import _ "golang.org/x/tools/cmd/stringer"
diff --git a/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go b/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go
new file mode 100644
index 000000000..83f45a135
--- /dev/null
+++ b/vendor/github.com/Microsoft/go-winio/zsyscall_windows.go
@@ -0,0 +1,438 @@
+//go:build windows
+
+// Code generated by 'go generate' using "github.com/Microsoft/go-winio/tools/mkwinsyscall"; DO NOT EDIT.
+
+package winio
+
+import (
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/sys/windows"
+)
+
+var _ unsafe.Pointer
+
+// Do the interface allocations only once for common
+// Errno values.
+const (
+ errnoERROR_IO_PENDING = 997
+)
+
+var (
+ errERROR_IO_PENDING error = syscall.Errno(errnoERROR_IO_PENDING)
+ errERROR_EINVAL error = syscall.EINVAL
+)
+
+// errnoErr returns common boxed Errno values, to prevent
+// allocations at runtime.
+func errnoErr(e syscall.Errno) error {
+ switch e {
+ case 0:
+ return errERROR_EINVAL
+ case errnoERROR_IO_PENDING:
+ return errERROR_IO_PENDING
+ }
+ // TODO: add more here, after collecting data on the common
+ // error values see on Windows. (perhaps when running
+ // all.bat?)
+ return e
+}
+
+var (
+ modadvapi32 = windows.NewLazySystemDLL("advapi32.dll")
+ modkernel32 = windows.NewLazySystemDLL("kernel32.dll")
+ modntdll = windows.NewLazySystemDLL("ntdll.dll")
+ modws2_32 = windows.NewLazySystemDLL("ws2_32.dll")
+
+ procAdjustTokenPrivileges = modadvapi32.NewProc("AdjustTokenPrivileges")
+ procConvertSecurityDescriptorToStringSecurityDescriptorW = modadvapi32.NewProc("ConvertSecurityDescriptorToStringSecurityDescriptorW")
+ procConvertSidToStringSidW = modadvapi32.NewProc("ConvertSidToStringSidW")
+ procConvertStringSecurityDescriptorToSecurityDescriptorW = modadvapi32.NewProc("ConvertStringSecurityDescriptorToSecurityDescriptorW")
+ procConvertStringSidToSidW = modadvapi32.NewProc("ConvertStringSidToSidW")
+ procGetSecurityDescriptorLength = modadvapi32.NewProc("GetSecurityDescriptorLength")
+ procImpersonateSelf = modadvapi32.NewProc("ImpersonateSelf")
+ procLookupAccountNameW = modadvapi32.NewProc("LookupAccountNameW")
+ procLookupAccountSidW = modadvapi32.NewProc("LookupAccountSidW")
+ procLookupPrivilegeDisplayNameW = modadvapi32.NewProc("LookupPrivilegeDisplayNameW")
+ procLookupPrivilegeNameW = modadvapi32.NewProc("LookupPrivilegeNameW")
+ procLookupPrivilegeValueW = modadvapi32.NewProc("LookupPrivilegeValueW")
+ procOpenThreadToken = modadvapi32.NewProc("OpenThreadToken")
+ procRevertToSelf = modadvapi32.NewProc("RevertToSelf")
+ procBackupRead = modkernel32.NewProc("BackupRead")
+ procBackupWrite = modkernel32.NewProc("BackupWrite")
+ procCancelIoEx = modkernel32.NewProc("CancelIoEx")
+ procConnectNamedPipe = modkernel32.NewProc("ConnectNamedPipe")
+ procCreateFileW = modkernel32.NewProc("CreateFileW")
+ procCreateIoCompletionPort = modkernel32.NewProc("CreateIoCompletionPort")
+ procCreateNamedPipeW = modkernel32.NewProc("CreateNamedPipeW")
+ procGetCurrentThread = modkernel32.NewProc("GetCurrentThread")
+ procGetNamedPipeHandleStateW = modkernel32.NewProc("GetNamedPipeHandleStateW")
+ procGetNamedPipeInfo = modkernel32.NewProc("GetNamedPipeInfo")
+ procGetQueuedCompletionStatus = modkernel32.NewProc("GetQueuedCompletionStatus")
+ procLocalAlloc = modkernel32.NewProc("LocalAlloc")
+ procLocalFree = modkernel32.NewProc("LocalFree")
+ procSetFileCompletionNotificationModes = modkernel32.NewProc("SetFileCompletionNotificationModes")
+ procNtCreateNamedPipeFile = modntdll.NewProc("NtCreateNamedPipeFile")
+ procRtlDefaultNpAcl = modntdll.NewProc("RtlDefaultNpAcl")
+ procRtlDosPathNameToNtPathName_U = modntdll.NewProc("RtlDosPathNameToNtPathName_U")
+ procRtlNtStatusToDosErrorNoTeb = modntdll.NewProc("RtlNtStatusToDosErrorNoTeb")
+ procWSAGetOverlappedResult = modws2_32.NewProc("WSAGetOverlappedResult")
+)
+
+func adjustTokenPrivileges(token windows.Token, releaseAll bool, input *byte, outputSize uint32, output *byte, requiredSize *uint32) (success bool, err error) {
+ var _p0 uint32
+ if releaseAll {
+ _p0 = 1
+ }
+ r0, _, e1 := syscall.Syscall6(procAdjustTokenPrivileges.Addr(), 6, uintptr(token), uintptr(_p0), uintptr(unsafe.Pointer(input)), uintptr(outputSize), uintptr(unsafe.Pointer(output)), uintptr(unsafe.Pointer(requiredSize)))
+ success = r0 != 0
+ if true {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func convertSecurityDescriptorToStringSecurityDescriptor(sd *byte, revision uint32, secInfo uint32, sddl **uint16, sddlSize *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procConvertSecurityDescriptorToStringSecurityDescriptorW.Addr(), 5, uintptr(unsafe.Pointer(sd)), uintptr(revision), uintptr(secInfo), uintptr(unsafe.Pointer(sddl)), uintptr(unsafe.Pointer(sddlSize)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func convertSidToStringSid(sid *byte, str **uint16) (err error) {
+ r1, _, e1 := syscall.Syscall(procConvertSidToStringSidW.Addr(), 2, uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(str)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func convertStringSecurityDescriptorToSecurityDescriptor(str string, revision uint32, sd *uintptr, size *uint32) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(str)
+ if err != nil {
+ return
+ }
+ return _convertStringSecurityDescriptorToSecurityDescriptor(_p0, revision, sd, size)
+}
+
+func _convertStringSecurityDescriptorToSecurityDescriptor(str *uint16, revision uint32, sd *uintptr, size *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procConvertStringSecurityDescriptorToSecurityDescriptorW.Addr(), 4, uintptr(unsafe.Pointer(str)), uintptr(revision), uintptr(unsafe.Pointer(sd)), uintptr(unsafe.Pointer(size)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func convertStringSidToSid(str *uint16, sid **byte) (err error) {
+ r1, _, e1 := syscall.Syscall(procConvertStringSidToSidW.Addr(), 2, uintptr(unsafe.Pointer(str)), uintptr(unsafe.Pointer(sid)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func getSecurityDescriptorLength(sd uintptr) (len uint32) {
+ r0, _, _ := syscall.Syscall(procGetSecurityDescriptorLength.Addr(), 1, uintptr(sd), 0, 0)
+ len = uint32(r0)
+ return
+}
+
+func impersonateSelf(level uint32) (err error) {
+ r1, _, e1 := syscall.Syscall(procImpersonateSelf.Addr(), 1, uintptr(level), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func lookupAccountName(systemName *uint16, accountName string, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(accountName)
+ if err != nil {
+ return
+ }
+ return _lookupAccountName(systemName, _p0, sid, sidSize, refDomain, refDomainSize, sidNameUse)
+}
+
+func _lookupAccountName(systemName *uint16, accountName *uint16, sid *byte, sidSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procLookupAccountNameW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(accountName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(sidSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func lookupAccountSid(systemName *uint16, sid *byte, name *uint16, nameSize *uint32, refDomain *uint16, refDomainSize *uint32, sidNameUse *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procLookupAccountSidW.Addr(), 7, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(sid)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(nameSize)), uintptr(unsafe.Pointer(refDomain)), uintptr(unsafe.Pointer(refDomainSize)), uintptr(unsafe.Pointer(sidNameUse)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func lookupPrivilegeDisplayName(systemName string, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(systemName)
+ if err != nil {
+ return
+ }
+ return _lookupPrivilegeDisplayName(_p0, name, buffer, size, languageId)
+}
+
+func _lookupPrivilegeDisplayName(systemName *uint16, name *uint16, buffer *uint16, size *uint32, languageId *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procLookupPrivilegeDisplayNameW.Addr(), 5, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size)), uintptr(unsafe.Pointer(languageId)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func lookupPrivilegeName(systemName string, luid *uint64, buffer *uint16, size *uint32) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(systemName)
+ if err != nil {
+ return
+ }
+ return _lookupPrivilegeName(_p0, luid, buffer, size)
+}
+
+func _lookupPrivilegeName(systemName *uint16, luid *uint64, buffer *uint16, size *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procLookupPrivilegeNameW.Addr(), 4, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(luid)), uintptr(unsafe.Pointer(buffer)), uintptr(unsafe.Pointer(size)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func lookupPrivilegeValue(systemName string, name string, luid *uint64) (err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(systemName)
+ if err != nil {
+ return
+ }
+ var _p1 *uint16
+ _p1, err = syscall.UTF16PtrFromString(name)
+ if err != nil {
+ return
+ }
+ return _lookupPrivilegeValue(_p0, _p1, luid)
+}
+
+func _lookupPrivilegeValue(systemName *uint16, name *uint16, luid *uint64) (err error) {
+ r1, _, e1 := syscall.Syscall(procLookupPrivilegeValueW.Addr(), 3, uintptr(unsafe.Pointer(systemName)), uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(luid)))
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func openThreadToken(thread syscall.Handle, accessMask uint32, openAsSelf bool, token *windows.Token) (err error) {
+ var _p0 uint32
+ if openAsSelf {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procOpenThreadToken.Addr(), 4, uintptr(thread), uintptr(accessMask), uintptr(_p0), uintptr(unsafe.Pointer(token)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func revertToSelf() (err error) {
+ r1, _, e1 := syscall.Syscall(procRevertToSelf.Addr(), 0, 0, 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func backupRead(h syscall.Handle, b []byte, bytesRead *uint32, abort bool, processSecurity bool, context *uintptr) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 uint32
+ if abort {
+ _p1 = 1
+ }
+ var _p2 uint32
+ if processSecurity {
+ _p2 = 1
+ }
+ r1, _, e1 := syscall.Syscall9(procBackupRead.Addr(), 7, uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesRead)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func backupWrite(h syscall.Handle, b []byte, bytesWritten *uint32, abort bool, processSecurity bool, context *uintptr) (err error) {
+ var _p0 *byte
+ if len(b) > 0 {
+ _p0 = &b[0]
+ }
+ var _p1 uint32
+ if abort {
+ _p1 = 1
+ }
+ var _p2 uint32
+ if processSecurity {
+ _p2 = 1
+ }
+ r1, _, e1 := syscall.Syscall9(procBackupWrite.Addr(), 7, uintptr(h), uintptr(unsafe.Pointer(_p0)), uintptr(len(b)), uintptr(unsafe.Pointer(bytesWritten)), uintptr(_p1), uintptr(_p2), uintptr(unsafe.Pointer(context)), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func cancelIoEx(file syscall.Handle, o *syscall.Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall(procCancelIoEx.Addr(), 2, uintptr(file), uintptr(unsafe.Pointer(o)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func connectNamedPipe(pipe syscall.Handle, o *syscall.Overlapped) (err error) {
+ r1, _, e1 := syscall.Syscall(procConnectNamedPipe.Addr(), 2, uintptr(pipe), uintptr(unsafe.Pointer(o)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func createFile(name string, access uint32, mode uint32, sa *syscall.SecurityAttributes, createmode uint32, attrs uint32, templatefile syscall.Handle) (handle syscall.Handle, err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(name)
+ if err != nil {
+ return
+ }
+ return _createFile(_p0, access, mode, sa, createmode, attrs, templatefile)
+}
+
+func _createFile(name *uint16, access uint32, mode uint32, sa *syscall.SecurityAttributes, createmode uint32, attrs uint32, templatefile syscall.Handle) (handle syscall.Handle, err error) {
+ r0, _, e1 := syscall.Syscall9(procCreateFileW.Addr(), 7, uintptr(unsafe.Pointer(name)), uintptr(access), uintptr(mode), uintptr(unsafe.Pointer(sa)), uintptr(createmode), uintptr(attrs), uintptr(templatefile), 0, 0)
+ handle = syscall.Handle(r0)
+ if handle == syscall.InvalidHandle {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func createIoCompletionPort(file syscall.Handle, port syscall.Handle, key uintptr, threadCount uint32) (newport syscall.Handle, err error) {
+ r0, _, e1 := syscall.Syscall6(procCreateIoCompletionPort.Addr(), 4, uintptr(file), uintptr(port), uintptr(key), uintptr(threadCount), 0, 0)
+ newport = syscall.Handle(r0)
+ if newport == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func createNamedPipe(name string, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *syscall.SecurityAttributes) (handle syscall.Handle, err error) {
+ var _p0 *uint16
+ _p0, err = syscall.UTF16PtrFromString(name)
+ if err != nil {
+ return
+ }
+ return _createNamedPipe(_p0, flags, pipeMode, maxInstances, outSize, inSize, defaultTimeout, sa)
+}
+
+func _createNamedPipe(name *uint16, flags uint32, pipeMode uint32, maxInstances uint32, outSize uint32, inSize uint32, defaultTimeout uint32, sa *syscall.SecurityAttributes) (handle syscall.Handle, err error) {
+ r0, _, e1 := syscall.Syscall9(procCreateNamedPipeW.Addr(), 8, uintptr(unsafe.Pointer(name)), uintptr(flags), uintptr(pipeMode), uintptr(maxInstances), uintptr(outSize), uintptr(inSize), uintptr(defaultTimeout), uintptr(unsafe.Pointer(sa)), 0)
+ handle = syscall.Handle(r0)
+ if handle == syscall.InvalidHandle {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func getCurrentThread() (h syscall.Handle) {
+ r0, _, _ := syscall.Syscall(procGetCurrentThread.Addr(), 0, 0, 0, 0)
+ h = syscall.Handle(r0)
+ return
+}
+
+func getNamedPipeHandleState(pipe syscall.Handle, state *uint32, curInstances *uint32, maxCollectionCount *uint32, collectDataTimeout *uint32, userName *uint16, maxUserNameSize uint32) (err error) {
+ r1, _, e1 := syscall.Syscall9(procGetNamedPipeHandleStateW.Addr(), 7, uintptr(pipe), uintptr(unsafe.Pointer(state)), uintptr(unsafe.Pointer(curInstances)), uintptr(unsafe.Pointer(maxCollectionCount)), uintptr(unsafe.Pointer(collectDataTimeout)), uintptr(unsafe.Pointer(userName)), uintptr(maxUserNameSize), 0, 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func getNamedPipeInfo(pipe syscall.Handle, flags *uint32, outSize *uint32, inSize *uint32, maxInstances *uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetNamedPipeInfo.Addr(), 5, uintptr(pipe), uintptr(unsafe.Pointer(flags)), uintptr(unsafe.Pointer(outSize)), uintptr(unsafe.Pointer(inSize)), uintptr(unsafe.Pointer(maxInstances)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func getQueuedCompletionStatus(port syscall.Handle, bytes *uint32, key *uintptr, o **ioOperation, timeout uint32) (err error) {
+ r1, _, e1 := syscall.Syscall6(procGetQueuedCompletionStatus.Addr(), 5, uintptr(port), uintptr(unsafe.Pointer(bytes)), uintptr(unsafe.Pointer(key)), uintptr(unsafe.Pointer(o)), uintptr(timeout), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func localAlloc(uFlags uint32, length uint32) (ptr uintptr) {
+ r0, _, _ := syscall.Syscall(procLocalAlloc.Addr(), 2, uintptr(uFlags), uintptr(length), 0)
+ ptr = uintptr(r0)
+ return
+}
+
+func localFree(mem uintptr) {
+ syscall.Syscall(procLocalFree.Addr(), 1, uintptr(mem), 0, 0)
+ return
+}
+
+func setFileCompletionNotificationModes(h syscall.Handle, flags uint8) (err error) {
+ r1, _, e1 := syscall.Syscall(procSetFileCompletionNotificationModes.Addr(), 2, uintptr(h), uintptr(flags), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
+
+func ntCreateNamedPipeFile(pipe *syscall.Handle, access uint32, oa *objectAttributes, iosb *ioStatusBlock, share uint32, disposition uint32, options uint32, typ uint32, readMode uint32, completionMode uint32, maxInstances uint32, inboundQuota uint32, outputQuota uint32, timeout *int64) (status ntStatus) {
+ r0, _, _ := syscall.Syscall15(procNtCreateNamedPipeFile.Addr(), 14, uintptr(unsafe.Pointer(pipe)), uintptr(access), uintptr(unsafe.Pointer(oa)), uintptr(unsafe.Pointer(iosb)), uintptr(share), uintptr(disposition), uintptr(options), uintptr(typ), uintptr(readMode), uintptr(completionMode), uintptr(maxInstances), uintptr(inboundQuota), uintptr(outputQuota), uintptr(unsafe.Pointer(timeout)), 0)
+ status = ntStatus(r0)
+ return
+}
+
+func rtlDefaultNpAcl(dacl *uintptr) (status ntStatus) {
+ r0, _, _ := syscall.Syscall(procRtlDefaultNpAcl.Addr(), 1, uintptr(unsafe.Pointer(dacl)), 0, 0)
+ status = ntStatus(r0)
+ return
+}
+
+func rtlDosPathNameToNtPathName(name *uint16, ntName *unicodeString, filePart uintptr, reserved uintptr) (status ntStatus) {
+ r0, _, _ := syscall.Syscall6(procRtlDosPathNameToNtPathName_U.Addr(), 4, uintptr(unsafe.Pointer(name)), uintptr(unsafe.Pointer(ntName)), uintptr(filePart), uintptr(reserved), 0, 0)
+ status = ntStatus(r0)
+ return
+}
+
+func rtlNtStatusToDosError(status ntStatus) (winerr error) {
+ r0, _, _ := syscall.Syscall(procRtlNtStatusToDosErrorNoTeb.Addr(), 1, uintptr(status), 0, 0)
+ if r0 != 0 {
+ winerr = syscall.Errno(r0)
+ }
+ return
+}
+
+func wsaGetOverlappedResult(h syscall.Handle, o *syscall.Overlapped, bytes *uint32, wait bool, flags *uint32) (err error) {
+ var _p0 uint32
+ if wait {
+ _p0 = 1
+ }
+ r1, _, e1 := syscall.Syscall6(procWSAGetOverlappedResult.Addr(), 5, uintptr(h), uintptr(unsafe.Pointer(o)), uintptr(unsafe.Pointer(bytes)), uintptr(_p0), uintptr(unsafe.Pointer(flags)), 0)
+ if r1 == 0 {
+ err = errnoErr(e1)
+ }
+ return
+}
diff --git a/vendor/github.com/bufbuild/buf/LICENSE b/vendor/github.com/bufbuild/buf/LICENSE
new file mode 100644
index 000000000..04cf1e316
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/LICENSE
@@ -0,0 +1,201 @@
+ 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 2020-2022 Buf Technologies, Inc.
+
+ 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/bufbuild/buf/cmd/buf/main.go b/vendor/github.com/bufbuild/buf/cmd/buf/main.go
new file mode 100644
index 000000000..f5a4918da
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/cmd/buf/main.go
@@ -0,0 +1,21 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 main
+
+import "github.com/bufbuild/buf/private/buf/cmd/buf"
+
+func main() {
+ buf.Main("buf")
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufapp/bufapp.go b/vendor/github.com/bufbuild/buf/private/buf/bufapp/bufapp.go
new file mode 100644
index 000000000..07a5a17b1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufapp/bufapp.go
@@ -0,0 +1,60 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufapp
+
+import (
+ "crypto/tls"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/pkg/app/appname"
+ "github.com/bufbuild/buf/private/pkg/cert/certclient"
+)
+
+const currentVersion = "v1"
+
+// ExternalConfig is an external config.
+type ExternalConfig struct {
+ // If editing ExternalConfig, make sure to update ExternalConfig.IsEmpty!
+
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ TLS certclient.ExternalClientTLSConfig `json:"tls,omitempty" yaml:"tls,omitempty"`
+}
+
+// IsEmpty returns true if the externalConfig is empty.
+func (e ExternalConfig) IsEmpty() bool {
+ return e.Version == "" && e.TLS.IsEmpty()
+}
+
+// Config is a config.
+type Config struct {
+ TLS *tls.Config
+}
+
+// NewConfig returns a new Config for the ExternalConfig.
+func NewConfig(
+ container appname.Container,
+ externalConfig ExternalConfig,
+) (*Config, error) {
+ if externalConfig.Version != currentVersion && !externalConfig.IsEmpty() {
+ return nil, fmt.Errorf("buf configuration at %q must declare 'version: %s'", container.ConfigDirPath(), currentVersion)
+ }
+ tlsConfig, err := certclient.NewClientTLSConfig(container, externalConfig.TLS)
+ if err != nil {
+ return nil, err
+ }
+ return &Config{
+ TLS: tlsConfig,
+ }, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufapp/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/bufapp/usage.gen.go
new file mode 100644
index 000000000..901cbc73f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufapp/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufapp
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufcli/bufcli.go b/vendor/github.com/bufbuild/buf/private/buf/bufcli/bufcli.go
new file mode 100644
index 000000000..a428dd79e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufcli/bufcli.go
@@ -0,0 +1,1046 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufcli
+
+import (
+ "bufio"
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "os"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/bufapp"
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/buf/bufwire"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufapimodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufconnect"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache"
+ "github.com/bufbuild/buf/private/bufpkg/buftransport"
+ "github.com/bufbuild/buf/private/gen/data/datawkt"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/app/appname"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/filelock"
+ "github.com/bufbuild/buf/private/pkg/git"
+ "github.com/bufbuild/buf/private/pkg/httpauth"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/bufbuild/buf/private/pkg/transport/http/httpclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/pflag"
+ "go.uber.org/zap"
+ "golang.org/x/term"
+)
+
+const (
+ // Version is the CLI version of buf.
+ Version = "1.11.0"
+
+ inputHTTPSUsernameEnvKey = "BUF_INPUT_HTTPS_USERNAME"
+ inputHTTPSPasswordEnvKey = "BUF_INPUT_HTTPS_PASSWORD"
+ inputSSHKeyFileEnvKey = "BUF_INPUT_SSH_KEY_FILE"
+ inputSSHKnownHostsFilesEnvKey = "BUF_INPUT_SSH_KNOWN_HOSTS_FILES"
+
+ alphaSuppressWarningsEnvKey = "BUF_ALPHA_SUPPRESS_WARNINGS"
+ betaSuppressWarningsEnvKey = "BUF_BETA_SUPPRESS_WARNINGS"
+
+ inputHashtagFlagName = "__hashtag__"
+ inputHashtagFlagShortName = "#"
+
+ userPromptAttempts = 3
+
+ publicVisibility = "public"
+ privateVisibility = "private"
+)
+
+var (
+ // defaultHTTPClient is the client we use for HTTP requests.
+ // Timeout should be set through context for calls to ImageConfigReader, not through http.Client
+ defaultHTTPClient = &http.Client{}
+ // defaultHTTPAuthenticator is the default authenticator
+ // used for HTTP requests.
+ defaultHTTPAuthenticator = httpauth.NewMultiAuthenticator(
+ httpauth.NewNetrcAuthenticator(),
+ // must keep this for legacy purposes
+ httpauth.NewEnvAuthenticator(
+ inputHTTPSPasswordEnvKey,
+ inputHTTPSPasswordEnvKey,
+ ),
+ )
+ // defaultGitClonerOptions defines the default git clone options.
+ defaultGitClonerOptions = git.ClonerOptions{
+ HTTPSUsernameEnvKey: inputHTTPSUsernameEnvKey,
+ HTTPSPasswordEnvKey: inputHTTPSPasswordEnvKey,
+ SSHKeyFileEnvKey: inputSSHKeyFileEnvKey,
+ SSHKnownHostsFilesEnvKey: inputSSHKnownHostsFilesEnvKey,
+ }
+
+ // AllCacheModuleRelDirPaths are all directory paths for all time concerning the module cache.
+ //
+ // These are normalized.
+ // These are relative to container.CacheDirPath().
+ //
+ // This variable is used for clearing the cache.
+ AllCacheModuleRelDirPaths = []string{
+ v1beta1CacheModuleDataRelDirPath,
+ v1beta1CacheModuleLockRelDirPath,
+ v1CacheModuleDataRelDirPath,
+ v1CacheModuleLockRelDirPath,
+ v1CacheModuleSumRelDirPath,
+ }
+
+ // ErrNotATTY is returned when an input io.Reader is not a TTY where it is expected.
+ ErrNotATTY = errors.New("reader was not a TTY as expected")
+
+ // v1CacheModuleDataRelDirPath is the relative path to the cache directory where module data
+ // was stored in v1beta1.
+ //
+ // Normalized.
+ v1beta1CacheModuleDataRelDirPath = "mod"
+
+ // v1CacheModuleLockRelDirPath is the relative path to the cache directory where module lock files
+ // were stored in v1beta1.
+ //
+ // Normalized.
+ v1beta1CacheModuleLockRelDirPath = normalpath.Join("lock", "mod")
+
+ // v1CacheModuleDataRelDirPath is the relative path to the cache directory where module data is stored.
+ //
+ // Normalized.
+ // This is where the actual "clones" of the modules are located.
+ v1CacheModuleDataRelDirPath = normalpath.Join("v1", "module", "data")
+ // v1CacheModuleLockRelDirPath is the relative path to the cache directory where module lock files are stored.
+ //
+ // Normalized.
+ // These lock files are used to make sure that multiple buf processes do not corrupt the cache.
+ v1CacheModuleLockRelDirPath = normalpath.Join("v1", "module", "lock")
+ // v1CacheModuleSumRelDirPath is the relative path to the cache directory where module digests are stored.
+ //
+ // Normalized.
+ // These digests are used to make sure that the data written is actually what we expect, and if it is not,
+ // we clear an entry from the cache, i.e. delete the relevant data directory.
+ v1CacheModuleSumRelDirPath = normalpath.Join("v1", "module", "sum")
+
+ // allVisibiltyStrings are the possible options that a user can set the visibility flag with.
+ allVisibiltyStrings = []string{
+ publicVisibility,
+ privateVisibility,
+ }
+)
+
+// GlobalFlags contains global flags for buf commands.
+type GlobalFlags struct{}
+
+// NewGlobalFlags creates a new GlobalFlags with default values..
+func NewGlobalFlags() *GlobalFlags {
+ return &GlobalFlags{}
+}
+
+// BindRoot binds the global flags to the root command flag set.
+func (*GlobalFlags) BindRoot(*pflag.FlagSet) {}
+
+// BindAsFileDescriptorSet binds the exclude-imports flag.
+func BindAsFileDescriptorSet(flagSet *pflag.FlagSet, addr *bool, flagName string) {
+ flagSet.BoolVar(
+ addr,
+ flagName,
+ false,
+ `Output as a google.protobuf.FileDescriptorSet instead of an image.
+Note that images are wire compatible with FileDescriptorSets, but this flag strips
+the additional metadata added for Buf usage.`,
+ )
+}
+
+// BindExcludeImports binds the exclude-imports flag.
+func BindExcludeImports(flagSet *pflag.FlagSet, addr *bool, flagName string) {
+ flagSet.BoolVar(
+ addr,
+ flagName,
+ false,
+ "Exclude imports.",
+ )
+}
+
+// BindExcludeSourceInfo binds the exclude-source-info flag.
+func BindExcludeSourceInfo(flagSet *pflag.FlagSet, addr *bool, flagName string) {
+ flagSet.BoolVar(
+ addr,
+ flagName,
+ false,
+ "Exclude source info.",
+ )
+}
+
+// BindPaths binds the paths flag.
+func BindPaths(
+ flagSet *pflag.FlagSet,
+ pathsAddr *[]string,
+ pathsFlagName string,
+) {
+ flagSet.StringSliceVar(
+ pathsAddr,
+ pathsFlagName,
+ nil,
+ `Limit to specific files or directories, for example "proto/a/a.proto" or "proto/a".
+If specified multiple times, the union is taken.`,
+ )
+}
+
+// BindInputHashtag binds the input hashtag flag.
+//
+// This needs to be added to any command that has the input as the first argument.
+// This deals with the situation "buf build -#format=json" which results in
+// a parse error from pflag.
+func BindInputHashtag(flagSet *pflag.FlagSet, addr *string) {
+ flagSet.StringVarP(
+ addr,
+ inputHashtagFlagName,
+ inputHashtagFlagShortName,
+ "",
+ "",
+ )
+ _ = flagSet.MarkHidden(inputHashtagFlagName)
+}
+
+// BindExcludePaths binds the exclude-path flag.
+func BindExcludePaths(
+ flagSet *pflag.FlagSet,
+ excludePathsAddr *[]string,
+ excludePathsFlagName string,
+) {
+ flagSet.StringSliceVar(
+ excludePathsAddr,
+ excludePathsFlagName,
+ nil,
+ `Exclude specific files or directories, for example "proto/a/a.proto" or "proto/a".
+If specified multiple times, the union is taken.`,
+ )
+}
+
+// BindDisableSymlinks binds the disable-symlinks flag.
+func BindDisableSymlinks(flagSet *pflag.FlagSet, addr *bool, flagName string) {
+ flagSet.BoolVar(
+ addr,
+ flagName,
+ false,
+ `Do not follow symlinks when reading sources or configuration from the local filesystem.
+By default, symlinks are followed in this CLI, but never followed on the Buf Schema Registry.`,
+ )
+}
+
+// BindVisibility binds the visibility flag.
+func BindVisibility(flagSet *pflag.FlagSet, addr *string, flagName string) {
+ flagSet.StringVar(
+ addr,
+ flagName,
+ "",
+ fmt.Sprintf(`The repository's visibility setting. Must be one of %s.`, stringutil.SliceToString(allVisibiltyStrings)),
+ )
+}
+
+// GetInputLong gets the long command description for an input-based command.
+func GetInputLong(inputArgDescription string) string {
+ return fmt.Sprintf(
+ `The first argument is %s.
+The first argument must be one of format %s.
+If no argument is specified, defaults to ".".`,
+ inputArgDescription,
+ buffetch.AllFormatsString,
+ )
+}
+
+// GetSourceLong gets the long command description for an input-based command.
+func GetSourceLong(inputArgDescription string) string {
+ return fmt.Sprintf(
+ `The first argument is %s.
+The first argument must be one of format %s.
+If no argument is specified, defaults to ".".`,
+ inputArgDescription,
+ buffetch.SourceFormatsString,
+ )
+}
+
+// GetSourceDirLong gets the long command description for a directory-based command.
+func GetSourceDirLong(inputArgDescription string) string {
+ return fmt.Sprintf(
+ `The first argument is %s.
+The first argument must be one of format %s.
+If no argument is specified, defaults to ".".`,
+ inputArgDescription,
+ buffetch.SourceDirFormatsString,
+ )
+}
+
+// GetSourceOrModuleLong gets the long command description for an input-based command.
+func GetSourceOrModuleLong(inputArgDescription string) string {
+ return fmt.Sprintf(
+ `The first argument is %s.
+The first argument must be one of format %s.
+If no argument is specified, defaults to ".".`,
+ inputArgDescription,
+ buffetch.SourceOrModuleFormatsString,
+ )
+}
+
+// GetInputValue gets the first arg.
+//
+// Also parses the special input hashtag flag that deals with the situation "buf build -#format=json".
+// The existence of 0 or 1 args should be handled by the Args field on Command.
+func GetInputValue(
+ container appflag.Container,
+ inputHashtag string,
+ defaultValue string,
+) (string, error) {
+ var arg string
+ switch numArgs := container.NumArgs(); numArgs {
+ case 0:
+ if inputHashtag != "" {
+ arg = "-#" + inputHashtag
+ }
+ case 1:
+ arg = container.Arg(0)
+ if arg == "" {
+ return "", errors.New("first argument is present but empty")
+ }
+ // if arg is non-empty and inputHashtag is non-empty, this means two arguments were specified
+ if inputHashtag != "" {
+ return "", errors.New("only 1 argument allowed but 2 arguments specified")
+ }
+ default:
+ return "", fmt.Errorf("only 1 argument allowed but %d arguments specified", numArgs)
+ }
+ if arg != "" {
+ return arg, nil
+ }
+ return defaultValue, nil
+}
+
+// WarnAlphaCommand prints a warning for a alpha command unless the alphaSuppressWarningsEnvKey
+// environment variable is set.
+func WarnAlphaCommand(ctx context.Context, container appflag.Container) {
+ if container.Env(alphaSuppressWarningsEnvKey) == "" {
+ container.Logger().Warn("This command is in alpha. It is hidden for a reason. This command is purely for development purposes, and may never even be promoted to beta, do not rely on this command's functionality. To suppress this warning, set " + alphaSuppressWarningsEnvKey + "=1")
+ }
+}
+
+// WarnBetaCommand prints a warning for a beta command unless the betaSuppressWarningsEnvKey
+// environment variable is set.
+func WarnBetaCommand(ctx context.Context, container appflag.Container) {
+ if container.Env(betaSuppressWarningsEnvKey) == "" {
+ container.Logger().Warn("This command is in beta. It is unstable and likely to change. To suppress this warning, set " + betaSuppressWarningsEnvKey + "=1")
+ }
+}
+
+// NewStorageosProvider returns a new storageos.Provider based on the value of the disable-symlinks flag.
+func NewStorageosProvider(disableSymlinks bool) storageos.Provider {
+ if disableSymlinks {
+ return storageos.NewProvider()
+ }
+ return storageos.NewProvider(storageos.ProviderWithSymlinks())
+}
+
+// NewWireImageConfigReader returns a new ImageConfigReader.
+func NewWireImageConfigReader(
+ container appflag.Container,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ clientConfig *connectclient.Config,
+) (bufwire.ImageConfigReader, error) {
+ logger := container.Logger()
+ moduleResolver := bufapimodule.NewModuleResolver(
+ logger,
+ bufapimodule.NewRepositoryCommitServiceClientFactory(clientConfig),
+ )
+ moduleReader, err := NewModuleReaderAndCreateCacheDirs(container, clientConfig)
+ if err != nil {
+ return nil, err
+ }
+ return bufwire.NewImageConfigReader(
+ logger,
+ storageosProvider,
+ newFetchReader(logger, storageosProvider, runner, moduleResolver, moduleReader),
+ bufmodulebuild.NewModuleBucketBuilder(logger),
+ bufmodulebuild.NewModuleFileSetBuilder(logger, moduleReader),
+ bufimagebuild.NewBuilder(logger),
+ ), nil
+}
+
+// NewWireModuleConfigReader returns a new ModuleConfigReader.
+func NewWireModuleConfigReader(
+ container appflag.Container,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ clientConfig *connectclient.Config,
+) (bufwire.ModuleConfigReader, error) {
+ logger := container.Logger()
+ moduleResolver := bufapimodule.NewModuleResolver(
+ logger,
+ bufapimodule.NewRepositoryCommitServiceClientFactory(clientConfig),
+ )
+ moduleReader, err := NewModuleReaderAndCreateCacheDirs(container, clientConfig)
+ if err != nil {
+ return nil, err
+ }
+ return bufwire.NewModuleConfigReader(
+ logger,
+ storageosProvider,
+ newFetchReader(logger, storageosProvider, runner, moduleResolver, moduleReader),
+ bufmodulebuild.NewModuleBucketBuilder(logger),
+ ), nil
+}
+
+// NewWireModuleConfigReaderForModuleReader returns a new ModuleConfigReader using
+// the given ModuleReader.
+func NewWireModuleConfigReaderForModuleReader(
+ container appflag.Container,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ clientConfig *connectclient.Config,
+ moduleReader bufmodule.ModuleReader,
+) (bufwire.ModuleConfigReader, error) {
+ logger := container.Logger()
+ moduleResolver := bufapimodule.NewModuleResolver(
+ logger,
+ bufapimodule.NewRepositoryCommitServiceClientFactory(clientConfig),
+ )
+ return bufwire.NewModuleConfigReader(
+ logger,
+ storageosProvider,
+ newFetchReader(logger, storageosProvider, runner, moduleResolver, moduleReader),
+ bufmodulebuild.NewModuleBucketBuilder(logger),
+ ), nil
+}
+
+// NewWireFileLister returns a new FileLister.
+func NewWireFileLister(
+ container appflag.Container,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ clientConfig *connectclient.Config,
+) (bufwire.FileLister, error) {
+ logger := container.Logger()
+ moduleResolver := bufapimodule.NewModuleResolver(
+ logger,
+ bufapimodule.NewRepositoryCommitServiceClientFactory(clientConfig),
+ )
+ moduleReader, err := NewModuleReaderAndCreateCacheDirs(container, clientConfig)
+ if err != nil {
+ return nil, err
+ }
+ return bufwire.NewFileLister(
+ logger,
+ storageosProvider,
+ newFetchReader(logger, storageosProvider, runner, moduleResolver, moduleReader),
+ bufmodulebuild.NewModuleBucketBuilder(logger),
+ bufmodulebuild.NewModuleFileSetBuilder(logger, moduleReader),
+ bufimagebuild.NewBuilder(logger),
+ ), nil
+}
+
+// NewWireImageReader returns a new ImageReader.
+func NewWireImageReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+) bufwire.ImageReader {
+ return bufwire.NewImageReader(
+ logger,
+ newFetchImageReader(logger, storageosProvider, runner),
+ )
+}
+
+// NewWireImageWriter returns a new ImageWriter.
+func NewWireImageWriter(
+ logger *zap.Logger,
+) bufwire.ImageWriter {
+ return bufwire.NewImageWriter(
+ logger,
+ buffetch.NewWriter(
+ logger,
+ ),
+ )
+}
+
+// NewWireProtoEncodingReader returns a new ProtoEncodingReader.
+func NewWireProtoEncodingReader(
+ logger *zap.Logger,
+) bufwire.ProtoEncodingReader {
+ return bufwire.NewProtoEncodingReader(
+ logger,
+ )
+}
+
+// NewWireProtoEncodingWriter returns a new ProtoEncodingWriter.
+func NewWireProtoEncodingWriter(
+ logger *zap.Logger,
+) bufwire.ProtoEncodingWriter {
+ return bufwire.NewProtoEncodingWriter(
+ logger,
+ )
+}
+
+// NewModuleReaderAndCreateCacheDirs returns a new ModuleReader while creating the
+// required cache directories.
+func NewModuleReaderAndCreateCacheDirs(
+ container appflag.Container,
+ clientConfig *connectclient.Config,
+) (bufmodule.ModuleReader, error) {
+ return newModuleReaderAndCreateCacheDirs(
+ container,
+ clientConfig,
+ )
+}
+
+// NewModuleReaderAndCreateCacheDirsWithExternalPaths returns a new ModuleReader while creating the
+// required cache directories, and configures the cache to preserve external paths.
+//
+// WARNING - this should only be used by systems like the LSP - leaking external paths from the module
+// cache is otherwise dangerous and requires manager approval.
+func NewModuleReaderAndCreateCacheDirsWithExternalPaths(
+ container appflag.Container,
+ clientConfig *connectclient.Config,
+) (bufmodule.ModuleReader, error) {
+ return newModuleReaderAndCreateCacheDirs(
+ container,
+ clientConfig,
+ bufmodulecache.ModuleReaderWithExternalPaths(),
+ )
+}
+
+func newModuleReaderAndCreateCacheDirs(
+ container appflag.Container,
+ clientConfig *connectclient.Config,
+ moduleReaderOptions ...bufmodulecache.ModuleReaderOption,
+) (bufmodule.ModuleReader, error) {
+ cacheModuleDataDirPath := normalpath.Join(container.CacheDirPath(), v1CacheModuleDataRelDirPath)
+ cacheModuleLockDirPath := normalpath.Join(container.CacheDirPath(), v1CacheModuleLockRelDirPath)
+ cacheModuleSumDirPath := normalpath.Join(container.CacheDirPath(), v1CacheModuleSumRelDirPath)
+ if err := checkExistingCacheDirs(
+ container.CacheDirPath(),
+ container.CacheDirPath(),
+ cacheModuleDataDirPath,
+ cacheModuleLockDirPath,
+ cacheModuleSumDirPath,
+ ); err != nil {
+ return nil, err
+ }
+ if err := createCacheDirs(
+ cacheModuleDataDirPath,
+ cacheModuleLockDirPath,
+ cacheModuleSumDirPath,
+ ); err != nil {
+ return nil, err
+ }
+ storageosProvider := storageos.NewProvider(storageos.ProviderWithSymlinks())
+ // do NOT want to enable symlinks for our cache
+ dataReadWriteBucket, err := storageosProvider.NewReadWriteBucket(cacheModuleDataDirPath)
+ if err != nil {
+ return nil, err
+ }
+ // do NOT want to enable symlinks for our cache
+ sumReadWriteBucket, err := storageosProvider.NewReadWriteBucket(cacheModuleSumDirPath)
+ if err != nil {
+ return nil, err
+ }
+ fileLocker, err := filelock.NewLocker(cacheModuleLockDirPath)
+ if err != nil {
+ return nil, err
+ }
+ moduleReader := bufmodulecache.NewModuleReader(
+ container.Logger(),
+ container.VerbosePrinter(),
+ fileLocker,
+ dataReadWriteBucket,
+ sumReadWriteBucket,
+ bufapimodule.NewModuleReader(bufapimodule.NewDownloadServiceClientFactory(clientConfig)),
+ bufmodulecache.NewRepositoryServiceClientFactory(clientConfig),
+ moduleReaderOptions...,
+ )
+ return moduleReader, nil
+}
+
+// NewConfig creates a new Config.
+func NewConfig(container appflag.Container) (*bufapp.Config, error) {
+ externalConfig := bufapp.ExternalConfig{}
+ if err := appname.ReadConfig(container, &externalConfig); err != nil {
+ return nil, err
+ }
+ return bufapp.NewConfig(container, externalConfig)
+}
+
+// Returns a registry provider with the given options applied in addition to default ones for all providers
+func newConnectClientConfigWithOptions(container appflag.Container, opts ...connectclient.ConfigOption) (*connectclient.Config, error) {
+ config, err := NewConfig(container)
+ if err != nil {
+ return nil, err
+ }
+ client := httpclient.NewClient(
+ httpclient.WithObservability(),
+ httpclient.WithTLSConfig(config.TLS),
+ )
+ options := []connectclient.ConfigOption{
+ connectclient.WithAddressMapper(func(address string) string {
+ if buftransport.IsAPISubdomainEnabled(container) {
+ address = buftransport.PrependAPISubdomain(address)
+ }
+ if config.TLS == nil {
+ return buftransport.PrependHTTP(address)
+ }
+ return buftransport.PrependHTTPS(address)
+ }),
+ connectclient.WithInterceptors(
+ []connect.Interceptor{bufconnect.NewSetCLIVersionInterceptor(Version)},
+ ),
+ }
+ options = append(options, opts...)
+
+ return connectclient.NewConfig(client, options...), nil
+}
+
+// NewConnectClientConfig creates a new connect.ClientConfig which uses a token reader to look
+// up the token in the container or in netrc based on the address of each individual client.
+// It is then set in the header of all outgoing requests from clients created using this config.
+func NewConnectClientConfig(container appflag.Container) (*connectclient.Config, error) {
+ return newConnectClientConfigWithOptions(
+ container,
+ connectclient.WithAuthInterceptorProvider(
+ bufconnect.NewAuthorizationInterceptorProvider(container),
+ ),
+ )
+}
+
+// NewConnectClientConfigWithToken creates a new connect.ClientConfig with a given token. The provided token is
+// set in the header of all outgoing requests from this provider
+func NewConnectClientConfigWithToken(container appflag.Container, token string) (*connectclient.Config, error) {
+ return newConnectClientConfigWithOptions(
+ container,
+ connectclient.WithAuthInterceptorProvider(
+ bufconnect.NewAuthorizationInterceptorProviderWithToken(token),
+ ),
+ )
+}
+
+// PromptUserForDelete is used to receieve user confirmation that a specific
+// entity should be deleted. If the user's answer does not match the expected
+// answer, an error is returned.
+// ErrNotATTY is returned if the input containers Stdin is not a terminal.
+func PromptUserForDelete(container app.Container, entityType string, expectedAnswer string) error {
+ confirmation, err := PromptUser(
+ container,
+ fmt.Sprintf(
+ "Please confirm that you want to DELETE this %s by entering its name (%s) again."+
+ "\nWARNING: This action is NOT reversible!\n",
+ entityType,
+ expectedAnswer,
+ ),
+ )
+ if err != nil {
+ if errors.Is(err, ErrNotATTY) {
+ return errors.New("cannot perform an interactive delete from a non-TTY device")
+ }
+ return err
+ }
+ if confirmation != expectedAnswer {
+ return fmt.Errorf(
+ "expected %q, but received %q",
+ expectedAnswer,
+ confirmation,
+ )
+ }
+ return nil
+}
+
+// PromptUser reads a line from Stdin, prompting the user with the prompt first.
+// The prompt is repeatedly shown until the user provides a non-empty response.
+// ErrNotATTY is returned if the input containers Stdin is not a terminal.
+func PromptUser(container app.Container, prompt string) (string, error) {
+ return promptUser(container, prompt, false)
+}
+
+// PromptUserForPassword reads a line from Stdin, prompting the user with the prompt first.
+// The prompt is repeatedly shown until the user provides a non-empty response.
+// ErrNotATTY is returned if the input containers Stdin is not a terminal.
+func PromptUserForPassword(container app.Container, prompt string) (string, error) {
+ return promptUser(container, prompt, true)
+}
+
+// BucketAndConfigForSource returns a bucket and config. The bucket contains
+// just the files that constitute a module. It also checks if config
+// exists and defines a module identity, returning ErrNoConfigFile and
+// ErrNoModuleName respectfully.
+//
+// Workspaces are disabled when fetching the source.
+func BucketAndConfigForSource(
+ ctx context.Context,
+ logger *zap.Logger,
+ container app.EnvStdinContainer,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ source string,
+) (storage.ReadBucketCloser, *bufconfig.Config, error) {
+ sourceRef, err := buffetch.NewSourceRefParser(
+ logger,
+ ).GetSourceRef(
+ ctx,
+ source,
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ sourceBucket, err := newFetchSourceReader(
+ logger,
+ storageosProvider,
+ runner,
+ ).GetSourceBucket(
+ ctx,
+ container,
+ sourceRef,
+ buffetch.GetSourceBucketWithWorkspacesDisabled(),
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ existingConfigFilePath, err := bufconfig.ExistingConfigFilePath(ctx, sourceBucket)
+ if err != nil {
+ return nil, nil, NewInternalError(err)
+ }
+ if existingConfigFilePath == "" {
+ return nil, nil, ErrNoConfigFile
+ }
+ // TODO: This should just read a lock file
+ sourceConfig, err := bufconfig.GetConfigForBucket(
+ ctx,
+ sourceBucket,
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ if sourceConfig.ModuleIdentity == nil {
+ return nil, nil, ErrNoModuleName
+ }
+
+ return sourceBucket, sourceConfig, nil
+}
+
+// ReadModule gets a module from a source bucket and its config.
+func ReadModule(
+ ctx context.Context,
+ logger *zap.Logger,
+ sourceBucket storage.ReadBucketCloser,
+ sourceConfig *bufconfig.Config,
+) (bufmodule.Module, error) {
+ return bufmodulebuild.NewModuleBucketBuilder(logger).BuildForBucket(
+ ctx,
+ sourceBucket,
+ sourceConfig.Build,
+ )
+}
+
+// NewImageForSource resolves a single bufimage.Image from the user-provided source with the build options.
+func NewImageForSource(
+ ctx context.Context,
+ container appflag.Container,
+ source string,
+ errorFormat string,
+ disableSymlinks bool,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+ excludeSourceCodeInfo bool,
+) (bufimage.Image, error) {
+ ref, err := buffetch.NewRefParser(container.Logger(), buffetch.RefParserWithProtoFileRefAllowed()).GetRef(ctx, source)
+ if err != nil {
+ return nil, err
+ }
+ storageosProvider := NewStorageosProvider(disableSymlinks)
+ runner := command.NewRunner()
+ clientConfig, err := NewConnectClientConfig(container)
+ if err != nil {
+ return nil, err
+ }
+ imageConfigReader, err := NewWireImageConfigReader(
+ container,
+ storageosProvider,
+ runner,
+ clientConfig,
+ )
+ if err != nil {
+ return nil, err
+ }
+ imageConfigs, fileAnnotations, err := imageConfigReader.GetImageConfigs(
+ ctx,
+ container,
+ ref,
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ excludeSourceCodeInfo,
+ )
+ if err != nil {
+ return nil, err
+ }
+ if len(fileAnnotations) > 0 {
+ // stderr since we do output to stdout potentially
+ if err := bufanalysis.PrintFileAnnotations(
+ container.Stderr(),
+ fileAnnotations,
+ errorFormat,
+ ); err != nil {
+ return nil, err
+ }
+ return nil, ErrFileAnnotation
+ }
+ images := make([]bufimage.Image, 0, len(imageConfigs))
+ for _, imageConfig := range imageConfigs {
+ images = append(images, imageConfig.Image())
+ }
+ return bufimage.MergeImages(images...)
+}
+
+// WellKnownTypeImage returns the image for the well known type (google.protobuf.Duration for example).
+func WellKnownTypeImage(ctx context.Context, logger *zap.Logger, wellKnownType string) (bufimage.Image, error) {
+ sourceConfig, err := bufconfig.GetConfigForBucket(
+ ctx,
+ storage.NopReadBucketCloser(datawkt.ReadBucket),
+ )
+ if err != nil {
+ return nil, err
+ }
+ module, err := bufmodulebuild.NewModuleBucketBuilder(logger).BuildForBucket(
+ ctx,
+ datawkt.ReadBucket,
+ sourceConfig.Build,
+ )
+ if err != nil {
+ return nil, err
+ }
+ image, _, err := bufimagebuild.NewBuilder(logger).Build(ctx, bufmodule.NewModuleFileSet(module, nil))
+ if err != nil {
+ return nil, err
+ }
+ return bufimageutil.ImageFilteredByTypes(image, wellKnownType)
+}
+
+// VisibilityFlagToVisibility parses the given string as a registryv1alpha1.Visibility.
+func VisibilityFlagToVisibility(visibility string) (registryv1alpha1.Visibility, error) {
+ switch visibility {
+ case publicVisibility:
+ return registryv1alpha1.Visibility_VISIBILITY_PUBLIC, nil
+ case privateVisibility:
+ return registryv1alpha1.Visibility_VISIBILITY_PRIVATE, nil
+ default:
+ return 0, fmt.Errorf("invalid visibility: %s, expected one of %s", visibility, stringutil.SliceToString(allVisibiltyStrings))
+ }
+}
+
+// VisibilityFlagToVisibilityAllowUnspecified parses the given string as a registryv1alpha1.Visibility,
+// where an empty string will be parsed as unspecified
+func VisibilityFlagToVisibilityAllowUnspecified(visibility string) (registryv1alpha1.Visibility, error) {
+ switch visibility {
+ case publicVisibility:
+ return registryv1alpha1.Visibility_VISIBILITY_PUBLIC, nil
+ case privateVisibility:
+ return registryv1alpha1.Visibility_VISIBILITY_PRIVATE, nil
+ case "":
+ return registryv1alpha1.Visibility_VISIBILITY_UNSPECIFIED, nil
+ default:
+ return 0, fmt.Errorf("invalid visibility: %s", visibility)
+ }
+}
+
+// ValidateErrorFormatFlag validates the error format flag for all commands but lint.
+func ValidateErrorFormatFlag(errorFormatString string, errorFormatFlagName string) error {
+ return validateErrorFormatFlag(bufanalysis.AllFormatStrings, errorFormatString, errorFormatFlagName)
+}
+
+// ValidateErrorFormatFlagLint validates the error format flag for lint.
+func ValidateErrorFormatFlagLint(errorFormatString string, errorFormatFlagName string) error {
+ return validateErrorFormatFlag(buflint.AllFormatStrings, errorFormatString, errorFormatFlagName)
+}
+
+func validateErrorFormatFlag(validFormatStrings []string, errorFormatString string, errorFormatFlagName string) error {
+ for _, formatString := range validFormatStrings {
+ if errorFormatString == formatString {
+ return nil
+ }
+ }
+ return appcmd.NewInvalidArgumentErrorf("--%s: invalid format: %q", errorFormatFlagName, errorFormatString)
+}
+
+// promptUser reads a line from Stdin, prompting the user with the prompt first.
+// The prompt is repeatedly shown until the user provides a non-empty response.
+// ErrNotATTY is returned if the input containers Stdin is not a terminal.
+func promptUser(container app.Container, prompt string, isPassword bool) (string, error) {
+ file, ok := container.Stdin().(*os.File)
+ if !ok || !term.IsTerminal(int(file.Fd())) {
+ return "", ErrNotATTY
+ }
+ var attempts int
+ for attempts < userPromptAttempts {
+ attempts++
+ if _, err := fmt.Fprint(
+ container.Stdout(),
+ prompt,
+ ); err != nil {
+ return "", NewInternalError(err)
+ }
+ var value string
+ if isPassword {
+ data, err := term.ReadPassword(int(file.Fd()))
+ if err != nil {
+ // If the user submitted an EOF (e.g. via ^D) then we
+ // should not treat it as an internal error; returning
+ // the error directly makes it more clear as to
+ // why the command failed.
+ if errors.Is(err, io.EOF) {
+ return "", err
+ }
+ return "", NewInternalError(err)
+ }
+ value = string(data)
+ } else {
+ scanner := bufio.NewScanner(container.Stdin())
+ if !scanner.Scan() {
+ // scanner.Err() returns nil on EOF.
+ if err := scanner.Err(); err != nil {
+ return "", NewInternalError(err)
+ }
+ return "", io.EOF
+ }
+ value = scanner.Text()
+ if err := scanner.Err(); err != nil {
+ return "", NewInternalError(err)
+ }
+ }
+ if len(strings.TrimSpace(value)) != 0 {
+ // We want to preserve spaces in user input, so we only apply
+ // strings.TrimSpace to verify an answer was provided.
+ return value, nil
+ }
+ if attempts < userPromptAttempts {
+ // We only want to ask the user to try again if they actually
+ // have another attempt.
+ if _, err := fmt.Fprintln(
+ container.Stdout(),
+ "No answer was provided. Please try again.",
+ ); err != nil {
+ return "", NewInternalError(err)
+ }
+ }
+ }
+ return "", NewTooManyEmptyAnswersError(userPromptAttempts)
+}
+
+// newFetchReader creates a new buffetch.Reader with the default HTTP client
+// and git cloner.
+func newFetchReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ moduleResolver bufmodule.ModuleResolver,
+ moduleReader bufmodule.ModuleReader,
+) buffetch.Reader {
+ return buffetch.NewReader(
+ logger,
+ storageosProvider,
+ defaultHTTPClient,
+ defaultHTTPAuthenticator,
+ git.NewCloner(logger, storageosProvider, runner, defaultGitClonerOptions),
+ moduleResolver,
+ moduleReader,
+ )
+}
+
+// newFetchSourceReader creates a new buffetch.SourceReader with the default HTTP client
+// and git cloner.
+func newFetchSourceReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+) buffetch.SourceReader {
+ return buffetch.NewSourceReader(
+ logger,
+ storageosProvider,
+ defaultHTTPClient,
+ defaultHTTPAuthenticator,
+ git.NewCloner(logger, storageosProvider, runner, defaultGitClonerOptions),
+ )
+}
+
+// newFetchImageReader creates a new buffetch.ImageReader with the default HTTP client
+// and git cloner.
+func newFetchImageReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+) buffetch.ImageReader {
+ return buffetch.NewImageReader(
+ logger,
+ storageosProvider,
+ defaultHTTPClient,
+ defaultHTTPAuthenticator,
+ git.NewCloner(logger, storageosProvider, runner, defaultGitClonerOptions),
+ )
+}
+
+func checkExistingCacheDirs(baseCacheDirPath string, dirPaths ...string) error {
+ for _, dirPath := range dirPaths {
+ dirPath = normalpath.Unnormalize(dirPath)
+ // OK to use os.Stat instead of os.LStat here as this is CLI-only
+ fileInfo, err := os.Stat(dirPath)
+ if err != nil {
+ if os.IsNotExist(err) {
+ return nil
+ }
+ return err
+ }
+ if !fileInfo.IsDir() {
+ return fmt.Errorf("Expected %q to be a directory. This is used for buf's cache. You can override the base cache directory %q by setting the $BUF_CACHE_DIR environment variable.", dirPath, baseCacheDirPath)
+ }
+ if fileInfo.Mode().Perm()&0700 != 0700 {
+ return fmt.Errorf("Expected %q to be a writeable directory. This is used for buf's cache. You can override the base cache directory %q by setting the $BUF_CACHE_DIR environment variable.", dirPath, baseCacheDirPath)
+ }
+ }
+ return nil
+}
+
+func createCacheDirs(dirPaths ...string) error {
+ for _, dirPath := range dirPaths {
+ // os.MkdirAll does nothing if the directory already exists
+ if err := os.MkdirAll(normalpath.Unnormalize(dirPath), 0755); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufcli/errors.go b/vendor/github.com/bufbuild/buf/private/buf/bufcli/errors.go
new file mode 100644
index 000000000..a920dd471
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufcli/errors.go
@@ -0,0 +1,226 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufcli
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufconnect"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/bufpkg/buftransport"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/connect-go"
+)
+
+const (
+ // ExitCodeFileAnnotation is the exit code used when we print file annotations.
+ //
+ // We use a different exit code to be able to distinguish user-parsable errors from
+ // system errors.
+ ExitCodeFileAnnotation = 100
+)
+
+var (
+ // ErrNoModuleName is used when the user does not specify a module name in their configuration file.
+ ErrNoModuleName = errors.New(`please specify a module name in your configuration file with the "name" key`)
+
+ // ErrNoConfigFile is used when the user tries to execute a command without a configuration file.
+ ErrNoConfigFile = errors.New(`please define a configuration file in the current directory; you can create one by running "buf mod init"`)
+
+ // ErrFileAnnotation is used when we print file annotations and want to return an error.
+ //
+ // The app package works on the concept that an error results in a non-zero exit
+ // code, and we already print the messages with PrintFileAnnotations, so we do
+ // not want to print any additional error message.
+ //
+ // We also exit with 100 to be able to distinguish user-parsable errors from
+ // system errors.
+ ErrFileAnnotation = app.NewError(ExitCodeFileAnnotation, "")
+)
+
+// errInternal is returned when the user encounters an unexpected internal buf error.
+type errInternal struct {
+ cause error
+}
+
+// NewInternalError represents an internal error encountered by the buf CLI.
+// These errors should not happen and therefore warrant a bug report.
+func NewInternalError(err error) error {
+ if isInternalError(err) {
+ return err
+ }
+ return &errInternal{cause: err}
+}
+
+// isInternalError returns whether the error provided, or
+// any error wrapped by that error, is an internal error.
+func isInternalError(err error) bool {
+ asErr := &errInternal{}
+ return errors.As(err, &asErr)
+}
+
+func (e *errInternal) Error() string {
+ message := "it looks like you have found a bug in buf. " +
+ "Please file an issue at https://github.com/bufbuild/buf/issues/ " +
+ "and provide the command you ran"
+ if e.cause == nil {
+ return message
+ }
+ return message + ", as well as the following message: " + e.cause.Error()
+}
+
+// NewErrorInterceptor returns a CLI interceptor that wraps Buf CLI errors.
+func NewErrorInterceptor() appflag.Interceptor {
+ return func(next func(context.Context, appflag.Container) error) func(context.Context, appflag.Container) error {
+ return func(ctx context.Context, container appflag.Container) error {
+ return wrapError(next(ctx, container))
+ }
+ }
+}
+
+// NewModuleRefError is used when the client fails to parse a module ref.
+func NewModuleRefError(moduleRef string) error {
+ return fmt.Errorf("could not parse %q as a module; please verify this is a valid reference", moduleRef)
+}
+
+// NewTooManyEmptyAnswersError is used when the user does not answer a prompt in
+// the given number of attempts.
+func NewTooManyEmptyAnswersError(attempts int) error {
+ return fmt.Errorf("did not receive an answer in %d attempts", attempts)
+}
+
+// NewOrganizationNameAlreadyExistsError informs the user that an organization with
+// that name already exists.
+func NewOrganizationNameAlreadyExistsError(name string) error {
+ return fmt.Errorf("an organization named %q already exists", name)
+}
+
+// NewRepositoryNameAlreadyExistsError informs the user that a repository
+// with that name already exists.
+func NewRepositoryNameAlreadyExistsError(name string) error {
+ return fmt.Errorf("a repository named %q already exists", name)
+}
+
+// NewTagOrDraftNameAlreadyExistsError informs the user that a tag
+// or draft with that name already exists.
+func NewTagOrDraftNameAlreadyExistsError(name string) error {
+ return fmt.Errorf("a tag or draft named %q already exists", name)
+}
+
+// NewOrganizationNotFoundError informs the user that an organization with
+// that name does not exist.
+func NewOrganizationNotFoundError(name string) error {
+ return fmt.Errorf(`an organization named %q does not exist, use "buf beta registry organization create" to create one`, name)
+}
+
+// NewRepositoryNotFoundError informs the user that a repository with
+// that name does not exist.
+func NewRepositoryNotFoundError(name string) error {
+ return fmt.Errorf(`a repository named %q does not exist, use "buf beta registry repository create" to create one`, name)
+}
+
+// NewModuleReferenceNotFoundError informs the user that a module
+// reference does not exist.
+func NewModuleReferenceNotFoundError(reference bufmoduleref.ModuleReference) error {
+ return fmt.Errorf("%q does not exist", reference)
+}
+
+// NewTokenNotFoundError informs the user that a token with
+// that identifier does not exist.
+func NewTokenNotFoundError(tokenID string) error {
+ return fmt.Errorf("a token with ID %q does not exist", tokenID)
+}
+
+func NewUnimplementedRemoteError(err error, remote string, moduleIdentity string) error {
+ return fmt.Errorf("%w. Are you sure %q (derived from module name %q) is a Buf Schema Registry?", err, remote, moduleIdentity)
+}
+
+// NewPluginNotFoundError informs the user that a plugin with
+// that owner and name does not exist.
+func NewPluginNotFoundError(owner string, name string) error {
+ return fmt.Errorf("the plugin %s/%s does not exist", owner, name)
+}
+
+// NewTemplateNotFoundError informs the user that a template with
+// that owner and name does not exist.
+func NewTemplateNotFoundError(owner string, name string) error {
+ return fmt.Errorf("the template %s/%s does not exist", owner, name)
+}
+
+// wrapError is used when a CLI command fails, regardless of its error code.
+// Note that this function will wrap the error so that the underlying error
+// can be recovered via 'errors.Is'.
+func wrapError(err error) error {
+ if err == nil {
+ return nil
+ }
+ connectErr, ok := asConnectError(err)
+
+ // If error is empty and not a Connect error, we return it as-is.
+ if !ok && err.Error() == "" {
+ return err
+ }
+ // If the error is a Connect error, then interpret it and return an intuitive message
+ if ok {
+ connectCode := connectErr.Code()
+ switch {
+ case connectCode == connect.CodeUnauthenticated, isEmptyUnknownError(err):
+ if authErr, ok := bufconnect.AsAuthError(err); ok && authErr.TokenEnvKey() != "" {
+ return fmt.Errorf(`Failure: the %[1]s environment variable is set, but is not valid. Set %[1]s to a valid Buf API key, or unset it. For details, visit https://docs.buf.build/bsr/authentication`, authErr.TokenEnvKey())
+ }
+ return errors.New(`Failure: you are not authenticated. Create a new entry in your netrc, using a Buf API Key as the password. For details, visit https://docs.buf.build/bsr/authentication`)
+ case connectCode == connect.CodeUnavailable:
+ msg := `Failure: the server hosted at that remote is unavailable.`
+ // If the returned error is Unavailable, then determine if this is a DNS error. If so, get the address used
+ // so that we can display a more helpful error message.
+ if dnsError := (&net.DNSError{}); errors.As(err, &dnsError) && dnsError.IsNotFound {
+ // The subdomain is added internally during transport so trim it off when showing the user the invalid address that they entered
+ return fmt.Errorf(`%s Are you sure "%s" is a valid remote address?`, msg, strings.TrimPrefix(dnsError.Name, buftransport.APISubdomain+"."))
+ }
+
+ return fmt.Errorf(msg)
+ }
+ return fmt.Errorf("Failure: %s", connectErr.Message())
+ }
+
+ // Error was not a Connect error
+ return fmt.Errorf("Failure: %w", err)
+}
+
+// asConnectError uses errors.As to unwrap any error and look for a *connect.Error.
+func asConnectError(err error) (*connect.Error, bool) {
+ var connectErr *connect.Error
+ ok := errors.As(err, &connectErr)
+ return connectErr, ok
+}
+
+// isEmptyUnknownError returns true if the given
+// error is non-nil, but has an empty message
+// and an unknown error code.
+//
+// This is relevant for errors returned by
+// envoyauthd when the client does not provide
+// an authentication header.
+func isEmptyUnknownError(err error) bool {
+ if err == nil {
+ return false
+ }
+ return err.Error() == "" && connect.CodeOf(err) == connect.CodeUnknown
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufcli/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/bufcli/usage.gen.go
new file mode 100644
index 000000000..45ef7ac4e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufcli/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufcli
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufconvert/bufconvert.go b/vendor/github.com/bufbuild/buf/private/buf/bufconvert/bufconvert.go
new file mode 100644
index 000000000..2591965ad
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufconvert/bufconvert.go
@@ -0,0 +1,123 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufconvert
+
+import (
+ "context"
+ "fmt"
+ "path/filepath"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/bufref"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.opencensus.io/trace"
+)
+
+const (
+ // MessageEncodingBin is the binary image encoding.
+ MessageEncodingBin MessageEncoding = iota + 1
+ // MessageEncodingJSON is the JSON image encoding.
+ MessageEncodingJSON
+ // formatBin is the binary format.
+ formatBin = "bin"
+ // formatJSON is the JSON format.
+ formatJSON = "json"
+)
+
+var (
+ // MessageEncodingFormatsString is the string representation of all message encoding formats.
+ //
+ // This does not include deprecated formats.
+ MessageEncodingFormatsString = stringutil.SliceToString(messageEncodingFormats)
+ // sorted
+ messageEncodingFormats = []string{
+ formatBin,
+ formatJSON,
+ }
+)
+
+// MessageEncoding is the encoding of the message
+type MessageEncoding int
+
+// MessageEncodingRef is a message encoding file reference.
+type MessageEncodingRef interface {
+ Path() string
+ MessageEncoding() MessageEncoding
+}
+
+// NewMessageEncodingRef returns a new MessageEncodingRef.
+func NewMessageEncodingRef(
+ ctx context.Context,
+ value string,
+ defaultEncoding MessageEncoding,
+) (MessageEncodingRef, error) {
+ ctx, span := trace.StartSpan(ctx, "new_message_encoding_ref")
+ defer span.End()
+ path, messageEncoding, err := getPathAndMessageEncoding(ctx, value, defaultEncoding)
+ if err != nil {
+ return nil, err
+ }
+ return newMessageEncodingRef(path, messageEncoding), nil
+}
+
+func getPathAndMessageEncoding(
+ ctx context.Context,
+ value string,
+ defaultEncoding MessageEncoding,
+) (string, MessageEncoding, error) {
+ path, options, err := bufref.GetRawPathAndOptions(value)
+ if err != nil {
+ return "", 0, err
+ }
+ messageEncoding := parseMessageEncodingExt(filepath.Ext(path), defaultEncoding)
+ for key, value := range options {
+ switch key {
+ case "format":
+ if app.IsDevNull(path) {
+ return "", 0, fmt.Errorf("not allowed if path is %s", app.DevNullFilePath)
+ }
+ messageEncoding, err = parseMessageEncodingFormat(value)
+ if err != nil {
+ return "", 0, err
+ }
+ default:
+ return "", 0, fmt.Errorf("invalid options key: %q", key)
+ }
+ }
+ return path, messageEncoding, nil
+}
+
+func parseMessageEncodingExt(ext string, defaultEncoding MessageEncoding) MessageEncoding {
+ switch strings.TrimPrefix(ext, ".") {
+ case formatBin:
+ return MessageEncodingBin
+ case formatJSON:
+ return MessageEncodingJSON
+ default:
+ return defaultEncoding
+ }
+}
+
+func parseMessageEncodingFormat(format string) (MessageEncoding, error) {
+ switch format {
+ case formatBin:
+ return MessageEncodingBin, nil
+ case formatJSON:
+ return MessageEncodingJSON, nil
+ default:
+ return 0, fmt.Errorf("invalid format for message: %q", format)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufconvert/message_encoding_ref.go b/vendor/github.com/bufbuild/buf/private/buf/bufconvert/message_encoding_ref.go
new file mode 100644
index 000000000..4b45dec10
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufconvert/message_encoding_ref.go
@@ -0,0 +1,40 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufconvert
+
+var _ MessageEncodingRef = &messageEncodingRef{}
+
+type messageEncodingRef struct {
+ path string
+ messageEncoding MessageEncoding
+}
+
+func newMessageEncodingRef(
+ path string,
+ messageEncoding MessageEncoding,
+) *messageEncodingRef {
+ return &messageEncodingRef{
+ path: path,
+ messageEncoding: messageEncoding,
+ }
+}
+
+func (r *messageEncodingRef) Path() string {
+ return r.path
+}
+
+func (r *messageEncodingRef) MessageEncoding() MessageEncoding {
+ return r.messageEncoding
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufconvert/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/bufconvert/usage.gen.go
new file mode 100644
index 000000000..41d5a4e6c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufconvert/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufconvert
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/buffetch.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/buffetch.go
new file mode 100644
index 000000000..18fc35fa2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/buffetch.go
@@ -0,0 +1,373 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buffetch
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/bufbuild/buf/private/buf/buffetch/internal"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/git"
+ "github.com/bufbuild/buf/private/pkg/httpauth"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.uber.org/zap"
+)
+
+const (
+ // ImageEncodingBin is the binary image encoding.
+ ImageEncodingBin ImageEncoding = iota + 1
+ // ImageEncodingJSON is the JSON image encoding.
+ ImageEncodingJSON
+)
+
+var (
+ // ImageFormatsString is the string representation of all image formats.
+ //
+ // This does not include deprecated formats.
+ ImageFormatsString = stringutil.SliceToString(imageFormatsNotDeprecated)
+ // SourceDirFormatsString is the string representation of all source directory formats.
+ // This includes all of the formats in SourceFormatsString except the protofile format.
+ //
+ // This does not include deprecated formats.
+ SourceDirFormatsString = stringutil.SliceToString(sourceDirFormatsNotDeprecated)
+ // SourceFormatsString is the string representation of all source formats.
+ //
+ // This does not include deprecated formats.
+ SourceFormatsString = stringutil.SliceToString(sourceFormatsNotDeprecated)
+ // ModuleFormatsString is the string representation of all module formats.
+ //
+ // Module formats are also source formats.
+ //
+ // This does not include deprecated formats.
+ ModuleFormatsString = stringutil.SliceToString(moduleFormatsNotDeprecated)
+ // SourceOrModuleFormatsString is the string representation of all source or module formats.
+ //
+ // This does not include deprecated formats.
+ SourceOrModuleFormatsString = stringutil.SliceToString(sourceOrModuleFormatsNotDeprecated)
+ // AllFormatsString is the string representation of all formats.
+ //
+ // This does not include deprecated formats.
+ AllFormatsString = stringutil.SliceToString(allFormatsNotDeprecated)
+)
+
+// ImageEncoding is the encoding of the image.
+type ImageEncoding int
+
+// PathResolver resolves external paths to paths.
+type PathResolver interface {
+ // PathForExternalPath takes a path external to the asset and converts it to
+ // a path that is relative to the asset.
+ //
+ // The returned path will be normalized and validated.
+ //
+ // Example:
+ // Directory: /foo/bar
+ // ExternalPath: /foo/bar/baz/bat.proto
+ // Path: baz/bat.proto
+ //
+ // Example:
+ // Directory: .
+ // ExternalPath: baz/bat.proto
+ // Path: baz/bat.proto
+ PathForExternalPath(externalPath string) (string, error)
+}
+
+// Ref is an image file or source bucket reference.
+type Ref interface {
+ PathResolver
+
+ internalRef() internal.Ref
+}
+
+// ImageRef is an image file reference.
+type ImageRef interface {
+ Ref
+ ImageEncoding() ImageEncoding
+ IsNull() bool
+ internalFileRef() internal.FileRef
+}
+
+// SourceOrModuleRef is a source bucket or module reference.
+type SourceOrModuleRef interface {
+ Ref
+ isSourceOrModuleRef()
+}
+
+// SourceRef is a source bucket reference.
+type SourceRef interface {
+ SourceOrModuleRef
+ internalBucketRef() internal.BucketRef
+}
+
+// ModuleRef is a module reference.
+type ModuleRef interface {
+ SourceOrModuleRef
+ internalModuleRef() internal.ModuleRef
+}
+
+// ProtoFileRef is a proto file reference.
+type ProtoFileRef interface {
+ SourceRef
+ IncludePackageFiles() bool
+ internalProtoFileRef() internal.ProtoFileRef
+}
+
+// ImageRefParser is an image ref parser for Buf.
+type ImageRefParser interface {
+ // GetImageRef gets the reference for the image file.
+ GetImageRef(ctx context.Context, value string) (ImageRef, error)
+}
+
+// SourceRefParser is a source ref parser for Buf.
+type SourceRefParser interface {
+ // GetSourceRef gets the reference for the source file.
+ GetSourceRef(ctx context.Context, value string) (SourceRef, error)
+}
+
+// ModuleRefParser is a source ref parser for Buf.
+type ModuleRefParser interface {
+ // GetModuleRef gets the reference for the source file.
+ //
+ // A module is a special type of source with additional properties.
+ GetModuleRef(ctx context.Context, value string) (ModuleRef, error)
+}
+
+// SourceOrModuleRefParser is a source or module ref parser for Buf.
+type SourceOrModuleRefParser interface {
+ SourceRefParser
+ ModuleRefParser
+
+ // GetSourceOrModuleRef gets the reference for the image file or source bucket.
+ GetSourceOrModuleRef(ctx context.Context, value string) (SourceOrModuleRef, error)
+}
+
+// RefParser is a ref parser for Buf.
+type RefParser interface {
+ ImageRefParser
+ SourceOrModuleRefParser
+
+ // GetRef gets the reference for the image file, source bucket, or module.
+ GetRef(ctx context.Context, value string) (Ref, error)
+}
+
+// NewRefParser returns a new RefParser.
+//
+// This defaults to dir or module.
+func NewRefParser(logger *zap.Logger, options ...RefParserOption) RefParser {
+ return newRefParser(logger, options...)
+}
+
+// RefParserOption is an option for NewRefParser. Ref parser options are only accepted
+// for the default RefParser constructor.
+type RefParserOption func(*refParser)
+
+// RefParserWithProtoFileRefAllowed sets the option of allowing a proto file.
+func RefParserWithProtoFileRefAllowed() RefParserOption {
+ return func(r *refParser) {
+ r.allowProtoFileRef = true
+ }
+}
+
+// NewImageRefParser returns a new RefParser for images only.
+//
+// This defaults to binary.
+func NewImageRefParser(logger *zap.Logger) ImageRefParser {
+ return newImageRefParser(logger)
+}
+
+// NewSourceRefParser returns a new RefParser for sources only.
+//
+// This defaults to dir or module.
+func NewSourceRefParser(logger *zap.Logger) SourceRefParser {
+ return newSourceRefParser(logger)
+}
+
+// NewModuleRefParser returns a new RefParser for modules only.
+func NewModuleRefParser(logger *zap.Logger) ModuleRefParser {
+ return newModuleRefParser(logger)
+}
+
+// NewSourceOrModuleRefParser returns a new RefParser for sources or modules only.
+//
+// This defaults to dir or module.
+func NewSourceOrModuleRefParser(logger *zap.Logger) SourceOrModuleRefParser {
+ return newSourceOrModuleRefParser(logger)
+}
+
+// ReadBucketCloser is a bucket returned from GetBucket.
+// We need to surface the internal.ReadBucketCloser
+// interface to other packages, so we use a type
+// declaration to do so.
+type ReadBucketCloser internal.ReadBucketCloser
+
+// ReadWriteBucketCloser is a bucket returned from GetBucket.
+// We need to surface the internal.ReadWriteBucketCloser
+// interface to other packages, so we use a type
+// declaration to do so.
+type ReadWriteBucketCloser internal.ReadWriteBucketCloser
+
+// ReadBucketCloserWithTerminateFileProvider is a ReadBucketCloser with a TerminateFileProvider.
+type ReadBucketCloserWithTerminateFileProvider internal.ReadBucketCloserWithTerminateFileProvider
+
+// ImageReader is an image reader.
+type ImageReader interface {
+ // GetImageFile gets the image file.
+ //
+ // The returned file will be uncompressed.
+ GetImageFile(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ imageRef ImageRef,
+ ) (io.ReadCloser, error)
+}
+
+// SourceReader is a source reader.
+type SourceReader interface {
+ // GetSourceBucket gets the source bucket.
+ //
+ // The returned bucket will only have .proto and configuration files.
+ // The returned bucket may be upgradeable to a ReadWriteBucketCloser.
+ GetSourceBucket(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ sourceRef SourceRef,
+ options ...GetSourceBucketOption,
+ ) (ReadBucketCloserWithTerminateFileProvider, error)
+}
+
+// GetSourceBucketOption is an option for GetSourceBucket.
+type GetSourceBucketOption func(*getSourceBucketOptions)
+
+// GetSourceBucketWithWorkspacesDisabled disables workspace mode.
+func GetSourceBucketWithWorkspacesDisabled() GetSourceBucketOption {
+ return func(o *getSourceBucketOptions) {
+ o.workspacesDisabled = true
+ }
+}
+
+// ModuleFetcher is a module fetcher.
+type ModuleFetcher interface {
+ // GetModule gets the module.
+ // Unresolved ModuleRef's are automatically resolved.
+ GetModule(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ moduleRef ModuleRef,
+ ) (bufmodule.Module, error)
+}
+
+// Reader is a reader for Buf.
+type Reader interface {
+ ImageReader
+ SourceReader
+ ModuleFetcher
+}
+
+// NewReader returns a new Reader.
+func NewReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ httpClient *http.Client,
+ httpAuthenticator httpauth.Authenticator,
+ gitCloner git.Cloner,
+ moduleResolver bufmodule.ModuleResolver,
+ moduleReader bufmodule.ModuleReader,
+) Reader {
+ return newReader(
+ logger,
+ storageosProvider,
+ httpClient,
+ httpAuthenticator,
+ gitCloner,
+ moduleResolver,
+ moduleReader,
+ )
+}
+
+// NewImageReader returns a new ImageReader.
+func NewImageReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ httpClient *http.Client,
+ httpAuthenticator httpauth.Authenticator,
+ gitCloner git.Cloner,
+) ImageReader {
+ return newImageReader(
+ logger,
+ storageosProvider,
+ httpClient,
+ httpAuthenticator,
+ gitCloner,
+ )
+}
+
+// NewSourceReader returns a new SourceReader.
+func NewSourceReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ httpClient *http.Client,
+ httpAuthenticator httpauth.Authenticator,
+ gitCloner git.Cloner,
+) SourceReader {
+ return newSourceReader(
+ logger,
+ storageosProvider,
+ httpClient,
+ httpAuthenticator,
+ gitCloner,
+ )
+}
+
+// NewModuleFetcher returns a new ModuleFetcher.
+func NewModuleFetcher(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ moduleResolver bufmodule.ModuleResolver,
+ moduleReader bufmodule.ModuleReader,
+) ModuleFetcher {
+ return newModuleFetcher(
+ logger,
+ storageosProvider,
+ moduleResolver,
+ moduleReader,
+ )
+}
+
+// Writer is a writer for Buf.
+type Writer interface {
+ // PutImageFile puts the image file.
+ PutImageFile(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ imageRef ImageRef,
+ ) (io.WriteCloser, error)
+}
+
+// NewWriter returns a new Writer.
+func NewWriter(
+ logger *zap.Logger,
+) Writer {
+ return newWriter(
+ logger,
+ )
+}
+
+type getSourceBucketOptions struct {
+ workspacesDisabled bool
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/format.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/format.go
new file mode 100644
index 000000000..2381b02ae
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/format.go
@@ -0,0 +1,136 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buffetch
+
+const (
+ // formatBin is the binary format.
+ formatBin = "bin"
+ // formatBingz is the binary gzipped format.
+ formatBingz = "bingz"
+ // formatDir is the directory format.
+ formatDir = "dir"
+ // formatGit is the git format.
+ formatGit = "git"
+ // formatJSON is the JSON format.
+ formatJSON = "json"
+ // formatJSONGZ is the JSON gzipped format.
+ formatJSONGZ = "jsongz"
+ // formatMod is the module format.
+ formatMod = "mod"
+ // formatTar is the tar format.
+ formatTar = "tar"
+ // formatTargz is the tar gzipped format.
+ formatTargz = "targz"
+ // formatZip is the zip format.
+ formatZip = "zip"
+ // formatProtoFile is the proto file format
+ formatProtoFile = "protofile"
+)
+
+var (
+ // sorted
+ imageFormats = []string{
+ formatBin,
+ formatBingz,
+ formatJSON,
+ formatJSONGZ,
+ }
+ // sorted
+ imageFormatsNotDeprecated = []string{
+ formatBin,
+ formatJSON,
+ }
+ // sorted
+ sourceFormats = []string{
+ formatDir,
+ formatGit,
+ formatProtoFile,
+ formatTar,
+ formatTargz,
+ formatZip,
+ }
+ // sorted
+ sourceFormatsNotDeprecated = []string{
+ formatDir,
+ formatGit,
+ formatProtoFile,
+ formatTar,
+ formatZip,
+ }
+ sourceDirFormatsNotDeprecated = []string{
+ formatDir,
+ formatGit,
+ formatTar,
+ formatZip,
+ }
+ // sorted
+ moduleFormats = []string{
+ formatMod,
+ }
+ // sorted
+ moduleFormatsNotDeprecated = []string{
+ formatMod,
+ }
+ // sorted
+ sourceOrModuleFormats = []string{
+ formatDir,
+ formatGit,
+ formatMod,
+ formatProtoFile,
+ formatTar,
+ formatTargz,
+ formatZip,
+ }
+ // sorted
+ sourceOrModuleFormatsNotDeprecated = []string{
+ formatDir,
+ formatGit,
+ formatMod,
+ formatProtoFile,
+ formatTar,
+ formatZip,
+ }
+ // sorted
+ allFormats = []string{
+ formatBin,
+ formatBingz,
+ formatDir,
+ formatGit,
+ formatJSON,
+ formatJSONGZ,
+ formatMod,
+ formatProtoFile,
+ formatTar,
+ formatTargz,
+ formatZip,
+ }
+ // sorted
+ allFormatsNotDeprecated = []string{
+ formatBin,
+ formatDir,
+ formatGit,
+ formatJSON,
+ formatMod,
+ formatProtoFile,
+ formatTar,
+ formatZip,
+ }
+
+ deprecatedCompressionFormatToReplacementFormat = map[string]string{
+ formatBingz: formatBin,
+ formatJSONGZ: formatJSON,
+ formatTargz: formatTar,
+ }
+)
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/image_ref.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/image_ref.go
new file mode 100644
index 000000000..8722a3516
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/image_ref.go
@@ -0,0 +1,57 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buffetch
+
+import (
+ "github.com/bufbuild/buf/private/buf/buffetch/internal"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+var _ ImageRef = &imageRef{}
+
+type imageRef struct {
+ fileRef internal.FileRef
+ imageEncoding ImageEncoding
+}
+
+func newImageRef(
+ fileRef internal.FileRef,
+ imageEncoding ImageEncoding,
+) *imageRef {
+ return &imageRef{
+ fileRef: fileRef,
+ imageEncoding: imageEncoding,
+ }
+}
+
+func (r *imageRef) PathForExternalPath(externalPath string) (string, error) {
+ return normalpath.NormalizeAndValidate(externalPath)
+}
+
+func (r *imageRef) ImageEncoding() ImageEncoding {
+ return r.imageEncoding
+}
+
+func (r *imageRef) IsNull() bool {
+ return r.fileRef.FileScheme() == internal.FileSchemeNull
+}
+
+func (r *imageRef) internalRef() internal.Ref {
+ return r.fileRef
+}
+
+func (r *imageRef) internalFileRef() internal.FileRef {
+ return r.fileRef
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/archive_ref.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/archive_ref.go
new file mode 100644
index 000000000..2876b9155
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/archive_ref.go
@@ -0,0 +1,121 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import "github.com/bufbuild/buf/private/pkg/normalpath"
+
+var (
+ _ ParsedArchiveRef = &archiveRef{}
+)
+
+type archiveRef struct {
+ format string
+ path string
+ fileScheme FileScheme
+ archiveType ArchiveType
+ compressionType CompressionType
+ stripComponents uint32
+ subDirPath string
+}
+
+func newArchiveRef(
+ format string,
+ path string,
+ archiveType ArchiveType,
+ compressionType CompressionType,
+ stripComponents uint32,
+ subDirPath string,
+) (*archiveRef, error) {
+ if archiveType == ArchiveTypeZip && compressionType != CompressionTypeNone {
+ return nil, NewCannotSpecifyCompressionForZipError()
+ }
+ singleRef, err := newSingleRef(
+ format,
+ path,
+ compressionType,
+ )
+ if err != nil {
+ return nil, err
+ }
+ subDirPath, err = normalpath.NormalizeAndValidate(subDirPath)
+ if err != nil {
+ return nil, err
+ }
+ if subDirPath == "." {
+ subDirPath = ""
+ }
+ return newDirectArchiveRef(
+ singleRef.Format(),
+ singleRef.Path(),
+ singleRef.FileScheme(),
+ archiveType,
+ singleRef.CompressionType(),
+ stripComponents,
+ subDirPath,
+ ), nil
+}
+
+func newDirectArchiveRef(
+ format string,
+ path string,
+ fileScheme FileScheme,
+ archiveType ArchiveType,
+ compressionType CompressionType,
+ stripComponents uint32,
+ subDirPath string,
+) *archiveRef {
+ return &archiveRef{
+ format: format,
+ path: path,
+ fileScheme: fileScheme,
+ archiveType: archiveType,
+ compressionType: compressionType,
+ stripComponents: stripComponents,
+ subDirPath: subDirPath,
+ }
+}
+
+func (r *archiveRef) Format() string {
+ return r.format
+}
+
+func (r *archiveRef) Path() string {
+ return r.path
+}
+
+func (r *archiveRef) FileScheme() FileScheme {
+ return r.fileScheme
+}
+
+func (r *archiveRef) ArchiveType() ArchiveType {
+ return r.archiveType
+}
+
+func (r *archiveRef) CompressionType() CompressionType {
+ return r.compressionType
+}
+
+func (r *archiveRef) StripComponents() uint32 {
+ return r.stripComponents
+}
+
+func (r *archiveRef) SubDirPath() string {
+ return r.subDirPath
+}
+
+func (*archiveRef) ref() {}
+func (*archiveRef) fileRef() {}
+func (*archiveRef) bucketRef() {}
+func (*archiveRef) archiveRef() {}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/dir_ref.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/dir_ref.go
new file mode 100644
index 000000000..0b4ab4cd8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/dir_ref.go
@@ -0,0 +1,80 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/filepathextended"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+var (
+ _ ParsedDirRef = &dirRef{}
+)
+
+type dirRef struct {
+ format string
+ path string
+}
+
+func newDirRef(
+ format string,
+ path string,
+) (*dirRef, error) {
+ if path == "" {
+ return nil, NewNoPathError()
+ }
+ if app.IsDevStderr(path) {
+ return nil, NewInvalidPathError(format, path)
+ }
+ if path == "-" || app.IsDevNull(path) || app.IsDevStdin(path) || app.IsDevStdout(path) {
+ return nil, NewInvalidPathError(format, path)
+ }
+ if strings.Contains(path, "://") {
+ return nil, NewInvalidPathError(format, path)
+ }
+ path, err := filepathextended.RealClean(path)
+ if err != nil {
+ return nil, NewRealCleanPathError(path)
+ }
+ return newDirectDirRef(
+ format,
+ normalpath.Normalize(path),
+ ), nil
+}
+
+func newDirectDirRef(
+ format string,
+ path string,
+) *dirRef {
+ return &dirRef{
+ format: format,
+ path: path,
+ }
+}
+
+func (r *dirRef) Format() string {
+ return r.format
+}
+
+func (r *dirRef) Path() string {
+ return r.path
+}
+
+func (*dirRef) ref() {}
+func (*dirRef) bucketRef() {}
+func (*dirRef) dirRef() {}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/errors.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/errors.go
new file mode 100644
index 000000000..e66519cf6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/errors.go
@@ -0,0 +1,172 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "errors"
+ "fmt"
+ "strings"
+)
+
+var (
+ knownCompressionTypeStrings = []string{
+ "none",
+ "gzip",
+ "zstd",
+ }
+)
+
+// NewFormatNotAllowedError is a fetch error.
+func NewFormatNotAllowedError(format string, allowedFormats map[string]struct{}) error {
+ return fmt.Errorf("format was %q but must be one of %s", format, formatsToString(allowedFormats))
+}
+
+// NewFormatCannotBeDeterminedError is a fetch error.
+func NewFormatCannotBeDeterminedError(value string) error {
+ return fmt.Errorf("format cannot be determined from %q", value)
+}
+
+// NewCannotSpecifyGitBranchAndTagError is a fetch error.
+func NewCannotSpecifyGitBranchAndTagError() error {
+ return fmt.Errorf(`must specify only one of "branch", "tag"`)
+}
+
+// NewCannotSpecifyTagWithRefError is a fetch error.
+func NewCannotSpecifyTagWithRefError() error {
+ return fmt.Errorf(`cannot specify "tag" with "ref"`)
+}
+
+// NewDepthParseError is a fetch error.
+func NewDepthParseError(s string) error {
+ return fmt.Errorf(`could not parse "depth" value %q`, s)
+}
+
+// NewDepthZeroError is a fetch error.
+func NewDepthZeroError() error {
+ return fmt.Errorf(`"depth" must be >0 if specified`)
+}
+
+// NewPathUnknownGzError is a fetch error.
+func NewPathUnknownGzError(path string) error {
+ return fmt.Errorf("path %q had .gz extension with unknown format", path)
+}
+
+// NewCompressionUnknownError is a fetch error.
+func NewCompressionUnknownError(compression string) error {
+ return fmt.Errorf("unknown compression: %q (valid values are %q)", compression, strings.Join(knownCompressionTypeStrings, ","))
+}
+
+// NewCannotSpecifyCompressionForZipError is a fetch error.
+func NewCannotSpecifyCompressionForZipError() error {
+ return errors.New("cannot specify compression type for zip files")
+}
+
+// NewNoPathError is a fetch error.
+func NewNoPathError() error {
+ return errors.New("value has no path once processed")
+}
+
+// NewOptionsInvalidKeyError is a fetch error.
+func NewOptionsInvalidKeyError(key string) error {
+ return fmt.Errorf("invalid options key: %q", key)
+}
+
+// NewOptionsInvalidForFormatError is a fetch error.
+func NewOptionsInvalidForFormatError(format string, s string) error {
+ return fmt.Errorf("invalid options for format %q: %q", format, s)
+}
+
+// NewOptionsCouldNotParseStripComponentsError is a fetch error.
+func NewOptionsCouldNotParseStripComponentsError(s string) error {
+ return fmt.Errorf("could not parse strip_components value %q", s)
+}
+
+// NewOptionsCouldNotParseRecurseSubmodulesError is a fetch error.
+func NewOptionsCouldNotParseRecurseSubmodulesError(s string) error {
+ return fmt.Errorf("could not parse recurse_submodules value %q", s)
+}
+
+// NewFormatOverrideNotAllowedForDevNullError is a fetch error.
+func NewFormatOverrideNotAllowedForDevNullError(devNull string) error {
+ return fmt.Errorf("not allowed if path is %s", devNull)
+}
+
+// NewInvalidPathError is a fetch error.
+func NewInvalidPathError(format string, path string) error {
+ if format != "" {
+ format = format + " "
+ }
+ return fmt.Errorf("invalid %spath: %q", format, path)
+}
+
+// NewRealCleanPathError is a fetch error.
+func NewRealCleanPathError(path string) error {
+ return fmt.Errorf("could not clean relative path %q", path)
+}
+
+// NewFormatUnknownError is a fetch error.
+func NewFormatUnknownError(formatString string) error {
+ return fmt.Errorf("unknown format: %q", formatString)
+}
+
+// NewReadDisabledError is a fetch error.
+func NewReadDisabledError(scheme string) error {
+ return fmt.Errorf("reading assets from %s disabled", scheme)
+}
+
+// NewReadHTTPDisabledError is a fetch error.
+func NewReadHTTPDisabledError() error {
+ return NewReadDisabledError("http")
+}
+
+// NewReadGitDisabledError is a fetch error.
+func NewReadGitDisabledError() error {
+ return NewReadDisabledError("git")
+}
+
+// NewReadLocalDisabledError is a fetch error.
+func NewReadLocalDisabledError() error {
+ return NewReadDisabledError("local")
+}
+
+// NewReadStdioDisabledError is a fetch error.
+func NewReadStdioDisabledError() error {
+ return NewReadDisabledError("stdin")
+}
+
+// NewReadModuleDisabledError is a fetch error.
+func NewReadModuleDisabledError() error {
+ return NewReadDisabledError("module")
+}
+
+// NewWriteDisabledError is a fetch error.
+func NewWriteDisabledError(scheme string) error {
+ return fmt.Errorf("writing assets to %s disabled", scheme)
+}
+
+// NewWriteHTTPDisabledError is a fetch error.
+func NewWriteHTTPDisabledError() error {
+ return NewWriteDisabledError("http")
+}
+
+// NewWriteLocalDisabledError is a fetch error.
+func NewWriteLocalDisabledError() error {
+ return NewWriteDisabledError("local")
+}
+
+// NewWriteStdioDisabledError is a fetch error.
+func NewWriteStdioDisabledError() error {
+ return NewWriteDisabledError("stdout")
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/git_ref.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/git_ref.go
new file mode 100644
index 000000000..b0ce67e8c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/git_ref.go
@@ -0,0 +1,158 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/git"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+var (
+ _ ParsedGitRef = &gitRef{}
+
+ gitSchemePrefixToGitScheme = map[string]GitScheme{
+ "http://": GitSchemeHTTP,
+ "https://": GitSchemeHTTPS,
+ "file://": GitSchemeLocal,
+ "ssh://": GitSchemeSSH,
+ "git://": GitSchemeGit,
+ }
+)
+
+type gitRef struct {
+ format string
+ path string
+ gitScheme GitScheme
+ gitName git.Name
+ depth uint32
+ recurseSubmodules bool
+ subDirPath string
+}
+
+func newGitRef(
+ format string,
+ path string,
+ gitName git.Name,
+ depth uint32,
+ recurseSubmodules bool,
+ subDirPath string,
+) (*gitRef, error) {
+ gitScheme, path, err := getGitSchemeAndPath(format, path)
+ if err != nil {
+ return nil, err
+ }
+ if depth == 0 {
+ return nil, NewDepthZeroError()
+ }
+ subDirPath, err = normalpath.NormalizeAndValidate(subDirPath)
+ if err != nil {
+ return nil, err
+ }
+ if subDirPath == "." {
+ subDirPath = ""
+ }
+ return newDirectGitRef(
+ format,
+ path,
+ gitScheme,
+ gitName,
+ recurseSubmodules,
+ depth,
+ subDirPath,
+ ), nil
+}
+
+func newDirectGitRef(
+ format string,
+ path string,
+ gitScheme GitScheme,
+ gitName git.Name,
+ recurseSubmodules bool,
+ depth uint32,
+ subDirPath string,
+) *gitRef {
+ return &gitRef{
+ format: format,
+ path: path,
+ gitScheme: gitScheme,
+ gitName: gitName,
+ depth: depth,
+ recurseSubmodules: recurseSubmodules,
+ subDirPath: subDirPath,
+ }
+}
+
+func (r *gitRef) Format() string {
+ return r.format
+}
+
+func (r *gitRef) Path() string {
+ return r.path
+}
+
+func (r *gitRef) GitScheme() GitScheme {
+ return r.gitScheme
+}
+
+func (r *gitRef) GitName() git.Name {
+ return r.gitName
+}
+
+func (r *gitRef) Depth() uint32 {
+ return r.depth
+}
+
+func (r *gitRef) RecurseSubmodules() bool {
+ return r.recurseSubmodules
+}
+
+func (r *gitRef) SubDirPath() string {
+ return r.subDirPath
+}
+
+func (*gitRef) ref() {}
+func (*gitRef) bucketRef() {}
+func (*gitRef) gitRef() {}
+
+func getGitSchemeAndPath(format string, path string) (GitScheme, string, error) {
+ if path == "" {
+ return 0, "", NewNoPathError()
+ }
+ if app.IsDevStderr(path) {
+ return 0, "", NewInvalidPathError(format, path)
+ }
+ if path == "-" || app.IsDevNull(path) || app.IsDevStdin(path) || app.IsDevStdout(path) {
+ return 0, "", NewInvalidPathError(format, path)
+ }
+ for prefix, gitScheme := range gitSchemePrefixToGitScheme {
+ if strings.HasPrefix(path, prefix) {
+ path := strings.TrimPrefix(path, prefix)
+ if gitScheme == GitSchemeLocal {
+ path = normalpath.Normalize(path)
+ }
+ if path == "" {
+ return 0, "", NewNoPathError()
+ }
+ return gitScheme, path, nil
+ }
+ }
+ if strings.Contains(path, "://") {
+ return 0, "", NewInvalidPathError(format, path)
+ }
+ return GitSchemeLocal, normalpath.Normalize(path), nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/internal.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/internal.go
new file mode 100644
index 000000000..203f3d34d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/internal.go
@@ -0,0 +1,814 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/git"
+ "github.com/bufbuild/buf/private/pkg/httpauth"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+)
+
+const (
+ // FileSchemeHTTP is the http file scheme.
+ FileSchemeHTTP FileScheme = iota + 1
+ // FileSchemeHTTPS is the https file scheme.
+ FileSchemeHTTPS
+ // FileSchemeLocal is the local file scheme.
+ FileSchemeLocal
+ // FileSchemeStdio is the stdio file scheme.
+ //
+ // This can reference either stdin or stdout depending on if we are
+ // reading or writing.
+ FileSchemeStdio
+ // FileSchemeStdin is the stdin file scheme.
+ FileSchemeStdin
+ // FileSchemeStdout is the stdout file scheme.
+ FileSchemeStdout
+ // FileSchemeNull is the null file scheme.
+ FileSchemeNull
+
+ // GitSchemeHTTP is the http git scheme.
+ GitSchemeHTTP GitScheme = iota + 1
+ // GitSchemeHTTPS is the https git scheme.
+ GitSchemeHTTPS
+ // GitSchemeLocal is the local git scheme.
+ GitSchemeLocal
+ // GitSchemeSSH is the ssh git scheme.
+ GitSchemeSSH
+ // GitSchemeGit is the git git scheme.
+ GitSchemeGit
+
+ // ArchiveTypeTar is a tar archive.
+ ArchiveTypeTar ArchiveType = iota + 1
+ // ArchiveTypeZip is a zip archive.
+ ArchiveTypeZip
+
+ // CompressionTypeNone is no compression.
+ CompressionTypeNone CompressionType = iota + 1
+ // CompressionTypeGzip is gzip compression.
+ CompressionTypeGzip
+ // CompressionTypeZstd is zstd compression.
+ CompressionTypeZstd
+)
+
+// FileScheme is a file scheme.
+type FileScheme int
+
+// GitScheme is a git scheme.
+type GitScheme int
+
+// ArchiveType is a archive type.
+type ArchiveType int
+
+// CompressionType is a compression type.
+type CompressionType int
+
+// Ref is a reference.
+type Ref interface {
+ ref()
+}
+
+// FileRef is a file reference.
+type FileRef interface {
+ Ref
+ // Path is the path to the reference.
+ //
+ // This will be the non-empty path minus the scheme for http and https files.
+ // This will be the non-empty normalized file path for local files.
+ // This will be empty for stdio and null files.
+ Path() string
+ FileScheme() FileScheme
+ CompressionType() CompressionType
+ fileRef()
+}
+
+// BucketRef is a bucket reference.
+type BucketRef interface {
+ Ref
+ bucketRef()
+}
+
+// SingleRef is a non-archive file reference.
+type SingleRef interface {
+ FileRef
+ singleRef()
+}
+
+// NewSingleRef returns a new SingleRef.
+func NewSingleRef(path string, compressionType CompressionType) (SingleRef, error) {
+ return newSingleRef("", path, compressionType)
+}
+
+// ArchiveRef is an archive reference.
+//
+// An ArchiveRef is a special type of reference that can be either a FileRef or a BucketRef.
+// Note that if ArchiveType is ArchiveTypeZip, CompressionType will always be CompressionTypeNone.
+type ArchiveRef interface {
+ FileRef
+ BucketRef
+ ArchiveType() ArchiveType
+ // Applied before subdir
+ StripComponents() uint32
+ // Will be empty instead of "." for root directory
+ SubDirPath() string
+ archiveRef()
+}
+
+// NewArchiveRef returns a new ArchiveRef.
+func NewArchiveRef(
+ path string,
+ archiveType ArchiveType,
+ compressionType CompressionType,
+ stripComponents uint32,
+ subDirPath string,
+) (ArchiveRef, error) {
+ return newArchiveRef("", path, archiveType, compressionType, stripComponents, subDirPath)
+}
+
+// DirRef is a local directory reference.
+type DirRef interface {
+ // Path is the path to the reference.
+ //
+ // This will be the non-empty normalized directory path for directories.
+ Path() string
+ BucketRef
+ dirRef()
+}
+
+// NewDirRef returns a new DirRef.
+func NewDirRef(path string) (DirRef, error) {
+ return newDirRef("", path)
+}
+
+// ProtoFileRef is a file reference that incorporates a BucketRef.
+type ProtoFileRef interface {
+ BucketRef
+ // Path is the normalized path to the file reference.
+ Path() string
+ // IncludePackageFiles says to include the same package files TODO update comment
+ IncludePackageFiles() bool
+ protoFileRef()
+}
+
+// GitRef is a git reference.
+type GitRef interface {
+ // Path is the path to the reference.
+ //
+ // This will be the non-empty path minus the scheme for http, https, ssh, and git repositories.
+ // This will be the non-empty normalized directory path for local git repositories.
+ Path() string
+ BucketRef
+ GitScheme() GitScheme
+ // Optional. May be nil, in which case clone the default branch.
+ GitName() git.Name
+ // Will always be >= 1
+ Depth() uint32
+ RecurseSubmodules() bool
+ // Will be empty instead of "." for root directory
+ SubDirPath() string
+ gitRef()
+}
+
+// NewGitRef returns a new GitRef.
+func NewGitRef(
+ path string,
+ gitName git.Name,
+ depth uint32,
+ recurseSubmodules bool,
+ subDirPath string,
+) (GitRef, error) {
+ return newGitRef("", path, gitName, depth, recurseSubmodules, subDirPath)
+}
+
+// ModuleRef is a module reference.
+type ModuleRef interface {
+ Ref
+ ModuleReference() bufmoduleref.ModuleReference
+ moduleRef()
+}
+
+// NewModuleRef returns a new ModuleRef.
+//
+// The path must be in the form server/owner/repository/branch[:digest].
+func NewModuleRef(path string) (ModuleRef, error) {
+ return newModuleRef("", path)
+}
+
+// HasFormat is an object that has a format.
+type HasFormat interface {
+ Format() string
+}
+
+// ParsedRef is a parsed Ref.
+type ParsedRef interface {
+ Ref
+ HasFormat
+}
+
+// ParsedFileRef is a parsed FileRef.
+type ParsedFileRef interface {
+ FileRef
+ HasFormat
+}
+
+// ParsedBucketRef is a parsed BucketRef.
+type ParsedBucketRef interface {
+ BucketRef
+ HasFormat
+}
+
+// ParsedSingleRef is a parsed SingleRef.
+type ParsedSingleRef interface {
+ SingleRef
+ HasFormat
+}
+
+// NewDirectParsedSingleRef returns a new ParsedSingleRef with no validation checks.
+//
+// This should only be used for testing.
+func NewDirectParsedSingleRef(
+ format string,
+ path string,
+ fileScheme FileScheme,
+ compressionType CompressionType,
+) ParsedSingleRef {
+ return newDirectSingleRef(
+ format,
+ path,
+ fileScheme,
+ compressionType,
+ )
+}
+
+// ParsedArchiveRef is a parsed ArchiveRef.
+type ParsedArchiveRef interface {
+ ArchiveRef
+ HasFormat
+}
+
+// NewDirectParsedArchiveRef returns a new ParsedArchiveRef with no validation checks.
+//
+// This should only be used for testing.
+func NewDirectParsedArchiveRef(
+ format string,
+ path string,
+ fileScheme FileScheme,
+ archiveType ArchiveType,
+ compressionType CompressionType,
+ stripComponents uint32,
+ subDirPath string,
+) ParsedArchiveRef {
+ return newDirectArchiveRef(
+ format,
+ path,
+ fileScheme,
+ archiveType,
+ compressionType,
+ stripComponents,
+ subDirPath,
+ )
+}
+
+// ParsedDirRef is a parsed DirRef.
+type ParsedDirRef interface {
+ DirRef
+ HasFormat
+}
+
+// NewDirectParsedDirRef returns a new ParsedDirRef with no validation checks.
+//
+// This should only be used for testing.
+func NewDirectParsedDirRef(format string, path string) ParsedDirRef {
+ return newDirectDirRef(format, path)
+}
+
+// ParsedProtoFileRef is a parsed ProtoFileRef.
+type ParsedProtoFileRef interface {
+ ProtoFileRef
+ HasFormat
+}
+
+// ParsedGitRef is a parsed GitRef.
+type ParsedGitRef interface {
+ GitRef
+ HasFormat
+}
+
+// NewDirectParsedGitRef returns a new ParsedGitRef with no validation checks.
+//
+// This should only be used for testing.
+func NewDirectParsedGitRef(
+ format string,
+ path string,
+ gitScheme GitScheme,
+ gitName git.Name,
+ recurseSubmodules bool,
+ depth uint32,
+ subDirPath string,
+) ParsedGitRef {
+ return newDirectGitRef(
+ format,
+ path,
+ gitScheme,
+ gitName,
+ recurseSubmodules,
+ depth,
+ subDirPath,
+ )
+}
+
+// ParsedModuleRef is a parsed ModuleRef.
+type ParsedModuleRef interface {
+ ModuleRef
+ HasFormat
+}
+
+// NewDirectParsedModuleRef returns a new ParsedModuleRef with no validation checks.
+//
+// This should only be used for testing.
+func NewDirectParsedModuleRef(
+ format string,
+ moduleReference bufmoduleref.ModuleReference,
+) ParsedModuleRef {
+ return newDirectModuleRef(
+ format,
+ moduleReference,
+ )
+}
+
+// RefParser parses references.
+type RefParser interface {
+ // GetParsedRef gets the ParsedRef for the value.
+ //
+ // The returned ParsedRef will be either a ParsedSingleRef, ParsedArchiveRef, ParsedDirRef, ParsedGitRef, or ParsedModuleRef.
+ //
+ // The options should be used to validate that you are getting one of the correct formats.
+ GetParsedRef(ctx context.Context, value string, options ...GetParsedRefOption) (ParsedRef, error)
+}
+
+// NewRefParser returns a new RefParser.
+func NewRefParser(logger *zap.Logger, options ...RefParserOption) RefParser {
+ return newRefParser(logger, options...)
+}
+
+// TerminateFileProvider provides TerminateFiles.
+type TerminateFileProvider interface {
+ // GetTerminateFiles returns the list of terminate files in priority order.
+ GetTerminateFiles() []TerminateFile
+}
+
+// TerminateFile is a terminate file.
+type TerminateFile interface {
+ // Name returns the name of the TerminateFile (i.e. the base of the fully-qualified file paths).
+ Name() string
+ // Path returns the normalized directory path where the TemrinateFile is located.
+ Path() string
+}
+
+// ReadBucketCloserWithTerminateFileProvider is a ReadBucketCloser with a TerminateFileProvider.
+type ReadBucketCloserWithTerminateFileProvider interface {
+ ReadBucketCloser
+
+ // TerminateFileProvider returns a TerminateFileProvider.
+ TerminateFileProvider() TerminateFileProvider
+}
+
+// ReadBucketCloser is a bucket returned from GetBucket.
+type ReadBucketCloser interface {
+ storage.ReadBucketCloser
+
+ // RelativeRootPath is the relative path to the root of the bucket
+ // based on the current working directory.
+ //
+ // This will be set if a terminate filename was specified and found.
+ RelativeRootPath() string
+ // SubDirPath is the subdir within the Bucket of the actual asset.
+ //
+ // This will be set if a terminate filename was specified and found.
+ // If so, the actual Bucket will be the directory that contained
+ // this terminate file, and the subdir will be the subdir of
+ // the actual asset relative to the terminate file.
+ SubDirPath() string
+ // SetSubDirPath sets the value of `SubDirPath`.
+ //
+ // This should only be called if a terminate file name was specified and found outside of
+ // a workspace where the bucket is originally closed.
+ SetSubDirPath(string)
+}
+
+// ReadWriteBucketCloser is a bucket potentially returned from GetBucket.
+//
+// The returned ReadBucketCloser may be upgradeable to a ReadWriteBucketCloser.
+type ReadWriteBucketCloser interface {
+ ReadBucketCloser
+ storage.WriteBucket
+}
+
+// Reader is a reader.
+type Reader interface {
+ // GetFile gets the file.
+ // SingleRefs and ArchiveRefs will result in decompressed files unless KeepFileCompression is set.
+ GetFile(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ fileRef FileRef,
+ options ...GetFileOption,
+ ) (io.ReadCloser, error)
+ // GetBucket gets the bucket.
+ //
+ // The returned ReadBucketCloser may actually be upgradeable to a ReadWriteBucketCloser.
+ GetBucket(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ bucketRef BucketRef,
+ options ...GetBucketOption,
+ ) (ReadBucketCloserWithTerminateFileProvider, error)
+ // GetModule gets the module.
+ GetModule(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ moduleRef ModuleRef,
+ options ...GetModuleOption,
+ ) (bufmodule.Module, error)
+}
+
+// NewReader returns a new Reader.
+func NewReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ options ...ReaderOption,
+) Reader {
+ return newReader(
+ logger,
+ storageosProvider,
+ options...,
+ )
+}
+
+// Writer is a writer.
+type Writer interface {
+ // PutFile puts the file.
+ PutFile(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ fileRef FileRef,
+ options ...PutFileOption,
+ ) (io.WriteCloser, error)
+}
+
+// NewWriter returns a new Writer.
+func NewWriter(
+ logger *zap.Logger,
+ options ...WriterOption,
+) Writer {
+ return newWriter(
+ logger,
+ options...,
+ )
+}
+
+// RawRef is an unprocessed ref used for WithRefProcessor.
+//
+// A RawRefProcessor will allow modifications to a RawRef before continuing parsing.
+// This allows defaults to be inferred from the path.
+//
+// The Path will be the only value set when the RawRefProcessor is invoked, and is not normalized.
+// After the RawRefProcessor is called, options will be parsed.
+type RawRef struct {
+ // Will always be set
+ // Not normalized yet
+ Path string
+ // Will always be set
+ // Set via RawRefProcessor if not explicitly set
+ Format string
+ // Only set for single, archive formats
+ // Cannot be set for zip archives
+ CompressionType CompressionType
+ // Only set for archive, git formats
+ SubDirPath string
+ // Only set for git formats
+ // Only one of GitBranch and GitTag will be set
+ GitBranch string
+ // Only set for git formats
+ // Only one of GitBranch and GitTag will be set
+ GitTag string
+ // Only set for git formats
+ // Specifies an exact git reference to use with git checkout.
+ // Can be used on its own or with GitBranch. Not allowed with GitTag.
+ // This is defined as anything that can be given to git checkout.
+ GitRef string
+ // Only set for git formats
+ GitRecurseSubmodules bool
+ // Only set for git formats.
+ // The depth to use when cloning a repository. Only allowed when GitRef
+ // is set. Defaults to 50 if unset.
+ GitDepth uint32
+ // Only set for archive formats
+ ArchiveStripComponents uint32
+ // Only set for proto file ref format.
+ // Sets whether or not to include the files in the rest of the package
+ // in the image for the ProtoFileRef.
+ // This defaults to false.
+ IncludePackageFiles bool
+}
+
+// RefParserOption is an RefParser option.
+type RefParserOption func(*refParser)
+
+// WithRawRefProcessor attaches the given RawRefProcessor.
+//
+// If format is not manually specified, the RefParser will use this format parser
+// with the raw path, that is not normalized.
+func WithRawRefProcessor(rawRefProcessor func(*RawRef) error) RefParserOption {
+ return func(refParser *refParser) {
+ refParser.rawRefProcessor = rawRefProcessor
+ }
+}
+
+// WithSingleFormat attaches the given format as a single format.
+//
+// It is up to the user to not incorrectly attached a format twice.
+func WithSingleFormat(format string, options ...SingleFormatOption) RefParserOption {
+ return func(refParser *refParser) {
+ format = normalizeFormat(format)
+ if format == "" {
+ return
+ }
+ singleFormatInfo := newSingleFormatInfo()
+ for _, option := range options {
+ option(singleFormatInfo)
+ }
+ refParser.singleFormatToInfo[format] = singleFormatInfo
+ }
+}
+
+// WithArchiveFormat attaches the given format as an archive format.
+//
+// It is up to the user to not incorrectly attached a format twice.
+func WithArchiveFormat(format string, archiveType ArchiveType, options ...ArchiveFormatOption) RefParserOption {
+ return func(refParser *refParser) {
+ format = normalizeFormat(format)
+ if format == "" {
+ return
+ }
+ archiveFormatInfo := newArchiveFormatInfo(archiveType)
+ for _, option := range options {
+ option(archiveFormatInfo)
+ }
+ refParser.archiveFormatToInfo[format] = archiveFormatInfo
+ }
+}
+
+// WithDirFormat attaches the given format as a dir format.
+//
+// It is up to the user to not incorrectly attached a format twice.
+func WithDirFormat(format string, options ...DirFormatOption) RefParserOption {
+ return func(refParser *refParser) {
+ format = normalizeFormat(format)
+ if format == "" {
+ return
+ }
+ dirFormatInfo := newDirFormatInfo()
+ for _, option := range options {
+ option(dirFormatInfo)
+ }
+ refParser.dirFormatToInfo[format] = dirFormatInfo
+ }
+}
+
+// WithGitFormat attaches the given format as a git format.
+//
+// It is up to the user to not incorrectly attached a format twice.
+func WithGitFormat(format string, options ...GitFormatOption) RefParserOption {
+ return func(refParser *refParser) {
+ format = normalizeFormat(format)
+ if format == "" {
+ return
+ }
+ gitFormatInfo := newGitFormatInfo()
+ for _, option := range options {
+ option(gitFormatInfo)
+ }
+ refParser.gitFormatToInfo[format] = gitFormatInfo
+ }
+}
+
+// WithModuleFormat attaches the given format as a module format.
+//
+// It is up to the user to not incorrectly attach a format twice.
+func WithModuleFormat(format string, options ...ModuleFormatOption) RefParserOption {
+ return func(refParser *refParser) {
+ format = normalizeFormat(format)
+ if format == "" {
+ return
+ }
+ moduleFormatInfo := newModuleFormatInfo()
+ for _, option := range options {
+ option(moduleFormatInfo)
+ }
+ refParser.moduleFormatToInfo[format] = moduleFormatInfo
+ }
+}
+
+// WithProtoFileFormat attaches the given format as a single file format.
+// The ProtoFileRef format is only allowed if the option for the parser is given. Otherwise this is a no-op.
+//
+// It is up to the user to not incorrectly attach a format twice.
+func WithProtoFileFormat(format string, options ...ProtoFileFormatOption) RefParserOption {
+ return func(refParser *refParser) {
+ format = normalizeFormat(format)
+ if format == "" {
+ return
+ }
+ protoFileFormatInfo := newProtoFileFormatInfo()
+ for _, option := range options {
+ option(protoFileFormatInfo)
+ }
+ refParser.protoFileFormatToInfo[format] = protoFileFormatInfo
+ }
+}
+
+// SingleFormatOption is a single format option.
+type SingleFormatOption func(*singleFormatInfo)
+
+// WithSingleDefaultCompressionType sets the default compression type.
+func WithSingleDefaultCompressionType(defaultCompressionType CompressionType) SingleFormatOption {
+ return func(singleFormatInfo *singleFormatInfo) {
+ singleFormatInfo.defaultCompressionType = defaultCompressionType
+ }
+}
+
+// ArchiveFormatOption is a archive format option.
+type ArchiveFormatOption func(*archiveFormatInfo)
+
+// WithArchiveDefaultCompressionType sets the default compression type.
+//
+// Note this should never be set for zip.
+func WithArchiveDefaultCompressionType(defaultCompressionType CompressionType) ArchiveFormatOption {
+ return func(archiveFormatInfo *archiveFormatInfo) {
+ archiveFormatInfo.defaultCompressionType = defaultCompressionType
+ }
+}
+
+// DirFormatOption is a dir format option.
+type DirFormatOption func(*dirFormatInfo)
+
+// GitFormatOption is a git format option.
+type GitFormatOption func(*gitFormatInfo)
+
+// ModuleFormatOption is a module format option.
+type ModuleFormatOption func(*moduleFormatInfo)
+
+// ReaderOption is a Reader option.
+type ReaderOption func(*reader)
+
+// ProtoFileFormatOption is a single file format option.
+type ProtoFileFormatOption func(*protoFileFormatInfo)
+
+// WithReaderHTTP enables HTTP.
+func WithReaderHTTP(httpClient *http.Client, httpAuthenticator httpauth.Authenticator) ReaderOption {
+ return func(reader *reader) {
+ reader.httpEnabled = true
+ reader.httpClient = httpClient
+ reader.httpAuthenticator = httpAuthenticator
+ }
+}
+
+// WithReaderGit enables Git.
+func WithReaderGit(gitCloner git.Cloner) ReaderOption {
+ return func(reader *reader) {
+ reader.gitEnabled = true
+ reader.gitCloner = gitCloner
+ }
+}
+
+// WithReaderModule enables modules.
+func WithReaderModule(
+ moduleResolver bufmodule.ModuleResolver,
+ moduleReader bufmodule.ModuleReader,
+) ReaderOption {
+ return func(reader *reader) {
+ reader.moduleEnabled = true
+ reader.moduleResolver = moduleResolver
+ reader.moduleReader = moduleReader
+ }
+}
+
+// WithReaderLocal enables local.
+func WithReaderLocal() ReaderOption {
+ return func(reader *reader) {
+ reader.localEnabled = true
+ }
+}
+
+// WithReaderStdio enables stdio.
+func WithReaderStdio() ReaderOption {
+ return func(reader *reader) {
+ reader.stdioEnabled = true
+ }
+}
+
+// WriterOption is an Writer option.
+type WriterOption func(*writer)
+
+// WithWriterLocal enables local.
+func WithWriterLocal() WriterOption {
+ return func(writer *writer) {
+ writer.localEnabled = true
+ }
+}
+
+// WithWriterStdio enables stdio.
+func WithWriterStdio() WriterOption {
+ return func(writer *writer) {
+ writer.stdioEnabled = true
+ }
+}
+
+// GetParsedRefOption is a GetParsedRef option.
+type GetParsedRefOption func(*getParsedRefOptions)
+
+// WithAllowedFormats limits the allowed formats to the given formats.
+func WithAllowedFormats(formats ...string) GetParsedRefOption {
+ return func(getParsedRefOptions *getParsedRefOptions) {
+ for _, format := range formats {
+ getParsedRefOptions.allowedFormats[normalizeFormat(format)] = struct{}{}
+ }
+ }
+}
+
+// GetFileOption is a GetFile option.
+type GetFileOption func(*getFileOptions)
+
+// WithGetFileKeepFileCompression says to return compressed.
+func WithGetFileKeepFileCompression() GetFileOption {
+ return func(getFileOptions *getFileOptions) {
+ getFileOptions.keepFileCompression = true
+ }
+}
+
+// GetBucketOption is a GetBucket option.
+type GetBucketOption func(*getBucketOptions)
+
+// WithGetBucketTerminateFileNames only applies if subdir is specified.
+//
+// The terminate files are organized as a slice of slices of file names.
+// Priority will be given to the first slice of terminate file names, which will be workspace
+// configuration files. The second layer of priority will be given to modules.
+//
+// This says that for a given subdir, ascend directories until you reach
+// a file with one of these names, and if you do, the returned bucket will be
+// for the directory with this filename, while SubDirPath on the
+// returned bucket will be set to the original subdir relative
+// to the terminate file.
+//
+// This is used for workspaces and modules. So if you have i.e. "proto/foo"
+// subdir, and terminate file "proto/buf.work.yaml", the returned bucket will
+// be for "proto", and the SubDirPath will be "foo".
+//
+// The terminateFileNames are expected to be valid and have no slashes.
+// Example of terminateFileNames:
+//
+// [][]string{
+// []string{"buf.work.yaml", "buf.work"},
+// []string{"buf.yaml", "buf.mod"},
+// }.
+func WithGetBucketTerminateFileNames(terminateFileNames [][]string) GetBucketOption {
+ return func(getBucketOptions *getBucketOptions) {
+ getBucketOptions.terminateFileNames = terminateFileNames
+ }
+}
+
+// PutFileOption is a PutFile option.
+type PutFileOption func(*putFileOptions)
+
+// WithPutFileNoFileCompression says to put s uncompressed.
+func WithPutFileNoFileCompression() PutFileOption {
+ return func(putFileOptions *putFileOptions) {
+ putFileOptions.noFileCompression = true
+ }
+}
+
+// GetModuleOption is a GetModule option.
+type GetModuleOption func(*getModuleOptions)
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/module_ref.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/module_ref.go
new file mode 100644
index 000000000..dff15743c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/module_ref.go
@@ -0,0 +1,74 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/app"
+)
+
+var (
+ _ ParsedModuleRef = &moduleRef{}
+)
+
+type moduleRef struct {
+ format string
+ moduleReference bufmoduleref.ModuleReference
+}
+
+func newModuleRef(
+ format string,
+ path string,
+) (*moduleRef, error) {
+ if path == "" {
+ return nil, NewNoPathError()
+ }
+ if app.IsDevStderr(path) {
+ return nil, NewInvalidPathError(format, path)
+ }
+ if path == "-" || app.IsDevNull(path) || app.IsDevStdin(path) || app.IsDevStdout(path) {
+ return nil, NewInvalidPathError(format, path)
+ }
+ if strings.Contains(path, "://") {
+ return nil, NewInvalidPathError(format, path)
+ }
+ moduleReference, err := bufmoduleref.ModuleReferenceForString(path)
+ if err != nil {
+ // TODO: this is dumb
+ return nil, NewInvalidPathError(format, path)
+ }
+ return newDirectModuleRef(format, moduleReference), nil
+}
+
+func newDirectModuleRef(format string, moduleReference bufmoduleref.ModuleReference) *moduleRef {
+ return &moduleRef{
+ format: format,
+ moduleReference: moduleReference,
+ }
+}
+
+func (r *moduleRef) Format() string {
+ return r.format
+}
+
+func (r *moduleRef) ModuleReference() bufmoduleref.ModuleReference {
+ return r.moduleReference
+}
+
+func (*moduleRef) ref() {}
+func (*moduleRef) bucketRef() {}
+func (*moduleRef) moduleRef() {}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/proto_file_ref.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/proto_file_ref.go
new file mode 100644
index 000000000..a39d87649
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/proto_file_ref.go
@@ -0,0 +1,49 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+var (
+ _ ParsedProtoFileRef = &protoFileRef{}
+)
+
+type protoFileRef struct {
+ format string
+ path string
+ includePackageFiles bool
+}
+
+func newProtoFileRef(format string, path string, includePackageFiles bool) *protoFileRef {
+ return &protoFileRef{
+ format: format,
+ path: path,
+ includePackageFiles: includePackageFiles,
+ }
+}
+
+func (s *protoFileRef) Format() string {
+ return s.format
+}
+
+func (s *protoFileRef) Path() string {
+ return s.path
+}
+
+func (s *protoFileRef) IncludePackageFiles() bool {
+ return s.includePackageFiles
+}
+
+func (*protoFileRef) ref() {}
+func (*protoFileRef) bucketRef() {}
+func (*protoFileRef) protoFileRef() {}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/read_bucket_closer.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/read_bucket_closer.go
new file mode 100644
index 000000000..36b48d770
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/read_bucket_closer.go
@@ -0,0 +1,57 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+var _ ReadBucketCloser = &readBucketCloser{}
+
+type readBucketCloser struct {
+ storage.ReadBucketCloser
+
+ relativeRootPath string
+ subDirPath string
+}
+
+func newReadBucketCloser(
+ storageReadBucketCloser storage.ReadBucketCloser,
+ relativeRootPath string,
+ subDirPath string,
+) (*readBucketCloser, error) {
+ normalizedSubDirPath, err := normalpath.NormalizeAndValidate(subDirPath)
+ if err != nil {
+ return nil, err
+ }
+ return &readBucketCloser{
+ ReadBucketCloser: storageReadBucketCloser,
+ relativeRootPath: normalpath.Normalize(relativeRootPath),
+ subDirPath: normalizedSubDirPath,
+ }, nil
+}
+
+func (r *readBucketCloser) RelativeRootPath() string {
+ return r.relativeRootPath
+}
+
+func (r *readBucketCloser) SubDirPath() string {
+ return r.subDirPath
+}
+
+func (r *readBucketCloser) SetSubDirPath(subDirPath string) {
+ r.subDirPath = subDirPath
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/read_bucket_closer_terminate_file_provider.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/read_bucket_closer_terminate_file_provider.go
new file mode 100644
index 000000000..03944d614
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/read_bucket_closer_terminate_file_provider.go
@@ -0,0 +1,37 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+var _ ReadBucketCloserWithTerminateFileProvider = &readBucketCloserWithTerminateFileProvider{}
+
+type readBucketCloserWithTerminateFileProvider struct {
+ ReadBucketCloser
+
+ terminateFileProvider TerminateFileProvider
+}
+
+func newReadBucketCloserWithTerminateFiles(
+ readBucketCloser ReadBucketCloser,
+ terminateFileProvider TerminateFileProvider,
+) *readBucketCloserWithTerminateFileProvider {
+ return &readBucketCloserWithTerminateFileProvider{
+ ReadBucketCloser: readBucketCloser,
+ terminateFileProvider: terminateFileProvider,
+ }
+}
+
+func (r *readBucketCloserWithTerminateFileProvider) TerminateFileProvider() TerminateFileProvider {
+ return r.terminateFileProvider
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/read_write_bucket_closer.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/read_write_bucket_closer.go
new file mode 100644
index 000000000..504d917fa
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/read_write_bucket_closer.go
@@ -0,0 +1,57 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+var _ ReadWriteBucketCloser = &readWriteBucketCloser{}
+
+type readWriteBucketCloser struct {
+ storage.ReadWriteBucketCloser
+
+ relativeRootPath string
+ subDirPath string
+}
+
+func newReadWriteBucketCloser(
+ storageReadWriteBucketCloser storage.ReadWriteBucketCloser,
+ relativeRootPath string,
+ subDirPath string,
+) (*readWriteBucketCloser, error) {
+ normalizedSubDirPath, err := normalpath.NormalizeAndValidate(subDirPath)
+ if err != nil {
+ return nil, err
+ }
+ return &readWriteBucketCloser{
+ ReadWriteBucketCloser: storageReadWriteBucketCloser,
+ relativeRootPath: normalpath.Normalize(relativeRootPath),
+ subDirPath: normalizedSubDirPath,
+ }, nil
+}
+
+func (r *readWriteBucketCloser) RelativeRootPath() string {
+ return r.relativeRootPath
+}
+
+func (r *readWriteBucketCloser) SubDirPath() string {
+ return r.subDirPath
+}
+
+func (r *readWriteBucketCloser) SetSubDirPath(subDirPath string) {
+ r.subDirPath = subDirPath
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/reader.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/reader.go
new file mode 100644
index 000000000..8a35f4e6f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/reader.go
@@ -0,0 +1,906 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "os"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/git"
+ "github.com/bufbuild/buf/private/pkg/httpauth"
+ "github.com/bufbuild/buf/private/pkg/ioextended"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/osextended"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagearchive"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/klauspost/compress/zstd"
+ "github.com/klauspost/pgzip"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+type reader struct {
+ logger *zap.Logger
+ storageosProvider storageos.Provider
+
+ localEnabled bool
+ stdioEnabled bool
+
+ httpEnabled bool
+ httpClient *http.Client
+ httpAuthenticator httpauth.Authenticator
+
+ gitEnabled bool
+ gitCloner git.Cloner
+
+ moduleEnabled bool
+ moduleReader bufmodule.ModuleReader
+ moduleResolver bufmodule.ModuleResolver
+}
+
+func newReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ options ...ReaderOption,
+) *reader {
+ reader := &reader{
+ logger: logger,
+ storageosProvider: storageosProvider,
+ }
+ for _, option := range options {
+ option(reader)
+ }
+ return reader
+}
+
+func (r *reader) GetFile(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ fileRef FileRef,
+ options ...GetFileOption,
+) (io.ReadCloser, error) {
+ getFileOptions := newGetFileOptions()
+ for _, option := range options {
+ option(getFileOptions)
+ }
+ switch t := fileRef.(type) {
+ case SingleRef:
+ return r.getSingle(
+ ctx,
+ container,
+ t,
+ getFileOptions.keepFileCompression,
+ )
+ case ArchiveRef:
+ return r.getArchiveFile(
+ ctx,
+ container,
+ t,
+ getFileOptions.keepFileCompression,
+ )
+ default:
+ return nil, fmt.Errorf("unknown FileRef type: %T", fileRef)
+ }
+}
+
+func (r *reader) GetBucket(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ bucketRef BucketRef,
+ options ...GetBucketOption,
+) (ReadBucketCloserWithTerminateFileProvider, error) {
+ getBucketOptions := newGetBucketOptions()
+ for _, option := range options {
+ option(getBucketOptions)
+ }
+ switch t := bucketRef.(type) {
+ case ArchiveRef:
+ return r.getArchiveBucket(
+ ctx,
+ container,
+ t,
+ getBucketOptions.terminateFileNames,
+ )
+ case DirRef:
+ return r.getDirBucket(
+ ctx,
+ container,
+ t,
+ getBucketOptions.terminateFileNames,
+ )
+ case GitRef:
+ return r.getGitBucket(
+ ctx,
+ container,
+ t,
+ getBucketOptions.terminateFileNames,
+ )
+ case ProtoFileRef:
+ return r.getProtoFileBucket(
+ ctx,
+ container,
+ t,
+ getBucketOptions.terminateFileNames,
+ )
+ default:
+ return nil, fmt.Errorf("unknown BucketRef type: %T", bucketRef)
+ }
+}
+
+func (r *reader) GetModule(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ moduleRef ModuleRef,
+ _ ...GetModuleOption,
+) (bufmodule.Module, error) {
+ switch t := moduleRef.(type) {
+ case ModuleRef:
+ return r.getModule(
+ ctx,
+ container,
+ t,
+ )
+ default:
+ return nil, fmt.Errorf("unknown ModuleRef type: %T", moduleRef)
+ }
+}
+
+func (r *reader) getSingle(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ singleRef SingleRef,
+ keepFileCompression bool,
+) (io.ReadCloser, error) {
+ readCloser, _, err := r.getFileReadCloserAndSize(ctx, container, singleRef, keepFileCompression)
+ return readCloser, err
+}
+
+func (r *reader) getArchiveFile(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ archiveRef ArchiveRef,
+ keepFileCompression bool,
+) (io.ReadCloser, error) {
+ readCloser, _, err := r.getFileReadCloserAndSize(ctx, container, archiveRef, keepFileCompression)
+ return readCloser, err
+}
+
+func (r *reader) getArchiveBucket(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ archiveRef ArchiveRef,
+ terminateFileNames [][]string,
+) (_ ReadBucketCloserWithTerminateFileProvider, retErr error) {
+ subDirPath, err := normalpath.NormalizeAndValidate(archiveRef.SubDirPath())
+ if err != nil {
+ return nil, err
+ }
+ readCloser, size, err := r.getFileReadCloserAndSize(ctx, container, archiveRef, false)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, readCloser.Close())
+ }()
+ readWriteBucket := storagemem.NewReadWriteBucket()
+ ctx, span := trace.StartSpan(ctx, "unarchive")
+ defer span.End()
+ switch archiveType := archiveRef.ArchiveType(); archiveType {
+ case ArchiveTypeTar:
+ if err := storagearchive.Untar(
+ ctx,
+ readCloser,
+ readWriteBucket,
+ nil,
+ archiveRef.StripComponents(),
+ ); err != nil {
+ return nil, err
+ }
+ case ArchiveTypeZip:
+ var readerAt io.ReaderAt
+ if size < 0 {
+ data, err := io.ReadAll(readCloser)
+ if err != nil {
+ return
+ }
+ readerAt = bytes.NewReader(data)
+ size = int64(len(data))
+ } else {
+ readerAt, err = ioextended.ReaderAtForReader(readCloser)
+ if err != nil {
+ return nil, err
+ }
+ }
+ if err := storagearchive.Unzip(
+ ctx,
+ readerAt,
+ size,
+ readWriteBucket,
+ nil,
+ archiveRef.StripComponents(),
+ ); err != nil {
+ return nil, err
+ }
+ default:
+ return nil, fmt.Errorf("unknown ArchiveType: %v", archiveType)
+ }
+ terminateFileProvider, err := getTerminateFileProviderForBucket(ctx, readWriteBucket, subDirPath, terminateFileNames)
+ if err != nil {
+ return nil, err
+ }
+ var terminateFileDirectoryPath string
+ // Get the highest priority file found and use it as the terminate file directory path.
+ terminateFiles := terminateFileProvider.GetTerminateFiles()
+ if len(terminateFiles) != 0 {
+ terminateFileDirectoryPath = terminateFiles[0].Path()
+ }
+ if terminateFileDirectoryPath != "" {
+ relativeSubDirPath, err := normalpath.Rel(terminateFileDirectoryPath, subDirPath)
+ if err != nil {
+ return nil, err
+ }
+ readBucketCloser, err := newReadBucketCloser(
+ storage.NopReadBucketCloser(storage.MapReadBucket(readWriteBucket, storage.MapOnPrefix(terminateFileDirectoryPath))),
+ terminateFileDirectoryPath,
+ relativeSubDirPath,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newReadBucketCloserWithTerminateFiles(
+ readBucketCloser,
+ nil,
+ ), nil
+ }
+ var readBucket storage.ReadBucket = readWriteBucket
+ if subDirPath != "." {
+ readBucket = storage.MapReadBucket(readWriteBucket, storage.MapOnPrefix(subDirPath))
+ }
+ readBucketCloser, err := newReadBucketCloser(
+ storage.NopReadBucketCloser(readBucket),
+ "",
+ "",
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newReadBucketCloserWithTerminateFiles(
+ readBucketCloser,
+ nil,
+ ), nil
+}
+
+func (r *reader) getDirBucket(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ dirRef DirRef,
+ terminateFileNames [][]string,
+) (ReadBucketCloserWithTerminateFileProvider, error) {
+ if !r.localEnabled {
+ return nil, NewReadLocalDisabledError()
+ }
+ terminateFileProvider, err := getTerminateFileProviderForOS(dirRef.Path(), terminateFileNames)
+ if err != nil {
+ return nil, err
+ }
+ rootPath, dirRelativePath, err := r.getBucketRootPathAndRelativePath(ctx, container, dirRef.Path(), terminateFileProvider)
+ if err != nil {
+ return nil, err
+ }
+ readWriteBucket, err := r.storageosProvider.NewReadWriteBucket(
+ rootPath,
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return nil, err
+ }
+ if dirRelativePath != "" {
+ // Verify that the subDirPath exists too.
+ if _, err := r.storageosProvider.NewReadWriteBucket(
+ normalpath.Join(rootPath, dirRelativePath),
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ ); err != nil {
+ return nil, err
+ }
+ readWriteBucketCloser, err := newReadWriteBucketCloser(
+ storage.NopReadWriteBucketCloser(readWriteBucket),
+ rootPath,
+ dirRelativePath,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newReadBucketCloserWithTerminateFiles(
+ readWriteBucketCloser,
+ nil,
+ ), nil
+ }
+ readBucketCloser, err := newReadWriteBucketCloser(
+ storage.NopReadWriteBucketCloser(readWriteBucket),
+ "",
+ "",
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newReadBucketCloserWithTerminateFiles(
+ readBucketCloser,
+ nil,
+ ), nil
+}
+
+func (r *reader) getProtoFileBucket(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ protoFileRef ProtoFileRef,
+ terminateFileNames [][]string,
+) (ReadBucketCloserWithTerminateFileProvider, error) {
+ if !r.localEnabled {
+ return nil, NewReadLocalDisabledError()
+ }
+ terminateFileProvider, err := getTerminateFileProviderForOS(normalpath.Dir(protoFileRef.Path()), terminateFileNames)
+ if err != nil {
+ return nil, err
+ }
+ rootPath, _, err := r.getBucketRootPathAndRelativePath(ctx, container, normalpath.Dir(protoFileRef.Path()), terminateFileProvider)
+ if err != nil {
+ return nil, err
+ }
+ readWriteBucket, err := r.storageosProvider.NewReadWriteBucket(
+ rootPath,
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return nil, err
+ }
+ readWriteBucketCloser, err := newReadWriteBucketCloser(
+ storage.NopReadWriteBucketCloser(readWriteBucket),
+ rootPath,
+ "", // For ProtoFileRef, we default to using the working directory
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newReadBucketCloserWithTerminateFiles(
+ readWriteBucketCloser,
+ terminateFileProvider,
+ ), nil
+}
+
+// getBucketRootPathAndRelativePath is a helper function that returns the rootPath and relative
+// path if available for the readWriteBucket based on the dirRef and protoFileRef.
+func (r *reader) getBucketRootPathAndRelativePath(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ dirPath string,
+ terminateFileProvider TerminateFileProvider,
+) (string, string, error) {
+ // Set the terminateFile to the first terminateFilesPriorities result, since that's the highest
+ // priority file.
+ var terminateFileDirectoryAbsPath string
+ // Get the highest priority file found and use it as the terminate file directory path.
+ terminateFiles := terminateFileProvider.GetTerminateFiles()
+ if len(terminateFiles) != 0 {
+ terminateFileDirectoryAbsPath = terminateFiles[0].Path()
+ }
+ if terminateFileDirectoryAbsPath != "" {
+ // If the terminate file exists, we need to determine the relative path from the
+ // terminateFileDirectoryAbsPath to the target DirRef.Path.
+ wd, err := osextended.Getwd()
+ if err != nil {
+ return "", "", err
+ }
+ terminateFileRelativePath, err := normalpath.Rel(wd, terminateFileDirectoryAbsPath)
+ if err != nil {
+ return "", "", err
+ }
+ dirAbsPath, err := normalpath.NormalizeAndAbsolute(dirPath)
+ if err != nil {
+ return "", "", err
+ }
+ dirRelativePath, err := normalpath.Rel(terminateFileDirectoryAbsPath, dirAbsPath)
+ if err != nil {
+ return "", "", err
+ }
+ // It should be impossible for the dirRefRelativePath to be outside of the context
+ // diretory, but we validate just to make sure.
+ dirRelativePath, err = normalpath.NormalizeAndValidate(dirRelativePath)
+ if err != nil {
+ return "", "", err
+ }
+ rootPath := terminateFileRelativePath
+ if filepath.IsAbs(normalpath.Unnormalize(dirPath)) {
+ // If the input was provided as an absolute path,
+ // we preserve it by initializing the workspace
+ // bucket with an absolute path.
+ rootPath = terminateFileDirectoryAbsPath
+ }
+ return rootPath, dirRelativePath, nil
+ }
+ return dirPath, "", nil
+}
+
+func (r *reader) getGitBucket(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ gitRef GitRef,
+ terminateFileNames [][]string,
+) (_ ReadBucketCloserWithTerminateFileProvider, retErr error) {
+ if !r.gitEnabled {
+ return nil, NewReadGitDisabledError()
+ }
+ if r.gitCloner == nil {
+ return nil, errors.New("git cloner is nil")
+ }
+ subDirPath, err := normalpath.NormalizeAndValidate(gitRef.SubDirPath())
+ if err != nil {
+ return nil, err
+ }
+ gitURL, err := getGitURL(gitRef)
+ if err != nil {
+ return nil, err
+ }
+ readWriteBucket := storagemem.NewReadWriteBucket()
+ if err := r.gitCloner.CloneToBucket(
+ ctx,
+ container,
+ gitURL,
+ gitRef.Depth(),
+ readWriteBucket,
+ git.CloneToBucketOptions{
+ Name: gitRef.GitName(),
+ RecurseSubmodules: gitRef.RecurseSubmodules(),
+ },
+ ); err != nil {
+ return nil, fmt.Errorf("could not clone %s: %v", gitURL, err)
+ }
+ terminateFileProvider, err := getTerminateFileProviderForBucket(ctx, readWriteBucket, subDirPath, terminateFileNames)
+ if err != nil {
+ return nil, err
+ }
+ var terminateFileDirectoryPath string
+ // Get the highest priority file found and use it as the terminate file directory path.
+ terminateFiles := terminateFileProvider.GetTerminateFiles()
+ if len(terminateFiles) != 0 {
+ terminateFileDirectoryPath = terminateFiles[0].Path()
+ }
+ if terminateFileDirectoryPath != "" {
+ relativeSubDirPath, err := normalpath.Rel(terminateFileDirectoryPath, subDirPath)
+ if err != nil {
+ return nil, err
+ }
+ readBucketCloser, err := newReadBucketCloser(
+ storage.NopReadBucketCloser(storage.MapReadBucket(readWriteBucket, storage.MapOnPrefix(terminateFileDirectoryPath))),
+ terminateFileDirectoryPath,
+ relativeSubDirPath,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newReadBucketCloserWithTerminateFiles(
+ readBucketCloser,
+ nil,
+ ), nil
+ }
+ var readBucket storage.ReadBucket = readWriteBucket
+ if subDirPath != "." {
+ readBucket = storage.MapReadBucket(readBucket, storage.MapOnPrefix(subDirPath))
+ }
+ readBucketCloser, err := newReadBucketCloser(
+ storage.NopReadBucketCloser(readBucket),
+ "",
+ "",
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newReadBucketCloserWithTerminateFiles(
+ readBucketCloser,
+ nil,
+ ), nil
+}
+
+func (r *reader) getModule(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ moduleRef ModuleRef,
+) (bufmodule.Module, error) {
+ if !r.moduleEnabled {
+ return nil, NewReadModuleDisabledError()
+ }
+ if r.moduleReader == nil {
+ return nil, errors.New("module reader is nil")
+ }
+ if r.moduleResolver == nil {
+ return nil, errors.New("module resolver is nil")
+ }
+ modulePin, err := r.moduleResolver.GetModulePin(ctx, moduleRef.ModuleReference())
+ if err != nil {
+ return nil, err
+ }
+ return r.moduleReader.GetModule(ctx, modulePin)
+}
+
+func (r *reader) getFileReadCloserAndSize(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ fileRef FileRef,
+ keepFileCompression bool,
+) (_ io.ReadCloser, _ int64, retErr error) {
+ readCloser, size, err := r.getFileReadCloserAndSizePotentiallyCompressed(ctx, container, fileRef)
+ if err != nil {
+ return nil, -1, err
+ }
+ defer func() {
+ if retErr != nil {
+ retErr = multierr.Append(retErr, readCloser.Close())
+ }
+ }()
+ if keepFileCompression {
+ return readCloser, size, nil
+ }
+ switch compressionType := fileRef.CompressionType(); compressionType {
+ case CompressionTypeNone:
+ return readCloser, size, nil
+ case CompressionTypeGzip:
+ gzipReadCloser, err := pgzip.NewReader(readCloser)
+ if err != nil {
+ return nil, -1, err
+ }
+ return ioextended.CompositeReadCloser(
+ gzipReadCloser,
+ ioextended.ChainCloser(
+ gzipReadCloser,
+ readCloser,
+ ),
+ ), -1, nil
+ case CompressionTypeZstd:
+ zstdDecoder, err := zstd.NewReader(readCloser)
+ if err != nil {
+ return nil, -1, err
+ }
+ zstdReadCloser := zstdDecoder.IOReadCloser()
+ return ioextended.CompositeReadCloser(
+ zstdReadCloser,
+ ioextended.ChainCloser(
+ zstdReadCloser,
+ readCloser,
+ ),
+ ), -1, nil
+ default:
+ return nil, -1, fmt.Errorf("unknown CompressionType: %v", compressionType)
+ }
+}
+
+// returns -1 if size unknown
+func (r *reader) getFileReadCloserAndSizePotentiallyCompressed(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ fileRef FileRef,
+) (io.ReadCloser, int64, error) {
+ switch fileScheme := fileRef.FileScheme(); fileScheme {
+ case FileSchemeHTTP:
+ if !r.httpEnabled {
+ return nil, -1, NewReadHTTPDisabledError()
+ }
+ return r.getFileReadCloserAndSizePotentiallyCompressedHTTP(ctx, container, "http://"+fileRef.Path())
+ case FileSchemeHTTPS:
+ if !r.httpEnabled {
+ return nil, -1, NewReadHTTPDisabledError()
+ }
+ return r.getFileReadCloserAndSizePotentiallyCompressedHTTP(ctx, container, "https://"+fileRef.Path())
+ case FileSchemeLocal:
+ if !r.localEnabled {
+ return nil, -1, NewReadLocalDisabledError()
+ }
+ file, err := os.Open(fileRef.Path())
+ if err != nil {
+ return nil, -1, err
+ }
+ fileInfo, err := file.Stat()
+ if err != nil {
+ return nil, -1, err
+ }
+ return file, fileInfo.Size(), nil
+ case FileSchemeStdio, FileSchemeStdin:
+ if !r.stdioEnabled {
+ return nil, -1, NewReadStdioDisabledError()
+ }
+ return io.NopCloser(container.Stdin()), -1, nil
+ case FileSchemeStdout:
+ return nil, -1, errors.New("cannot read from stdout")
+ case FileSchemeNull:
+ return ioextended.DiscardReadCloser, 0, nil
+ default:
+ return nil, -1, fmt.Errorf("unknown FileScheme: %v", fileScheme)
+ }
+}
+
+// the httpPath must have the scheme attached
+func (r *reader) getFileReadCloserAndSizePotentiallyCompressedHTTP(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ httpPath string,
+) (io.ReadCloser, int64, error) {
+ if r.httpClient == nil {
+ return nil, 0, errors.New("http client is nil")
+ }
+ if r.httpAuthenticator == nil {
+ return nil, 0, errors.New("http authenticator is nil")
+ }
+ request, err := http.NewRequestWithContext(ctx, "GET", httpPath, nil)
+ if err != nil {
+ return nil, -1, err
+ }
+ if _, err := r.httpAuthenticator.SetAuth(container, request); err != nil {
+ return nil, -1, err
+ }
+ response, err := r.httpClient.Do(request)
+ if err != nil {
+ return nil, -1, err
+ }
+ if response.StatusCode != http.StatusOK {
+ err := fmt.Errorf("got HTTP status code %d", response.StatusCode)
+ if response.Body != nil {
+ return nil, -1, multierr.Append(err, response.Body.Close())
+ }
+ return nil, -1, err
+ }
+ // ContentLength is -1 if unknown, which is what we want
+ return response.Body, response.ContentLength, nil
+}
+
+func getGitURL(gitRef GitRef) (string, error) {
+ switch gitScheme := gitRef.GitScheme(); gitScheme {
+ case GitSchemeHTTP:
+ return "http://" + gitRef.Path(), nil
+ case GitSchemeHTTPS:
+ return "https://" + gitRef.Path(), nil
+ case GitSchemeSSH:
+ return "ssh://" + gitRef.Path(), nil
+ case GitSchemeGit:
+ return "git://" + gitRef.Path(), nil
+ case GitSchemeLocal:
+ absPath, err := filepath.Abs(normalpath.Unnormalize(gitRef.Path()))
+ if err != nil {
+ return "", err
+ }
+ return "file://" + absPath, nil
+ default:
+ return "", fmt.Errorf("unknown GitScheme: %v", gitScheme)
+ }
+}
+
+// getTerminateFileProviderForBucket returns the directory path that contains
+// one of the terminateFileNames, starting with the subDirPath and ascending until the root
+// of the bucket.
+func getTerminateFileProviderForBucket(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ subDirPath string,
+ terminateFileNames [][]string,
+) (TerminateFileProvider, error) {
+ terminateFiles := make([]TerminateFile, len(terminateFileNames))
+ if len(terminateFileNames) == 0 {
+ return newTerminateFileProvider(terminateFiles), nil
+ }
+ terminateFileDirectoryPath := normalpath.Normalize(subDirPath)
+ var foundFiles int
+ for {
+ foundTerminateFiles, err := terminateFilesInBucket(ctx, readBucket, terminateFileDirectoryPath, terminateFileNames)
+ if err != nil {
+ return nil, err
+ }
+ for i, terminateFile := range foundTerminateFiles {
+ // We only want to return the first file for a hiearchy, so if a file already exists
+ // for a layer of hierarchy, we do not check again.
+ if terminateFiles[i] == nil {
+ // If a file is found for a specific layer of hierarchy, we return the first file found
+ // for that hierarchy.
+ if terminateFile != nil {
+ terminateFiles[i] = terminateFile
+ foundFiles++
+ }
+ }
+ }
+ // If we have found a terminate file for each layer, we can return now.
+ if foundFiles == len(terminateFileNames) {
+ return newTerminateFileProvider(terminateFiles), nil
+ }
+ parent := normalpath.Dir(terminateFileDirectoryPath)
+ if parent == terminateFileDirectoryPath {
+ break
+ }
+ terminateFileDirectoryPath = parent
+ }
+ // The number of terminate files found is less than the number of layers of terminate files
+ // we are accepting, so we must prune the nil values from the initial instantiation of the slice.
+ var prunedTerminateFiles []TerminateFile
+ for _, terminateFile := range terminateFiles {
+ if terminateFile != nil {
+ prunedTerminateFiles = append(prunedTerminateFiles, terminateFile)
+ }
+ }
+ return newTerminateFileProvider(prunedTerminateFiles), nil
+}
+
+func terminateFilesInBucket(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ directoryPath string,
+ paths [][]string,
+) ([]TerminateFile, error) {
+ foundPaths := make([]TerminateFile, len(paths))
+ for i := range paths {
+ // We need to check for the existence of all the terminate files, so we ascend and prepend
+ // the current directory to determine the fully-qualified filepaths.
+ //
+ // For example:
+ // [][]string{
+ // ["buf.work.yaml", "buf.work"],
+ // ["buf.yaml", "buf.mod"],
+ // }
+ // ==>
+ //
+ // [][]string{
+ // ["/current/path/buf.work.yaml", "/current/path/buf.work"],
+ // ["/current/path/buf.yaml", "/current/path/buf.mod"],
+ // }
+ for _, path := range paths[i] {
+ path = normalpath.Join(directoryPath, path)
+ exists, err := storage.Exists(ctx, readBucket, path)
+ if err != nil {
+ return nil, err
+ }
+ if exists {
+ foundPaths[i] = newTerminateFile(normalpath.Base(path), normalpath.Dir(path))
+ // We want the first file found for each layer of hierarchy.
+ break
+ }
+ }
+ }
+ return foundPaths, nil
+}
+
+// getTerminateFileProviderForOS returns the directory that contains
+// the terminateFileName, starting with the subDirPath and ascending until
+// the root of the local filesystem.
+func getTerminateFileProviderForOS(
+ subDirPath string,
+ terminateFileNames [][]string,
+) (TerminateFileProvider, error) {
+ terminateFiles := make([]TerminateFile, len(terminateFileNames))
+ if len(terminateFileNames) == 0 {
+ return newTerminateFileProvider(terminateFiles), nil
+ }
+ fileInfo, err := os.Stat(normalpath.Unnormalize(subDirPath))
+ if err != nil {
+ if os.IsNotExist(err) {
+ return nil, storage.NewErrNotExist(subDirPath)
+ }
+ return nil, err
+ }
+ if !fileInfo.IsDir() {
+ return nil, normalpath.NewError(normalpath.Unnormalize(subDirPath), errors.New("not a directory"))
+ }
+ terminateFileDirectoryPath, err := normalpath.NormalizeAndAbsolute(subDirPath)
+ if err != nil {
+ return nil, err
+ }
+ var foundFiles int
+ for {
+ foundTerminateFiles, err := terminateFilesOnOS(terminateFileDirectoryPath, terminateFileNames)
+ if err != nil {
+ return nil, err
+ }
+ // More terminate files were found than layers of hierarchy, return an error. This path
+ // should be unreachable.
+ if len(foundTerminateFiles) > len(terminateFileNames) {
+ return nil, fmt.Errorf("more than one terminate file found per level of prioritization: %v", foundTerminateFiles)
+ }
+ for i, terminateFile := range foundTerminateFiles {
+ // We only want to return the first file for a hiearchy, so if a file already exists
+ // for a layer of hierarchy, we do not check again.
+ if terminateFiles[i] == nil {
+ // If a file is found for a specific layer of hierarchy, we return the first file found
+ // for that hierarchy.
+ if terminateFile != nil {
+ terminateFiles[i] = terminateFile
+ foundFiles++
+ }
+ }
+ }
+ // If we have found a terminate file for each layer, we can return now.
+ if foundFiles == len(terminateFileNames) {
+ return newTerminateFileProvider(terminateFiles), nil
+ }
+ parent := normalpath.Dir(terminateFileDirectoryPath)
+ if parent == terminateFileDirectoryPath {
+ break
+ }
+ terminateFileDirectoryPath = parent
+ }
+ // The number of terminate files found is less than the number of layers of terminate files
+ // we are accepting, so we must prune the nil values from the initial instantiation of the slice.
+ var prunedTerminateFiles []TerminateFile
+ for _, terminateFile := range terminateFiles {
+ if terminateFile != nil {
+ prunedTerminateFiles = append(prunedTerminateFiles, terminateFile)
+ }
+ }
+ return newTerminateFileProvider(prunedTerminateFiles), nil
+}
+
+func terminateFilesOnOS(directoryPath string, paths [][]string) ([]TerminateFile, error) {
+ foundPaths := make([]TerminateFile, len(paths))
+ for i := range paths {
+ // We need to check for the existence of all the terminate files, so we ascend and prepend
+ // the current directory to determine the fully-qualified filepaths.
+ //
+ // For example:
+ // [][]string{
+ // ["buf.work.yaml", "buf.work"],
+ // ["buf.yaml", "buf.mod"],
+ // }
+ // ==>
+ //
+ // [][]string{
+ // ["/current/path/buf.work.yaml", "/current/path/buf.work"],
+ // ["/current/path/buf.yaml", "/current/path/buf.mod"],
+ // }
+ for _, path := range paths[i] {
+ path = normalpath.Unnormalize(normalpath.Join(directoryPath, path))
+ fileInfo, err := os.Stat(path)
+ if err != nil && !os.IsNotExist(err) {
+ return nil, err
+ }
+ if fileInfo != nil && !fileInfo.IsDir() {
+ foundPaths[i] = newTerminateFile(normalpath.Base(path), normalpath.Dir(path))
+ // We want the first file found for each layer of hierarchy.
+ break
+ }
+ }
+ }
+ return foundPaths, nil
+}
+
+type getFileOptions struct {
+ keepFileCompression bool
+}
+
+func newGetFileOptions() *getFileOptions {
+ return &getFileOptions{}
+}
+
+type getBucketOptions struct {
+ terminateFileNames [][]string
+}
+
+func newGetBucketOptions() *getBucketOptions {
+ return &getBucketOptions{}
+}
+
+type getModuleOptions struct{}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/ref_parser.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/ref_parser.go
new file mode 100644
index 000000000..7e7e00501
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/ref_parser.go
@@ -0,0 +1,409 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "context"
+ "strconv"
+
+ "github.com/bufbuild/buf/private/buf/bufref"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/git"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "go.uber.org/zap"
+)
+
+type refParser struct {
+ logger *zap.Logger
+ rawRefProcessor func(*RawRef) error
+ singleFormatToInfo map[string]*singleFormatInfo
+ archiveFormatToInfo map[string]*archiveFormatInfo
+ dirFormatToInfo map[string]*dirFormatInfo
+ gitFormatToInfo map[string]*gitFormatInfo
+ moduleFormatToInfo map[string]*moduleFormatInfo
+ protoFileFormatToInfo map[string]*protoFileFormatInfo
+}
+
+func newRefParser(logger *zap.Logger, options ...RefParserOption) *refParser {
+ refParser := &refParser{
+ logger: logger,
+ singleFormatToInfo: make(map[string]*singleFormatInfo),
+ archiveFormatToInfo: make(map[string]*archiveFormatInfo),
+ dirFormatToInfo: make(map[string]*dirFormatInfo),
+ gitFormatToInfo: make(map[string]*gitFormatInfo),
+ moduleFormatToInfo: make(map[string]*moduleFormatInfo),
+ protoFileFormatToInfo: make(map[string]*protoFileFormatInfo),
+ }
+ for _, option := range options {
+ option(refParser)
+ }
+ return refParser
+}
+
+func (a *refParser) GetParsedRef(
+ ctx context.Context,
+ value string,
+ options ...GetParsedRefOption,
+) (ParsedRef, error) {
+ getParsedRefOptions := newGetParsedRefOptions()
+ for _, option := range options {
+ option(getParsedRefOptions)
+ }
+ return a.getParsedRef(ctx, value, getParsedRefOptions.allowedFormats)
+}
+
+func (a *refParser) getParsedRef(
+ ctx context.Context,
+ value string,
+ allowedFormats map[string]struct{},
+) (ParsedRef, error) {
+ rawRef, err := a.getRawRef(value)
+ if err != nil {
+ return nil, err
+ }
+ singleFormatInfo, singleOK := a.singleFormatToInfo[rawRef.Format]
+ archiveFormatInfo, archiveOK := a.archiveFormatToInfo[rawRef.Format]
+ _, dirOK := a.dirFormatToInfo[rawRef.Format]
+ _, gitOK := a.gitFormatToInfo[rawRef.Format]
+ _, moduleOK := a.moduleFormatToInfo[rawRef.Format]
+ _, protoFileOK := a.protoFileFormatToInfo[rawRef.Format]
+ if !(singleOK || archiveOK || dirOK || gitOK || moduleOK || protoFileOK) {
+ return nil, NewFormatUnknownError(rawRef.Format)
+ }
+ if len(allowedFormats) > 0 {
+ if _, ok := allowedFormats[rawRef.Format]; !ok {
+ return nil, NewFormatNotAllowedError(rawRef.Format, allowedFormats)
+ }
+ }
+ if singleOK {
+ return getSingleRef(rawRef, singleFormatInfo.defaultCompressionType)
+ }
+ if archiveOK {
+ return getArchiveRef(rawRef, archiveFormatInfo.archiveType, archiveFormatInfo.defaultCompressionType)
+ }
+ if protoFileOK {
+ return getProtoFileRef(rawRef), nil
+ }
+ if dirOK {
+ return getDirRef(rawRef)
+ }
+ if gitOK {
+ return getGitRef(rawRef)
+ }
+ if moduleOK {
+ return getModuleRef(rawRef)
+ }
+ return nil, NewFormatUnknownError(rawRef.Format)
+}
+
+// validated per rules on rawRef
+func (a *refParser) getRawRef(value string) (*RawRef, error) {
+ // path is never empty after returning from this function
+ path, options, err := bufref.GetRawPathAndOptions(value)
+ if err != nil {
+ return nil, err
+ }
+ rawRef := &RawRef{
+ Path: path,
+ }
+ if a.rawRefProcessor != nil {
+ if err := a.rawRefProcessor(rawRef); err != nil {
+ return nil, err
+ }
+ }
+ for key, value := range options {
+ switch key {
+ case "format":
+ if app.IsDevNull(path) {
+ return nil, NewFormatOverrideNotAllowedForDevNullError(app.DevNullFilePath)
+ }
+ rawRef.Format = value
+ case "compression":
+ switch value {
+ case "none":
+ rawRef.CompressionType = CompressionTypeNone
+ case "gzip":
+ rawRef.CompressionType = CompressionTypeGzip
+ case "zstd":
+ rawRef.CompressionType = CompressionTypeZstd
+ default:
+ return nil, NewCompressionUnknownError(value)
+ }
+ case "branch":
+ if rawRef.GitBranch != "" || rawRef.GitTag != "" {
+ return nil, NewCannotSpecifyGitBranchAndTagError()
+ }
+ rawRef.GitBranch = value
+ case "tag":
+ if rawRef.GitBranch != "" || rawRef.GitTag != "" {
+ return nil, NewCannotSpecifyGitBranchAndTagError()
+ }
+ rawRef.GitTag = value
+ case "ref":
+ rawRef.GitRef = value
+ case "depth":
+ depth, err := strconv.ParseUint(value, 10, 32)
+ if err != nil {
+ return nil, NewDepthParseError(value)
+ }
+ if depth == 0 {
+ return nil, NewDepthZeroError()
+ }
+ rawRef.GitDepth = uint32(depth)
+ case "recurse_submodules":
+ // TODO: need to refactor to make sure this is not set for any non-git input
+ // ie right now recurse_submodules=false will not error
+ switch value {
+ case "true":
+ rawRef.GitRecurseSubmodules = true
+ case "false":
+ default:
+ return nil, NewOptionsCouldNotParseRecurseSubmodulesError(value)
+ }
+ case "strip_components":
+ // TODO: need to refactor to make sure this is not set for any non-tarball
+ // ie right now strip_components=0 will not error
+ stripComponents, err := strconv.ParseUint(value, 10, 32)
+ if err != nil {
+ return nil, NewOptionsCouldNotParseStripComponentsError(value)
+ }
+ rawRef.ArchiveStripComponents = uint32(stripComponents)
+ case "subdir":
+ subDirPath, err := normalpath.NormalizeAndValidate(value)
+ if err != nil {
+ return nil, err
+ }
+ if subDirPath != "." {
+ rawRef.SubDirPath = subDirPath
+ }
+ case "include_package_files":
+ switch value {
+ case "true":
+ rawRef.IncludePackageFiles = true
+ case "false", "":
+ rawRef.IncludePackageFiles = false
+ default:
+ return nil, NewOptionsInvalidKeyError(key)
+ }
+ default:
+ return nil, NewOptionsInvalidKeyError(key)
+ }
+ }
+
+ if rawRef.Format == "" {
+ return nil, NewFormatCannotBeDeterminedError(value)
+ }
+
+ _, gitOK := a.gitFormatToInfo[rawRef.Format]
+ archiveFormatInfo, archiveOK := a.archiveFormatToInfo[rawRef.Format]
+ _, singleOK := a.singleFormatToInfo[rawRef.Format]
+ if gitOK {
+ if rawRef.GitRef != "" && rawRef.GitTag != "" {
+ return nil, NewCannotSpecifyTagWithRefError()
+ }
+ if rawRef.GitDepth == 0 {
+ // Default to 1
+ rawRef.GitDepth = 1
+ if rawRef.GitRef != "" {
+ // Default to 50 when using ref
+ rawRef.GitDepth = 50
+ }
+ }
+ } else {
+ if rawRef.GitBranch != "" || rawRef.GitTag != "" || rawRef.GitRef != "" || rawRef.GitRecurseSubmodules || rawRef.GitDepth > 0 {
+ return nil, NewOptionsInvalidForFormatError(rawRef.Format, value)
+ }
+ }
+ // not an archive format
+ if !archiveOK {
+ if rawRef.ArchiveStripComponents > 0 {
+ return nil, NewOptionsInvalidForFormatError(rawRef.Format, value)
+ }
+ } else {
+ if archiveFormatInfo.archiveType == ArchiveTypeZip && rawRef.CompressionType != 0 {
+ return nil, NewCannotSpecifyCompressionForZipError()
+ }
+ }
+ if !singleOK && !archiveOK {
+ if rawRef.CompressionType != 0 {
+ return nil, NewOptionsInvalidForFormatError(rawRef.Format, value)
+ }
+ }
+ if !archiveOK && !gitOK {
+ if rawRef.SubDirPath != "" {
+ return nil, NewOptionsInvalidForFormatError(rawRef.Format, value)
+ }
+ }
+ return rawRef, nil
+}
+
+func getSingleRef(
+ rawRef *RawRef,
+ defaultCompressionType CompressionType,
+) (ParsedSingleRef, error) {
+ compressionType := rawRef.CompressionType
+ if compressionType == 0 {
+ compressionType = defaultCompressionType
+ }
+ return newSingleRef(
+ rawRef.Format,
+ rawRef.Path,
+ compressionType,
+ )
+}
+
+func getArchiveRef(
+ rawRef *RawRef,
+ archiveType ArchiveType,
+ defaultCompressionType CompressionType,
+) (ParsedArchiveRef, error) {
+ compressionType := rawRef.CompressionType
+ if compressionType == 0 {
+ compressionType = defaultCompressionType
+ }
+ return newArchiveRef(
+ rawRef.Format,
+ rawRef.Path,
+ archiveType,
+ compressionType,
+ rawRef.ArchiveStripComponents,
+ rawRef.SubDirPath,
+ )
+}
+
+func getDirRef(
+ rawRef *RawRef,
+) (ParsedDirRef, error) {
+ return newDirRef(
+ rawRef.Format,
+ rawRef.Path,
+ )
+}
+
+func getGitRef(
+ rawRef *RawRef,
+) (ParsedGitRef, error) {
+ gitRefName, err := getGitRefName(rawRef.Path, rawRef.GitBranch, rawRef.GitTag, rawRef.GitRef)
+ if err != nil {
+ return nil, err
+ }
+ return newGitRef(
+ rawRef.Format,
+ rawRef.Path,
+ gitRefName,
+ rawRef.GitDepth,
+ rawRef.GitRecurseSubmodules,
+ rawRef.SubDirPath,
+ )
+}
+
+func getModuleRef(
+ rawRef *RawRef,
+) (ParsedModuleRef, error) {
+ return newModuleRef(
+ rawRef.Format,
+ rawRef.Path,
+ )
+}
+
+func getGitRefName(path string, branch string, tag string, ref string) (git.Name, error) {
+ if branch == "" && tag == "" && ref == "" {
+ return nil, nil
+ }
+ if branch != "" && tag != "" {
+ // already did this in getRawRef but just in case
+ return nil, NewCannotSpecifyGitBranchAndTagError()
+ }
+ if ref != "" && tag != "" {
+ // already did this in getRawRef but just in case
+ return nil, NewCannotSpecifyTagWithRefError()
+ }
+ if ref != "" && branch != "" {
+ return git.NewRefNameWithBranch(ref, branch), nil
+ }
+ if ref != "" {
+ return git.NewRefName(ref), nil
+ }
+ if branch != "" {
+ return git.NewBranchName(branch), nil
+ }
+ return git.NewTagName(tag), nil
+}
+
+func getProtoFileRef(rawRef *RawRef) ParsedProtoFileRef {
+ return newProtoFileRef(
+ rawRef.Format,
+ rawRef.Path,
+ rawRef.IncludePackageFiles,
+ )
+}
+
+// options
+
+type singleFormatInfo struct {
+ defaultCompressionType CompressionType
+}
+
+func newSingleFormatInfo() *singleFormatInfo {
+ return &singleFormatInfo{
+ defaultCompressionType: CompressionTypeNone,
+ }
+}
+
+type archiveFormatInfo struct {
+ archiveType ArchiveType
+ defaultCompressionType CompressionType
+}
+
+func newArchiveFormatInfo(archiveType ArchiveType) *archiveFormatInfo {
+ return &archiveFormatInfo{
+ archiveType: archiveType,
+ defaultCompressionType: CompressionTypeNone,
+ }
+}
+
+type dirFormatInfo struct{}
+
+func newDirFormatInfo() *dirFormatInfo {
+ return &dirFormatInfo{}
+}
+
+type gitFormatInfo struct{}
+
+func newGitFormatInfo() *gitFormatInfo {
+ return &gitFormatInfo{}
+}
+
+type moduleFormatInfo struct{}
+
+func newModuleFormatInfo() *moduleFormatInfo {
+ return &moduleFormatInfo{}
+}
+
+type getParsedRefOptions struct {
+ allowedFormats map[string]struct{}
+}
+
+type protoFileFormatInfo struct{}
+
+func newProtoFileFormatInfo() *protoFileFormatInfo {
+ return &protoFileFormatInfo{}
+}
+
+func newGetParsedRefOptions() *getParsedRefOptions {
+ return &getParsedRefOptions{
+ allowedFormats: make(map[string]struct{}),
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/single_ref.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/single_ref.go
new file mode 100644
index 000000000..dec60103d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/single_ref.go
@@ -0,0 +1,144 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+var (
+ _ ParsedSingleRef = &singleRef{}
+
+ fileSchemePrefixToFileScheme = map[string]FileScheme{
+ "http://": FileSchemeHTTP,
+ "https://": FileSchemeHTTPS,
+ "file://": FileSchemeLocal,
+ }
+)
+
+type singleRef struct {
+ format string
+ path string
+ fileScheme FileScheme
+ compressionType CompressionType
+}
+
+func newSingleRef(
+ format string,
+ path string,
+ compressionType CompressionType,
+) (*singleRef, error) {
+ if path == "" {
+ return nil, NewNoPathError()
+ }
+ if app.IsDevStderr(path) {
+ return nil, NewInvalidPathError(format, path)
+ }
+ if path == "-" {
+ return newDirectSingleRef(
+ format,
+ "",
+ FileSchemeStdio,
+ compressionType,
+ ), nil
+ }
+ if app.IsDevStdin(path) {
+ return newDirectSingleRef(
+ format,
+ "",
+ FileSchemeStdin,
+ compressionType,
+ ), nil
+ }
+ if app.IsDevStdout(path) {
+ return newDirectSingleRef(
+ format,
+ "",
+ FileSchemeStdout,
+ compressionType,
+ ), nil
+ }
+ if app.IsDevNull(path) {
+ return newDirectSingleRef(
+ format,
+ "",
+ FileSchemeNull,
+ compressionType,
+ ), nil
+ }
+ for prefix, fileScheme := range fileSchemePrefixToFileScheme {
+ if strings.HasPrefix(path, prefix) {
+ path = strings.TrimPrefix(path, prefix)
+ if fileScheme == FileSchemeLocal {
+ path = normalpath.Normalize(path)
+ }
+ if path == "" {
+ return nil, NewNoPathError()
+ }
+ return newDirectSingleRef(
+ format,
+ path,
+ fileScheme,
+ compressionType,
+ ), nil
+ }
+ }
+ if strings.Contains(path, "://") {
+ return nil, NewInvalidPathError(format, path)
+ }
+ return newDirectSingleRef(
+ format,
+ normalpath.Normalize(path),
+ FileSchemeLocal,
+ compressionType,
+ ), nil
+}
+
+func newDirectSingleRef(
+ format string,
+ path string,
+ fileScheme FileScheme,
+ compressionType CompressionType,
+) *singleRef {
+ return &singleRef{
+ format: format,
+ path: path,
+ fileScheme: fileScheme,
+ compressionType: compressionType,
+ }
+}
+
+func (r *singleRef) Format() string {
+ return r.format
+}
+
+func (r *singleRef) Path() string {
+ return r.path
+}
+
+func (r *singleRef) FileScheme() FileScheme {
+ return r.fileScheme
+}
+
+func (r *singleRef) CompressionType() CompressionType {
+ return r.compressionType
+}
+
+func (*singleRef) ref() {}
+func (*singleRef) fileRef() {}
+func (*singleRef) singleRef() {}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/terminate_file.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/terminate_file.go
new file mode 100644
index 000000000..f21b422a2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/terminate_file.go
@@ -0,0 +1,39 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+var _ TerminateFile = &terminateFile{}
+
+type terminateFile struct {
+ name string
+ path string
+}
+
+func newTerminateFile(name string, path string) TerminateFile {
+ return &terminateFile{
+ name: name,
+ path: path,
+ }
+}
+
+// Name returns the name of the TerminateFile (i.e. the base of the fully-qualified file paths).
+func (t *terminateFile) Name() string {
+ return t.name
+}
+
+// Path returns the normalized directory path where the TemrinateFile is located.
+func (t *terminateFile) Path() string {
+ return t.path
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/terminate_file_provider.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/terminate_file_provider.go
new file mode 100644
index 000000000..7b3f50fcd
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/terminate_file_provider.go
@@ -0,0 +1,32 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+var _ TerminateFileProvider = &terminateFileProvider{}
+
+type terminateFileProvider struct {
+ terminateFiles []TerminateFile
+}
+
+func newTerminateFileProvider(terminateFiles []TerminateFile) TerminateFileProvider {
+ return &terminateFileProvider{
+ terminateFiles: terminateFiles,
+ }
+}
+
+// GetTerminateFiles returns the terminate files found.
+func (t *terminateFileProvider) GetTerminateFiles() []TerminateFile {
+ return t.terminateFiles
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/usage.gen.go
new file mode 100644
index 000000000..edcedfbef
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package internal
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/util.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/util.go
new file mode 100644
index 000000000..8be6e1945
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/util.go
@@ -0,0 +1,36 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "sort"
+ "strings"
+)
+
+func normalizeFormat(format string) string {
+ return strings.ToLower(strings.TrimSpace(format))
+}
+
+func formatsToString(formats map[string]struct{}) string {
+ if len(formats) == 0 {
+ return "[]"
+ }
+ s := make([]string, 0, len(formats))
+ for format := range formats {
+ s = append(s, format)
+ }
+ sort.Strings(s)
+ return "[" + strings.Join(s, ",") + "]"
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/writer.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/writer.go
new file mode 100644
index 000000000..88daf95c7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/internal/writer.go
@@ -0,0 +1,190 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "compress/gzip"
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "os"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/ioextended"
+ "github.com/klauspost/compress/zstd"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+type writer struct {
+ logger *zap.Logger
+
+ // never set for now (no corresponding option)
+ httpEnabled bool
+ localEnabled bool
+ stdioEnabled bool
+}
+
+func newWriter(
+ logger *zap.Logger,
+ options ...WriterOption,
+) *writer {
+ writer := &writer{
+ logger: logger,
+ }
+ for _, option := range options {
+ option(writer)
+ }
+ return writer
+}
+
+func (w *writer) PutFile(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ fileRef FileRef,
+ options ...PutFileOption,
+) (io.WriteCloser, error) {
+ putFileOptions := newPutFileOptions()
+ for _, option := range options {
+ option(putFileOptions)
+ }
+ switch t := fileRef.(type) {
+ case SingleRef:
+ return w.putSingle(
+ ctx,
+ container,
+ t,
+ putFileOptions.noFileCompression,
+ )
+ case ArchiveRef:
+ return w.putArchiveFile(
+ ctx,
+ container,
+ t,
+ putFileOptions.noFileCompression,
+ )
+ default:
+ return nil, fmt.Errorf("unknown FileRef type: %T", fileRef)
+ }
+}
+
+func (w *writer) putSingle(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ singleRef SingleRef,
+ noFileCompression bool,
+) (io.WriteCloser, error) {
+ return w.putFileWriteCloser(ctx, container, singleRef, noFileCompression)
+}
+
+func (w *writer) putArchiveFile(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ archiveRef ArchiveRef,
+ noFileCompression bool,
+) (io.WriteCloser, error) {
+ return w.putFileWriteCloser(ctx, container, archiveRef, noFileCompression)
+}
+
+func (w *writer) putFileWriteCloser(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ fileRef FileRef,
+ noFileCompression bool,
+) (_ io.WriteCloser, retErr error) {
+ writeCloser, err := w.putFileWriteCloserPotentiallyUncompressed(ctx, container, fileRef)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ if retErr != nil {
+ retErr = multierr.Append(retErr, writeCloser.Close())
+ }
+ }()
+ if noFileCompression {
+ return writeCloser, nil
+ }
+ switch compressionType := fileRef.CompressionType(); compressionType {
+ case CompressionTypeNone:
+ return writeCloser, nil
+ case CompressionTypeGzip:
+ gzipWriteCloser := gzip.NewWriter(writeCloser)
+ return ioextended.CompositeWriteCloser(
+ gzipWriteCloser,
+ ioextended.ChainCloser(
+ gzipWriteCloser,
+ writeCloser,
+ ),
+ ), nil
+ case CompressionTypeZstd:
+ zstdWriteCloser, err := zstd.NewWriter(writeCloser)
+ if err != nil {
+ return nil, err
+ }
+ return ioextended.CompositeWriteCloser(
+ zstdWriteCloser,
+ ioextended.ChainCloser(
+ zstdWriteCloser,
+ writeCloser,
+ ),
+ ), nil
+ default:
+ return nil, fmt.Errorf("unknown CompressionType: %v", compressionType)
+ }
+}
+
+func (w *writer) putFileWriteCloserPotentiallyUncompressed(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ fileRef FileRef,
+) (io.WriteCloser, error) {
+ switch fileScheme := fileRef.FileScheme(); fileScheme {
+ case FileSchemeHTTP:
+ if !w.httpEnabled {
+ return nil, NewWriteHTTPDisabledError()
+ }
+ return nil, fmt.Errorf("http not supported for writes: %v", fileRef.Path())
+ case FileSchemeHTTPS:
+ if !w.httpEnabled {
+ return nil, NewWriteHTTPDisabledError()
+ }
+ return nil, fmt.Errorf("https not supported for writes: %v", fileRef.Path())
+ case FileSchemeLocal:
+ if !w.localEnabled {
+ return nil, NewWriteLocalDisabledError()
+ }
+ return os.Create(fileRef.Path())
+ case FileSchemeStdio, FileSchemeStdout:
+ if !w.stdioEnabled {
+ return nil, NewWriteStdioDisabledError()
+ }
+ return ioextended.NopWriteCloser(container.Stdout()), nil
+ case FileSchemeStdin:
+ return nil, errors.New("cannot write to stdin")
+ case FileSchemeNull:
+ return ioextended.DiscardWriteCloser, nil
+ default:
+ return nil, fmt.Errorf("unknown FileScheme: %v", fileScheme)
+ }
+}
+
+type putFileOptions struct {
+ noFileCompression bool
+}
+
+func newPutFileOptions() *putFileOptions {
+ return &putFileOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/module_ref.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/module_ref.go
new file mode 100644
index 000000000..baa7e1dad
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/module_ref.go
@@ -0,0 +1,46 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buffetch
+
+import (
+ "github.com/bufbuild/buf/private/buf/buffetch/internal"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+var _ ModuleRef = &moduleRef{}
+
+type moduleRef struct {
+ iModuleRef internal.ModuleRef
+}
+
+func newModuleRef(iModuleRef internal.ModuleRef) *moduleRef {
+ return &moduleRef{
+ iModuleRef: iModuleRef,
+ }
+}
+
+func (r *moduleRef) PathForExternalPath(externalPath string) (string, error) {
+ return normalpath.NormalizeAndValidate(externalPath)
+}
+
+func (r *moduleRef) internalRef() internal.Ref {
+ return r.iModuleRef
+}
+
+func (r *moduleRef) internalModuleRef() internal.ModuleRef {
+ return r.iModuleRef
+}
+
+func (*moduleRef) isSourceOrModuleRef() {}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/proto_file_ref.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/proto_file_ref.go
new file mode 100644
index 000000000..ce300ff61
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/proto_file_ref.go
@@ -0,0 +1,72 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buffetch
+
+import (
+ "fmt"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/buf/buffetch/internal"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+var _ ProtoFileRef = &protoFileRef{}
+
+type protoFileRef struct {
+ protoFileRef internal.ProtoFileRef
+}
+
+func newProtoFileRef(internalProtoFileRef internal.ProtoFileRef) *protoFileRef {
+ return &protoFileRef{
+ protoFileRef: internalProtoFileRef,
+ }
+}
+
+// PathForExternalPath for a proto file ref will only ever have one successful case, which
+// is `".", ` and will error on all other paths. The `Path()` of the internal.ProtoFileRef
+// will always point to a specific proto file, e.g. `foo/bar/baz.proto`, thus the function
+// errors against inputs that are not matching to the proto file ref input.
+func (r *protoFileRef) PathForExternalPath(externalPath string) (string, error) {
+ externalPathAbs, err := filepath.Abs(normalpath.Unnormalize(externalPath))
+ if err != nil {
+ return "", err
+ }
+ internalRefPathAbs, err := filepath.Abs(normalpath.Unnormalize(r.protoFileRef.Path()))
+ if err != nil {
+ return "", err
+ }
+ if externalPathAbs != internalRefPathAbs {
+ return "", fmt.Errorf(`path provided "%s" does not match ref path "%s"`, externalPath, r.protoFileRef.Path())
+ }
+ return ".", nil
+}
+
+func (r *protoFileRef) IncludePackageFiles() bool {
+ return r.protoFileRef.IncludePackageFiles()
+}
+
+func (r *protoFileRef) internalRef() internal.Ref {
+ return r.protoFileRef
+}
+
+func (r *protoFileRef) internalBucketRef() internal.BucketRef {
+ return r.protoFileRef
+}
+
+func (r *protoFileRef) internalProtoFileRef() internal.ProtoFileRef {
+ return r.protoFileRef
+}
+
+func (*protoFileRef) isSourceOrModuleRef() {}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/reader.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/reader.go
new file mode 100644
index 000000000..c18976bc9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/reader.go
@@ -0,0 +1,169 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buffetch
+
+import (
+ "context"
+ "io"
+ "net/http"
+
+ "github.com/bufbuild/buf/private/buf/buffetch/internal"
+ "github.com/bufbuild/buf/private/buf/bufwork"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/git"
+ "github.com/bufbuild/buf/private/pkg/httpauth"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+)
+
+type reader struct {
+ internalReader internal.Reader
+}
+
+func newReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ httpClient *http.Client,
+ httpAuthenticator httpauth.Authenticator,
+ gitCloner git.Cloner,
+ moduleResolver bufmodule.ModuleResolver,
+ moduleReader bufmodule.ModuleReader,
+) *reader {
+ return &reader{
+ internalReader: internal.NewReader(
+ logger,
+ storageosProvider,
+ internal.WithReaderHTTP(
+ httpClient,
+ httpAuthenticator,
+ ),
+ internal.WithReaderGit(
+ gitCloner,
+ ),
+ internal.WithReaderLocal(),
+ internal.WithReaderStdio(),
+ internal.WithReaderModule(
+ moduleResolver,
+ moduleReader,
+ ),
+ ),
+ }
+}
+
+func newImageReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ httpClient *http.Client,
+ httpAuthenticator httpauth.Authenticator,
+ gitCloner git.Cloner,
+) *reader {
+ return &reader{
+ internalReader: internal.NewReader(
+ logger,
+ storageosProvider,
+ internal.WithReaderHTTP(
+ httpClient,
+ httpAuthenticator,
+ ),
+ internal.WithReaderLocal(),
+ internal.WithReaderStdio(),
+ ),
+ }
+}
+
+func newSourceReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ httpClient *http.Client,
+ httpAuthenticator httpauth.Authenticator,
+ gitCloner git.Cloner,
+) *reader {
+ return &reader{
+ internalReader: internal.NewReader(
+ logger,
+ storageosProvider,
+ internal.WithReaderHTTP(
+ httpClient,
+ httpAuthenticator,
+ ),
+ internal.WithReaderGit(
+ gitCloner,
+ ),
+ internal.WithReaderLocal(),
+ internal.WithReaderStdio(),
+ ),
+ }
+}
+
+func newModuleFetcher(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ moduleResolver bufmodule.ModuleResolver,
+ moduleReader bufmodule.ModuleReader,
+) *reader {
+ return &reader{
+ internalReader: internal.NewReader(
+ logger,
+ storageosProvider,
+ internal.WithReaderModule(
+ moduleResolver,
+ moduleReader,
+ ),
+ ),
+ }
+}
+
+func (a *reader) GetImageFile(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ imageRef ImageRef,
+) (io.ReadCloser, error) {
+ return a.internalReader.GetFile(ctx, container, imageRef.internalFileRef())
+}
+
+func (a *reader) GetSourceBucket(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ sourceRef SourceRef,
+ options ...GetSourceBucketOption,
+) (ReadBucketCloserWithTerminateFileProvider, error) {
+ getSourceBucketOptions := &getSourceBucketOptions{}
+ for _, option := range options {
+ option(getSourceBucketOptions)
+ }
+ var getBucketOptions []internal.GetBucketOption
+ if !getSourceBucketOptions.workspacesDisabled {
+ getBucketOptions = append(
+ getBucketOptions,
+ internal.WithGetBucketTerminateFileNames([][]string{bufwork.AllConfigFilePaths, bufconfig.AllConfigFilePaths}),
+ )
+ }
+ return a.internalReader.GetBucket(
+ ctx,
+ container,
+ sourceRef.internalBucketRef(),
+ getBucketOptions...,
+ )
+}
+
+func (a *reader) GetModule(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ moduleRef ModuleRef,
+) (bufmodule.Module, error) {
+ return a.internalReader.GetModule(ctx, container, moduleRef.internalModuleRef())
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/ref_parser.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/ref_parser.go
new file mode 100644
index 000000000..71d44815d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/ref_parser.go
@@ -0,0 +1,557 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buffetch
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/buffetch/internal"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "go.opencensus.io/trace"
+ "go.uber.org/zap"
+)
+
+type refParser struct {
+ allowProtoFileRef bool
+ logger *zap.Logger
+ fetchRefParser internal.RefParser
+}
+
+func newRefParser(logger *zap.Logger, options ...RefParserOption) *refParser {
+ refParser := &refParser{}
+ for _, option := range options {
+ option(refParser)
+ }
+ fetchRefParserOptions := []internal.RefParserOption{
+ internal.WithRawRefProcessor(newRawRefProcessor(refParser.allowProtoFileRef)),
+ internal.WithSingleFormat(formatBin),
+ internal.WithSingleFormat(formatJSON),
+ internal.WithSingleFormat(
+ formatBingz,
+ internal.WithSingleDefaultCompressionType(
+ internal.CompressionTypeGzip,
+ ),
+ ),
+ internal.WithSingleFormat(
+ formatJSONGZ,
+ internal.WithSingleDefaultCompressionType(
+ internal.CompressionTypeGzip,
+ ),
+ ),
+ internal.WithArchiveFormat(
+ formatTar,
+ internal.ArchiveTypeTar,
+ ),
+ internal.WithArchiveFormat(
+ formatTargz,
+ internal.ArchiveTypeTar,
+ internal.WithArchiveDefaultCompressionType(
+ internal.CompressionTypeGzip,
+ ),
+ ),
+ internal.WithArchiveFormat(
+ formatZip,
+ internal.ArchiveTypeZip,
+ ),
+ internal.WithGitFormat(formatGit),
+ internal.WithDirFormat(formatDir),
+ internal.WithModuleFormat(formatMod),
+ }
+ if refParser.allowProtoFileRef {
+ fetchRefParserOptions = append(fetchRefParserOptions, internal.WithProtoFileFormat(formatProtoFile))
+ }
+ refParser.logger = logger.Named("buffetch")
+ refParser.fetchRefParser = internal.NewRefParser(
+ logger,
+ fetchRefParserOptions...,
+ )
+ return refParser
+}
+
+func newImageRefParser(logger *zap.Logger) *refParser {
+ return &refParser{
+ logger: logger.Named("buffetch"),
+ fetchRefParser: internal.NewRefParser(
+ logger,
+ internal.WithRawRefProcessor(processRawRefImage),
+ internal.WithSingleFormat(formatBin),
+ internal.WithSingleFormat(formatJSON),
+ internal.WithSingleFormat(
+ formatBingz,
+ internal.WithSingleDefaultCompressionType(
+ internal.CompressionTypeGzip,
+ ),
+ ),
+ internal.WithSingleFormat(
+ formatJSONGZ,
+ internal.WithSingleDefaultCompressionType(
+ internal.CompressionTypeGzip,
+ ),
+ ),
+ ),
+ }
+}
+
+func newSourceRefParser(logger *zap.Logger) *refParser {
+ return &refParser{
+ logger: logger.Named("buffetch"),
+ fetchRefParser: internal.NewRefParser(
+ logger,
+ internal.WithRawRefProcessor(processRawRefSource),
+ internal.WithArchiveFormat(
+ formatTar,
+ internal.ArchiveTypeTar,
+ ),
+ internal.WithArchiveFormat(
+ formatTargz,
+ internal.ArchiveTypeTar,
+ internal.WithArchiveDefaultCompressionType(
+ internal.CompressionTypeGzip,
+ ),
+ ),
+ internal.WithArchiveFormat(
+ formatZip,
+ internal.ArchiveTypeZip,
+ ),
+ internal.WithGitFormat(formatGit),
+ internal.WithDirFormat(formatDir),
+ ),
+ }
+}
+
+func newModuleRefParser(logger *zap.Logger) *refParser {
+ return &refParser{
+ logger: logger.Named("buffetch"),
+ fetchRefParser: internal.NewRefParser(
+ logger,
+ internal.WithRawRefProcessor(processRawRefModule),
+ internal.WithModuleFormat(formatMod),
+ ),
+ }
+}
+
+func newSourceOrModuleRefParser(logger *zap.Logger) *refParser {
+ return &refParser{
+ logger: logger.Named("buffetch"),
+ fetchRefParser: internal.NewRefParser(
+ logger,
+ internal.WithRawRefProcessor(processRawRefSourceOrModule),
+ internal.WithArchiveFormat(
+ formatTar,
+ internal.ArchiveTypeTar,
+ ),
+ internal.WithArchiveFormat(
+ formatTargz,
+ internal.ArchiveTypeTar,
+ internal.WithArchiveDefaultCompressionType(
+ internal.CompressionTypeGzip,
+ ),
+ ),
+ internal.WithArchiveFormat(
+ formatZip,
+ internal.ArchiveTypeZip,
+ ),
+ internal.WithGitFormat(formatGit),
+ internal.WithDirFormat(formatDir),
+ internal.WithModuleFormat(formatMod),
+ ),
+ }
+}
+
+func (a *refParser) GetRef(
+ ctx context.Context,
+ value string,
+) (Ref, error) {
+ ctx, span := trace.StartSpan(ctx, "get_ref")
+ defer span.End()
+ parsedRef, err := a.getParsedRef(ctx, value, allFormats)
+ if err != nil {
+ return nil, err
+ }
+ switch t := parsedRef.(type) {
+ case internal.ParsedSingleRef:
+ imageEncoding, err := parseImageEncoding(t.Format())
+ if err != nil {
+ return nil, err
+ }
+ return newImageRef(t, imageEncoding), nil
+ case internal.ParsedArchiveRef:
+ return newSourceRef(t), nil
+ case internal.ParsedDirRef:
+ return newSourceRef(t), nil
+ case internal.ParsedGitRef:
+ return newSourceRef(t), nil
+ case internal.ParsedModuleRef:
+ return newModuleRef(t), nil
+ case internal.ProtoFileRef:
+ return newProtoFileRef(t), nil
+ default:
+ return nil, fmt.Errorf("unknown ParsedRef type: %T", parsedRef)
+ }
+}
+
+func (a *refParser) GetSourceOrModuleRef(
+ ctx context.Context,
+ value string,
+) (SourceOrModuleRef, error) {
+ ctx, span := trace.StartSpan(ctx, "get_source_or_module_ref")
+ defer span.End()
+ parsedRef, err := a.getParsedRef(ctx, value, sourceOrModuleFormats)
+ if err != nil {
+ return nil, err
+ }
+ switch t := parsedRef.(type) {
+ case internal.ParsedSingleRef:
+ // this should never happen
+ return nil, fmt.Errorf("invalid ParsedRef type for source or module: %T", parsedRef)
+ case internal.ParsedArchiveRef:
+ return newSourceRef(t), nil
+ case internal.ParsedDirRef:
+ return newSourceRef(t), nil
+ case internal.ParsedGitRef:
+ return newSourceRef(t), nil
+ case internal.ParsedModuleRef:
+ return newModuleRef(t), nil
+ case internal.ProtoFileRef:
+ return newProtoFileRef(t), nil
+ default:
+ return nil, fmt.Errorf("unknown ParsedRef type: %T", parsedRef)
+ }
+}
+
+func (a *refParser) GetImageRef(
+ ctx context.Context,
+ value string,
+) (ImageRef, error) {
+ ctx, span := trace.StartSpan(ctx, "get_image_ref")
+ defer span.End()
+ parsedRef, err := a.getParsedRef(ctx, value, imageFormats)
+ if err != nil {
+ return nil, err
+ }
+ parsedSingleRef, ok := parsedRef.(internal.ParsedSingleRef)
+ if !ok {
+ // this should never happen
+ return nil, fmt.Errorf("invalid ParsedRef type for image: %T", parsedRef)
+ }
+ imageEncoding, err := parseImageEncoding(parsedSingleRef.Format())
+ if err != nil {
+ return nil, err
+ }
+ return newImageRef(parsedSingleRef, imageEncoding), nil
+}
+
+func (a *refParser) GetSourceRef(
+ ctx context.Context,
+ value string,
+) (SourceRef, error) {
+ ctx, span := trace.StartSpan(ctx, "get_source_ref")
+ defer span.End()
+ parsedRef, err := a.getParsedRef(ctx, value, sourceFormats)
+ if err != nil {
+ return nil, err
+ }
+ parsedBucketRef, ok := parsedRef.(internal.ParsedBucketRef)
+ if !ok {
+ // this should never happen
+ return nil, fmt.Errorf("invalid ParsedRef type for source: %T", parsedRef)
+ }
+ return newSourceRef(parsedBucketRef), nil
+}
+
+func (a *refParser) GetModuleRef(
+ ctx context.Context,
+ value string,
+) (ModuleRef, error) {
+ ctx, span := trace.StartSpan(ctx, "get_source_ref")
+ defer span.End()
+ parsedRef, err := a.getParsedRef(ctx, value, moduleFormats)
+ if err != nil {
+ return nil, err
+ }
+ parsedModuleRef, ok := parsedRef.(internal.ParsedModuleRef)
+ if !ok {
+ // this should never happen
+ return nil, fmt.Errorf("invalid ParsedRef type for source: %T", parsedRef)
+ }
+ return newModuleRef(parsedModuleRef), nil
+}
+
+func (a *refParser) getParsedRef(
+ ctx context.Context,
+ value string,
+ allowedFormats []string,
+) (internal.ParsedRef, error) {
+ parsedRef, err := a.fetchRefParser.GetParsedRef(
+ ctx,
+ value,
+ internal.WithAllowedFormats(allowedFormats...),
+ )
+ if err != nil {
+ return nil, err
+ }
+ a.checkDeprecated(parsedRef)
+ return parsedRef, nil
+}
+
+func (a *refParser) checkDeprecated(parsedRef internal.ParsedRef) {
+ format := parsedRef.Format()
+ if replacementFormat, ok := deprecatedCompressionFormatToReplacementFormat[format]; ok {
+ a.logger.Sugar().Warnf(
+ `Format %q is deprecated. Use "format=%s,compression=gzip" instead. This will continue to work forever, but updating is recommended.`,
+ format,
+ replacementFormat,
+ )
+ }
+}
+
+func newRawRefProcessor(allowProtoFileRef bool) func(*internal.RawRef) error {
+ return func(rawRef *internal.RawRef) error {
+ // if format option is not set and path is "-", default to bin
+ var format string
+ var compressionType internal.CompressionType
+ if rawRef.Path == "-" || app.IsDevNull(rawRef.Path) || app.IsDevStdin(rawRef.Path) || app.IsDevStdout(rawRef.Path) {
+ format = formatBin
+ } else {
+ switch filepath.Ext(rawRef.Path) {
+ case ".bin":
+ format = formatBin
+ case ".json":
+ format = formatJSON
+ case ".tar":
+ format = formatTar
+ case ".zip":
+ format = formatZip
+ case ".gz":
+ compressionType = internal.CompressionTypeGzip
+ switch filepath.Ext(strings.TrimSuffix(rawRef.Path, filepath.Ext(rawRef.Path))) {
+ case ".bin":
+ format = formatBin
+ case ".json":
+ format = formatJSON
+ case ".tar":
+ format = formatTar
+ default:
+ return fmt.Errorf("path %q had .gz extension with unknown format", rawRef.Path)
+ }
+ case ".zst":
+ compressionType = internal.CompressionTypeZstd
+ switch filepath.Ext(strings.TrimSuffix(rawRef.Path, filepath.Ext(rawRef.Path))) {
+ case ".bin":
+ format = formatBin
+ case ".json":
+ format = formatJSON
+ case ".tar":
+ format = formatTar
+ default:
+ return fmt.Errorf("path %q had .zst extension with unknown format", rawRef.Path)
+ }
+ case ".tgz":
+ format = formatTar
+ compressionType = internal.CompressionTypeGzip
+ case ".git":
+ format = formatGit
+ // This only applies if the option accept `ProtoFileRef` is passed in, otherwise
+ // it falls through to the `default` case.
+ case ".proto":
+ if allowProtoFileRef {
+ fileInfo, err := os.Stat(rawRef.Path)
+ if err != nil && !os.IsNotExist(err) {
+ return fmt.Errorf("path provided is not a valid proto file: %s, %w", rawRef.Path, err)
+ }
+ if fileInfo != nil && fileInfo.IsDir() {
+ return fmt.Errorf("path provided is not a valid proto file: a directory named %s already exists", rawRef.Path)
+ }
+ format = formatProtoFile
+ break
+ }
+ fallthrough
+ default:
+ var err error
+ format, err = assumeModuleOrDir(rawRef.Path)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ rawRef.Format = format
+ rawRef.CompressionType = compressionType
+ return nil
+ }
+}
+
+func processRawRefSource(rawRef *internal.RawRef) error {
+ // if format option is not set and path is "-", default to bin
+ var format string
+ var compressionType internal.CompressionType
+ switch filepath.Ext(rawRef.Path) {
+ case ".tar":
+ format = formatTar
+ case ".zip":
+ format = formatZip
+ case ".gz":
+ compressionType = internal.CompressionTypeGzip
+ switch filepath.Ext(strings.TrimSuffix(rawRef.Path, filepath.Ext(rawRef.Path))) {
+ case ".tar":
+ format = formatTar
+ default:
+ return fmt.Errorf("path %q had .gz extension with unknown format", rawRef.Path)
+ }
+ case ".zst":
+ compressionType = internal.CompressionTypeZstd
+ switch filepath.Ext(strings.TrimSuffix(rawRef.Path, filepath.Ext(rawRef.Path))) {
+ case ".tar":
+ format = formatTar
+ default:
+ return fmt.Errorf("path %q had .zst extension with unknown format", rawRef.Path)
+ }
+ case ".tgz":
+ format = formatTar
+ compressionType = internal.CompressionTypeGzip
+ case ".git":
+ format = formatGit
+ default:
+ format = formatDir
+ }
+ rawRef.Format = format
+ rawRef.CompressionType = compressionType
+ return nil
+}
+
+func processRawRefSourceOrModule(rawRef *internal.RawRef) error {
+ // if format option is not set and path is "-", default to bin
+ var format string
+ var compressionType internal.CompressionType
+ switch filepath.Ext(rawRef.Path) {
+ case ".tar":
+ format = formatTar
+ case ".zip":
+ format = formatZip
+ case ".gz":
+ compressionType = internal.CompressionTypeGzip
+ switch filepath.Ext(strings.TrimSuffix(rawRef.Path, filepath.Ext(rawRef.Path))) {
+ case ".tar":
+ format = formatTar
+ default:
+ return fmt.Errorf("path %q had .gz extension with unknown format", rawRef.Path)
+ }
+ case ".zst":
+ compressionType = internal.CompressionTypeZstd
+ switch filepath.Ext(strings.TrimSuffix(rawRef.Path, filepath.Ext(rawRef.Path))) {
+ case ".tar":
+ format = formatTar
+ default:
+ return fmt.Errorf("path %q had .zst extension with unknown format", rawRef.Path)
+ }
+ case ".tgz":
+ format = formatTar
+ compressionType = internal.CompressionTypeGzip
+ case ".git":
+ format = formatGit
+ default:
+ var err error
+ format, err = assumeModuleOrDir(rawRef.Path)
+ if err != nil {
+ return err
+ }
+ }
+ rawRef.Format = format
+ rawRef.CompressionType = compressionType
+ return nil
+}
+
+func processRawRefImage(rawRef *internal.RawRef) error {
+ // if format option is not set and path is "-", default to bin
+ var format string
+ var compressionType internal.CompressionType
+ if rawRef.Path == "-" || app.IsDevNull(rawRef.Path) || app.IsDevStdin(rawRef.Path) || app.IsDevStdout(rawRef.Path) {
+ format = formatBin
+ } else {
+ switch filepath.Ext(rawRef.Path) {
+ case ".bin":
+ format = formatBin
+ case ".json":
+ format = formatJSON
+ case ".gz":
+ compressionType = internal.CompressionTypeGzip
+ switch filepath.Ext(strings.TrimSuffix(rawRef.Path, filepath.Ext(rawRef.Path))) {
+ case ".bin":
+ format = formatBin
+ case ".json":
+ format = formatJSON
+ default:
+ return fmt.Errorf("path %q had .gz extension with unknown format", rawRef.Path)
+ }
+ case ".zst":
+ compressionType = internal.CompressionTypeZstd
+ switch filepath.Ext(strings.TrimSuffix(rawRef.Path, filepath.Ext(rawRef.Path))) {
+ case ".bin":
+ format = formatBin
+ case ".json":
+ format = formatJSON
+ default:
+ return fmt.Errorf("path %q had .zst extension with unknown format", rawRef.Path)
+ }
+ default:
+ format = formatBin
+ }
+ }
+ rawRef.Format = format
+ rawRef.CompressionType = compressionType
+ return nil
+}
+
+func processRawRefModule(rawRef *internal.RawRef) error {
+ rawRef.Format = formatMod
+ return nil
+}
+
+func parseImageEncoding(format string) (ImageEncoding, error) {
+ switch format {
+ case formatBin, formatBingz:
+ return ImageEncodingBin, nil
+ case formatJSON, formatJSONGZ:
+ return ImageEncodingJSON, nil
+ default:
+ return 0, fmt.Errorf("invalid format for image: %q", format)
+ }
+}
+
+// TODO: this is a terrible heuristic, and we shouldn't be using what amounts
+// to heuristics here (technically this is a documentable rule, but still)
+func assumeModuleOrDir(path string) (string, error) {
+ if path == "" {
+ return "", errors.New("assumeModuleOrDir: no path given")
+ }
+ if _, err := bufmoduleref.ModuleReferenceForString(path); err == nil {
+ // this is possible to be a module, check if it is a directory though
+ // OK to use os.Stat instead of os.Lstat here
+ fileInfo, err := os.Stat(path)
+ if err == nil && fileInfo.IsDir() {
+ // if we have a directory, assume this is a directory
+ return formatDir, nil
+ }
+ // not a directory, assume module
+ return formatMod, nil
+ }
+ // cannot be parsed into a module, assume dir for here
+ return formatDir, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/source_ref.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/source_ref.go
new file mode 100644
index 000000000..02a4e9879
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/source_ref.go
@@ -0,0 +1,70 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buffetch
+
+import (
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/buf/buffetch/internal"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+var _ SourceRef = &sourceRef{}
+
+type sourceRef struct {
+ bucketRef internal.BucketRef
+ dirPath string
+}
+
+func newSourceRef(bucketRef internal.BucketRef) *sourceRef {
+ var dirPath string
+ if dirRef, ok := bucketRef.(internal.DirRef); ok {
+ dirPath = dirRef.Path()
+ }
+ return &sourceRef{
+ bucketRef: bucketRef,
+ dirPath: dirPath,
+ }
+}
+
+func (r *sourceRef) PathForExternalPath(externalPath string) (string, error) {
+ if r.dirPath == "" {
+ return normalpath.NormalizeAndValidate(externalPath)
+ }
+ absDirPath, err := filepath.Abs(normalpath.Unnormalize(r.dirPath))
+ if err != nil {
+ return "", err
+ }
+ // we don't actually need to unnormalize externalPath but we do anyways
+ absExternalPath, err := filepath.Abs(normalpath.Unnormalize(externalPath))
+ if err != nil {
+ return "", err
+ }
+ path, err := filepath.Rel(absDirPath, absExternalPath)
+ if err != nil {
+ return "", err
+ }
+ return normalpath.NormalizeAndValidate(path)
+}
+
+func (r *sourceRef) internalRef() internal.Ref {
+ return r.bucketRef
+}
+
+func (r *sourceRef) internalBucketRef() internal.BucketRef {
+ return r.bucketRef
+}
+
+func (*sourceRef) isSourceOrModuleRef() {}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/usage.gen.go
new file mode 100644
index 000000000..368a4b37c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package buffetch
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/buffetch/writer.go b/vendor/github.com/bufbuild/buf/private/buf/buffetch/writer.go
new file mode 100644
index 000000000..78e335147
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/buffetch/writer.go
@@ -0,0 +1,48 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buffetch
+
+import (
+ "context"
+ "io"
+
+ "github.com/bufbuild/buf/private/buf/buffetch/internal"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "go.uber.org/zap"
+)
+
+type writer struct {
+ internalWriter internal.Writer
+}
+
+func newWriter(
+ logger *zap.Logger,
+) *writer {
+ return &writer{
+ internalWriter: internal.NewWriter(
+ logger,
+ internal.WithWriterLocal(),
+ internal.WithWriterStdio(),
+ ),
+ }
+}
+
+func (w *writer) PutImageFile(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ imageRef ImageRef,
+) (io.WriteCloser, error) {
+ return w.internalWriter.PutFile(ctx, container, imageRef.internalFileRef())
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufformat/bufformat.go b/vendor/github.com/bufbuild/buf/private/buf/bufformat/bufformat.go
new file mode 100644
index 000000000..e26387389
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufformat/bufformat.go
@@ -0,0 +1,68 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufformat
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem"
+ "github.com/bufbuild/buf/private/pkg/thread"
+ "github.com/bufbuild/protocompile/parser"
+ "github.com/bufbuild/protocompile/reporter"
+ "go.uber.org/multierr"
+)
+
+// Format formats and writes the target module files into a read bucket.
+func Format(ctx context.Context, module bufmodule.Module) (_ storage.ReadBucket, retErr error) {
+ fileInfos, err := module.TargetFileInfos(ctx)
+ if err != nil {
+ return nil, err
+ }
+ readWriteBucket := storagemem.NewReadWriteBucket()
+ jobs := make([]func(context.Context) error, len(fileInfos))
+ for i, fileInfo := range fileInfos {
+ fileInfo := fileInfo
+ jobs[i] = func(ctx context.Context) (retErr error) {
+ moduleFile, err := module.GetModuleFile(ctx, fileInfo.Path())
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, moduleFile.Close())
+ }()
+ fileNode, err := parser.Parse(moduleFile.ExternalPath(), moduleFile, reporter.NewHandler(nil))
+ if err != nil {
+ return err
+ }
+ writeObjectCloser, err := readWriteBucket.Put(ctx, moduleFile.Path())
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, writeObjectCloser.Close())
+ }()
+ if err := newFormatter(writeObjectCloser, fileNode).Run(); err != nil {
+ return err
+ }
+ return writeObjectCloser.SetExternalPath(moduleFile.ExternalPath())
+ }
+ }
+ if err := thread.Parallelize(ctx, jobs); err != nil {
+ return nil, err
+ }
+ return readWriteBucket, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufformat/formatter.go b/vendor/github.com/bufbuild/buf/private/buf/bufformat/formatter.go
new file mode 100644
index 000000000..4952068f3
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufformat/formatter.go
@@ -0,0 +1,2176 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufformat
+
+import (
+ "errors"
+ "fmt"
+ "io"
+ "sort"
+ "strings"
+ "unicode"
+ "unicode/utf8"
+
+ "github.com/bufbuild/protocompile/ast"
+ "go.uber.org/multierr"
+)
+
+// formatter writes an *ast.FileNode as a .proto file.
+type formatter struct {
+ writer io.Writer
+ fileNode *ast.FileNode
+
+ // Current level of indentation.
+ indent int
+ // The last character written to writer.
+ lastWritten rune
+
+ // The last node written. This must be updated from all functions
+ // that write comments with a node. This flag informs how the next
+ // node's leading comments and whitespace should be written.
+ previousNode ast.Node
+
+ // If true, a space will be written to the output unless the next character
+ // written is a newline (don't wait errant trailing spaces).
+ pendingSpace bool
+ // If true, the formatter is in the middle of printing compact options.
+ inCompactOptions bool
+
+ // Track runes that open blocks/scopes and are expected to increase indention
+ // level. For example, when runes "{" "[" "(" ")" are written, the pending
+ // value is 2 (increment three times for "{" "[" "("; decrement once for ")").
+ // If it's greater than zero at the end of a line, we call In() so that
+ // subsequent lines are indented. If it's less than zero at the end of a line,
+ // we call Out(). This minimizes the amount of explicit indent/unindent code
+ // that is needed and makes it less error-prone.
+ pendingIndent int
+ // If true, an inline node/sequence is being written. We treat whitespace a
+ // little differently for when blocks are printed inline vs. across multiple
+ // lines. So this flag informs the logic that makes those whitespace decisions.
+ inline bool
+
+ // Records all errors that occur during the formatting process. Nearly any
+ // non-nil error represents a bug in the implementation.
+ err error
+}
+
+// newFormatter returns a new formatter for the given file.
+func newFormatter(
+ writer io.Writer,
+ fileNode *ast.FileNode,
+) *formatter {
+ return &formatter{
+ writer: writer,
+ fileNode: fileNode,
+ }
+}
+
+// Run runs the formatter and writes the file's content to the formatter's writer.
+func (f *formatter) Run() error {
+ f.writeFile()
+ return f.err
+}
+
+// P prints a line to the generated output.
+func (f *formatter) P(elements ...string) {
+ if len(elements) > 0 {
+ // We only want to write an indent if we're
+ // writing elements (not just a newline).
+ f.Indent(nil)
+ for _, elem := range elements {
+ f.WriteString(elem)
+ }
+ }
+ f.WriteString("\n")
+
+ if f.pendingIndent > 0 {
+ f.In()
+ } else if f.pendingIndent < 0 {
+ f.Out()
+ }
+ f.pendingIndent = 0
+}
+
+// Space adds a space to the generated output.
+func (f *formatter) Space() {
+ f.pendingSpace = true
+}
+
+// In increases the current level of indentation.
+func (f *formatter) In() {
+ f.indent++
+}
+
+// Out reduces the current level of indentation.
+func (f *formatter) Out() {
+ if f.indent <= 0 {
+ // Unreachable.
+ f.err = multierr.Append(
+ f.err,
+ errors.New("internal error: attempted to decrement indentation at zero"),
+ )
+ return
+ }
+ f.indent--
+}
+
+// Indent writes the number of spaces associated
+// with the current level of indentation.
+func (f *formatter) Indent(nextNode ast.Node) {
+ // only indent at beginning of line
+ if f.lastWritten != '\n' {
+ return
+ }
+ indent := f.indent
+ if rn, ok := nextNode.(*ast.RuneNode); ok && indent > 0 {
+ if strings.ContainsRune("}])>", rn.Rune) {
+ indent--
+ }
+ }
+ f.WriteString(strings.Repeat(" ", indent))
+}
+
+// WriteString writes the given element to the generated output.
+func (f *formatter) WriteString(elem string) {
+ if f.pendingSpace {
+ f.pendingSpace = false
+ first, _ := utf8.DecodeRuneInString(elem)
+
+ // We don't want "dangling spaces" before certain characters:
+ // newlines, commas, and semicolons. Also, when writing
+ // elements inline, we don't want spaces before close parens
+ // and braces. Similarly, we don't want extra/doubled spaces
+ // or dangling spaces after certain characters when printing
+ // inline, like open parens/braces. So only print the space
+ // if the previous and next character don't match above
+ // conditions.
+
+ prevBlockList := "\x00 \t\n"
+ nextBlockList := "\n;,"
+ if f.inline {
+ prevBlockList = "\x00 \t\n<[{("
+ nextBlockList = "\n;,)]}>"
+ }
+
+ if !strings.ContainsRune(prevBlockList, f.lastWritten) &&
+ !strings.ContainsRune(nextBlockList, first) {
+ if _, err := f.writer.Write([]byte{' '}); err != nil {
+ f.err = multierr.Append(f.err, err)
+ return
+ }
+ }
+ }
+ if len(elem) == 0 {
+ return
+ }
+ f.lastWritten, _ = utf8.DecodeLastRuneInString(elem)
+ if _, err := f.writer.Write([]byte(elem)); err != nil {
+ f.err = multierr.Append(f.err, err)
+ }
+}
+
+// SetPreviousNode sets the previously written node. This should
+// be called in all of the comment writing functions.
+func (f *formatter) SetPreviousNode(node ast.Node) {
+ f.previousNode = node
+}
+
+// writeFile writes the file node.
+func (f *formatter) writeFile() {
+ f.writeFileHeader()
+ f.writeFileTypes()
+ if f.fileNode.EOF != nil {
+ info := f.fileNode.NodeInfo(f.fileNode.EOF)
+ f.writeMultilineComments(info.LeadingComments())
+ }
+ if f.lastWritten != 0 && f.lastWritten != '\n' {
+ // If anything was written, we always conclude with
+ // a newline.
+ f.P()
+ }
+}
+
+// writeFileHeader writes the header of a .proto file. This includes the syntax,
+// package, imports, and options (in that order). The imports and options are
+// sorted. All other file elements are handled by f.writeFileTypes.
+//
+// For example,
+//
+// syntax = "proto3";
+//
+// package acme.v1.weather;
+//
+// import "acme/payment/v1/payment.proto";
+// import "google/type/datetime.proto";
+//
+// option cc_enable_arenas = true;
+// option optimize_for = SPEED;
+func (f *formatter) writeFileHeader() {
+ var (
+ packageNode *ast.PackageNode
+ importNodes []*ast.ImportNode
+ optionNodes []*ast.OptionNode
+ )
+ for _, fileElement := range f.fileNode.Decls {
+ switch node := fileElement.(type) {
+ case *ast.PackageNode:
+ packageNode = node
+ case *ast.ImportNode:
+ importNodes = append(importNodes, node)
+ case *ast.OptionNode:
+ optionNodes = append(optionNodes, node)
+ default:
+ continue
+ }
+ }
+ if f.fileNode.Syntax == nil && packageNode == nil && importNodes == nil && optionNodes == nil {
+ // There aren't any header values, so we can return early.
+ return
+ }
+ if syntaxNode := f.fileNode.Syntax; syntaxNode != nil {
+ f.writeSyntax(syntaxNode)
+ }
+ if packageNode != nil {
+ f.writePackage(packageNode)
+ }
+ sort.Slice(importNodes, func(i, j int) bool {
+ return importNodes[i].Name.AsString() < importNodes[j].Name.AsString()
+ })
+ for i, importNode := range importNodes {
+ if i == 0 && f.previousNode != nil && !f.leadingCommentsContainBlankLine(importNode) {
+ f.P()
+ }
+ f.writeImport(importNode, i > 0)
+ }
+ sort.Slice(optionNodes, func(i, j int) bool {
+ // The default options (e.g. cc_enable_arenas) should always
+ // be sorted above custom options (which are identified by a
+ // leading '(').
+ left := stringForOptionName(optionNodes[i].Name)
+ right := stringForOptionName(optionNodes[j].Name)
+ if strings.HasPrefix(left, "(") && !strings.HasPrefix(right, "(") {
+ // Prefer the default option on the right.
+ return false
+ }
+ if !strings.HasPrefix(left, "(") && strings.HasPrefix(right, "(") {
+ // Prefer the default option on the left.
+ return true
+ }
+ // Both options are custom, so we defer to the standard sorting.
+ return left < right
+ })
+ for i, optionNode := range optionNodes {
+ if i == 0 && f.previousNode != nil && !f.leadingCommentsContainBlankLine(optionNode) {
+ f.P()
+ }
+ f.writeFileOption(optionNode, i > 0)
+ }
+}
+
+// writeFileTypes writes the types defined in a .proto file. This includes the messages, enums,
+// services, etc. All other elements are ignored since they are handled by f.writeFileHeader.
+func (f *formatter) writeFileTypes() {
+ for i, fileElement := range f.fileNode.Decls {
+ switch node := fileElement.(type) {
+ case *ast.PackageNode, *ast.OptionNode, *ast.ImportNode, *ast.EmptyDeclNode:
+ // These elements have already been written by f.writeFileHeader.
+ continue
+ default:
+ info := f.fileNode.NodeInfo(node)
+ wantNewline := f.previousNode != nil && (i == 0 || info.LeadingComments().Len() > 0)
+ if wantNewline && !f.leadingCommentsContainBlankLine(node) {
+ f.P()
+ }
+ f.writeNode(node)
+ }
+ }
+}
+
+// writeSyntax writes the syntax.
+//
+// For example,
+//
+// syntax = "proto3";
+func (f *formatter) writeSyntax(syntaxNode *ast.SyntaxNode) {
+ f.writeStart(syntaxNode.Keyword)
+ f.Space()
+ f.writeInline(syntaxNode.Equals)
+ f.Space()
+ f.writeInline(syntaxNode.Syntax)
+ f.writeLineEnd(syntaxNode.Semicolon)
+}
+
+// writePackage writes the package.
+//
+// For example,
+//
+// package acme.weather.v1;
+func (f *formatter) writePackage(packageNode *ast.PackageNode) {
+ f.writeStart(packageNode.Keyword)
+ f.Space()
+ f.writeInline(packageNode.Name)
+ f.writeLineEnd(packageNode.Semicolon)
+}
+
+// writeImport writes an import statement.
+//
+// For example,
+//
+// import "google/protobuf/descriptor.proto";
+func (f *formatter) writeImport(importNode *ast.ImportNode, forceCompact bool) {
+ f.writeStartMaybeCompact(importNode.Keyword, forceCompact)
+ f.Space()
+ // We don't want to write the "public" and "weak" nodes
+ // if they aren't defined. One could be set, but never both.
+ switch {
+ case importNode.Public != nil:
+ f.writeInline(importNode.Public)
+ f.Space()
+ case importNode.Weak != nil:
+ f.writeInline(importNode.Weak)
+ f.Space()
+ }
+ f.writeInline(importNode.Name)
+ f.writeLineEnd(importNode.Semicolon)
+}
+
+// writeFileOption writes a file option. This function is slightly
+// different than f.writeOption because file options are sorted at
+// the top of the file, and leading comments are adjusted accordingly.
+func (f *formatter) writeFileOption(optionNode *ast.OptionNode, forceCompact bool) {
+ f.writeStartMaybeCompact(optionNode.Keyword, forceCompact)
+ f.Space()
+ f.writeNode(optionNode.Name)
+ f.Space()
+ f.writeInline(optionNode.Equals)
+ if node, ok := optionNode.Val.(*ast.CompoundStringLiteralNode); ok {
+ // Compound string literals are written across multiple lines
+ // immediately after the '=', so we don't need a trailing
+ // space in the option prefix.
+ f.writeCompoundStringLiteralIndentEndInline(node)
+ f.writeLineEnd(optionNode.Semicolon)
+ return
+ }
+ f.Space()
+ f.writeInline(optionNode.Val)
+ f.writeLineEnd(optionNode.Semicolon)
+}
+
+// writeOption writes an option.
+//
+// For example,
+//
+// option go_package = "github.com/foo/bar";
+func (f *formatter) writeOption(optionNode *ast.OptionNode) {
+ f.writeOptionPrefix(optionNode)
+ if optionNode.Semicolon != nil {
+ if node, ok := optionNode.Val.(*ast.CompoundStringLiteralNode); ok {
+ // Compound string literals are written across multiple lines
+ // immediately after the '=', so we don't need a trailing
+ // space in the option prefix.
+ f.writeCompoundStringLiteralIndentEndInline(node)
+ f.writeLineEnd(optionNode.Semicolon)
+ return
+ }
+ f.writeInline(optionNode.Val)
+ f.writeLineEnd(optionNode.Semicolon)
+ return
+ }
+
+ if node, ok := optionNode.Val.(*ast.CompoundStringLiteralNode); ok {
+ f.writeCompoundStringLiteralIndent(node)
+ return
+ }
+ f.writeInline(optionNode.Val)
+}
+
+// writeLastCompactOption writes a compact option but preserves its the
+// trailing end comments. This is only used for the last compact option
+// since it's the only time a trailing ',' will be omitted.
+//
+// For example,
+//
+// [
+// deprecated = true,
+// json_name = "something" // Trailing comment on the last element.
+// ]
+func (f *formatter) writeLastCompactOption(optionNode *ast.OptionNode) {
+ f.writeOptionPrefix(optionNode)
+ f.writeLineEnd(optionNode.Val)
+}
+
+// writeOptionValue writes the option prefix, which makes up all of the
+// option's definition, excluding the final token(s).
+//
+// For example,
+//
+// deprecated =
+func (f *formatter) writeOptionPrefix(optionNode *ast.OptionNode) {
+ if optionNode.Keyword != nil {
+ // Compact options don't have the keyword.
+ f.writeStart(optionNode.Keyword)
+ f.Space()
+ f.writeNode(optionNode.Name)
+ } else {
+ f.writeStart(optionNode.Name)
+ }
+ f.Space()
+ f.writeInline(optionNode.Equals)
+ f.Space()
+}
+
+// writeOptionName writes an option name.
+//
+// For example,
+//
+// go_package
+// (custom.thing)
+// (custom.thing).bridge.(another.thing)
+func (f *formatter) writeOptionName(optionNameNode *ast.OptionNameNode) {
+ for i := 0; i < len(optionNameNode.Parts); i++ {
+ if f.inCompactOptions && i == 0 {
+ // The leading comments of the first token (either open rune or the
+ // name) will have already been written, so we need to handle this
+ // case specially.
+ fieldReferenceNode := optionNameNode.Parts[0]
+ if fieldReferenceNode.Open != nil {
+ f.writeNode(fieldReferenceNode.Open)
+ if info := f.fileNode.NodeInfo(fieldReferenceNode.Open); info.TrailingComments().Len() > 0 {
+ f.writeInlineComments(info.TrailingComments())
+ }
+ f.writeInline(fieldReferenceNode.Name)
+ } else {
+ f.writeNode(fieldReferenceNode.Name)
+ if info := f.fileNode.NodeInfo(fieldReferenceNode.Name); info.TrailingComments().Len() > 0 {
+ f.writeInlineComments(info.TrailingComments())
+ }
+ }
+ if fieldReferenceNode.Close != nil {
+ f.writeInline(fieldReferenceNode.Close)
+ }
+ continue
+ }
+ if i > 0 {
+ // The length of this slice must be exactly len(Parts)-1.
+ f.writeInline(optionNameNode.Dots[i-1])
+ }
+ f.writeNode(optionNameNode.Parts[i])
+ }
+}
+
+// writeMessage writes the message node.
+//
+// For example,
+//
+// message Foo {
+// option deprecated = true;
+// reserved 50 to 100;
+// extensions 150 to 200;
+//
+// message Bar {
+// string name = 1;
+// }
+// enum Baz {
+// BAZ_UNSPECIFIED = 0;
+// }
+// extend Bar {
+// string value = 2;
+// }
+//
+// Bar bar = 1;
+// Baz baz = 2;
+// }
+func (f *formatter) writeMessage(messageNode *ast.MessageNode) {
+ var elementWriterFunc func()
+ if len(messageNode.Decls) != 0 {
+ elementWriterFunc = func() {
+ for _, decl := range messageNode.Decls {
+ f.writeNode(decl)
+ }
+ }
+ }
+ f.writeStart(messageNode.Keyword)
+ f.Space()
+ f.writeInline(messageNode.Name)
+ f.Space()
+ f.writeCompositeTypeBody(
+ messageNode.OpenBrace,
+ messageNode.CloseBrace,
+ elementWriterFunc,
+ )
+}
+
+// writeMessageLiteral writes a message literal.
+//
+// For example,
+//
+// {
+// foo: 1
+// foo: 2
+// foo: 3
+// bar: <
+// name:"abc"
+// id:123
+// >
+// }
+func (f *formatter) writeMessageLiteral(messageLiteralNode *ast.MessageLiteralNode) {
+ if f.maybeWriteCompactMessageLiteral(messageLiteralNode, false) {
+ return
+ }
+ var elementWriterFunc func()
+ if len(messageLiteralNode.Elements) > 0 {
+ elementWriterFunc = func() {
+ f.writeMessageLiteralElements(messageLiteralNode)
+ }
+ }
+ f.writeCompositeValueBody(
+ messageLiteralNode.Open,
+ messageLiteralNode.Close,
+ elementWriterFunc,
+ )
+}
+
+// writeMessageLiteral writes a message literal suitable for
+// an element in an array literal.
+func (f *formatter) writeMessageLiteralForArray(
+ messageLiteralNode *ast.MessageLiteralNode,
+ lastElement bool,
+) {
+ if f.maybeWriteCompactMessageLiteral(messageLiteralNode, true) {
+ return
+ }
+ var elementWriterFunc func()
+ if len(messageLiteralNode.Elements) > 0 {
+ elementWriterFunc = func() {
+ f.writeMessageLiteralElements(messageLiteralNode)
+ }
+ }
+ closeWriter := f.writeBodyEndInline
+ if lastElement {
+ closeWriter = f.writeBodyEnd
+ }
+ f.writeBody(
+ messageLiteralNode.Open,
+ messageLiteralNode.Close,
+ elementWriterFunc,
+ f.writeOpenBracePrefixForArray,
+ closeWriter,
+ )
+}
+
+func (f *formatter) maybeWriteCompactMessageLiteral(
+ messageLiteralNode *ast.MessageLiteralNode,
+ inArrayLiteral bool,
+) bool {
+ if len(messageLiteralNode.Elements) == 0 || len(messageLiteralNode.Elements) > 1 ||
+ f.hasInteriorComments(messageLiteralNode.Children()...) ||
+ messageLiteralHasNestedMessageOrArray(messageLiteralNode) {
+ return false
+ }
+ // messages with a single scalar field and no comments can be
+ // printed all on one line
+ if inArrayLiteral {
+ f.Indent(messageLiteralNode.Open)
+ }
+ f.writeInline(messageLiteralNode.Open)
+ fieldNode := messageLiteralNode.Elements[0]
+ f.writeInline(fieldNode.Name)
+ if fieldNode.Sep != nil {
+ f.writeInline(fieldNode.Sep)
+ }
+ f.Space()
+ f.writeInline(fieldNode.Val)
+ f.writeInline(messageLiteralNode.Close)
+ return true
+}
+
+func messageLiteralHasNestedMessageOrArray(messageLiteralNode *ast.MessageLiteralNode) bool {
+ for _, elem := range messageLiteralNode.Elements {
+ switch elem.Val.(type) {
+ case *ast.ArrayLiteralNode, *ast.MessageLiteralNode:
+ return true
+ }
+ }
+ return false
+}
+
+func arrayLiteralHasNestedMessageOrArray(arrayLiteralNode *ast.ArrayLiteralNode) bool {
+ for _, elem := range arrayLiteralNode.Elements {
+ switch elem.(type) {
+ case *ast.ArrayLiteralNode, *ast.MessageLiteralNode:
+ return true
+ }
+ }
+ return false
+}
+
+// writeMessageLiteralElements writes the message literal's elements.
+//
+// For example,
+//
+// foo: 1
+// foo: 2
+func (f *formatter) writeMessageLiteralElements(messageLiteralNode *ast.MessageLiteralNode) {
+ for i := 0; i < len(messageLiteralNode.Elements); i++ {
+ if sep := messageLiteralNode.Seps[i]; sep != nil {
+ f.writeMessageFieldWithSeparator(messageLiteralNode.Elements[i])
+ f.writeLineEnd(messageLiteralNode.Seps[i])
+ continue
+ }
+ f.writeNode(messageLiteralNode.Elements[i])
+ }
+}
+
+// writeMessageField writes the message field node, and concludes the
+// line without leaving room for a trailing separator in the parent
+// message literal.
+func (f *formatter) writeMessageField(messageFieldNode *ast.MessageFieldNode) {
+ f.writeMessageFieldPrefix(messageFieldNode)
+ if compoundStringLiteral, ok := messageFieldNode.Val.(*ast.CompoundStringLiteralNode); ok {
+ f.writeCompoundStringLiteralIndent(compoundStringLiteral)
+ return
+ }
+ f.writeLineEnd(messageFieldNode.Val)
+}
+
+// writeMessageFieldWithSeparator writes the message field node,
+// but leaves room for a trailing separator in the parent message
+// literal.
+func (f *formatter) writeMessageFieldWithSeparator(messageFieldNode *ast.MessageFieldNode) {
+ f.writeMessageFieldPrefix(messageFieldNode)
+ if compoundStringLiteral, ok := messageFieldNode.Val.(*ast.CompoundStringLiteralNode); ok {
+ f.writeCompoundStringLiteralIndentEndInline(compoundStringLiteral)
+ return
+ }
+ f.writeInline(messageFieldNode.Val)
+}
+
+// writeMessageFieldPrefix writes the message field node as a single line.
+//
+// For example,
+//
+// foo:"bar"
+func (f *formatter) writeMessageFieldPrefix(messageFieldNode *ast.MessageFieldNode) {
+ // The comments need to be written as a multiline comment above
+ // the message field name.
+ //
+ // Note that this is different than how field reference nodes are
+ // normally formatted in-line (i.e. as option name components).
+ fieldReferenceNode := messageFieldNode.Name
+ if fieldReferenceNode.Open != nil {
+ f.writeStart(fieldReferenceNode.Open)
+ f.writeInline(fieldReferenceNode.Name)
+ } else {
+ f.writeStart(fieldReferenceNode.Name)
+ }
+ if fieldReferenceNode.Close != nil {
+ f.writeInline(fieldReferenceNode.Close)
+ }
+ if messageFieldNode.Sep != nil {
+ f.writeInline(messageFieldNode.Sep)
+ }
+ f.Space()
+}
+
+// writeEnum writes the enum node.
+//
+// For example,
+//
+// enum Foo {
+// option deprecated = true;
+// reserved 1 to 5;
+//
+// FOO_UNSPECIFIED = 0;
+// }
+func (f *formatter) writeEnum(enumNode *ast.EnumNode) {
+ var elementWriterFunc func()
+ if len(enumNode.Decls) > 0 {
+ elementWriterFunc = func() {
+ for _, decl := range enumNode.Decls {
+ f.writeNode(decl)
+ }
+ }
+ }
+ f.writeStart(enumNode.Keyword)
+ f.Space()
+ f.writeInline(enumNode.Name)
+ f.Space()
+ f.writeCompositeTypeBody(
+ enumNode.OpenBrace,
+ enumNode.CloseBrace,
+ elementWriterFunc,
+ )
+}
+
+// writeEnumValue writes the enum value as a single line. If the enum has
+// compact options, it will be written across multiple lines.
+//
+// For example,
+//
+// FOO_UNSPECIFIED = 1 [
+// deprecated = true
+// ];
+func (f *formatter) writeEnumValue(enumValueNode *ast.EnumValueNode) {
+ f.writeStart(enumValueNode.Name)
+ f.Space()
+ f.writeInline(enumValueNode.Equals)
+ f.Space()
+ f.writeInline(enumValueNode.Number)
+ if enumValueNode.Options != nil {
+ f.Space()
+ f.writeNode(enumValueNode.Options)
+ }
+ f.writeLineEnd(enumValueNode.Semicolon)
+}
+
+// writeField writes the field node as a single line. If the field has
+// compact options, it will be written across multiple lines.
+//
+// For example,
+//
+// repeated string name = 1 [
+// deprecated = true,
+// json_name = "name"
+// ];
+func (f *formatter) writeField(fieldNode *ast.FieldNode) {
+ // We need to handle the comments for the field label specially since
+ // a label might not be defined, but it has the leading comments attached
+ // to it.
+ if fieldNode.Label.KeywordNode != nil {
+ f.writeStart(fieldNode.Label)
+ f.Space()
+ f.writeInline(fieldNode.FldType)
+ } else {
+ // If a label was not written, the multiline comments will be
+ // attached to the type.
+ if compoundIdentNode, ok := fieldNode.FldType.(*ast.CompoundIdentNode); ok {
+ f.writeCompountIdentForFieldName(compoundIdentNode)
+ } else {
+ f.writeStart(fieldNode.FldType)
+ }
+ }
+ f.Space()
+ f.writeInline(fieldNode.Name)
+ f.Space()
+ f.writeInline(fieldNode.Equals)
+ f.Space()
+ f.writeInline(fieldNode.Tag)
+ if fieldNode.Options != nil {
+ f.Space()
+ f.writeNode(fieldNode.Options)
+ }
+ f.writeLineEnd(fieldNode.Semicolon)
+}
+
+// writeMapField writes a map field (e.g. 'map pairs = 1;').
+func (f *formatter) writeMapField(mapFieldNode *ast.MapFieldNode) {
+ f.writeNode(mapFieldNode.MapType)
+ f.Space()
+ f.writeInline(mapFieldNode.Name)
+ f.Space()
+ f.writeInline(mapFieldNode.Equals)
+ f.Space()
+ f.writeInline(mapFieldNode.Tag)
+ if mapFieldNode.Options != nil {
+ f.Space()
+ f.writeNode(mapFieldNode.Options)
+ }
+ f.writeLineEnd(mapFieldNode.Semicolon)
+}
+
+// writeMapType writes a map type (e.g. 'map').
+func (f *formatter) writeMapType(mapTypeNode *ast.MapTypeNode) {
+ f.writeStart(mapTypeNode.Keyword)
+ f.writeInline(mapTypeNode.OpenAngle)
+ f.writeInline(mapTypeNode.KeyType)
+ f.writeInline(mapTypeNode.Comma)
+ f.Space()
+ f.writeInline(mapTypeNode.ValueType)
+ f.writeInline(mapTypeNode.CloseAngle)
+}
+
+// writeFieldReference writes a field reference (e.g. '(foo.bar)').
+func (f *formatter) writeFieldReference(fieldReferenceNode *ast.FieldReferenceNode) {
+ if fieldReferenceNode.Open != nil {
+ f.writeInline(fieldReferenceNode.Open)
+ }
+ f.writeInline(fieldReferenceNode.Name)
+ if fieldReferenceNode.Close != nil {
+ f.writeInline(fieldReferenceNode.Close)
+ }
+}
+
+// writeExtend writes the extend node.
+//
+// For example,
+//
+// extend google.protobuf.FieldOptions {
+// bool redacted = 33333;
+// }
+func (f *formatter) writeExtend(extendNode *ast.ExtendNode) {
+ var elementWriterFunc func()
+ if len(extendNode.Decls) > 0 {
+ elementWriterFunc = func() {
+ for _, decl := range extendNode.Decls {
+ f.writeNode(decl)
+ }
+ }
+ }
+ f.writeStart(extendNode.Keyword)
+ f.Space()
+ f.writeInline(extendNode.Extendee)
+ f.Space()
+ f.writeCompositeTypeBody(
+ extendNode.OpenBrace,
+ extendNode.CloseBrace,
+ elementWriterFunc,
+ )
+}
+
+// writeService writes the service node.
+//
+// For example,
+//
+// service FooService {
+// option deprecated = true;
+//
+// rpc Foo(FooRequest) returns (FooResponse) {};
+func (f *formatter) writeService(serviceNode *ast.ServiceNode) {
+ var elementWriterFunc func()
+ if len(serviceNode.Decls) > 0 {
+ elementWriterFunc = func() {
+ for _, decl := range serviceNode.Decls {
+ f.writeNode(decl)
+ }
+ }
+ }
+ f.writeStart(serviceNode.Keyword)
+ f.Space()
+ f.writeInline(serviceNode.Name)
+ f.Space()
+ f.writeCompositeTypeBody(
+ serviceNode.OpenBrace,
+ serviceNode.CloseBrace,
+ elementWriterFunc,
+ )
+}
+
+// writeRPC writes the RPC node. RPCs are formatted in
+// the following order:
+//
+// For example,
+//
+// rpc Foo(FooRequest) returns (FooResponse) {
+// option deprecated = true;
+// };
+func (f *formatter) writeRPC(rpcNode *ast.RPCNode) {
+ var elementWriterFunc func()
+ if len(rpcNode.Decls) > 0 {
+ elementWriterFunc = func() {
+ for _, decl := range rpcNode.Decls {
+ f.writeNode(decl)
+ }
+ }
+ }
+ f.writeStart(rpcNode.Keyword)
+ f.Space()
+ f.writeInline(rpcNode.Name)
+ f.writeInline(rpcNode.Input)
+ f.Space()
+ f.writeInline(rpcNode.Returns)
+ f.Space()
+ f.writeInline(rpcNode.Output)
+ if rpcNode.OpenBrace == nil {
+ // This RPC doesn't have any elements, so we prefer the
+ // ';' form.
+ //
+ // rpc Ping(PingRequest) returns (PingResponse);
+ //
+ f.writeLineEnd(rpcNode.Semicolon)
+ return
+ }
+ f.Space()
+ f.writeCompositeTypeBody(
+ rpcNode.OpenBrace,
+ rpcNode.CloseBrace,
+ elementWriterFunc,
+ )
+}
+
+// writeRPCType writes the RPC type node (e.g. (stream foo.Bar)).
+func (f *formatter) writeRPCType(rpcTypeNode *ast.RPCTypeNode) {
+ f.writeInline(rpcTypeNode.OpenParen)
+ if rpcTypeNode.Stream != nil {
+ f.writeInline(rpcTypeNode.Stream)
+ f.Space()
+ }
+ f.writeInline(rpcTypeNode.MessageType)
+ f.writeInline(rpcTypeNode.CloseParen)
+}
+
+// writeOneOf writes the oneof node.
+//
+// For example,
+//
+// oneof foo {
+// option deprecated = true;
+//
+// string name = 1;
+// int number = 2;
+// }
+func (f *formatter) writeOneOf(oneOfNode *ast.OneOfNode) {
+ var elementWriterFunc func()
+ if len(oneOfNode.Decls) > 0 {
+ elementWriterFunc = func() {
+ for _, decl := range oneOfNode.Decls {
+ f.writeNode(decl)
+ }
+ }
+ }
+ f.writeStart(oneOfNode.Keyword)
+ f.Space()
+ f.writeInline(oneOfNode.Name)
+ f.Space()
+ f.writeCompositeTypeBody(
+ oneOfNode.OpenBrace,
+ oneOfNode.CloseBrace,
+ elementWriterFunc,
+ )
+}
+
+// writeGroup writes the group node.
+//
+// For example,
+//
+// optional group Key = 4 [
+// deprecated = true,
+// json_name = "key"
+// ] {
+// optional uint64 id = 1;
+// optional string name = 2;
+// }
+func (f *formatter) writeGroup(groupNode *ast.GroupNode) {
+ var elementWriterFunc func()
+ if len(groupNode.Decls) > 0 {
+ elementWriterFunc = func() {
+ for _, decl := range groupNode.Decls {
+ f.writeNode(decl)
+ }
+ }
+ }
+ // We need to handle the comments for the group label specially since
+ // a label might not be defined, but it has the leading comments attached
+ // to it.
+ if groupNode.Label.KeywordNode != nil {
+ f.writeStart(groupNode.Label)
+ f.Space()
+ f.writeInline(groupNode.Keyword)
+ } else {
+ // If a label was not written, the multiline comments will be
+ // attached to the keyword.
+ f.writeStart(groupNode.Keyword)
+ }
+ f.Space()
+ f.writeInline(groupNode.Name)
+ f.Space()
+ f.writeInline(groupNode.Equals)
+ f.Space()
+ f.writeInline(groupNode.Tag)
+ if groupNode.Options != nil {
+ f.Space()
+ f.writeNode(groupNode.Options)
+ }
+ f.Space()
+ f.writeCompositeTypeBody(
+ groupNode.OpenBrace,
+ groupNode.CloseBrace,
+ elementWriterFunc,
+ )
+}
+
+// writeExtensionRange writes the extension range node.
+//
+// For example,
+//
+// extensions 5-10, 100 to max [
+// deprecated = true
+// ];
+func (f *formatter) writeExtensionRange(extensionRangeNode *ast.ExtensionRangeNode) {
+ f.writeStart(extensionRangeNode.Keyword)
+ f.Space()
+ for i := 0; i < len(extensionRangeNode.Ranges); i++ {
+ if i > 0 {
+ // The length of this slice must be exactly len(Ranges)-1.
+ f.writeInline(extensionRangeNode.Commas[i-1])
+ f.Space()
+ }
+ f.writeNode(extensionRangeNode.Ranges[i])
+ }
+ if extensionRangeNode.Options != nil {
+ f.Space()
+ f.writeNode(extensionRangeNode.Options)
+ }
+ f.writeLineEnd(extensionRangeNode.Semicolon)
+}
+
+// writeReserved writes a reserved node.
+//
+// For example,
+//
+// reserved 5-10, 100 to max;
+func (f *formatter) writeReserved(reservedNode *ast.ReservedNode) {
+ f.writeStart(reservedNode.Keyword)
+ // Either names or ranges will be set, but never both.
+ elements := make([]ast.Node, 0, len(reservedNode.Names)+len(reservedNode.Ranges))
+ switch {
+ case reservedNode.Names != nil:
+ for _, nameNode := range reservedNode.Names {
+ elements = append(elements, nameNode)
+ }
+ case reservedNode.Ranges != nil:
+ for _, rangeNode := range reservedNode.Ranges {
+ elements = append(elements, rangeNode)
+ }
+ }
+ f.Space()
+ for i := 0; i < len(elements); i++ {
+ if i > 0 {
+ // The length of this slice must be exactly len({Names,Ranges})-1.
+ f.writeInline(reservedNode.Commas[i-1])
+ f.Space()
+ }
+ f.writeInline(elements[i])
+ }
+ f.writeLineEnd(reservedNode.Semicolon)
+}
+
+// writeRange writes the given range node (e.g. '1 to max').
+func (f *formatter) writeRange(rangeNode *ast.RangeNode) {
+ f.writeInline(rangeNode.StartVal)
+ if rangeNode.To != nil {
+ f.Space()
+ f.writeInline(rangeNode.To)
+ }
+ // Either EndVal or Max will be set, but never both.
+ switch {
+ case rangeNode.EndVal != nil:
+ f.Space()
+ f.writeInline(rangeNode.EndVal)
+ case rangeNode.Max != nil:
+ f.Space()
+ f.writeInline(rangeNode.Max)
+ }
+}
+
+// writeCompactOptions writes a compact options node.
+//
+// For example,
+//
+// [
+// deprecated = true,
+// json_name = "something"
+// ]
+func (f *formatter) writeCompactOptions(compactOptionsNode *ast.CompactOptionsNode) {
+ f.inCompactOptions = true
+ defer func() {
+ f.inCompactOptions = false
+ }()
+ if len(compactOptionsNode.Options) == 1 &&
+ !f.hasInteriorComments(compactOptionsNode.OpenBracket, compactOptionsNode.Options[0].Name) {
+ // If there's only a single compact scalar option without comments, we can write it
+ // in-line. For example:
+ //
+ // [deprecated = true]
+ //
+ // However, this does not include the case when the '[' has trailing comments,
+ // or the option name has leading comments. In those cases, we write the option
+ // across multiple lines. For example:
+ //
+ // [
+ // // This type is deprecated.
+ // deprecated = true
+ // ]
+ //
+ optionNode := compactOptionsNode.Options[0]
+ f.writeInline(compactOptionsNode.OpenBracket)
+ f.writeInline(optionNode.Name)
+ f.Space()
+ f.writeInline(optionNode.Equals)
+ if node, ok := optionNode.Val.(*ast.CompoundStringLiteralNode); ok {
+ // If there's only a single compact option, the value needs to
+ // write its comments (if any) in a way that preserves the closing ']'.
+ f.writeCompoundStringLiteralNoIndentEndInline(node)
+ f.writeInline(compactOptionsNode.CloseBracket)
+ return
+ }
+ f.Space()
+ f.writeInline(optionNode.Val)
+ f.writeInline(compactOptionsNode.CloseBracket)
+ return
+ }
+ var elementWriterFunc func()
+ if len(compactOptionsNode.Options) > 0 {
+ elementWriterFunc = func() {
+ for i, opt := range compactOptionsNode.Options {
+ if i == len(compactOptionsNode.Options)-1 {
+ // The last element won't have a trailing comma.
+ f.writeLastCompactOption(opt)
+ return
+ }
+ f.writeNode(opt)
+ f.writeLineEnd(compactOptionsNode.Commas[i])
+ }
+ }
+ }
+ f.writeCompositeValueBody(
+ compactOptionsNode.OpenBracket,
+ compactOptionsNode.CloseBracket,
+ elementWriterFunc,
+ )
+}
+
+func (f *formatter) hasInteriorComments(nodes ...ast.Node) bool {
+ for i, n := range nodes {
+ // interior comments mean we ignore leading comments on first
+ // token and trailing comments on the last one
+ info := f.fileNode.NodeInfo(n)
+ if i > 0 && info.LeadingComments().Len() > 0 {
+ return true
+ }
+ if i < len(nodes)-1 && info.TrailingComments().Len() > 0 {
+ return true
+ }
+ }
+ return false
+}
+
+// writeArrayLiteral writes an array literal across multiple lines.
+//
+// For example,
+//
+// [
+// "foo",
+// "bar"
+// ]
+func (f *formatter) writeArrayLiteral(arrayLiteralNode *ast.ArrayLiteralNode) {
+ if len(arrayLiteralNode.Elements) == 1 &&
+ !f.hasInteriorComments(arrayLiteralNode.Children()...) &&
+ !arrayLiteralHasNestedMessageOrArray(arrayLiteralNode) {
+ // arrays with a single scalar value and no comments can be
+ // printed all on one line
+ valueNode := arrayLiteralNode.Elements[0]
+ f.writeInline(arrayLiteralNode.OpenBracket)
+ f.writeInline(valueNode)
+ f.writeInline(arrayLiteralNode.CloseBracket)
+ return
+ }
+
+ var elementWriterFunc func()
+ if len(arrayLiteralNode.Elements) > 0 {
+ elementWriterFunc = func() {
+ for i := 0; i < len(arrayLiteralNode.Elements); i++ {
+ lastElement := i == len(arrayLiteralNode.Elements)-1
+ if compositeNode, ok := arrayLiteralNode.Elements[i].(ast.CompositeNode); ok {
+ f.writeCompositeValueForArrayLiteral(compositeNode, lastElement)
+ if !lastElement {
+ f.writeLineEnd(arrayLiteralNode.Commas[i])
+ }
+ continue
+ }
+ if lastElement {
+ // The last element won't have a trailing comma.
+ f.writeLineElement(arrayLiteralNode.Elements[i])
+ return
+ }
+ f.writeStart(arrayLiteralNode.Elements[i])
+ f.writeLineEnd(arrayLiteralNode.Commas[i])
+ }
+ }
+ }
+ f.writeCompositeValueBody(
+ arrayLiteralNode.OpenBracket,
+ arrayLiteralNode.CloseBracket,
+ elementWriterFunc,
+ )
+}
+
+// writeCompositeForArrayLiteral writes the composite node in a way that's suitable
+// for array literals. In general, signed integers and compound strings should have their
+// comments written in-line because they are one of many components in a single line.
+//
+// However, each of these composite types occupy a single line in an array literal,
+// so they need their comments to be formatted like a standalone node.
+//
+// For example,
+//
+// option (value) = /* In-line comment for '-42' */ -42;
+//
+// option (thing) = {
+// values: [
+// // Leading comment on -42.
+// -42, // Trailing comment on -42.
+// ]
+// }
+//
+// The lastElement boolean is used to signal whether or not the composite value
+// should be written as the last element (i.e. it doesn't have a trailing comma).
+func (f *formatter) writeCompositeValueForArrayLiteral(
+ compositeNode ast.CompositeNode,
+ lastElement bool,
+) {
+ switch node := compositeNode.(type) {
+ case *ast.CompoundStringLiteralNode:
+ f.writeCompoundStringLiteralForArray(node, lastElement)
+ case *ast.PositiveUintLiteralNode:
+ f.writePositiveUintLiteralForArray(node, lastElement)
+ case *ast.NegativeIntLiteralNode:
+ f.writeNegativeIntLiteralForArray(node, lastElement)
+ case *ast.SignedFloatLiteralNode:
+ f.writeSignedFloatLiteralForArray(node, lastElement)
+ case *ast.MessageLiteralNode:
+ f.writeMessageLiteralForArray(node, lastElement)
+ default:
+ f.err = multierr.Append(f.err, fmt.Errorf("unexpected array value node %T", node))
+ }
+}
+
+// writeCompositeTypeBody writes the body of a composite type, e.g. message, enum, extend, oneof, etc.
+func (f *formatter) writeCompositeTypeBody(
+ openBrace *ast.RuneNode,
+ closeBrace *ast.RuneNode,
+ elementWriterFunc func(),
+) {
+ f.writeBody(
+ openBrace,
+ closeBrace,
+ elementWriterFunc,
+ f.writeOpenBracePrefix,
+ f.writeBodyEnd,
+ )
+}
+
+// writeCompositeValueBody writes the body of a composite value, e.g. compact options,
+// array literal, etc. We need to handle the ']' different than composite types because
+// there could be more tokens following the final ']'.
+func (f *formatter) writeCompositeValueBody(
+ openBrace *ast.RuneNode,
+ closeBrace *ast.RuneNode,
+ elementWriterFunc func(),
+) {
+ f.writeBody(
+ openBrace,
+ closeBrace,
+ elementWriterFunc,
+ f.writeOpenBracePrefix,
+ f.writeBodyEndInline,
+ )
+}
+
+// writeBody writes the body of a type or value, e.g. message, enum, compact options, etc.
+// The elementWriterFunc is used to write the declarations within the composite type (e.g.
+// fields in a message). The openBraceWriterFunc and closeBraceWriterFunc functions are used
+// to customize how the '{' and '} nodes are written, respectively.
+func (f *formatter) writeBody(
+ openBrace *ast.RuneNode,
+ closeBrace *ast.RuneNode,
+ elementWriterFunc func(),
+ openBraceWriterFunc func(ast.Node),
+ closeBraceWriterFunc func(ast.Node, bool),
+) {
+ if elementWriterFunc == nil && !f.hasInteriorComments(openBrace, closeBrace) {
+ // completely empty body
+ f.writeInline(openBrace)
+ closeBraceWriterFunc(closeBrace, true)
+ return
+ }
+
+ openBraceWriterFunc(openBrace)
+ if elementWriterFunc != nil {
+ elementWriterFunc()
+ }
+ closeBraceWriterFunc(closeBrace, false)
+}
+
+// writeOpenBracePrefix writes the open brace with its leading comments in-line.
+// This is used for nearly every use case of f.writeBody, excluding the instances
+// in array literals.
+func (f *formatter) writeOpenBracePrefix(openBrace ast.Node) {
+ defer f.SetPreviousNode(openBrace)
+ info := f.fileNode.NodeInfo(openBrace)
+ if info.LeadingComments().Len() > 0 {
+ f.writeInlineComments(info.LeadingComments())
+ if info.LeadingWhitespace() != "" {
+ f.Space()
+ }
+ }
+ f.writeNode(openBrace)
+ if info.TrailingComments().Len() > 0 {
+ f.writeTrailingEndComments(info.TrailingComments())
+ } else {
+ f.P()
+ }
+}
+
+// writeOpenBracePrefixForArray writes the open brace with its leading comments
+// on multiple lines. This is only used for message literals in arrays.
+func (f *formatter) writeOpenBracePrefixForArray(openBrace ast.Node) {
+ defer f.SetPreviousNode(openBrace)
+ info := f.fileNode.NodeInfo(openBrace)
+ if info.LeadingComments().Len() > 0 {
+ f.writeMultilineComments(info.LeadingComments())
+ }
+ f.Indent(openBrace)
+ f.writeNode(openBrace)
+ if info.TrailingComments().Len() > 0 {
+ f.writeTrailingEndComments(info.TrailingComments())
+ } else {
+ f.P()
+ }
+}
+
+// writeCompoundIdent writes a compound identifier (e.g. '.com.foo.Bar').
+func (f *formatter) writeCompoundIdent(compoundIdentNode *ast.CompoundIdentNode) {
+ if compoundIdentNode.LeadingDot != nil {
+ f.writeInline(compoundIdentNode.LeadingDot)
+ }
+ for i := 0; i < len(compoundIdentNode.Components); i++ {
+ if i > 0 {
+ // The length of this slice must be exactly len(Components)-1.
+ f.writeInline(compoundIdentNode.Dots[i-1])
+ }
+ f.writeInline(compoundIdentNode.Components[i])
+ }
+}
+
+// writeCompountIdentForFieldName writes a compound identifier, but handles comments
+// specially for field names.
+//
+// For example,
+//
+// message Foo {
+// // These are comments attached to bar.
+// bar.v1.Bar bar = 1;
+// }
+func (f *formatter) writeCompountIdentForFieldName(compoundIdentNode *ast.CompoundIdentNode) {
+ if compoundIdentNode.LeadingDot != nil {
+ f.writeStart(compoundIdentNode.LeadingDot)
+ }
+ for i := 0; i < len(compoundIdentNode.Components); i++ {
+ if i == 0 && compoundIdentNode.LeadingDot == nil {
+ f.writeStart(compoundIdentNode.Components[i])
+ continue
+ }
+ if i > 0 {
+ // The length of this slice must be exactly len(Components)-1.
+ f.writeInline(compoundIdentNode.Dots[i-1])
+ }
+ f.writeInline(compoundIdentNode.Components[i])
+ }
+}
+
+// writeFieldLabel writes the field label node.
+//
+// For example,
+//
+// optional
+// repeated
+// required
+func (f *formatter) writeFieldLabel(fieldLabel ast.FieldLabel) {
+ f.WriteString(fieldLabel.Val)
+}
+
+// writeCompoundStringLiteral writes a compound string literal value.
+//
+// For example,
+//
+// "one,"
+// "two,"
+// "three"
+func (f *formatter) writeCompoundStringLiteral(
+ compoundStringLiteralNode *ast.CompoundStringLiteralNode,
+ needsIndent bool,
+ hasTrailingPunctuation bool,
+) {
+ f.P()
+ if needsIndent {
+ f.In()
+ }
+ for i, child := range compoundStringLiteralNode.Children() {
+ if hasTrailingPunctuation && i == len(compoundStringLiteralNode.Children())-1 {
+ // inline because there may be a subsequent comma or punctuation from enclosing element
+ f.writeStart(child)
+ break
+ }
+ f.writeLineElement(child)
+ }
+ if needsIndent {
+ f.Out()
+ }
+}
+
+func (f *formatter) writeCompoundStringLiteralIndent(
+ compoundStringLiteralNode *ast.CompoundStringLiteralNode,
+) {
+ f.writeCompoundStringLiteral(compoundStringLiteralNode, true, false)
+}
+
+func (f *formatter) writeCompoundStringLiteralIndentEndInline(
+ compoundStringLiteralNode *ast.CompoundStringLiteralNode,
+) {
+ f.writeCompoundStringLiteral(compoundStringLiteralNode, true, true)
+}
+
+func (f *formatter) writeCompoundStringLiteralNoIndentEndInline(
+ compoundStringLiteralNode *ast.CompoundStringLiteralNode,
+) {
+ f.writeCompoundStringLiteral(compoundStringLiteralNode, false, true)
+}
+
+// writeCompoundStringLiteralForArray writes a compound string literal value,
+// but writes its comments suitable for an element in an array literal.
+//
+// The lastElement boolean is used to signal whether or not the value should
+// be written as the last element (i.e. it doesn't have a trailing comma).
+func (f *formatter) writeCompoundStringLiteralForArray(
+ compoundStringLiteralNode *ast.CompoundStringLiteralNode,
+ lastElement bool,
+) {
+ for i, child := range compoundStringLiteralNode.Children() {
+ if !lastElement && i == len(compoundStringLiteralNode.Children())-1 {
+ f.writeStart(child)
+ return
+ }
+ f.writeLineElement(child)
+ }
+}
+
+// writeFloatLiteral writes a float literal value (e.g. '42.2').
+func (f *formatter) writeFloatLiteral(floatLiteralNode *ast.FloatLiteralNode) {
+ f.writeRaw(floatLiteralNode)
+}
+
+// writeSignedFloatLiteral writes a signed float literal value (e.g. '-42.2').
+func (f *formatter) writeSignedFloatLiteral(signedFloatLiteralNode *ast.SignedFloatLiteralNode) {
+ f.writeInline(signedFloatLiteralNode.Sign)
+ f.writeInline(signedFloatLiteralNode.Float)
+}
+
+// writeSignedFloatLiteralForArray writes a signed float literal value, but writes
+// its comments suitable for an element in an array literal.
+//
+// The lastElement boolean is used to signal whether or not the value should
+// be written as the last element (i.e. it doesn't have a trailing comma).
+func (f *formatter) writeSignedFloatLiteralForArray(
+ signedFloatLiteralNode *ast.SignedFloatLiteralNode,
+ lastElement bool,
+) {
+ f.writeStart(signedFloatLiteralNode.Sign)
+ if lastElement {
+ f.writeLineEnd(signedFloatLiteralNode.Float)
+ return
+ }
+ f.writeInline(signedFloatLiteralNode.Float)
+}
+
+// writeSpecialFloatLiteral writes a special float literal value (e.g. "nan" or "inf").
+func (f *formatter) writeSpecialFloatLiteral(specialFloatLiteralNode *ast.SpecialFloatLiteralNode) {
+ f.WriteString(specialFloatLiteralNode.KeywordNode.Val)
+}
+
+// writeStringLiteral writes a string literal value (e.g. "foo").
+// Note that the raw string is written as-is so that it preserves
+// the quote style used in the original source.
+func (f *formatter) writeStringLiteral(stringLiteralNode *ast.StringLiteralNode) {
+ f.writeRaw(stringLiteralNode)
+}
+
+// writeUintLiteral writes a uint literal (e.g. '42').
+func (f *formatter) writeUintLiteral(uintLiteralNode *ast.UintLiteralNode) {
+ f.writeRaw(uintLiteralNode)
+}
+
+// writeNegativeIntLiteral writes a negative int literal (e.g. '-42').
+func (f *formatter) writeNegativeIntLiteral(negativeIntLiteralNode *ast.NegativeIntLiteralNode) {
+ f.writeInline(negativeIntLiteralNode.Minus)
+ f.writeInline(negativeIntLiteralNode.Uint)
+}
+
+func (f *formatter) writeRaw(n ast.Node) {
+ info := f.fileNode.NodeInfo(n)
+ f.WriteString(info.RawText())
+}
+
+// writeNegativeIntLiteralForArray writes a negative int literal value, but writes
+// its comments suitable for an element in an array literal.
+//
+// The lastElement boolean is used to signal whether or not the value should
+// be written as the last element (i.e. it doesn't have a trailing comma).
+func (f *formatter) writeNegativeIntLiteralForArray(
+ negativeIntLiteralNode *ast.NegativeIntLiteralNode,
+ lastElement bool,
+) {
+ f.writeStart(negativeIntLiteralNode.Minus)
+ if lastElement {
+ f.writeLineEnd(negativeIntLiteralNode.Uint)
+ return
+ }
+ f.writeInline(negativeIntLiteralNode.Uint)
+}
+
+// writePositiveUintLiteral writes a positive uint literal (e.g. '+42').
+func (f *formatter) writePositiveUintLiteral(positiveIntLiteralNode *ast.PositiveUintLiteralNode) {
+ f.writeInline(positiveIntLiteralNode.Plus)
+ f.writeInline(positiveIntLiteralNode.Uint)
+}
+
+// writePositiveUintLiteralForArray writes a positive uint literal value, but writes
+// its comments suitable for an element in an array literal.
+//
+// The lastElement boolean is used to signal whether or not the value should
+// be written as the last element (i.e. it doesn't have a trailing comma).
+func (f *formatter) writePositiveUintLiteralForArray(
+ positiveIntLiteralNode *ast.PositiveUintLiteralNode,
+ lastElement bool,
+) {
+ f.writeStart(positiveIntLiteralNode.Plus)
+ if lastElement {
+ f.writeLineEnd(positiveIntLiteralNode.Uint)
+ return
+ }
+ f.writeInline(positiveIntLiteralNode.Uint)
+}
+
+// writeIdent writes an identifier (e.g. 'foo').
+func (f *formatter) writeIdent(identNode *ast.IdentNode) {
+ f.WriteString(identNode.Val)
+}
+
+// writeKeyword writes a keyword (e.g. 'syntax').
+func (f *formatter) writeKeyword(keywordNode *ast.KeywordNode) {
+ f.WriteString(keywordNode.Val)
+}
+
+// writeRune writes a rune (e.g. '=').
+func (f *formatter) writeRune(runeNode *ast.RuneNode) {
+ if strings.ContainsRune("{[(<", runeNode.Rune) {
+ f.pendingIndent++
+ } else if strings.ContainsRune("}])>", runeNode.Rune) {
+ f.pendingIndent--
+ }
+ f.WriteString(string(runeNode.Rune))
+}
+
+// writeNode writes the node by dispatching to a function tailored to its concrete type.
+//
+// Comments are handled in each respective write function so that it can determine whether
+// to write the comments in-line or not.
+func (f *formatter) writeNode(node ast.Node) {
+ switch element := node.(type) {
+ case *ast.ArrayLiteralNode:
+ f.writeArrayLiteral(element)
+ case *ast.CompactOptionsNode:
+ f.writeCompactOptions(element)
+ case *ast.CompoundIdentNode:
+ f.writeCompoundIdent(element)
+ case *ast.CompoundStringLiteralNode:
+ f.writeCompoundStringLiteralIndent(element)
+ case *ast.EnumNode:
+ f.writeEnum(element)
+ case *ast.EnumValueNode:
+ f.writeEnumValue(element)
+ case *ast.ExtendNode:
+ f.writeExtend(element)
+ case *ast.ExtensionRangeNode:
+ f.writeExtensionRange(element)
+ case ast.FieldLabel:
+ f.writeFieldLabel(element)
+ case *ast.FieldNode:
+ f.writeField(element)
+ case *ast.FieldReferenceNode:
+ f.writeFieldReference(element)
+ case *ast.FloatLiteralNode:
+ f.writeFloatLiteral(element)
+ case *ast.GroupNode:
+ f.writeGroup(element)
+ case *ast.IdentNode:
+ f.writeIdent(element)
+ case *ast.ImportNode:
+ f.writeImport(element, false)
+ case *ast.KeywordNode:
+ f.writeKeyword(element)
+ case *ast.MapFieldNode:
+ f.writeMapField(element)
+ case *ast.MapTypeNode:
+ f.writeMapType(element)
+ case *ast.MessageNode:
+ f.writeMessage(element)
+ case *ast.MessageFieldNode:
+ f.writeMessageField(element)
+ case *ast.MessageLiteralNode:
+ f.writeMessageLiteral(element)
+ case *ast.NegativeIntLiteralNode:
+ f.writeNegativeIntLiteral(element)
+ case *ast.OneOfNode:
+ f.writeOneOf(element)
+ case *ast.OptionNode:
+ f.writeOption(element)
+ case *ast.OptionNameNode:
+ f.writeOptionName(element)
+ case *ast.PackageNode:
+ f.writePackage(element)
+ case *ast.PositiveUintLiteralNode:
+ f.writePositiveUintLiteral(element)
+ case *ast.RangeNode:
+ f.writeRange(element)
+ case *ast.ReservedNode:
+ f.writeReserved(element)
+ case *ast.RPCNode:
+ f.writeRPC(element)
+ case *ast.RPCTypeNode:
+ f.writeRPCType(element)
+ case *ast.RuneNode:
+ f.writeRune(element)
+ case *ast.ServiceNode:
+ f.writeService(element)
+ case *ast.SignedFloatLiteralNode:
+ f.writeSignedFloatLiteral(element)
+ case *ast.SpecialFloatLiteralNode:
+ f.writeSpecialFloatLiteral(element)
+ case *ast.StringLiteralNode:
+ f.writeStringLiteral(element)
+ case *ast.SyntaxNode:
+ f.writeSyntax(element)
+ case *ast.UintLiteralNode:
+ f.writeUintLiteral(element)
+ case *ast.EmptyDeclNode:
+ // Nothing to do here.
+ default:
+ f.err = multierr.Append(f.err, fmt.Errorf("unexpected node: %T", node))
+ }
+}
+
+// writeStart writes the node across as the start of a line.
+// Start nodes have their leading comments written across
+// multiple lines, but their trailing comments must be written
+// in-line to preserve the line structure.
+//
+// For example,
+//
+// // Leading comment on 'message'.
+// // Spread across multiple lines.
+// message /* This is a trailing comment on 'message' */ Foo {}
+//
+// Newlines are preserved, so that any logical grouping of elements
+// is maintained in the formatted result.
+//
+// For example,
+//
+// // Type represents a set of different types.
+// enum Type {
+// // Unspecified is the naming convention for default enum values.
+// TYPE_UNSPECIFIED = 0;
+//
+// // The following elements are the real values.
+// TYPE_ONE = 1;
+// TYPE_TWO = 2;
+// }
+//
+// Start nodes are always indented according to the formatter's
+// current level of indentation (e.g. nested messages, fields, etc).
+//
+// Note that this is one of the most complex component of the formatter - it
+// controls how each node should be separated from one another and preserves
+// newlines in the original source.
+func (f *formatter) writeStart(node ast.Node) {
+ f.writeStartMaybeCompact(node, false)
+}
+
+func (f *formatter) writeStartMaybeCompact(node ast.Node, forceCompact bool) {
+ defer f.SetPreviousNode(node)
+ info := f.fileNode.NodeInfo(node)
+ var (
+ nodeNewlineCount = newlineCount(info.LeadingWhitespace())
+ compact = forceCompact || isOpenBrace(f.previousNode)
+ )
+ if length := info.LeadingComments().Len(); length > 0 {
+ // If leading comments are defined, the whitespace we care about
+ // is attached to the first comment.
+ f.writeMultilineCommentsMaybeCompact(info.LeadingComments(), forceCompact)
+ if !forceCompact && nodeNewlineCount > 1 {
+ // At this point, we're looking at the lines between
+ // a comment and the node its attached to.
+ //
+ // If the last comment is a standard comment, a single newline
+ // character is sufficient to warrant a separation of the
+ // two.
+ //
+ // If the last comment is a C-style comment, multiple newline
+ // characters are required because C-style comments don't consume
+ // a newline.
+ f.P()
+ }
+ } else if !compact && nodeNewlineCount > 1 {
+ // If the previous node is an open brace, this is the first element
+ // in the body of a composite type, so we don't want to write a
+ // newline. This makes it so that trailing newlines are removed.
+ //
+ // For example,
+ //
+ // message Foo {
+ //
+ // string bar = 1;
+ // }
+ //
+ // Is formatted into the following:
+ //
+ // message Foo {
+ // string bar = 1;
+ // }
+ f.P()
+ }
+ f.Indent(node)
+ f.writeNode(node)
+ if info.TrailingComments().Len() > 0 {
+ f.writeInlineComments(info.TrailingComments())
+ }
+}
+
+// writeInline writes the node and its surrounding comments in-line.
+//
+// This is useful for writing individual nodes like keywords, runes,
+// string literals, etc.
+//
+// For example,
+//
+// // This is a leading comment on the syntax keyword.
+// syntax = /* This is a leading comment on 'proto3' */" proto3";
+func (f *formatter) writeInline(node ast.Node) {
+ f.inline = true
+ defer func() {
+ f.inline = false
+ }()
+ if _, ok := node.(ast.CompositeNode); ok {
+ // We only want to write comments for terminal nodes.
+ // Otherwise comments accessible from CompositeNodes
+ // will be written twice.
+ f.writeNode(node)
+ return
+ }
+ defer f.SetPreviousNode(node)
+ info := f.fileNode.NodeInfo(node)
+ if info.LeadingComments().Len() > 0 {
+ f.writeInlineComments(info.LeadingComments())
+ if info.LeadingWhitespace() != "" {
+ f.Space()
+ }
+ }
+ f.writeNode(node)
+ f.writeInlineComments(info.TrailingComments())
+}
+
+// writeBodyEnd writes the node as the end of a body.
+// Leading comments are written above the token across
+// multiple lines, whereas the trailing comments are
+// written in-line and preserve their format.
+//
+// Body end nodes are always indented according to the
+// formatter's current level of indentation (e.g. nested
+// messages).
+//
+// This is useful for writing a node that concludes a
+// composite node: ']', '}', '>', etc.
+//
+// For example,
+//
+// message Foo {
+// string bar = 1;
+// // Leading comment on '}'.
+// } // Trailing comment on '}.
+func (f *formatter) writeBodyEnd(node ast.Node, leadingEndline bool) {
+ if _, ok := node.(ast.CompositeNode); ok {
+ // We only want to write comments for terminal nodes.
+ // Otherwise comments accessible from CompositeNodes
+ // will be written twice.
+ f.writeNode(node)
+ if f.lastWritten != '\n' {
+ f.P()
+ }
+ return
+ }
+ defer f.SetPreviousNode(node)
+ info := f.fileNode.NodeInfo(node)
+ if leadingEndline {
+ if info.LeadingComments().Len() > 0 {
+ f.writeInlineComments(info.LeadingComments())
+ if info.LeadingWhitespace() != "" {
+ f.Space()
+ }
+ }
+ } else {
+ f.writeMultilineComments(info.LeadingComments())
+ f.Indent(node)
+ }
+ f.writeNode(node)
+ f.writeTrailingEndComments(info.TrailingComments())
+}
+
+func (f *formatter) writeLineElement(node ast.Node) {
+ f.writeBodyEnd(node, false)
+}
+
+// writeBodyEndInline writes the node as the end of a body.
+// Leading comments are written above the token across
+// multiple lines, whereas the trailing comments are
+// written in-line and adapt their comment style if they
+// exist.
+//
+// Body end nodes are always indented according to the
+// formatter's current level of indentation (e.g. nested
+// messages).
+//
+// This is useful for writing a node that concludes either
+// compact options or an array literal.
+//
+// This is behaviorally similar to f.writeStart, but it ignores
+// the preceding newline logic because these body ends should
+// always be compact.
+//
+// For example,
+//
+// message Foo {
+// string bar = 1 [
+// deprecated = true
+//
+// // Leading comment on ']'.
+// ] /* Trailing comment on ']' */ ;
+// }
+func (f *formatter) writeBodyEndInline(node ast.Node, leadingInline bool) {
+ if _, ok := node.(ast.CompositeNode); ok {
+ // We only want to write comments for terminal nodes.
+ // Otherwise comments accessible from CompositeNodes
+ // will be written twice.
+ f.writeNode(node)
+ return
+ }
+ defer f.SetPreviousNode(node)
+ info := f.fileNode.NodeInfo(node)
+ if leadingInline {
+ if info.LeadingComments().Len() > 0 {
+ f.writeInlineComments(info.LeadingComments())
+ if info.LeadingWhitespace() != "" {
+ f.Space()
+ }
+ }
+ } else {
+ f.writeMultilineComments(info.LeadingComments())
+ f.Indent(node)
+ }
+ f.writeNode(node)
+ if info.TrailingComments().Len() > 0 {
+ f.writeInlineComments(info.TrailingComments())
+ }
+}
+
+// writeLineEnd writes the node so that it ends a line.
+//
+// This is useful for writing individual nodes like ';' and other
+// tokens that conclude the end of a single line. In this case, we
+// don't want to transform the trailing comment's from '//' to C-style
+// because it's not necessary.
+//
+// For example,
+//
+// // This is a leading comment on the syntax keyword.
+// syntax = " proto3" /* This is a leading comment on the ';'; // This is a trailing comment on the ';'.
+func (f *formatter) writeLineEnd(node ast.Node) {
+ if _, ok := node.(ast.CompositeNode); ok {
+ // We only want to write comments for terminal nodes.
+ // Otherwise comments accessible from CompositeNodes
+ // will be written twice.
+ f.writeNode(node)
+ if f.lastWritten != '\n' {
+ f.P()
+ }
+ return
+ }
+ defer f.SetPreviousNode(node)
+ info := f.fileNode.NodeInfo(node)
+ if info.LeadingComments().Len() > 0 {
+ f.writeInlineComments(info.LeadingComments())
+ if info.LeadingWhitespace() != "" {
+ f.Space()
+ }
+ }
+ f.writeNode(node)
+ f.Space()
+ f.writeTrailingEndComments(info.TrailingComments())
+}
+
+// writeMultilineComments writes the given comments as a newline-delimited block.
+// This is useful for both the beginning of a type (e.g. message, field, etc), as
+// well as the trailing comments attached to the beginning of a body block (e.g.
+// '{', '[', '<', etc).
+//
+// For example,
+//
+// // This is a comment spread across
+// // multiple lines.
+// message Foo {}
+func (f *formatter) writeMultilineComments(comments ast.Comments) {
+ f.writeMultilineCommentsMaybeCompact(comments, false)
+}
+
+func (f *formatter) writeMultilineCommentsMaybeCompact(comments ast.Comments, forceCompact bool) {
+ compact := forceCompact || isOpenBrace(f.previousNode)
+ for i := 0; i < comments.Len(); i++ {
+ comment := comments.Index(i)
+ if !compact && newlineCount(comment.LeadingWhitespace()) > 1 {
+ // Newlines between blocks of comments should be preserved.
+ //
+ // For example,
+ //
+ // // This is a license header
+ // // spread across multiple lines.
+ //
+ // // Package pet.v1 defines a PetStore API.
+ // package pet.v1;
+ //
+ f.P()
+ }
+ compact = false
+ f.writeComment(comment.RawText())
+ f.WriteString("\n")
+ }
+}
+
+// writeInlineComments writes the given comments in-line. Standard comments are
+// transformed to C-style comments so that we can safely write the comment in-line.
+//
+// Nearly all of these comments will already be C-style comments. The only cases we're
+// preventing are when the type is defined across multiple lines.
+//
+// For example, given the following:
+//
+// extend . google. // in-line comment
+// protobuf .
+// ExtensionRangeOptions {
+// optional string label = 20000;
+// }
+//
+// The formatted result is shown below:
+//
+// extend .google.protobuf./* in-line comment */ExtensionRangeOptions {
+// optional string label = 20000;
+// }
+func (f *formatter) writeInlineComments(comments ast.Comments) {
+ for i := 0; i < comments.Len(); i++ {
+ if i > 0 || comments.Index(i).LeadingWhitespace() != "" || f.lastWritten == ';' || f.lastWritten == '}' {
+ f.Space()
+ }
+ text := comments.Index(i).RawText()
+ if strings.HasPrefix(text, "//") {
+ text = strings.TrimSpace(strings.TrimPrefix(text, "//"))
+ text = "/* " + text + " */"
+ } else {
+ // no multi-line comments
+ lines := strings.Split(text, "\n")
+ for i := range lines {
+ lines[i] = strings.TrimSpace(lines[i])
+ }
+ text = strings.Join(lines, " ")
+ }
+ f.WriteString(text)
+ }
+}
+
+// writeTrailingEndComments writes the given comments at the end of a line and
+// preserves the comment style. This is useful or writing comments attached to
+// things like ';' and other tokens that conclude a type definition on a single
+// line.
+//
+// If there is a newline between this trailing comment and the previous node, the
+// comments are written immediately underneath the node on a newline.
+//
+// For example,
+//
+// enum Type {
+// TYPE_UNSPECIFIED = 0;
+// }
+// // This comment is attached to the '}'
+// // So is this one.
+func (f *formatter) writeTrailingEndComments(comments ast.Comments) {
+ for i := 0; i < comments.Len(); i++ {
+ comment := comments.Index(i)
+ if i > 0 || comment.LeadingWhitespace() != "" {
+ f.Space()
+ }
+ f.writeComment(comment.RawText())
+ }
+ f.P()
+}
+
+func (f *formatter) writeComment(comment string) {
+ if strings.HasPrefix(comment, "/*") && newlineCount(comment) > 0 {
+ lines := strings.Split(comment, "\n")
+ // find minimum indent, so we can make all other lines relative to that
+ minIndent := -1 // sentinel that means unset
+ // start at 1 because line at index zero starts with "/*", not whitespace
+ for i := 1; i < len(lines); i++ {
+ indent, ok := computeIndent(lines[i])
+ if ok && (minIndent == -1 || indent < minIndent) {
+ minIndent = indent
+ }
+ }
+ if minIndent < 0 {
+ // This shouldn't be necessary.
+ // But we do it just in case, to avoid possible panic
+ minIndent = 0
+ }
+ for i, line := range lines {
+ trimmedLine := strings.TrimSpace(line)
+ if trimmedLine == "" || trimmedLine == "*/" {
+ line = trimmedLine
+ } else {
+ // we only trim space from the right; for the left,
+ // we unindent based on indentation found above.
+ line = unindent(line, minIndent)
+ line = strings.TrimRightFunc(line, unicode.IsSpace)
+ }
+ if i > 0 && line != "*/" {
+ line = " " + line
+ }
+ if i != len(lines)-1 {
+ f.P(line)
+ } else {
+ // for last line, we don't use P because we don't
+ // want to print a trailing newline
+ f.Indent(nil)
+ f.WriteString(line)
+ }
+ }
+ } else {
+ f.Indent(nil)
+ f.WriteString(strings.TrimSpace(comment))
+ }
+}
+
+func unindent(s string, unindent int) string {
+ pos := 0
+ for i, r := range s {
+ if pos == unindent {
+ return s[i:]
+ }
+ if pos > unindent {
+ // removing tab-stop unindented too far, so we
+ // add back some spaces to compensate
+ return strings.Repeat(" ", pos-unindent) + s[i:]
+ }
+
+ switch r {
+ case ' ':
+ pos++
+ case '\t':
+ // jump to next tab stop
+ pos += 8 - (pos % 8)
+ default:
+ return s[i:]
+ }
+ }
+ // nothing but whitespace...
+ return ""
+}
+
+func computeIndent(s string) (int, bool) {
+ if strings.TrimSpace(s) == "*/" {
+ return 0, false
+ }
+ indent := 0
+ for _, r := range s {
+ switch r {
+ case ' ':
+ indent++
+ case '\t':
+ // jump to next tab stop
+ indent += 8 - (indent % 8)
+ default:
+ return indent, true
+ }
+ }
+ // if we get here, line is nothing but whitespace
+ return 0, false
+}
+
+func (f *formatter) leadingCommentsContainBlankLine(n ast.Node) bool {
+ info := f.fileNode.NodeInfo(n)
+ comments := info.LeadingComments()
+ for i := 0; i < comments.Len(); i++ {
+ if newlineCount(comments.Index(i).LeadingWhitespace()) > 1 {
+ return true
+ }
+ }
+ return newlineCount(info.LeadingWhitespace()) > 1
+}
+
+// stringForOptionName returns the string representation of the given option name node.
+// This is used for sorting file-level options.
+func stringForOptionName(optionNameNode *ast.OptionNameNode) string {
+ var result string
+ for j, part := range optionNameNode.Parts {
+ if j > 0 {
+ // Add a dot between each of the parts.
+ result += "."
+ }
+ result += stringForFieldReference(part)
+ }
+ return result
+}
+
+// stringForFieldReference returns the string representation of the given field reference.
+// This is used for sorting file-level options.
+func stringForFieldReference(fieldReference *ast.FieldReferenceNode) string {
+ var result string
+ if fieldReference.Open != nil {
+ result += "("
+ }
+ result += string(fieldReference.Name.AsIdentifier())
+ if fieldReference.Close != nil {
+ result += ")"
+ }
+ return result
+}
+
+// isOpenBrace returns true if the given node represents one of the
+// possible open brace tokens, namely '{', '[', or '<'.
+func isOpenBrace(node ast.Node) bool {
+ if node == nil {
+ return false
+ }
+ runeNode, ok := node.(*ast.RuneNode)
+ if !ok {
+ return false
+ }
+ return runeNode.Rune == '{' || runeNode.Rune == '[' || runeNode.Rune == '<'
+}
+
+// newlineCount returns the number of newlines in the given value.
+// This is useful for determining whether or not we should preserve
+// the newline between nodes.
+//
+// The newlines don't need to be adjacent to each other - all of the
+// tokens between them are other whitespace characters, so we can
+// safely ignore them.
+func newlineCount(value string) int {
+ return strings.Count(value, "\n")
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufformat/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/bufformat/usage.gen.go
new file mode 100644
index 000000000..d2dbcbd2e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufformat/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufformat
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufgen/bufgen.go b/vendor/github.com/bufbuild/buf/private/buf/bufgen/bufgen.go
new file mode 100644
index 000000000..254774519
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufgen/bufgen.go
@@ -0,0 +1,516 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufgen does configuration-based generation.
+//
+// It is used by the buf generate command.
+package bufgen
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "strconv"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+const (
+ // ExternalConfigFilePath is the default external configuration file path.
+ ExternalConfigFilePath = "buf.gen.yaml"
+ // V1Version is the string used to identify the v1 version of the generate template.
+ V1Version = "v1"
+ // V1Beta1Version is the string used to identify the v1beta1 version of the generate template.
+ V1Beta1Version = "v1beta1"
+)
+
+const (
+ // StrategyDirectory is the strategy that says to generate per directory.
+ //
+ // This is the default value.
+ StrategyDirectory Strategy = 1
+ // StrategyAll is the strategy that says to generate with all files at once.
+ StrategyAll Strategy = 2
+)
+
+// Strategy is a generation stategy.
+type Strategy int
+
+// ParseStrategy parses the Strategy.
+//
+// If the empty string is provided, this is interpreted as StrategyDirectory.
+func ParseStrategy(s string) (Strategy, error) {
+ switch s {
+ case "", "directory":
+ return StrategyDirectory, nil
+ case "all":
+ return StrategyAll, nil
+ default:
+ return 0, fmt.Errorf("unknown strategy: %s", s)
+ }
+}
+
+// String implements fmt.Stringer.
+func (s Strategy) String() string {
+ switch s {
+ case StrategyDirectory:
+ return "directory"
+ case StrategyAll:
+ return "all"
+ default:
+ return strconv.Itoa(int(s))
+ }
+}
+
+// Provider is a provider.
+type Provider interface {
+ // GetConfig gets the Config for the YAML data at ExternalConfigFilePath.
+ //
+ // If the data is of length 0, returns the default config.
+ GetConfig(ctx context.Context, readBucket storage.ReadBucket) (*Config, error)
+}
+
+// NewProvider returns a new Provider.
+func NewProvider(logger *zap.Logger) Provider {
+ return newProvider(logger)
+}
+
+// Generator generates Protobuf stubs based on configurations.
+type Generator interface {
+ // Generate calls the generation logic.
+ //
+ // The config is assumed to be valid. If created by ReadConfig, it will
+ // always be valid.
+ Generate(
+ ctx context.Context,
+ container app.EnvStdioContainer,
+ config *Config,
+ image bufimage.Image,
+ options ...GenerateOption,
+ ) error
+}
+
+// NewGenerator returns a new Generator.
+func NewGenerator(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ clientConfig *connectclient.Config,
+) Generator {
+ return newGenerator(
+ logger,
+ storageosProvider,
+ runner,
+ clientConfig,
+ )
+}
+
+// GenerateOption is an option for Generate.
+type GenerateOption func(*generateOptions)
+
+// GenerateWithBaseOutDirPath returns a new GenerateOption that uses the given
+// base directory as the output directory.
+//
+// The default is to use the current directory.
+func GenerateWithBaseOutDirPath(baseOutDirPath string) GenerateOption {
+ return func(generateOptions *generateOptions) {
+ generateOptions.baseOutDirPath = baseOutDirPath
+ }
+}
+
+// GenerateWithIncludeImports says to also generate imports.
+//
+// Note that this does NOT result in the Well-Known Types being generated, use
+// GenerateWithIncludeWellKnownTypes to include the Well-Known Types.
+func GenerateWithIncludeImports() GenerateOption {
+ return func(generateOptions *generateOptions) {
+ generateOptions.includeImports = true
+ }
+}
+
+// GenerateWithIncludeWellKnownTypes says to also generate well known types.
+//
+// This option has no effect if GenerateWithIncludeImports is not set.
+func GenerateWithIncludeWellKnownTypes() GenerateOption {
+ return func(generateOptions *generateOptions) {
+ generateOptions.includeWellKnownTypes = true
+ }
+}
+
+// Config is a configuration.
+type Config struct {
+ // Required
+ PluginConfigs []*PluginConfig
+ // Optional
+ ManagedConfig *ManagedConfig
+ // Optional
+ TypesConfig *TypesConfig
+}
+
+// PluginConfig is a plugin configuration.
+type PluginConfig struct {
+ // One of Plugin, Name or Remote is required
+ Plugin string
+ Name string
+ Remote string
+ // Optional, used with Plugin to pin a specific revision
+ Revision int
+ // Required
+ Out string
+ // Optional
+ Opt string
+ // Optional, exclusive with Remote
+ Path string
+ // Required
+ Strategy Strategy
+}
+
+// PluginName returns this PluginConfig's plugin name.
+// Only one of Plugin, Name or Remote will be set.
+func (p *PluginConfig) PluginName() string {
+ if p == nil {
+ return ""
+ }
+ if p.Plugin != "" {
+ return p.Plugin
+ }
+ if p.Name != "" {
+ return p.Name
+ }
+ if p.Remote != "" {
+ return p.Remote
+ }
+ return ""
+}
+
+// IsRemote returns true if the PluginConfig uses a remotely executed plugin.
+func (p *PluginConfig) IsRemote() bool {
+ return p.GetRemoteHostname() != ""
+}
+
+// GetRemoteHostname returns the hostname of the remote plugin.
+func (p *PluginConfig) GetRemoteHostname() string {
+ if p == nil {
+ return ""
+ }
+ if identity, err := bufpluginref.PluginIdentityForString(p.Plugin); err == nil {
+ return identity.Remote()
+ }
+ if reference, err := bufpluginref.PluginReferenceForString(p.Plugin, 0); err == nil {
+ return reference.Remote()
+ }
+ if p.Remote == "" {
+ return ""
+ }
+ if remote, _, _, _, err := bufremoteplugin.ParsePluginVersionPath(p.Remote); err == nil {
+ return remote
+ }
+ return ""
+}
+
+// ManagedConfig is the managed mode configuration.
+type ManagedConfig struct {
+ CcEnableArenas *bool
+ JavaMultipleFiles *bool
+ JavaStringCheckUtf8 *bool
+ JavaPackagePrefix *JavaPackagePrefixConfig
+ CsharpNameSpaceConfig *CsharpNameSpaceConfig
+ OptimizeForConfig *OptimizeForConfig
+ GoPackagePrefixConfig *GoPackagePrefixConfig
+ Override map[string]map[string]string
+}
+
+// JavaPackagePrefixConfig is the java_package prefix configuration.
+type JavaPackagePrefixConfig struct {
+ Default string
+ Except []bufmoduleref.ModuleIdentity
+ // bufmoduleref.ModuleIdentity -> java_package prefix.
+ Override map[bufmoduleref.ModuleIdentity]string
+}
+
+type OptimizeForConfig struct {
+ Default descriptorpb.FileOptions_OptimizeMode
+ Except []bufmoduleref.ModuleIdentity
+ // bufmoduleref.ModuleIdentity -> optimize_for.
+ Override map[bufmoduleref.ModuleIdentity]descriptorpb.FileOptions_OptimizeMode
+}
+
+// GoPackagePrefixConfig is the go_package prefix configuration.
+type GoPackagePrefixConfig struct {
+ Default string
+ Except []bufmoduleref.ModuleIdentity
+ // bufmoduleref.ModuleIdentity -> go_package prefix.
+ Override map[bufmoduleref.ModuleIdentity]string
+}
+
+// CsharpNameSpaceConfig is the csharp_namespace configuration.
+type CsharpNameSpaceConfig struct {
+ Except []bufmoduleref.ModuleIdentity
+ // bufmoduleref.ModuleIdentity -> csharp_namespace prefix.
+ Override map[bufmoduleref.ModuleIdentity]string
+}
+
+// TypesConfig is a types configuration
+type TypesConfig struct {
+ Include []string
+}
+
+// ReadConfig reads the configuration from the OS or an override, if any.
+//
+// Only use in CLI tools.
+func ReadConfig(
+ ctx context.Context,
+ logger *zap.Logger,
+ provider Provider,
+ readBucket storage.ReadBucket,
+ options ...ReadConfigOption,
+) (*Config, error) {
+ return readConfig(
+ ctx,
+ logger,
+ provider,
+ readBucket,
+ options...,
+ )
+}
+
+// ReadConfigOption is an option for ReadConfig.
+type ReadConfigOption func(*readConfigOptions)
+
+// ReadConfigWithOverride sets the override.
+//
+// If override is set, this will first check if the override ends in .json or .yaml, if so,
+// this reads the file at this path and uses it. Otherwise, this assumes this is configuration
+// data in either JSON or YAML format, and unmarshals it.
+//
+// If no override is set, this reads ExternalConfigFilePath in the bucket.
+func ReadConfigWithOverride(override string) ReadConfigOption {
+ return func(readConfigOptions *readConfigOptions) {
+ readConfigOptions.override = override
+ }
+}
+
+// ConfigExists checks if a generation configuration file exists.
+func ConfigExists(ctx context.Context, readBucket storage.ReadBucket) (bool, error) {
+ return storage.Exists(ctx, readBucket, ExternalConfigFilePath)
+}
+
+// ExternalConfigV1 is an external configuration.
+type ExternalConfigV1 struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ Plugins []ExternalPluginConfigV1 `json:"plugins,omitempty" yaml:"plugins,omitempty"`
+ Managed ExternalManagedConfigV1 `json:"managed,omitempty" yaml:"managed,omitempty"`
+ Types *ExternalTypesConfigV1 `json:"types,omitempty" yaml:"types,omitempty"`
+}
+
+// ExternalPluginConfigV1 is an external plugin configuration.
+type ExternalPluginConfigV1 struct {
+ Plugin string `json:"plugin,omitempty" yaml:"plugin,omitempty"`
+ Revision int `json:"revision,omitempty" yaml:"revision,omitempty"`
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+ Remote string `json:"remote,omitempty" yaml:"remote,omitempty"`
+ Out string `json:"out,omitempty" yaml:"out,omitempty"`
+ Opt interface{} `json:"opt,omitempty" yaml:"opt,omitempty"`
+ Path string `json:"path,omitempty" yaml:"path,omitempty"`
+ Strategy string `json:"strategy,omitempty" yaml:"strategy,omitempty"`
+}
+
+// ExternalManagedConfigV1 is an external managed mode configuration.
+//
+// Only use outside of this package for testing.
+type ExternalManagedConfigV1 struct {
+ Enabled bool `json:"enabled,omitempty" yaml:"enabled,omitempty"`
+ CcEnableArenas *bool `json:"cc_enable_arenas,omitempty" yaml:"cc_enable_arenas,omitempty"`
+ JavaMultipleFiles *bool `json:"java_multiple_files,omitempty" yaml:"java_multiple_files,omitempty"`
+ JavaStringCheckUtf8 *bool `json:"java_string_check_utf8,omitempty" yaml:"java_string_check_utf8,omitempty"`
+ JavaPackagePrefix ExternalJavaPackagePrefixConfigV1 `json:"java_package_prefix,omitempty" yaml:"java_package_prefix,omitempty"`
+ CsharpNamespace ExternalCsharpNamespaceConfigV1 `json:"csharp_namespace,omitempty" yaml:"csharp_namespace,omitempty"`
+ OptimizeFor ExternalOptimizeForConfigV1 `json:"optimize_for,omitempty" yaml:"optimize_for,omitempty"`
+ GoPackagePrefix ExternalGoPackagePrefixConfigV1 `json:"go_package_prefix,omitempty" yaml:"go_package_prefix,omitempty"`
+ Override map[string]map[string]string `json:"override,omitempty" yaml:"override,omitempty"`
+}
+
+// IsEmpty returns true if the config is empty, excluding the 'Enabled' setting.
+func (e ExternalManagedConfigV1) IsEmpty() bool {
+ return e.CcEnableArenas == nil &&
+ e.JavaMultipleFiles == nil &&
+ e.JavaStringCheckUtf8 == nil &&
+ e.JavaPackagePrefix.IsEmpty() &&
+ e.OptimizeFor.IsEmpty() &&
+ e.GoPackagePrefix.IsEmpty() &&
+ len(e.Override) == 0
+}
+
+// ExternalJavaPackagePrefixConfigV1 is the external java_package prefix configuration.
+type ExternalJavaPackagePrefixConfigV1 struct {
+ Default string `json:"default,omitempty" yaml:"default,omitempty"`
+ Except []string `json:"except,omitempty" yaml:"except,omitempty"`
+ Override map[string]string `json:"override,omitempty" yaml:"override,omitempty"`
+}
+
+// IsEmpty returns true if the config is empty.
+func (e ExternalJavaPackagePrefixConfigV1) IsEmpty() bool {
+ return e.Default == "" &&
+ len(e.Except) == 0 &&
+ len(e.Override) == 0
+}
+
+// UnmarshalYAML satisfies the yaml.Unmarshaler interface. This is done to maintain backward compatibility
+// of accepting a plain string value for java_package_prefix.
+func (e *ExternalJavaPackagePrefixConfigV1) UnmarshalYAML(unmarshal func(interface{}) error) error {
+ return e.unmarshalWith(unmarshal)
+}
+
+// UnmarshalJSON satisfies the json.Unmarshaler interface. This is done to maintain backward compatibility
+// of accepting a plain string value for java_package_prefix.
+func (e *ExternalJavaPackagePrefixConfigV1) UnmarshalJSON(data []byte) error {
+ unmarshal := func(v interface{}) error {
+ return json.Unmarshal(data, v)
+ }
+
+ return e.unmarshalWith(unmarshal)
+}
+
+// unmarshalWith is used to unmarshal into json/yaml. See https://abhinavg.net/posts/flexible-yaml for details.
+func (e *ExternalJavaPackagePrefixConfigV1) unmarshalWith(unmarshal func(interface{}) error) error {
+ var prefix string
+ if err := unmarshal(&prefix); err == nil {
+ e.Default = prefix
+ return nil
+ }
+
+ type rawExternalJavaPackagePrefixConfigV1 ExternalJavaPackagePrefixConfigV1
+ if err := unmarshal((*rawExternalJavaPackagePrefixConfigV1)(e)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ExternalOptimizeForConfigV1 is the external optimize_for configuration.
+type ExternalOptimizeForConfigV1 struct {
+ Default string `json:"default,omitempty" yaml:"default,omitempty"`
+ Except []string `json:"except,omitempty" yaml:"except,omitempty"`
+ Override map[string]string `json:"override,omitempty" yaml:"override,omitempty"`
+}
+
+// IsEmpty returns true if the config is empty
+func (e ExternalOptimizeForConfigV1) IsEmpty() bool {
+ return e.Default == "" &&
+ len(e.Except) == 0 &&
+ len(e.Override) == 0
+}
+
+// UnmarshalYAML satisfies the yaml.Unmarshaler interface. This is done to maintain backward compatibility
+// of accepting a plain string value for optimize_for.
+func (e *ExternalOptimizeForConfigV1) UnmarshalYAML(unmarshal func(interface{}) error) error {
+ return e.unmarshalWith(unmarshal)
+}
+
+// UnmarshalJSON satisfies the json.Unmarshaler interface. This is done to maintain backward compatibility
+// of accepting a plain string value for optimize_for.
+func (e *ExternalOptimizeForConfigV1) UnmarshalJSON(data []byte) error {
+ unmarshal := func(v interface{}) error {
+ return json.Unmarshal(data, v)
+ }
+
+ return e.unmarshalWith(unmarshal)
+}
+
+// unmarshalWith is used to unmarshal into json/yaml. See https://abhinavg.net/posts/flexible-yaml for details.
+func (e *ExternalOptimizeForConfigV1) unmarshalWith(unmarshal func(interface{}) error) error {
+ var optimizeFor string
+ if err := unmarshal(&optimizeFor); err == nil {
+ e.Default = optimizeFor
+ return nil
+ }
+
+ type rawExternalOptimizeForConfigV1 ExternalOptimizeForConfigV1
+ if err := unmarshal((*rawExternalOptimizeForConfigV1)(e)); err != nil {
+ return err
+ }
+
+ return nil
+}
+
+// ExternalGoPackagePrefixConfigV1 is the external go_package prefix configuration.
+type ExternalGoPackagePrefixConfigV1 struct {
+ Default string `json:"default,omitempty" yaml:"default,omitempty"`
+ Except []string `json:"except,omitempty" yaml:"except,omitempty"`
+ Override map[string]string `json:"override,omitempty" yaml:"override,omitempty"`
+}
+
+// IsEmpty returns true if the config is empty.
+func (e ExternalGoPackagePrefixConfigV1) IsEmpty() bool {
+ return e.Default == "" &&
+ len(e.Except) == 0 &&
+ len(e.Override) == 0
+}
+
+// ExternalCsharpNamespaceConfigV1 is the external csharp_namespace configuration.
+type ExternalCsharpNamespaceConfigV1 struct {
+ Except []string `json:"except,omitempty" yaml:"except,omitempty"`
+ Override map[string]string `json:"override,omitempty" yaml:"override,omitempty"`
+}
+
+// IsEmpty returns true if the config is empty.
+func (e ExternalCsharpNamespaceConfigV1) IsEmpty() bool {
+ return len(e.Except) == 0 &&
+ len(e.Override) == 0
+}
+
+// ExternalConfigV1Beta1 is an external configuration.
+type ExternalConfigV1Beta1 struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ Managed bool `json:"managed,omitempty" yaml:"managed,omitempty"`
+ Plugins []ExternalPluginConfigV1Beta1 `json:"plugins,omitempty" yaml:"plugins,omitempty"`
+ Options ExternalOptionsConfigV1Beta1 `json:"options,omitempty" yaml:"options,omitempty"`
+}
+
+// ExternalPluginConfigV1Beta1 is an external plugin configuration.
+type ExternalPluginConfigV1Beta1 struct {
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+ Out string `json:"out,omitempty" yaml:"out,omitempty"`
+ Opt interface{} `json:"opt,omitempty" yaml:"opt,omitempty"`
+ Path string `json:"path,omitempty" yaml:"path,omitempty"`
+ Strategy string `json:"strategy,omitempty" yaml:"strategy,omitempty"`
+}
+
+// ExternalOptionsConfigV1Beta1 is an external options configuration.
+type ExternalOptionsConfigV1Beta1 struct {
+ CcEnableArenas *bool `json:"cc_enable_arenas,omitempty" yaml:"cc_enable_arenas,omitempty"`
+ JavaMultipleFiles *bool `json:"java_multiple_files,omitempty" yaml:"java_multiple_files,omitempty"`
+ OptimizeFor string `json:"optimize_for,omitempty" yaml:"optimize_for,omitempty"`
+}
+
+// ExternalConfigVersion defines the subset of all config
+// file versions that is used to determine the configuration version.
+type ExternalConfigVersion struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+}
+
+// ExternalTypesConfigV1 is an external types configuration.
+type ExternalTypesConfigV1 struct {
+ Include []string `json:"include,omitempty" yaml:"include"`
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufgen/config.go b/vendor/github.com/bufbuild/buf/private/buf/bufgen/config.go
new file mode 100644
index 000000000..9d3002fac
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufgen/config.go
@@ -0,0 +1,573 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufgen
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/pkg/encoding"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+func readConfig(
+ ctx context.Context,
+ logger *zap.Logger,
+ provider Provider,
+ readBucket storage.ReadBucket,
+ options ...ReadConfigOption,
+) (*Config, error) {
+ readConfigOptions := newReadConfigOptions()
+ for _, option := range options {
+ option(readConfigOptions)
+ }
+ if override := readConfigOptions.override; override != "" {
+ switch filepath.Ext(override) {
+ case ".json":
+ return getConfigJSONFile(logger, override)
+ case ".yaml", ".yml":
+ return getConfigYAMLFile(logger, override)
+ default:
+ return getConfigJSONOrYAMLData(logger, override)
+ }
+ }
+ return provider.GetConfig(ctx, readBucket)
+}
+
+func getConfigJSONFile(logger *zap.Logger, file string) (*Config, error) {
+ data, err := os.ReadFile(file)
+ if err != nil {
+ return nil, fmt.Errorf("could not read file %s: %v", file, err)
+ }
+ return getConfig(
+ logger,
+ encoding.UnmarshalJSONNonStrict,
+ encoding.UnmarshalJSONStrict,
+ data,
+ file,
+ )
+}
+
+func getConfigYAMLFile(logger *zap.Logger, file string) (*Config, error) {
+ data, err := os.ReadFile(file)
+ if err != nil {
+ return nil, fmt.Errorf("could not read file %s: %v", file, err)
+ }
+ return getConfig(
+ logger,
+ encoding.UnmarshalYAMLNonStrict,
+ encoding.UnmarshalYAMLStrict,
+ data,
+ file,
+ )
+}
+
+func getConfigJSONOrYAMLData(logger *zap.Logger, data string) (*Config, error) {
+ return getConfig(
+ logger,
+ encoding.UnmarshalJSONOrYAMLNonStrict,
+ encoding.UnmarshalJSONOrYAMLStrict,
+ []byte(data),
+ "Generate configuration data",
+ )
+}
+
+func getConfig(
+ logger *zap.Logger,
+ unmarshalNonStrict func([]byte, interface{}) error,
+ unmarshalStrict func([]byte, interface{}) error,
+ data []byte,
+ id string,
+) (*Config, error) {
+ var externalConfigVersion ExternalConfigVersion
+ if err := unmarshalNonStrict(data, &externalConfigVersion); err != nil {
+ return nil, err
+ }
+ switch externalConfigVersion.Version {
+ case V1Beta1Version:
+ var externalConfigV1Beta1 ExternalConfigV1Beta1
+ if err := unmarshalStrict(data, &externalConfigV1Beta1); err != nil {
+ return nil, err
+ }
+ if err := validateExternalConfigV1Beta1(externalConfigV1Beta1, id); err != nil {
+ return nil, err
+ }
+ return newConfigV1Beta1(externalConfigV1Beta1, id)
+ case V1Version:
+ var externalConfigV1 ExternalConfigV1
+ if err := unmarshalStrict(data, &externalConfigV1); err != nil {
+ return nil, err
+ }
+ if err := validateExternalConfigV1(externalConfigV1, id); err != nil {
+ return nil, err
+ }
+ return newConfigV1(logger, externalConfigV1, id)
+ default:
+ return nil, fmt.Errorf(`%s has no version set. Please add "version: %s"`, id, V1Version)
+ }
+}
+
+func newConfigV1(logger *zap.Logger, externalConfig ExternalConfigV1, id string) (*Config, error) {
+ managedConfig, err := newManagedConfigV1(logger, externalConfig.Managed)
+ if err != nil {
+ return nil, err
+ }
+ pluginConfigs := make([]*PluginConfig, 0, len(externalConfig.Plugins))
+ for _, plugin := range externalConfig.Plugins {
+ strategy, err := ParseStrategy(plugin.Strategy)
+ if err != nil {
+ return nil, err
+ }
+ opt, err := encoding.InterfaceSliceOrStringToCommaSepString(plugin.Opt)
+ if err != nil {
+ return nil, err
+ }
+ pluginConfig := &PluginConfig{
+ Plugin: plugin.Plugin,
+ Revision: plugin.Revision,
+ Name: plugin.Name,
+ Remote: plugin.Remote,
+ Out: plugin.Out,
+ Opt: opt,
+ Path: plugin.Path,
+ Strategy: strategy,
+ }
+ if pluginConfig.IsRemote() {
+ // Always use StrategyAll for remote plugins
+ pluginConfig.Strategy = StrategyAll
+ }
+ pluginConfigs = append(pluginConfigs, pluginConfig)
+ }
+ typesConfig := newTypesConfigV1(externalConfig.Types)
+ return &Config{
+ PluginConfigs: pluginConfigs,
+ ManagedConfig: managedConfig,
+ TypesConfig: typesConfig,
+ }, nil
+}
+
+func validateExternalConfigV1(externalConfig ExternalConfigV1, id string) error {
+ if len(externalConfig.Plugins) == 0 {
+ return fmt.Errorf("%s: no plugins set", id)
+ }
+ for _, plugin := range externalConfig.Plugins {
+ var numPluginIdentifiers int
+ var pluginIdentifier string
+ for _, possibleIdentifier := range []string{plugin.Plugin, plugin.Name, plugin.Remote} {
+ if possibleIdentifier != "" {
+ numPluginIdentifiers++
+ // Doesn't matter if we reassign here - we only allow one to be set below
+ pluginIdentifier = possibleIdentifier
+ }
+ }
+ if numPluginIdentifiers == 0 {
+ return fmt.Errorf("%s: one of plugin, name or remote is required", id)
+ }
+ if numPluginIdentifiers > 1 {
+ return fmt.Errorf("%s: only one of plugin, name, or remote can be set", id)
+ }
+ if plugin.Out == "" {
+ return fmt.Errorf("%s: plugin %s out is required", id, pluginIdentifier)
+ }
+ switch {
+ case plugin.Plugin != "":
+ if bufpluginref.IsPluginReferenceOrIdentity(pluginIdentifier) {
+ // plugin.Plugin is a remote plugin
+ if err := checkPathAndStrategyUnset(id, plugin, pluginIdentifier); err != nil {
+ return err
+ }
+ } else {
+ // plugin.Plugin is a local plugin - verify it isn't using an alpha remote plugin path
+ if _, _, _, _, err := bufremoteplugin.ParsePluginVersionPath(pluginIdentifier); err == nil {
+ return fmt.Errorf("%s: invalid local plugin", id)
+ }
+ }
+ case plugin.Remote != "":
+ if _, _, _, _, err := bufremoteplugin.ParsePluginVersionPath(pluginIdentifier); err != nil {
+ return fmt.Errorf("%s: invalid remote plugin name: %w", id, err)
+ }
+ if err := checkPathAndStrategyUnset(id, plugin, pluginIdentifier); err != nil {
+ return err
+ }
+ case plugin.Name != "":
+ // Check that the plugin name doesn't look like a plugin reference
+ if bufpluginref.IsPluginReferenceOrIdentity(pluginIdentifier) {
+ return fmt.Errorf("%s: invalid local plugin name: %s", id, pluginIdentifier)
+ }
+ // Check that the plugin name doesn't look like an alpha remote plugin
+ if _, _, _, _, err := bufremoteplugin.ParsePluginVersionPath(pluginIdentifier); err == nil {
+ return fmt.Errorf("%s: invalid plugin name %s, did you mean to use a remote plugin?", id, pluginIdentifier)
+ }
+ default:
+ // unreachable - validated above
+ return errors.New("one of plugin, name, or remote is required")
+ }
+ }
+ return nil
+}
+
+func checkPathAndStrategyUnset(id string, plugin ExternalPluginConfigV1, pluginIdentifier string) error {
+ if plugin.Path != "" {
+ return fmt.Errorf("%s: remote plugin %s cannot specify a path", id, pluginIdentifier)
+ }
+ if plugin.Strategy != "" {
+ return fmt.Errorf("%s: remote plugin %s cannot specify a strategy", id, pluginIdentifier)
+ }
+ return nil
+}
+
+func newManagedConfigV1(logger *zap.Logger, externalManagedConfig ExternalManagedConfigV1) (*ManagedConfig, error) {
+ if !externalManagedConfig.Enabled {
+ if !externalManagedConfig.IsEmpty() && logger != nil {
+ logger.Sugar().Warn("managed mode options are set but are not enabled")
+ }
+ return nil, nil
+ }
+ javaPackagePrefixConfig, err := newJavaPackagePrefixConfigV1(externalManagedConfig.JavaPackagePrefix)
+ if err != nil {
+ return nil, err
+ }
+ csharpNamespaceConfig, err := newCsharpNamespaceConfigV1(externalManagedConfig.CsharpNamespace)
+ if err != nil {
+ return nil, err
+ }
+ optimizeForConfig, err := newOptimizeForConfigV1(externalManagedConfig.OptimizeFor)
+ if err != nil {
+ return nil, err
+ }
+ goPackagePrefixConfig, err := newGoPackagePrefixConfigV1(externalManagedConfig.GoPackagePrefix)
+ if err != nil {
+ return nil, err
+ }
+ override := externalManagedConfig.Override
+ for overrideID, overrideValue := range override {
+ for importPath := range overrideValue {
+ normalizedImportPath, err := normalpath.NormalizeAndValidate(importPath)
+ if err != nil {
+ return nil, fmt.Errorf(
+ "failed to normalize import path: %s provided for override: %s",
+ importPath,
+ overrideID,
+ )
+ }
+ if importPath != normalizedImportPath {
+ return nil, fmt.Errorf(
+ "override can only take normalized import paths, invalid import path: %s provided for override: %s",
+ importPath,
+ overrideID,
+ )
+ }
+ }
+ }
+ return &ManagedConfig{
+ CcEnableArenas: externalManagedConfig.CcEnableArenas,
+ JavaMultipleFiles: externalManagedConfig.JavaMultipleFiles,
+ JavaStringCheckUtf8: externalManagedConfig.JavaStringCheckUtf8,
+ JavaPackagePrefix: javaPackagePrefixConfig,
+ CsharpNameSpaceConfig: csharpNamespaceConfig,
+ OptimizeForConfig: optimizeForConfig,
+ GoPackagePrefixConfig: goPackagePrefixConfig,
+ Override: override,
+ }, nil
+}
+
+func newJavaPackagePrefixConfigV1(externalJavaPackagePrefixConfig ExternalJavaPackagePrefixConfigV1) (*JavaPackagePrefixConfig, error) {
+ if externalJavaPackagePrefixConfig.IsEmpty() {
+ return nil, nil
+ }
+ if externalJavaPackagePrefixConfig.Default == "" {
+ return nil, errors.New("java_package_prefix setting requires a default value")
+ }
+ seenModuleIdentities := make(map[string]struct{}, len(externalJavaPackagePrefixConfig.Except))
+ except := make([]bufmoduleref.ModuleIdentity, 0, len(externalJavaPackagePrefixConfig.Except))
+ for _, moduleName := range externalJavaPackagePrefixConfig.Except {
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(moduleName)
+ if err != nil {
+ return nil, fmt.Errorf("invalid java_package_prefix except: %w", err)
+ }
+ if _, ok := seenModuleIdentities[moduleIdentity.IdentityString()]; ok {
+ return nil, fmt.Errorf("invalid java_package_prefix except: %q is defined multiple times", moduleIdentity.IdentityString())
+ }
+ seenModuleIdentities[moduleIdentity.IdentityString()] = struct{}{}
+ except = append(except, moduleIdentity)
+ }
+ override := make(map[bufmoduleref.ModuleIdentity]string, len(externalJavaPackagePrefixConfig.Override))
+ for moduleName, javaPackagePrefix := range externalJavaPackagePrefixConfig.Override {
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(moduleName)
+ if err != nil {
+ return nil, fmt.Errorf("invalid java_package_prefix override key: %w", err)
+ }
+ if _, ok := seenModuleIdentities[moduleIdentity.IdentityString()]; ok {
+ return nil, fmt.Errorf("invalid java_package_prefix override: %q is already defined as an except", moduleIdentity.IdentityString())
+ }
+ seenModuleIdentities[moduleIdentity.IdentityString()] = struct{}{}
+ override[moduleIdentity] = javaPackagePrefix
+ }
+ return &JavaPackagePrefixConfig{
+ Default: externalJavaPackagePrefixConfig.Default,
+ Except: except,
+ Override: override,
+ }, nil
+}
+
+func newOptimizeForConfigV1(externalOptimizeForConfigV1 ExternalOptimizeForConfigV1) (*OptimizeForConfig, error) {
+ if externalOptimizeForConfigV1.IsEmpty() {
+ return nil, nil
+ }
+ if externalOptimizeForConfigV1.Default == "" {
+ return nil, errors.New("optimize_for setting requires a default value")
+ }
+ value, ok := descriptorpb.FileOptions_OptimizeMode_value[externalOptimizeForConfigV1.Default]
+ if !ok {
+ return nil, fmt.Errorf(
+ "invalid optimize_for default value; expected one of %v",
+ enumMapToStringSlice(descriptorpb.FileOptions_OptimizeMode_value),
+ )
+ }
+ defaultOptimizeFor := descriptorpb.FileOptions_OptimizeMode(value)
+ seenModuleIdentities := make(map[string]struct{}, len(externalOptimizeForConfigV1.Except))
+ except := make([]bufmoduleref.ModuleIdentity, 0, len(externalOptimizeForConfigV1.Except))
+ for _, moduleName := range externalOptimizeForConfigV1.Except {
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(moduleName)
+ if err != nil {
+ return nil, fmt.Errorf("invalid optimize_for except: %w", err)
+ }
+ if _, ok := seenModuleIdentities[moduleIdentity.IdentityString()]; ok {
+ return nil, fmt.Errorf("invalid optimize_for except: %q is defined multiple times", moduleIdentity.IdentityString())
+ }
+ seenModuleIdentities[moduleIdentity.IdentityString()] = struct{}{}
+ except = append(except, moduleIdentity)
+ }
+ override := make(map[bufmoduleref.ModuleIdentity]descriptorpb.FileOptions_OptimizeMode, len(externalOptimizeForConfigV1.Override))
+ for moduleName, optimizeFor := range externalOptimizeForConfigV1.Override {
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(moduleName)
+ if err != nil {
+ return nil, fmt.Errorf("invalid optimize_for override key: %w", err)
+ }
+ value, ok := descriptorpb.FileOptions_OptimizeMode_value[optimizeFor]
+ if !ok {
+ return nil, fmt.Errorf(
+ "invalid optimize_for override value; expected one of %v",
+ enumMapToStringSlice(descriptorpb.FileOptions_OptimizeMode_value),
+ )
+ }
+ if _, ok := seenModuleIdentities[moduleIdentity.IdentityString()]; ok {
+ return nil, fmt.Errorf(
+ "invalid optimize_for override: %q is already defined as an except",
+ moduleIdentity.IdentityString(),
+ )
+ }
+ seenModuleIdentities[moduleIdentity.IdentityString()] = struct{}{}
+ override[moduleIdentity] = descriptorpb.FileOptions_OptimizeMode(value)
+ }
+ return &OptimizeForConfig{
+ Default: defaultOptimizeFor,
+ Except: except,
+ Override: override,
+ }, nil
+}
+
+func newGoPackagePrefixConfigV1(externalGoPackagePrefixConfig ExternalGoPackagePrefixConfigV1) (*GoPackagePrefixConfig, error) {
+ if externalGoPackagePrefixConfig.IsEmpty() {
+ return nil, nil
+ }
+ if externalGoPackagePrefixConfig.Default == "" {
+ return nil, errors.New("go_package_prefix setting requires a default value")
+ }
+ defaultGoPackagePrefix, err := normalpath.NormalizeAndValidate(externalGoPackagePrefixConfig.Default)
+ if err != nil {
+ return nil, fmt.Errorf("invalid go_package_prefix default: %w", err)
+ }
+ seenModuleIdentities := make(map[string]struct{}, len(externalGoPackagePrefixConfig.Except))
+ except := make([]bufmoduleref.ModuleIdentity, 0, len(externalGoPackagePrefixConfig.Except))
+ for _, moduleName := range externalGoPackagePrefixConfig.Except {
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(moduleName)
+ if err != nil {
+ return nil, fmt.Errorf("invalid go_package_prefix except: %w", err)
+ }
+ if _, ok := seenModuleIdentities[moduleIdentity.IdentityString()]; ok {
+ return nil, fmt.Errorf("invalid go_package_prefix except: %q is defined multiple times", moduleIdentity.IdentityString())
+ }
+ seenModuleIdentities[moduleIdentity.IdentityString()] = struct{}{}
+ except = append(except, moduleIdentity)
+ }
+ override := make(map[bufmoduleref.ModuleIdentity]string, len(externalGoPackagePrefixConfig.Override))
+ for moduleName, goPackagePrefix := range externalGoPackagePrefixConfig.Override {
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(moduleName)
+ if err != nil {
+ return nil, fmt.Errorf("invalid go_package_prefix override key: %w", err)
+ }
+ normalizedGoPackagePrefix, err := normalpath.NormalizeAndValidate(goPackagePrefix)
+ if err != nil {
+ return nil, fmt.Errorf("invalid go_package_prefix override value: %w", err)
+ }
+ if _, ok := seenModuleIdentities[moduleIdentity.IdentityString()]; ok {
+ return nil, fmt.Errorf("invalid go_package_prefix override: %q is already defined as an except", moduleIdentity.IdentityString())
+ }
+ seenModuleIdentities[moduleIdentity.IdentityString()] = struct{}{}
+ override[moduleIdentity] = normalizedGoPackagePrefix
+ }
+ return &GoPackagePrefixConfig{
+ Default: defaultGoPackagePrefix,
+ Except: except,
+ Override: override,
+ }, nil
+}
+
+func newCsharpNamespaceConfigV1(
+ externalCsharpNamespaceConfig ExternalCsharpNamespaceConfigV1,
+) (*CsharpNameSpaceConfig, error) {
+ if externalCsharpNamespaceConfig.IsEmpty() {
+ return nil, nil
+ }
+ seenModuleIdentities := make(map[string]struct{}, len(externalCsharpNamespaceConfig.Except))
+ except := make([]bufmoduleref.ModuleIdentity, 0, len(externalCsharpNamespaceConfig.Except))
+ for _, moduleName := range externalCsharpNamespaceConfig.Except {
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(moduleName)
+ if err != nil {
+ return nil, fmt.Errorf("invalid csharp_namespace except: %w", err)
+ }
+ if _, ok := seenModuleIdentities[moduleIdentity.IdentityString()]; ok {
+ return nil, fmt.Errorf("invalid csharp_namespace except: %q is defined multiple times", moduleIdentity.IdentityString())
+ }
+ seenModuleIdentities[moduleIdentity.IdentityString()] = struct{}{}
+ except = append(except, moduleIdentity)
+ }
+ override := make(map[bufmoduleref.ModuleIdentity]string, len(externalCsharpNamespaceConfig.Override))
+ for moduleName, csharpNamespace := range externalCsharpNamespaceConfig.Override {
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(moduleName)
+ if err != nil {
+ return nil, fmt.Errorf("invalid csharp_namespace override key: %w", err)
+ }
+ if _, ok := seenModuleIdentities[moduleIdentity.IdentityString()]; ok {
+ return nil, fmt.Errorf("invalid csharp_namespace override: %q is already defined as an except", moduleIdentity.IdentityString())
+ }
+ seenModuleIdentities[moduleIdentity.IdentityString()] = struct{}{}
+ override[moduleIdentity] = csharpNamespace
+ }
+ return &CsharpNameSpaceConfig{
+ Except: except,
+ Override: override,
+ }, nil
+}
+
+func newConfigV1Beta1(externalConfig ExternalConfigV1Beta1, id string) (*Config, error) {
+ managedConfig, err := newManagedConfigV1Beta1(externalConfig.Options, externalConfig.Managed)
+ if err != nil {
+ return nil, err
+ }
+ pluginConfigs := make([]*PluginConfig, 0, len(externalConfig.Plugins))
+ for _, plugin := range externalConfig.Plugins {
+ strategy, err := ParseStrategy(plugin.Strategy)
+ if err != nil {
+ return nil, err
+ }
+ opt, err := encoding.InterfaceSliceOrStringToCommaSepString(plugin.Opt)
+ if err != nil {
+ return nil, err
+ }
+ pluginConfigs = append(
+ pluginConfigs,
+ &PluginConfig{
+ Name: plugin.Name,
+ Out: plugin.Out,
+ Opt: opt,
+ Path: plugin.Path,
+ Strategy: strategy,
+ },
+ )
+ }
+ return &Config{
+ PluginConfigs: pluginConfigs,
+ ManagedConfig: managedConfig,
+ }, nil
+}
+
+func validateExternalConfigV1Beta1(externalConfig ExternalConfigV1Beta1, id string) error {
+ if len(externalConfig.Plugins) == 0 {
+ return fmt.Errorf("%s: no plugins set", id)
+ }
+ for _, plugin := range externalConfig.Plugins {
+ if plugin.Name == "" {
+ return fmt.Errorf("%s: plugin name is required", id)
+ }
+ if plugin.Out == "" {
+ return fmt.Errorf("%s: plugin %s out is required", id, plugin.Name)
+ }
+ }
+ return nil
+}
+
+func newManagedConfigV1Beta1(externalOptionsConfig ExternalOptionsConfigV1Beta1, enabled bool) (*ManagedConfig, error) {
+ if !enabled || externalOptionsConfig == (ExternalOptionsConfigV1Beta1{}) {
+ return nil, nil
+ }
+ var optimizeForConfig *OptimizeForConfig
+ if externalOptionsConfig.OptimizeFor != "" {
+ value, ok := descriptorpb.FileOptions_OptimizeMode_value[externalOptionsConfig.OptimizeFor]
+ if !ok {
+ return nil, fmt.Errorf(
+ "invalid optimize_for value; expected one of %v",
+ enumMapToStringSlice(descriptorpb.FileOptions_OptimizeMode_value),
+ )
+ }
+ optimizeForConfig = &OptimizeForConfig{
+ Default: descriptorpb.FileOptions_OptimizeMode(value),
+ Except: make([]bufmoduleref.ModuleIdentity, 0),
+ Override: make(map[bufmoduleref.ModuleIdentity]descriptorpb.FileOptions_OptimizeMode),
+ }
+ }
+ return &ManagedConfig{
+ CcEnableArenas: externalOptionsConfig.CcEnableArenas,
+ JavaMultipleFiles: externalOptionsConfig.JavaMultipleFiles,
+ OptimizeForConfig: optimizeForConfig,
+ }, nil
+}
+
+// enumMapToStringSlice is a convenience function for mapping Protobuf enums
+// into a slice of strings.
+func enumMapToStringSlice(enums map[string]int32) []string {
+ slice := make([]string, 0, len(enums))
+ for enum := range enums {
+ slice = append(slice, enum)
+ }
+ return slice
+}
+
+type readConfigOptions struct {
+ override string
+}
+
+func newReadConfigOptions() *readConfigOptions {
+ return &readConfigOptions{}
+}
+
+func newTypesConfigV1(in *ExternalTypesConfigV1) *TypesConfig {
+ if in == nil {
+ return nil
+ }
+ return &TypesConfig{
+ Include: in.Include,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufgen/features.go b/vendor/github.com/bufbuild/buf/private/buf/bufgen/features.go
new file mode 100644
index 000000000..cfb4fd1b5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufgen/features.go
@@ -0,0 +1,132 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufgen
+
+import (
+ "fmt"
+ "sort"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "google.golang.org/protobuf/types/descriptorpb"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+// requiredFeatures maps a feature to the set of files in an image that
+// make use of that feature.
+type requiredFeatures map[pluginpb.CodeGeneratorResponse_Feature][]string
+
+type featureChecker func(options *descriptorpb.FileDescriptorProto) bool
+
+// Map of all known features to functions that can check whether a given file
+// uses said feature.
+var allFeatures = map[pluginpb.CodeGeneratorResponse_Feature]featureChecker{
+ pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL: fileHasProto3Optional,
+}
+
+// computeRequiredFeatures returns a map of required features to the files in
+// the image that require that feature. After plugins are invoked, the plugins'
+// responses are checked to make sure any required features were supported.
+func computeRequiredFeatures(image bufimage.Image) requiredFeatures {
+ features := requiredFeatures{}
+ for feature, checker := range allFeatures {
+ for _, file := range image.Files() {
+ if file.IsImport() {
+ // we only want to check the sources in the module, not their dependencies
+ continue
+ }
+ if checker(file.Proto()) {
+ features[feature] = append(features[feature], file.Path())
+ }
+ }
+ }
+ return features
+}
+
+func checkRequiredFeatures(
+ container app.StderrContainer,
+ required requiredFeatures,
+ responses []*pluginpb.CodeGeneratorResponse,
+ configs []*PluginConfig,
+) {
+ for responseIndex, response := range responses {
+ if response == nil || response.GetError() != "" {
+ // plugin failed, nothing to check
+ continue
+ }
+ failed := requiredFeatures{}
+ var failedFeatures []pluginpb.CodeGeneratorResponse_Feature
+ supported := response.GetSupportedFeatures() // bit mask of features the plugin supports
+ for feature, files := range required {
+ featureMask := (uint64)(feature)
+ if supported&featureMask != featureMask {
+ // doh! Supported features don't include this one
+ failed[feature] = files
+ failedFeatures = append(failedFeatures, feature)
+ }
+ }
+ if len(failed) > 0 {
+ // TODO: plugin config to turn this into an error
+ _, _ = fmt.Fprintf(container.Stderr(), "Warning: plugin %q does not support required features.\n",
+ configs[responseIndex].PluginName())
+ sort.Slice(failedFeatures, func(i, j int) bool {
+ return failedFeatures[i].Number() < failedFeatures[j].Number()
+ })
+ for _, feature := range failedFeatures {
+ files := failed[feature]
+ _, _ = fmt.Fprintf(container.Stderr(), " Feature %q is required by %d file(s):\n",
+ featureName(feature), len(files))
+ _, _ = fmt.Fprintf(container.Stderr(), " %s\n", strings.Join(files, ","))
+ }
+ }
+ }
+}
+
+func featureName(feature pluginpb.CodeGeneratorResponse_Feature) string {
+ // FEATURE_PROTO3_OPTIONAL -> "proto3 optional"
+ return strings.TrimSpace(
+ strings.ToLower(
+ strings.ReplaceAll(
+ strings.TrimPrefix(feature.String(), "FEATURE"),
+ "_", " ")))
+}
+
+func fileHasProto3Optional(fileDescriptorProto *descriptorpb.FileDescriptorProto) bool {
+ if fileDescriptorProto.GetSyntax() != "proto3" {
+ // can't have proto3 optional unless syntax is proto3
+ return false
+ }
+ for _, msg := range fileDescriptorProto.MessageType {
+ if messageHasProto3Optional(msg) {
+ return true
+ }
+ }
+ return false
+}
+
+func messageHasProto3Optional(descriptorProto *descriptorpb.DescriptorProto) bool {
+ for _, fld := range descriptorProto.Field {
+ if fld.GetProto3Optional() {
+ return true
+ }
+ }
+ for _, nested := range descriptorProto.NestedType {
+ if messageHasProto3Optional(nested) {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufgen/generator.go b/vendor/github.com/bufbuild/buf/private/buf/bufgen/generator.go
new file mode 100644
index 000000000..e66369146
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufgen/generator.go
@@ -0,0 +1,668 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufgen
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin"
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/appproto"
+ "github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec"
+ "github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/bufbuild/buf/private/pkg/thread"
+ connect "github.com/bufbuild/connect-go"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+type generator struct {
+ logger *zap.Logger
+ storageosProvider storageos.Provider
+ appprotoexecGenerator appprotoexec.Generator
+ clientConfig *connectclient.Config
+}
+
+func newGenerator(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ clientConfig *connectclient.Config,
+) *generator {
+ return &generator{
+ logger: logger,
+ storageosProvider: storageosProvider,
+ appprotoexecGenerator: appprotoexec.NewGenerator(logger, storageosProvider, runner),
+ clientConfig: clientConfig,
+ }
+}
+
+// Generate executes all of the plugins specified by the given Config, and
+// consolidates the results in the same order that the plugins are listed.
+// Order is particularly important for insertion points, which are used to
+// modify the generated output from other plugins executed earlier in the chain.
+//
+// Note that insertion points will only have access to files that are written
+// in the same protoc invocation; plugins will not be able to insert code into
+// other files that already exist on disk (just like protoc).
+//
+// All of the plugins, both local and remote, are called concurrently. Each
+// plugin returns a single CodeGeneratorResponse, which are cached in-memory in
+// the appprotoos.ResponseWriter. Once all of the CodeGeneratorResponses
+// are written in-memory, we flush them to the OS filesystem by closing the
+// appprotoos.ResponseWriter.
+//
+// This behavior is equivalent to protoc, which only writes out the content
+// for each of the plugins if all of the plugins are successful.
+func (g *generator) Generate(
+ ctx context.Context,
+ container app.EnvStdioContainer,
+ config *Config,
+ image bufimage.Image,
+ options ...GenerateOption,
+) error {
+ generateOptions := newGenerateOptions()
+ for _, option := range options {
+ option(generateOptions)
+ }
+ return g.generate(
+ ctx,
+ container,
+ config,
+ image,
+ generateOptions.baseOutDirPath,
+ generateOptions.includeImports,
+ generateOptions.includeWellKnownTypes,
+ )
+}
+
+func (g *generator) generate(
+ ctx context.Context,
+ container app.EnvStdioContainer,
+ config *Config,
+ image bufimage.Image,
+ baseOutDirPath string,
+ includeImports bool,
+ includeWellKnownTypes bool,
+) error {
+ if err := modifyImage(ctx, g.logger, config, image); err != nil {
+ return err
+ }
+ responses, err := g.execPlugins(
+ ctx,
+ container,
+ config,
+ image,
+ includeImports,
+ includeWellKnownTypes,
+ )
+ if err != nil {
+ return err
+ }
+ // Apply the CodeGeneratorResponses in the order they were specified.
+ responseWriter := appprotoos.NewResponseWriter(
+ g.logger,
+ g.storageosProvider,
+ appprotoos.ResponseWriterWithCreateOutDirIfNotExists(),
+ )
+ for i, pluginConfig := range config.PluginConfigs {
+ out := pluginConfig.Out
+ if baseOutDirPath != "" && baseOutDirPath != "." {
+ out = filepath.Join(baseOutDirPath, out)
+ }
+ response := responses[i]
+ if response == nil {
+ return fmt.Errorf("failed to get plugin response for %s", pluginConfig.PluginName())
+ }
+ if err := responseWriter.AddResponse(
+ ctx,
+ response,
+ out,
+ ); err != nil {
+ return fmt.Errorf("plugin %s: %v", pluginConfig.PluginName(), err)
+ }
+ }
+ if err := responseWriter.Close(); err != nil {
+ return err
+ }
+ return nil
+}
+
+func (g *generator) execPlugins(
+ ctx context.Context,
+ container app.EnvStdioContainer,
+ config *Config,
+ image bufimage.Image,
+ includeImports bool,
+ includeWellKnownTypes bool,
+) ([]*pluginpb.CodeGeneratorResponse, error) {
+ imageProvider := newImageProvider(image)
+ // Collect all of the plugin jobs so that they can be executed in parallel.
+ jobs := make([]func(context.Context) error, 0, len(config.PluginConfigs))
+ responses := make([]*pluginpb.CodeGeneratorResponse, len(config.PluginConfigs))
+ requiredFeatures := computeRequiredFeatures(image)
+ remotePluginConfigTable := make(map[string][]*remotePluginExecArgs, len(config.PluginConfigs))
+ for i, pluginConfig := range config.PluginConfigs {
+ index := i
+ currentPluginConfig := pluginConfig
+ remote := currentPluginConfig.GetRemoteHostname()
+ if remote != "" {
+ remotePluginConfigTable[remote] = append(
+ remotePluginConfigTable[remote],
+ &remotePluginExecArgs{
+ Index: index,
+ PluginConfig: currentPluginConfig,
+ },
+ )
+ } else {
+ jobs = append(jobs, func(ctx context.Context) error {
+ response, err := g.execLocalPlugin(
+ ctx,
+ container,
+ imageProvider,
+ currentPluginConfig,
+ includeImports,
+ includeWellKnownTypes,
+ )
+ if err != nil {
+ return err
+ }
+ responses[index] = response
+ return nil
+ })
+ }
+ }
+ // Batch for each remote.
+ for remote, indexedPluginConfigs := range remotePluginConfigTable {
+ v1Args := make([]*remotePluginExecArgs, 0, len(indexedPluginConfigs))
+ v2Args := make([]*remotePluginExecArgs, 0, len(indexedPluginConfigs))
+ for _, param := range indexedPluginConfigs {
+ if param.PluginConfig.Plugin == "" {
+ v1Args = append(v1Args, param)
+ } else {
+ v2Args = append(v2Args, param)
+ }
+ }
+ if len(v1Args) > 0 {
+ jobs = append(jobs, func(ctx context.Context) error {
+ results, err := g.executeRemotePlugins(
+ ctx,
+ container,
+ image,
+ remote,
+ v1Args,
+ includeImports,
+ includeWellKnownTypes,
+ )
+ if err != nil {
+ return err
+ }
+ for _, result := range results {
+ responses[result.Index] = result.CodeGeneratorResponse
+ }
+ return nil
+ })
+ }
+ if len(v2Args) > 0 {
+ jobs = append(jobs, func(ctx context.Context) error {
+ results, err := g.execRemotePluginsV2(
+ ctx,
+ container,
+ image,
+ remote,
+ v2Args,
+ includeImports,
+ includeWellKnownTypes,
+ )
+ if err != nil {
+ return err
+ }
+ for _, result := range results {
+ responses[result.Index] = result.CodeGeneratorResponse
+ }
+ return nil
+ })
+ }
+ }
+ // We execute all of the jobs in parallel, but apply them in order so that any
+ // insertion points are handled correctly.
+ //
+ // For example,
+ //
+ // # buf.gen.yaml
+ // version: v1
+ // plugins:
+ // - plugin: buf.build/org/insertion-point-receiver
+ // out: gen/proto
+ // - name: insertion-point-writer
+ // out: gen/proto
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+ if err := thread.Parallelize(
+ ctx,
+ jobs,
+ thread.ParallelizeWithCancel(cancel),
+ ); err != nil {
+ if errs := multierr.Errors(err); len(errs) > 0 {
+ return nil, errs[0]
+ }
+ return nil, err
+ }
+ if err := validateResponses(responses, config.PluginConfigs); err != nil {
+ return nil, err
+ }
+ checkRequiredFeatures(container, requiredFeatures, responses, config.PluginConfigs)
+ return responses, nil
+}
+
+func (g *generator) execLocalPlugin(
+ ctx context.Context,
+ container app.EnvStdioContainer,
+ imageProvider *imageProvider,
+ pluginConfig *PluginConfig,
+ includeImports bool,
+ includeWellKnownTypes bool,
+) (*pluginpb.CodeGeneratorResponse, error) {
+ pluginImages, err := imageProvider.GetImages(pluginConfig.Strategy)
+ if err != nil {
+ return nil, err
+ }
+ response, err := g.appprotoexecGenerator.Generate(
+ ctx,
+ container,
+ pluginConfig.PluginName(),
+ bufimage.ImagesToCodeGeneratorRequests(
+ pluginImages,
+ pluginConfig.Opt,
+ nil,
+ includeImports,
+ includeWellKnownTypes,
+ ),
+ appprotoexec.GenerateWithPluginPath(pluginConfig.Path),
+ )
+ if err != nil {
+ return nil, fmt.Errorf("plugin %s: %v", pluginConfig.PluginName(), err)
+ }
+ return response, nil
+}
+
+type remotePluginExecArgs struct {
+ Index int
+ PluginConfig *PluginConfig
+}
+
+type remotePluginExecutionResult struct {
+ CodeGeneratorResponse *pluginpb.CodeGeneratorResponse
+ Index int
+}
+
+func (g *generator) executeRemotePlugins(
+ ctx context.Context,
+ container app.EnvStdioContainer,
+ image bufimage.Image,
+ remote string,
+ pluginConfigs []*remotePluginExecArgs,
+ includeImports bool,
+ includeWellKnownTypes bool,
+) ([]*remotePluginExecutionResult, error) {
+ pluginReferences := make([]*registryv1alpha1.PluginReference, len(pluginConfigs))
+ for i, pluginConfig := range pluginConfigs {
+ pluginReference, err := getPluginReference(pluginConfig.PluginConfig)
+ if err != nil {
+ return nil, err
+ }
+ pluginReferences[i] = pluginReference
+ }
+ generateService := connectclient.Make(g.clientConfig, remote, registryv1alpha1connect.NewGenerateServiceClient)
+ response, err := generateService.GeneratePlugins(
+ ctx,
+ connect.NewRequest(
+ ®istryv1alpha1.GeneratePluginsRequest{
+ Image: bufimage.ImageToProtoImage(image),
+ Plugins: pluginReferences,
+ IncludeImports: includeImports,
+ IncludeWellKnownTypes: includeWellKnownTypes,
+ },
+ ),
+ )
+ if err != nil {
+ return nil, err
+ }
+ responses := response.Msg.Responses
+ if len(responses) != len(pluginReferences) {
+ return nil, fmt.Errorf("unexpected number of responses, got %d, wanted: %d", len(responses), len(pluginReferences))
+ }
+ pluginService := connectclient.Make(g.clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ result := make([]*remotePluginExecutionResult, 0, len(pluginReferences))
+ for i, pluginReference := range pluginReferences {
+ result = append(result, &remotePluginExecutionResult{
+ Index: pluginConfigs[i].Index,
+ CodeGeneratorResponse: responses[i],
+ })
+ resp, err := pluginService.GetPlugin(
+ ctx,
+ connect.NewRequest(
+ ®istryv1alpha1.GetPluginRequest{
+ Owner: pluginReference.Owner,
+ Name: pluginReference.Name,
+ },
+ ),
+ )
+ if err != nil {
+ return nil, err
+ }
+ plugin := resp.Msg.Plugin
+ if plugin.Deprecated {
+ warnMsg := fmt.Sprintf(`Plugin "%s/%s/%s" is deprecated`, remote, pluginReference.Owner, pluginReference.Name)
+ if plugin.DeprecationMessage != "" {
+ warnMsg = fmt.Sprintf("%s: %s", warnMsg, plugin.DeprecationMessage)
+ }
+ g.logger.Sugar().Warn(warnMsg)
+ }
+ }
+ return result, nil
+}
+
+func (g *generator) execRemotePluginsV2(
+ ctx context.Context,
+ container app.EnvStdioContainer,
+ image bufimage.Image,
+ remote string,
+ pluginConfigs []*remotePluginExecArgs,
+ includeImports bool,
+ includeWellKnownTypes bool,
+) ([]*remotePluginExecutionResult, error) {
+ requests := make([]*registryv1alpha1.PluginGenerationRequest, len(pluginConfigs))
+ for i, pluginConfig := range pluginConfigs {
+ request, err := getPluginGenerationRequest(pluginConfig.PluginConfig)
+ if err != nil {
+ return nil, err
+ }
+ requests[i] = request
+ }
+ codeGenerationService := connectclient.Make(g.clientConfig, remote, registryv1alpha1connect.NewCodeGenerationServiceClient)
+ response, err := codeGenerationService.GenerateCode(
+ ctx,
+ connect.NewRequest(
+ ®istryv1alpha1.GenerateCodeRequest{
+ Image: bufimage.ImageToProtoImage(image),
+ Requests: requests,
+ IncludeImports: includeImports,
+ IncludeWellKnownTypes: includeWellKnownTypes,
+ },
+ ),
+ )
+ if err != nil {
+ return nil, err
+ }
+ responses := response.Msg.Responses
+ if len(responses) != len(requests) {
+ return nil, fmt.Errorf("unexpected number of responses received, got %d, wanted %d", len(responses), len(requests))
+ }
+ result := make([]*remotePluginExecutionResult, 0, len(responses))
+ for i := range requests {
+ codeGeneratorResponse := responses[i].GetResponse()
+ if codeGeneratorResponse == nil {
+ return nil, errors.New("expected code generator response")
+ }
+ result = append(result, &remotePluginExecutionResult{
+ CodeGeneratorResponse: codeGeneratorResponse,
+ Index: pluginConfigs[i].Index,
+ })
+ }
+ return result, nil
+}
+
+func getPluginGenerationRequest(
+ pluginConfig *PluginConfig,
+) (*registryv1alpha1.PluginGenerationRequest, error) {
+ var curatedPluginReference *registryv1alpha1.CuratedPluginReference
+ if reference, err := bufpluginref.PluginReferenceForString(pluginConfig.Plugin, pluginConfig.Revision); err == nil {
+ curatedPluginReference = bufplugin.PluginReferenceToProtoCuratedPluginReference(reference)
+ } else {
+ // Try parsing as a plugin identity (no version information)
+ identity, err := bufpluginref.PluginIdentityForString(pluginConfig.Plugin)
+ if err != nil {
+ return nil, fmt.Errorf("invalid remote plugin %q", pluginConfig.Plugin)
+ }
+ curatedPluginReference = bufplugin.PluginIdentityToProtoCuratedPluginReference(identity)
+ }
+ var options []string
+ if len(pluginConfig.Opt) > 0 {
+ // Only include parameters if they're not empty.
+ options = []string{pluginConfig.Opt}
+ }
+ return ®istryv1alpha1.PluginGenerationRequest{
+ PluginReference: curatedPluginReference,
+ Options: options,
+ }, nil
+}
+
+// getPluginReference returns the plugin reference and remote for the given plugin configuration.
+func getPluginReference(pluginConfig *PluginConfig) (*registryv1alpha1.PluginReference, error) {
+ _, owner, name, version, err := bufremoteplugin.ParsePluginVersionPath(pluginConfig.Remote)
+ if err != nil {
+ return nil, fmt.Errorf("invalid plugin path: %w", err)
+ }
+ var parameters []string
+ if len(pluginConfig.Opt) > 0 {
+ // Only include parameters if they're not empty.
+ parameters = []string{pluginConfig.Opt}
+ }
+ return ®istryv1alpha1.PluginReference{
+ Owner: owner,
+ Name: name,
+ Version: version,
+ Parameters: parameters,
+ }, nil
+}
+
+// modifyImage modifies the image according to the given configuration (i.e. managed mode).
+func modifyImage(
+ ctx context.Context,
+ logger *zap.Logger,
+ config *Config,
+ image bufimage.Image,
+) error {
+ if config.ManagedConfig == nil {
+ // If the config is nil, it implies that the
+ // user has not enabled managed mode.
+ return nil
+ }
+ sweeper := bufimagemodify.NewFileOptionSweeper()
+ modifier, err := newModifier(logger, config.ManagedConfig, sweeper)
+ if err != nil {
+ return err
+ }
+ modifier = bufimagemodify.Merge(modifier, bufimagemodify.ModifierFunc(sweeper.Sweep))
+ return modifier.Modify(ctx, image)
+}
+
+func newModifier(
+ logger *zap.Logger,
+ managedConfig *ManagedConfig,
+ sweeper bufimagemodify.Sweeper,
+) (bufimagemodify.Modifier, error) {
+ modifier := bufimagemodify.NewMultiModifier(
+ bufimagemodify.JavaOuterClassname(logger, sweeper, managedConfig.Override[bufimagemodify.JavaOuterClassNameID]),
+ bufimagemodify.ObjcClassPrefix(logger, sweeper, managedConfig.Override[bufimagemodify.ObjcClassPrefixID]),
+ bufimagemodify.PhpNamespace(logger, sweeper, managedConfig.Override[bufimagemodify.PhpNamespaceID]),
+ bufimagemodify.PhpMetadataNamespace(logger, sweeper, managedConfig.Override[bufimagemodify.PhpMetadataNamespaceID]),
+ bufimagemodify.RubyPackage(logger, sweeper, managedConfig.Override[bufimagemodify.RubyPackageID]),
+ )
+ javaPackagePrefix := &JavaPackagePrefixConfig{Default: bufimagemodify.DefaultJavaPackagePrefix}
+ if managedConfig.JavaPackagePrefix != nil {
+ javaPackagePrefix = managedConfig.JavaPackagePrefix
+ }
+ javaPackageModifier, err := bufimagemodify.JavaPackage(
+ logger,
+ sweeper,
+ javaPackagePrefix.Default,
+ javaPackagePrefix.Except,
+ javaPackagePrefix.Override,
+ managedConfig.Override[bufimagemodify.JavaPackageID],
+ )
+ if err != nil {
+ return nil, fmt.Errorf("failed to construct java_package modifier: %w", err)
+ }
+ modifier = bufimagemodify.Merge(
+ modifier,
+ javaPackageModifier,
+ )
+ javaMultipleFilesValue := bufimagemodify.DefaultJavaMultipleFilesValue
+ if managedConfig.JavaMultipleFiles != nil {
+ javaMultipleFilesValue = *managedConfig.JavaMultipleFiles
+ }
+ javaMultipleFilesModifier, err := bufimagemodify.JavaMultipleFiles(
+ logger,
+ sweeper,
+ javaMultipleFilesValue,
+ managedConfig.Override[bufimagemodify.JavaMultipleFilesID],
+ )
+ if err != nil {
+ return nil, err
+ }
+ modifier = bufimagemodify.Merge(modifier, javaMultipleFilesModifier)
+ if managedConfig.CcEnableArenas != nil {
+ ccEnableArenasModifier, err := bufimagemodify.CcEnableArenas(
+ logger,
+ sweeper,
+ *managedConfig.CcEnableArenas,
+ managedConfig.Override[bufimagemodify.CcEnableArenasID],
+ )
+ if err != nil {
+ return nil, err
+ }
+ modifier = bufimagemodify.Merge(modifier, ccEnableArenasModifier)
+ }
+ if managedConfig.JavaStringCheckUtf8 != nil {
+ javaStringCheckUtf8, err := bufimagemodify.JavaStringCheckUtf8(
+ logger,
+ sweeper,
+ *managedConfig.JavaStringCheckUtf8,
+ managedConfig.Override[bufimagemodify.JavaStringCheckUtf8ID],
+ )
+ if err != nil {
+ return nil, err
+ }
+ modifier = bufimagemodify.Merge(modifier, javaStringCheckUtf8)
+ }
+ var (
+ csharpNamespaceExcept []bufmoduleref.ModuleIdentity
+ csharpNamespaceOverride map[bufmoduleref.ModuleIdentity]string
+ )
+ if csharpNameSpaceConfig := managedConfig.CsharpNameSpaceConfig; csharpNameSpaceConfig != nil {
+ csharpNamespaceExcept = csharpNameSpaceConfig.Except
+ csharpNamespaceOverride = csharpNameSpaceConfig.Override
+ }
+ csharpNamespaceModifier := bufimagemodify.CsharpNamespace(
+ logger,
+ sweeper,
+ csharpNamespaceExcept,
+ csharpNamespaceOverride,
+ managedConfig.Override[bufimagemodify.CsharpNamespaceID],
+ )
+ modifier = bufimagemodify.Merge(modifier, csharpNamespaceModifier)
+ if managedConfig.OptimizeForConfig != nil {
+ optimizeFor, err := bufimagemodify.OptimizeFor(
+ logger,
+ sweeper,
+ managedConfig.OptimizeForConfig.Default,
+ managedConfig.OptimizeForConfig.Except,
+ managedConfig.OptimizeForConfig.Override,
+ managedConfig.Override[bufimagemodify.OptimizeForID],
+ )
+ if err != nil {
+ return nil, err
+ }
+ modifier = bufimagemodify.Merge(
+ modifier,
+ optimizeFor,
+ )
+ }
+ if managedConfig.GoPackagePrefixConfig != nil {
+ goPackageModifier, err := bufimagemodify.GoPackage(
+ logger,
+ sweeper,
+ managedConfig.GoPackagePrefixConfig.Default,
+ managedConfig.GoPackagePrefixConfig.Except,
+ managedConfig.GoPackagePrefixConfig.Override,
+ managedConfig.Override[bufimagemodify.GoPackageID],
+ )
+ if err != nil {
+ return nil, fmt.Errorf("failed to construct go_package modifier: %w", err)
+ }
+ modifier = bufimagemodify.Merge(
+ modifier,
+ goPackageModifier,
+ )
+ }
+ return modifier, nil
+}
+
+// validateResponses verifies that a response is set for each of the
+// pluginConfigs, and that each generated file is generated by a single
+// plugin.
+func validateResponses(
+ responses []*pluginpb.CodeGeneratorResponse,
+ pluginConfigs []*PluginConfig,
+) error {
+ if len(responses) != len(pluginConfigs) {
+ return fmt.Errorf("unexpected number of responses: expected %d but got %d", len(pluginConfigs), len(responses))
+ }
+ pluginResponses := make([]*appproto.PluginResponse, 0, len(responses))
+ for i, response := range responses {
+ pluginConfig := pluginConfigs[i]
+ if response == nil {
+ return fmt.Errorf("failed to create a response for %q", pluginConfig.PluginName())
+ }
+ pluginResponses = append(
+ pluginResponses,
+ appproto.NewPluginResponse(
+ response,
+ pluginConfig.PluginName(),
+ pluginConfig.Out,
+ ),
+ )
+ }
+ if err := appproto.ValidatePluginResponses(pluginResponses); err != nil {
+ return err
+ }
+ return nil
+}
+
+type generateOptions struct {
+ baseOutDirPath string
+ includeImports bool
+ includeWellKnownTypes bool
+}
+
+func newGenerateOptions() *generateOptions {
+ return &generateOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufgen/image_provider.go b/vendor/github.com/bufbuild/buf/private/buf/bufgen/image_provider.go
new file mode 100644
index 000000000..5a3f6e7b1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufgen/image_provider.go
@@ -0,0 +1,60 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufgen
+
+import (
+ "fmt"
+ "sync"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+)
+
+// imageProvider is used to provide the images used
+// when generating with a local plugin. Each plugin is
+// in control of its own Strategy - we cache the
+// imagesByDir so that we only have to build it once for
+// all of the plugins that configure the the Directory
+// strategy.
+type imageProvider struct {
+ image bufimage.Image
+ imagesByDir []bufimage.Image
+ lock sync.Mutex
+}
+
+func newImageProvider(image bufimage.Image) *imageProvider {
+ return &imageProvider{
+ image: image,
+ }
+}
+
+func (p *imageProvider) GetImages(strategy Strategy) ([]bufimage.Image, error) {
+ switch strategy {
+ case StrategyAll:
+ return []bufimage.Image{p.image}, nil
+ case StrategyDirectory:
+ p.lock.Lock()
+ defer p.lock.Unlock()
+ if p.imagesByDir == nil {
+ var err error
+ p.imagesByDir, err = bufimage.ImageByDir(p.image)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return p.imagesByDir, nil
+ default:
+ return nil, fmt.Errorf("unknown strategy: %v", strategy)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufgen/provider.go b/vendor/github.com/bufbuild/buf/private/buf/bufgen/provider.go
new file mode 100644
index 000000000..cab52c2cf
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufgen/provider.go
@@ -0,0 +1,62 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufgen
+
+import (
+ "context"
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/encoding"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+type provider struct {
+ logger *zap.Logger
+}
+
+func newProvider(logger *zap.Logger) *provider {
+ return &provider{
+ logger: logger,
+ }
+}
+
+func (p *provider) GetConfig(ctx context.Context, readBucket storage.ReadBucket) (_ *Config, retErr error) {
+ ctx, span := trace.StartSpan(ctx, "get_config")
+ defer span.End()
+
+ readObjectCloser, err := readBucket.Get(ctx, ExternalConfigFilePath)
+ if err != nil {
+ // There is no default generate template, so we propagate all errors, including
+ // storage.ErrNotExist.
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, readObjectCloser.Close())
+ }()
+ data, err := io.ReadAll(readObjectCloser)
+ if err != nil {
+ return nil, err
+ }
+ return getConfig(
+ p.logger,
+ encoding.UnmarshalYAMLNonStrict,
+ encoding.UnmarshalYAMLStrict,
+ data,
+ `File "`+readObjectCloser.ExternalPath()+`"`,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufgen/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/bufgen/usage.gen.go
new file mode 100644
index 000000000..6bc11fdbc
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufgen/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufgen
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufmigrate/bufmigrate.go b/vendor/github.com/bufbuild/buf/private/buf/bufmigrate/bufmigrate.go
new file mode 100644
index 000000000..c622b06ed
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufmigrate/bufmigrate.go
@@ -0,0 +1,42 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmigrate contains logic for migrating between different
+// configuration file versions.
+package bufmigrate
+
+// Migrator describes the interface used to migrate
+// a set of files in a directory from one version to another.
+type Migrator interface {
+ Migrate(dirPath string) error
+}
+
+// V1Beta1MigrateOption defines the type used
+// to configure the v1beta1 migrator.
+type V1Beta1MigrateOption func(*v1beta1Migrator)
+
+// NewV1Beta1Migrator creates a new migrator that migrates files
+// between version v1beta1 and v1.
+func NewV1Beta1Migrator(commandName string, options ...V1Beta1MigrateOption) Migrator {
+ return newV1Beta1Migrator(commandName, options...)
+}
+
+// V1Beta1MigratorWithNotifier instruments the migrator with
+// a callback to call whenever an event that should notify the
+// user occurs during the migration.
+func V1Beta1MigratorWithNotifier(notifier func(message string) error) V1Beta1MigrateOption {
+ return func(migrateOptions *v1beta1Migrator) {
+ migrateOptions.notifier = notifier
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufmigrate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/bufmigrate/usage.gen.go
new file mode 100644
index 000000000..930fa9424
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufmigrate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufmigrate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufmigrate/v1beta1_migrator.go b/vendor/github.com/bufbuild/buf/private/buf/bufmigrate/v1beta1_migrator.go
new file mode 100644
index 000000000..c87e34b02
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufmigrate/v1beta1_migrator.go
@@ -0,0 +1,551 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmigrate
+
+import (
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+ "sort"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/bufgen"
+ "github.com/bufbuild/buf/private/buf/bufwork"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/buflock"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig"
+ "github.com/bufbuild/buf/private/pkg/encoding"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+)
+
+const (
+ bufModHeaderWithName = `# Generated by %q. Edit as necessary, and
+# remove this comment when you're finished.
+#
+# This module represents the %q root found in
+# the previous configuration file for the
+# %q module.
+`
+ bufModHeaderWithoutName = `# Generated by %q. Edit as necessary, and
+# remove this comment when you're finished.
+#
+# This module represents the %q root found in
+# the previous configuration.
+`
+ bufGenHeader = `# Generated by %q. Edit as necessary, and
+# remove this comment when you're finished.
+`
+ bufWorkHeader = `# Generated by %q. Edit as necessary, and
+# remove this comment when you're finished.
+#
+# This workspace file points to the roots found in your
+# previous %q configuration.
+`
+)
+
+type v1beta1Migrator struct {
+ notifier func(string) error
+ commandName string
+}
+
+func newV1Beta1Migrator(commandName string, options ...V1Beta1MigrateOption) *v1beta1Migrator {
+ migrator := v1beta1Migrator{
+ commandName: commandName,
+ notifier: func(string) error { return nil },
+ }
+ for _, option := range options {
+ option(&migrator)
+ }
+ return &migrator
+}
+
+func (m *v1beta1Migrator) Migrate(dirPath string) error {
+ migratedConfig, err := m.maybeMigrateConfig(dirPath)
+ if err != nil {
+ return fmt.Errorf("failed to migrate config: %w", err)
+ }
+ migratedGenTemplate, err := m.maybeMigrateGenTemplate(dirPath)
+ if err != nil {
+ return fmt.Errorf("failed to migrate generation template: %w", err)
+ }
+ migratedLockFile, err := m.maybeMigrateLockFile(dirPath)
+ if err != nil {
+ return fmt.Errorf("failed to migrate lock file: %w", err)
+ }
+ if !migratedConfig && !migratedGenTemplate && !migratedLockFile {
+ return nil
+ }
+ var migratedFiles []string
+ if migratedConfig {
+ migratedFiles = append(migratedFiles, bufconfig.ExternalConfigV1Beta1FilePath)
+ }
+ if migratedGenTemplate {
+ migratedFiles = append(migratedFiles, bufgen.ExternalConfigFilePath)
+ }
+ if migratedLockFile {
+ migratedFiles = append(migratedFiles, buflock.ExternalConfigFilePath)
+ }
+ if err := m.notifier(
+ fmt.Sprintf("Successfully migrated your %s to v1.\n", stringutil.SliceToHumanString(migratedFiles)),
+ ); err != nil {
+ return fmt.Errorf("failed to write success message: %w", err)
+ }
+ return nil
+}
+
+func (m *v1beta1Migrator) maybeMigrateConfig(dirPath string) (bool, error) {
+ oldConfigPath := filepath.Join(dirPath, bufconfig.ExternalConfigV1Beta1FilePath)
+ oldConfigBytes, err := os.ReadFile(oldConfigPath)
+ if err != nil {
+ if errors.Is(err, os.ErrNotExist) {
+ // OK, no old config file
+ return false, nil
+ }
+ return false, fmt.Errorf("failed to read file: %w", err)
+ }
+ var versionedConfig bufconfig.ExternalConfigVersion
+ if err := encoding.UnmarshalYAMLNonStrict(oldConfigBytes, &versionedConfig); err != nil {
+ return false, fmt.Errorf(
+ "failed to read %s version: %w",
+ oldConfigPath,
+ err,
+ )
+ }
+ switch versionedConfig.Version {
+ case bufconfig.V1Version:
+ // OK, file was already v1
+ return false, nil
+ case bufconfig.V1Beta1Version, "":
+ // Continue to migrate
+ default:
+ return false, fmt.Errorf("unknown config file version: %s", versionedConfig.Version)
+ }
+ var v1beta1Config bufconfig.ExternalConfigV1Beta1
+ if err := encoding.UnmarshalYAMLStrict(oldConfigBytes, &v1beta1Config); err != nil {
+ return false, fmt.Errorf(
+ "failed to unmarshal %s as %s version v1beta1: %w",
+ oldConfigPath,
+ bufconfig.ExternalConfigV1Beta1FilePath,
+ err,
+ )
+ }
+ buildConfig, err := bufmoduleconfig.NewConfigV1Beta1(v1beta1Config.Build, v1beta1Config.Deps...)
+ if err != nil {
+ return false, err
+ }
+ if excludes, ok := buildConfig.RootToExcludes["."]; len(buildConfig.RootToExcludes) == 1 && ok {
+ // Only "." root present, just recreate file
+ v1Config := bufconfig.ExternalConfigV1{
+ Version: bufconfig.V1Version,
+ Name: v1beta1Config.Name,
+ Deps: v1beta1Config.Deps,
+ Build: bufmoduleconfig.ExternalConfigV1{
+ Excludes: excludes,
+ },
+ Breaking: bufbreakingconfig.ExternalConfigV1(v1beta1Config.Breaking),
+ Lint: buflintconfig.ExternalConfigV1(v1beta1Config.Lint),
+ }
+ newConfigPath := filepath.Join(dirPath, bufconfig.ExternalConfigV1FilePath)
+ if err := m.writeV1Config(newConfigPath, v1Config, ".", v1beta1Config.Name); err != nil {
+ return false, err
+ }
+ // Delete the old file once we've created the new one,
+ // unless it's the same file as before.
+ if newConfigPath != oldConfigPath {
+ if err := os.Remove(oldConfigPath); err != nil {
+ return false, fmt.Errorf("failed to delete old config file: %w", err)
+ }
+ }
+ return true, nil
+ }
+ // Check if we have a co-resident lock file, of any version
+ oldLockFilePath := filepath.Join(dirPath, buflock.ExternalConfigFilePath)
+ externalLockFileV1, hasLockFile, err := maybeReadLockFile(oldLockFilePath)
+ if err != nil {
+ return false, err
+ }
+ pathToProcessed := make(map[string]bool)
+ for root, excludes := range buildConfig.RootToExcludes {
+ // Convert universal settings
+ var name string
+ if v1beta1Config.Name != "" {
+ name = v1beta1Config.Name + "-" + strings.ReplaceAll(root, "/", "-") // Note: roots are normalized, "/" is universal
+ }
+ v1Config := bufconfig.ExternalConfigV1{
+ Version: bufconfig.V1Version,
+ Name: name,
+ Deps: v1beta1Config.Deps,
+ Build: bufmoduleconfig.ExternalConfigV1{
+ Excludes: excludes,
+ },
+ Breaking: bufbreakingconfig.ExternalConfigV1{
+ Use: v1beta1Config.Breaking.Use,
+ Except: v1beta1Config.Breaking.Except,
+ IgnoreUnstablePackages: v1beta1Config.Breaking.IgnoreUnstablePackages,
+ },
+ Lint: buflintconfig.ExternalConfigV1{
+ Use: v1beta1Config.Lint.Use,
+ Except: v1beta1Config.Lint.Except,
+ ServiceSuffix: v1beta1Config.Lint.ServiceSuffix,
+ EnumZeroValueSuffix: v1beta1Config.Lint.EnumZeroValueSuffix,
+ RPCAllowSameRequestResponse: v1beta1Config.Lint.RPCAllowSameRequestResponse,
+ RPCAllowGoogleProtobufEmptyRequests: v1beta1Config.Lint.RPCAllowGoogleProtobufEmptyRequests,
+ RPCAllowGoogleProtobufEmptyResponses: v1beta1Config.Lint.RPCAllowGoogleProtobufEmptyResponses,
+ AllowCommentIgnores: v1beta1Config.Lint.AllowCommentIgnores,
+ },
+ }
+
+ // Process Ignore's for those related to the root
+ v1Config.Breaking.Ignore, err = convertIgnoreSlice(v1beta1Config.Breaking.Ignore, dirPath, root, pathToProcessed)
+ if err != nil {
+ return false, err
+ }
+ v1Config.Breaking.IgnoreOnly, err = convertIgnoreMap(v1beta1Config.Breaking.IgnoreOnly, dirPath, root, pathToProcessed)
+ if err != nil {
+ return false, err
+ }
+ v1Config.Lint.Ignore, err = convertIgnoreSlice(v1beta1Config.Lint.Ignore, dirPath, root, pathToProcessed)
+ if err != nil {
+ return false, err
+ }
+ v1Config.Lint.IgnoreOnly, err = convertIgnoreMap(v1beta1Config.Lint.IgnoreOnly, dirPath, root, pathToProcessed)
+ if err != nil {
+ return false, err
+ }
+ if err := m.writeV1Config(
+ filepath.Join(dirPath, root, bufconfig.ExternalConfigV1FilePath),
+ v1Config,
+ root,
+ v1beta1Config.Name,
+ ); err != nil {
+ return false, err
+ }
+ if hasLockFile {
+ if err := m.writeV1LockFile(
+ filepath.Join(dirPath, root, buflock.ExternalConfigFilePath),
+ externalLockFileV1,
+ ); err != nil {
+ return false, err
+ }
+ }
+ }
+ for path, processed := range pathToProcessed {
+ if !processed {
+ if err := m.notifier(
+ fmt.Sprintf(
+ "The ignored file %q was not found in any roots and has been removed.\n",
+ path,
+ ),
+ ); err != nil {
+ return false, fmt.Errorf("failed to warn about ignored file: %w", err)
+ }
+ }
+ }
+ workConfig := bufwork.ExternalConfigV1{
+ Version: bufwork.V1Version,
+ Directories: v1beta1Config.Build.Roots,
+ }
+ // Sort directories before marshalling for deterministic output
+ sort.Strings(workConfig.Directories)
+ workConfigBytes, err := encoding.MarshalYAML(&workConfig)
+ if err != nil {
+ return false, fmt.Errorf("failed to marshal workspace file: %w", err)
+ }
+ header := fmt.Sprintf(bufWorkHeader, m.commandName, bufconfig.ExternalConfigV1Beta1FilePath)
+ if err := os.WriteFile(
+ filepath.Join(dirPath, bufwork.ExternalConfigV1FilePath),
+ append([]byte(header), workConfigBytes...),
+ 0600,
+ ); err != nil {
+ return false, fmt.Errorf("failed to write workspace file: %w", err)
+ }
+ // Finally, delete the old `buf.yaml` and any `buf.lock`. This is safe to do unconditionally
+ // as we know that there can't be a new `buf.yaml` here, since the only case
+ // where that would be true is if the only root is ".", which is handled separately.
+ if err := os.Remove(oldConfigPath); err != nil {
+ return false, fmt.Errorf("failed to clean up old config file: %w", err)
+ }
+ if hasLockFile {
+ if err := os.Remove(oldLockFilePath); err != nil {
+ return false, fmt.Errorf("failed to clean up old lock file: %w", err)
+ }
+ }
+ return true, nil
+}
+
+// writeV1Config atomically replaces the old configuration file by first writing
+// the new config to a temporary file and then moving it to the old config file path.
+// If we fail to marshal or write, the old config file is not touched.
+func (m *v1beta1Migrator) writeV1Config(
+ configPath string,
+ config bufconfig.ExternalConfigV1,
+ originalRootName string,
+ originalModuleName string,
+) (retErr error) {
+ v1ConfigData, err := encoding.MarshalYAML(&config)
+ if err != nil {
+ return fmt.Errorf("failed to marshal new config: %w", err)
+ }
+ header := fmt.Sprintf(bufModHeaderWithName, m.commandName, originalRootName, originalModuleName)
+ if originalModuleName == "" {
+ header = fmt.Sprintf(bufModHeaderWithoutName, m.commandName, originalRootName)
+ }
+ v1ConfigData = append([]byte(header), v1ConfigData...)
+ if err := os.MkdirAll(filepath.Dir(configPath), 0755); err != nil {
+ // This happens if the user has a root specified that doesn't have a corresponding
+ // directory on the filesystem.
+ return fmt.Errorf("failed to create new directories for writing config: %w", err)
+ }
+ return os.WriteFile(configPath, v1ConfigData, 0600)
+}
+
+func (m *v1beta1Migrator) maybeMigrateGenTemplate(dirPath string) (bool, error) {
+ oldConfigPath := filepath.Join(dirPath, bufgen.ExternalConfigFilePath)
+ oldConfigBytes, err := os.ReadFile(oldConfigPath)
+ if err != nil {
+ if errors.Is(err, os.ErrNotExist) {
+ // OK, no old config file
+ return false, nil
+ }
+ return false, fmt.Errorf("failed to read file: %w", err)
+ }
+ var versionedConfig bufgen.ExternalConfigVersion
+ if err := encoding.UnmarshalYAMLNonStrict(oldConfigBytes, &versionedConfig); err != nil {
+ return false, fmt.Errorf(
+ "failed to read %s version: %w",
+ oldConfigPath,
+ err,
+ )
+ }
+ switch versionedConfig.Version {
+ case bufgen.V1Version:
+ // OK, file was already v1
+ return false, nil
+ case bufgen.V1Beta1Version, "":
+ // Continue to migrate
+ default:
+ return false, fmt.Errorf("unknown config file version: %s", versionedConfig.Version)
+ }
+ var v1beta1GenTemplate bufgen.ExternalConfigV1Beta1
+ if err := encoding.UnmarshalYAMLStrict(oldConfigBytes, &v1beta1GenTemplate); err != nil {
+ return false, fmt.Errorf(
+ "failed to unmarshal %s as %s version v1beta1: %w",
+ oldConfigPath,
+ bufgen.ExternalConfigFilePath,
+ err,
+ )
+ }
+ v1GenTemplate := bufgen.ExternalConfigV1{
+ Version: bufgen.V1Version,
+ Managed: bufgen.ExternalManagedConfigV1{
+ Enabled: v1beta1GenTemplate.Managed,
+ CcEnableArenas: v1beta1GenTemplate.Options.CcEnableArenas,
+ JavaMultipleFiles: v1beta1GenTemplate.Options.JavaMultipleFiles,
+ OptimizeFor: bufgen.ExternalOptimizeForConfigV1{Default: v1beta1GenTemplate.Options.OptimizeFor},
+ },
+ }
+ for _, plugin := range v1beta1GenTemplate.Plugins {
+ v1GenTemplate.Plugins = append(
+ v1GenTemplate.Plugins, bufgen.ExternalPluginConfigV1{
+ Name: plugin.Name,
+ Out: plugin.Out,
+ Opt: plugin.Opt,
+ Path: plugin.Path,
+ Strategy: plugin.Strategy,
+ })
+ }
+ newConfigPath := filepath.Join(dirPath, bufgen.ExternalConfigFilePath)
+ if err := m.writeV1GenTemplate(newConfigPath, v1GenTemplate); err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+// writeV1GenTemplate atomically replaces the old configuration file by first writing
+// the new config to a temporary file and then moving it to the old config file path.
+// If we fail to marshal or write, the old config file is not touched.
+func (m *v1beta1Migrator) writeV1GenTemplate(
+ configPath string,
+ config bufgen.ExternalConfigV1,
+) (retErr error) {
+ v1ConfigData, err := encoding.MarshalYAML(&config)
+ if err != nil {
+ return fmt.Errorf("failed to marshal new config: %w", err)
+ }
+ header := fmt.Sprintf(bufGenHeader, m.commandName)
+ v1ConfigData = append([]byte(header), v1ConfigData...)
+ return os.WriteFile(configPath, v1ConfigData, 0600)
+}
+
+func (m *v1beta1Migrator) maybeMigrateLockFile(dirPath string) (bool, error) {
+ oldConfigPath := filepath.Join(dirPath, buflock.ExternalConfigFilePath)
+ oldConfigBytes, err := os.ReadFile(oldConfigPath)
+ if err != nil {
+ if errors.Is(err, os.ErrNotExist) {
+ // OK, no old config file
+ return false, nil
+ }
+ return false, fmt.Errorf("failed to read file: %w", err)
+ }
+ var versionedConfig buflock.ExternalConfigVersion
+ if err := encoding.UnmarshalYAMLNonStrict(oldConfigBytes, &versionedConfig); err != nil {
+ return false, fmt.Errorf(
+ "failed to read %s version: %w",
+ oldConfigPath,
+ err,
+ )
+ }
+ switch versionedConfig.Version {
+ case buflock.V1Version:
+ // OK, file was already v1
+ return false, nil
+ case buflock.V1Beta1Version, "":
+ // Continue to migrate
+ default:
+ return false, fmt.Errorf("unknown lock file version: %s", versionedConfig.Version)
+ }
+ var v1beta1LockFile buflock.ExternalConfigV1Beta1
+ if err := encoding.UnmarshalYAMLStrict(oldConfigBytes, &v1beta1LockFile); err != nil {
+ return false, fmt.Errorf(
+ "failed to unmarshal %s as %s version v1beta1: %w",
+ oldConfigPath,
+ buflock.ExternalConfigFilePath,
+ err,
+ )
+ }
+ v1LockFile := buflock.ExternalConfigV1{
+ Version: buflock.V1Version,
+ }
+ for _, dependency := range v1beta1LockFile.Deps {
+ v1LockFile.Deps = append(v1LockFile.Deps, buflock.ExternalConfigDependencyV1(dependency))
+ }
+ newConfigPath := filepath.Join(dirPath, buflock.ExternalConfigFilePath)
+ if err := m.writeV1LockFile(newConfigPath, v1LockFile); err != nil {
+ return false, err
+ }
+ return true, nil
+}
+
+// writeV1LockFile atomically replaces the old lock file by first writing
+// the new lock file to a temporary file and then moving it to the old lock file path.
+// If we fail to marshal or write, the old lock file is not touched.
+func (m *v1beta1Migrator) writeV1LockFile(
+ configPath string,
+ config buflock.ExternalConfigV1,
+) (retErr error) {
+ v1ConfigData, err := encoding.MarshalYAML(&config)
+ if err != nil {
+ return fmt.Errorf("failed to marshal new lock file: %w", err)
+ }
+ v1ConfigData = append([]byte(buflock.Header), v1ConfigData...)
+ return os.WriteFile(configPath, v1ConfigData, 0600)
+}
+
+func maybeReadLockFile(oldLockFilePath string) (buflock.ExternalConfigV1, bool, error) {
+ lockFileBytes, err := os.ReadFile(oldLockFilePath)
+ if err != nil {
+ if errors.Is(err, os.ErrNotExist) {
+ // OK, no old lock file
+ return buflock.ExternalConfigV1{}, false, nil
+ }
+
+ return buflock.ExternalConfigV1{}, false, fmt.Errorf("failed to read lock file path: %w", err)
+ }
+ var versionedConfig buflock.ExternalConfigVersion
+ if err := encoding.UnmarshalYAMLNonStrict(lockFileBytes, &versionedConfig); err != nil {
+ return buflock.ExternalConfigV1{}, false, fmt.Errorf(
+ "failed to read %s version: %w",
+ oldLockFilePath,
+ err,
+ )
+ }
+ switch versionedConfig.Version {
+ case "", buflock.V1Beta1Version:
+ var externalConfig buflock.ExternalConfigV1Beta1
+ if err := encoding.UnmarshalYAMLStrict(lockFileBytes, &externalConfig); err != nil {
+ return buflock.ExternalConfigV1{}, false, fmt.Errorf(
+ "failed to unmarshal lock file at %s: %w",
+ buflock.V1Beta1Version,
+ err,
+ )
+ }
+ externalLockFileV1 := buflock.ExternalConfigV1{
+ Version: buflock.V1Version,
+ }
+ for _, dependency := range externalConfig.Deps {
+ externalLockFileV1.Deps = append(externalLockFileV1.Deps, buflock.ExternalConfigDependencyV1(dependency))
+ }
+ return externalLockFileV1, true, nil
+ case buflock.V1Version:
+ externalLockFileV1 := buflock.ExternalConfigV1{}
+ if err := encoding.UnmarshalYAMLStrict(lockFileBytes, &externalLockFileV1); err != nil {
+ return buflock.ExternalConfigV1{}, false, fmt.Errorf("failed to unmarshal lock file at %s: %w", buflock.V1Version, err)
+ }
+ return externalLockFileV1, true, nil
+ default:
+ return buflock.ExternalConfigV1{}, false, fmt.Errorf("unknown lock file version: %s", versionedConfig.Version)
+ }
+}
+
+func convertIgnoreSlice(paths []string, dirPath string, root string, pathToProcessed map[string]bool) ([]string, error) {
+ var ignoresForRoot []string
+ for _, ignoredFile := range paths {
+ if _, ok := pathToProcessed[ignoredFile]; !ok {
+ pathToProcessed[ignoredFile] = false
+ }
+ filePath := filepath.Join(dirPath, root, ignoredFile)
+ if _, err := os.Stat(filePath); err != nil {
+ if errors.Is(err, os.ErrNotExist) {
+ continue
+ }
+ return nil, fmt.Errorf("failed to check for presence of file %s: %w", filePath, err)
+ }
+ pathToProcessed[ignoredFile] = true
+ ignoresForRoot = append(ignoresForRoot, ignoredFile)
+ }
+ sort.Strings(ignoresForRoot)
+ return ignoresForRoot, nil
+}
+
+func convertIgnoreMap(ruleToIgnores map[string][]string, dirPath string, root string, pathToProcessed map[string]bool) (map[string][]string, error) {
+ var ruleToIgnoresForRoot map[string][]string
+ for rule, ignores := range ruleToIgnores {
+ for _, ignoredFile := range ignores {
+ if _, ok := pathToProcessed[ignoredFile]; !ok {
+ pathToProcessed[ignoredFile] = false
+ }
+ filePath := filepath.Join(dirPath, root, ignoredFile)
+ if _, err := os.Stat(filePath); err != nil {
+ if errors.Is(err, os.ErrNotExist) {
+ continue
+ }
+ return nil, fmt.Errorf("failed to check for presence of file %s: %w", filePath, err)
+ }
+ if ruleToIgnoresForRoot == nil {
+ ruleToIgnoresForRoot = make(map[string][]string)
+ }
+ pathToProcessed[ignoredFile] = true
+ ruleToIgnoresForRoot[rule] = append(
+ ruleToIgnoresForRoot[rule],
+ ignoredFile,
+ )
+ }
+ sort.Strings(ruleToIgnoresForRoot[rule])
+ }
+ return ruleToIgnoresForRoot, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/bufprint.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/bufprint.go
new file mode 100644
index 000000000..5215af569
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/bufprint.go
@@ -0,0 +1,236 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "strconv"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/protoencoding"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.uber.org/multierr"
+ "google.golang.org/protobuf/proto"
+)
+
+const (
+ // FormatText is the text format.
+ FormatText Format = 1
+ // FormatJSON is the JSON format.
+ FormatJSON Format = 2
+)
+
+var (
+ // AllFormatsString is the string representation of all Formats.
+ AllFormatsString = stringutil.SliceToString([]string{FormatText.String(), FormatJSON.String()})
+)
+
+// Format is a format to print.
+type Format int
+
+// ParseFormat parses the format.
+//
+// If the empty string is provided, this is interpeted as FormatText.
+func ParseFormat(s string) (Format, error) {
+ switch s {
+ case "", "text":
+ return FormatText, nil
+ case "json":
+ return FormatJSON, nil
+ default:
+ return 0, fmt.Errorf("unknown format: %s", s)
+ }
+}
+
+// String implements fmt.Stringer.
+func (f Format) String() string {
+ switch f {
+ case FormatText:
+ return "text"
+ case FormatJSON:
+ return "json"
+ default:
+ return strconv.Itoa(int(f))
+ }
+}
+
+// CuratedPluginPrinter is a printer for curated plugins.
+type CuratedPluginPrinter interface {
+ PrintCuratedPlugin(ctx context.Context, format Format, plugin *registryv1alpha1.CuratedPlugin) error
+ PrintCuratedPlugins(ctx context.Context, format Format, nextPageToken string, plugins ...*registryv1alpha1.CuratedPlugin) error
+}
+
+// NewCuratedPluginPrinter returns a new CuratedPluginPrinter.
+func NewCuratedPluginPrinter(writer io.Writer) CuratedPluginPrinter {
+ return newCuratedPluginPrinter(writer)
+}
+
+// OrganizationPrinter is an organization printer.
+type OrganizationPrinter interface {
+ PrintOrganization(ctx context.Context, format Format, organization *registryv1alpha1.Organization) error
+}
+
+// NewOrganizationPrinter returns a new OrganizationPrinter.
+func NewOrganizationPrinter(address string, writer io.Writer) OrganizationPrinter {
+ return newOrganizationPrinter(address, writer)
+}
+
+// RepositoryPrinter is a repository printer.
+type RepositoryPrinter interface {
+ PrintRepository(ctx context.Context, format Format, repository *registryv1alpha1.Repository) error
+ PrintRepositories(ctx context.Context, format Format, nextPageToken string, repositories ...*registryv1alpha1.Repository) error
+}
+
+// NewRepositoryPrinter returns a new RepositoryPrinter.
+func NewRepositoryPrinter(
+ clientConfig *connectclient.Config,
+ address string,
+ writer io.Writer,
+) RepositoryPrinter {
+ return newRepositoryPrinter(clientConfig, address, writer)
+}
+
+// RepositoryTagPrinter is a repository tag printer.
+type RepositoryTagPrinter interface {
+ PrintRepositoryTag(ctx context.Context, format Format, repositoryTag *registryv1alpha1.RepositoryTag) error
+ PrintRepositoryTags(ctx context.Context, format Format, nextPageToken string, repositoryTags ...*registryv1alpha1.RepositoryTag) error
+}
+
+// NewRepositoryTagPrinter returns a new RepositoryTagPrinter.
+func NewRepositoryTagPrinter(writer io.Writer) RepositoryTagPrinter {
+ return newRepositoryTagPrinter(writer)
+}
+
+// RepositoryCommitPrinter is a repository commit printer.
+type RepositoryCommitPrinter interface {
+ PrintRepositoryCommit(ctx context.Context, format Format, repositoryCommit *registryv1alpha1.RepositoryCommit) error
+ PrintRepositoryCommits(ctx context.Context, format Format, nextPageToken string, repositoryCommits ...*registryv1alpha1.RepositoryCommit) error
+}
+
+// NewRepositoryCommitPrinter returns a new RepositoryCommitPrinter.
+func NewRepositoryCommitPrinter(writer io.Writer) RepositoryCommitPrinter {
+ return newRepositoryCommitPrinter(writer)
+}
+
+// RepositoryDraftPrinter is a repository draft printer.
+type RepositoryDraftPrinter interface {
+ PrintRepositoryDraft(ctx context.Context, format Format, repositoryCommit *registryv1alpha1.RepositoryCommit) error
+ PrintRepositoryDrafts(ctx context.Context, format Format, nextPageToken string, repositoryCommits ...*registryv1alpha1.RepositoryCommit) error
+}
+
+// NewRepositoryDraftPrinter returns a new RepositoryDraftPrinter.
+func NewRepositoryDraftPrinter(writer io.Writer) RepositoryDraftPrinter {
+ return newRepositoryDraftPrinter(writer)
+}
+
+// PluginPrinter is a printer for plugins.
+type PluginPrinter interface {
+ PrintPlugin(ctx context.Context, format Format, plugin *registryv1alpha1.Plugin) error
+ PrintPlugins(ctx context.Context, format Format, nextPageToken string, plugins ...*registryv1alpha1.Plugin) error
+}
+
+// NewPluginPrinter returns a new PluginPrinter.
+func NewPluginPrinter(writer io.Writer) PluginPrinter {
+ return newPluginPrinter(writer)
+}
+
+// PluginVersionPrinter is a printer for PluginVersions.
+type PluginVersionPrinter interface {
+ PrintPluginVersions(ctx context.Context, format Format, nextPageToken string, pluginVersions ...*registryv1alpha1.PluginVersion) error
+}
+
+// NewPluginVersionPrinter returns a new NewPluginVersionPrinter.
+func NewPluginVersionPrinter(writer io.Writer) PluginVersionPrinter {
+ return newPluginVersionPrinter(writer)
+}
+
+// TemplatePrinter is a printer for Templates.
+type TemplatePrinter interface {
+ PrintTemplate(ctx context.Context, format Format, template *registryv1alpha1.Template) error
+ PrintTemplates(ctx context.Context, format Format, nextPageToken string, templates ...*registryv1alpha1.Template) error
+}
+
+// NewTemplatePrinter returns a new NewTemplatePrinter.
+func NewTemplatePrinter(writer io.Writer) TemplatePrinter {
+ return newTemplatePrinter(writer)
+}
+
+// TemplateVersionPrinter is a printer for TemplateVersions.
+type TemplateVersionPrinter interface {
+ PrintTemplateVersion(ctx context.Context, format Format, templateVersion *registryv1alpha1.TemplateVersion) error
+ PrintTemplateVersions(ctx context.Context, format Format, nextPageToken string, templateVersions ...*registryv1alpha1.TemplateVersion) error
+}
+
+// NewTemplateVersionPrinter returns a new NewTemplateVersionPrinter.
+func NewTemplateVersionPrinter(writer io.Writer) TemplateVersionPrinter {
+ return newTemplateVersionPrinter(writer)
+}
+
+// TokenPrinter is a printer Tokens.
+//
+// TODO: update to same format as other printers.
+type TokenPrinter interface {
+ PrintTokens(ctx context.Context, tokens ...*registryv1alpha1.Token) error
+}
+
+// NewTokenPrinter returns a new TokenPrinter.
+//
+// TODO: update to same format as other printers.
+func NewTokenPrinter(writer io.Writer, format Format) (TokenPrinter, error) {
+ switch format {
+ case FormatText:
+ return newTokenTextPrinter(writer), nil
+ case FormatJSON:
+ return newTokenJSONPrinter(writer), nil
+ default:
+ return nil, fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+// TabWriter is a tab writer.
+type TabWriter interface {
+ Write(values ...string) error
+}
+
+// WithTabWriter calls a function with a TabWriter.
+//
+// Shared with internal packages.
+func WithTabWriter(
+ writer io.Writer,
+ header []string,
+ f func(TabWriter) error,
+) (retErr error) {
+ tabWriter := newTabWriter(writer)
+ defer func() {
+ retErr = multierr.Append(retErr, tabWriter.Flush())
+ }()
+ if err := tabWriter.Write(header...); err != nil {
+ return err
+ }
+ return f(tabWriter)
+}
+
+// printProtoMessageJSON prints the Protobuf message as JSON.
+func printProtoMessageJSON(writer io.Writer, message proto.Message) error {
+ data, err := protoencoding.NewJSONMarshalerIndent(nil).Marshal(message)
+ if err != nil {
+ return err
+ }
+ _, err = writer.Write(append(data, []byte("\n")...))
+ return err
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/curated_plugin_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/curated_plugin_printer.go
new file mode 100644
index 000000000..958ed05fa
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/curated_plugin_printer.go
@@ -0,0 +1,112 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "strconv"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type curatedPluginPrinter struct {
+ writer io.Writer
+}
+
+func newCuratedPluginPrinter(writer io.Writer) *curatedPluginPrinter {
+ return &curatedPluginPrinter{
+ writer: writer,
+ }
+}
+
+func (p *curatedPluginPrinter) PrintCuratedPlugin(_ context.Context, format Format, plugin *registryv1alpha1.CuratedPlugin) error {
+ switch format {
+ case FormatText:
+ return p.printCuratedPluginsText(plugin)
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(
+ registryCuratedPluginToOutputCuratedPlugin(plugin),
+ )
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *curatedPluginPrinter) PrintCuratedPlugins(_ context.Context, format Format, nextPageToken string, plugins ...*registryv1alpha1.CuratedPlugin) error {
+ switch format {
+ case FormatText:
+ return p.printCuratedPluginsText(plugins...)
+ case FormatJSON:
+ outputPlugins := make([]outputCuratedPlugin, 0, len(plugins))
+ for _, plugin := range plugins {
+ outputPlugins = append(outputPlugins, registryCuratedPluginToOutputCuratedPlugin(plugin))
+ }
+ return json.NewEncoder(p.writer).Encode(paginationWrapper{
+ NextPage: nextPageToken,
+ Results: outputPlugins,
+ })
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *curatedPluginPrinter) printCuratedPluginsText(plugins ...*registryv1alpha1.CuratedPlugin) error {
+ if len(plugins) == 0 {
+ return nil
+ }
+ return WithTabWriter(
+ p.writer,
+ []string{
+ "Owner",
+ "Name",
+ "Version",
+ "Revision",
+ },
+ func(tabWriter TabWriter) error {
+ for _, plugin := range plugins {
+ if err := tabWriter.Write(
+ plugin.Owner,
+ plugin.Name,
+ plugin.Version,
+ strconv.FormatInt(int64(plugin.Revision), 10),
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+type outputCuratedPlugin struct {
+ Owner string `json:"owner"`
+ Name string `json:"name"`
+ Version string `json:"version"`
+ Revision uint32 `json:"revision"`
+ ImageDigest string `json:"image_digest"`
+}
+
+func registryCuratedPluginToOutputCuratedPlugin(plugin *registryv1alpha1.CuratedPlugin) outputCuratedPlugin {
+ return outputCuratedPlugin{
+ Owner: plugin.Owner,
+ Name: plugin.Name,
+ Version: plugin.Version,
+ Revision: plugin.Revision,
+ ImageDigest: plugin.ContainerImageDigest,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/organization_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/organization_printer.go
new file mode 100644
index 000000000..45bdcf7a9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/organization_printer.go
@@ -0,0 +1,111 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "time"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type organizationPrinter struct {
+ address string
+ writer io.Writer
+}
+
+func newOrganizationPrinter(
+ address string,
+ writer io.Writer,
+) *organizationPrinter {
+ return &organizationPrinter{
+ address: address,
+ writer: writer,
+ }
+}
+
+func (p *organizationPrinter) PrintOrganization(ctx context.Context, format Format, message *registryv1alpha1.Organization) error {
+ outOrganization := registryOrganizationToOutputOrganization(p.address, message)
+ switch format {
+ case FormatText:
+ return p.printOrganizationsText([]outputOrganization{outOrganization})
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(outOrganization)
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *organizationPrinter) PrintOrganizations(ctx context.Context, format Format, nextPageToken string, messages ...*registryv1alpha1.Organization) error {
+ if len(messages) == 0 {
+ return nil
+ }
+ var outputOrganizations []outputOrganization
+ for _, organization := range messages {
+ outputOrganization := registryOrganizationToOutputOrganization(p.address, organization)
+ outputOrganizations = append(outputOrganizations, outputOrganization)
+ }
+ switch format {
+ case FormatText:
+ return p.printOrganizationsText(outputOrganizations)
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(paginationWrapper{
+ NextPage: nextPageToken,
+ Results: outputOrganizations,
+ })
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *organizationPrinter) printOrganizationsText(outputOrganizations []outputOrganization) error {
+ return WithTabWriter(
+ p.writer,
+ []string{
+ "Full name",
+ "Created",
+ },
+ func(tabWriter TabWriter) error {
+ for _, outputOrganization := range outputOrganizations {
+ if err := tabWriter.Write(
+ outputOrganization.Remote+"/"+outputOrganization.Name,
+ outputOrganization.CreateTime.Format(time.RFC3339),
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+type outputOrganization struct {
+ ID string `json:"id,omitempty"`
+ Remote string `json:"remote,omitempty"`
+ Name string `json:"name,omitempty"`
+ CreateTime time.Time `json:"create_time,omitempty"`
+}
+
+func registryOrganizationToOutputOrganization(address string, organization *registryv1alpha1.Organization) outputOrganization {
+ return outputOrganization{
+ ID: organization.Id,
+ Remote: address,
+ Name: organization.Name,
+ CreateTime: organization.CreateTime.AsTime(),
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/pagination_wrapper.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/pagination_wrapper.go
new file mode 100644
index 000000000..24017a77b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/pagination_wrapper.go
@@ -0,0 +1,20 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+type paginationWrapper struct {
+ NextPage string `json:"next_page,omitempty"`
+ Results interface{} `json:"results"`
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/plugin_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/plugin_printer.go
new file mode 100644
index 000000000..cebb5d9bd
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/plugin_printer.go
@@ -0,0 +1,105 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type pluginPrinter struct {
+ writer io.Writer
+}
+
+func newPluginPrinter(
+ writer io.Writer,
+) *pluginPrinter {
+ return &pluginPrinter{
+ writer: writer,
+ }
+}
+
+func (p *pluginPrinter) PrintPlugin(ctx context.Context, format Format, plugin *registryv1alpha1.Plugin) error {
+ switch format {
+ case FormatText:
+ return p.printPluginsText(ctx, plugin)
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(
+ registryPluginToOutputPlugin(plugin),
+ )
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *pluginPrinter) PrintPlugins(ctx context.Context, format Format, nextPageToken string, plugins ...*registryv1alpha1.Plugin) error {
+ switch format {
+ case FormatText:
+ return p.printPluginsText(ctx, plugins...)
+ case FormatJSON:
+ outputPlugins := make([]outputPlugin, 0, len(plugins))
+ for _, plugin := range plugins {
+ outputPlugins = append(outputPlugins, registryPluginToOutputPlugin(plugin))
+ }
+ return json.NewEncoder(p.writer).Encode(paginationWrapper{
+ NextPage: nextPageToken,
+ Results: outputPlugins,
+ })
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *pluginPrinter) printPluginsText(ctx context.Context, plugins ...*registryv1alpha1.Plugin) error {
+ if len(plugins) == 0 {
+ return nil
+ }
+ return WithTabWriter(
+ p.writer,
+ []string{
+ "Owner",
+ "Name",
+ },
+ func(tabWriter TabWriter) error {
+ for _, plugin := range plugins {
+ if err := tabWriter.Write(
+ plugin.Owner,
+ plugin.Name,
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+type outputPlugin struct {
+ Name string `json:"name,omitempty"`
+ Owner string `json:"owner,omitempty"`
+ Visibility string `json:"visibility,omitempty"`
+}
+
+func registryPluginToOutputPlugin(plugin *registryv1alpha1.Plugin) outputPlugin {
+ return outputPlugin{
+ Name: plugin.Name,
+ Owner: plugin.Owner,
+ Visibility: plugin.Visibility.String(),
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/plugin_version_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/plugin_version_printer.go
new file mode 100644
index 000000000..98773cb18
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/plugin_version_printer.go
@@ -0,0 +1,101 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type pluginVersionPrinter struct {
+ writer io.Writer
+}
+
+func newPluginVersionPrinter(
+ writer io.Writer,
+) *pluginVersionPrinter {
+ return &pluginVersionPrinter{
+ writer: writer,
+ }
+}
+
+func (p *pluginVersionPrinter) PrintPluginVersions(ctx context.Context, format Format, nextPageToken string, pluginVersions ...*registryv1alpha1.PluginVersion) error {
+ switch format {
+ case FormatText:
+ return p.printPluginVersionsText(ctx, pluginVersions...)
+ case FormatJSON:
+ outputPlugins := make([]outputPluginVersion, 0, len(pluginVersions))
+ for _, pluginVersion := range pluginVersions {
+ outputPlugins = append(
+ outputPlugins,
+ registryPluginVersionToOutputPluginVersion(pluginVersion),
+ )
+ }
+ return json.NewEncoder(p.writer).Encode(paginationWrapper{
+ NextPage: nextPageToken,
+ Results: outputPlugins,
+ })
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *pluginVersionPrinter) printPluginVersionsText(ctx context.Context, plugins ...*registryv1alpha1.PluginVersion) error {
+ if len(plugins) == 0 {
+ return nil
+ }
+ return WithTabWriter(
+ p.writer,
+ []string{
+ "Name",
+ "Plugin Name",
+ "Plugin Owner",
+ "Container Image Digest",
+ },
+ func(tabWriter TabWriter) error {
+ for _, plugin := range plugins {
+ if err := tabWriter.Write(
+ plugin.Name,
+ plugin.PluginName,
+ plugin.PluginOwner,
+ plugin.ContainerImageDigest,
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+type outputPluginVersion struct {
+ Name string `json:"name,omitempty"`
+ PluginName string `json:"plugin_name,omitempty"`
+ PluginOwner string `json:"plugin_owner,omitempty"`
+ ContainerImageDigest string `json:"container_image_digest,omitempty"`
+}
+
+func registryPluginVersionToOutputPluginVersion(pluginVersion *registryv1alpha1.PluginVersion) outputPluginVersion {
+ return outputPluginVersion{
+ Name: pluginVersion.Name,
+ PluginName: pluginVersion.PluginName,
+ PluginOwner: pluginVersion.PluginOwner,
+ ContainerImageDigest: pluginVersion.ContainerImageDigest,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_commit_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_commit_printer.go
new file mode 100644
index 000000000..0d636a880
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_commit_printer.go
@@ -0,0 +1,103 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type repositoryCommitPrinter struct {
+ writer io.Writer
+}
+
+func newRepositoryCommitPrinter(
+ writer io.Writer,
+) *repositoryCommitPrinter {
+ return &repositoryCommitPrinter{
+ writer: writer,
+ }
+}
+
+func (p *repositoryCommitPrinter) PrintRepositoryCommit(ctx context.Context, format Format, message *registryv1alpha1.RepositoryCommit) error {
+ outCommit := registryCommitToOutputCommit(message)
+ switch format {
+ case FormatText:
+ return p.printRepositoryCommitsText([]outputRepositoryCommit{outCommit})
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(outCommit)
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *repositoryCommitPrinter) PrintRepositoryCommits(ctx context.Context, format Format, nextPageToken string, messages ...*registryv1alpha1.RepositoryCommit) error {
+ if len(messages) == 0 {
+ return nil
+ }
+ var outputRepositoryCommits []outputRepositoryCommit
+ for _, repositoryCommit := range messages {
+ outputRepositoryCommit := registryCommitToOutputCommit(repositoryCommit)
+ outputRepositoryCommits = append(outputRepositoryCommits, outputRepositoryCommit)
+ }
+ switch format {
+ case FormatText:
+ return p.printRepositoryCommitsText(outputRepositoryCommits)
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(paginationWrapper{
+ NextPage: nextPageToken,
+ Results: outputRepositoryCommits,
+ })
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *repositoryCommitPrinter) printRepositoryCommitsText(outputRepositoryCommits []outputRepositoryCommit) error {
+ return WithTabWriter(
+ p.writer,
+ []string{
+ "Commit",
+ },
+ func(tabWriter TabWriter) error {
+ for _, outputRepositoryCommit := range outputRepositoryCommits {
+ if err := tabWriter.Write(
+ outputRepositoryCommit.Commit,
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+type outputRepositoryCommit struct {
+ ID string `json:"id,omitempty"`
+ Commit string `json:"commit,omitempty"`
+ Tags []outputRepositoryTag `json:"tags,omitempty"`
+}
+
+func registryCommitToOutputCommit(repositoryCommit *registryv1alpha1.RepositoryCommit) outputRepositoryCommit {
+ return outputRepositoryCommit{
+ ID: repositoryCommit.Id,
+ Commit: repositoryCommit.Name,
+ Tags: registryTagsToOutputTags(repositoryCommit.Tags),
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_draft_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_draft_printer.go
new file mode 100644
index 000000000..05a52eedb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_draft_printer.go
@@ -0,0 +1,103 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type repositoryDraftPrinter struct {
+ writer io.Writer
+}
+
+func newRepositoryDraftPrinter(
+ writer io.Writer,
+) *repositoryDraftPrinter {
+ return &repositoryDraftPrinter{
+ writer: writer,
+ }
+}
+
+type outputRepositoryDraft struct {
+ Name string `json:"name,omitempty"`
+ Commit string `json:"commit,omitempty"`
+}
+
+func (p *repositoryDraftPrinter) PrintRepositoryDraft(ctx context.Context, format Format, message *registryv1alpha1.RepositoryCommit) error {
+ outDraft := registryDraftToOutputDraft(message)
+ switch format {
+ case FormatText:
+ return p.printRepositoryDraftsText([]outputRepositoryDraft{outDraft})
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(outDraft)
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *repositoryDraftPrinter) PrintRepositoryDrafts(ctx context.Context, format Format, nextPageToken string, messages ...*registryv1alpha1.RepositoryCommit) error {
+ if len(messages) == 0 {
+ return nil
+ }
+ var outputRepositoryDrafs []outputRepositoryDraft
+ for _, repositoryCommit := range messages {
+ outputDraft := registryDraftToOutputDraft(repositoryCommit)
+ outputRepositoryDrafs = append(outputRepositoryDrafs, outputDraft)
+ }
+ switch format {
+ case FormatText:
+ return p.printRepositoryDraftsText(outputRepositoryDrafs)
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(paginationWrapper{
+ NextPage: nextPageToken,
+ Results: outputRepositoryDrafs,
+ })
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *repositoryDraftPrinter) printRepositoryDraftsText(outputRepositoryDrafts []outputRepositoryDraft) error {
+ return WithTabWriter(
+ p.writer,
+ []string{
+ "Name",
+ "Commit",
+ },
+ func(tabWriter TabWriter) error {
+ for _, draft := range outputRepositoryDrafts {
+ if err := tabWriter.Write(
+ draft.Name,
+ draft.Commit,
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func registryDraftToOutputDraft(repositoryCommit *registryv1alpha1.RepositoryCommit) outputRepositoryDraft {
+ return outputRepositoryDraft{
+ Name: repositoryCommit.DraftName,
+ Commit: repositoryCommit.Name,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_printer.go
new file mode 100644
index 000000000..b4304b3ce
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_printer.go
@@ -0,0 +1,158 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "time"
+
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+)
+
+type repositoryPrinter struct {
+ clientConfig *connectclient.Config
+ address string
+ writer io.Writer
+}
+
+func newRepositoryPrinter(
+ clientConfig *connectclient.Config,
+ address string,
+ writer io.Writer,
+) *repositoryPrinter {
+ return &repositoryPrinter{
+ clientConfig: clientConfig,
+ address: address,
+ writer: writer,
+ }
+}
+
+func (p *repositoryPrinter) PrintRepository(ctx context.Context, format Format, message *registryv1alpha1.Repository) error {
+ outputRepositories, err := p.registryRepositoriesToOutRepositories(ctx, message)
+ if err != nil {
+ return err
+ }
+ if len(outputRepositories) != 1 {
+ return fmt.Errorf("error converting repositories: expected 1 got %d", len(outputRepositories))
+ }
+ switch format {
+ case FormatText:
+ return p.printRepositoriesText(outputRepositories)
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(outputRepositories[0])
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *repositoryPrinter) PrintRepositories(ctx context.Context, format Format, nextPageToken string, messages ...*registryv1alpha1.Repository) error {
+ if len(messages) == 0 {
+ return nil
+ }
+ outputRepositories, err := p.registryRepositoriesToOutRepositories(ctx, messages...)
+ if err != nil {
+ return err
+ }
+ switch format {
+ case FormatText:
+ return p.printRepositoriesText(outputRepositories)
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(paginationWrapper{
+ NextPage: nextPageToken,
+ Results: outputRepositories,
+ })
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *repositoryPrinter) registryRepositoriesToOutRepositories(ctx context.Context, messages ...*registryv1alpha1.Repository) ([]outputRepository, error) {
+ var outputRepositories []outputRepository
+ for _, repository := range messages {
+ var ownerName string
+ switch owner := repository.Owner.(type) {
+ case *registryv1alpha1.Repository_OrganizationId:
+ organizationService := connectclient.Make(p.clientConfig, p.address, registryv1alpha1connect.NewOrganizationServiceClient)
+ resp, err := organizationService.GetOrganization(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetOrganizationRequest{
+ Id: owner.OrganizationId,
+ }),
+ )
+ if err != nil {
+ return nil, err
+ }
+ ownerName = resp.Msg.Organization.Name
+ case *registryv1alpha1.Repository_UserId:
+ userService := connectclient.Make(p.clientConfig, p.address, registryv1alpha1connect.NewUserServiceClient)
+ resp, err := userService.GetUser(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetUserRequest{
+ Id: owner.UserId,
+ }),
+ )
+ if err != nil {
+ return nil, err
+ }
+ ownerName = resp.Msg.User.Username
+ default:
+ return nil, fmt.Errorf("unknown owner: %T", owner)
+ }
+ outputRepository := outputRepository{
+ ID: repository.Id,
+ Remote: p.address,
+ Owner: ownerName,
+ Name: repository.Name,
+ CreateTime: repository.CreateTime.AsTime(),
+ }
+ outputRepositories = append(outputRepositories, outputRepository)
+ }
+ return outputRepositories, nil
+}
+
+func (p *repositoryPrinter) printRepositoriesText(outputRepositories []outputRepository) error {
+ return WithTabWriter(
+ p.writer,
+ []string{
+ "Full name",
+ "Created",
+ },
+ func(tabWriter TabWriter) error {
+ for _, outputRepository := range outputRepositories {
+ if err := tabWriter.Write(
+ outputRepository.Remote+"/"+outputRepository.Owner+"/"+outputRepository.Name,
+ outputRepository.CreateTime.Format(time.RFC3339),
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+type outputRepository struct {
+ ID string `json:"id,omitempty"`
+ Remote string `json:"remote,omitempty"`
+ Owner string `json:"owner,omitempty"`
+ Name string `json:"name,omitempty"`
+ CreateTime time.Time `json:"create_time,omitempty"`
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_tag_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_tag_printer.go
new file mode 100644
index 000000000..5d30670c1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/repository_tag_printer.go
@@ -0,0 +1,113 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+ "time"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type repositoryTagPrinter struct {
+ writer io.Writer
+}
+
+func newRepositoryTagPrinter(
+ writer io.Writer,
+) *repositoryTagPrinter {
+ return &repositoryTagPrinter{
+ writer: writer,
+ }
+}
+
+func (p *repositoryTagPrinter) PrintRepositoryTag(ctx context.Context, format Format, message *registryv1alpha1.RepositoryTag) error {
+ outRepositoryTag := registryTagToOutputTag(message)
+ switch format {
+ case FormatText:
+ return p.printRepositoryTagsText([]outputRepositoryTag{outRepositoryTag})
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(outRepositoryTag)
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *repositoryTagPrinter) PrintRepositoryTags(ctx context.Context, format Format, nextPageToken string, messages ...*registryv1alpha1.RepositoryTag) error {
+ if len(messages) == 0 {
+ return nil
+ }
+ outputRepositoryTags := registryTagsToOutputTags(messages)
+ switch format {
+ case FormatText:
+ return p.printRepositoryTagsText(outputRepositoryTags)
+ case FormatJSON:
+ return json.NewEncoder(p.writer).Encode(paginationWrapper{
+ NextPage: nextPageToken,
+ Results: outputRepositoryTags,
+ })
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (p *repositoryTagPrinter) printRepositoryTagsText(outputRepositoryTags []outputRepositoryTag) error {
+ return WithTabWriter(
+ p.writer,
+ []string{
+ "Name",
+ "Commit",
+ "Created",
+ },
+ func(tabWriter TabWriter) error {
+ for _, outputRepositoryTag := range outputRepositoryTags {
+ if err := tabWriter.Write(
+ outputRepositoryTag.Name,
+ outputRepositoryTag.Commit,
+ outputRepositoryTag.CreateTime.Format(time.RFC3339),
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+type outputRepositoryTag struct {
+ ID string `json:"id,omitempty"`
+ Name string `json:"name,omitempty"`
+ Commit string `json:"commit,omitempty"`
+ CreateTime time.Time `json:"create_time,omitempty"`
+}
+
+func registryTagToOutputTag(repositoryTag *registryv1alpha1.RepositoryTag) outputRepositoryTag {
+ return outputRepositoryTag{
+ Name: repositoryTag.Name,
+ Commit: repositoryTag.CommitName,
+ CreateTime: repositoryTag.CreateTime.AsTime(),
+ }
+}
+
+func registryTagsToOutputTags(tags []*registryv1alpha1.RepositoryTag) []outputRepositoryTag {
+ outputRepositoryTags := make([]outputRepositoryTag, len(tags))
+ for i, repositoryTag := range tags {
+ outputRepositoryTags[i] = registryTagToOutputTag(repositoryTag)
+ }
+ return outputRepositoryTags
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/tab_writer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/tab_writer.go
new file mode 100644
index 000000000..6fc06dcfa
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/tab_writer.go
@@ -0,0 +1,43 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "io"
+ "strings"
+ "text/tabwriter"
+)
+
+type tabWriter struct {
+ delegate *tabwriter.Writer
+}
+
+func newTabWriter(writer io.Writer) *tabWriter {
+ return &tabWriter{
+ delegate: tabwriter.NewWriter(writer, 0, 0, 2, ' ', 0),
+ }
+}
+
+func (t *tabWriter) Write(values ...string) error {
+ if len(values) == 0 {
+ return nil
+ }
+ _, err := t.delegate.Write([]byte(strings.Join(values, "\t") + "\n"))
+ return err
+}
+
+func (t *tabWriter) Flush() error {
+ return t.delegate.Flush()
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/template_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/template_printer.go
new file mode 100644
index 000000000..7fdad283d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/template_printer.go
@@ -0,0 +1,103 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type templatePrinter struct {
+ writer io.Writer
+}
+
+func newTemplatePrinter(writer io.Writer) *templatePrinter {
+ return &templatePrinter{
+ writer: writer,
+ }
+}
+
+func (t *templatePrinter) PrintTemplate(ctx context.Context, format Format, template *registryv1alpha1.Template) error {
+ switch format {
+ case FormatText:
+ return t.printTemplatesText(ctx, template)
+ case FormatJSON:
+ return json.NewEncoder(t.writer).Encode(
+ registryTemplateToOutputTemplate(template),
+ )
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (t *templatePrinter) PrintTemplates(ctx context.Context, format Format, nextPageToken string, templates ...*registryv1alpha1.Template) error {
+ switch format {
+ case FormatText:
+ return t.printTemplatesText(ctx, templates...)
+ case FormatJSON:
+ outputTemplates := make([]outputTemplate, 0, len(templates))
+ for _, template := range templates {
+ outputTemplates = append(outputTemplates, registryTemplateToOutputTemplate(template))
+ }
+ return json.NewEncoder(t.writer).Encode(paginationWrapper{
+ NextPage: nextPageToken,
+ Results: outputTemplates,
+ })
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (t *templatePrinter) printTemplatesText(ctx context.Context, templates ...*registryv1alpha1.Template) error {
+ if len(templates) == 0 {
+ return nil
+ }
+ return WithTabWriter(
+ t.writer,
+ []string{
+ "Owner",
+ "Name",
+ },
+ func(tabWriter TabWriter) error {
+ for _, template := range templates {
+ if err := tabWriter.Write(
+ template.Owner,
+ template.Name,
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+type outputTemplate struct {
+ Name string `json:"name,omitempty"`
+ Owner string `json:"owner,omitempty"`
+ Visibility string `json:"visibility,omitempty"`
+}
+
+func registryTemplateToOutputTemplate(template *registryv1alpha1.Template) outputTemplate {
+ return outputTemplate{
+ Name: template.Name,
+ Owner: template.Owner,
+ Visibility: template.Visibility.String(),
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/template_version_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/template_version_printer.go
new file mode 100644
index 000000000..d13779d90
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/template_version_printer.go
@@ -0,0 +1,105 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+ "io"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type templateVersionPrinter struct {
+ writer io.Writer
+}
+
+func newTemplateVersionPrinter(writer io.Writer) *templateVersionPrinter {
+ return &templateVersionPrinter{
+ writer: writer,
+ }
+}
+
+func (t *templateVersionPrinter) PrintTemplateVersion(ctx context.Context, format Format, templateVersion *registryv1alpha1.TemplateVersion) error {
+ switch format {
+ case FormatText:
+ return t.printTemplateVersionsText(ctx, templateVersion)
+ case FormatJSON:
+ return json.NewEncoder(t.writer).Encode(
+ registryTemplateVersionToOutputTemplateVersion(templateVersion),
+ )
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (t *templateVersionPrinter) PrintTemplateVersions(ctx context.Context, format Format, nextPageToken string, templateVersions ...*registryv1alpha1.TemplateVersion) error {
+ switch format {
+ case FormatText:
+ return t.printTemplateVersionsText(ctx, templateVersions...)
+ case FormatJSON:
+ outputTemplateVersions := make([]outputTemplateVersion, 0, len(templateVersions))
+ for _, templateVersion := range templateVersions {
+ outputTemplateVersions = append(outputTemplateVersions, registryTemplateVersionToOutputTemplateVersion(templateVersion))
+ }
+ return json.NewEncoder(t.writer).Encode(paginationWrapper{
+ NextPage: nextPageToken,
+ Results: outputTemplateVersions,
+ })
+ default:
+ return fmt.Errorf("unknown format: %v", format)
+ }
+}
+
+func (t *templateVersionPrinter) printTemplateVersionsText(ctx context.Context, templateVersions ...*registryv1alpha1.TemplateVersion) error {
+ if len(templateVersions) == 0 {
+ return nil
+ }
+ return WithTabWriter(
+ t.writer,
+ []string{
+ "Name",
+ "Template Owner",
+ "Template Name",
+ },
+ func(tabWriter TabWriter) error {
+ for _, templateVersion := range templateVersions {
+ if err := tabWriter.Write(
+ templateVersion.Name,
+ templateVersion.TemplateName,
+ templateVersion.TemplateOwner,
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+type outputTemplateVersion struct {
+ Name string `json:"name,omitempty"`
+ TemplateOwner string `json:"template_owner,omitempty"`
+ TemplateName string `json:"template_name,omitempty"`
+}
+
+func registryTemplateVersionToOutputTemplateVersion(templateVersion *registryv1alpha1.TemplateVersion) outputTemplateVersion {
+ return outputTemplateVersion{
+ Name: templateVersion.Name,
+ TemplateOwner: templateVersion.TemplateOwner,
+ TemplateName: templateVersion.TemplateName,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/token_json_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/token_json_printer.go
new file mode 100644
index 000000000..50ab3404a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/token_json_printer.go
@@ -0,0 +1,44 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "io"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type tokenJSONPrinter struct {
+ writer io.Writer
+}
+
+func newTokenJSONPrinter(writer io.Writer) *tokenJSONPrinter {
+ return &tokenJSONPrinter{
+ writer: writer,
+ }
+}
+
+func (p *tokenJSONPrinter) PrintTokens(
+ ctx context.Context,
+ tokens ...*registryv1alpha1.Token,
+) error {
+ for _, token := range tokens {
+ if err := printProtoMessageJSON(p.writer, token); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/token_text_printer.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/token_text_printer.go
new file mode 100644
index 000000000..8d6a1c43e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/token_text_printer.go
@@ -0,0 +1,61 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufprint
+
+import (
+ "context"
+ "io"
+ "time"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+type tokenTextPrinter struct {
+ writer io.Writer
+}
+
+func newTokenTextPrinter(writer io.Writer) *tokenTextPrinter {
+ return &tokenTextPrinter{
+ writer: writer,
+ }
+}
+
+func (p *tokenTextPrinter) PrintTokens(ctx context.Context, tokens ...*registryv1alpha1.Token) error {
+ if len(tokens) == 0 {
+ return nil
+ }
+ return WithTabWriter(
+ p.writer,
+ []string{
+ "ID",
+ "Note",
+ "Create time",
+ "Expire time",
+ },
+ func(tabWriter TabWriter) error {
+ for _, token := range tokens {
+ if err := tabWriter.Write(
+ token.Id,
+ token.Note,
+ token.CreateTime.AsTime().Format(time.RFC3339),
+ token.ExpireTime.AsTime().Format(time.RFC3339),
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufprint/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/bufprint/usage.gen.go
new file mode 100644
index 000000000..45bfd3e92
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufprint/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufprint
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufref/bufref.go b/vendor/github.com/bufbuild/buf/private/buf/bufref/bufref.go
new file mode 100644
index 000000000..a8e81c9ce
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufref/bufref.go
@@ -0,0 +1,61 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufref
+
+import (
+ "strings"
+)
+
+// GetRawPathAndOptions returns the raw path and options from the value provided,
+// the rawPath will be non-empty when returning without error here.
+func GetRawPathAndOptions(value string) (string, map[string]string, error) {
+ value = strings.TrimSpace(value)
+ if value == "" {
+ return "", nil, newValueEmptyError()
+ }
+
+ switch splitValue := strings.Split(value, "#"); len(splitValue) {
+ case 1:
+ return value, nil, nil
+ case 2:
+ path := strings.TrimSpace(splitValue[0])
+ optionsString := strings.TrimSpace(splitValue[1])
+ if path == "" {
+ return "", nil, newValueStartsWithHashtagError(value)
+ }
+ if optionsString == "" {
+ return "", nil, newValueEndsWithHashtagError(value)
+ }
+ options := make(map[string]string)
+ for _, pair := range strings.Split(optionsString, ",") {
+ split := strings.Split(pair, "=")
+ if len(split) != 2 {
+ return "", nil, newOptionsInvalidError(optionsString)
+ }
+ key := strings.TrimSpace(split[0])
+ value := strings.TrimSpace(split[1])
+ if key == "" || value == "" {
+ return "", nil, newOptionsInvalidError(optionsString)
+ }
+ if _, ok := options[key]; ok {
+ return "", nil, newOptionsDuplicateKeyError(key)
+ }
+ options[key] = value
+ }
+ return path, options, nil
+ default:
+ return "", nil, newValueMultipleHashtagsError(value)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufref/errors.go b/vendor/github.com/bufbuild/buf/private/buf/bufref/errors.go
new file mode 100644
index 000000000..ced2fd5fe
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufref/errors.go
@@ -0,0 +1,44 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufref
+
+import (
+ "errors"
+ "fmt"
+)
+
+func newValueEmptyError() error {
+ return errors.New("required")
+}
+
+func newValueMultipleHashtagsError(value string) error {
+ return fmt.Errorf("%q has multiple #s which is invalid", value)
+}
+
+func newValueStartsWithHashtagError(value string) error {
+ return fmt.Errorf("%q starts with # which is invalid", value)
+}
+
+func newValueEndsWithHashtagError(value string) error {
+ return fmt.Errorf("%q ends with # which is invalid", value)
+}
+
+func newOptionsInvalidError(s string) error {
+ return fmt.Errorf("invalid options: %q", s)
+}
+
+func newOptionsDuplicateKeyError(key string) error {
+ return fmt.Errorf("duplicate options key: %q", key)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufref/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/bufref/usage.gen.go
new file mode 100644
index 000000000..495571cd6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufref/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufref
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/bufwire.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/bufwire.go
new file mode 100644
index 000000000..134294324
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/bufwire.go
@@ -0,0 +1,253 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwire wires everything together.
+//
+// TODO: This package should be split up into individual functionality.
+package bufwire
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/buf/bufconvert"
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+)
+
+// ImageConfig is an image and configuration.
+type ImageConfig interface {
+ Image() bufimage.Image
+ Config() *bufconfig.Config
+}
+
+// ImageConfigReader is an ImageConfig reader.
+type ImageConfigReader interface {
+ // GetImageConfigs gets the ImageConfig for the fetch value.
+ //
+ // If externalDirOrFilePaths is empty, this builds all files under Buf control.
+ GetImageConfigs(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ ref buffetch.Ref,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+ excludeSourceCodeInfo bool,
+ ) ([]ImageConfig, []bufanalysis.FileAnnotation, error)
+}
+
+// NewImageConfigReader returns a new ImageConfigReader.
+func NewImageConfigReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ fetchReader buffetch.Reader,
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder,
+ moduleFileSetBuilder bufmodulebuild.ModuleFileSetBuilder,
+ imageBuilder bufimagebuild.Builder,
+) ImageConfigReader {
+ return newImageConfigReader(
+ logger,
+ storageosProvider,
+ fetchReader,
+ moduleBucketBuilder,
+ moduleFileSetBuilder,
+ imageBuilder,
+ )
+}
+
+// ModuleConfig is an module and configuration.
+type ModuleConfig interface {
+ Module() bufmodule.Module
+ Config() *bufconfig.Config
+ Workspace() bufmodule.Workspace
+}
+
+// ModuleConfigReader is a ModuleConfig reader.
+type ModuleConfigReader interface {
+ // GetModuleConfigs gets the ModuleConfig for the fetch value.
+ //
+ // If externalDirOrFilePaths is empty, this builds all files under Buf control.
+ //
+ // Note that as opposed to ModuleReader, this will return a Module for either
+ // a source or module reference, not just a module reference.
+ GetModuleConfigs(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ sourceOrModuleRef buffetch.SourceOrModuleRef,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+ ) ([]ModuleConfig, error)
+}
+
+// NewModuleConfigReader returns a new ModuleConfigReader
+func NewModuleConfigReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ fetchReader buffetch.Reader,
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder,
+) ModuleConfigReader {
+ return newModuleConfigReader(
+ logger,
+ storageosProvider,
+ fetchReader,
+ moduleBucketBuilder,
+ )
+}
+
+// FileLister lists files.
+type FileLister interface {
+ // ListFiles lists the files.
+ //
+ // If includeImports is set, the ref is built, which can result in FileAnnotations.
+ // There is no defined returned sorting order. If you need the FileInfos to
+ // be sorted, do so with bufmoduleref.SortFileInfos or bufmoduleref.SortFileInfosByExternalPath.
+ ListFiles(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ ref buffetch.Ref,
+ configOverride string,
+ includeImports bool,
+ ) ([]bufmoduleref.FileInfo, []bufanalysis.FileAnnotation, error)
+}
+
+// NewFileLister returns a new FileLister.
+func NewFileLister(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ fetchReader buffetch.Reader,
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder,
+ moduleFileSetBuilder bufmodulebuild.ModuleFileSetBuilder,
+ imageBuilder bufimagebuild.Builder,
+) FileLister {
+ return newFileLister(
+ logger,
+ storageosProvider,
+ fetchReader,
+ moduleBucketBuilder,
+ moduleFileSetBuilder,
+ imageBuilder,
+ )
+}
+
+// ImageReader is an image reader.
+type ImageReader interface {
+ // GetImage reads the image from the value.
+ GetImage(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ imageRef buffetch.ImageRef,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+ excludeSourceCodeInfo bool,
+ ) (bufimage.Image, error)
+}
+
+// NewImageReader returns a new ImageReader.
+func NewImageReader(
+ logger *zap.Logger,
+ fetchReader buffetch.ImageReader,
+) ImageReader {
+ return newImageReader(
+ logger,
+ fetchReader,
+ )
+}
+
+// ImageWriter is an image writer.
+type ImageWriter interface {
+ // PutImage writes the image to the value.
+ //
+ // The file must be an image format.
+ // This is a no-np if value is the equivalent of /dev/null.
+ PutImage(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ imageRef buffetch.ImageRef,
+ image bufimage.Image,
+ asFileDescriptorSet bool,
+ excludeImports bool,
+ ) error
+}
+
+// NewImageWriter returns a new ImageWriter.
+func NewImageWriter(
+ logger *zap.Logger,
+ fetchWriter buffetch.Writer,
+) ImageWriter {
+ return newImageWriter(
+ logger,
+ fetchWriter,
+ )
+}
+
+// ProtoEncodingReader is a reader that reads a protobuf message in different encoding.
+type ProtoEncodingReader interface {
+ // GetMessage reads the message by the messageRef.
+ //
+ // Currently, this support bin and JSON format.
+ GetMessage(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ image bufimage.Image,
+ typeName string,
+ messageRef bufconvert.MessageEncodingRef,
+ ) (proto.Message, error)
+}
+
+// NewProtoEncodingReader returns a new ProtoEncodingReader.
+func NewProtoEncodingReader(
+ logger *zap.Logger,
+) ProtoEncodingReader {
+ return newProtoEncodingReader(
+ logger,
+ )
+}
+
+// ProtoEncodingWriter is a writer that writes a protobuf message in different encoding.
+type ProtoEncodingWriter interface {
+ // PutMessage writes the message to the path, which can be
+ // a path in file system, or stdout represented by "-".
+ //
+ // Currently, this support bin and JSON format.
+ PutMessage(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ image bufimage.Image,
+ message proto.Message,
+ messageRef bufconvert.MessageEncodingRef,
+ ) error
+}
+
+// NewProtoEncodingWriter returns a new ProtoEncodingWriter.
+func NewProtoEncodingWriter(
+ logger *zap.Logger,
+) ProtoEncodingWriter {
+ return newProtoEncodingWriter(
+ logger,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/file_lister.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/file_lister.go
new file mode 100644
index 000000000..03e07b878
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/file_lister.go
@@ -0,0 +1,270 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwire
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/buf/bufwork"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+type fileLister struct {
+ logger *zap.Logger
+ fetchReader buffetch.Reader
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder
+ imageBuilder bufimagebuild.Builder
+ // imageReaders require ImageRefs, we only use this in the withoutImports flow
+ // the imageConfigReader is used when we need to build an image
+ imageReader *imageReader
+ imageConfigReader *imageConfigReader
+}
+
+func newFileLister(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ fetchReader buffetch.Reader,
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder,
+ moduleFileSetBuilder bufmodulebuild.ModuleFileSetBuilder,
+ imageBuilder bufimagebuild.Builder,
+) *fileLister {
+ return &fileLister{
+ logger: logger.Named("bufwire"),
+ fetchReader: fetchReader,
+ moduleBucketBuilder: moduleBucketBuilder,
+ imageBuilder: imageBuilder,
+ imageReader: newImageReader(
+ logger,
+ fetchReader,
+ ),
+ imageConfigReader: newImageConfigReader(
+ logger,
+ storageosProvider,
+ fetchReader,
+ moduleBucketBuilder,
+ moduleFileSetBuilder,
+ imageBuilder,
+ ),
+ }
+}
+
+func (e *fileLister) ListFiles(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ ref buffetch.Ref,
+ configOverride string,
+ includeImports bool,
+) ([]bufmoduleref.FileInfo, []bufanalysis.FileAnnotation, error) {
+ if includeImports {
+ // To get imports, we need to build an image so we keep this flow separate and
+ // re-use the logic in imageConfigReader.
+ return e.listFilesWithImports(
+ ctx,
+ container,
+ ref,
+ configOverride,
+ )
+ }
+ // We don't need to build in the withoutImports flow, so we just completely separate the logic
+ // to make sure the common case is as quick as it can be.
+ return e.listFilesWithoutImports(
+ ctx,
+ container,
+ ref,
+ configOverride,
+ )
+}
+
+func (e *fileLister) listFilesWithImports(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ ref buffetch.Ref,
+ configOverride string,
+) ([]bufmoduleref.FileInfo, []bufanalysis.FileAnnotation, error) {
+ imageConfigs, fileAnnotations, err := e.imageConfigReader.GetImageConfigs(
+ ctx,
+ container,
+ ref,
+ configOverride,
+ nil,
+ nil,
+ false,
+ true,
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ if len(fileAnnotations) > 0 {
+ return nil, fileAnnotations, nil
+ }
+ images := make([]bufimage.Image, len(imageConfigs))
+ for i, imageConfig := range imageConfigs {
+ images[i] = imageConfig.Image()
+ }
+ image, err := bufimage.MergeImages(images...)
+ if err != nil {
+ return nil, nil, err
+ }
+ imageFiles := image.Files()
+ fileInfos := make([]bufmoduleref.FileInfo, len(imageFiles))
+ for i, imageFile := range imageFiles {
+ fileInfos[i] = imageFile
+ }
+ return fileInfos, nil, nil
+}
+
+func (e *fileLister) listFilesWithoutImports(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ ref buffetch.Ref,
+ configOverride string,
+) (_ []bufmoduleref.FileInfo, _ []bufanalysis.FileAnnotation, retErr error) {
+ switch t := ref.(type) {
+ case buffetch.ProtoFileRef:
+ imageConfigs, fileAnnotations, err := e.imageConfigReader.GetImageConfigs(
+ ctx,
+ container,
+ ref,
+ configOverride,
+ nil,
+ nil,
+ false,
+ true,
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ if len(fileAnnotations) > 0 {
+ return nil, fileAnnotations, nil
+ }
+ var fileInfos []bufmoduleref.FileInfo
+ // There should only be a single imageConfig compiled based on the proto file reference
+ // and the `include_package_files` option if set. These are handled by the imageConfigReader,
+ // we only need to collect the fileInfos here.
+ for _, imageConfig := range imageConfigs {
+ for _, imageFile := range imageConfig.Image().Files() {
+ if !imageFile.IsImport() {
+ fileInfos = append(fileInfos, imageFile)
+ }
+ }
+ }
+ return fileInfos, nil, nil
+ case buffetch.ImageRef:
+ // if we have an image, list the files in the image
+ image, err := e.imageReader.GetImage(
+ ctx,
+ container,
+ t,
+ nil,
+ nil,
+ false,
+ true,
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ var fileInfos []bufmoduleref.FileInfo
+ for _, file := range image.Files() {
+ if !file.IsImport() {
+ fileInfos = append(fileInfos, file)
+ }
+ }
+ return fileInfos, nil, nil
+ case buffetch.SourceRef:
+ readBucketCloser, err := e.fetchReader.GetSourceBucket(ctx, container, t)
+ if err != nil {
+ return nil, nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, readBucketCloser.Close())
+ }()
+ existingConfigFilePath, err := bufwork.ExistingConfigFilePath(ctx, readBucketCloser)
+ if err != nil {
+ return nil, nil, err
+ }
+ if subDirPath := readBucketCloser.SubDirPath(); existingConfigFilePath == "" || subDirPath != "." {
+ fileInfos, err := e.sourceFileInfosForDirectory(ctx, readBucketCloser, subDirPath, configOverride)
+ if err != nil {
+ return nil, nil, err
+ }
+ return fileInfos, nil, nil
+ }
+ workspaceConfig, err := bufwork.GetConfigForBucket(ctx, readBucketCloser, readBucketCloser.RelativeRootPath())
+ if err != nil {
+ return nil, nil, err
+ }
+ var allSourceFileInfos []bufmoduleref.FileInfo
+ for _, directory := range workspaceConfig.Directories {
+ sourceFileInfos, err := e.sourceFileInfosForDirectory(ctx, readBucketCloser, directory, configOverride)
+ if err != nil {
+ return nil, nil, err
+ }
+ allSourceFileInfos = append(allSourceFileInfos, sourceFileInfos...)
+ }
+ return allSourceFileInfos, nil, nil
+ case buffetch.ModuleRef:
+ module, err := e.fetchReader.GetModule(ctx, container, t)
+ if err != nil {
+ return nil, nil, err
+ }
+ fileInfos, err := module.SourceFileInfos(ctx)
+ if err != nil {
+ return nil, nil, err
+ }
+ return fileInfos, nil, nil
+ default:
+ return nil, nil, fmt.Errorf("invalid ref: %T", ref)
+ }
+}
+
+// sourceFileInfosForDirectory returns the source file infos
+// for the module defined in the given diretory of the read bucket.
+func (e *fileLister) sourceFileInfosForDirectory(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ directory string,
+ configOverride string,
+) ([]bufmoduleref.FileInfo, error) {
+ mappedReadBucket := storage.MapReadBucket(readBucket, storage.MapOnPrefix(directory))
+ config, err := bufconfig.ReadConfigOS(
+ ctx,
+ mappedReadBucket,
+ bufconfig.ReadConfigOSWithOverride(configOverride),
+ )
+ if err != nil {
+ return nil, err
+ }
+ module, err := e.moduleBucketBuilder.BuildForBucket(
+ ctx,
+ mappedReadBucket,
+ config.Build,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return module.SourceFileInfos(ctx)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_config.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_config.go
new file mode 100644
index 000000000..542aca855
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_config.go
@@ -0,0 +1,40 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwire
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+)
+
+type imageConfig struct {
+ image bufimage.Image
+ config *bufconfig.Config
+}
+
+func newImageConfig(image bufimage.Image, config *bufconfig.Config) *imageConfig {
+ return &imageConfig{
+ image: image,
+ config: config,
+ }
+}
+
+func (i *imageConfig) Image() bufimage.Image {
+ return i.image
+}
+
+func (i *imageConfig) Config() *bufconfig.Config {
+ return i.config
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_config_reader.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_config_reader.go
new file mode 100644
index 000000000..a6c16f7a6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_config_reader.go
@@ -0,0 +1,309 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwire
+
+import (
+ "context"
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.opencensus.io/trace"
+ "go.uber.org/zap"
+)
+
+type imageConfigReader struct {
+ logger *zap.Logger
+ storageosProvider storageos.Provider
+ fetchReader buffetch.Reader
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder
+ moduleFileSetBuilder bufmodulebuild.ModuleFileSetBuilder
+ imageBuilder bufimagebuild.Builder
+ moduleConfigReader *moduleConfigReader
+ imageReader *imageReader
+}
+
+func newImageConfigReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ fetchReader buffetch.Reader,
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder,
+ moduleFileSetBuilder bufmodulebuild.ModuleFileSetBuilder,
+ imageBuilder bufimagebuild.Builder,
+) *imageConfigReader {
+ return &imageConfigReader{
+ logger: logger.Named("bufwire"),
+ storageosProvider: storageosProvider,
+ fetchReader: fetchReader,
+ moduleBucketBuilder: moduleBucketBuilder,
+ moduleFileSetBuilder: moduleFileSetBuilder,
+ imageBuilder: imageBuilder,
+ moduleConfigReader: newModuleConfigReader(
+ logger,
+ storageosProvider,
+ fetchReader,
+ moduleBucketBuilder,
+ ),
+ imageReader: newImageReader(
+ logger,
+ fetchReader,
+ ),
+ }
+}
+
+func (i *imageConfigReader) GetImageConfigs(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ ref buffetch.Ref,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+ excludeSourceCodeInfo bool,
+) ([]ImageConfig, []bufanalysis.FileAnnotation, error) {
+ switch t := ref.(type) {
+ case buffetch.ImageRef:
+ env, err := i.getImageImageConfig(
+ ctx,
+ container,
+ t,
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ excludeSourceCodeInfo,
+ )
+ return []ImageConfig{env}, nil, err
+ case buffetch.SourceRef:
+ return i.getSourceOrModuleImageConfigs(
+ ctx,
+ container,
+ t,
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ excludeSourceCodeInfo,
+ )
+ case buffetch.ModuleRef:
+ return i.getSourceOrModuleImageConfigs(
+ ctx,
+ container,
+ t,
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ excludeSourceCodeInfo,
+ )
+ default:
+ return nil, nil, fmt.Errorf("invalid ref: %T", ref)
+ }
+}
+
+func (i *imageConfigReader) getSourceOrModuleImageConfigs(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ sourceOrModuleRef buffetch.SourceOrModuleRef,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+ excludeSourceCodeInfo bool,
+) ([]ImageConfig, []bufanalysis.FileAnnotation, error) {
+ moduleConfigs, err := i.moduleConfigReader.GetModuleConfigs(
+ ctx,
+ container,
+ sourceOrModuleRef,
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ imageConfigs := make([]ImageConfig, 0, len(moduleConfigs))
+ var allFileAnnotations []bufanalysis.FileAnnotation
+ for _, moduleConfig := range moduleConfigs {
+ moduleFileSet, err := i.moduleFileSetBuilder.Build(
+ ctx,
+ moduleConfig.Module(),
+ bufmodulebuild.WithWorkspace(moduleConfig.Workspace()),
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ targetFileInfos, err := moduleFileSet.TargetFileInfos(ctx)
+ if err != nil {
+ return nil, nil, err
+ }
+ if len(targetFileInfos) == 0 {
+ // This ModuleFileSet doesn't have any targets, so we shouldn't build
+ // an image for it.
+ continue
+ }
+ imageConfig, fileAnnotations, err := i.buildModule(
+ ctx,
+ moduleConfig.Config(),
+ moduleFileSet,
+ excludeSourceCodeInfo,
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ if imageConfig != nil {
+ imageConfigs = append(imageConfigs, imageConfig)
+ }
+ allFileAnnotations = append(allFileAnnotations, fileAnnotations...)
+ }
+ if len(allFileAnnotations) > 0 {
+ // Deduplicate and sort the file annotations again now that we've
+ // consolidated them across multiple images.
+ return nil, bufanalysis.DeduplicateAndSortFileAnnotations(allFileAnnotations), nil
+ }
+ if len(imageConfigs) == 0 {
+ return nil, nil, errors.New("no .proto target files found")
+ }
+ if protoFileRef, ok := sourceOrModuleRef.(buffetch.ProtoFileRef); ok {
+ imageConfigs, err = filterImageConfigs(imageConfigs, protoFileRef)
+ if err != nil {
+ return nil, nil, err
+ }
+ }
+ return imageConfigs, nil, nil
+}
+
+func (i *imageConfigReader) getImageImageConfig(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ imageRef buffetch.ImageRef,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+ excludeSourceCodeInfo bool,
+) (_ ImageConfig, retErr error) {
+ image, err := i.imageReader.GetImage(
+ ctx,
+ container,
+ imageRef,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ excludeSourceCodeInfo,
+ )
+ if err != nil {
+ return nil, err
+ }
+ readWriteBucket, err := i.storageosProvider.NewReadWriteBucket(
+ ".",
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return nil, err
+ }
+ config, err := bufconfig.ReadConfigOS(
+ ctx,
+ readWriteBucket,
+ bufconfig.ReadConfigOSWithOverride(configOverride),
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newImageConfig(image, config), nil
+}
+
+func (i *imageConfigReader) buildModule(
+ ctx context.Context,
+ config *bufconfig.Config,
+ moduleFileSet bufmodule.ModuleFileSet,
+ excludeSourceCodeInfo bool,
+) (ImageConfig, []bufanalysis.FileAnnotation, error) {
+ ctx, span := trace.StartSpan(ctx, "build_module")
+ defer span.End()
+ var options []bufimagebuild.BuildOption
+ if excludeSourceCodeInfo {
+ options = append(options, bufimagebuild.WithExcludeSourceCodeInfo())
+ }
+ image, fileAnnotations, err := i.imageBuilder.Build(
+ ctx,
+ moduleFileSet,
+ options...,
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ if len(fileAnnotations) > 0 {
+ return nil, fileAnnotations, nil
+ }
+ return newImageConfig(image, config), nil, nil
+}
+
+// filterImageConfigs takes in image configs and filters them based on the proto file ref.
+// First, we get the package, path, and config for the file ref. And then we merge the images
+// across the ImageConfigs, then filter them based on the paths for the package.
+//
+// The image merge is needed because if the `include_package_files=true` option is set, we
+// need to gather all the files for the package, including files spread out across workspace
+// directories, which would result in multiple image configs.
+func filterImageConfigs(imageConfigs []ImageConfig, protoFileRef buffetch.ProtoFileRef) ([]ImageConfig, error) {
+ var pkg string
+ var path string
+ var config *bufconfig.Config
+ var images []bufimage.Image
+ for _, imageConfig := range imageConfigs {
+ for _, imageFile := range imageConfig.Image().Files() {
+ // TODO: Ideally, we have the path returned from PathForExternalPath, however for a protoFileRef,
+ // PathForExternalPath returns only ".", when matched on the exact path of the proto file
+ // provided as the ref. This is expected since `PathForExternalPath` is meant to return the relative
+ // path based on the reference, which in this case will always be a specific file.
+ if _, err := protoFileRef.PathForExternalPath(imageFile.ExternalPath()); err == nil {
+ pkg = imageFile.Proto().GetPackage()
+ path = imageFile.Path()
+ config = imageConfig.Config()
+ break
+ }
+ }
+ images = append(images, imageConfig.Image())
+ }
+ image, err := bufimage.MergeImages(images...)
+ if err != nil {
+ return nil, err
+ }
+ var paths []string
+ if protoFileRef.IncludePackageFiles() {
+ for _, imageFile := range image.Files() {
+ if imageFile.Proto().GetPackage() == pkg {
+ paths = append(paths, imageFile.Path())
+ }
+ }
+ } else {
+ paths = []string{path}
+ }
+ prunedImage, err := bufimage.ImageWithOnlyPaths(image, paths, nil)
+ if err != nil {
+ return nil, err
+ }
+ return []ImageConfig{newImageConfig(prunedImage, config)}, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_reader.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_reader.go
new file mode 100644
index 000000000..ee2e6ec07
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_reader.go
@@ -0,0 +1,143 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwire
+
+import (
+ "context"
+ "fmt"
+ "io"
+
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/protoencoding"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+type imageReader struct {
+ logger *zap.Logger
+ fetchReader buffetch.ImageReader
+}
+
+func newImageReader(
+ logger *zap.Logger,
+ fetchReader buffetch.ImageReader,
+) *imageReader {
+ return &imageReader{
+ logger: logger.Named("bufwire"),
+ fetchReader: fetchReader,
+ }
+}
+
+func (i *imageReader) GetImage(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ imageRef buffetch.ImageRef,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+ excludeSourceCodeInfo bool,
+) (_ bufimage.Image, retErr error) {
+ ctx, span := trace.StartSpan(ctx, "get_image")
+ defer span.End()
+ readCloser, err := i.fetchReader.GetImageFile(ctx, container, imageRef)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, readCloser.Close())
+ }()
+ data, err := io.ReadAll(readCloser)
+ if err != nil {
+ return nil, err
+ }
+ protoImage := &imagev1.Image{}
+ var imageFromProtoOptions []bufimage.NewImageForProtoOption
+ switch imageEncoding := imageRef.ImageEncoding(); imageEncoding {
+ // we have to double parse due to custom options
+ // See https://github.com/golang/protobuf/issues/1123
+ // TODO: revisit
+ case buffetch.ImageEncodingBin:
+ _, span := trace.StartSpan(ctx, "wire_unmarshal")
+ if err := protoencoding.NewWireUnmarshaler(nil).Unmarshal(data, protoImage); err != nil {
+ return nil, fmt.Errorf("could not unmarshal image: %v", err)
+ }
+ span.End()
+ case buffetch.ImageEncodingJSON:
+ firstProtoImage := &imagev1.Image{}
+ _, span := trace.StartSpan(ctx, "first_json_unmarshal")
+ if err := protoencoding.NewJSONUnmarshaler(nil).Unmarshal(data, firstProtoImage); err != nil {
+ return nil, fmt.Errorf("could not unmarshal image: %v", err)
+ }
+ // TODO right now, NewResolver sets AllowUnresolvable to true all the time
+ // we want to make this into a check, and we verify if we need this for the individual command
+ span.End()
+ _, span = trace.StartSpan(ctx, "new_resolver")
+ resolver, err := protoencoding.NewResolver(
+ bufimage.ProtoImageToFileDescriptors(
+ firstProtoImage,
+ )...,
+ )
+ if err != nil {
+ return nil, err
+ }
+ span.End()
+ _, span = trace.StartSpan(ctx, "second_json_unmarshal")
+ if err := protoencoding.NewJSONUnmarshaler(resolver).Unmarshal(data, protoImage); err != nil {
+ return nil, fmt.Errorf("could not unmarshal image: %v", err)
+ }
+ span.End()
+ // we've already re-parsed, by unmarshalling 2x above
+ imageFromProtoOptions = append(imageFromProtoOptions, bufimage.WithNoReparse())
+ default:
+ return nil, fmt.Errorf("unknown image encoding: %v", imageEncoding)
+ }
+ if excludeSourceCodeInfo {
+ for _, fileDescriptorProto := range protoImage.File {
+ fileDescriptorProto.SourceCodeInfo = nil
+ }
+ }
+ image, err := bufimage.NewImageForProto(protoImage, imageFromProtoOptions...)
+ if err != nil {
+ return nil, err
+ }
+ if len(externalDirOrFilePaths) == 0 && len(externalExcludeDirOrFilePaths) == 0 {
+ return image, nil
+ }
+ imagePaths := make([]string, len(externalDirOrFilePaths))
+ for i, externalDirOrFilePath := range externalDirOrFilePaths {
+ imagePath, err := imageRef.PathForExternalPath(externalDirOrFilePath)
+ if err != nil {
+ return nil, err
+ }
+ imagePaths[i] = imagePath
+ }
+ excludePaths := make([]string, len(externalExcludeDirOrFilePaths))
+ for i, excludeDirOrFilePath := range externalExcludeDirOrFilePaths {
+ excludePath, err := imageRef.PathForExternalPath(excludeDirOrFilePath)
+ if err != nil {
+ return nil, err
+ }
+ excludePaths[i] = excludePath
+ }
+ if externalDirOrFilePathsAllowNotExist {
+ // externalDirOrFilePaths have to be targetPaths
+ return bufimage.ImageWithOnlyPathsAllowNotExist(image, imagePaths, excludePaths)
+ }
+ return bufimage.ImageWithOnlyPaths(image, imagePaths, excludePaths)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_writer.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_writer.go
new file mode 100644
index 000000000..98eb5faa0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/image_writer.go
@@ -0,0 +1,110 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwire
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/protoencoding"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+)
+
+type imageWriter struct {
+ logger *zap.Logger
+ fetchWriter buffetch.Writer
+}
+
+func newImageWriter(
+ logger *zap.Logger,
+ fetchWriter buffetch.Writer,
+) *imageWriter {
+ return &imageWriter{
+ logger: logger,
+ fetchWriter: fetchWriter,
+ }
+}
+
+func (i *imageWriter) PutImage(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ imageRef buffetch.ImageRef,
+ image bufimage.Image,
+ asFileDescriptorSet bool,
+ excludeImports bool,
+) (retErr error) {
+ ctx, span := trace.StartSpan(ctx, "put_image")
+ defer span.End()
+ // stop short for performance
+ if imageRef.IsNull() {
+ return nil
+ }
+ writeImage := image
+ if excludeImports {
+ writeImage = bufimage.ImageWithoutImports(image)
+ }
+ var message proto.Message
+ if asFileDescriptorSet {
+ message = bufimage.ImageToFileDescriptorSet(writeImage)
+ } else {
+ message = bufimage.ImageToProtoImage(writeImage)
+ }
+ data, err := i.imageMarshal(ctx, message, image, imageRef.ImageEncoding())
+ if err != nil {
+ return err
+ }
+ writeCloser, err := i.fetchWriter.PutImageFile(ctx, container, imageRef)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, writeCloser.Close())
+ }()
+ _, err = writeCloser.Write(data)
+ return err
+}
+
+func (i *imageWriter) imageMarshal(
+ ctx context.Context,
+ message proto.Message,
+ image bufimage.Image,
+ imageEncoding buffetch.ImageEncoding,
+) ([]byte, error) {
+ _, span := trace.StartSpan(ctx, "image_marshal")
+ defer span.End()
+ switch imageEncoding {
+ case buffetch.ImageEncodingBin:
+ return protoencoding.NewWireMarshaler().Marshal(message)
+ case buffetch.ImageEncodingJSON:
+ // TODO: verify that image is complete
+ resolver, err := protoencoding.NewResolver(
+ bufimage.ImageToFileDescriptors(
+ image,
+ )...,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return protoencoding.NewJSONMarshaler(resolver).Marshal(message)
+ default:
+ return nil, fmt.Errorf("unknown image encoding: %v", imageEncoding)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/module_config.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/module_config.go
new file mode 100644
index 000000000..3e95fe550
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/module_config.go
@@ -0,0 +1,46 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwire
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+)
+
+type moduleConfig struct {
+ module bufmodule.Module
+ config *bufconfig.Config
+ workspace bufmodule.Workspace
+}
+
+func newModuleConfig(module bufmodule.Module, config *bufconfig.Config, workspace bufmodule.Workspace) *moduleConfig {
+ return &moduleConfig{
+ module: module,
+ config: config,
+ workspace: workspace,
+ }
+}
+
+func (m *moduleConfig) Module() bufmodule.Module {
+ return m.module
+}
+
+func (m *moduleConfig) Config() *bufconfig.Config {
+ return m.config
+}
+
+func (m *moduleConfig) Workspace() bufmodule.Workspace {
+ return m.workspace
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/module_config_reader.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/module_config_reader.go
new file mode 100644
index 000000000..2b0cdada4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/module_config_reader.go
@@ -0,0 +1,697 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwire
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/buf/bufwork"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+type moduleConfigReader struct {
+ logger *zap.Logger
+ storageosProvider storageos.Provider
+ fetchReader buffetch.Reader
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder
+}
+
+func newModuleConfigReader(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ fetchReader buffetch.Reader,
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder,
+) *moduleConfigReader {
+ return &moduleConfigReader{
+ logger: logger,
+ storageosProvider: storageosProvider,
+ fetchReader: fetchReader,
+ moduleBucketBuilder: moduleBucketBuilder,
+ }
+}
+
+func (m *moduleConfigReader) GetModuleConfigs(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ sourceOrModuleRef buffetch.SourceOrModuleRef,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+) ([]ModuleConfig, error) {
+ ctx, span := trace.StartSpan(ctx, "get_module_config")
+ defer span.End()
+ // We construct a new WorkspaceBuilder here so that the cache is only used for a single call.
+ workspaceBuilder := bufwork.NewWorkspaceBuilder(m.moduleBucketBuilder)
+ switch t := sourceOrModuleRef.(type) {
+ case buffetch.ProtoFileRef:
+ return m.getProtoFileModuleSourceConfigs(
+ ctx,
+ container,
+ t,
+ workspaceBuilder,
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ case buffetch.SourceRef:
+ return m.getSourceModuleConfigs(
+ ctx,
+ container,
+ t,
+ workspaceBuilder,
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ case buffetch.ModuleRef:
+ moduleConfig, err := m.getModuleModuleConfig(
+ ctx,
+ container,
+ t,
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return []ModuleConfig{
+ moduleConfig,
+ }, nil
+ default:
+ return nil, fmt.Errorf("invalid ref: %T", sourceOrModuleRef)
+ }
+}
+
+func (m *moduleConfigReader) getSourceModuleConfigs(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ sourceRef buffetch.SourceRef,
+ workspaceBuilder bufwork.WorkspaceBuilder,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+) (_ []ModuleConfig, retErr error) {
+ readBucketCloser, err := m.fetchReader.GetSourceBucket(ctx, container, sourceRef)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, readBucketCloser.Close())
+ }()
+ existingConfigFilePath, err := bufwork.ExistingConfigFilePath(ctx, readBucketCloser)
+ if err != nil {
+ return nil, err
+ }
+ if existingConfigFilePath != "" {
+ return m.getWorkspaceModuleConfigs(
+ ctx,
+ sourceRef,
+ workspaceBuilder,
+ readBucketCloser,
+ readBucketCloser.RelativeRootPath(),
+ readBucketCloser.SubDirPath(),
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ }
+ moduleConfig, err := m.getSourceModuleConfig(
+ ctx,
+ sourceRef,
+ readBucketCloser,
+ readBucketCloser.RelativeRootPath(),
+ readBucketCloser.SubDirPath(),
+ configOverride,
+ workspaceBuilder,
+ nil,
+ nil,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return []ModuleConfig{
+ moduleConfig,
+ }, nil
+}
+
+func (m *moduleConfigReader) getModuleModuleConfig(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ moduleRef buffetch.ModuleRef,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+) (_ ModuleConfig, retErr error) {
+ module, err := m.fetchReader.GetModule(ctx, container, moduleRef)
+ if err != nil {
+ return nil, err
+ }
+ if len(externalDirOrFilePaths) > 0 {
+ targetPaths := make([]string, len(externalDirOrFilePaths))
+ for i, externalDirOrFilePath := range externalDirOrFilePaths {
+ targetPath, err := moduleRef.PathForExternalPath(externalDirOrFilePath)
+ if err != nil {
+ return nil, err
+ }
+ targetPaths[i] = targetPath
+ }
+ excludePaths := make([]string, len(externalExcludeDirOrFilePaths))
+ for i, excludeDirOrFilePath := range externalExcludeDirOrFilePaths {
+ excludePath, err := moduleRef.PathForExternalPath(excludeDirOrFilePath)
+ if err != nil {
+ return nil, err
+ }
+ excludePaths[i] = excludePath
+ }
+ if externalDirOrFilePathsAllowNotExist {
+ module, err = bufmodule.ModuleWithTargetPathsAllowNotExist(module, targetPaths, excludePaths)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ module, err = bufmodule.ModuleWithTargetPaths(module, targetPaths, excludePaths)
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+ // TODO: we should read the config from the module when configuration
+ // is added to modules
+ readWriteBucket, err := m.storageosProvider.NewReadWriteBucket(
+ ".",
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return nil, err
+ }
+ config, err := bufconfig.ReadConfigOS(
+ ctx,
+ readWriteBucket,
+ bufconfig.ReadConfigOSWithOverride(configOverride),
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newModuleConfig(module, config, nil /* Workspaces aren't supported for ModuleRefs */), nil
+}
+
+func (m *moduleConfigReader) getProtoFileModuleSourceConfigs(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ protoFileRef buffetch.ProtoFileRef,
+ workspaceBuilder bufwork.WorkspaceBuilder,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+) (_ []ModuleConfig, retErr error) {
+ readBucketCloser, err := m.fetchReader.GetSourceBucket(ctx, container, protoFileRef)
+ if err != nil {
+ return nil, err
+ }
+ workspaceConfigs := stringutil.SliceToMap(bufwork.AllConfigFilePaths)
+ moduleConfigs := stringutil.SliceToMap(bufconfig.AllConfigFilePaths)
+ terminateFileProvider := readBucketCloser.TerminateFileProvider()
+ var workspaceConfigDirectory string
+ var moduleConfigDirectory string
+ for _, terminateFile := range terminateFileProvider.GetTerminateFiles() {
+ if _, ok := workspaceConfigs[terminateFile.Name()]; ok {
+ workspaceConfigDirectory = terminateFile.Path()
+ continue
+ }
+ if _, ok := moduleConfigs[terminateFile.Name()]; ok {
+ moduleConfigDirectory = terminateFile.Path()
+ }
+ }
+ // If a workspace and module are both found, then we need to check of the module is within
+ // the workspace. If it is, we use the workspace. Otherwise, we use the module.
+ if workspaceConfigDirectory != "" {
+ if moduleConfigDirectory != "" {
+ relativePath, err := normalpath.Rel(workspaceConfigDirectory, moduleConfigDirectory)
+ if err != nil {
+ return nil, err
+ }
+ readBucketCloser.SetSubDirPath(normalpath.Normalize(relativePath))
+ } else {
+ // If there are no module configs in the path to the workspace, we need to check whether or not
+ // proto file ref is contained within one of the workspace directories.
+ // If yes, we can set the `SubDirPath` for the bucket to the directory, to ensure we build all the
+ // dependencies for the directory. If not, then we will keep the `SubDirPath` as the working directory.
+ workspaceConfig, err := bufwork.GetConfigForBucket(ctx, readBucketCloser, readBucketCloser.RelativeRootPath())
+ if err != nil {
+ return nil, err
+ }
+ for _, directory := range workspaceConfig.Directories {
+ if normalpath.EqualsOrContainsPath(directory, readBucketCloser.SubDirPath(), normalpath.Relative) {
+ readBucketCloser.SetSubDirPath(normalpath.Normalize(directory))
+ break
+ }
+ }
+ }
+ return m.getWorkspaceModuleConfigs(
+ ctx,
+ protoFileRef,
+ workspaceBuilder,
+ readBucketCloser,
+ readBucketCloser.RelativeRootPath(),
+ readBucketCloser.SubDirPath(),
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ }
+ moduleConfig, err := m.getSourceModuleConfig(
+ ctx,
+ protoFileRef,
+ readBucketCloser,
+ readBucketCloser.RelativeRootPath(),
+ readBucketCloser.SubDirPath(),
+ configOverride,
+ workspaceBuilder,
+ nil,
+ nil,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return []ModuleConfig{
+ moduleConfig,
+ }, nil
+}
+
+func (m *moduleConfigReader) getWorkspaceModuleConfigs(
+ ctx context.Context,
+ sourceRef buffetch.SourceRef,
+ workspaceBuilder bufwork.WorkspaceBuilder,
+ readBucket storage.ReadBucket,
+ relativeRootPath string,
+ subDirPath string,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+) ([]ModuleConfig, error) {
+ workspaceConfig, err := bufwork.GetConfigForBucket(ctx, readBucket, relativeRootPath)
+ if err != nil {
+ return nil, err
+ }
+ if subDirPath != "." {
+ // There's only a single ModuleConfig based on the subDirPath,
+ // so we only need to create a single workspace.
+ workspace, err := workspaceBuilder.BuildWorkspace(
+ ctx,
+ workspaceConfig,
+ readBucket,
+ relativeRootPath,
+ subDirPath,
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, err
+ }
+ moduleConfig, err := m.getSourceModuleConfig(
+ ctx,
+ sourceRef,
+ readBucket,
+ relativeRootPath,
+ subDirPath,
+ configOverride,
+ workspaceBuilder,
+ workspaceConfig,
+ workspace,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return []ModuleConfig{
+ moduleConfig,
+ }, nil
+ }
+ if configOverride != "" {
+ return nil, errors.New("the --config flag is not compatible with workspaces")
+ }
+ // The target subDirPath points to the workspace configuration,
+ // so we construct a separate workspace for each of the configured
+ // directories.
+ var moduleConfigs []ModuleConfig
+ // We need to first get the map of externalDirOrFilePath to subDirRelPath and the map
+ // of excludeDirOrFilePath to subDirRelExcludePath so we can check that all paths that
+ // have been provided at the top level have been accounted for across the workspace.
+ externalPathToRelPaths := make(map[string]string)
+ externalExcludePathToRelPaths := make(map[string]string)
+ for _, directory := range workspaceConfig.Directories {
+ // We are unfortunately adding this logic in two difference places, once at the top level
+ // here, and when we build each workspace for the build options. We need to do the work
+ // at this level because we need to check across all workspaces once.
+ // We need the same logic again for each workspace build because a module can span across
+ // several workspaces.
+ // That being said, the work will be done once, since the module build may be cached as
+ // as a dependency via bufwork.BuildWorkspace, so the module will always be built once.
+ externalPathToSubDirRelPaths, err := bufwork.ExternalPathsToSubDirRelPaths(
+ relativeRootPath,
+ directory,
+ externalDirOrFilePaths,
+ )
+ if err != nil {
+ return nil, err
+ }
+ externalExcludeToSubDirRelExcludePaths, err := bufwork.ExternalPathsToSubDirRelPaths(
+ relativeRootPath,
+ directory,
+ externalExcludeDirOrFilePaths,
+ )
+ if err != nil {
+ return nil, err
+ }
+ for externalFileOrDirPath, subDirRelPath := range externalPathToSubDirRelPaths {
+ externalPathToRelPaths[externalFileOrDirPath] = subDirRelPath
+ }
+ for excludeFileOrDirPath, subDirRelExcludePath := range externalExcludeToSubDirRelExcludePaths {
+ externalExcludePathToRelPaths[excludeFileOrDirPath] = subDirRelExcludePath
+ }
+ workspace, err := workspaceBuilder.BuildWorkspace(
+ ctx,
+ workspaceConfig,
+ readBucket,
+ relativeRootPath,
+ directory,
+ configOverride,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, err
+ }
+ moduleConfig, err := m.getSourceModuleConfig(
+ ctx,
+ sourceRef,
+ readBucket,
+ relativeRootPath,
+ directory,
+ configOverride,
+ workspaceBuilder,
+ workspaceConfig,
+ workspace,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, err
+ }
+ moduleConfigs = append(moduleConfigs, moduleConfig)
+ }
+ // This is only a requirement if we do not allow paths to not exist.
+ if !externalDirOrFilePathsAllowNotExist {
+ for _, externalDirOrFilePath := range externalDirOrFilePaths {
+ if _, ok := externalPathToRelPaths[externalDirOrFilePath]; !ok {
+ return nil, fmt.Errorf("path does not exist: %s", externalDirOrFilePath)
+ }
+ }
+ for _, excludeDirOrFilePath := range externalExcludeDirOrFilePaths {
+ if _, ok := externalExcludePathToRelPaths[excludeDirOrFilePath]; !ok {
+ return nil, fmt.Errorf("path does not exist: %s", excludeDirOrFilePath)
+ }
+ }
+ }
+ return moduleConfigs, nil
+}
+
+func (m *moduleConfigReader) getSourceModuleConfig(
+ ctx context.Context,
+ sourceRef buffetch.SourceRef,
+ readBucket storage.ReadBucket,
+ relativeRootPath string,
+ subDirPath string,
+ configOverride string,
+ workspaceBuilder bufwork.WorkspaceBuilder,
+ workspaceConfig *bufwork.Config,
+ workspace bufmodule.Workspace,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+) (ModuleConfig, error) {
+ moduleConfig, err := m.getModuleConfig(
+ ctx,
+ sourceRef,
+ readBucket,
+ relativeRootPath,
+ subDirPath,
+ configOverride,
+ workspaceBuilder,
+ workspaceConfig,
+ workspace,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, err
+ }
+ if missingReferences := detectMissingDependencies(
+ moduleConfig.Config().Build.DependencyModuleReferences,
+ moduleConfig.Module().DependencyModulePins(),
+ ); len(missingReferences) > 0 {
+ var builder strings.Builder
+ _, _ = builder.WriteString(`Specified deps are not covered in your buf.lock, run "buf mod update":`)
+ for _, moduleReference := range missingReferences {
+ _, _ = builder.WriteString("\n\t- " + moduleReference.IdentityString())
+ }
+ m.logger.Warn(builder.String())
+ }
+ return moduleConfig, nil
+}
+
+func (m *moduleConfigReader) getModuleConfig(
+ ctx context.Context,
+ sourceRef buffetch.SourceRef,
+ readBucket storage.ReadBucket,
+ relativeRootPath string,
+ subDirPath string,
+ configOverride string,
+ workspaceBuilder bufwork.WorkspaceBuilder,
+ workspaceConfig *bufwork.Config,
+ workspace bufmodule.Workspace,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+) (ModuleConfig, error) {
+ if module, moduleConfig, ok := workspaceBuilder.GetModuleConfig(subDirPath); ok {
+ // The module was already built while we were constructing the workspace.
+ // However, we still need to perform some additional validation based on
+ // the sourceRef.
+ if len(externalDirOrFilePaths) > 0 {
+ if workspaceDirectoryEqualsOrContainsSubDirPath(workspaceConfig, subDirPath) {
+ // We have to do this ahead of time as we are not using PathForExternalPath
+ // in this if branch. This is really bad.
+ for _, externalDirOrFilePath := range externalDirOrFilePaths {
+ if _, err := sourceRef.PathForExternalPath(externalDirOrFilePath); err != nil {
+ return nil, err
+ }
+ }
+ }
+ }
+ return newModuleConfig(module, moduleConfig, workspace), nil
+ }
+ mappedReadBucket := readBucket
+ if subDirPath != "." {
+ mappedReadBucket = storage.MapReadBucket(readBucket, storage.MapOnPrefix(subDirPath))
+ }
+ moduleConfig, err := bufconfig.ReadConfigOS(
+ ctx,
+ mappedReadBucket,
+ bufconfig.ReadConfigOSWithOverride(configOverride),
+ )
+ if err != nil {
+ return nil, err
+ }
+ var buildOptions []bufmodulebuild.BuildOption
+ if len(externalDirOrFilePaths) > 0 {
+ if workspaceDirectoryEqualsOrContainsSubDirPath(workspaceConfig, subDirPath) {
+ // We have to do this ahead of time as we are not using PathForExternalPath
+ // in this if branch. This is really bad.
+ for _, externalDirOrFilePath := range externalDirOrFilePaths {
+ if _, err := sourceRef.PathForExternalPath(externalDirOrFilePath); err != nil {
+ return nil, err
+ }
+ }
+ // The subDirPath is contained within one of the workspace directories, so
+ // we first need to reformat the externalDirOrFilePaths so that they accommodate
+ // for the relativeRootPath (the path to the directory containing the buf.work.yaml).
+ //
+ // For example,
+ //
+ // $ buf build ../../proto --path ../../proto/buf
+ //
+ // // buf.work.yaml
+ // version: v1
+ // directories:
+ // - proto
+ // - enterprise/proto
+ //
+ // Note that we CANNOT simply use the sourceRef because we would not be able to
+ // determine which workspace directory the paths apply to afterwards. To be clear,
+ // if we determined the bucketRelPath from the sourceRef, the bucketRelPath would be equal
+ // to ./buf/... which is ambiguous to the workspace directories ('proto' and 'enterprise/proto'
+ // in this case).
+ externalPathToSubDirRelPaths, err := bufwork.ExternalPathsToSubDirRelPaths(
+ relativeRootPath,
+ subDirPath,
+ externalDirOrFilePaths,
+ )
+ if err != nil {
+ return nil, err
+ }
+ externalExcludeToSubDirRelExcludePaths, err := bufwork.ExternalPathsToSubDirRelPaths(
+ relativeRootPath,
+ subDirPath,
+ externalExcludeDirOrFilePaths,
+ )
+ if err != nil {
+ return nil, err
+ }
+ subDirRelPaths := make([]string, 0, len(externalPathToSubDirRelPaths))
+ for _, subDirRelPath := range externalPathToSubDirRelPaths {
+ subDirRelPaths = append(subDirRelPaths, subDirRelPath)
+ }
+ subDirRelExcludePaths := make([]string, 0, len(externalExcludeToSubDirRelExcludePaths))
+ for _, subDirRelExcludePath := range externalExcludeToSubDirRelExcludePaths {
+ subDirRelExcludePaths = append(subDirRelExcludePaths, subDirRelExcludePath)
+ }
+ buildOptions, err = bufwork.BuildOptionsForWorkspaceDirectory(
+ ctx,
+ workspaceConfig,
+ moduleConfig,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ subDirRelPaths,
+ subDirRelExcludePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ // The subDirPath isn't a workspace directory, so we can determine the bucketRelPaths
+ // from the sourceRef on its own.
+ buildOptions = []bufmodulebuild.BuildOption{
+ // We can't determine the module's commit from the local file system.
+ // This also may be nil.
+ //
+ // This is particularly useful for the GoPackage modifier used in
+ // managed mode, which supports module-specific overrides.
+ bufmodulebuild.WithModuleIdentity(moduleConfig.ModuleIdentity),
+ }
+ bucketRelPaths := make([]string, len(externalDirOrFilePaths))
+ for i, externalDirOrFilePath := range externalDirOrFilePaths {
+ bucketRelPath, err := sourceRef.PathForExternalPath(externalDirOrFilePath)
+ if err != nil {
+ return nil, err
+ }
+ bucketRelPaths[i] = bucketRelPath
+ }
+ if externalDirOrFilePathsAllowNotExist {
+ buildOptions = append(buildOptions, bufmodulebuild.WithPathsAllowNotExist(bucketRelPaths))
+ } else {
+ buildOptions = append(buildOptions, bufmodulebuild.WithPaths(bucketRelPaths))
+ }
+ }
+ }
+ if len(externalExcludeDirOrFilePaths) > 0 {
+ bucketRelPaths := make([]string, len(externalExcludeDirOrFilePaths))
+ for i, excludeDirOrFilePath := range externalExcludeDirOrFilePaths {
+ bucketRelPath, err := sourceRef.PathForExternalPath(excludeDirOrFilePath)
+ if err != nil {
+ return nil, err
+ }
+ bucketRelPaths[i] = bucketRelPath
+ }
+ buildOptions = append(buildOptions, bufmodulebuild.WithExcludePaths(bucketRelPaths))
+ }
+ module, err := m.moduleBucketBuilder.BuildForBucket(
+ ctx,
+ mappedReadBucket,
+ moduleConfig.Build,
+ buildOptions...,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newModuleConfig(module, moduleConfig, workspace), nil
+}
+
+func workspaceDirectoryEqualsOrContainsSubDirPath(workspaceConfig *bufwork.Config, subDirPath string) bool {
+ if workspaceConfig == nil {
+ return false
+ }
+ for _, directory := range workspaceConfig.Directories {
+ if normalpath.EqualsOrContainsPath(directory, subDirPath, normalpath.Relative) {
+ return true
+ }
+ }
+ return false
+}
+
+func detectMissingDependencies(references []bufmoduleref.ModuleReference, pins []bufmoduleref.ModulePin) []bufmoduleref.ModuleReference {
+ pinSet := make(map[string]struct{})
+ for _, pin := range pins {
+ pinSet[pin.IdentityString()] = struct{}{}
+ }
+
+ var missingReferences []bufmoduleref.ModuleReference
+ for _, reference := range references {
+ if _, ok := pinSet[reference.IdentityString()]; !ok {
+ missingReferences = append(missingReferences, reference)
+ }
+ }
+ return missingReferences
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/proto_encoding_reader.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/proto_encoding_reader.go
new file mode 100644
index 000000000..644964b2b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/proto_encoding_reader.go
@@ -0,0 +1,102 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwire
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "os"
+
+ "github.com/bufbuild/buf/private/buf/bufconvert"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufreflect"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/protoencoding"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+)
+
+type protoEncodingReader struct {
+ logger *zap.Logger
+}
+
+var _ ProtoEncodingReader = &protoEncodingReader{}
+
+func newProtoEncodingReader(
+ logger *zap.Logger,
+) *protoEncodingReader {
+ return &protoEncodingReader{
+ logger: logger,
+ }
+}
+
+func (p *protoEncodingReader) GetMessage(
+ ctx context.Context,
+ container app.EnvStdinContainer,
+ image bufimage.Image,
+ typeName string,
+ messageRef bufconvert.MessageEncodingRef,
+) (_ proto.Message, retErr error) {
+ ctx, span := trace.StartSpan(ctx, "get_message")
+ defer span.End()
+ // Currently, this support bin and JSON format.
+ resolver, err := protoencoding.NewResolver(
+ bufimage.ImageToFileDescriptors(
+ image,
+ )...,
+ )
+ if err != nil {
+ return nil, err
+ }
+ var unmarshaler protoencoding.Unmarshaler
+ switch messageRef.MessageEncoding() {
+ case bufconvert.MessageEncodingBin:
+ unmarshaler = protoencoding.NewWireUnmarshaler(resolver)
+ case bufconvert.MessageEncodingJSON:
+ unmarshaler = protoencoding.NewJSONUnmarshaler(resolver)
+ default:
+ return nil, fmt.Errorf("unknown message encoding type")
+ }
+ readCloser := io.NopCloser(container.Stdin())
+ if messageRef.Path() != "-" {
+ var err error
+ readCloser, err = os.Open(messageRef.Path())
+ if err != nil {
+ return nil, err
+ }
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, readCloser.Close())
+ }()
+ data, err := io.ReadAll(readCloser)
+ if err != nil {
+ return nil, err
+ }
+ if len(data) == 0 {
+ return nil, errors.New("size of input message must not be zero")
+ }
+ message, err := bufreflect.NewMessage(ctx, image, typeName)
+ if err != nil {
+ return nil, err
+ }
+ if err := unmarshaler.Unmarshal(data, message); err != nil {
+ return nil, fmt.Errorf("unable to unmarshal the message: %v", err)
+ }
+ return message, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/proto_encoding_writer.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/proto_encoding_writer.go
new file mode 100644
index 000000000..ddaa9f0c5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/proto_encoding_writer.go
@@ -0,0 +1,87 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwire
+
+import (
+ "context"
+ "fmt"
+ "os"
+
+ "github.com/bufbuild/buf/private/buf/bufconvert"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/ioextended"
+ "github.com/bufbuild/buf/private/pkg/protoencoding"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+)
+
+type protoEncodingWriter struct {
+ logger *zap.Logger
+}
+
+var _ ProtoEncodingWriter = &protoEncodingWriter{}
+
+func newProtoEncodingWriter(
+ logger *zap.Logger,
+) *protoEncodingWriter {
+ return &protoEncodingWriter{
+ logger: logger,
+ }
+}
+
+func (p *protoEncodingWriter) PutMessage(
+ ctx context.Context,
+ container app.EnvStdoutContainer,
+ image bufimage.Image,
+ message proto.Message,
+ messageRef bufconvert.MessageEncodingRef,
+) (retErr error) {
+ // Currently, this support bin and JSON format.
+ resolver, err := protoencoding.NewResolver(
+ bufimage.ImageToFileDescriptors(
+ image,
+ )...,
+ )
+ if err != nil {
+ return err
+ }
+ var marshaler protoencoding.Marshaler
+ switch messageRef.MessageEncoding() {
+ case bufconvert.MessageEncodingBin:
+ marshaler = protoencoding.NewWireMarshaler()
+ case bufconvert.MessageEncodingJSON:
+ marshaler = protoencoding.NewJSONMarshalerIndent(resolver)
+ default:
+ return fmt.Errorf("unknown message encoding type")
+ }
+ data, err := marshaler.Marshal(message)
+ if err != nil {
+ return err
+ }
+ writeCloser := ioextended.NopWriteCloser(container.Stdout())
+ if messageRef.Path() != "-" {
+ writeCloser, err = os.Create(messageRef.Path())
+ if err != nil {
+ return err
+ }
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, writeCloser.Close())
+ }()
+ _, err = writeCloser.Write(data)
+ return err
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwire/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/bufwire/usage.gen.go
new file mode 100644
index 000000000..80c92e0cb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwire/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufwire
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwork/bufwork.go b/vendor/github.com/bufbuild/buf/private/buf/bufwork/bufwork.go
new file mode 100644
index 000000000..28024cd1f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwork/bufwork.go
@@ -0,0 +1,365 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwork defines the primitives used to enable workspaces.
+//
+// If a buf.work.yaml file exists in a parent directory (up to the root of
+// the filesystem), the directory containing the file is used as the root of
+// one or more modules. With this, modules can import from one another, and a
+// variety of commands work on multiple modules rather than one. For example, if
+// `buf lint` is run for an input that contains a buf.work.yaml, each of
+// the modules contained within the workspace will be linted. Other commands, such
+// as `buf build`, will merge workspace modules into one (i.e. a "supermodule")
+// so that all of the files contained are consolidated into a single image.
+//
+// In the following example, the workspace consists of two modules: the module
+// defined in the petapis directory can import definitions from the paymentapis
+// module without vendoring the definitions under a common root. To be clear,
+// `import "acme/payment/v2/payment.proto";` from the acme/pet/v1/pet.proto file
+// will suffice as long as the buf.work.yaml file exists.
+//
+// // buf.work.yaml
+// version: v1
+// directories:
+// - paymentapis
+// - petapis
+//
+// $ tree
+// .
+// ├── buf.work.yaml
+// ├── paymentapis
+// │ ├── acme
+// │ │ └── payment
+// │ │ └── v2
+// │ │ └── payment.proto
+// │ └── buf.yaml
+// └── petapis
+// ├── acme
+// │ └── pet
+// │ └── v1
+// │ └── pet.proto
+// └── buf.yaml
+//
+// Note that inputs MUST NOT overlap with any of the directories defined in the buf.work.yaml
+// file. For example, it's not possible to build input "paymentapis/acme" since the image
+// would otherwise include the content defined in paymentapis/acme/payment/v2/payment.proto as
+// acme/payment/v2/payment.proto and payment/v2/payment.proto.
+//
+// EVERYTHING IN THIS PACKAGE SHOULD ONLY BE CALLED BY THE CLI AND CANNOT BE USED IN SERVICES.
+package bufwork
+
+import (
+ "context"
+ "fmt"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+const (
+ // ExternalConfigV1FilePath is the default configuration file path for v1.
+ ExternalConfigV1FilePath = "buf.work.yaml"
+ // V1Version is the version string used to indicate the v1 version of the buf.work.yaml file.
+ V1Version = "v1"
+
+ // BackupExternalConfigV1FilePath is another acceptable configuration file path for v1.
+ //
+ // Originally we thought we were going to use buf.work, and had this around for
+ // a while, but then moved to buf.work.yaml. We still need to support buf.work as
+ // we released with it, however.
+ BackupExternalConfigV1FilePath = "buf.work"
+)
+
+var (
+ // AllConfigFilePaths are all acceptable config file paths without overrides.
+ //
+ // These are in the order we should check.
+ AllConfigFilePaths = []string{
+ ExternalConfigV1FilePath,
+ BackupExternalConfigV1FilePath,
+ }
+)
+
+// WorkspaceBuilder builds workspaces. A single WorkspaceBuilder should NOT be persisted
+// acorss calls because the WorkspaceBuilder caches the modules used in each workspace.
+type WorkspaceBuilder interface {
+ // BuildWorkspace builds a bufmodule.Workspace for the given targetSubDirPath.
+ BuildWorkspace(
+ ctx context.Context,
+ workspaceConfig *Config,
+ readBucket storage.ReadBucket,
+ relativeRootPath string,
+ targetSubDirPath string,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+ ) (bufmodule.Workspace, error)
+
+ // GetModuleConfig returns the bufmodule.Module and *bufconfig.Config, associated with the given
+ // targetSubDirPath, if it exists.
+ GetModuleConfig(targetSubDirPath string) (bufmodule.Module, *bufconfig.Config, bool)
+}
+
+// NewWorkspaceBuilder returns a new WorkspaceBuilder.
+func NewWorkspaceBuilder(
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder,
+) WorkspaceBuilder {
+ return newWorkspaceBuilder(moduleBucketBuilder)
+}
+
+// BuildOptionsForWorkspaceDirectory returns the bufmodulebuild.BuildOptions required for
+// the given subDirPath based on the workspace configuration.
+//
+// The subDirRelPaths are the relative paths of the externalDirOrFilePaths that map to the
+// provided subDirPath.
+// The subDirRelExcludePaths are the relative paths of the externalExcludeDirOrFilePaths that map to the
+// provided subDirPath.
+func BuildOptionsForWorkspaceDirectory(
+ ctx context.Context,
+ workspaceConfig *Config,
+ moduleConfig *bufconfig.Config,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ subDirRelPaths []string,
+ subDirRelExcludePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+) ([]bufmodulebuild.BuildOption, error) {
+ buildOptions := []bufmodulebuild.BuildOption{
+ // We can't determine the module's commit from the local file system.
+ // This also may be nil.
+ //
+ // This is particularly useful for the GoPackage modifier used in
+ // managed mode, which supports module-specific overrides.
+ bufmodulebuild.WithModuleIdentity(moduleConfig.ModuleIdentity),
+ }
+ if len(externalDirOrFilePaths) == 0 && len(externalExcludeDirOrFilePaths) == 0 {
+ return buildOptions, nil
+ }
+ if len(externalDirOrFilePaths) > 0 {
+ // Note that subDirRelPaths can be empty. If so, this represents
+ // the case where externalDirOrFilePaths were provided, but none
+ // matched.
+ if externalDirOrFilePathsAllowNotExist {
+ buildOptions = append(buildOptions, bufmodulebuild.WithPathsAllowNotExist(subDirRelPaths))
+ } else {
+ buildOptions = append(buildOptions, bufmodulebuild.WithPaths(subDirRelPaths))
+ }
+ }
+ if len(externalExcludeDirOrFilePaths) > 0 {
+ // Same as above, subDirRelExcludepaths can be empty. If so, this represents the case
+ // where excludes were provided by were not matched.
+ if externalDirOrFilePathsAllowNotExist {
+ buildOptions = append(buildOptions, bufmodulebuild.WithExcludePathsAllowNotExist(subDirRelExcludePaths))
+ } else {
+ buildOptions = append(buildOptions, bufmodulebuild.WithExcludePaths(subDirRelExcludePaths))
+ }
+ }
+ return buildOptions, nil
+}
+
+// ExternalPathsToSubDirRelPaths returns a map of the external paths provided to their relative
+// path to the provided subDirPath.
+//
+// Note not every external path provided may have a relative path mapped to the subDirPath.
+func ExternalPathsToSubDirRelPaths(
+ relativeRootPath string,
+ subDirPath string,
+ externalDirOrFilePaths []string,
+) (map[string]string, error) {
+ // We first need to reformat the externalDirOrFilePaths so that they accommodate
+ // for the relativeRootPath (the path to the directory containing the buf.work.yaml).
+ //
+ // For example,
+ //
+ // $ buf build ../../proto --path ../../proto/buf
+ //
+ // // buf.work.yaml
+ // version: v1
+ // directories:
+ // - proto
+ // - enterprise/proto
+ //
+ // Note that we CANNOT simply use the sourceRef because we would not be able to
+ // determine which workspace directory the paths apply to afterwards. To be clear,
+ // if we determined the bucketRelPath from the sourceRef, the bucketRelPath would be equal
+ // to ./buf/... which is ambiguous to the workspace directories ('proto' and 'enterprise/proto'
+ // in this case).
+ //
+ // Also note that we need to use absolute paths because it's possible that the externalDirOrFilePath
+ // is not relative to the relativeRootPath. For example, supppose that the buf.work.yaml is found at ../../..,
+ // whereas the current working directory is nested within one of the workspace directories like so:
+ //
+ // $ buf build ../../.. --path ../proto/buf
+ //
+ // Although absolute paths don't apply to ArchiveRefs and GitRefs, this logic continues to work in
+ // these cases. Both ArchiveRefs and GitRefs might have a relativeRootPath nested within the bucket's
+ // root, e.g. an archive that defines a buf.work.yaml in a nested 'proto/buf.work.yaml' directory like so:
+ //
+ // $ buf build weather.zip#subdir=proto --path proto/acme/weather/v1/weather.proto
+ //
+ // $ zipinfo weather.zip
+ // Archive: weather.zip
+ // ...
+ // ... proto/
+ //
+ // In this case, the relativeRootPath is equal to 'proto', so we still need to determine the relative path
+ // between 'proto' and 'proto/acme/weather/v1/weather.proto' and assign it to the correct workspace directory.
+ // So even though it's impossible for ArchiveRefs and GitRefs to jump context (i.e. '../..'), the transformation
+ // from [relative -> absolute -> relative] will always yield valid results. In the example above, we would have
+ // something along the lines:
+ //
+ // * '/Users/me/path/to/wd' is the current working directory
+ //
+ // absRelativeRootPath == '/Users/me/path/to/wd/proto'
+ // absExternalDirOrFilePath == '/Users/me/path/to/wd/proto/acme/weather/v1/weather.proto'
+ //
+ // ==> relativeRootRelPath == 'acme/weather/v1/weather.proto'
+ //
+ // The paths, such as '/Users/me/path/to/wd/proto/acme/weather/v1/weather.proto', might not exist on the local
+ // file system at all, but the [relative -> absolute -> relative] transformation works as expected.
+ //
+ // Alternatively, we could special-case this logic so that we only work with relative paths when we have an ArchiveRef
+ // or GitRef, but this would violate the abstraction boundary for buffetch.
+ externalToAbsExternalDirOrFilePaths := make(map[string]string)
+ // We know that if the file is actually buf.work for legacy reasons, this will be wrong,
+ // but we accept that as this shouldn't happen often anymore and this is just
+ // used for error messages.
+ workspaceID := filepath.Join(normalpath.Unnormalize(relativeRootPath), ExternalConfigV1FilePath)
+ for _, externalDirOrFilePath := range externalDirOrFilePaths {
+ absExternalDirOrFilePath, err := normalpath.NormalizeAndAbsolute(externalDirOrFilePath)
+ if err != nil {
+ return nil, fmt.Errorf(
+ `path "%s" could not be resolved`,
+ normalpath.Unnormalize(externalDirOrFilePath),
+ )
+ }
+ externalToAbsExternalDirOrFilePaths[externalDirOrFilePath] = absExternalDirOrFilePath
+ }
+ absRelativeRootPath, err := normalpath.NormalizeAndAbsolute(relativeRootPath)
+ if err != nil {
+ return nil, err
+ }
+ externalToRelativeRootRelPaths := make(map[string]string)
+ for externalDirOrFilePath, absExternalDirOrFilePath := range externalToAbsExternalDirOrFilePaths {
+ if absRelativeRootPath == absExternalDirOrFilePath {
+ return nil, fmt.Errorf(
+ `path "%s" is equal to the workspace defined in "%s"`,
+ normalpath.Unnormalize(externalDirOrFilePath),
+ workspaceID,
+ )
+ }
+ if normalpath.ContainsPath(absRelativeRootPath, absExternalDirOrFilePath, normalpath.Absolute) {
+ relativeRootRelPath, err := normalpath.Rel(absRelativeRootPath, absExternalDirOrFilePath)
+ if err != nil {
+ return nil, fmt.Errorf(
+ `a relative path could not be resolved between "%s" and "%s"`,
+ normalpath.Unnormalize(externalDirOrFilePath),
+ workspaceID,
+ )
+ }
+ externalToRelativeRootRelPaths[externalDirOrFilePath] = relativeRootRelPath
+ }
+ }
+ // Now that the paths are relative to the relativeRootPath, the paths need to be scoped to
+ // the directory they belong to.
+ //
+ // For example, after the paths have been processed above, the arguments can be imagined like so:
+ //
+ // $ buf build proto --path proto/buf
+ //
+ // // buf.work.yaml
+ // version: v1
+ // directories:
+ // - proto
+ // - enterprise/proto
+ //
+ // The 'proto' directory will receive the ./proto/buf/... files as ./buf/... whereas the
+ // 'enterprise/proto' directory will have no matching paths.
+ externalToSubDirRelPaths := make(map[string]string)
+ for externalDirOrFilePath, relativeRootRelPath := range externalToRelativeRootRelPaths {
+ if subDirPath == relativeRootRelPath {
+ return nil, fmt.Errorf(
+ `path "%s" is equal to workspace directory "%s" defined in "%s"`,
+ normalpath.Unnormalize(externalDirOrFilePath),
+ normalpath.Unnormalize(subDirPath),
+ workspaceID,
+ )
+ }
+ if normalpath.ContainsPath(subDirPath, relativeRootRelPath, normalpath.Relative) {
+ subDirRelPath, err := normalpath.Rel(subDirPath, relativeRootRelPath)
+ if err != nil {
+ return nil, fmt.Errorf(
+ `a relative path could not be resolved between "%s" and "%s"`,
+ normalpath.Unnormalize(externalDirOrFilePath),
+ subDirPath,
+ )
+ }
+ externalToSubDirRelPaths[externalDirOrFilePath] = subDirRelPath
+ }
+ }
+ return externalToSubDirRelPaths, nil
+}
+
+// Config is the workspace config.
+type Config struct {
+ // Directories are normalized and validated.
+ Directories []string
+}
+
+// GetConfigForBucket gets the Config for the YAML data at ConfigFilePath.
+//
+// If the data is of length 0, returns the default config.
+func GetConfigForBucket(ctx context.Context, readBucket storage.ReadBucket, relativeRootPath string) (*Config, error) {
+ return getConfigForBucket(ctx, readBucket, relativeRootPath)
+}
+
+// GetConfigForData gets the Config for the given JSON or YAML data.
+//
+// If the data is of length 0, returns the default config.
+func GetConfigForData(ctx context.Context, data []byte) (*Config, error) {
+ return getConfigForData(ctx, data)
+}
+
+// ExistingConfigFilePath checks if a configuration file exists, and if so, returns the path
+// within the ReadBucket of this configuration file.
+//
+// Returns empty string and no error if no configuration file exists.
+func ExistingConfigFilePath(ctx context.Context, readBucket storage.ReadBucket) (string, error) {
+ for _, configFilePath := range AllConfigFilePaths {
+ exists, err := storage.Exists(ctx, readBucket, configFilePath)
+ if err != nil {
+ return "", err
+ }
+ if exists {
+ return configFilePath, nil
+ }
+ }
+ return "", nil
+}
+
+// ExternalConfigV1 represents the on-disk representation
+// of the workspace configuration at version v1.
+type ExternalConfigV1 struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ Directories []string `json:"directories,omitempty" yaml:"directories,omitempty"`
+}
+
+type externalConfigVersion struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwork/config.go b/vendor/github.com/bufbuild/buf/private/buf/bufwork/config.go
new file mode 100644
index 000000000..09b9065d5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwork/config.go
@@ -0,0 +1,87 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwork
+
+import (
+ "fmt"
+ "sort"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+)
+
+func newConfigV1(externalConfig ExternalConfigV1, workspaceID string) (*Config, error) {
+ if len(externalConfig.Directories) == 0 {
+ return nil, fmt.Errorf(
+ `%s has no directories set. Please add "directories: [...]"`,
+ workspaceID,
+ )
+ }
+ directorySet := make(map[string]struct{}, len(externalConfig.Directories))
+ for _, directory := range externalConfig.Directories {
+ normalizedDirectory, err := normalpath.NormalizeAndValidate(directory)
+ if err != nil {
+ return nil, fmt.Errorf(`directory "%s" listed in %s is invalid: %w`, normalpath.Unnormalize(directory), workspaceID, err)
+ }
+ if _, ok := directorySet[normalizedDirectory]; ok {
+ return nil, fmt.Errorf(
+ `directory "%s" is listed more than once in %s`,
+ normalpath.Unnormalize(normalizedDirectory),
+ workspaceID,
+ )
+ }
+ directorySet[normalizedDirectory] = struct{}{}
+ }
+ // It's very important that we sort the directories here so that the
+ // constructed modules and/or images are in a deterministic order.
+ directories := stringutil.MapToSlice(directorySet)
+ sort.Slice(directories, func(i int, j int) bool {
+ return directories[i] < directories[j]
+ })
+ if err := validateConfigurationOverlap(directories, workspaceID); err != nil {
+ return nil, err
+ }
+ return &Config{
+ Directories: directories,
+ }, nil
+}
+
+// validateOverlap returns a non-nil error if any of the directories overlap
+// with each other. The given directories are expected to be sorted.
+func validateConfigurationOverlap(directories []string, workspaceID string) error {
+ for i := 0; i < len(directories); i++ {
+ for j := i + 1; j < len(directories); j++ {
+ left := directories[i]
+ right := directories[j]
+ if normalpath.ContainsPath(left, right, normalpath.Relative) {
+ return fmt.Errorf(
+ `directory "%s" contains directory "%s" in %s`,
+ normalpath.Unnormalize(left),
+ normalpath.Unnormalize(right),
+ workspaceID,
+ )
+ }
+ if normalpath.ContainsPath(right, left, normalpath.Relative) {
+ return fmt.Errorf(
+ `directory "%s" contains directory "%s" in %s`,
+ normalpath.Unnormalize(right),
+ normalpath.Unnormalize(left),
+ workspaceID,
+ )
+ }
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwork/get.go b/vendor/github.com/bufbuild/buf/private/buf/bufwork/get.go
new file mode 100644
index 000000000..139a298df
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwork/get.go
@@ -0,0 +1,132 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwork
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/pkg/encoding"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+)
+
+func getConfigForBucket(ctx context.Context, readBucket storage.ReadBucket, relativeRootPath string) (_ *Config, retErr error) {
+ ctx, span := trace.StartSpan(ctx, "get_workspace_config")
+ defer span.End()
+
+ // This will be in the order of precedence.
+ var foundConfigFilePaths []string
+ // Go through all valid config file paths and see which ones are present.
+ // If none are present, return the default config.
+ // If multiple are present, error.
+ for _, configFilePath := range AllConfigFilePaths {
+ exists, err := storage.Exists(ctx, readBucket, configFilePath)
+ if err != nil {
+ return nil, err
+ }
+ if exists {
+ foundConfigFilePaths = append(foundConfigFilePaths, configFilePath)
+ }
+ }
+ switch len(foundConfigFilePaths) {
+ case 0:
+ // Did not find anything, return the default.
+ return newConfigV1(ExternalConfigV1{}, "default configuration")
+ case 1:
+ workspaceID := filepath.Join(normalpath.Unnormalize(relativeRootPath), foundConfigFilePaths[0])
+ readObjectCloser, err := readBucket.Get(ctx, foundConfigFilePaths[0])
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, readObjectCloser.Close())
+ }()
+ data, err := io.ReadAll(readObjectCloser)
+ if err != nil {
+ return nil, err
+ }
+ return getConfigForDataInternal(
+ ctx,
+ encoding.UnmarshalYAMLNonStrict,
+ encoding.UnmarshalYAMLStrict,
+ workspaceID,
+ data,
+ readObjectCloser.ExternalPath(),
+ )
+ default:
+ return nil, fmt.Errorf("only one workspace file can exist but found multiple workspace files: %s", stringutil.SliceToString(foundConfigFilePaths))
+ }
+}
+
+func getConfigForData(ctx context.Context, data []byte) (*Config, error) {
+ _, span := trace.StartSpan(ctx, "get_workspace_config_for_data")
+ defer span.End()
+ return getConfigForDataInternal(
+ ctx,
+ encoding.UnmarshalJSONOrYAMLNonStrict,
+ encoding.UnmarshalJSONOrYAMLStrict,
+ "configuration data",
+ data,
+ "Configuration data",
+ )
+}
+
+func getConfigForDataInternal(
+ ctx context.Context,
+ unmarshalNonStrict func([]byte, interface{}) error,
+ unmarshalStrict func([]byte, interface{}) error,
+ workspaceID string,
+ data []byte,
+ id string,
+) (*Config, error) {
+ var externalConfigVersion externalConfigVersion
+ if err := unmarshalNonStrict(data, &externalConfigVersion); err != nil {
+ return nil, err
+ }
+ if err := validateExternalConfigVersion(externalConfigVersion, id); err != nil {
+ return nil, err
+ }
+ var externalConfigV1 ExternalConfigV1
+ if err := unmarshalStrict(data, &externalConfigV1); err != nil {
+ return nil, err
+ }
+ return newConfigV1(externalConfigV1, workspaceID)
+}
+
+func validateExternalConfigVersion(externalConfigVersion externalConfigVersion, id string) error {
+ switch externalConfigVersion.Version {
+ case "":
+ return fmt.Errorf(
+ `%s has no version set. Please add "version: %s"`,
+ id,
+ V1Version,
+ )
+ case V1Version:
+ return nil
+ default:
+ return fmt.Errorf(
+ `%s has an invalid "version: %s" set. Please add "version: %s"`,
+ id,
+ externalConfigVersion.Version,
+ V1Version,
+ )
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwork/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/bufwork/usage.gen.go
new file mode 100644
index 000000000..174d3668c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwork/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufwork
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/bufwork/workspace_builder.go b/vendor/github.com/bufbuild/buf/private/buf/bufwork/workspace_builder.go
new file mode 100644
index 000000000..9ac3beb53
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/bufwork/workspace_builder.go
@@ -0,0 +1,268 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufwork
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+type workspaceBuilder struct {
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder
+ moduleCache map[string]*cachedModule
+}
+
+func newWorkspaceBuilder(
+ moduleBucketBuilder bufmodulebuild.ModuleBucketBuilder,
+) *workspaceBuilder {
+ return &workspaceBuilder{
+ moduleBucketBuilder: moduleBucketBuilder,
+ moduleCache: make(map[string]*cachedModule),
+ }
+}
+
+// BuildWorkspace builds a bufmodule.Workspace for the given targetSubDirPath.
+func (w *workspaceBuilder) BuildWorkspace(
+ ctx context.Context,
+ workspaceConfig *Config,
+ readBucket storage.ReadBucket,
+ relativeRootPath string,
+ targetSubDirPath string,
+ configOverride string,
+ externalDirOrFilePaths []string,
+ externalExcludeDirOrFilePaths []string,
+ externalDirOrFilePathsAllowNotExist bool,
+) (bufmodule.Workspace, error) {
+ if workspaceConfig == nil {
+ return nil, errors.New("received a nil workspace config")
+ }
+ // We know that if the file is actually buf.work for legacy reasons, this will be wrong,
+ // but we accept that as this shouldn't happen often anymore and this is just
+ // used for error messages.
+ workspaceID := filepath.Join(normalpath.Unnormalize(relativeRootPath), ExternalConfigV1FilePath)
+ namedModules := make(map[string]bufmodule.Module, len(workspaceConfig.Directories))
+ allModules := make([]bufmodule.Module, 0, len(workspaceConfig.Directories))
+ for _, directory := range workspaceConfig.Directories {
+ if cachedModule, ok := w.moduleCache[directory]; ok {
+ if directory == targetSubDirPath {
+ continue
+ }
+ // We've already built this module, so we can use the cached-equivalent.
+ if moduleIdentity := cachedModule.moduleConfig.ModuleIdentity; moduleIdentity != nil {
+ if _, ok := namedModules[moduleIdentity.IdentityString()]; ok {
+ return nil, fmt.Errorf(
+ "module %q is provided by multiple workspace directories listed in %s",
+ moduleIdentity.IdentityString(),
+ workspaceID,
+ )
+ }
+ namedModules[moduleIdentity.IdentityString()] = cachedModule.module
+ }
+ allModules = append(allModules, cachedModule.module)
+ continue
+ }
+ readBucketForDirectory := storage.MapReadBucket(readBucket, storage.MapOnPrefix(directory))
+ if err := validateWorkspaceDirectoryNonEmpty(ctx, readBucketForDirectory, directory, workspaceID); err != nil {
+ return nil, err
+ }
+ if err := validateInputOverlap(directory, targetSubDirPath, workspaceID); err != nil {
+ return nil, err
+ }
+ // Ignore the configOverride for anything that isn't the target path
+ localConfigOverride := configOverride
+ if directory != targetSubDirPath {
+ localConfigOverride = ""
+ }
+ moduleConfig, err := bufconfig.ReadConfigOS(
+ ctx,
+ readBucketForDirectory,
+ bufconfig.ReadConfigOSWithOverride(localConfigOverride),
+ )
+ if err != nil {
+ return nil, fmt.Errorf(
+ `failed to get module config for directory "%s" listed in %s: %w`,
+ normalpath.Unnormalize(directory),
+ workspaceID,
+ err,
+ )
+ }
+ externalToSubDirRelPaths, err := ExternalPathsToSubDirRelPaths(
+ relativeRootPath,
+ directory,
+ externalDirOrFilePaths,
+ )
+ if err != nil {
+ return nil, err
+ }
+ excludeToSubDirRelExcludePaths, err := ExternalPathsToSubDirRelPaths(
+ relativeRootPath,
+ directory,
+ externalExcludeDirOrFilePaths,
+ )
+ if err != nil {
+ return nil, err
+ }
+ subDirRelPaths := make([]string, 0, len(externalToSubDirRelPaths))
+ for _, subDirRelPath := range externalToSubDirRelPaths {
+ subDirRelPaths = append(subDirRelPaths, subDirRelPath)
+ }
+ subDirRelExcludePaths := make([]string, 0, len(excludeToSubDirRelExcludePaths))
+ for _, subDirRelExcludePath := range excludeToSubDirRelExcludePaths {
+ subDirRelExcludePaths = append(subDirRelExcludePaths, subDirRelExcludePath)
+ }
+ buildOptions, err := BuildOptionsForWorkspaceDirectory(
+ ctx,
+ workspaceConfig,
+ moduleConfig,
+ externalDirOrFilePaths,
+ externalExcludeDirOrFilePaths,
+ subDirRelPaths,
+ subDirRelExcludePaths,
+ externalDirOrFilePathsAllowNotExist,
+ )
+ if err != nil {
+ return nil, err
+ }
+ module, err := w.moduleBucketBuilder.BuildForBucket(
+ ctx,
+ readBucketForDirectory,
+ moduleConfig.Build,
+ buildOptions...,
+ )
+ if err != nil {
+ return nil, fmt.Errorf(
+ `failed to initialize module for directory "%s" listed in %s: %w`,
+ normalpath.Unnormalize(directory),
+ workspaceID,
+ err,
+ )
+ }
+ w.moduleCache[directory] = newCachedModule(
+ module,
+ moduleConfig,
+ )
+ if directory == targetSubDirPath {
+ // We don't want to include the module found at the targetSubDirPath
+ // since it would otherwise be included twice. Note that we include
+ // this check here so that the module is still built and cached upfront.
+ continue
+ }
+ if moduleIdentity := moduleConfig.ModuleIdentity; moduleIdentity != nil {
+ if _, ok := namedModules[moduleIdentity.IdentityString()]; ok {
+ return nil, fmt.Errorf(
+ "module %q is provided by multiple workspace directories listed in %s",
+ moduleIdentity.IdentityString(),
+ workspaceID,
+ )
+ }
+ namedModules[moduleIdentity.IdentityString()] = module
+ }
+ allModules = append(allModules, module)
+ }
+ return bufmodule.NewWorkspace(
+ namedModules,
+ allModules,
+ ), nil
+}
+
+// GetModuleConfig returns the bufmodule.Module and *bufconfig.Config, associated with the given
+// targetSubDirPath, if it exists.
+func (w *workspaceBuilder) GetModuleConfig(targetSubDirPath string) (bufmodule.Module, *bufconfig.Config, bool) {
+ cachedModule, ok := w.moduleCache[targetSubDirPath]
+ if !ok {
+ return nil, nil, false
+ }
+ return cachedModule.module, cachedModule.moduleConfig, true
+}
+
+func validateWorkspaceDirectoryNonEmpty(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ workspaceDirectory string,
+ workspaceID string,
+) error {
+ isEmpty, err := storage.IsEmpty(
+ ctx,
+ storage.MapReadBucket(readBucket, storage.MatchPathExt(".proto")),
+ "",
+ )
+ if err != nil {
+ return err
+ }
+ if isEmpty {
+ return fmt.Errorf(
+ `directory "%s" listed in %s contains no .proto files`,
+ normalpath.Unnormalize(workspaceDirectory),
+ workspaceID,
+ )
+ }
+ return nil
+}
+
+// validateInputOverlap returns a non-nil error if the given directories
+// overlap in either direction. The last argument is only used for
+// error reporting.
+//
+// validateInputOverlap("foo", "bar", "buf.work.yaml") -> OK
+// validateInputOverlap("foo/bar", "foo", "buf.work.yaml") -> NOT OK
+// validateInputOverlap("foo", "foo/bar", "buf.work.yaml") -> NOT OK
+func validateInputOverlap(
+ workspaceDirectory string,
+ targetSubDirPath string,
+ workspaceID string,
+) error {
+ if normalpath.ContainsPath(workspaceDirectory, targetSubDirPath, normalpath.Relative) {
+ return fmt.Errorf(
+ `failed to build input "%s" because it is contained by directory "%s" listed in %s`,
+ normalpath.Unnormalize(targetSubDirPath),
+ normalpath.Unnormalize(workspaceDirectory),
+ workspaceID,
+ )
+ }
+
+ if normalpath.ContainsPath(targetSubDirPath, workspaceDirectory, normalpath.Relative) {
+ return fmt.Errorf(
+ `failed to build input "%s" because it contains directory "%s" listed in %s`,
+ normalpath.Unnormalize(targetSubDirPath),
+ normalpath.Unnormalize(workspaceDirectory),
+ workspaceID,
+ )
+ }
+ return nil
+}
+
+// cachedModule encapsulates a module and its configuration.
+type cachedModule struct {
+ module bufmodule.Module
+ moduleConfig *bufconfig.Config
+}
+
+func newCachedModule(
+ module bufmodule.Module,
+ moduleConfig *bufconfig.Config,
+) *cachedModule {
+ return &cachedModule{
+ module: module,
+ moduleConfig: moduleConfig,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/buf.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/buf.go
new file mode 100644
index 000000000..7ecac9c49
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/buf.go
@@ -0,0 +1,280 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buf
+
+import (
+ "context"
+ "time"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/plugin/pluginpush"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokencreate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokendelete"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenget"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenlist"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/migratev1beta1"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitget"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitlist"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftdelete"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftlist"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationcreate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationdelete"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationget"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugincreate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindelete"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindeprecate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginlist"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginundeprecate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginversion/pluginversionlist"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorycreate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydelete"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydeprecate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryget"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorylist"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryundeprecate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryupdate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/tagcreate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/taglist"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatecreate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedelete"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedeprecate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatelist"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateundeprecate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversioncreate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversionlist"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookcreate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookdelete"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhooklist"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/studioagent"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/breaking"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/build"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/convert"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/export"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/format"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/generate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/lint"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/lsfiles"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modclearcache"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modinit"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlsbreakingrules"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlslintrules"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modopen"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modprune"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modupdate"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/push"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogin"
+ "github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogout"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+)
+
+// Main is the entrypoint to the buf CLI.
+func Main(name string) {
+ appcmd.Main(context.Background(), NewRootCommand(name))
+}
+
+// NewRootCommand returns a new root command.
+//
+// This is public for use in testing.
+func NewRootCommand(name string) *appcmd.Command {
+ builder := appflag.NewBuilder(
+ name,
+ appflag.BuilderWithTimeout(120*time.Second),
+ appflag.BuilderWithTracing(),
+ )
+ noTimeoutBuilder := appflag.NewBuilder(
+ name,
+ appflag.BuilderWithTracing(),
+ )
+ globalFlags := bufcli.NewGlobalFlags()
+ return &appcmd.Command{
+ Use: name,
+ Short: "The Buf CLI",
+ Long: "A tool for working with Protocol Buffers and managing resources on the Buf Schema Registry (BSR).",
+ Version: bufcli.Version,
+ BindPersistentFlags: appcmd.BindMultiple(builder.BindRoot, globalFlags.BindRoot),
+ SubCommands: []*appcmd.Command{
+ build.NewCommand("build", builder),
+ export.NewCommand("export", builder),
+ format.NewCommand("format", builder),
+ lint.NewCommand("lint", builder),
+ breaking.NewCommand("breaking", builder),
+ generate.NewCommand("generate", builder),
+ lsfiles.NewCommand("ls-files", builder),
+ push.NewCommand("push", builder),
+ convert.NewCommand("convert", builder),
+ {
+ Use: "mod",
+ Short: "Manage Buf modules.",
+ SubCommands: []*appcmd.Command{
+ modinit.NewCommand("init", builder),
+ modprune.NewCommand("prune", builder),
+ modupdate.NewCommand("update", builder),
+ modopen.NewCommand("open", builder),
+ modclearcache.NewCommand("clear-cache", builder, "cc"),
+ modlslintrules.NewCommand("ls-lint-rules", builder),
+ modlsbreakingrules.NewCommand("ls-breaking-rules", builder),
+ },
+ },
+ {
+ Use: "registry",
+ Short: "Manage assets on the Buf Schema Registry.",
+ SubCommands: []*appcmd.Command{
+ registrylogin.NewCommand("login", builder),
+ registrylogout.NewCommand("logout", builder),
+ },
+ },
+ {
+ Use: "beta",
+ Short: "Beta commands. Unstable and likely to change.",
+ SubCommands: []*appcmd.Command{
+ convert.NewCommand("convert", builder),
+ migratev1beta1.NewCommand("migrate-v1beta1", builder),
+ studioagent.NewCommand("studio-agent", noTimeoutBuilder),
+ {
+ Use: "registry",
+ Short: "Manage assets on the Buf Schema Registry.",
+ SubCommands: []*appcmd.Command{
+ {
+ Use: "organization",
+ Short: "Manage organizations.",
+ SubCommands: []*appcmd.Command{
+ organizationcreate.NewCommand("create", builder),
+ organizationget.NewCommand("get", builder),
+ organizationdelete.NewCommand("delete", builder),
+ },
+ },
+ {
+ Use: "repository",
+ Short: "Manage repositories.",
+ SubCommands: []*appcmd.Command{
+ repositorycreate.NewCommand("create", builder),
+ repositoryget.NewCommand("get", builder),
+ repositorylist.NewCommand("list", builder),
+ repositorydelete.NewCommand("delete", builder),
+ repositorydeprecate.NewCommand("deprecate", builder),
+ repositoryundeprecate.NewCommand("undeprecate", builder),
+ repositoryupdate.NewCommand("update", builder),
+ },
+ },
+ {
+ Use: "tag",
+ Short: "Manage a repository's tags.",
+ SubCommands: []*appcmd.Command{
+ tagcreate.NewCommand("create", builder),
+ taglist.NewCommand("list", builder),
+ },
+ },
+ {
+ Use: "commit",
+ Short: "Manage a repository's commits.",
+ SubCommands: []*appcmd.Command{
+ commitget.NewCommand("get", builder),
+ commitlist.NewCommand("list", builder),
+ },
+ },
+ {
+ Use: "draft",
+ Short: "Manage a repository's drafts.",
+ SubCommands: []*appcmd.Command{
+ draftdelete.NewCommand("delete", builder),
+ draftlist.NewCommand("list", builder),
+ },
+ },
+ {
+ Use: "plugin",
+ Short: "Manage Protobuf plugins.",
+ SubCommands: []*appcmd.Command{
+ plugincreate.NewCommand("create", builder),
+ pluginlist.NewCommand("list", builder),
+ plugindelete.NewCommand("delete", builder),
+ plugindeprecate.NewCommand("deprecate", builder),
+ pluginundeprecate.NewCommand("undeprecate", builder),
+ {
+ Use: "version",
+ Short: "Manage Protobuf plugin versions.",
+ SubCommands: []*appcmd.Command{
+ pluginversionlist.NewCommand("list", builder),
+ },
+ },
+ },
+ },
+ {
+ Use: "template",
+ Short: "Manage Protobuf templates on the Buf Schema Registry.",
+ SubCommands: []*appcmd.Command{
+ templatecreate.NewCommand("create", builder),
+ templatelist.NewCommand("list", builder),
+ templatedelete.NewCommand("delete", builder),
+ templatedeprecate.NewCommand("deprecate", builder),
+ templateundeprecate.NewCommand("undeprecate", builder),
+ {
+ Use: "version",
+ Short: "Manage Protobuf template versions.",
+ SubCommands: []*appcmd.Command{
+ templateversioncreate.NewCommand("create", builder),
+ templateversionlist.NewCommand("list", builder),
+ },
+ },
+ },
+ },
+ {
+ Use: "webhook",
+ Short: "Manage webhooks for a repository on the Buf Schema Registry.",
+ SubCommands: []*appcmd.Command{
+ webhookcreate.NewCommand("create", builder),
+ webhookdelete.NewCommand("delete", builder),
+ webhooklist.NewCommand("list", builder),
+ },
+ },
+ },
+ },
+ },
+ },
+ {
+ Use: "alpha",
+ Short: "Alpha commands. Unstable and recommended only for experimentation. These may be deleted.",
+ Hidden: true,
+ SubCommands: []*appcmd.Command{
+ protoc.NewCommand("protoc", builder),
+ {
+ Use: "registry",
+ Short: "Manage assets on the Buf Schema Registry.",
+ SubCommands: []*appcmd.Command{
+ {
+ Use: "token",
+ Short: "Manage user tokens.",
+ SubCommands: []*appcmd.Command{
+ tokencreate.NewCommand("create", builder),
+ tokenget.NewCommand("get", builder),
+ tokenlist.NewCommand("list", builder),
+ tokendelete.NewCommand("delete", builder),
+ },
+ },
+ },
+ },
+ {
+ Use: "plugin",
+ Short: "Manage plugins on the Buf Schema Registry.",
+ SubCommands: []*appcmd.Command{
+ pluginpush.NewCommand("push", builder),
+ },
+ },
+ },
+ },
+ },
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/plugin/pluginpush/pluginpush.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/plugin/pluginpush/pluginpush.go
new file mode 100644
index 000000000..b06363b20
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/plugin/pluginpush/pluginpush.go
@@ -0,0 +1,456 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 pluginpush
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net/http"
+ "os"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin"
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/netextended"
+ "github.com/bufbuild/buf/private/pkg/netrc"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagearchive"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/bufbuild/connect-go"
+ "github.com/google/go-containerregistry/pkg/authn"
+ "github.com/google/go-containerregistry/pkg/name"
+ "github.com/google/go-containerregistry/pkg/v1/remote"
+ "github.com/google/go-containerregistry/pkg/v1/remote/transport"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+const (
+ formatFlagName = "format"
+ errorFormatFlagName = "error-format"
+ disableSymlinksFlagName = "disable-symlinks"
+ overrideRemoteFlagName = "override-remote"
+ imageFlagName = "image"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Push a plugin to a registry.",
+ Long: bufcli.GetSourceDirLong(`the source to push (directory containing buf.plugin.yaml or plugin release zip)`),
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Format string
+ ErrorFormat string
+ DisableSymlinks bool
+ OverrideRemote string
+ Image string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindDisableSymlinks(flagSet, &f.DisableSymlinks, disableSymlinksFlagName)
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+ flagSet.StringVar(
+ &f.ErrorFormat,
+ errorFormatFlagName,
+ "text",
+ fmt.Sprintf(
+ "The format for build errors printed to stderr. Must be one of %s.",
+ stringutil.SliceToString(bufanalysis.AllFormatStrings),
+ ),
+ )
+ flagSet.StringVar(
+ &f.OverrideRemote,
+ overrideRemoteFlagName,
+ "",
+ "Override the default remote found in buf.plugin.yaml name and dependencies.",
+ )
+ flagSet.StringVar(
+ &f.Image,
+ imageFlagName,
+ "",
+ "Existing image to push.",
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) (retErr error) {
+ bufcli.WarnAlphaCommand(ctx, container)
+ if err := bufcli.ValidateErrorFormatFlag(flags.ErrorFormat, errorFormatFlagName); err != nil {
+ return err
+ }
+ if len(flags.OverrideRemote) > 0 {
+ if _, err := netextended.ValidateHostname(flags.OverrideRemote); err != nil {
+ return fmt.Errorf("%s: %w", overrideRemoteFlagName, err)
+ }
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ source, err := bufcli.GetInputValue(container, "" /* The input hashtag is not supported here */, ".")
+ if err != nil {
+ return err
+ }
+ storageProvider := bufcli.NewStorageosProvider(flags.DisableSymlinks)
+ sourceStat, err := os.Stat(source)
+ if err != nil {
+ return err
+ }
+ var sourceBucket storage.ReadWriteBucket
+ if !sourceStat.IsDir() && strings.HasSuffix(strings.ToLower(sourceStat.Name()), ".zip") {
+ // Unpack plugin release to temporary directory
+ tmpDir, err := os.MkdirTemp(os.TempDir(), "plugin-push")
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err := os.RemoveAll(tmpDir); !os.IsNotExist(err) {
+ retErr = multierr.Append(retErr, err)
+ }
+ }()
+ sourceBucket, err = storageProvider.NewReadWriteBucket(tmpDir)
+ if err != nil {
+ return err
+ }
+ if err := unzipPluginToSourceBucket(ctx, source, sourceStat.Size(), sourceBucket); err != nil {
+ return err
+ }
+ } else {
+ sourceBucket, err = storageProvider.NewReadWriteBucket(source)
+ if err != nil {
+ return err
+ }
+ }
+ existingConfigFilePath, err := bufpluginconfig.ExistingConfigFilePath(ctx, sourceBucket)
+ if err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ if existingConfigFilePath == "" {
+ return fmt.Errorf("please define a %s configuration file in the target directory", bufpluginconfig.ExternalConfigFilePath)
+ }
+ var options []bufpluginconfig.ConfigOption
+ if len(flags.OverrideRemote) > 0 {
+ options = append(options, bufpluginconfig.WithOverrideRemote(flags.OverrideRemote))
+ }
+ pluginConfig, err := bufpluginconfig.GetConfigForBucket(ctx, sourceBucket, options...)
+ if err != nil {
+ return err
+ }
+ client, err := bufplugindocker.NewClient(container.Logger(), bufcli.Version)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, client.Close())
+ }()
+ var imageID string
+ if flags.Image != "" {
+ inspectResponse, err := client.Inspect(ctx, flags.Image)
+ if err != nil {
+ return nil
+ }
+ imageID = inspectResponse.ImageID
+ } else {
+ image, err := loadDockerImage(ctx, sourceBucket)
+ if err != nil {
+ return err
+ }
+ loadResponse, err := client.Load(ctx, image)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ if err := image.Close(); !errors.Is(err, os.ErrClosed) {
+ retErr = multierr.Append(retErr, err)
+ }
+ }()
+ imageID = loadResponse.ImageID
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ pluginConfig.Name.Remote(),
+ registryv1alpha1connect.NewPluginCurationServiceClient,
+ )
+ latestPluginResp, err := service.GetLatestCuratedPlugin(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetLatestCuratedPluginRequest{
+ Owner: pluginConfig.Name.Owner(),
+ Name: pluginConfig.Name.Plugin(),
+ Version: pluginConfig.PluginVersion,
+ Revision: 0, // get latest revision for the plugin version.
+ }),
+ )
+ var currentImageDigest string
+ var nextRevision uint32
+ if err != nil {
+ if connect.CodeOf(err) != connect.CodeNotFound {
+ return err
+ }
+ nextRevision = 1
+ } else {
+ nextRevision = latestPluginResp.Msg.Plugin.Revision + 1
+ currentImageDigest = latestPluginResp.Msg.Plugin.ContainerImageDigest
+ }
+ machine, err := netrc.GetMachineForName(container, pluginConfig.Name.Remote())
+ if err != nil {
+ return err
+ }
+ authConfig := &bufplugindocker.RegistryAuthConfig{}
+ if machine != nil {
+ authConfig.ServerAddress = machine.Name()
+ authConfig.Username = machine.Login()
+ authConfig.Password = machine.Password()
+ }
+ imageDigest, err := findExistingDigestForImageID(ctx, pluginConfig, authConfig, imageID, currentImageDigest)
+ if err != nil {
+ return err
+ }
+ if imageDigest == "" {
+ imageDigest, err = pushImage(ctx, client, authConfig, pluginConfig, imageID)
+ if err != nil {
+ return err
+ }
+ } else {
+ container.Logger().Info("image found in registry - skipping push")
+ }
+ plugin, err := bufplugin.NewPlugin(
+ pluginConfig.PluginVersion,
+ pluginConfig.Dependencies,
+ pluginConfig.Registry,
+ imageDigest,
+ pluginConfig.SourceURL,
+ pluginConfig.Description,
+ )
+ if err != nil {
+ return err
+ }
+ createRequest, err := createCuratedPluginRequest(pluginConfig, plugin, nextRevision)
+ if err != nil {
+ return err
+ }
+ var curatedPlugin *registryv1alpha1.CuratedPlugin
+ createPluginResp, err := service.CreateCuratedPlugin(ctx, connect.NewRequest(createRequest))
+ if err != nil {
+ if connect.CodeOf(err) != connect.CodeAlreadyExists {
+ return err
+ }
+ // Plugin with the same image digest and metadata already exists
+ container.Logger().Info(
+ "plugin already exists",
+ zap.String("name", pluginConfig.Name.IdentityString()),
+ zap.String("digest", plugin.ContainerImageDigest()),
+ )
+ curatedPlugin = latestPluginResp.Msg.Plugin
+ } else {
+ curatedPlugin = createPluginResp.Msg.Configuration
+ }
+ return bufprint.NewCuratedPluginPrinter(container.Stdout()).PrintCuratedPlugin(ctx, format, curatedPlugin)
+}
+
+func createCuratedPluginRequest(
+ pluginConfig *bufpluginconfig.Config,
+ plugin bufplugin.Plugin,
+ nextRevision uint32,
+) (*registryv1alpha1.CreateCuratedPluginRequest, error) {
+ outputLanguages, err := bufplugin.OutputLanguagesToProtoLanguages(pluginConfig.OutputLanguages)
+ if err != nil {
+ return nil, err
+ }
+ protoRegistryConfig, err := bufplugin.PluginRegistryToProtoRegistryConfig(plugin.Registry())
+ if err != nil {
+ return nil, err
+ }
+ return ®istryv1alpha1.CreateCuratedPluginRequest{
+ Owner: pluginConfig.Name.Owner(),
+ Name: pluginConfig.Name.Plugin(),
+ RegistryType: bufplugin.PluginToProtoPluginRegistryType(plugin),
+ Version: plugin.Version(),
+ ContainerImageDigest: plugin.ContainerImageDigest(),
+ Dependencies: bufplugin.PluginReferencesToCuratedProtoPluginReferences(plugin.Dependencies()),
+ SourceUrl: plugin.SourceURL(),
+ Description: plugin.Description(),
+ RegistryConfig: protoRegistryConfig,
+ Revision: nextRevision,
+ OutputLanguages: outputLanguages,
+ SpdxLicenseId: pluginConfig.SPDXLicenseID,
+ LicenseUrl: pluginConfig.LicenseURL,
+ }, nil
+}
+
+func pushImage(
+ ctx context.Context,
+ client bufplugindocker.Client,
+ authConfig *bufplugindocker.RegistryAuthConfig,
+ plugin *bufpluginconfig.Config,
+ image string,
+) (_ string, retErr error) {
+ tagResponse, err := client.Tag(ctx, image, plugin)
+ if err != nil {
+ return "", err
+ }
+ createdImage := tagResponse.Image
+ // We tag a Docker image using a unique ID label each time.
+ // After we're done publishing the image, we delete it to not leave a lot of images left behind.
+ defer func() {
+ if _, err := client.Delete(ctx, createdImage); err != nil {
+ retErr = multierr.Append(retErr, fmt.Errorf("failed to delete image %q", createdImage))
+ }
+ }()
+ pushResponse, err := client.Push(ctx, createdImage, authConfig)
+ if err != nil {
+ return "", err
+ }
+ return pushResponse.Digest, nil
+}
+
+// findExistingDigestForImageID will query the OCI registry to see if the imageID already exists.
+// If an image is found with the same imageID, its digest will be returned (and we'll skip pushing to OCI registry).
+//
+// It performs the following search:
+//
+// - GET /v2/{owner}/{plugin}/tags/list
+// - For each tag:
+// - Fetch image: GET /v2/{owner}/{plugin}/manifests/{tag}
+// - If image manifest matches imageID, we can use the image digest for the image.
+func findExistingDigestForImageID(
+ ctx context.Context,
+ plugin *bufpluginconfig.Config,
+ authConfig *bufplugindocker.RegistryAuthConfig,
+ imageID string,
+ currentImageDigest string,
+) (string, error) {
+ pluginsRemote := plugin.Name.Remote()
+ if !strings.HasPrefix(pluginsRemote, bufplugindocker.PluginsImagePrefix) {
+ pluginsRemote = bufplugindocker.PluginsImagePrefix + pluginsRemote
+ }
+ repo, err := name.NewRepository(fmt.Sprintf("%s/%s/%s", pluginsRemote, plugin.Name.Owner(), plugin.Name.Plugin()))
+ if err != nil {
+ return "", err
+ }
+ auth := &authn.Basic{Username: authConfig.Username, Password: authConfig.Password}
+ remoteOpts := []remote.Option{remote.WithContext(ctx), remote.WithAuth(auth)}
+ // First attempt to see if the current image digest matches the image ID
+ if currentImageDigest != "" {
+ remoteImageID, _, err := getImageIDAndDigestFromReference(repo.Digest(currentImageDigest), remoteOpts...)
+ if err != nil {
+ return "", err
+ }
+ if remoteImageID == imageID {
+ return currentImageDigest, nil
+ }
+ }
+ // List all tags and check for a match
+ tags, err := remote.List(repo, remoteOpts...)
+ if err != nil {
+ structuredErr := new(transport.Error)
+ if errors.As(err, &structuredErr) {
+ if structuredErr.StatusCode == http.StatusNotFound {
+ return "", nil
+ }
+ }
+ return "", err
+ }
+ existingImageDigest := ""
+ for _, tag := range tags {
+ remoteImageID, imageDigest, err := getImageIDAndDigestFromReference(repo.Tag(tag), remoteOpts...)
+ if err != nil {
+ return "", err
+ }
+ if remoteImageID == imageID {
+ existingImageDigest = imageDigest
+ break
+ }
+ }
+ return existingImageDigest, nil
+}
+
+func getImageIDAndDigestFromReference(ref name.Reference, options ...remote.Option) (string, string, error) {
+ image, err := remote.Image(ref, options...)
+ if err != nil {
+ return "", "", err
+ }
+ imageDigest, err := image.Digest()
+ if err != nil {
+ return "", "", err
+ }
+ manifest, err := image.Manifest()
+ if err != nil {
+ return "", "", err
+ }
+ return manifest.Config.Digest.String(), imageDigest.String(), nil
+}
+
+func unzipPluginToSourceBucket(ctx context.Context, pluginZip string, size int64, bucket storage.ReadWriteBucket) (retErr error) {
+ f, err := os.Open(pluginZip)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, f.Close())
+ }()
+ return storagearchive.Unzip(ctx, f, size, bucket, nil, 0)
+}
+
+func loadDockerImage(ctx context.Context, bucket storage.ReadBucket) (storage.ReadObjectCloser, error) {
+ image, err := bucket.Get(ctx, bufplugindocker.ImagePath)
+ if storage.IsNotExist(err) {
+ return nil, fmt.Errorf("unable to find a %s plugin image: %w", bufplugindocker.ImagePath, err)
+ }
+ return image, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/plugin/pluginpush/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/plugin/pluginpush/usage.gen.go
new file mode 100644
index 000000000..219f8d7f8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/plugin/pluginpush/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package pluginpush
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/const_unix.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/const_unix.go
new file mode 100644
index 000000000..feae2ec1f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/const_unix.go
@@ -0,0 +1,26 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Matching the unix-like build tags in the Golang source i.e. https://github.com/golang/go/blob/912f0750472dd4f674b69ca1616bfaf377af1805/src/os/file_unix.go#L6
+
+//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+
+package protoc
+
+// https://github.com/protocolbuffers/protobuf/blob/336ed1820a4f2649c9aa3953d5059b03b7a77100/src/google/protobuf/compiler/command_line_interface.cc#L892-L896
+//
+// This will be ":" for all unix-like platforms including darwin.
+// This will be ";" for windows.
+const includeDirPathSeparator = ":"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/const_windows.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/const_windows.go
new file mode 100644
index 000000000..569ebdba7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/const_windows.go
@@ -0,0 +1,24 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoc
+
+// https://github.com/protocolbuffers/protobuf/blob/336ed1820a4f2649c9aa3953d5059b03b7a77100/src/google/protobuf/compiler/command_line_interface.cc#L892-L896
+//
+// This will be ":" for all unix-like platforms including darwin.
+// This will be ";" for windows.
+const includeDirPathSeparator = ";"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/errors.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/errors.go
new file mode 100644
index 000000000..0cad3ef84
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/errors.go
@@ -0,0 +1,103 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoc
+
+import (
+ "errors"
+ "fmt"
+)
+
+var (
+ errNoInputFiles = errors.New("no input files specified")
+ errArgEmpty = errors.New("empty argument specified")
+)
+
+func newCannotSpecifyOptWithoutOutError(pluginName string) error {
+ return fmt.Errorf("cannot specify --%s_opt without --%s_out", pluginName, pluginName)
+}
+
+func newCannotSpecifyPathWithoutOutError(pluginName string) error {
+ return fmt.Errorf("cannot specify --%s=protoc-gen-%s without --%s_out", pluginPathValuesFlagName, pluginName, pluginName)
+}
+
+func newRecursiveReferenceError(flagFilePath string) error {
+ return fmt.Errorf("%s recursively referenced", flagFilePath)
+}
+
+func newDuplicateOutError(pluginName string) error {
+ return fmt.Errorf("duplicate --%s_out", pluginName)
+}
+
+func newEmptyOptError(pluginName string) error {
+ return fmt.Errorf("empty option value for %s", pluginName)
+}
+
+func newPluginPathValueEmptyError() error {
+ return fmt.Errorf("--%s had an empty value", pluginPathValuesFlagName)
+}
+
+func newPluginPathValueInvalidError(pluginPathValue string) error {
+ return fmt.Errorf("--%s value invalid: %s", pluginPathValuesFlagName, pluginPathValue)
+}
+
+func newPluginPathNameInvalidPrefixError(pluginName string) error {
+ return fmt.Errorf(`--%s had name %q which must be prefixed by "protoc-gen-"`, pluginPathValuesFlagName, pluginName)
+}
+
+func newDuplicatePluginPathError(pluginName string) error {
+ return fmt.Errorf("duplicate --%s for protoc-gen-%s", pluginPathValuesFlagName, pluginName)
+}
+
+func newEncodeNotSupportedError() error {
+ return fmt.Errorf(
+ `--%s is not supported by buf.
+
+Buf only handles the binary and JSON formats for now, however we can support this flag if there is sufficient demand.
+Please email us at support@buf.build if this is a need for your organization.`,
+ encodeFlagName,
+ )
+}
+
+func newDecodeNotSupportedError() error {
+ return fmt.Errorf(
+ `--%s is not supported by buf.
+
+Buf only handles the binary and JSON formats for now, however we can support this flag if there is sufficient demand.
+Please email us at support@buf.build if this is a need for your organization.`,
+ decodeFlagName,
+ )
+}
+
+func newDecodeRawNotSupportedError() error {
+ return fmt.Errorf(
+ `--%s is not supported by buf.
+
+Buf only handles the binary and JSON formats for now, however we can support this flag if there is sufficient demand.
+Please email us at support@buf.build if this is a need for your organization.`,
+ decodeRawFlagName,
+ )
+}
+
+func newDescriptorSetInNotSupportedError() error {
+ return fmt.Errorf(
+ `--%s is not supported by buf.
+
+Buf will work with cross-repository imports Buf Schema Registry, which will be based on source files, not pre-built Images.
+We think this is a much safer option that leads to less errors and more consistent results.
+
+Please email us at support@buf.build if this is a need for your organization.`,
+ descriptorSetInFlagName,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/flags.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/flags.go
new file mode 100644
index 000000000..5afb56d11
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/flags.go
@@ -0,0 +1,526 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoc
+
+import (
+ "fmt"
+ "os"
+ "path/filepath"
+ "sort"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/spf13/pflag"
+)
+
+const (
+ includeDirPathsFlagName = "proto_path"
+ includeImportsFlagName = "include_imports"
+ includeSourceInfoFlagName = "include_source_info"
+ printFreeFieldNumbersFlagName = "print_free_field_numbers"
+ outputFlagName = "descriptor_set_out"
+ pluginPathValuesFlagName = "plugin"
+ errorFormatFlagName = "error_format"
+ byDirFlagName = "by-dir"
+
+ pluginFakeFlagName = "protoc_plugin_fake"
+
+ encodeFlagName = "encode"
+ decodeFlagName = "decode"
+ decodeRawFlagName = "decode_raw"
+ descriptorSetInFlagName = "descriptor_set_in"
+)
+
+var (
+ defaultIncludeDirPaths = []string{"."}
+ defaultErrorFormat = "gcc"
+)
+
+type flags struct {
+ IncludeDirPaths []string
+ IncludeImports bool
+ IncludeSourceInfo bool
+ PrintFreeFieldNumbers bool
+ Output string
+ ErrorFormat string
+ ByDir bool
+}
+
+type env struct {
+ flags
+
+ PluginNamesSortedByOutIndex []string
+ PluginNameToPluginInfo map[string]*pluginInfo
+ FilePaths []string
+}
+
+type flagsBuilder struct {
+ flags
+
+ PluginPathValues []string
+
+ Encode string
+ Decode string
+ DecodeRaw bool
+ DescriptorSetIn []string
+
+ pluginFake []string
+ pluginNameToValue map[string]*pluginValue
+}
+
+func newFlagsBuilder() *flagsBuilder {
+ return &flagsBuilder{
+ pluginNameToValue: make(map[string]*pluginValue),
+ }
+}
+
+func (f *flagsBuilder) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringSliceVarP(
+ &f.IncludeDirPaths,
+ includeDirPathsFlagName,
+ "I",
+ // cannot set default due to recursive flag parsing
+ // no way to differentiate between default and set for now
+ // perhaps we could rework pflag usage somehow
+ nil,
+ `The directory paths to include.`,
+ )
+ flagSet.BoolVar(
+ &f.IncludeImports,
+ includeImportsFlagName,
+ false,
+ `Include imports in the resulting FileDescriptorSet.`,
+ )
+ flagSet.BoolVar(
+ &f.IncludeSourceInfo,
+ includeSourceInfoFlagName,
+ false,
+ `Include source info in the resulting FileDescriptorSet.`,
+ )
+ flagSet.BoolVar(
+ &f.PrintFreeFieldNumbers,
+ printFreeFieldNumbersFlagName,
+ false,
+ `Print the free field numbers of all messages.`,
+ )
+ flagSet.StringVarP(
+ &f.Output,
+ outputFlagName,
+ "o",
+ "",
+ fmt.Sprintf(
+ `The location to write the FileDescriptorSet. Must be one of format %s.`,
+ buffetch.ImageFormatsString,
+ ),
+ )
+ flagSet.StringVar(
+ &f.ErrorFormat,
+ errorFormatFlagName,
+ // cannot set default due to recursive flag parsing
+ // no way to differentiate between default and set for now
+ // perhaps we could rework pflag usage somehow
+ "",
+ fmt.Sprintf(
+ `The error format to use. Must be one of format %s.`,
+ stringutil.SliceToString(bufanalysis.AllFormatStringsWithAliases),
+ ),
+ )
+ flagSet.StringSliceVar(
+ &f.PluginPathValues,
+ pluginPathValuesFlagName,
+ nil,
+ `The paths to the plugin executables to use, either in the form "path/to/protoc-gen-foo" or "protoc-gen-foo=path/to/binary".`,
+ )
+ flagSet.BoolVar(
+ &f.ByDir,
+ byDirFlagName,
+ false,
+ `Execute parallel plugin calls for every directory containing .proto files.`,
+ )
+
+ // MUST be a StringArray instead of StringSlice so we do not split on commas
+ // Otherwise --go_out=foo=bar,baz=bat:out would be treated as --go_out=foo=bar --go_out=baz=bat:out
+ flagSet.StringArrayVar(
+ &f.pluginFake,
+ pluginFakeFlagName,
+ nil,
+ `If you are calling this, you should not be.`,
+ )
+ _ = flagSet.MarkHidden(pluginFakeFlagName)
+
+ flagSet.StringVar(
+ &f.Encode,
+ encodeFlagName,
+ "",
+ `Not supported by buf.`,
+ )
+ _ = flagSet.MarkHidden(encodeFlagName)
+ flagSet.StringVar(
+ &f.Decode,
+ decodeFlagName,
+ "",
+ `Not supported by buf.`,
+ )
+ _ = flagSet.MarkHidden(decodeFlagName)
+ flagSet.BoolVar(
+ &f.DecodeRaw,
+ decodeRawFlagName,
+ false,
+ `Not supported by buf.`,
+ )
+ _ = flagSet.MarkHidden(decodeRawFlagName)
+ flagSet.StringSliceVar(
+ &f.DescriptorSetIn,
+ descriptorSetInFlagName,
+ nil,
+ `Not supported by buf.`,
+ )
+ _ = flagSet.MarkHidden(descriptorSetInFlagName)
+}
+
+func (f *flagsBuilder) Normalize(flagSet *pflag.FlagSet, name string) string {
+ if name != "descriptor_set_out" && strings.HasSuffix(name, "_out") {
+ f.pluginFakeParse(name, "_out", true)
+ return pluginFakeFlagName
+ }
+ if strings.HasSuffix(name, "_opt") {
+ f.pluginFakeParse(name, "_opt", false)
+ return pluginFakeFlagName
+ }
+ return strings.Replace(name, "-", "_", -1)
+}
+
+func (f *flagsBuilder) Build(args []string) (*env, error) {
+ pluginNameToPluginInfo := make(map[string]*pluginInfo)
+ seenFlagFilePaths := make(map[string]struct{})
+ filePaths, err := f.buildRec(args, pluginNameToPluginInfo, seenFlagFilePaths)
+ if err != nil {
+ return nil, err
+ }
+ if err := f.checkUnsupported(); err != nil {
+ return nil, err
+ }
+ for pluginName, pluginInfo := range pluginNameToPluginInfo {
+ if pluginInfo.Out == "" && len(pluginInfo.Opt) > 0 {
+ return nil, newCannotSpecifyOptWithoutOutError(pluginName)
+ }
+ if pluginInfo.Out == "" && pluginInfo.Path != "" {
+ return nil, newCannotSpecifyPathWithoutOutError(pluginName)
+ }
+ }
+ pluginNamesSortedByOutIndex, err := f.getPluginNamesSortedByOutIndex(pluginNameToPluginInfo)
+ if err != nil {
+ return nil, err
+ }
+ if len(f.IncludeDirPaths) == 0 {
+ f.IncludeDirPaths = defaultIncludeDirPaths
+ } else {
+ f.IncludeDirPaths = splitIncludeDirPaths(f.IncludeDirPaths)
+ }
+ if f.ErrorFormat == "" {
+ f.ErrorFormat = defaultErrorFormat
+ }
+ if len(filePaths) == 0 {
+ return nil, errNoInputFiles
+ }
+ return &env{
+ flags: f.flags,
+ PluginNamesSortedByOutIndex: pluginNamesSortedByOutIndex,
+ PluginNameToPluginInfo: pluginNameToPluginInfo,
+ FilePaths: filePaths,
+ }, nil
+}
+
+func (f *flagsBuilder) pluginFakeParse(name string, suffix string, isOut bool) {
+ pluginName := strings.TrimSuffix(name, suffix)
+ pluginValue, ok := f.pluginNameToValue[pluginName]
+ if !ok {
+ pluginValue = newPluginValue()
+ f.pluginNameToValue[pluginName] = pluginValue
+ }
+ index := len(f.pluginFake)
+ if isOut {
+ pluginValue.OutIndexes = append(pluginValue.OutIndexes, index)
+ } else {
+ pluginValue.OptIndexes = append(pluginValue.OptIndexes, index)
+ }
+}
+
+func (f *flagsBuilder) buildRec(
+ args []string,
+ pluginNameToPluginInfo map[string]*pluginInfo,
+ seenFlagFilePaths map[string]struct{},
+) ([]string, error) {
+ if err := f.parsePluginNameToPluginInfo(pluginNameToPluginInfo); err != nil {
+ return nil, err
+ }
+ filePaths := make([]string, 0, len(args))
+ for _, arg := range args {
+ if len(arg) == 0 {
+ return nil, errArgEmpty
+ }
+ if arg[0] != '@' {
+ filePaths = append(filePaths, arg)
+ } else {
+ flagFilePath := normalpath.Unnormalize(arg[1:])
+ if _, ok := seenFlagFilePaths[flagFilePath]; ok {
+ return nil, newRecursiveReferenceError(flagFilePath)
+ }
+ seenFlagFilePaths[flagFilePath] = struct{}{}
+ data, err := os.ReadFile(flagFilePath)
+ if err != nil {
+ return nil, err
+ }
+ var flagFilePathArgs []string
+ for _, flagFilePathArg := range strings.Split(string(data), "\n") {
+ flagFilePathArg = strings.TrimSpace(flagFilePathArg)
+ if flagFilePathArg != "" {
+ flagFilePathArgs = append(flagFilePathArgs, flagFilePathArg)
+ }
+ }
+ subFlagsBuilder := newFlagsBuilder()
+ flagSet := pflag.NewFlagSet(flagFilePath, pflag.ContinueOnError)
+ subFlagsBuilder.Bind(flagSet)
+ flagSet.SetNormalizeFunc(normalizeFunc(subFlagsBuilder.Normalize))
+ if err := flagSet.Parse(flagFilePathArgs); err != nil {
+ return nil, err
+ }
+ subFilePaths, err := subFlagsBuilder.buildRec(
+ flagSet.Args(),
+ pluginNameToPluginInfo,
+ seenFlagFilePaths,
+ )
+ if err != nil {
+ return nil, err
+ }
+ if err := f.merge(subFlagsBuilder); err != nil {
+ return nil, err
+ }
+ filePaths = append(filePaths, subFilePaths...)
+ }
+ }
+ return filePaths, nil
+}
+
+// we need to bind a separate flags as pflags overrides the values with defaults if you bind again
+// note that pflags does not error on duplicates so we do not either
+func (f *flagsBuilder) merge(subFlagsBuilder *flagsBuilder) error {
+ f.IncludeDirPaths = append(f.IncludeDirPaths, subFlagsBuilder.IncludeDirPaths...)
+ if subFlagsBuilder.IncludeImports {
+ f.IncludeImports = true
+ }
+ if subFlagsBuilder.IncludeSourceInfo {
+ f.IncludeSourceInfo = true
+ }
+ if subFlagsBuilder.PrintFreeFieldNumbers {
+ f.PrintFreeFieldNumbers = true
+ }
+ if subFlagsBuilder.Output != "" {
+ f.Output = subFlagsBuilder.Output
+ }
+ if subFlagsBuilder.ErrorFormat != "" {
+ f.ErrorFormat = subFlagsBuilder.ErrorFormat
+ }
+ if subFlagsBuilder.ByDir {
+ f.ByDir = true
+ }
+ f.PluginPathValues = append(f.PluginPathValues, subFlagsBuilder.PluginPathValues...)
+ if subFlagsBuilder.Encode != "" {
+ f.Encode = subFlagsBuilder.Encode
+ }
+ if subFlagsBuilder.Decode != "" {
+ f.Decode = subFlagsBuilder.Decode
+ }
+ if subFlagsBuilder.DecodeRaw {
+ f.DecodeRaw = true
+ }
+ f.DescriptorSetIn = append(f.DescriptorSetIn, subFlagsBuilder.DescriptorSetIn...)
+ return nil
+}
+
+func (f *flagsBuilder) parsePluginNameToPluginInfo(pluginNameToPluginInfo map[string]*pluginInfo) error {
+ for pluginName, pluginValue := range f.pluginNameToValue {
+ switch len(pluginValue.OutIndexes) {
+ case 0:
+ case 1:
+ out := f.pluginFake[pluginValue.OutIndexes[0]]
+ var opt string
+ if isOutNotAFullPath(out) {
+ split := strings.SplitN(out, ":", 2)
+ switch len(split) {
+ case 1:
+ case 2:
+ out = split[1]
+ opt = split[0]
+ }
+ }
+ pluginInfo, ok := pluginNameToPluginInfo[pluginName]
+ if !ok {
+ pluginInfo = newPluginInfo()
+ pluginNameToPluginInfo[pluginName] = pluginInfo
+ }
+ pluginInfo.Out = out
+ if opt != "" {
+ for _, value := range strings.Split(opt, ",") {
+ if value := strings.TrimSpace(value); value != "" {
+ pluginInfo.Opt = append(pluginInfo.Opt, value)
+ } else {
+ return newEmptyOptError(pluginName)
+ }
+ }
+ }
+ default:
+ return newDuplicateOutError(pluginName)
+ }
+ if len(pluginValue.OptIndexes) > 0 {
+ pluginInfo, ok := pluginNameToPluginInfo[pluginName]
+ if !ok {
+ pluginInfo = newPluginInfo()
+ pluginNameToPluginInfo[pluginName] = pluginInfo
+ }
+ for _, optIndex := range pluginValue.OptIndexes {
+ for _, value := range strings.Split(f.pluginFake[optIndex], ",") {
+ if value := strings.TrimSpace(value); value != "" {
+ pluginInfo.Opt = append(pluginInfo.Opt, value)
+ } else {
+ return newEmptyOptError(pluginName)
+ }
+ }
+ }
+ }
+ }
+ for _, pluginPathValue := range f.PluginPathValues {
+ var pluginName string
+ var pluginPath string
+ switch split := strings.SplitN(pluginPathValue, "=", 2); len(split) {
+ case 0:
+ return newPluginPathValueEmptyError()
+ case 1:
+ pluginName = filepath.Base(split[0])
+ pluginPath = split[0]
+ case 2:
+ pluginName = split[0]
+ pluginPath = split[1]
+ default:
+ return newPluginPathValueInvalidError(pluginPathValue)
+ }
+ if !strings.HasPrefix(pluginName, "protoc-gen-") {
+ return newPluginPathNameInvalidPrefixError(pluginName)
+ }
+ pluginName = strings.TrimPrefix(pluginName, "protoc-gen-")
+ pluginInfo, ok := pluginNameToPluginInfo[pluginName]
+ if !ok {
+ pluginInfo = newPluginInfo()
+ pluginNameToPluginInfo[pluginName] = pluginInfo
+ }
+ if pluginInfo.Path != "" {
+ return newDuplicatePluginPathError(pluginName)
+ }
+ pluginInfo.Path = pluginPath
+ }
+ return nil
+}
+
+func (f *flagsBuilder) getPluginNamesSortedByOutIndex(
+ pluginNameToPluginInfo map[string]*pluginInfo,
+) ([]string, error) {
+ pluginNames := make([]string, 0, len(pluginNameToPluginInfo))
+ for pluginName := range pluginNameToPluginInfo {
+ pluginNames = append(pluginNames, pluginName)
+ }
+ var err error
+ sort.Slice(
+ pluginNames,
+ func(i int, j int) bool {
+ pluginName1 := pluginNames[i]
+ pluginName2 := pluginNames[j]
+ pluginValue1, ok := f.pluginNameToValue[pluginName1]
+ if !ok {
+ err = fmt.Errorf("no value for plugin name %q inside pluginNameToValue", pluginName1)
+ return false
+ }
+ pluginValue2, ok := f.pluginNameToValue[pluginName2]
+ if !ok {
+ err = fmt.Errorf("no value for plugin name %q inside pluginNameToValue", pluginName2)
+ return false
+ }
+ if len(pluginValue1.OutIndexes) != 1 {
+ err = fmt.Errorf("%d out indexes for plugin name %q", len(pluginValue1.OutIndexes), pluginName1)
+ return false
+ }
+ if len(pluginValue2.OutIndexes) != 1 {
+ err = fmt.Errorf("%d out indexes for plugin name %q", len(pluginValue2.OutIndexes), pluginName2)
+ return false
+ }
+ return pluginValue1.OutIndexes[0] < pluginValue2.OutIndexes[0]
+ },
+ )
+ if err != nil {
+ return nil, err
+ }
+ return pluginNames, nil
+}
+
+func (f *flagsBuilder) checkUnsupported() error {
+ if f.Encode != "" {
+ return newEncodeNotSupportedError()
+ }
+ if f.Decode != "" {
+ return newDecodeNotSupportedError()
+ }
+ if f.DecodeRaw {
+ return newDecodeRawNotSupportedError()
+ }
+ if len(f.DescriptorSetIn) > 0 {
+ return newDescriptorSetInNotSupportedError()
+ }
+ return nil
+}
+
+type pluginValue struct {
+ OutIndexes []int
+ OptIndexes []int
+}
+
+func newPluginValue() *pluginValue {
+ return &pluginValue{}
+}
+
+func normalizeFunc(f func(*pflag.FlagSet, string) string) func(*pflag.FlagSet, string) pflag.NormalizedName {
+ return func(flagSet *pflag.FlagSet, name string) pflag.NormalizedName {
+ return pflag.NormalizedName(f(flagSet, name))
+ }
+}
+
+// https://github.com/protocolbuffers/protobuf/blob/336ed1820a4f2649c9aa3953d5059b03b7a77100/src/google/protobuf/compiler/command_line_interface.cc#L1699-L1705
+//
+// This roughly supports the equivalent of Java's -classpath flag.
+// Note that for filenames such as "foo:bar" on unix, this breaks, but our goal is to match
+// this flag from protoc.
+func splitIncludeDirPaths(includeDirPaths []string) []string {
+ copyIncludeDirPaths := make([]string, 0, len(includeDirPaths))
+ for _, includeDirPath := range includeDirPaths {
+ // protocolbuffers/protobuf has true for omit_empty
+ for _, splitIncludeDirPath := range strings.Split(includeDirPath, includeDirPathSeparator) {
+ if len(splitIncludeDirPath) > 0 {
+ copyIncludeDirPaths = append(copyIncludeDirPaths, splitIncludeDirPath)
+ }
+ }
+ }
+ return copyIncludeDirPaths
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/flags_unix.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/flags_unix.go
new file mode 100644
index 000000000..2a1ac3ef0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/flags_unix.go
@@ -0,0 +1,36 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+
+package protoc
+
+// isOutNotAFullPath checks if we need to consider the path to be a full path.
+//
+// This is always true in unix, and is true if the path is not absolute in windows.
+// This is needed because i.e.:
+//
+// # unix
+// --go_out=opt:foo/bar
+// --go_out=foo/bar
+// # windows
+// --go_out=opt:C:\foo\bar
+// --go_out=C:\foo\bar
+//
+// protoc uses : in both unix and windows to separate the opt and out, but in windows,
+// if a full path is given, then we don't want it interpreted as something we should split.
+func isOutNotAFullPath(path string) bool {
+ return true
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/flags_windows.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/flags_windows.go
new file mode 100644
index 000000000..b8ac850de
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/flags_windows.go
@@ -0,0 +1,40 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoc
+
+import (
+ "path/filepath"
+)
+
+// isOutNotAFullPath checks if we need to consider the path to be a full path.
+//
+// This is always true in unix, and is true if the path is not absolute in windows.
+// This is needed because i.e.:
+//
+// # unix
+// --go_out=opt:foo/bar
+// --go_out=foo/bar
+// # windows
+// --go_out=opt:C:\foo\bar
+// --go_out=C:\foo\bar
+//
+// protoc uses : in both unix and windows to separate the opt and out, but in windows,
+// if a full path is given, then we don't want it interpreted as something we should split.
+func isOutNotAFullPath(path string) bool {
+ return !filepath.IsAbs(path)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/plugin.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/plugin.go
new file mode 100644
index 000000000..820acfc30
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/plugin.go
@@ -0,0 +1,75 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoc
+
+import (
+ "context"
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+type pluginInfo struct {
+ // Required
+ Out string
+ // optional
+ Opt []string
+ // optional
+ Path string
+}
+
+func newPluginInfo() *pluginInfo {
+ return &pluginInfo{}
+}
+
+func executePlugin(
+ ctx context.Context,
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ container app.EnvStderrContainer,
+ images []bufimage.Image,
+ pluginName string,
+ pluginInfo *pluginInfo,
+) (*pluginpb.CodeGeneratorResponse, error) {
+ response, err := appprotoexec.NewGenerator(
+ logger,
+ storageosProvider,
+ runner,
+ ).Generate(
+ ctx,
+ container,
+ pluginName,
+ bufimage.ImagesToCodeGeneratorRequests(
+ images,
+ strings.Join(pluginInfo.Opt, ","),
+ appprotoexec.DefaultVersion,
+ false,
+ false,
+ ),
+ appprotoexec.GenerateWithPluginPath(pluginInfo.Path),
+ )
+ if err != nil {
+ return nil, fmt.Errorf("--%s_out: %v", pluginName, err)
+ }
+ return response, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/protoc.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/protoc.go
new file mode 100644
index 000000000..9bf80bead
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/protoc.go
@@ -0,0 +1,251 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoc
+
+import (
+ "context"
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/app/appproto"
+ "github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec"
+ "github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.opencensus.io/trace"
+ "go.uber.org/zap"
+ "go.uber.org/zap/zapcore"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flagsBuilder := newFlagsBuilder()
+ return &appcmd.Command{
+ Use: name + " ...",
+ Short: "High-performance protoc replacement.",
+ Long: `This command replaces protoc using Buf's internal compiler.
+
+The implementation is in progress. Although it outperforms mainline protoc,
+it hasn't yet been optimized.
+
+This protoc replacement is currently stable but should be considered a preview.
+
+Additional flags:
+
+ --(.*)_out: Run the named plugin.
+ --(.*)_opt: Options for the named plugin.
+ @filename: Parse arguments from the given filename.`,
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ env, err := flagsBuilder.Build(app.Args(container))
+ if err != nil {
+ return err
+ }
+ return run(ctx, container, env)
+ },
+ ),
+ BindFlags: flagsBuilder.Bind,
+ NormalizeFlag: flagsBuilder.Normalize,
+ Version: fmt.Sprintf(
+ "%v.%v.%v-buf",
+ appprotoexec.DefaultVersion.GetMajor(),
+ appprotoexec.DefaultVersion.GetMinor(),
+ appprotoexec.DefaultVersion.GetPatch(),
+ ),
+ }
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ env *env,
+) (retErr error) {
+ if env.PrintFreeFieldNumbers && len(env.PluginNameToPluginInfo) > 0 {
+ return fmt.Errorf("cannot call --%s and plugins at the same time", printFreeFieldNumbersFlagName)
+ }
+ if env.PrintFreeFieldNumbers && env.Output != "" {
+ return fmt.Errorf("cannot call --%s and --%s at the same time", printFreeFieldNumbersFlagName, outputFlagName)
+ }
+ if len(env.PluginNameToPluginInfo) > 0 && env.Output != "" {
+ return fmt.Errorf("cannot call --%s and plugins at the same time", outputFlagName)
+ }
+
+ if checkedEntry := container.Logger().Check(zapcore.DebugLevel, "env"); checkedEntry != nil {
+ checkedEntry.Write(
+ zap.Any("flags", env.flags),
+ zap.Any("plugins", env.PluginNameToPluginInfo),
+ )
+ }
+
+ var buildOption bufmodulebuild.BuildOption
+ if len(env.FilePaths) > 0 {
+ buildOption = bufmodulebuild.WithPaths(env.FilePaths)
+ }
+ storageosProvider := storageos.NewProvider(storageos.ProviderWithSymlinks())
+ runner := command.NewRunner()
+ module, err := bufmodulebuild.NewModuleIncludeBuilder(container.Logger(), storageosProvider).BuildForIncludes(
+ ctx,
+ env.IncludeDirPaths,
+ buildOption,
+ )
+ if err != nil {
+ return err
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ moduleReader, err := bufcli.NewModuleReaderAndCreateCacheDirs(container, clientConfig)
+ if err != nil {
+ return err
+ }
+ moduleFileSet, err := bufmodulebuild.NewModuleFileSetBuilder(
+ zap.NewNop(),
+ moduleReader,
+ ).Build(
+ ctx,
+ module,
+ )
+ if err != nil {
+ return err
+ }
+ var buildOptions []bufimagebuild.BuildOption
+ // we always need source code info if we are doing generation
+ if len(env.PluginNameToPluginInfo) == 0 && !env.IncludeSourceInfo {
+ buildOptions = append(buildOptions, bufimagebuild.WithExcludeSourceCodeInfo())
+ }
+ image, fileAnnotations, err := bufimagebuild.NewBuilder(container.Logger()).Build(
+ ctx,
+ moduleFileSet,
+ buildOptions...,
+ )
+ if err != nil {
+ return err
+ }
+ if len(fileAnnotations) > 0 {
+ if err := bufanalysis.PrintFileAnnotations(
+ container.Stderr(),
+ fileAnnotations,
+ env.ErrorFormat,
+ ); err != nil {
+ return err
+ }
+ // we do this even though we're in protoc compatibility mode as we just need to do non-zero
+ // but this also makes us consistent with the rest of buf
+ return bufcli.ErrFileAnnotation
+ }
+
+ if env.PrintFreeFieldNumbers {
+ fileInfos, err := module.TargetFileInfos(ctx)
+ if err != nil {
+ return err
+ }
+ var filePaths []string
+ for _, fileInfo := range fileInfos {
+ filePaths = append(filePaths, fileInfo.Path())
+ }
+ s, err := bufimageutil.FreeMessageRangeStrings(ctx, filePaths, image)
+ if err != nil {
+ return err
+ }
+ if _, err := container.Stdout().Write([]byte(strings.Join(s, "\n") + "\n")); err != nil {
+ return err
+ }
+ return nil
+ }
+ if len(env.PluginNameToPluginInfo) > 0 {
+ images := []bufimage.Image{image}
+ if env.ByDir {
+ _, span := trace.StartSpan(ctx, "image_by_dir")
+ images, err = bufimage.ImageByDir(image)
+ if err != nil {
+ return err
+ }
+ span.End()
+ }
+ pluginResponses := make([]*appproto.PluginResponse, 0, len(env.PluginNamesSortedByOutIndex))
+ for _, pluginName := range env.PluginNamesSortedByOutIndex {
+ pluginInfo, ok := env.PluginNameToPluginInfo[pluginName]
+ if !ok {
+ return fmt.Errorf("no value in PluginNamesToPluginInfo for %q", pluginName)
+ }
+ response, err := executePlugin(
+ ctx,
+ container.Logger(),
+ storageosProvider,
+ runner,
+ container,
+ images,
+ pluginName,
+ pluginInfo,
+ )
+ if err != nil {
+ return err
+ }
+ pluginResponses = append(pluginResponses, appproto.NewPluginResponse(response, pluginName, pluginInfo.Out))
+ }
+ if err := appproto.ValidatePluginResponses(pluginResponses); err != nil {
+ return err
+ }
+ responseWriter := appprotoos.NewResponseWriter(
+ container.Logger(),
+ storageosProvider,
+ )
+ for _, pluginResponse := range pluginResponses {
+ pluginInfo, ok := env.PluginNameToPluginInfo[pluginResponse.PluginName]
+ if !ok {
+ return fmt.Errorf("no value in PluginNamesToPluginInfo for %q", pluginResponse.PluginName)
+ }
+ if err := responseWriter.AddResponse(
+ ctx,
+ pluginResponse.Response,
+ pluginInfo.Out,
+ ); err != nil {
+ return err
+ }
+ }
+ if err := responseWriter.Close(); err != nil {
+ return err
+ }
+ return nil
+ }
+ if env.Output == "" {
+ return appcmd.NewInvalidArgumentErrorf("required flag %q not set", outputFlagName)
+ }
+ imageRef, err := buffetch.NewImageRefParser(container.Logger()).GetImageRef(ctx, env.Output)
+ if err != nil {
+ return fmt.Errorf("--%s: %v", outputFlagName, err)
+ }
+ return bufcli.NewWireImageWriter(container.Logger()).PutImage(ctx,
+ container,
+ imageRef,
+ image,
+ true,
+ !env.IncludeImports,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/usage.gen.go
new file mode 100644
index 000000000..f35921719
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/protoc/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package protoc
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokencreate/tokencreate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokencreate/tokencreate.go
new file mode 100644
index 000000000..d9c0803d9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokencreate/tokencreate.go
@@ -0,0 +1,123 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 tokencreate
+
+import (
+ "context"
+ "time"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/prototime"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+ "google.golang.org/protobuf/types/known/timestamppb"
+)
+
+const (
+ noteFlagName = "note"
+ timeToLiveFlagName = "ttl"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Create a new token for a user.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Note string
+ TimeToLive time.Duration
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Note,
+ noteFlagName,
+ "",
+ `A human-readable note that identifies the token.`,
+ )
+ _ = cobra.MarkFlagRequired(flagSet, noteFlagName)
+ flagSet.DurationVar(
+ &f.TimeToLive,
+ timeToLiveFlagName,
+ 24*30*time.Hour,
+ `How long the token should live. Set to 0 for no expiry.`,
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnAlphaCommand(ctx, container)
+ remote := container.Arg(0)
+ if err := bufmoduleref.ValidateRemoteNotEmpty(remote); err != nil {
+ return err
+ }
+ if err := bufmoduleref.ValidateRemoteHasNoPaths(remote); err != nil {
+ return err
+ }
+ var expireTime *timestamppb.Timestamp
+ var err error
+ if flags.TimeToLive != 0 {
+ expireTime, err = prototime.NewTimestamp(time.Now().Add(flags.TimeToLive))
+ if err != nil {
+ return err
+ }
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ tokenService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewTokenServiceClient)
+ resp, err := tokenService.CreateToken(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.CreateTokenRequest{
+ Note: flags.Note,
+ ExpireTime: expireTime,
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ _, err = container.Stdout().Write([]byte(resp.Msg.Token))
+ return err
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokencreate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokencreate/usage.gen.go
new file mode 100644
index 000000000..a5999c561
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokencreate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package tokencreate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokendelete/tokendelete.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokendelete/tokendelete.go
new file mode 100644
index 000000000..994e2d113
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokendelete/tokendelete.go
@@ -0,0 +1,117 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 tokendelete
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ forceFlagName = "force"
+ tokenIDFlagName = "token-id"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Delete a token by ID.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Force bool
+ TokenID string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.BoolVar(
+ &f.Force,
+ forceFlagName,
+ false,
+ "Force deletion without confirming. Use with caution.",
+ )
+ flagSet.StringVar(
+ &f.TokenID,
+ tokenIDFlagName,
+ "",
+ "The ID of the token to delete.",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, tokenIDFlagName)
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnAlphaCommand(ctx, container)
+ remote := container.Arg(0)
+ if err := bufmoduleref.ValidateRemoteNotEmpty(remote); err != nil {
+ return err
+ }
+ if err := bufmoduleref.ValidateRemoteHasNoPaths(remote); err != nil {
+ return err
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewTokenServiceClient)
+ if !flags.Force {
+ if err := bufcli.PromptUserForDelete(container, "token", flags.TokenID); err != nil {
+ return err
+ }
+ }
+ if _, err := service.DeleteToken(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DeleteTokenRequest{
+ TokenId: flags.TokenID,
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewTokenNotFoundError(flags.TokenID)
+ }
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokendelete/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokendelete/usage.gen.go
new file mode 100644
index 000000000..868dc9b8a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokendelete/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package tokendelete
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenget/tokenget.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenget/tokenget.go
new file mode 100644
index 000000000..b7e356daf
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenget/tokenget.go
@@ -0,0 +1,123 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 tokenget
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ formatFlagName = "format"
+ tokenIDFlagName = "token-id"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Get a token by ID.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Format string
+ TokenID string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+ flagSet.StringVar(
+ &f.TokenID,
+ tokenIDFlagName,
+ "",
+ "The ID of the token to get.",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, tokenIDFlagName)
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnAlphaCommand(ctx, container)
+ remote := container.Arg(0)
+ if err := bufmoduleref.ValidateRemoteNotEmpty(remote); err != nil {
+ return err
+ }
+ if err := bufmoduleref.ValidateRemoteHasNoPaths(remote); err != nil {
+ return err
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewTokenServiceClient)
+ resp, err := service.GetToken(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetTokenRequest{
+ TokenId: flags.TokenID,
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewTokenNotFoundError(flags.TokenID)
+ }
+ return err
+ }
+ printer, err := bufprint.NewTokenPrinter(container.Stdout(), format)
+ if err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ return printer.PrintTokens(ctx, resp.Msg.Token)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenget/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenget/usage.gen.go
new file mode 100644
index 000000000..ca6116e96
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenget/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package tokenget
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenlist/tokenlist.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenlist/tokenlist.go
new file mode 100644
index 000000000..a7a00f2a0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenlist/tokenlist.go
@@ -0,0 +1,136 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 tokenlist
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ pageSizeFlagName = "page-size"
+ pageTokenFlagName = "page-token"
+ reverseFlagName = "reverse"
+ formatFlagName = "format"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "List my tokens.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ PageSize uint32
+ PageToken string
+ Reverse bool
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.Uint32Var(&f.PageSize,
+ pageSizeFlagName,
+ 10,
+ `The page size.`,
+ )
+ flagSet.StringVar(&f.PageToken,
+ pageTokenFlagName,
+ "",
+ `The page token. If more results are available, a "next_page" key is present in the --format=json output.`,
+ )
+ flagSet.BoolVar(&f.Reverse,
+ reverseFlagName,
+ false,
+ `Reverse the results.`,
+ )
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) (retErr error) {
+ bufcli.WarnAlphaCommand(ctx, container)
+ remote := container.Arg(0)
+ if err := bufmoduleref.ValidateRemoteNotEmpty(remote); err != nil {
+ return err
+ }
+ if err := bufmoduleref.ValidateRemoteHasNoPaths(remote); err != nil {
+ return err
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewTokenServiceClient)
+ resp, err := service.ListTokens(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.ListTokensRequest{
+ PageSize: flags.PageSize,
+ PageToken: flags.PageToken,
+ Reverse: flags.Reverse,
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ printer, err := bufprint.NewTokenPrinter(container.Stdout(), format)
+ if err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ // TODO: flag docs say "next_token" field will be present in the output,
+ // for paging through results but we are actually ignoring that field now.
+ return printer.PrintTokens(ctx, resp.Msg.Tokens...)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenlist/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenlist/usage.gen.go
new file mode 100644
index 000000000..3a3fdbc57
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/alpha/registry/token/tokenlist/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package tokenlist
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/migratev1beta1/migratev1beta1.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/migratev1beta1/migratev1beta1.go
new file mode 100644
index 000000000..d64d76b35
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/migratev1beta1/migratev1beta1.go
@@ -0,0 +1,87 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 migratev1beta1
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/buf/bufmigrate"
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: `Migrate any v1beta1 configuration files in the directory to the latest version.`,
+ Long: `Defaults to the current directory if not specified.`,
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct{}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ dirPath, err := getDirPath(container)
+ if err != nil {
+ return err
+ }
+ return bufmigrate.NewV1Beta1Migrator(
+ "buf config migrate-v1beta1",
+ bufmigrate.V1Beta1MigratorWithNotifier(newWriteMessageFunc(container)),
+ ).Migrate(dirPath)
+}
+
+func getDirPath(container app.Container) (string, error) {
+ switch numArgs := container.NumArgs(); numArgs {
+ case 0:
+ return ".", nil
+ case 1:
+ return container.Arg(0), nil
+ default:
+ return "", appcmd.NewInvalidArgumentErrorf("only 1 argument allowed but %d arguments specified", numArgs)
+ }
+}
+
+func newWriteMessageFunc(container app.StderrContainer) func(string) error {
+ return func(message string) error {
+ _, err := container.Stderr().Write([]byte(message))
+ return err
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/migratev1beta1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/migratev1beta1/usage.gen.go
new file mode 100644
index 000000000..05a6adb68
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/migratev1beta1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package migratev1beta1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitget/commitget.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitget/commitget.go
new file mode 100644
index 000000000..235671844
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitget/commitget.go
@@ -0,0 +1,113 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 commitget
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const formatFlagName = "format"
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Get details about a commit.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleReference, err := bufmoduleref.ModuleReferenceForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleReference.Remote(),
+ registryv1alpha1connect.NewRepositoryCommitServiceClient,
+ )
+ resp, err := service.GetRepositoryCommitByReference(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetRepositoryCommitByReferenceRequest{
+ RepositoryOwner: moduleReference.Owner(),
+ RepositoryName: moduleReference.Repository(),
+ Reference: moduleReference.Reference(),
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewModuleReferenceNotFoundError(moduleReference)
+ }
+ return err
+ }
+ return bufprint.NewRepositoryCommitPrinter(container.Stdout()).
+ PrintRepositoryCommit(ctx, format, resp.Msg.RepositoryCommit)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitget/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitget/usage.gen.go
new file mode 100644
index 000000000..0ac2faf8b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitget/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package commitget
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitlist/commitlist.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitlist/commitlist.go
new file mode 100644
index 000000000..097585372
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitlist/commitlist.go
@@ -0,0 +1,145 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 commitlist
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ pageSizeFlagName = "page-size"
+ pageTokenFlagName = "page-token"
+ reverseFlagName = "reverse"
+ formatFlagName = "format"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "List commits.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Format string
+ PageSize uint32
+ PageToken string
+ Reverse bool
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.Uint32Var(&f.PageSize,
+ pageSizeFlagName,
+ 10,
+ `The page size.`,
+ )
+ flagSet.StringVar(&f.PageToken,
+ pageTokenFlagName,
+ "",
+ `The page token. If more results are available, a "next_page" key is present in the --format=json output.`,
+ )
+ flagSet.BoolVar(&f.Reverse,
+ reverseFlagName,
+ false,
+ `Reverse the results.`,
+ )
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleReference, err := bufmoduleref.ModuleReferenceForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleReference.Remote(),
+ registryv1alpha1connect.NewRepositoryCommitServiceClient,
+ )
+
+ reference := moduleReference.Reference()
+ if reference == "" {
+ reference = bufmoduleref.Main
+ }
+
+ resp, err := service.ListRepositoryCommitsByReference(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.ListRepositoryCommitsByReferenceRequest{
+ RepositoryOwner: moduleReference.Owner(),
+ RepositoryName: moduleReference.Repository(),
+ Reference: reference,
+ PageSize: flags.PageSize,
+ PageToken: flags.PageToken,
+ Reverse: flags.Reverse,
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewModuleReferenceNotFoundError(moduleReference)
+ }
+ return err
+ }
+ return bufprint.NewRepositoryCommitPrinter(container.Stdout()).
+ PrintRepositoryCommits(ctx, format, resp.Msg.NextPageToken, resp.Msg.RepositoryCommits...)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitlist/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitlist/usage.gen.go
new file mode 100644
index 000000000..8a5eafaec
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/commit/commitlist/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package commitlist
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftdelete/draftdelete.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftdelete/draftdelete.go
new file mode 100644
index 000000000..e621054bd
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftdelete/draftdelete.go
@@ -0,0 +1,124 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 draftdelete
+
+import (
+ "context"
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const forceFlagName = "force"
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Delete a draft of a BSR repository by name.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Force bool
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.BoolVar(
+ &f.Force,
+ forceFlagName,
+ false,
+ "Force deletion without confirming. Use with caution.",
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleReference, err := bufmoduleref.ModuleReferenceForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ if moduleReference.Reference() == bufmoduleref.Main {
+ // bufmoduleref.ModuleReferenceForString will give a default reference when user did not specify one
+ // we need to check the origin input and return different errors for different cases.
+ if strings.HasSuffix(container.Arg(0), ":"+bufmoduleref.Main) {
+ return appcmd.NewInvalidArgumentErrorf("%q is not a valid draft name", bufmoduleref.Main)
+ }
+ return appcmd.NewInvalidArgumentError("a valid draft name need to be specified")
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleReference.Remote(),
+ registryv1alpha1connect.NewRepositoryCommitServiceClient,
+ )
+ if !flags.Force {
+ if err := bufcli.PromptUserForDelete(
+ container,
+ "draft",
+ moduleReference.Reference(),
+ ); err != nil {
+ return err
+ }
+ }
+ if _, err := service.DeleteRepositoryDraftCommit(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DeleteRepositoryDraftCommitRequest{
+ RepositoryOwner: moduleReference.Owner(),
+ RepositoryName: moduleReference.Repository(),
+ DraftName: moduleReference.Reference(),
+ }),
+ ); err != nil {
+ // not explicitly handling error with connect.CodeNotFound as it can be repository not found or draft not found.
+ return err
+ }
+ if _, err := fmt.Fprintln(container.Stdout(), "Draft deleted."); err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftdelete/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftdelete/usage.gen.go
new file mode 100644
index 000000000..929393dfb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftdelete/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package draftdelete
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftlist/draftlist.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftlist/draftlist.go
new file mode 100644
index 000000000..d4f6b0a3d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftlist/draftlist.go
@@ -0,0 +1,134 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 draftlist
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ pageSizeFlagName = "page-size"
+ pageTokenFlagName = "page-token"
+ reverseFlagName = "reverse"
+ formatFlagName = "format"
+)
+
+// NewCommand returns a new Command
+func NewCommand(name string, builder appflag.Builder) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "List drafts for the specified repository.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ PageSize uint32
+ PageToken string
+ Reverse bool
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.Uint32Var(&f.PageSize,
+ pageSizeFlagName,
+ 10,
+ `The page size.`,
+ )
+ flagSet.StringVar(&f.PageToken,
+ pageTokenFlagName,
+ "",
+ `The page token. If more results are available, a "next_page" key is present in the --format=json output.`,
+ )
+ flagSet.BoolVar(&f.Reverse,
+ reverseFlagName,
+ false,
+ `Reverse the results.`,
+ )
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleIdentity.Remote(),
+ registryv1alpha1connect.NewRepositoryCommitServiceClient,
+ )
+ resp, err := service.ListRepositoryDraftCommits(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.ListRepositoryDraftCommitsRequest{
+ RepositoryOwner: moduleIdentity.Owner(),
+ RepositoryName: moduleIdentity.Repository(),
+ PageSize: flags.PageSize,
+ PageToken: flags.PageToken,
+ Reverse: flags.Reverse,
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewRepositoryNotFoundError(container.Arg(0))
+ }
+ return err
+ }
+ return bufprint.NewRepositoryDraftPrinter(container.Stdout()).
+ PrintRepositoryDrafts(ctx, format, resp.Msg.NextPageToken, resp.Msg.RepositoryCommits...)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftlist/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftlist/usage.gen.go
new file mode 100644
index 000000000..69fdff1bd
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/draft/draftlist/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package draftlist
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationcreate/organizationcreate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationcreate/organizationcreate.go
new file mode 100644
index 000000000..f7a1036a4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationcreate/organizationcreate.go
@@ -0,0 +1,113 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 organizationcreate
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const formatFlagName = "format"
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Create a new organization on the BSR.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleOwner, err := bufmoduleref.ModuleOwnerForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleOwner.Remote(),
+ registryv1alpha1connect.NewOrganizationServiceClient,
+ )
+ resp, err := service.CreateOrganization(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.CreateOrganizationRequest{
+ Name: moduleOwner.Owner(),
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeAlreadyExists {
+ return bufcli.NewOrganizationNameAlreadyExistsError(container.Arg(0))
+ }
+ return err
+ }
+ return bufprint.NewOrganizationPrinter(
+ moduleOwner.Remote(),
+ container.Stdout(),
+ ).PrintOrganization(ctx, format, resp.Msg.Organization)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationcreate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationcreate/usage.gen.go
new file mode 100644
index 000000000..b80fbccb5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationcreate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package organizationcreate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationdelete/organizationdelete.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationdelete/organizationdelete.go
new file mode 100644
index 000000000..3fe8ddf38
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationdelete/organizationdelete.go
@@ -0,0 +1,111 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 organizationdelete
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const forceFlagName = "force"
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Delete an organization by name on the BSR.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Force bool
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.BoolVar(
+ &f.Force,
+ forceFlagName,
+ false,
+ "Force deletion without confirming. Use with caution.",
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleOwner, err := bufmoduleref.ModuleOwnerForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleOwner.Remote(),
+ registryv1alpha1connect.NewOrganizationServiceClient,
+ )
+ if !flags.Force {
+ if err := bufcli.PromptUserForDelete(container, "organization", moduleOwner.Owner()); err != nil {
+ return err
+ }
+ }
+ if _, err := service.DeleteOrganizationByName(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DeleteOrganizationByNameRequest{
+ Name: moduleOwner.Owner(),
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewOrganizationNotFoundError(container.Arg(0))
+ }
+ return err
+ }
+ if _, err := fmt.Fprintln(container.Stdout(), "Organization deleted."); err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationdelete/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationdelete/usage.gen.go
new file mode 100644
index 000000000..b72838342
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationdelete/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package organizationdelete
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationget/organizationget.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationget/organizationget.go
new file mode 100644
index 000000000..fa1ed95df
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationget/organizationget.go
@@ -0,0 +1,113 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 organizationget
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const formatFlagName = "format"
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Get an organization on the BSR by name.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleOwner, err := bufmoduleref.ModuleOwnerForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleOwner.Remote(),
+ registryv1alpha1connect.NewOrganizationServiceClient,
+ )
+ resp, err := service.GetOrganizationByName(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetOrganizationByNameRequest{
+ Name: moduleOwner.Owner(),
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewOrganizationNotFoundError(container.Arg(0))
+ }
+ return err
+ }
+ return bufprint.NewOrganizationPrinter(
+ moduleOwner.Remote(),
+ container.Stdout(),
+ ).PrintOrganization(ctx, format, resp.Msg.Organization)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationget/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationget/usage.gen.go
new file mode 100644
index 000000000..76cd384f8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/organization/organizationget/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package organizationget
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugincreate/plugincreate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugincreate/plugincreate.go
new file mode 100644
index 000000000..bbd1ca9d0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugincreate/plugincreate.go
@@ -0,0 +1,141 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 plugincreate
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ visibilityFlagName = "visibility"
+ formatFlagName = "format"
+
+ publicVisibility = "public"
+ privateVisibility = "private"
+)
+
+var allVisibiltyStrings = []string{
+ publicVisibility,
+ privateVisibility,
+}
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Create a new Protobuf plugin.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Visibility string
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Visibility,
+ visibilityFlagName,
+ "",
+ fmt.Sprintf(`The plugin's visibility setting. Must be one of %s.`, stringutil.SliceToString(allVisibiltyStrings)),
+ )
+ _ = cobra.MarkFlagRequired(flagSet, visibilityFlagName)
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ pluginPath := container.Arg(0)
+ visibility, err := visibilityFlagToVisibility(flags.Visibility)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, owner, name, err := bufremoteplugin.ParsePluginPath(pluginPath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ resp, err := pluginService.CreatePlugin(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.CreatePluginRequest{
+ Owner: owner,
+ Name: name,
+ Visibility: visibility,
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ return bufprint.NewPluginPrinter(container.Stdout()).PrintPlugin(ctx, format, resp.Msg.Plugin)
+}
+
+// visibilityFlagToVisibility parses the given string as a registryv1alpha1.PluginVisibility.
+func visibilityFlagToVisibility(visibility string) (registryv1alpha1.PluginVisibility, error) {
+ switch visibility {
+ case publicVisibility:
+ return registryv1alpha1.PluginVisibility_PLUGIN_VISIBILITY_PUBLIC, nil
+ case privateVisibility:
+ return registryv1alpha1.PluginVisibility_PLUGIN_VISIBILITY_PRIVATE, nil
+ default:
+ return 0, fmt.Errorf("invalid visibility: %s, expected one of %s", visibility, stringutil.SliceToString(allVisibiltyStrings))
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugincreate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugincreate/usage.gen.go
new file mode 100644
index 000000000..d3b133269
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugincreate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package plugincreate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindelete/plugindelete.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindelete/plugindelete.go
new file mode 100644
index 000000000..9611c1eba
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindelete/plugindelete.go
@@ -0,0 +1,110 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 plugindelete
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ internal "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ forceFlagName = "force"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Delete a Protobuf plugin by name.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Force bool
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.BoolVar(
+ &f.Force,
+ forceFlagName,
+ false,
+ "Force deletion without confirming. Use with caution.",
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ pluginPath := container.Arg(0)
+ if pluginPath == "" {
+ return appcmd.NewInvalidArgumentError("you must specify a plugin path")
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, owner, name, err := internal.ParsePluginPath(pluginPath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ if !flags.Force {
+ if err := bufcli.PromptUserForDelete(container, "plugin", name); err != nil {
+ return err
+ }
+ }
+ if _, err := pluginService.DeletePlugin(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DeletePluginRequest{
+ Owner: owner,
+ Name: name,
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewPluginNotFoundError(owner, name)
+ }
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindelete/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindelete/usage.gen.go
new file mode 100644
index 000000000..0877c6576
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindelete/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package plugindelete
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindeprecate/plugindeprecate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindeprecate/plugindeprecate.go
new file mode 100644
index 000000000..49ce3a675
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindeprecate/plugindeprecate.go
@@ -0,0 +1,106 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 plugindeprecate
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ messageFlagName = "message"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Deprecate a plugin by name.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Message string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Message,
+ messageFlagName,
+ "",
+ `The message to display with deprecation warnings.`,
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ pluginPath := container.Arg(0)
+ if pluginPath == "" {
+ return appcmd.NewInvalidArgumentError("you must specify a plugin path")
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, owner, name, err := bufremoteplugin.ParsePluginPath(pluginPath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ if _, err := pluginService.DeprecatePlugin(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DeprecatePluginRequest{
+ Owner: owner,
+ Name: name,
+ Message: flags.Message,
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewPluginNotFoundError(owner, name)
+ }
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindeprecate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindeprecate/usage.gen.go
new file mode 100644
index 000000000..df0abb067
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/plugindeprecate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package plugindeprecate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginlist/pluginlist.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginlist/pluginlist.go
new file mode 100644
index 000000000..48161f5ff
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginlist/pluginlist.go
@@ -0,0 +1,131 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 pluginlist
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ pageSizeFlagName = "page-size"
+ pageTokenFlagName = "page-token"
+ reverseFlagName = "reverse"
+ formatFlagName = "format"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "List plugins on the specified remote.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ PageSize uint32
+ PageToken string
+ Reverse bool
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.Uint32Var(&f.PageSize,
+ pageSizeFlagName,
+ 10,
+ `The page size.`,
+ )
+ flagSet.StringVar(&f.PageToken,
+ pageTokenFlagName,
+ "",
+ `The page token. If more results are available, a "next_page" key is present in the --format=json output.`,
+ )
+ flagSet.BoolVar(&f.Reverse,
+ reverseFlagName,
+ false,
+ `Reverse the results.`,
+ )
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) (retErr error) {
+ bufcli.WarnBetaCommand(ctx, container)
+ remote := container.Arg(0)
+ if err := bufmoduleref.ValidateRemoteNotEmpty(remote); err != nil {
+ return err
+ }
+ if err := bufmoduleref.ValidateRemoteHasNoPaths(remote); err != nil {
+ return err
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ resp, err := pluginService.ListPlugins(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.ListPluginsRequest{
+ PageSize: flags.PageSize,
+ PageToken: flags.PageToken,
+ Reverse: flags.Reverse,
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ return bufprint.NewPluginPrinter(container.Stdout()).
+ PrintPlugins(ctx, format, resp.Msg.NextPageToken, resp.Msg.Plugins...)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginlist/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginlist/usage.gen.go
new file mode 100644
index 000000000..e36963e7d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginlist/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package pluginlist
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginundeprecate/pluginundeprecate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginundeprecate/pluginundeprecate.go
new file mode 100644
index 000000000..65fa669fc
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginundeprecate/pluginundeprecate.go
@@ -0,0 +1,75 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 pluginundeprecate
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Undeprecate a plugin by name.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(run, bufcli.NewErrorInterceptor()),
+ }
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ pluginPath := container.Arg(0)
+ if pluginPath == "" {
+ return appcmd.NewInvalidArgumentError("you must specify a plugin path")
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, owner, name, err := bufremoteplugin.ParsePluginPath(pluginPath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ if _, err := pluginService.UndeprecatePlugin(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.UndeprecatePluginRequest{
+ Owner: owner,
+ Name: name,
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewPluginNotFoundError(owner, name)
+ }
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginundeprecate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginundeprecate/usage.gen.go
new file mode 100644
index 000000000..3a42409b3
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginundeprecate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package pluginundeprecate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginversion/pluginversionlist/pluginversionlist.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginversion/pluginversionlist/pluginversionlist.go
new file mode 100644
index 000000000..e20d1a645
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginversion/pluginversionlist/pluginversionlist.go
@@ -0,0 +1,131 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 pluginversionlist
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ pageSizeFlagName = "page-size"
+ pageTokenFlagName = "page-token"
+ reverseFlagName = "reverse"
+ formatFlagName = "format"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "List versions for the specified plugin.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ PageSize uint32
+ PageToken string
+ Reverse bool
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.Uint32Var(&f.PageSize,
+ pageSizeFlagName,
+ 10,
+ `The page size.`,
+ )
+ flagSet.StringVar(&f.PageToken,
+ pageTokenFlagName,
+ "",
+ `The page token. If more results are available, a "next_page" key is present in the --format=json output.`,
+ )
+ flagSet.BoolVar(&f.Reverse,
+ reverseFlagName,
+ false,
+ `Reverse the results.`,
+ )
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) (retErr error) {
+ bufcli.WarnBetaCommand(ctx, container)
+ pluginPath := container.Arg(0)
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, owner, name, err := bufremoteplugin.ParsePluginPath(pluginPath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ resp, err := pluginService.ListPluginVersions(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.ListPluginVersionsRequest{
+ Owner: owner,
+ Name: name,
+ PageSize: flags.PageSize,
+ PageToken: flags.PageToken,
+ Reverse: flags.Reverse,
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ return bufprint.NewPluginVersionPrinter(container.Stdout()).
+ PrintPluginVersions(ctx, format, resp.Msg.NextPageToken, resp.Msg.PluginVersions...)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginversion/pluginversionlist/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginversion/pluginversionlist/usage.gen.go
new file mode 100644
index 000000000..94a28343e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/plugin/pluginversion/pluginversionlist/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package pluginversionlist
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorycreate/repositorycreate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorycreate/repositorycreate.go
new file mode 100644
index 000000000..27c5435a6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorycreate/repositorycreate.go
@@ -0,0 +1,126 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 repositorycreate
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ formatFlagName = "format"
+ visibilityFlagName = "visibility"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Create a new repository on the BSR.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Format string
+ Visibility string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindVisibility(flagSet, &f.Visibility, visibilityFlagName)
+ _ = cobra.MarkFlagRequired(flagSet, visibilityFlagName)
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s.`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ visibility, err := bufcli.VisibilityFlagToVisibility(flags.Visibility)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleIdentity.Remote(),
+ registryv1alpha1connect.NewRepositoryServiceClient,
+ )
+ resp, err := service.CreateRepositoryByFullName(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.CreateRepositoryByFullNameRequest{
+ FullName: moduleIdentity.Owner() + "/" + moduleIdentity.Repository(),
+ Visibility: visibility,
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeAlreadyExists {
+ return bufcli.NewRepositoryNameAlreadyExistsError(container.Arg(0))
+ }
+ return err
+ }
+ repository := resp.Msg.Repository
+ return bufprint.NewRepositoryPrinter(
+ clientConfig,
+ moduleIdentity.Remote(),
+ container.Stdout(),
+ ).PrintRepository(ctx, format, repository)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorycreate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorycreate/usage.gen.go
new file mode 100644
index 000000000..4abee9dbd
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorycreate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package repositorycreate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydelete/repositorydelete.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydelete/repositorydelete.go
new file mode 100644
index 000000000..3c3381d83
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydelete/repositorydelete.go
@@ -0,0 +1,111 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 repositorydelete
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const forceFlagName = "force"
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Delete a BSR repository by name.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Force bool
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.BoolVar(
+ &f.Force,
+ forceFlagName,
+ false,
+ "Force deletion without confirming. Use with caution.",
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleIdentity.Remote(),
+ registryv1alpha1connect.NewRepositoryServiceClient,
+ )
+ if !flags.Force {
+ if err := bufcli.PromptUserForDelete(container, "repository", moduleIdentity.Repository()); err != nil {
+ return err
+ }
+ }
+ if _, err := service.DeleteRepositoryByFullName(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DeleteRepositoryByFullNameRequest{
+ FullName: moduleIdentity.Owner() + "/" + moduleIdentity.Repository(),
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewRepositoryNotFoundError(container.Arg(0))
+ }
+ return err
+ }
+ if _, err := fmt.Fprintln(container.Stdout(), "Repository deleted."); err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydelete/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydelete/usage.gen.go
new file mode 100644
index 000000000..b52a88892
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydelete/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package repositorydelete
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydeprecate/repositorydeprecate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydeprecate/repositorydeprecate.go
new file mode 100644
index 000000000..120cdf482
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydeprecate/repositorydeprecate.go
@@ -0,0 +1,103 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 repositorydeprecate
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ messageFlagName = "message"
+)
+
+// NewCommand returns a new Command
+func NewCommand(name string, builder appflag.Builder) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Deprecate a repository on the BSR.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Message string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Message,
+ messageFlagName,
+ "",
+ `The message to display with deprecation warnings.`,
+ )
+}
+
+func run(ctx context.Context, container appflag.Container, flags *flags) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleIdentity.Remote(),
+ registryv1alpha1connect.NewRepositoryServiceClient,
+ )
+ if _, err := service.DeprecateRepositoryByName(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DeprecateRepositoryByNameRequest{
+ OwnerName: moduleIdentity.Owner(),
+ RepositoryName: moduleIdentity.Repository(),
+ DeprecationMessage: flags.Message,
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewRepositoryNotFoundError(container.Arg(0))
+ }
+ return err
+ }
+ if _, err := fmt.Fprintln(container.Stdout(), "Repository deprecated."); err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydeprecate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydeprecate/usage.gen.go
new file mode 100644
index 000000000..68500435c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorydeprecate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package repositorydeprecate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryget/repositoryget.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryget/repositoryget.go
new file mode 100644
index 000000000..398e07ce9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryget/repositoryget.go
@@ -0,0 +1,115 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 repositoryget
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const formatFlagName = "format"
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Get a BSR repository by name.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleIdentity.Remote(),
+ registryv1alpha1connect.NewRepositoryServiceClient,
+ )
+ resp, err := service.GetRepositoryByFullName(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetRepositoryByFullNameRequest{
+ FullName: moduleIdentity.Owner() + "/" + moduleIdentity.Repository(),
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewRepositoryNotFoundError(container.Arg(0))
+ }
+ return err
+ }
+ repository := resp.Msg.Repository
+ return bufprint.NewRepositoryPrinter(
+ clientConfig,
+ moduleIdentity.Remote(),
+ container.Stdout(),
+ ).PrintRepository(ctx, format, repository)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryget/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryget/usage.gen.go
new file mode 100644
index 000000000..774fccaca
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryget/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package repositoryget
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorylist/repositorylist.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorylist/repositorylist.go
new file mode 100644
index 000000000..53db55860
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorylist/repositorylist.go
@@ -0,0 +1,140 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 repositorylist
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ pageSizeFlagName = "page-size"
+ pageTokenFlagName = "page-token"
+ reverseFlagName = "reverse"
+ formatFlagName = "format"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "List BSR repositories.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ PageSize uint32
+ PageToken string
+ Reverse bool
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.Uint32Var(&f.PageSize,
+ pageSizeFlagName,
+ 10,
+ `The page size.`,
+ )
+ flagSet.StringVar(&f.PageToken,
+ pageTokenFlagName,
+ "",
+ `The page token. If more results are available, a "next_page" key is present in the --format=json output.`,
+ )
+ flagSet.BoolVar(&f.Reverse,
+ reverseFlagName,
+ false,
+ `Reverse the results.`,
+ )
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ remote := container.Arg(0)
+ if err := bufmoduleref.ValidateRemoteNotEmpty(remote); err != nil {
+ return err
+ }
+ if err := bufmoduleref.ValidateRemoteHasNoPaths(remote); err != nil {
+ return err
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ remote,
+ registryv1alpha1connect.NewRepositoryServiceClient,
+ )
+ resp, err := service.ListRepositories(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.ListRepositoriesRequest{
+ PageSize: flags.PageSize,
+ PageToken: flags.PageToken,
+ Reverse: flags.Reverse,
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ repositories, nextPageToken := resp.Msg.Repositories, resp.Msg.NextPageToken
+ return bufprint.NewRepositoryPrinter(
+ clientConfig,
+ remote,
+ container.Stdout(),
+ ).PrintRepositories(ctx, format, nextPageToken, repositories...)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorylist/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorylist/usage.gen.go
new file mode 100644
index 000000000..85a6565ca
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositorylist/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package repositorylist
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryundeprecate/repositoryundeprecate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryundeprecate/repositoryundeprecate.go
new file mode 100644
index 000000000..1ca966133
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryundeprecate/repositoryundeprecate.go
@@ -0,0 +1,73 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 repositoryundeprecate
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+)
+
+// NewCommand returns a new Command
+func NewCommand(name string, builder appflag.Builder) *appcmd.Command {
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Undeprecate a BSR repository.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(run, bufcli.NewErrorInterceptor()),
+ }
+}
+
+func run(ctx context.Context, container appflag.Container) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleIdentity.Remote(),
+ registryv1alpha1connect.NewRepositoryServiceClient,
+ )
+ if _, err := service.UndeprecateRepositoryByName(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.UndeprecateRepositoryByNameRequest{
+ OwnerName: moduleIdentity.Owner(),
+ RepositoryName: moduleIdentity.Repository(),
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewRepositoryNotFoundError(container.Arg(0))
+ }
+ return err
+ }
+ if _, err := fmt.Fprintln(container.Stdout(), "Repository undeprecated."); err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryundeprecate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryundeprecate/usage.gen.go
new file mode 100644
index 000000000..f72ae3192
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryundeprecate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package repositoryundeprecate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryupdate/repositoryupdate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryupdate/repositoryupdate.go
new file mode 100644
index 000000000..be8eed450
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryupdate/repositoryupdate.go
@@ -0,0 +1,108 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 repositoryupdate
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ visibilityFlagName = "visibility"
+)
+
+// NewCommand returns a new Command
+func NewCommand(name string, builder appflag.Builder) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Update a BSR repository settings.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+// TODO: add Description and Url field if it's desired to udpate them from the CLI
+type flags struct {
+ Visibility string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindVisibility(flagSet, &f.Visibility, visibilityFlagName)
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ visibility, err := bufcli.VisibilityFlagToVisibilityAllowUnspecified(flags.Visibility)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(
+ clientConfig,
+ moduleIdentity.Remote(),
+ registryv1alpha1connect.NewRepositoryServiceClient,
+ )
+ if _, err := service.UpdateRepositorySettingsByName(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.UpdateRepositorySettingsByNameRequest{
+ OwnerName: moduleIdentity.Owner(),
+ RepositoryName: moduleIdentity.Repository(),
+ Visibility: visibility,
+ // TODO: pass description and url
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewRepositoryNotFoundError(container.Arg(0))
+ }
+ return err
+ }
+ if _, err := fmt.Fprintln(container.Stdout(), "Settings Updated."); err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryupdate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryupdate/usage.gen.go
new file mode 100644
index 000000000..8a05eebcf
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/repository/repositoryupdate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package repositoryupdate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/tagcreate/tagcreate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/tagcreate/tagcreate.go
new file mode 100644
index 000000000..ce7133100
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/tagcreate/tagcreate.go
@@ -0,0 +1,138 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 tagcreate
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const formatFlagName = "format"
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Create a tag for the specified commit.",
+ Args: cobra.ExactArgs(2),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s.`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ moduleReference, err := bufmoduleref.ModuleReferenceForString(
+ container.Arg(0),
+ )
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ if !bufmoduleref.IsCommitModuleReference(moduleReference) {
+ return fmt.Errorf("commit is required, but a tag was given: %q", container.Arg(0))
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ repositoryService := connectclient.Make(
+ clientConfig,
+ moduleReference.Remote(),
+ registryv1alpha1connect.NewRepositoryServiceClient,
+ )
+ repositoryTagService := connectclient.Make(
+ clientConfig,
+ moduleReference.Remote(),
+ registryv1alpha1connect.NewRepositoryTagServiceClient,
+ )
+ resp, err := repositoryService.GetRepositoryByFullName(ctx,
+ connect.NewRequest(®istryv1alpha1.GetRepositoryByFullNameRequest{
+ FullName: moduleReference.Owner() + "/" + moduleReference.Repository(),
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewRepositoryNotFoundError(moduleReference.Remote() + "/" + moduleReference.Owner() + "/" + moduleReference.Repository())
+ }
+ return err
+ }
+ tag := container.Arg(1)
+ commit := moduleReference.Reference()
+ tagResp, err := repositoryTagService.CreateRepositoryTag(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.CreateRepositoryTagRequest{
+ RepositoryId: resp.Msg.Repository.Id,
+ Name: tag,
+ CommitName: commit,
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeAlreadyExists {
+ return bufcli.NewTagOrDraftNameAlreadyExistsError(tag)
+ }
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewModuleReferenceNotFoundError(moduleReference)
+ }
+ return err
+ }
+ return bufprint.NewRepositoryTagPrinter(container.Stdout()).PrintRepositoryTag(ctx, format, tagResp.Msg.RepositoryTag)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/tagcreate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/tagcreate/usage.gen.go
new file mode 100644
index 000000000..8c7031c57
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/tagcreate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package tagcreate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/taglist/taglist.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/taglist/taglist.go
new file mode 100644
index 000000000..da069d4cd
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/taglist/taglist.go
@@ -0,0 +1,148 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 taglist
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ pageSizeFlagName = "page-size"
+ pageTokenFlagName = "page-token"
+ reverseFlagName = "reverse"
+ formatFlagName = "format"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "List tags for the specified repository.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ PageSize uint32
+ PageToken string
+ Reverse bool
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.Uint32Var(&f.PageSize,
+ pageSizeFlagName,
+ 10,
+ `The page size.`,
+ )
+ flagSet.StringVar(&f.PageToken,
+ pageTokenFlagName,
+ "",
+ `The page token. If more results are available, a "next_page" key is present in the --format=json output.`,
+ )
+ flagSet.BoolVar(&f.Reverse,
+ reverseFlagName,
+ false,
+ `Reverse the results.`,
+ )
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ if container.Arg(0) == "" {
+ return appcmd.NewInvalidArgumentError("repository is required")
+ }
+ moduleIdentity, err := bufmoduleref.ModuleIdentityForString(container.Arg(0))
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ repositoryService := connectclient.Make(
+ clientConfig,
+ moduleIdentity.Remote(),
+ registryv1alpha1connect.NewRepositoryServiceClient,
+ )
+ resp, err := repositoryService.GetRepositoryByFullName(ctx,
+ connect.NewRequest(®istryv1alpha1.GetRepositoryByFullNameRequest{
+ FullName: moduleIdentity.Owner() + "/" + moduleIdentity.Repository(),
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewRepositoryNotFoundError(container.Arg(0))
+ }
+ return err
+ }
+ repositoryTagService := connectclient.Make(clientConfig, moduleIdentity.Remote(), registryv1alpha1connect.NewRepositoryTagServiceClient)
+ tagsResp, err := repositoryTagService.ListRepositoryTags(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.ListRepositoryTagsRequest{
+ RepositoryId: resp.Msg.Repository.Id,
+ PageSize: flags.PageSize,
+ PageToken: flags.PageToken,
+ Reverse: flags.Reverse,
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ return bufprint.NewRepositoryTagPrinter(container.Stdout()).PrintRepositoryTags(ctx, format, tagsResp.Msg.NextPageToken, tagsResp.Msg.RepositoryTags...)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/taglist/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/taglist/usage.gen.go
new file mode 100644
index 000000000..d210fe2b6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/tag/taglist/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package taglist
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatecreate/templatecreate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatecreate/templatecreate.go
new file mode 100644
index 000000000..f83107a5c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatecreate/templatecreate.go
@@ -0,0 +1,155 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 templatecreate
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ configFlagName = "config"
+ visibilityFlagName = "visibility"
+ formatFlagName = "format"
+
+ publicVisibility = "public"
+ privateVisibility = "private"
+)
+
+var allVisibiltyStrings = []string{
+ publicVisibility,
+ privateVisibility,
+}
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Create a new Buf template.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Config string
+ Visibility string
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Config,
+ configFlagName,
+ "",
+ `The template file or data to use for configuration. Must be in either YAML or JSON format.`,
+ )
+ _ = cobra.MarkFlagRequired(flagSet, configFlagName)
+ flagSet.StringVar(
+ &f.Visibility,
+ visibilityFlagName,
+ "",
+ fmt.Sprintf(`The template's visibility setting. Must be one of %s.`, stringutil.SliceToString(allVisibiltyStrings)),
+ )
+ _ = cobra.MarkFlagRequired(flagSet, visibilityFlagName)
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ templatePath := container.Arg(0)
+ visibility, err := visibilityFlagToVisibility(flags.Visibility)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ templateConfig, err := bufremoteplugin.ParseTemplateConfig(flags.Config)
+ if err != nil {
+ return err
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, owner, name, err := bufremoteplugin.ParseTemplatePath(templatePath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ resp, err := pluginService.CreateTemplate(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.CreateTemplateRequest{
+ Owner: owner,
+ Name: name,
+ Visibility: visibility,
+ PluginConfigs: bufremoteplugin.TemplateConfigToProtoPluginConfigs(templateConfig),
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ return bufprint.NewTemplatePrinter(container.Stdout()).PrintTemplate(ctx, format, resp.Msg.Template)
+}
+
+// visibilityFlagToVisibility parses the given string as a registryv1alpha1.PluginVisibility.
+func visibilityFlagToVisibility(visibility string) (registryv1alpha1.PluginVisibility, error) {
+ switch visibility {
+ case publicVisibility:
+ return registryv1alpha1.PluginVisibility_PLUGIN_VISIBILITY_PUBLIC, nil
+ case privateVisibility:
+ return registryv1alpha1.PluginVisibility_PLUGIN_VISIBILITY_PRIVATE, nil
+ default:
+ return 0, fmt.Errorf("invalid visibility: %s, expected one of %s", visibility, stringutil.SliceToString(allVisibiltyStrings))
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatecreate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatecreate/usage.gen.go
new file mode 100644
index 000000000..d5e229e27
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatecreate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package templatecreate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedelete/templatedelete.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedelete/templatedelete.go
new file mode 100644
index 000000000..a4556f4a8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedelete/templatedelete.go
@@ -0,0 +1,110 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 templatedelete
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ forceFlagName = "force"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Delete a template by name.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Force bool
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.BoolVar(
+ &f.Force,
+ forceFlagName,
+ false,
+ "Force deletion without confirming. Use with caution.",
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ templatePath := container.Arg(0)
+ if templatePath == "" {
+ return appcmd.NewInvalidArgumentError("you must specify a template path")
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, owner, name, err := bufremoteplugin.ParseTemplatePath(templatePath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ if !flags.Force {
+ if err := bufcli.PromptUserForDelete(container, "template", name); err != nil {
+ return err
+ }
+ }
+ if _, err := pluginService.DeleteTemplate(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DeleteTemplateRequest{
+ Owner: owner,
+ Name: name,
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewTemplateNotFoundError(owner, name)
+ }
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedelete/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedelete/usage.gen.go
new file mode 100644
index 000000000..737c9bb8a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedelete/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package templatedelete
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedeprecate/templatedeprecate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedeprecate/templatedeprecate.go
new file mode 100644
index 000000000..f7c073f4e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedeprecate/templatedeprecate.go
@@ -0,0 +1,106 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 templatedeprecate
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ messageFlagName = "message"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Deprecate a template by name.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Message string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Message,
+ messageFlagName,
+ "",
+ `The message to display with deprecation warnings.`,
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ templatePath := container.Arg(0)
+ if templatePath == "" {
+ return appcmd.NewInvalidArgumentError("you must specify a template path")
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, owner, name, err := bufremoteplugin.ParseTemplatePath(templatePath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ if _, err := pluginService.DeprecateTemplate(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DeprecateTemplateRequest{
+ Owner: owner,
+ Name: name,
+ Message: flags.Message,
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewTemplateNotFoundError(owner, name)
+ }
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedeprecate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedeprecate/usage.gen.go
new file mode 100644
index 000000000..797a113c6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatedeprecate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package templatedeprecate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatelist/templatelist.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatelist/templatelist.go
new file mode 100644
index 000000000..1f6882585
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatelist/templatelist.go
@@ -0,0 +1,131 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 templatelist
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ pageSizeFlagName = "page-size"
+ pageTokenFlagName = "page-token"
+ reverseFlagName = "reverse"
+ formatFlagName = "format"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "List templates on the specified remote.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ PageSize uint32
+ PageToken string
+ Reverse bool
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.Uint32Var(&f.PageSize,
+ pageSizeFlagName,
+ 10,
+ `The page size.`,
+ )
+ flagSet.StringVar(&f.PageToken,
+ pageTokenFlagName,
+ "",
+ `The page token. If more results are available, a "next_page" key is present in the --format=json output.`,
+ )
+ flagSet.BoolVar(&f.Reverse,
+ reverseFlagName,
+ false,
+ `Reverse the results.`,
+ )
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) (retErr error) {
+ bufcli.WarnBetaCommand(ctx, container)
+ remote := container.Arg(0)
+ if err := bufmoduleref.ValidateRemoteNotEmpty(remote); err != nil {
+ return err
+ }
+ if err := bufmoduleref.ValidateRemoteHasNoPaths(remote); err != nil {
+ return err
+ }
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ resp, err := pluginService.ListTemplates(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.ListTemplatesRequest{
+ PageSize: flags.PageSize,
+ PageToken: flags.PageToken,
+ Reverse: flags.Reverse,
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ return bufprint.NewTemplatePrinter(container.Stdout()).
+ PrintTemplates(ctx, format, resp.Msg.NextPageToken, resp.Msg.Templates...)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatelist/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatelist/usage.gen.go
new file mode 100644
index 000000000..b2f651844
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templatelist/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package templatelist
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateundeprecate/templateundeprecate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateundeprecate/templateundeprecate.go
new file mode 100644
index 000000000..e64f6b3ef
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateundeprecate/templateundeprecate.go
@@ -0,0 +1,75 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 templateundeprecate
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Undeprecate a template by name.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(run, bufcli.NewErrorInterceptor()),
+ }
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ templatePath := container.Arg(0)
+ if templatePath == "" {
+ return appcmd.NewInvalidArgumentError("you must specify a template path")
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, owner, name, err := bufremoteplugin.ParseTemplatePath(templatePath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ if _, err := pluginService.UndeprecateTemplate(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.UndeprecateTemplateRequest{
+ Owner: owner,
+ Name: name,
+ }),
+ ); err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ return bufcli.NewTemplateNotFoundError(owner, name)
+ }
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateundeprecate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateundeprecate/usage.gen.go
new file mode 100644
index 000000000..82a58b8bb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateundeprecate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package templateundeprecate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversioncreate/templateversioncreate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversioncreate/templateversioncreate.go
new file mode 100644
index 000000000..aa5d139b1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversioncreate/templateversioncreate.go
@@ -0,0 +1,131 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 templateversioncreate
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ configFlagName = "config"
+ nameFlagName = "name"
+ formatFlagName = "format"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Create a new template version.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Config string
+ Name string
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Config,
+ configFlagName,
+ "",
+ "The template file or data to use for configuration. Must be in either YAML or JSON format.",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, configFlagName)
+ flagSet.StringVar(
+ &f.Name,
+ nameFlagName,
+ "",
+ "The name of the new template version",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, nameFlagName)
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf("The output format to use. Must be one of %s", bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ templatePath := container.Arg(0)
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ templateVersionConfig, err := bufremoteplugin.ParseTemplateVersionConfig(flags.Config)
+ if err != nil {
+ return err
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, templateOwner, templateName, err := bufremoteplugin.ParseTemplatePath(templatePath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ resp, err := pluginService.CreateTemplateVersion(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.CreateTemplateVersionRequest{
+ Name: flags.Name,
+ TemplateOwner: templateOwner,
+ TemplateName: templateName,
+ PluginVersions: bufremoteplugin.TemplateVersionConfigToProtoPluginVersionMappings(templateVersionConfig),
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ return bufprint.NewTemplateVersionPrinter(container.Stdout()).
+ PrintTemplateVersion(ctx, format, resp.Msg.TemplateVersion)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversioncreate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversioncreate/usage.gen.go
new file mode 100644
index 000000000..52c60f6ca
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversioncreate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package templateversioncreate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversionlist/templateversionlist.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversionlist/templateversionlist.go
new file mode 100644
index 000000000..f65785e24
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversionlist/templateversionlist.go
@@ -0,0 +1,131 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 templateversionlist
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufprint"
+ "github.com/bufbuild/buf/private/bufpkg/bufremoteplugin"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ pageSizeFlagName = "page-size"
+ pageTokenFlagName = "page-token"
+ reverseFlagName = "reverse"
+ formatFlagName = "format"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "List versions for the specified template.",
+ Args: cobra.ExactArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ PageSize uint32
+ PageToken string
+ Reverse bool
+ Format string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.Uint32Var(&f.PageSize,
+ pageSizeFlagName,
+ 10,
+ `The page size.`,
+ )
+ flagSet.StringVar(&f.PageToken,
+ pageTokenFlagName,
+ "",
+ `The page token. If more results are available, a "next_page" key is present in the --format=json output.`,
+ )
+ flagSet.BoolVar(&f.Reverse,
+ reverseFlagName,
+ false,
+ `Reverse the results.`,
+ )
+ flagSet.StringVar(
+ &f.Format,
+ formatFlagName,
+ bufprint.FormatText.String(),
+ fmt.Sprintf(`The output format to use. Must be one of %s`, bufprint.AllFormatsString),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) (retErr error) {
+ bufcli.WarnBetaCommand(ctx, container)
+ templatePath := container.Arg(0)
+ format, err := bufprint.ParseFormat(flags.Format)
+ if err != nil {
+ return appcmd.NewInvalidArgumentError(err.Error())
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ remote, owner, name, err := bufremoteplugin.ParseTemplatePath(templatePath)
+ if err != nil {
+ return err
+ }
+ pluginService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewPluginServiceClient)
+ resp, err := pluginService.ListTemplateVersions(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.ListTemplateVersionsRequest{
+ Owner: owner,
+ Name: name,
+ PageSize: flags.PageSize,
+ PageToken: flags.PageToken,
+ Reverse: flags.Reverse,
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ return bufprint.NewTemplateVersionPrinter(container.Stdout()).
+ PrintTemplateVersions(ctx, format, resp.Msg.NextPageToken, resp.Msg.TemplateVersions...)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversionlist/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversionlist/usage.gen.go
new file mode 100644
index 000000000..38b42a970
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/template/templateversion/templateversionlist/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package templateversionlist
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookcreate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookcreate/usage.gen.go
new file mode 100644
index 000000000..b1660862d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookcreate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package webhookcreate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookcreate/webhookcreate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookcreate/webhookcreate.go
new file mode 100644
index 000000000..d54dd01ad
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookcreate/webhookcreate.go
@@ -0,0 +1,145 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 webhookcreate
+
+import (
+ "context"
+ "encoding/json"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ ownerFlagName = "owner"
+ repositoryFlagName = "repository"
+ callbackURLFlagName = "callback-url"
+ webhookEventFlagName = "event"
+ remoteFlagName = "remote"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name,
+ Short: "Create a repository webhook.",
+ Args: cobra.ExactArgs(0),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ WebhookEvent string
+ OwnerName string
+ RepositoryName string
+ CallbackURL string
+ Remote string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.WebhookEvent,
+ webhookEventFlagName,
+ "",
+ "The event type to create a webhook for. The proto enum string value is used for this input (e.g. 'WEBHOOK_EVENT_REPOSITORY_PUSH').",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, webhookEventFlagName)
+ flagSet.StringVar(
+ &f.OwnerName,
+ ownerFlagName,
+ "",
+ `The owner name of the repository to create a webhook for.`,
+ )
+ _ = cobra.MarkFlagRequired(flagSet, ownerFlagName)
+ flagSet.StringVar(
+ &f.RepositoryName,
+ repositoryFlagName,
+ "",
+ "The repository name to create a webhook for.",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, repositoryFlagName)
+ flagSet.StringVar(
+ &f.CallbackURL,
+ callbackURLFlagName,
+ "",
+ "The url for the webhook to callback to on a given event.",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, callbackURLFlagName)
+ flagSet.StringVar(
+ &f.Remote,
+ remoteFlagName,
+ "",
+ "The remote of the repository the created webhook will belong to.",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, remoteFlagName)
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(clientConfig, flags.Remote, registryv1alpha1connect.NewWebhookServiceClient)
+ event, ok := registryv1alpha1.WebhookEvent_value[flags.WebhookEvent]
+ if !ok || event == int32(registryv1alpha1.WebhookEvent_WEBHOOK_EVENT_UNSPECIFIED) {
+ return fmt.Errorf("webhook event must be specified")
+ }
+ resp, err := service.CreateWebhook(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.CreateWebhookRequest{
+ WebhookEvent: registryv1alpha1.WebhookEvent(event),
+ OwnerName: flags.OwnerName,
+ RepositoryName: flags.RepositoryName,
+ CallbackUrl: flags.CallbackURL,
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ webhookJSON, err := json.MarshalIndent(resp.Msg.Webhook, "", "\t")
+ if err != nil {
+ return err
+ }
+ // Ignore errors for writing to stdout.
+ _, _ = container.Stdout().Write(webhookJSON)
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookdelete/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookdelete/usage.gen.go
new file mode 100644
index 000000000..ff7caf336
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookdelete/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package webhookdelete
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookdelete/webhookdelete.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookdelete/webhookdelete.go
new file mode 100644
index 000000000..56163ad8c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhookdelete/webhookdelete.go
@@ -0,0 +1,102 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 webhookdelete
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ webhookIDFlagName = "id"
+ remoteFlagName = "remote"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name,
+ Short: "Delete a repository webhook.",
+ Args: cobra.ExactArgs(0),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ WebhookID string
+ Remote string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.WebhookID,
+ webhookIDFlagName,
+ "",
+ "The webhook ID to delete.",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, webhookIDFlagName)
+ flagSet.StringVar(
+ &f.Remote,
+ remoteFlagName,
+ "",
+ "The remote of the repository the webhook ID belongs to.",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, remoteFlagName)
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(clientConfig, flags.Remote, registryv1alpha1connect.NewWebhookServiceClient)
+ if _, err := service.DeleteWebhook(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DeleteWebhookRequest{
+ WebhookId: flags.WebhookID,
+ }),
+ ); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhooklist/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhooklist/usage.gen.go
new file mode 100644
index 000000000..1855056e2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhooklist/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package webhooklist
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhooklist/webhooklist.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhooklist/webhooklist.go
new file mode 100644
index 000000000..bfd0b4927
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/registry/webhook/webhooklist/webhooklist.go
@@ -0,0 +1,127 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 webhooklist
+
+import (
+ "context"
+ "encoding/json"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ ownerFlagName = "owner"
+ repositoryFlagName = "repository"
+ remoteFlagName = "remote"
+)
+
+// NewCommand returns a new Command
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name,
+ Short: "List repository webhooks.",
+ Args: cobra.ExactArgs(0),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ OwnerName string
+ RepositoryName string
+ Remote string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.OwnerName,
+ ownerFlagName,
+ "",
+ `The owner name of the repository to list webhooks for.`,
+ )
+ _ = cobra.MarkFlagRequired(flagSet, ownerFlagName)
+ flagSet.StringVar(
+ &f.RepositoryName,
+ repositoryFlagName,
+ "",
+ "The repository name to list webhooks for.",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, repositoryFlagName)
+ flagSet.StringVar(
+ &f.Remote,
+ remoteFlagName,
+ "",
+ "The remote of the owner and repository to list webhooks for.",
+ )
+ _ = cobra.MarkFlagRequired(flagSet, remoteFlagName)
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ bufcli.WarnBetaCommand(ctx, container)
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(clientConfig, flags.Remote, registryv1alpha1connect.NewWebhookServiceClient)
+ resp, err := service.ListWebhooks(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.ListWebhooksRequest{
+ RepositoryName: flags.RepositoryName,
+ OwnerName: flags.OwnerName,
+ // TODO: this should probably be in a loop so we can get page token from
+ // response and query for the next page
+ }),
+ )
+ if err != nil {
+ return err
+ }
+ if resp.Msg.Webhooks == nil {
+ // Ignore errors for writing to stdout.
+ _, _ = container.Stdout().Write([]byte("[]"))
+ return nil
+ }
+ webhooksJSON, err := json.MarshalIndent(resp.Msg.Webhooks, "", "\t")
+ if err != nil {
+ return err
+ }
+ // Ignore errors for writing to stdout.
+ _, _ = container.Stdout().Write(webhooksJSON)
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/studioagent/studioagent.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/studioagent/studioagent.go
new file mode 100644
index 000000000..c7e94e82b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/studioagent/studioagent.go
@@ -0,0 +1,214 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 studioagent
+
+import (
+ "context"
+ "crypto/tls"
+ "fmt"
+ "net"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufstudioagent"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/cert/certclient"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/bufbuild/buf/private/pkg/transport/http/httpserver"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ bindFlagName = "bind"
+ portFlagName = "port"
+ originFlagName = "origin"
+ disallowedHeadersFlagName = "disallowed-header"
+ forwardHeadersFlagName = "forward-header"
+ caCertFlagName = "ca-cert"
+ clientCertFlagName = "client-cert"
+ clientKeyFlagName = "client-key"
+ serverCertFlagName = "server-cert"
+ serverKeyFlagName = "server-key"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name,
+ Short: "Run an HTTP(S) server as the Studio agent.",
+ Args: cobra.ExactArgs(0),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ BindAddress string
+ Port string
+ Origin string
+ DisallowedHeaders []string
+ ForwardHeaders map[string]string
+ CACert string
+ ClientCert string
+ ClientKey string
+ ServerCert string
+ ServerKey string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.BindAddress,
+ bindFlagName,
+ "127.0.0.1",
+ "The address to be exposed to accept HTTP requests.",
+ )
+ flagSet.StringVar(
+ &f.Port,
+ portFlagName,
+ "8080",
+ "The port to be exposed to accept HTTP requests.",
+ )
+ flagSet.StringVar(
+ &f.Origin,
+ originFlagName,
+ "https://studio.buf.build",
+ "The allowed origin for CORS options.",
+ )
+ flagSet.StringSliceVar(
+ &f.DisallowedHeaders,
+ disallowedHeadersFlagName,
+ nil,
+ `The header names that are disallowed by this agent. When the agent receives an enveloped request with these headers set, it will return an error rather than forward the request to the target server. Multiple headers are appended if specified multiple times.`,
+ )
+ flagSet.StringToStringVar(
+ &f.ForwardHeaders,
+ forwardHeadersFlagName,
+ nil,
+ `The headers to be forwarded via the agent to the target server. Must be an equals sign separated key-value pair (like --forward-header=fromHeader1=toHeader1). Multiple header pairs are appended if specified multiple times.`,
+ )
+ flagSet.StringVar(
+ &f.CACert,
+ caCertFlagName,
+ "",
+ "The CA cert to be used in the client and server TLS configuration.",
+ )
+ flagSet.StringVar(
+ &f.ClientCert,
+ clientCertFlagName,
+ "",
+ "The cert to be used in the client TLS configuration.",
+ )
+ flagSet.StringVar(
+ &f.ClientKey,
+ clientKeyFlagName,
+ "",
+ "The key to be used in the client TLS configuration.",
+ )
+ flagSet.StringVar(
+ &f.ServerCert,
+ serverCertFlagName,
+ "",
+ "The cert to be used in the server TLS configuration.",
+ )
+ flagSet.StringVar(
+ &f.ServerKey,
+ serverKeyFlagName,
+ "",
+ "The key to be used in the server TLS configuration.",
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ // CA cert pool is optional. If it is nil, TLS uses the host's root CA set.
+ var rootCAConfig *tls.Config
+ var err error
+ if flags.CACert != "" {
+ rootCAConfig, err = certclient.NewClientTLSConfigFromRootCertFiles(flags.CACert)
+ if err != nil {
+ return err
+ }
+ }
+ // client TLS config is optional. If it is nil, it uses the default configuration from http2.Transport.
+ var clientTLSConfig *tls.Config
+ if flags.ClientCert != "" || flags.ClientKey != "" {
+ clientTLSConfig, err = newTLSConfig(rootCAConfig, flags.ClientCert, flags.ClientKey)
+ if err != nil {
+ return fmt.Errorf("cannot create new client TLS config: %w", err)
+ }
+ }
+ // server TLS config is optional. If it is nil, we serve with a h2c handler.
+ var serverTLSConfig *tls.Config
+ if flags.ServerCert != "" || flags.ServerKey != "" {
+ serverTLSConfig, err = newTLSConfig(rootCAConfig, flags.ServerCert, flags.ServerKey)
+ if err != nil {
+ return fmt.Errorf("cannot create new server TLS config: %w", err)
+ }
+ }
+ mux := bufstudioagent.NewHandler(
+ container.Logger(),
+ flags.Origin,
+ clientTLSConfig,
+ stringutil.SliceToMap(flags.DisallowedHeaders),
+ flags.ForwardHeaders,
+ )
+ var httpListenConfig net.ListenConfig
+ httpListener, err := httpListenConfig.Listen(ctx, "tcp", fmt.Sprintf("%s:%s", flags.BindAddress, flags.Port))
+ if err != nil {
+ return err
+ }
+
+ return httpserver.Run(
+ ctx,
+ container.Logger(),
+ httpListener,
+ mux,
+ httpserver.RunWithTLSConfig(
+ serverTLSConfig,
+ ),
+ )
+}
+
+func newTLSConfig(baseConfig *tls.Config, certFile, keyFile string) (*tls.Config, error) {
+ config := baseConfig.Clone()
+ if config == nil {
+ config = &tls.Config{
+ MinVersion: tls.VersionTLS12,
+ }
+ }
+ cert, err := tls.LoadX509KeyPair(certFile, keyFile)
+ if err != nil {
+ return nil, fmt.Errorf("error creating x509 keypair from cert file %s and key file %s", certFile, keyFile)
+ }
+ config.Certificates = []tls.Certificate{cert}
+ return config, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/studioagent/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/studioagent/usage.gen.go
new file mode 100644
index 000000000..a225cdc09
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/beta/studioagent/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package studioagent
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/breaking/breaking.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/breaking/breaking.go
new file mode 100644
index 000000000..8df1c12ec
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/breaking/breaking.go
@@ -0,0 +1,307 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 breaking
+
+import (
+ "context"
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/buf/bufwire"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ errorFormatFlagName = "error-format"
+ excludeImportsFlagName = "exclude-imports"
+ pathsFlagName = "path"
+ limitToInputFilesFlagName = "limit-to-input-files"
+ configFlagName = "config"
+ againstFlagName = "against"
+ againstConfigFlagName = "against-config"
+ excludePathsFlagName = "exclude-path"
+ disableSymlinksFlagName = "disable-symlinks"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " --against ",
+ Short: "Verify that the input location has no breaking changes compared to the against location.",
+ Long: bufcli.GetInputLong(`the source, module, or image to check for breaking changes`),
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ ErrorFormat string
+ ExcludeImports bool
+ LimitToInputFiles bool
+ Paths []string
+ Config string
+ Against string
+ AgainstConfig string
+ ExcludePaths []string
+ DisableSymlinks bool
+ // special
+ InputHashtag string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindPaths(flagSet, &f.Paths, pathsFlagName)
+ bufcli.BindInputHashtag(flagSet, &f.InputHashtag)
+ bufcli.BindExcludePaths(flagSet, &f.ExcludePaths, excludePathsFlagName)
+ bufcli.BindDisableSymlinks(flagSet, &f.DisableSymlinks, disableSymlinksFlagName)
+ flagSet.StringVar(
+ &f.ErrorFormat,
+ errorFormatFlagName,
+ "text",
+ fmt.Sprintf(
+ "The format for build errors or check violations printed to stdout. Must be one of %s.",
+ stringutil.SliceToString(bufanalysis.AllFormatStrings),
+ ),
+ )
+ flagSet.BoolVar(
+ &f.ExcludeImports,
+ excludeImportsFlagName,
+ false,
+ "Exclude imports from breaking change detection.",
+ )
+ flagSet.BoolVar(
+ &f.LimitToInputFiles,
+ limitToInputFilesFlagName,
+ false,
+ fmt.Sprintf(
+ `Only run breaking checks against the files in the input.
+When set, the against input contains only the files in the input.
+Overrides --%s.`,
+ pathsFlagName,
+ ),
+ )
+ flagSet.StringVar(
+ &f.Config,
+ configFlagName,
+ "",
+ `The file or data to use for configuration.`,
+ )
+ flagSet.StringVar(
+ &f.Against,
+ againstFlagName,
+ "",
+ fmt.Sprintf(
+ `Required. The source, module, or image to check against. Must be one of format %s.`,
+ buffetch.AllFormatsString,
+ ),
+ )
+ flagSet.StringVar(
+ &f.AgainstConfig,
+ againstConfigFlagName,
+ "",
+ `The file or data to use to configure the against source, module, or image.`,
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ if flags.Against == "" {
+ return appcmd.NewInvalidArgumentErrorf("required flag %q not set", againstFlagName)
+ }
+ if err := bufcli.ValidateErrorFormatFlag(flags.ErrorFormat, errorFormatFlagName); err != nil {
+ return err
+ }
+ input, err := bufcli.GetInputValue(container, flags.InputHashtag, ".")
+ if err != nil {
+ return err
+ }
+ ref, err := buffetch.NewRefParser(container.Logger(), buffetch.RefParserWithProtoFileRefAllowed()).GetRef(ctx, input)
+ if err != nil {
+ return err
+ }
+ storageosProvider := bufcli.NewStorageosProvider(flags.DisableSymlinks)
+ runner := command.NewRunner()
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ imageConfigReader, err := bufcli.NewWireImageConfigReader(
+ container,
+ storageosProvider,
+ runner,
+ clientConfig,
+ )
+ if err != nil {
+ return err
+ }
+ imageConfigs, fileAnnotations, err := imageConfigReader.GetImageConfigs(
+ ctx,
+ container,
+ ref,
+ flags.Config,
+ flags.Paths, // we filter checks for files
+ flags.ExcludePaths, // we exclude these paths
+ false, // files specified must exist on the main input
+ false, // we must include source info for this side of the check
+ )
+ if err != nil {
+ return err
+ }
+ if len(fileAnnotations) > 0 {
+ if err := bufanalysis.PrintFileAnnotations(
+ container.Stdout(),
+ fileAnnotations,
+ flags.ErrorFormat,
+ ); err != nil {
+ return err
+ }
+ return errors.New("")
+ }
+ // TODO: this doesn't actually work because we're using the same file paths for both sides
+ // if the roots change, then we're torched
+ externalPaths := flags.Paths
+ if flags.LimitToInputFiles {
+ externalPaths, err = getExternalPathsForImages(imageConfigs, flags.ExcludeImports)
+ if err != nil {
+ return err
+ }
+ }
+ againstRef, err := buffetch.NewRefParser(container.Logger(), buffetch.RefParserWithProtoFileRefAllowed()).GetRef(ctx, flags.Against)
+ if err != nil {
+ return err
+ }
+ againstImageConfigs, fileAnnotations, err := imageConfigReader.GetImageConfigs(
+ ctx,
+ container,
+ againstRef,
+ flags.AgainstConfig,
+ externalPaths, // we filter checks for files
+ flags.ExcludePaths, // we exclude these paths
+ true, // files are allowed to not exist on the against input
+ true, // no need to include source info for against
+ )
+ if err != nil {
+ return err
+ }
+ if len(fileAnnotations) > 0 {
+ if err := bufanalysis.PrintFileAnnotations(
+ container.Stdout(),
+ fileAnnotations,
+ flags.ErrorFormat,
+ ); err != nil {
+ return err
+ }
+ return bufcli.ErrFileAnnotation
+ }
+ if len(imageConfigs) != len(againstImageConfigs) {
+ // If workspaces are being used as input, the number
+ // of images MUST match. Otherwise the results will
+ // be meaningless and yield false positives.
+ //
+ // And similar to the note above, if the roots change,
+ // we're torched.
+ return fmt.Errorf("input contained %d images, whereas against contained %d images", len(imageConfigs), len(againstImageConfigs))
+ }
+ var allFileAnnotations []bufanalysis.FileAnnotation
+ for i, imageConfig := range imageConfigs {
+ fileAnnotations, err := breakingForImage(
+ ctx,
+ container,
+ imageConfig,
+ againstImageConfigs[i],
+ flags.ExcludeImports,
+ flags.ErrorFormat,
+ )
+ if err != nil {
+ return err
+ }
+ allFileAnnotations = append(allFileAnnotations, fileAnnotations...)
+ }
+ if len(allFileAnnotations) > 0 {
+ if err := bufanalysis.PrintFileAnnotations(
+ container.Stdout(),
+ bufanalysis.DeduplicateAndSortFileAnnotations(allFileAnnotations),
+ flags.ErrorFormat,
+ ); err != nil {
+ return err
+ }
+ return bufcli.ErrFileAnnotation
+ }
+ return nil
+}
+
+func breakingForImage(
+ ctx context.Context,
+ container appflag.Container,
+ imageConfig bufwire.ImageConfig,
+ againstImageConfig bufwire.ImageConfig,
+ excludeImports bool,
+ errorFormat string,
+) ([]bufanalysis.FileAnnotation, error) {
+ image := imageConfig.Image()
+ if excludeImports {
+ image = bufimage.ImageWithoutImports(image)
+ }
+ againstImage := againstImageConfig.Image()
+ if excludeImports {
+ againstImage = bufimage.ImageWithoutImports(againstImage)
+ }
+ return bufbreaking.NewHandler(container.Logger()).Check(
+ ctx,
+ imageConfig.Config().Breaking,
+ againstImage,
+ image,
+ )
+}
+
+func getExternalPathsForImages(imageConfigs []bufwire.ImageConfig, excludeImports bool) ([]string, error) {
+ externalPaths := make(map[string]struct{})
+ for _, imageConfig := range imageConfigs {
+ image := imageConfig.Image()
+ if excludeImports {
+ image = bufimage.ImageWithoutImports(image)
+ }
+ for _, imageFile := range image.Files() {
+ externalPaths[imageFile.ExternalPath()] = struct{}{}
+ }
+ }
+ return stringutil.MapToSlice(externalPaths), nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/breaking/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/breaking/usage.gen.go
new file mode 100644
index 000000000..c2272a789
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/breaking/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package breaking
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/convert/convert.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/convert/convert.go
new file mode 100644
index 000000000..8cd34e73d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/convert/convert.go
@@ -0,0 +1,241 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 convert
+
+import (
+ "context"
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/bufconvert"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil"
+ "github.com/bufbuild/buf/private/gen/data/datawkt"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ errorFormatFlagName = "error-format"
+ typeFlagName = "type"
+ fromFlagName = "from"
+ outputFlagName = "to"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Convert a message from binary to JSON or vice versa",
+ Long: `
+Use an input proto to interpret a proto/json message and convert it to a different format.
+
+The simplest form is:
+
+$ buf convert --type= --from= --to=
+
+ is the same input as any other buf command.
+It can be a local .proto file, binary output of "buf build", bsr module or local buf module.
+e.g.
+$ buf convert example.proto --type=Foo.proto --from=payload.json --to=output.bin
+
+# Other examples
+
+# All of , "--from" and "to" accept formatting options
+
+$ buf convert example.proto#format=bin --type=buf.Foo --from=payload#format=json --to=out#format=json
+
+# Both and "--from" accept stdin redirecting
+
+$ buf convert <(buf build -o -)#format=bin --type=foo.Bar --from=<(echo "{\"one\":\"55\"}")#format=json
+
+# Redirect from stdin to --from
+
+$ echo "{\"one\":\"55\"}" | buf convert buf.proto --type buf.Foo --from -#format=json
+
+# Redirect from stdin to
+
+$ buf build -o - | buf convert -#format=bin --type buf.Foo --from=payload.json
+
+# Use a module on the bsr
+
+buf convert buf.build// --type buf.Foo --from=payload.json
+`,
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ ErrorFormat string
+ Type string
+ From string
+ To string
+
+ // special
+ InputHashtag string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindInputHashtag(flagSet, &f.InputHashtag)
+ flagSet.StringVar(
+ &f.ErrorFormat,
+ errorFormatFlagName,
+ "text",
+ fmt.Sprintf(
+ "The format for build errors printed to stderr. Must be one of %s.",
+ stringutil.SliceToString(bufanalysis.AllFormatStrings),
+ ),
+ )
+ flagSet.StringVar(
+ &f.Type,
+ typeFlagName,
+ "",
+ `The full type name of the message within the input (e.g. acme.weather.v1.Units)`,
+ )
+ flagSet.StringVar(
+ &f.From,
+ fromFlagName,
+ "-",
+ fmt.Sprintf(
+ `The location of the payload to be converted. Supported formats are %s.`,
+ bufconvert.MessageEncodingFormatsString,
+ ),
+ )
+ flagSet.StringVar(
+ &f.To,
+ outputFlagName,
+ "-",
+ fmt.Sprintf(
+ `The output location of the conversion. Supported formats are %s.`,
+ bufconvert.MessageEncodingFormatsString,
+ ),
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ if err := bufcli.ValidateErrorFormatFlag(flags.ErrorFormat, errorFormatFlagName); err != nil {
+ return err
+ }
+ input, err := bufcli.GetInputValue(container, flags.InputHashtag, ".")
+ if err != nil {
+ return err
+ }
+ image, inputErr := bufcli.NewImageForSource(
+ ctx,
+ container,
+ input,
+ flags.ErrorFormat,
+ false, // disableSymlinks
+ "", // configOverride
+ nil, // externalDirOrFilePaths
+ nil, // externalExcludeDirOrFilePaths
+ false, // externalDirOrFilePathsAllowNotExist
+ false, // excludeSourceCodeInfo
+ )
+ var resolveWellKnownType bool
+ // only resolve wkts if input was not set.
+ if container.NumArgs() == 0 {
+ if inputErr != nil {
+ resolveWellKnownType = true
+ }
+ if image != nil {
+ _, filterErr := bufimageutil.ImageFilteredByTypes(image, flags.Type)
+ if errors.Is(filterErr, bufimageutil.ErrImageFilterTypeNotFound) {
+ resolveWellKnownType = true
+ }
+ }
+ }
+ if resolveWellKnownType {
+ if _, ok := datawkt.MessageFilePath(flags.Type); ok {
+ var wktErr error
+ image, wktErr = bufcli.WellKnownTypeImage(ctx, container.Logger(), flags.Type)
+ if wktErr != nil {
+ return wktErr
+ }
+ }
+ }
+ if inputErr != nil && image == nil {
+ return inputErr
+ }
+ fromMessageRef, err := bufconvert.NewMessageEncodingRef(ctx, flags.From, bufconvert.MessageEncodingBin)
+ if err != nil {
+ return fmt.Errorf("--%s: %v", outputFlagName, err)
+ }
+ message, err := bufcli.NewWireProtoEncodingReader(
+ container.Logger(),
+ ).GetMessage(
+ ctx,
+ container,
+ image,
+ flags.Type,
+ fromMessageRef,
+ )
+ if err != nil {
+ return err
+ }
+ defaultToEncoding, err := inverseEncoding(fromMessageRef.MessageEncoding())
+ if err != nil {
+ return err
+ }
+ outputMessageRef, err := bufconvert.NewMessageEncodingRef(ctx, flags.To, defaultToEncoding)
+ if err != nil {
+ return fmt.Errorf("--%s: %v", outputFlagName, err)
+ }
+ return bufcli.NewWireProtoEncodingWriter(
+ container.Logger(),
+ ).PutMessage(
+ ctx,
+ container,
+ image,
+ message,
+ outputMessageRef,
+ )
+}
+
+// inverseEncoding returns the opposite encoding of the provided encoding,
+// which will be the default output encoding for a given payload encoding.
+func inverseEncoding(encoding bufconvert.MessageEncoding) (bufconvert.MessageEncoding, error) {
+ switch encoding {
+ case bufconvert.MessageEncodingBin:
+ return bufconvert.MessageEncodingJSON, nil
+ case bufconvert.MessageEncodingJSON:
+ return bufconvert.MessageEncodingBin, nil
+ default:
+ return 0, fmt.Errorf("unknown message encoding %v", encoding)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/convert/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/convert/usage.gen.go
new file mode 100644
index 000000000..e1f2ace04
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/convert/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package convert
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/export/export.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/export/export.go
new file mode 100644
index 000000000..0491ff89c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/export/export.go
@@ -0,0 +1,378 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 export
+
+import (
+ "context"
+ "errors"
+ "os"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+ "go.uber.org/multierr"
+)
+
+const (
+ excludeImportsFlagName = "exclude-imports"
+ pathsFlagName = "path"
+ outputFlagName = "output"
+ outputFlagShortName = "o"
+ configFlagName = "config"
+ excludePathsFlagName = "exclude-path"
+ disableSymlinksFlagName = "disable-symlinks"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Export the files from the input location to an output location.",
+ Long: bufcli.GetInputLong(`the source or module to export`) + `
+
+Examples:
+
+$ buf export --output=
+
+input can be of the format [dir,git,mod,protofile,tar,targz,zip].
+
+output will be a directory with all of the .proto files in the .
+
+# Export current directory to another local directory.
+$ buf export . --output=
+
+# Export the latest remote module to a local directory.
+$ buf export buf.build// --output=
+
+# Export a specific version of a remote module to a local directory.
+$ buf export buf.build//: --output=
+
+# Export a git repo to a local directory.
+$ buf export https:////.git --output=
+
+`,
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ ExcludeImports bool
+ Paths []string
+ Output string
+ Config string
+ ExcludePaths []string
+ DisableSymlinks bool
+
+ // special
+ InputHashtag string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindDisableSymlinks(flagSet, &f.DisableSymlinks, disableSymlinksFlagName)
+ bufcli.BindInputHashtag(flagSet, &f.InputHashtag)
+ bufcli.BindExcludeImports(flagSet, &f.ExcludeImports, excludeImportsFlagName)
+ bufcli.BindPaths(flagSet, &f.Paths, pathsFlagName)
+ bufcli.BindExcludePaths(flagSet, &f.ExcludePaths, excludePathsFlagName)
+ flagSet.StringVarP(
+ &f.Output,
+ outputFlagName,
+ outputFlagShortName,
+ "",
+ `The output directory for exported files.`,
+ )
+ _ = cobra.MarkFlagRequired(flagSet, outputFlagName)
+ flagSet.StringVar(
+ &f.Config,
+ configFlagName,
+ "",
+ `The file or data to use for configuration.`,
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ input, err := bufcli.GetInputValue(container, flags.InputHashtag, ".")
+ if err != nil {
+ return err
+ }
+ sourceOrModuleRef, err := buffetch.NewRefParser(container.Logger(), buffetch.RefParserWithProtoFileRefAllowed()).GetSourceOrModuleRef(ctx, input)
+ if err != nil {
+ return err
+ }
+ storageosProvider := bufcli.NewStorageosProvider(flags.DisableSymlinks)
+ runner := command.NewRunner()
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ moduleReader, err := bufcli.NewModuleReaderAndCreateCacheDirs(container, clientConfig)
+ if err != nil {
+ return err
+ }
+ moduleConfigReader, err := bufcli.NewWireModuleConfigReaderForModuleReader(
+ container,
+ storageosProvider,
+ runner,
+ clientConfig,
+ moduleReader,
+ )
+ if err != nil {
+ return err
+ }
+ moduleConfigs, err := moduleConfigReader.GetModuleConfigs(
+ ctx,
+ container,
+ sourceOrModuleRef,
+ flags.Config,
+ flags.Paths,
+ flags.ExcludePaths,
+ false,
+ )
+ if err != nil {
+ return err
+ }
+ moduleFileSetBuilder := bufmodulebuild.NewModuleFileSetBuilder(
+ container.Logger(),
+ moduleReader,
+ )
+ moduleFileSets := make([]bufmodule.ModuleFileSet, len(moduleConfigs))
+ for i, moduleConfig := range moduleConfigs {
+ moduleFileSet, err := moduleFileSetBuilder.Build(
+ ctx,
+ moduleConfig.Module(),
+ bufmodulebuild.WithWorkspace(moduleConfig.Workspace()),
+ )
+ if err != nil {
+ return err
+ }
+ moduleFileSets[i] = moduleFileSet
+ }
+ // There are two cases where we need an image to filter the output:
+ // 1) the input is a proto file reference
+ // 2) ensuring that we are including the relevant imports
+ //
+ // In the first scenario, the imageConfigReader returns imageCongfigs that handle the filtering
+ // for the proto file ref.
+ //
+ // To handle imports for all other references, unless we are excluding imports, we only want
+ // to export those imports that are actually used. To figure this out, we build an image of images
+ // and use the fact that something is in an image to determine if it is actually used.
+ var images []bufimage.Image
+ _, isProtoFileRef := sourceOrModuleRef.(buffetch.ProtoFileRef)
+ // We gate on flags.ExcludeImports/buffetch.ProtoFileRef so that we don't waste time building if the
+ // result of the build is not relevant.
+ if !flags.ExcludeImports {
+ imageBuilder := bufimagebuild.NewBuilder(container.Logger())
+ for _, moduleFileSet := range moduleFileSets {
+ targetFileInfos, err := moduleFileSet.TargetFileInfos(ctx)
+ if err != nil {
+ return err
+ }
+ if len(targetFileInfos) == 0 {
+ // This ModuleFileSet doesn't have any targets, so we shouldn't build
+ // an image for it.
+ continue
+ }
+ image, fileAnnotations, err := imageBuilder.Build(
+ ctx,
+ moduleFileSet,
+ bufimagebuild.WithExcludeSourceCodeInfo(),
+ )
+ if err != nil {
+ return err
+ }
+ if len(fileAnnotations) > 0 {
+ // stderr since we do output to stdout potentially
+ if err := bufanalysis.PrintFileAnnotations(
+ container.Stderr(),
+ fileAnnotations,
+ bufanalysis.FormatText.String(),
+ ); err != nil {
+ return err
+ }
+ return bufcli.ErrFileAnnotation
+ }
+ images = append(images, image)
+ }
+ } else if isProtoFileRef {
+ // If the reference is a ProtoFileRef, we need to resolve the image for the reference,
+ // since the image config reader distills down the reference to the file and its dependencies,
+ // and also handles the #include_package_files option.
+ imageConfigReader, err := bufcli.NewWireImageConfigReader(
+ container,
+ storageosProvider,
+ runner,
+ clientConfig,
+ )
+ if err != nil {
+ return err
+ }
+ imageConfigs, fileAnnotations, err := imageConfigReader.GetImageConfigs(
+ ctx,
+ container,
+ sourceOrModuleRef,
+ flags.Config,
+ flags.Paths,
+ flags.ExcludePaths,
+ false,
+ true, // SourceCodeInfo is not needed here for outputting the source code
+ )
+ if err != nil {
+ return err
+ }
+ if len(fileAnnotations) > 0 {
+ if err := bufanalysis.PrintFileAnnotations(
+ container.Stderr(),
+ fileAnnotations,
+ bufanalysis.FormatText.String(),
+ ); err != nil {
+ return err
+ }
+ }
+ for _, imageConfig := range imageConfigs {
+ images = append(images, imageConfig.Image())
+ }
+ }
+ // images will only be non-empty if !flags.ExcludeImports || isProtoFileRef
+ // mergedImage will be nil if images is empty
+ // therefore, we must gate on mergedImage != nil below
+ mergedImage, err := bufimage.MergeImages(images...)
+ if err != nil {
+ return err
+ }
+ if err := os.MkdirAll(flags.Output, 0755); err != nil {
+ return err
+ }
+ readWriteBucket, err := storageosProvider.NewReadWriteBucket(
+ flags.Output,
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return err
+ }
+ fileInfosFunc := bufmodule.ModuleFileSet.AllFileInfos
+ // If we filtered on some paths, only use the targets.
+ // Otherwise, we want to print everything, including potentially imports.
+ // We can have duplicates across the ModuleFileSets and that's OK - they will
+ // only be written once via writtenPaths, and we aren't building here.
+ if len(flags.Paths) > 0 {
+ fileInfosFunc = func(
+ moduleFileSet bufmodule.ModuleFileSet,
+ ctx context.Context,
+ ) ([]bufmoduleref.FileInfo, error) {
+ return moduleFileSet.TargetFileInfos(ctx)
+ }
+ }
+ writtenPaths := make(map[string]struct{})
+ for _, moduleFileSet := range moduleFileSets {
+ // If the reference was a proto file reference, we will use the image files as the basis
+ // for outputting source files.
+ // We do an extra mergedImage != nil check even though this must be true
+ if isProtoFileRef && mergedImage != nil {
+ for _, protoFileRefImageFile := range mergedImage.Files() {
+ path := protoFileRefImageFile.Path()
+ if _, ok := writtenPaths[path]; ok {
+ continue
+ }
+ if flags.ExcludeImports && protoFileRefImageFile.IsImport() {
+ continue
+ }
+ moduleFile, err := moduleFileSet.GetModuleFile(ctx, path)
+ if err != nil {
+ return err
+ }
+ if err := storage.CopyReadObject(ctx, readWriteBucket, moduleFile); err != nil {
+ return multierr.Append(err, moduleFile.Close())
+ }
+ if err := moduleFile.Close(); err != nil {
+ return err
+ }
+ writtenPaths[path] = struct{}{}
+ }
+ if len(writtenPaths) == 0 {
+ return errors.New("no .proto target files found")
+ }
+ return nil
+ }
+ fileInfos, err := fileInfosFunc(moduleFileSet, ctx)
+ if err != nil {
+ return err
+ }
+ for _, fileInfo := range fileInfos {
+ path := fileInfo.Path()
+ if _, ok := writtenPaths[path]; ok {
+ continue
+ }
+ // If the file is not an import in some ModuleFileSet, it will
+ // eventually be written via the iteration over moduleFileSets.
+ if fileInfo.IsImport() {
+ if flags.ExcludeImports {
+ // Exclude imports, don't output here
+ continue
+ } else if mergedImage == nil || mergedImage.GetFile(path) == nil {
+ // We check the merged image to see if the path exists. If it does,
+ // we use this import, so we want to output the file. If it doesn't,
+ // continue.
+ continue
+ }
+ }
+ moduleFile, err := moduleFileSet.GetModuleFile(ctx, path)
+ if err != nil {
+ return err
+ }
+ if err := storage.CopyReadObject(ctx, readWriteBucket, moduleFile); err != nil {
+ return multierr.Append(err, moduleFile.Close())
+ }
+ if err := moduleFile.Close(); err != nil {
+ return err
+ }
+ writtenPaths[path] = struct{}{}
+ }
+ }
+ if len(writtenPaths) == 0 {
+ return errors.New("no .proto target files found")
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/export/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/export/usage.gen.go
new file mode 100644
index 000000000..425dda13c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/export/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package export
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/format/format.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/format/format.go
new file mode 100644
index 000000000..634fe1221
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/format/format.go
@@ -0,0 +1,612 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 format
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "os"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/buf/bufformat"
+ "github.com/bufbuild/buf/private/buf/bufwork"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+ "go.uber.org/multierr"
+)
+
+const (
+ configFlagName = "config"
+ diffFlagName = "diff"
+ diffFlagShortName = "d"
+ disableSymlinksFlagName = "disable-symlinks"
+ errorFormatFlagName = "error-format"
+ excludePathsFlagName = "exclude-path"
+ exitCodeFlagName = "exit-code"
+ outputFlagName = "output"
+ outputFlagShortName = "o"
+ pathsFlagName = "path"
+ writeFlagName = "write"
+ writeFlagShortName = "w"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Format all Protobuf files from the specified input and output the result.",
+ Long: `
+By default, the input is the current directory and the formatted content is written to stdout. For example,
+
+# Write the current directory's formatted content to stdout
+$ buf format
+
+Rewrite the file(s) in-place with -w. For example,
+
+# Rewrite the files defined in the current directory in-place
+$ buf format -w
+
+Most people will want to use 'buf format -w'.
+
+Display a diff between the original and formatted content with -d. For example,
+
+# Write a diff instead of the formatted file
+$ buf format simple/simple.proto -d
+diff -u simple/simple.proto.orig simple/simple.proto
+--- simple/simple.proto.orig 2022-03-24 09:44:10.000000000 -0700
++++ simple/simple.proto 2022-03-24 09:44:10.000000000 -0700
+@@ -2,8 +2,7 @@
+
+ package simple;
+
+-
+ message Object {
+- string key = 1;
+- bytes value = 2;
++ string key = 1;
++ bytes value = 2;
+ }
+
+You can also use the --exit-code flag to exit with a non-zero exit code if there is a diff:
+
+$ buf format --exit-code
+$ buf format -w --exit-code
+$ buf format -d --exit-code
+
+Format a file, directory, or module reference by specifying an input. For example,
+
+# Write the formatted file to stdout
+$ buf format simple/simple.proto
+syntax = "proto3";
+
+package simple;
+
+message Object {
+ string key = 1;
+ bytes value = 2;
+}
+
+# Write the formatted directory to stdout
+$ buf format simple
+...
+
+# Write the formatted module reference to stdout
+$ buf format buf.build/acme/petapis
+...
+
+Write the result to a specified output file or directory with -o. For example,
+
+# Write the formatted file to another file
+$ buf format simple/simple.proto -o simple/simple.formatted.proto
+
+# Write the formatted directory to another directory, creating it if it doesn't exist
+$ buf format proto -o formatted
+
+# This also works with module references
+$ buf format buf.build/acme/weather -o formatted
+
+Rewrite the file(s) in-place with -w. For example,
+
+# Rewrite a single file in-place
+$ buf format simple.proto -w
+
+# Rewrite an entire directory in-place
+$ buf format proto -w
+
+# Write a diff and rewrite the file(s) in-place
+$ buf format simple -d -w
+diff -u simple/simple.proto.orig simple/simple.proto
+...
+
+The -w and -o flags cannot be used together in a single invocation.
+`,
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Config string
+ Diff bool
+ DisableSymlinks bool
+ ErrorFormat string
+ ExcludePaths []string
+ ExitCode bool
+ Paths []string
+ Output string
+ Write bool
+ // special
+ InputHashtag string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindInputHashtag(flagSet, &f.InputHashtag)
+ bufcli.BindPaths(flagSet, &f.Paths, pathsFlagName)
+ bufcli.BindExcludePaths(flagSet, &f.ExcludePaths, excludePathsFlagName)
+ bufcli.BindDisableSymlinks(flagSet, &f.DisableSymlinks, disableSymlinksFlagName)
+ flagSet.BoolVarP(
+ &f.Diff,
+ diffFlagName,
+ diffFlagShortName,
+ false,
+ "Display diffs instead of rewriting files.",
+ )
+ flagSet.BoolVar(
+ &f.ExitCode,
+ exitCodeFlagName,
+ false,
+ "Exit with a non-zero exit code if files were not already formatted.",
+ )
+ flagSet.BoolVarP(
+ &f.Write,
+ writeFlagName,
+ writeFlagShortName,
+ false,
+ "Rewrite files in-place.",
+ )
+ flagSet.StringVar(
+ &f.ErrorFormat,
+ errorFormatFlagName,
+ "text",
+ fmt.Sprintf(
+ "The format for build errors printed to stderr. Must be one of %s.",
+ stringutil.SliceToString(bufanalysis.AllFormatStrings),
+ ),
+ )
+ flagSet.StringVarP(
+ &f.Output,
+ outputFlagName,
+ outputFlagShortName,
+ "-",
+ fmt.Sprintf(
+ `The output location for the formatted files. Must be one of format %s. If omitted, the result is written to stdout.`,
+ buffetch.SourceFormatsString,
+ ),
+ )
+ flagSet.StringVar(
+ &f.Config,
+ configFlagName,
+ "",
+ `The file or data to use for configuration.`,
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) (retErr error) {
+ if err := bufcli.ValidateErrorFormatFlag(flags.ErrorFormat, errorFormatFlagName); err != nil {
+ return err
+ }
+ if flags.Output != "-" && flags.Write {
+ return fmt.Errorf("--%s cannot be used with --%s", outputFlagName, writeFlagName)
+ }
+ input, err := bufcli.GetInputValue(container, flags.InputHashtag, ".")
+ if err != nil {
+ return err
+ }
+ refParser := buffetch.NewRefParser(
+ container.Logger(),
+ buffetch.RefParserWithProtoFileRefAllowed(),
+ )
+ sourceOrModuleRef, err := refParser.GetSourceOrModuleRef(ctx, input)
+ if err != nil {
+ return err
+ }
+ if _, ok := sourceOrModuleRef.(buffetch.ModuleRef); ok && flags.Write {
+ return fmt.Errorf("--%s cannot be used with module reference inputs", writeFlagName)
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ moduleReader, err := bufcli.NewModuleReaderAndCreateCacheDirs(container, clientConfig)
+ if err != nil {
+ return err
+ }
+ runner := command.NewRunner()
+ storageosProvider := bufcli.NewStorageosProvider(flags.DisableSymlinks)
+ moduleConfigReader, err := bufcli.NewWireModuleConfigReaderForModuleReader(
+ container,
+ storageosProvider,
+ runner,
+ clientConfig,
+ moduleReader,
+ )
+ if err != nil {
+ return err
+ }
+ moduleConfigs, err := moduleConfigReader.GetModuleConfigs(
+ ctx,
+ container,
+ sourceOrModuleRef,
+ flags.Config,
+ flags.Paths,
+ flags.ExcludePaths,
+ false,
+ )
+ if err != nil {
+ return err
+ }
+ var outputDirectory string
+ var singleFileOutputFilename string
+ if flags.Output != "-" {
+ // The output file type is determined based on its extension,
+ // so it's possible to write a single file's formatted content
+ // to another single file.
+ //
+ // $ buf format simple.proto -o simple.formatted.proto
+ //
+ // In this case, it's also possible to write an entire directory's
+ // formatted content to a single file (like we see in the default
+ // behavior with stdout).
+ //
+ // $ buf format simple -o simple.formatted.proto
+ //
+ outputRef, err := refParser.GetSourceOrModuleRef(ctx, flags.Output)
+ if err != nil {
+ return err
+ }
+ if _, ok := outputRef.(buffetch.ProtoFileRef); ok {
+ if directory := filepath.Dir(flags.Output); directory != "." {
+ // The output is a single file, so we need to create
+ // the file's directory (if any).
+ //
+ // For example,
+ //
+ // $ buf format simple.proto -o formatted/simple.formatted.proto
+ //
+ outputDirectory = directory
+ }
+ // The outputDirectory will not be set for single file outputs
+ // in the current directory (e.g. simple.formatted.proto).
+ singleFileOutputFilename = flags.Output
+ } else {
+ // The output is a directory, so we can just create it as-is.
+ outputDirectory = flags.Output
+ }
+ }
+ if protoFileRef, ok := sourceOrModuleRef.(buffetch.ProtoFileRef); ok {
+ // If we have a single ProtoFileRef, we only want to format that file.
+ // The file will be available from the first module (i.e. it's
+ // the target input, or the first module in a workspace).
+ if len(moduleConfigs) == 0 {
+ // Unreachable - we should always have at least one module.
+ return fmt.Errorf("could not build module for %s", container.Arg(0))
+ }
+ if protoFileRef.IncludePackageFiles() {
+ // TODO: We need to have a better answer here. Right now, it's
+ // possible that the other files in the same package are defined
+ // in a remote dependency, which makes it impossible to rewrite
+ // in-place.
+ //
+ // In the case that the user uses the -w flag, we'll either need
+ // to return an error, or omit the file that it can't rewrite in-place
+ // (potentially including a debug log).
+ return errors.New("this command does not support including package files")
+ }
+ module := moduleConfigs[0].Module()
+ fileInfos, err := module.TargetFileInfos(ctx)
+ if err != nil {
+ return err
+ }
+ var moduleFile bufmodule.ModuleFile
+ for _, fileInfo := range fileInfos {
+ if _, err := protoFileRef.PathForExternalPath(fileInfo.ExternalPath()); err != nil {
+ // The target file we're looking for is the only one that will not
+ // return an error.
+ continue
+ }
+ moduleFile, err = module.GetModuleFile(
+ ctx,
+ fileInfo.Path(),
+ )
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, moduleFile.Close())
+ }()
+ break
+ }
+ if moduleFile == nil {
+ // This will only happen if a buf.work.yaml exists in a parent
+ // directory, but it does not contain the target file.
+ //
+ // This is also a problem for other commands that interact
+ // with buffetch.ProtoFileRef.
+ //
+ // TODO: Fix the buffetch.ProtoFileRef so that it works in
+ // these situtations.
+ return fmt.Errorf(
+ "input %s was not found - is the directory containing this file defined in your %s?",
+ container.Arg(0),
+ bufwork.ExternalConfigV1FilePath,
+ )
+ }
+ module, err = bufmodule.ModuleWithTargetPaths(
+ module,
+ []string{
+ moduleFile.Path(),
+ },
+ nil, // Nothing to exclude.
+ )
+ if err != nil {
+ return err
+ }
+ diffPresent, err := formatModule(
+ ctx,
+ container,
+ runner,
+ storageosProvider,
+ module,
+ outputDirectory,
+ singleFileOutputFilename,
+ flags.ErrorFormat,
+ flags.Diff,
+ flags.Write,
+ )
+ if err != nil {
+ return err
+ }
+ if flags.ExitCode && diffPresent {
+ return bufcli.ErrFileAnnotation
+ }
+ return nil
+ }
+ for _, moduleConfig := range moduleConfigs {
+ diffPresent, err := formatModule(
+ ctx,
+ container,
+ runner,
+ storageosProvider,
+ moduleConfig.Module(),
+ outputDirectory,
+ singleFileOutputFilename,
+ flags.ErrorFormat,
+ flags.Diff,
+ flags.Write,
+ )
+ if err != nil {
+ return err
+ }
+ if flags.ExitCode && diffPresent {
+ return bufcli.ErrFileAnnotation
+ }
+ }
+ return nil
+}
+
+// formatModule formats the module's target files and writes them to the
+// writeBucket, if any. If diff is true, the diff between the original and
+// formatted files is written to stdout.
+//
+// Returns true if there was a diff and no other error.
+func formatModule(
+ ctx context.Context,
+ container appflag.Container,
+ runner command.Runner,
+ storageosProvider storageos.Provider,
+ module bufmodule.Module,
+ outputDirectory string,
+ singleFileOutputFilename string,
+ errorFormat string,
+ diff bool,
+ rewrite bool,
+) (_ bool, retErr error) {
+ originalReadWriteBucket := storagemem.NewReadWriteBucket()
+ if err := bufmodule.TargetModuleFilesToBucket(
+ ctx,
+ module,
+ originalReadWriteBucket,
+ ); err != nil {
+ return false, err
+ }
+ // Note that external paths are set properly for the files in this read bucket.
+ formattedReadBucket, err := bufformat.Format(ctx, module)
+ if err != nil {
+ return false, err
+ }
+ diffBuffer := bytes.NewBuffer(nil)
+ if err := storage.Diff(
+ ctx,
+ runner,
+ diffBuffer,
+ originalReadWriteBucket,
+ formattedReadBucket,
+ storage.DiffWithExternalPaths(), // No need to set prefixes as the buckets are from the same location.
+ ); err != nil {
+ return false, err
+ }
+ diffPresent := diffBuffer.Len() > 0
+ if diff {
+ if _, err := io.Copy(container.Stdout(), diffBuffer); err != nil {
+ return false, err
+ }
+ if outputDirectory == "" && singleFileOutputFilename == "" && !rewrite {
+ // If the user specified --diff and has not explicitly overridden
+ // the --output or rewritten the sources in-place with --write, we
+ // can stop here.
+ return diffPresent, nil
+ }
+ }
+ if rewrite {
+ // Rewrite the sources in place.
+ if err := storage.WalkReadObjects(
+ ctx,
+ originalReadWriteBucket,
+ "",
+ func(readObject storage.ReadObject) error {
+ formattedReadObject, err := formattedReadBucket.Get(ctx, readObject.Path())
+ if err != nil {
+ return err
+ }
+ // We use os.OpenFile here instead of storage.Copy for a few reasons.
+ //
+ // storage.Copy operates on normal paths, so the copied content is always placed
+ // relative to the bucket's root (as expected). The rewrite in-place behavior can
+ // be rephrased as writing to the same bucket as the input (e.g. buf format proto -o proto).
+ //
+ // Now, if the user asks to rewrite an entire workspace (i.e. a directory containing
+ // a buf.work.yaml), we would need to call storage.Copy for each of the directories
+ // defined in the workspace. This involves parsing the buf.work.yaml and creating
+ // a storage.Bucket for each of the directories.
+ //
+ // It's simpler to just copy the files in-place based on their external path since
+ // it's the same behavior for single files, directories, and workspaces.
+ file, err := os.OpenFile(readObject.ExternalPath(), os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, file.Close())
+ }()
+ if _, err := file.ReadFrom(formattedReadObject); err != nil {
+ return err
+ }
+ return nil
+ },
+ ); err != nil {
+ return false, err
+ }
+ return diffPresent, nil
+ }
+ var readWriteBucket storage.ReadWriteBucket
+ if outputDirectory != "" {
+ // OK to use os.Stat instead of os.LStat here as this is CLI-only
+ if _, err := os.Stat(outputDirectory); err != nil {
+ // We don't need to check fileInfo.IsDir() because it's
+ // already handled by the storageosProvider.
+ if os.IsNotExist(err) {
+ if err := os.MkdirAll(outputDirectory, 0755); err != nil {
+ return false, err
+ }
+ // Although unlikely, if an error occurs in the midst of
+ // writing the formatted files, we want to clean up the
+ // directory we just created because it didn't previously
+ // exist.
+ defer func() {
+ if retErr != nil {
+ retErr = multierr.Append(retErr, os.RemoveAll(outputDirectory))
+ }
+ }()
+ }
+ }
+ readWriteBucket, err = storageosProvider.NewReadWriteBucket(
+ outputDirectory,
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return false, err
+ }
+ }
+ if readWriteBucket == nil || singleFileOutputFilename != "" {
+ // If the readWriteBucket is nil, we write the output to stdout.
+ //
+ // If a single file output was used, we can't just copy the content
+ // between buckets - we need to write all of the bucket's content
+ // into the single file (exactly like we do for writing to stdout).
+ //
+ // We might want to order these, although the output is kind of useless
+ // if we're writing more than one file.
+ writer := container.Stdout()
+ if singleFileOutputFilename != "" {
+ file, err := os.OpenFile(singleFileOutputFilename, os.O_WRONLY|os.O_CREATE|os.O_TRUNC, 0644)
+ if err != nil {
+ return false, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, file.Close())
+ }()
+ writer = file
+ }
+ if err := storage.WalkReadObjects(
+ ctx,
+ formattedReadBucket,
+ "",
+ func(readObject storage.ReadObject) error {
+ data, err := io.ReadAll(readObject)
+ if err != nil {
+ return err
+ }
+ if _, err := writer.Write(data); err != nil {
+ return err
+ }
+ return nil
+ },
+ ); err != nil {
+ return false, err
+ }
+ return diffPresent, nil
+ }
+ // The user specified -o, so we copy the files into the output bucket.
+ if _, err := storage.Copy(
+ ctx,
+ formattedReadBucket,
+ readWriteBucket,
+ ); err != nil {
+ return false, err
+ }
+ return diffPresent, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/format/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/format/usage.gen.go
new file mode 100644
index 000000000..fd3c4c650
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/format/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package format
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/generate/generate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/generate/generate.go
new file mode 100644
index 000000000..7c9bc3b8a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/generate/generate.go
@@ -0,0 +1,385 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 generate
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/buf/bufgen"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ templateFlagName = "template"
+ baseOutDirPathFlagName = "output"
+ baseOutDirPathFlagShortName = "o"
+ errorFormatFlagName = "error-format"
+ configFlagName = "config"
+ pathsFlagName = "path"
+ includeImportsFlagName = "include-imports"
+ includeWKTFlagName = "include-wkt"
+ excludePathsFlagName = "exclude-path"
+ disableSymlinksFlagName = "disable-symlinks"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Generate stubs for protoc plugins using a template.",
+ Long: `This command uses a template file of the shape:
+
+# The version of the generation template.
+# Required.
+# The valid values are v1beta1, v1.
+version: v1
+# The plugins to run. "plugin" is required.
+plugins:
+ # The name of the plugin.
+ # By default, buf generate will look for a binary named protoc-gen-NAME on your $PATH.
+ # Alternatively, use a remote plugin:
+ # plugin: buf.build/protocolbuffers/go:v1.28.1
+ - plugin: go
+ # The the relative output directory.
+ # Required.
+ out: gen/go
+ # Any options to provide to the plugin.
+ # This can be either a single string or a list of strings.
+ # Optional.
+ opt: paths=source_relative
+ # The custom path to the plugin binary, if not protoc-gen-NAME on your $PATH.
+ # Optional, and exclusive with "remote".
+ path: custom-gen-go
+ # The generation strategy to use. There are two options:
+ #
+ # 1. "directory"
+ #
+ # This will result in buf splitting the input files by directory, and making separate plugin
+ # invocations in parallel. This is roughly the concurrent equivalent of:
+ #
+ # for dir in $(find . -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq); do
+ # protoc -I . $(find "${dir}" -name '*.proto')
+ # done
+ #
+ # Almost every Protobuf plugin either requires this, or works with this,
+ # and this is the recommended and default value.
+ #
+ # 2. "all"
+ #
+ # This will result in buf making a single plugin invocation with all input files.
+ # This is roughly the equivalent of:
+ #
+ # protoc -I . $(find . -name '*.proto')
+ #
+ # This is needed for certain plugins that expect all files to be given at once.
+ #
+ # If omitted, "directory" is used. Most users should not need to set this option.
+ # Optional.
+ strategy: directory
+ - plugin: java
+ out: gen/java
+ # Use the plugin hosted at buf.build/protocolbuffers/python at version v21.9.
+ # If version is omitted, uses the latest version of the plugin.
+ - plugin: buf.build/protocolbuffers/python:v21.9
+ out: gen/python
+
+As an example, here's a typical "buf.gen.yaml" go and grpc, assuming
+"protoc-gen-go" and "protoc-gen-go-grpc" are on your "$PATH":
+
+version: v1
+plugins:
+ - plugin: go
+ out: gen/go
+ opt: paths=source_relative
+ - plugin: go-grpc
+ out: gen/go
+ opt: paths=source_relative,require_unimplemented_servers=false
+
+By default, buf generate will look for a file of this shape named
+"buf.gen.yaml" in your current directory. This can be thought of as a template
+for the set of plugins you want to invoke.
+
+The first argument is the source, module, or image to generate from.
+If no argument is specified, defaults to ".".
+
+Call with:
+
+# uses buf.gen.yaml as template, current directory as input
+$ buf generate
+
+# same as the defaults (template of "buf.gen.yaml", current directory as input)
+$ buf generate --template buf.gen.yaml .
+
+# --template also takes YAML or JSON data as input, so it can be used without a file
+$ buf generate --template '{"version":"v1","plugins":[{"plugin":"go","out":"gen/go"}]}'
+
+# download the repository and generate code stubs per the bar.yaml template
+$ buf generate --template bar.yaml https://github.com/foo/bar.git
+
+# generate to the bar/ directory, prepending bar/ to the out directives in the template
+$ buf generate --template bar.yaml -o bar https://github.com/foo/bar.git
+
+The paths in the template and the -o flag will be interpreted as relative to your
+current directory, so you can place your template files anywhere.
+
+If you only want to generate stubs for a subset of your input, you can do so via the --path flag:
+
+# Only generate for the files in the directories proto/foo and proto/bar
+$ buf generate --path proto/foo --path proto/bar
+
+# Only generate for the files proto/foo/foo.proto and proto/foo/bar.proto
+$ buf generate --path proto/foo/foo.proto --path proto/foo/bar.proto
+
+# Only generate for the files in the directory proto/foo on your GitHub repository
+$ buf generate --template buf.gen.yaml https://github.com/foo/bar.git --path proto/foo
+
+Note that all paths must be contained within the same module. For example, if you have a
+module in "proto", you cannot specify "--path proto", however "--path proto/foo" is allowed
+as "proto/foo" is contained within "proto".
+
+Plugins are invoked in the order they are specified in the template, but each plugin
+has a per-directory parallel invocation, with results from each invocation combined
+before writing the result.
+
+Insertion points are processed in the order the plugins are specified in the template.
+`,
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Template string
+ BaseOutDirPath string
+ ErrorFormat string
+ Files []string
+ Config string
+ Paths []string
+ IncludeImports bool
+ IncludeWKT bool
+ ExcludePaths []string
+ DisableSymlinks bool
+ IncludeTypes []string
+ // special
+ InputHashtag string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindDisableSymlinks(flagSet, &f.DisableSymlinks, disableSymlinksFlagName)
+ bufcli.BindInputHashtag(flagSet, &f.InputHashtag)
+ bufcli.BindPaths(flagSet, &f.Paths, pathsFlagName)
+ bufcli.BindExcludePaths(flagSet, &f.ExcludePaths, excludePathsFlagName)
+ flagSet.BoolVar(
+ &f.IncludeImports,
+ includeImportsFlagName,
+ false,
+ "Also generate all imports except for Well-Known Types.",
+ )
+ flagSet.BoolVar(
+ &f.IncludeWKT,
+ includeWKTFlagName,
+ false,
+ fmt.Sprintf(
+ "Also generate Well-Known Types. Cannot be set without --%s.",
+ includeImportsFlagName,
+ ),
+ )
+ flagSet.StringVar(
+ &f.Template,
+ templateFlagName,
+ "",
+ `The generation template file or data to use. Must be in either YAML or JSON format.`,
+ )
+ flagSet.StringVarP(
+ &f.BaseOutDirPath,
+ baseOutDirPathFlagName,
+ baseOutDirPathFlagShortName,
+ ".",
+ `The base directory to generate to. This is prepended to the out directories in the generation template.`,
+ )
+ flagSet.StringVar(
+ &f.ErrorFormat,
+ errorFormatFlagName,
+ "text",
+ fmt.Sprintf(
+ "The format for build errors, printed to stderr. Must be one of %s.",
+ stringutil.SliceToString(bufanalysis.AllFormatStrings),
+ ),
+ )
+ flagSet.StringVar(
+ &f.Config,
+ configFlagName,
+ "",
+ `The file or data to use for configuration.`,
+ )
+ flagSet.StringSliceVar(
+ &f.IncludeTypes,
+ "include-types",
+ nil,
+ "The types (message, enum, service) that should be included in this image. When specified, the resulting image will only include descriptors to describe the requested types. Flag usage overrides buf.gen.yaml",
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) (retErr error) {
+ logger := container.Logger()
+ if flags.IncludeWKT && !flags.IncludeImports {
+ // You need to set --include-imports if you set --include-wkt, which isn’t great. The alternative is to have
+ // --include-wkt implicitly set --include-imports, but this could be surprising. Or we could rename
+ // --include-wkt to --include-imports-and/with-wkt. But the summary is that the flag only makes sense
+ // in the context of including imports.
+ return appcmd.NewInvalidArgumentErrorf("Cannot set --%s without --%s", includeWKTFlagName, includeImportsFlagName)
+ }
+ if err := bufcli.ValidateErrorFormatFlag(flags.ErrorFormat, errorFormatFlagName); err != nil {
+ return err
+ }
+ input, err := bufcli.GetInputValue(container, flags.InputHashtag, ".")
+ if err != nil {
+ return err
+ }
+ ref, err := buffetch.NewRefParser(container.Logger(), buffetch.RefParserWithProtoFileRefAllowed()).GetRef(ctx, input)
+ if err != nil {
+ return err
+ }
+ storageosProvider := bufcli.NewStorageosProvider(flags.DisableSymlinks)
+ runner := command.NewRunner()
+ readWriteBucket, err := storageosProvider.NewReadWriteBucket(
+ ".",
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return err
+ }
+ genConfig, err := bufgen.ReadConfig(
+ ctx,
+ logger,
+ bufgen.NewProvider(logger),
+ readWriteBucket,
+ bufgen.ReadConfigWithOverride(flags.Template),
+ )
+ if err != nil {
+ return err
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ imageConfigReader, err := bufcli.NewWireImageConfigReader(
+ container,
+ storageosProvider,
+ runner,
+ clientConfig,
+ )
+ if err != nil {
+ return err
+ }
+ imageConfigs, fileAnnotations, err := imageConfigReader.GetImageConfigs(
+ ctx,
+ container,
+ ref,
+ flags.Config,
+ flags.Paths, // we filter on files
+ flags.ExcludePaths, // we exclude these paths
+ false, // input files must exist
+ false, // we must include source info for generation
+ )
+ if err != nil {
+ return err
+ }
+ if len(fileAnnotations) > 0 {
+ if err := bufanalysis.PrintFileAnnotations(container.Stderr(), fileAnnotations, flags.ErrorFormat); err != nil {
+ return err
+ }
+ return bufcli.ErrFileAnnotation
+ }
+ images := make([]bufimage.Image, 0, len(imageConfigs))
+ for _, imageConfig := range imageConfigs {
+ images = append(images, imageConfig.Image())
+ }
+ image, err := bufimage.MergeImages(images...)
+ if err != nil {
+ return err
+ }
+ generateOptions := []bufgen.GenerateOption{
+ bufgen.GenerateWithBaseOutDirPath(flags.BaseOutDirPath),
+ }
+ if flags.IncludeImports {
+ generateOptions = append(
+ generateOptions,
+ bufgen.GenerateWithIncludeImports(),
+ )
+ }
+ if flags.IncludeWKT {
+ generateOptions = append(
+ generateOptions,
+ bufgen.GenerateWithIncludeWellKnownTypes(),
+ )
+ }
+ typesConfig := genConfig.TypesConfig
+ if typesConfig != nil {
+ types := typesConfig.Include
+ if len(flags.IncludeTypes) > 0 {
+ // override buf.gen.yaml with flag value
+ types = flags.IncludeTypes
+ }
+ if len(types) > 0 {
+ image, err = bufimageutil.ImageFilteredByTypes(image, types...)
+ if err != nil {
+ return err
+ }
+ }
+ }
+ return bufgen.NewGenerator(
+ logger,
+ storageosProvider,
+ runner,
+ clientConfig,
+ ).Generate(
+ ctx,
+ container,
+ genConfig,
+ image,
+ generateOptions...,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/generate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/generate/usage.gen.go
new file mode 100644
index 000000000..4c597e9d2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/generate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package generate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lint/lint.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lint/lint.go
new file mode 100644
index 000000000..b7f28dc23
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lint/lint.go
@@ -0,0 +1,177 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 lint
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ errorFormatFlagName = "error-format"
+ configFlagName = "config"
+ pathsFlagName = "path"
+ excludePathsFlagName = "exclude-path"
+ disableSymlinksFlagName = "disable-symlinks"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Verify that the input location passes lint checks.",
+ Long: bufcli.GetInputLong(`the source, module, or Image to lint`),
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ ErrorFormat string
+ Config string
+ Paths []string
+ ExcludePaths []string
+ DisableSymlinks bool
+ // special
+ InputHashtag string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindInputHashtag(flagSet, &f.InputHashtag)
+ bufcli.BindPaths(flagSet, &f.Paths, pathsFlagName)
+ bufcli.BindExcludePaths(flagSet, &f.ExcludePaths, excludePathsFlagName)
+ bufcli.BindDisableSymlinks(flagSet, &f.DisableSymlinks, disableSymlinksFlagName)
+ flagSet.StringVar(
+ &f.ErrorFormat,
+ errorFormatFlagName,
+ "text",
+ fmt.Sprintf(
+ "The format for build errors or check violations printed to stdout. Must be one of %s.",
+ stringutil.SliceToString(buflint.AllFormatStrings),
+ ),
+ )
+ flagSet.StringVar(
+ &f.Config,
+ configFlagName,
+ "",
+ `The file or data to use for configuration.`,
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) (retErr error) {
+ if err := bufcli.ValidateErrorFormatFlagLint(flags.ErrorFormat, errorFormatFlagName); err != nil {
+ return err
+ }
+ input, err := bufcli.GetInputValue(container, flags.InputHashtag, ".")
+ if err != nil {
+ return err
+ }
+ ref, err := buffetch.NewRefParser(container.Logger(), buffetch.RefParserWithProtoFileRefAllowed()).GetRef(ctx, input)
+ if err != nil {
+ return err
+ }
+ storageosProvider := bufcli.NewStorageosProvider(flags.DisableSymlinks)
+ runner := command.NewRunner()
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ imageConfigReader, err := bufcli.NewWireImageConfigReader(
+ container,
+ storageosProvider,
+ runner,
+ clientConfig,
+ )
+ if err != nil {
+ return err
+ }
+ imageConfigs, fileAnnotations, err := imageConfigReader.GetImageConfigs(
+ ctx,
+ container,
+ ref,
+ flags.Config,
+ flags.Paths, // we filter checks for files
+ flags.ExcludePaths, // we exclude these paths
+ false, // input files must exist
+ false, // we must include source info for linting
+ )
+ if err != nil {
+ return err
+ }
+ if len(fileAnnotations) > 0 {
+ formatString := flags.ErrorFormat
+ if formatString == "config-ignore-yaml" {
+ formatString = "text"
+ }
+ if err := bufanalysis.PrintFileAnnotations(container.Stdout(), fileAnnotations, formatString); err != nil {
+ return err
+ }
+ return bufcli.ErrFileAnnotation
+ }
+ var allFileAnnotations []bufanalysis.FileAnnotation
+ for _, imageConfig := range imageConfigs {
+ fileAnnotations, err := buflint.NewHandler(container.Logger()).Check(
+ ctx,
+ imageConfig.Config().Lint,
+ bufimage.ImageWithoutImports(imageConfig.Image()),
+ )
+ if err != nil {
+ return err
+ }
+ allFileAnnotations = append(allFileAnnotations, fileAnnotations...)
+ }
+ if len(allFileAnnotations) > 0 {
+ if err := buflintconfig.PrintFileAnnotations(
+ container.Stdout(),
+ bufanalysis.DeduplicateAndSortFileAnnotations(allFileAnnotations),
+ flags.ErrorFormat,
+ ); err != nil {
+ return err
+ }
+ return bufcli.ErrFileAnnotation
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lint/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lint/usage.gen.go
new file mode 100644
index 000000000..4dd9b47c2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lint/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package lint
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lsfiles/lsfiles.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lsfiles/lsfiles.go
new file mode 100644
index 000000000..450b7a3da
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lsfiles/lsfiles.go
@@ -0,0 +1,173 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 lsfiles
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/buf/buffetch"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ asImportPathsFlagName = "as-import-paths"
+ configFlagName = "config"
+ errorFormatFlagName = "error-format"
+ includeImportsFlagName = "include-imports"
+ disableSymlinksFlagName = "disable-symlinks"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "List all Protobuf files for the input.",
+ Long: bufcli.GetInputLong(`the source, module, or image to list from`),
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ AsImportPaths bool
+ Config string
+ ErrorFormat string
+ IncludeImports bool
+ DisableSymlinks bool
+ // special
+ InputHashtag string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindInputHashtag(flagSet, &f.InputHashtag)
+ bufcli.BindDisableSymlinks(flagSet, &f.DisableSymlinks, disableSymlinksFlagName)
+ flagSet.BoolVar(
+ &f.AsImportPaths,
+ asImportPathsFlagName,
+ false,
+ "Strip local directory paths and print filepaths as they are imported.",
+ )
+ flagSet.StringVar(
+ &f.Config,
+ configFlagName,
+ "",
+ `The file or data to use for configuration.`,
+ )
+ flagSet.StringVar(
+ &f.ErrorFormat,
+ errorFormatFlagName,
+ "text",
+ fmt.Sprintf(
+ "The format for build errors printed to stderr. Must be one of %s.",
+ stringutil.SliceToString(bufanalysis.AllFormatStrings),
+ ),
+ )
+ flagSet.BoolVar(
+ &f.IncludeImports,
+ includeImportsFlagName,
+ false,
+ "Include imports.",
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ input, err := bufcli.GetInputValue(container, flags.InputHashtag, ".")
+ if err != nil {
+ return err
+ }
+ ref, err := buffetch.NewRefParser(container.Logger(), buffetch.RefParserWithProtoFileRefAllowed()).GetRef(ctx, input)
+ if err != nil {
+ return err
+ }
+ storageosProvider := bufcli.NewStorageosProvider(flags.DisableSymlinks)
+ runner := command.NewRunner()
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ fileLister, err := bufcli.NewWireFileLister(
+ container,
+ storageosProvider,
+ runner,
+ clientConfig,
+ )
+ if err != nil {
+ return err
+ }
+ fileRefs, fileAnnotations, err := fileLister.ListFiles(
+ ctx,
+ container,
+ ref,
+ flags.Config,
+ flags.IncludeImports,
+ )
+ if err != nil {
+ return err
+ }
+ if len(fileAnnotations) > 0 {
+ // stderr since we do output to stdout potentially
+ if err := bufanalysis.PrintFileAnnotations(
+ container.Stderr(),
+ fileAnnotations,
+ flags.ErrorFormat,
+ ); err != nil {
+ return err
+ }
+ return bufcli.ErrFileAnnotation
+ }
+ if flags.AsImportPaths {
+ bufmoduleref.SortFileInfos(fileRefs)
+ for _, fileRef := range fileRefs {
+ if _, err := fmt.Fprintln(container.Stdout(), fileRef.Path()); err != nil {
+ return err
+ }
+ }
+ } else {
+ bufmoduleref.SortFileInfosByExternalPath(fileRefs)
+ for _, fileRef := range fileRefs {
+ if _, err := fmt.Fprintln(container.Stdout(), fileRef.ExternalPath()); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lsfiles/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lsfiles/usage.gen.go
new file mode 100644
index 000000000..a7e7ec94e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/lsfiles/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package lsfiles
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/internal/internal.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/internal/internal.go
new file mode 100644
index 000000000..0169a0742
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/internal/internal.go
@@ -0,0 +1,75 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/spf13/pflag"
+)
+
+// BindLSRulesAll binds the all flag for an ls rules command.
+func BindLSRulesAll(flagSet *pflag.FlagSet, addr *bool, flagName string) {
+ flagSet.BoolVar(
+ addr,
+ flagName,
+ false,
+ "List all rules and not just those currently configured.",
+ )
+}
+
+// BindLSRulesConfig binds the config flag for an ls rules command.
+func BindLSRulesConfig(flagSet *pflag.FlagSet, addr *string, flagName string, allFlagName string, versionFlagName string) {
+ flagSet.StringVar(
+ addr,
+ flagName,
+ "",
+ fmt.Sprintf(
+ `The file or data to use for configuration. Ignored if --%s or --%s is specified.`,
+ allFlagName,
+ versionFlagName,
+ ),
+ )
+}
+
+// BindLSRulesFormat binds the format flag for an ls rules command.
+func BindLSRulesFormat(flagSet *pflag.FlagSet, addr *string, flagName string) {
+ flagSet.StringVar(
+ addr,
+ flagName,
+ "text",
+ fmt.Sprintf(
+ "The format to print rules as. Must be one of %s.",
+ stringutil.SliceToString(bufcheck.AllRuleFormatStrings),
+ ),
+ )
+}
+
+// BindLSRulesVersion binds the version flag for an ls rules command.
+func BindLSRulesVersion(flagSet *pflag.FlagSet, addr *string, flagName string, allFlagName string) {
+ flagSet.StringVar(
+ addr,
+ flagName,
+ "", // do not set a default as we need to know if this is unset
+ fmt.Sprintf(
+ "List all the rules for the given configuration version. Implies --%s. Must be one of %s.",
+ allFlagName,
+ stringutil.SliceToString(bufconfig.AllVersions),
+ ),
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/internal/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/internal/usage.gen.go
new file mode 100644
index 000000000..edcedfbef
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/internal/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package internal
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modclearcache/modclearcache.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modclearcache/modclearcache.go
new file mode 100644
index 000000000..33315da3d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modclearcache/modclearcache.go
@@ -0,0 +1,85 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 modclearcache
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+ aliases ...string,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name,
+ Aliases: aliases,
+ Short: "Clears the Buf module cache.",
+ Args: cobra.NoArgs,
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct{}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ for _, cacheModuleRelDirPath := range bufcli.AllCacheModuleRelDirPaths {
+ dirPath := filepath.Join(container.CacheDirPath(), normalpath.Unnormalize(cacheModuleRelDirPath))
+ fileInfo, err := os.Stat(dirPath)
+ if err != nil {
+ if os.IsNotExist(err) {
+ continue
+ }
+ return err
+ }
+ if !fileInfo.IsDir() {
+ return fmt.Errorf("expected %q to be a directory", dirPath)
+ }
+ if err := os.RemoveAll(dirPath); err != nil {
+ return fmt.Errorf("could not remove %q: %w", dirPath, err)
+ }
+ if _, err := container.Stderr().Write([]byte("deleted " + dirPath + "\n")); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modclearcache/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modclearcache/usage.gen.go
new file mode 100644
index 000000000..e19697332
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modclearcache/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package modclearcache
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modinit/modinit.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modinit/modinit.go
new file mode 100644
index 000000000..01f19f9ef
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modinit/modinit.go
@@ -0,0 +1,160 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 modinit
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ documentationCommentsFlagName = "doc"
+ outDirPathFlagName = "output"
+ outDirPathFlagShortName = "o"
+ uncommentFlagName = "uncomment"
+)
+
+// NewCommand returns a new init Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name,
+ Short: fmt.Sprintf("Initializes and writes a new %s configuration file.", bufconfig.ExternalConfigV1FilePath),
+ Args: cobra.NoArgs,
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ DocumentationComments bool
+ OutDirPath string
+
+ // Hidden.
+ // Just used for generating docs.buf.build.
+ Uncomment bool
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.BoolVar(
+ &f.DocumentationComments,
+ documentationCommentsFlagName,
+ false,
+ "Write inline documentation in the form of comments in the resulting configuration file.",
+ )
+ flagSet.StringVarP(
+ &f.OutDirPath,
+ outDirPathFlagName,
+ outDirPathFlagShortName,
+ ".",
+ `The directory to write the configuration file to.`,
+ )
+ flagSet.BoolVar(
+ &f.Uncomment,
+ uncommentFlagName,
+ false,
+ "Uncomment examples in the resulting configuration file.",
+ )
+ _ = flagSet.MarkHidden(uncommentFlagName)
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ if flags.OutDirPath == "" {
+ return appcmd.NewInvalidArgumentErrorf("required flag %q not set", outDirPathFlagName)
+ }
+ storageosProvider := storageos.NewProvider(storageos.ProviderWithSymlinks())
+ readWriteBucket, err := storageosProvider.NewReadWriteBucket(
+ flags.OutDirPath,
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return err
+ }
+ existingConfigFilePath, err := bufconfig.ExistingConfigFilePath(ctx, readWriteBucket)
+ if err != nil {
+ return err
+ }
+ if existingConfigFilePath != "" {
+ return appcmd.NewInvalidArgumentErrorf("%s already exists, not overwriting", existingConfigFilePath)
+ }
+ var writeConfigOptions []bufconfig.WriteConfigOption
+ if flags.DocumentationComments {
+ writeConfigOptions = append(
+ writeConfigOptions,
+ bufconfig.WriteConfigWithDocumentationComments(),
+ )
+ }
+ if flags.Uncomment {
+ writeConfigOptions = append(
+ writeConfigOptions,
+ bufconfig.WriteConfigWithUncomment(),
+ )
+ }
+ // Need to include the default version (v1), lint config, and breaking config.
+ version := bufconfig.V1Version
+ writeConfigOptions = append(
+ writeConfigOptions,
+ bufconfig.WriteConfigWithVersion(version),
+ )
+ writeConfigOptions = append(
+ writeConfigOptions,
+ bufconfig.WriteConfigWithBreakingConfig(
+ &bufbreakingconfig.Config{
+ Version: version,
+ Use: []string{"FILE"},
+ },
+ ),
+ )
+ writeConfigOptions = append(
+ writeConfigOptions,
+ bufconfig.WriteConfigWithLintConfig(
+ &buflintconfig.Config{
+ Version: version,
+ Use: []string{"DEFAULT"},
+ },
+ ),
+ )
+ return bufconfig.WriteConfig(
+ ctx,
+ readWriteBucket,
+ writeConfigOptions...,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modinit/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modinit/usage.gen.go
new file mode 100644
index 000000000..14ba321d8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modinit/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package modinit
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlsbreakingrules/modlsbreakingrules.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlsbreakingrules/modlsbreakingrules.go
new file mode 100644
index 000000000..f493a410c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlsbreakingrules/modlsbreakingrules.go
@@ -0,0 +1,134 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 modlsbreakingrules
+
+import (
+ "context"
+ "fmt"
+
+ modinternal "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/internal"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ allFlagName = "all"
+ configFlagName = "config"
+ formatFlagName = "format"
+ versionFlagName = "version"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name,
+ Short: "List breaking rules.",
+ Args: cobra.NoArgs,
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ All bool
+ Config string
+ Format string
+ Version string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ modinternal.BindLSRulesAll(flagSet, &f.All, allFlagName)
+ modinternal.BindLSRulesConfig(flagSet, &f.Config, configFlagName, allFlagName, versionFlagName)
+ modinternal.BindLSRulesFormat(flagSet, &f.Format, formatFlagName)
+ modinternal.BindLSRulesVersion(flagSet, &f.Version, versionFlagName, allFlagName)
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ if flags.All {
+ // We explicitly document that if all is set, config is ignored.
+ // If a user wants to override the version while using all, they should use version.
+ flags.Config = ""
+ }
+ if flags.Version != "" {
+ // If version is set, all is implied, and we use the config override to specify the
+ // version that bufconfig.ReadConfig will return.
+ flags.All = true
+ // This also results in config being ignored per the documentation.
+ flags.Config = fmt.Sprintf(`{"version":"%s"}`, flags.Version)
+ }
+ storageosProvider := storageos.NewProvider(storageos.ProviderWithSymlinks())
+ readWriteBucket, err := storageosProvider.NewReadWriteBucket(
+ ".",
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return err
+ }
+ config, err := bufconfig.ReadConfigOS(
+ ctx,
+ readWriteBucket,
+ bufconfig.ReadConfigOSWithOverride(flags.Config),
+ )
+ if err != nil {
+ return err
+ }
+ var rules []bufcheck.Rule
+ if flags.All {
+ switch config.Version {
+ case bufconfig.V1Beta1Version:
+ rules, err = bufbreaking.GetAllRulesV1Beta1()
+ if err != nil {
+ return err
+ }
+ case bufconfig.V1Version:
+ rules, err = bufbreaking.GetAllRulesV1()
+ if err != nil {
+ return err
+ }
+ }
+ } else {
+ rules, err = bufbreaking.RulesForConfig(config.Breaking)
+ if err != nil {
+ return err
+ }
+ }
+ return bufcheck.PrintRules(
+ container.Stdout(),
+ rules,
+ flags.Format,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlsbreakingrules/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlsbreakingrules/usage.gen.go
new file mode 100644
index 000000000..873d6b6f7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlsbreakingrules/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package modlsbreakingrules
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlslintrules/modlslintrules.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlslintrules/modlslintrules.go
new file mode 100644
index 000000000..cc81e50ac
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlslintrules/modlslintrules.go
@@ -0,0 +1,134 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 modlslintrules
+
+import (
+ "context"
+ "fmt"
+
+ modinternal "github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/internal"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ allFlagName = "all"
+ configFlagName = "config"
+ formatFlagName = "format"
+ versionFlagName = "version"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name,
+ Short: "List lint rules.",
+ Args: cobra.NoArgs,
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ All bool
+ Config string
+ Format string
+ Version string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ modinternal.BindLSRulesAll(flagSet, &f.All, allFlagName)
+ modinternal.BindLSRulesConfig(flagSet, &f.Config, configFlagName, allFlagName, versionFlagName)
+ modinternal.BindLSRulesFormat(flagSet, &f.Format, formatFlagName)
+ modinternal.BindLSRulesVersion(flagSet, &f.Version, versionFlagName, allFlagName)
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ if flags.All {
+ // We explicitly document that if all is set, config is ignored.
+ // If a user wants to override the version while using all, they should use version.
+ flags.Config = ""
+ }
+ if flags.Version != "" {
+ // If version is set, all is implied, and we use the config override to specify the
+ // version that bufconfig.ReadConfig will return.
+ flags.All = true
+ // This also results in config being ignored per the documentation.
+ flags.Config = fmt.Sprintf(`{"version":"%s"}`, flags.Version)
+ }
+ storageosProvider := storageos.NewProvider(storageos.ProviderWithSymlinks())
+ readWriteBucket, err := storageosProvider.NewReadWriteBucket(
+ ".",
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return err
+ }
+ config, err := bufconfig.ReadConfigOS(
+ ctx,
+ readWriteBucket,
+ bufconfig.ReadConfigOSWithOverride(flags.Config),
+ )
+ if err != nil {
+ return err
+ }
+ var rules []bufcheck.Rule
+ if flags.All {
+ switch config.Version {
+ case bufconfig.V1Beta1Version:
+ rules, err = buflint.GetAllRulesV1Beta1()
+ if err != nil {
+ return err
+ }
+ case bufconfig.V1Version:
+ rules, err = buflint.GetAllRulesV1()
+ if err != nil {
+ return err
+ }
+ }
+ } else {
+ rules, err = buflint.RulesForConfig(config.Lint)
+ if err != nil {
+ return err
+ }
+ }
+ return bufcheck.PrintRules(
+ container.Stdout(),
+ rules,
+ flags.Format,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlslintrules/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlslintrules/usage.gen.go
new file mode 100644
index 000000000..c9cd7e215
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modlslintrules/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package modlslintrules
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modopen/modopen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modopen/modopen.go
new file mode 100644
index 000000000..abaa4364d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modopen/modopen.go
@@ -0,0 +1,85 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 modopen
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/pkg/browser"
+ "github.com/spf13/cobra"
+)
+
+// NewCommand returns a new open Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Open the module's homepage in a web browser.",
+ Long: `The first argument is the directory of the local module to open. If no argument is specified, defaults to "."`,
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ }
+}
+
+// run tidy to trim the buf.lock file for a specific module.
+func run(
+ ctx context.Context,
+ container appflag.Container,
+) error {
+ directoryInput, err := bufcli.GetInputValue(container, "", ".")
+ if err != nil {
+ return err
+ }
+ storageosProvider := storageos.NewProvider(storageos.ProviderWithSymlinks())
+ readWriteBucket, err := storageosProvider.NewReadWriteBucket(
+ directoryInput,
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return err
+ }
+ existingConfigFilePath, err := bufconfig.ExistingConfigFilePath(ctx, readWriteBucket)
+ if err != nil {
+ return err
+ }
+ if existingConfigFilePath == "" {
+ return bufcli.ErrNoConfigFile
+ }
+ config, err := bufconfig.GetConfigForBucket(ctx, readWriteBucket)
+ if err != nil {
+ return err
+ }
+ var moduleIdentityString string
+ if config.ModuleIdentity != nil {
+ moduleIdentityString = config.ModuleIdentity.IdentityString()
+ }
+ if moduleIdentityString == "" {
+ return fmt.Errorf("%s has no module name", existingConfigFilePath)
+ }
+ return browser.OpenURL("https://" + moduleIdentityString)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modopen/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modopen/usage.gen.go
new file mode 100644
index 000000000..1bb29e8a8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modopen/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package modopen
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modprune/modprune.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modprune/modprune.go
new file mode 100644
index 000000000..4969f9018
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modprune/modprune.go
@@ -0,0 +1,155 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 modprune
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufconnect"
+ "github.com/bufbuild/buf/private/bufpkg/buflock"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+)
+
+// NewCommand returns a new prune Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Prunes unused dependencies from the " + buflock.ExternalConfigFilePath + " file.",
+ Long: `The first argument is the directory of the local module to prune. Defaults to "." if no argument is specified.`,
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ }
+}
+
+// run tidy to trim the buf.lock file for a specific module.
+func run(
+ ctx context.Context,
+ container appflag.Container,
+) error {
+ directoryInput, err := bufcli.GetInputValue(container, "", ".")
+ if err != nil {
+ return err
+ }
+ storageosProvider := storageos.NewProvider(storageos.ProviderWithSymlinks())
+ readWriteBucket, err := storageosProvider.NewReadWriteBucket(
+ directoryInput,
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return err
+ }
+ existingConfigFilePath, err := bufconfig.ExistingConfigFilePath(ctx, readWriteBucket)
+ if err != nil {
+ return err
+ }
+ if existingConfigFilePath == "" {
+ return bufcli.ErrNoConfigFile
+ }
+ config, err := bufconfig.GetConfigForBucket(ctx, readWriteBucket)
+ if err != nil {
+ return err
+ }
+ remote := bufconnect.DefaultRemote
+ if config.ModuleIdentity != nil && config.ModuleIdentity.Remote() != "" {
+ remote = config.ModuleIdentity.Remote()
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewResolveServiceClient)
+
+ module, err := bufmodule.NewModuleForBucket(ctx, readWriteBucket)
+ if err != nil {
+ return fmt.Errorf("couldn't read current dependencies: %w", err)
+ }
+
+ requestReferences, err := referencesPinnedByLock(config.Build.DependencyModuleReferences, module.DependencyModulePins())
+ if err != nil {
+ return err
+ }
+ var dependencyModulePins []bufmoduleref.ModulePin
+ if len(requestReferences) > 0 {
+ resp, err := service.GetModulePins(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetModulePinsRequest{
+ ModuleReferences: bufmoduleref.NewProtoModuleReferencesForModuleReferences(requestReferences...),
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeUnimplemented && remote != bufconnect.DefaultRemote {
+ return bufcli.NewUnimplementedRemoteError(err, remote, config.ModuleIdentity.IdentityString())
+ }
+ return err
+ }
+ dependencyModulePins, err = bufmoduleref.NewModulePinsForProtos(resp.Msg.ModulePins...)
+ if err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ }
+ if err := bufmoduleref.PutDependencyModulePinsToBucket(ctx, readWriteBucket, dependencyModulePins); err != nil {
+ return err
+ }
+ return nil
+}
+
+// referencesPinnedByLock takes moduleReferences and a list of pins, then
+// returns a new list of moduleReferences with the same identity, but their
+// reference set to the commit of the pin with the corresponding identity.
+func referencesPinnedByLock(moduleReferences []bufmoduleref.ModuleReference, modulePins []bufmoduleref.ModulePin) ([]bufmoduleref.ModuleReference, error) {
+ pinsByIdentity := make(map[string]bufmoduleref.ModulePin, len(modulePins))
+ for _, modulePin := range modulePins {
+ pinsByIdentity[modulePin.IdentityString()] = modulePin
+ }
+
+ var pinnedModuleReferences []bufmoduleref.ModuleReference
+ for _, moduleReference := range moduleReferences {
+ pin, ok := pinsByIdentity[moduleReference.IdentityString()]
+ if !ok {
+ return nil, fmt.Errorf(`can't tidy with dependency %q: no corresponding entry found in buf.lock. Use "mod update" first if this is a new dependency`, moduleReference.IdentityString())
+ }
+ newModuleReference, err := bufmoduleref.NewModuleReference(
+ moduleReference.Remote(),
+ moduleReference.Owner(),
+ moduleReference.Repository(),
+ pin.Commit(),
+ )
+ if err != nil {
+ return nil, err
+ }
+ pinnedModuleReferences = append(pinnedModuleReferences, newModuleReference)
+ }
+ return pinnedModuleReferences, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modprune/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modprune/usage.gen.go
new file mode 100644
index 000000000..e729810b1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modprune/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package modprune
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modupdate/modupdate.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modupdate/modupdate.go
new file mode 100644
index 000000000..2cf20276b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modupdate/modupdate.go
@@ -0,0 +1,271 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 modupdate
+
+import (
+ "context"
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufconnect"
+ "github.com/bufbuild/buf/private/bufpkg/buflock"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ modulev1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ onlyFlagName = "only"
+ bufTeamsRemote = "buf.team"
+)
+
+// NewCommand returns a new update Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Update a module's dependencies by updating the " + buflock.ExternalConfigFilePath + " file.",
+ Long: "Fetch the latest digests for the specified references in the config file, " +
+ "and write them and their transitive dependencies to the " +
+ buflock.ExternalConfigFilePath +
+ ` file. The first argument is the directory of the local module to update. Defaults to "." if no argument is specified.`,
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Only []string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringSliceVar(
+ &f.Only,
+ onlyFlagName,
+ nil,
+ "The name of the dependency to update. When set, only this dependency is updated (along with any of its sub-dependencies). May be passed multiple times.",
+ )
+}
+
+// run update the buf.lock file for a specific module.
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ directoryInput, err := bufcli.GetInputValue(container, "", ".")
+ if err != nil {
+ return err
+ }
+ storageosProvider := storageos.NewProvider(storageos.ProviderWithSymlinks())
+ readWriteBucket, err := storageosProvider.NewReadWriteBucket(
+ directoryInput,
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ existingConfigFilePath, err := bufconfig.ExistingConfigFilePath(ctx, readWriteBucket)
+ if err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ if existingConfigFilePath == "" {
+ return bufcli.ErrNoConfigFile
+ }
+ moduleConfig, err := bufconfig.GetConfigForBucket(ctx, readWriteBucket)
+ if err != nil {
+ return err
+ }
+
+ remote := bufconnect.DefaultRemote
+ if moduleConfig.ModuleIdentity != nil && moduleConfig.ModuleIdentity.Remote() != "" {
+ remote = moduleConfig.ModuleIdentity.Remote()
+ } else {
+ for _, moduleReference := range moduleConfig.Build.DependencyModuleReferences {
+ if strings.HasSuffix(moduleReference.Remote(), bufTeamsRemote) && !strings.HasSuffix(bufconnect.DefaultRemote, bufTeamsRemote) {
+ warnMsg := fmt.Sprintf(
+ `%q does not specify a "name", so Buf is defaulting to using remote %q for dependency resolution. This remote may be unable to resolve %q if it's an enterprise BSR module. Did you mean to specify a "name: %s/..." on this module?`,
+ existingConfigFilePath,
+ bufconnect.DefaultRemote,
+ moduleReference.IdentityString(),
+ moduleReference.Remote(),
+ )
+ container.Logger().Warn(warnMsg)
+ break
+ }
+ }
+ }
+
+ pinnedRepositories, err := getDependencies(
+ ctx,
+ container,
+ flags,
+ remote,
+ moduleConfig,
+ readWriteBucket,
+ )
+ if err != nil {
+ return err
+ }
+
+ dependencyModulePins := make([]bufmoduleref.ModulePin, len(pinnedRepositories))
+ for i := range pinnedRepositories {
+ dependencyModulePins[i] = pinnedRepositories[i].modulePin
+ modulePin := pinnedRepositories[i].modulePin
+ repository := pinnedRepositories[i].repository
+ if !repository.Deprecated {
+ continue
+ }
+ warnMsg := fmt.Sprintf(
+ `Repository "%s/%s/%s" is deprecated`,
+ modulePin.Remote(),
+ modulePin.Owner(),
+ modulePin.Repository(),
+ )
+ if repository.DeprecationMessage != "" {
+ warnMsg = fmt.Sprintf("%s: %s", warnMsg, repository.DeprecationMessage)
+ }
+ container.Logger().Warn(warnMsg)
+ }
+
+ if err := bufmoduleref.PutDependencyModulePinsToBucket(ctx, readWriteBucket, dependencyModulePins); err != nil {
+ return bufcli.NewInternalError(err)
+ }
+ return nil
+}
+
+func getDependencies(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+ remote string,
+ moduleConfig *bufconfig.Config,
+ readWriteBucket storage.ReadWriteBucket,
+) ([]*pinnedRepository, error) {
+ if len(moduleConfig.Build.DependencyModuleReferences) == 0 {
+ return nil, nil
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return nil, err
+ }
+ service := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewResolveServiceClient)
+ var protoDependencyModuleReferences []*modulev1alpha1.ModuleReference
+ var currentProtoModulePins []*modulev1alpha1.ModulePin
+ if len(flags.Only) > 0 {
+ referencesByIdentity := map[string]bufmoduleref.ModuleReference{}
+ for _, reference := range moduleConfig.Build.DependencyModuleReferences {
+ referencesByIdentity[reference.IdentityString()] = reference
+ }
+ for _, only := range flags.Only {
+ moduleReference, ok := referencesByIdentity[only]
+ if !ok {
+ return nil, fmt.Errorf("%q is not a valid --only input: no such dependency in current module deps", only)
+ }
+ protoDependencyModuleReferences = append(protoDependencyModuleReferences, bufmoduleref.NewProtoModuleReferenceForModuleReference(moduleReference))
+ }
+ currentModulePins, err := bufmoduleref.DependencyModulePinsForBucket(ctx, readWriteBucket)
+ if err != nil {
+ return nil, fmt.Errorf("couldn't read current dependencies: %w", err)
+ }
+ currentProtoModulePins = bufmoduleref.NewProtoModulePinsForModulePins(currentModulePins...)
+ } else {
+ protoDependencyModuleReferences = bufmoduleref.NewProtoModuleReferencesForModuleReferences(
+ moduleConfig.Build.DependencyModuleReferences...,
+ )
+ }
+ resp, err := service.GetModulePins(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetModulePinsRequest{
+ ModuleReferences: protoDependencyModuleReferences,
+ CurrentModulePins: currentProtoModulePins,
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeUnimplemented && remote != bufconnect.DefaultRemote {
+ return nil, bufcli.NewUnimplementedRemoteError(err, remote, moduleConfig.ModuleIdentity.IdentityString())
+ }
+ return nil, err
+ }
+ dependencyModulePins, err := bufmoduleref.NewModulePinsForProtos(resp.Msg.ModulePins...)
+ if err != nil {
+ return nil, bufcli.NewInternalError(err)
+ }
+ // We want to create one repository service per relevant remote.
+ remoteToRepositoryService := make(map[string]registryv1alpha1connect.RepositoryServiceClient)
+ remoteToDependencyModulePins := make(map[string][]bufmoduleref.ModulePin)
+ for _, pin := range dependencyModulePins {
+ if _, ok := remoteToRepositoryService[pin.Remote()]; !ok {
+ remoteToRepositoryService[pin.Remote()] = connectclient.Make(clientConfig, pin.Remote(), registryv1alpha1connect.NewRepositoryServiceClient)
+ }
+ remoteToDependencyModulePins[pin.Remote()] = append(remoteToDependencyModulePins[pin.Remote()], pin)
+ }
+ var allPinnedRepositories []*pinnedRepository
+ for dependencyRemote, dependencyModulePins := range remoteToDependencyModulePins {
+ repositoryService, ok := remoteToRepositoryService[dependencyRemote]
+ if !ok {
+ return nil, fmt.Errorf("a repository service is not available for %s", dependencyRemote)
+ }
+ dependencyFullNames := make([]string, len(dependencyModulePins))
+ for i, pin := range dependencyModulePins {
+ dependencyFullNames[i] = fmt.Sprintf("%s/%s", pin.Owner(), pin.Repository())
+ }
+ resp, err := repositoryService.GetRepositoriesByFullName(ctx,
+ connect.NewRequest(®istryv1alpha1.GetRepositoriesByFullNameRequest{
+ FullNames: dependencyFullNames,
+ }))
+ if err != nil {
+ return nil, err
+ }
+ pinnedRepositories := make([]*pinnedRepository, len(dependencyModulePins))
+ for i, modulePin := range dependencyModulePins {
+ pinnedRepositories[i] = &pinnedRepository{
+ modulePin: modulePin,
+ repository: resp.Msg.Repositories[i],
+ }
+ }
+ allPinnedRepositories = append(allPinnedRepositories, pinnedRepositories...)
+ }
+ return allPinnedRepositories, nil
+}
+
+type pinnedRepository struct {
+ modulePin bufmoduleref.ModulePin
+ repository *registryv1alpha1.Repository
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modupdate/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modupdate/usage.gen.go
new file mode 100644
index 000000000..b85ecddf3
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/mod/modupdate/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package modupdate
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/push/push.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/push/push.go
new file mode 100644
index 000000000..52526f64c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/push/push.go
@@ -0,0 +1,204 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 push
+
+import (
+ "context"
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ tagFlagName = "tag"
+ tagFlagShortName = "t"
+ draftFlagName = "draft"
+ errorFormatFlagName = "error-format"
+ disableSymlinksFlagName = "disable-symlinks"
+ // deprecated
+ trackFlagName = "track"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: "Push a module to a registry.",
+ Long: bufcli.GetSourceLong(`the source to push`),
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Tags []string
+ Draft string
+ ErrorFormat string
+ DisableSymlinks bool
+ // Deprecated
+ Tracks []string
+ // special
+ InputHashtag string
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ bufcli.BindInputHashtag(flagSet, &f.InputHashtag)
+ bufcli.BindDisableSymlinks(flagSet, &f.DisableSymlinks, disableSymlinksFlagName)
+ flagSet.StringSliceVarP(
+ &f.Tags,
+ tagFlagName,
+ tagFlagShortName,
+ nil,
+ fmt.Sprintf(
+ "Create a tag for the pushed commit. Multiple tags are created if specified multiple times. Cannot be used together with --%s.",
+ draftFlagName,
+ ),
+ )
+ flagSet.StringVar(
+ &f.Draft,
+ draftFlagName,
+ "",
+ fmt.Sprintf(
+ "Make the pushed commit a draft with the specified name. Cannot be used together with --%s (-%s).",
+ tagFlagName,
+ tagFlagShortName,
+ ),
+ )
+ flagSet.StringVar(
+ &f.ErrorFormat,
+ errorFormatFlagName,
+ "text",
+ fmt.Sprintf(
+ "The format for build errors printed to stderr. Must be one of %s.",
+ stringutil.SliceToString(bufanalysis.AllFormatStrings),
+ ),
+ )
+ flagSet.StringSliceVar(
+ &f.Tracks,
+ trackFlagName,
+ nil,
+ "Do not use. This flag never had any effect",
+ )
+ _ = flagSet.MarkHidden(trackFlagName)
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) (retErr error) {
+ if len(flags.Tracks) > 0 {
+ return appcmd.NewInvalidArgumentErrorf("--%s has never had any effect, do not use.", trackFlagName)
+ }
+ if err := bufcli.ValidateErrorFormatFlag(flags.ErrorFormat, errorFormatFlagName); err != nil {
+ return err
+ }
+ if len(flags.Tags) > 0 && flags.Draft != "" {
+ return appcmd.NewInvalidArgumentErrorf("--%s (-%s) and --%s cannot be used together.", tagFlagName, tagFlagShortName, draftFlagName)
+ }
+ source, err := bufcli.GetInputValue(container, flags.InputHashtag, ".")
+ if err != nil {
+ return err
+ }
+ storageosProvider := bufcli.NewStorageosProvider(flags.DisableSymlinks)
+ runner := command.NewRunner()
+ // We are pushing to the BSR, this module has to be independently buildable
+ // given the configuration it has without any enclosing workspace.
+ sourceBucket, sourceConfig, err := bufcli.BucketAndConfigForSource(
+ ctx,
+ container.Logger(),
+ container,
+ storageosProvider,
+ runner,
+ source,
+ )
+ if err != nil {
+ return err
+ }
+ moduleIdentity := sourceConfig.ModuleIdentity
+ module, err := bufcli.ReadModule(
+ ctx,
+ container.Logger(),
+ sourceBucket,
+ sourceConfig,
+ )
+ if err != nil {
+ return err
+ }
+ protoModule, err := bufmodule.ModuleToProtoModule(ctx, module)
+ if err != nil {
+ return err
+ }
+ clientConfig, err := bufcli.NewConnectClientConfig(container)
+ if err != nil {
+ return err
+ }
+ service := connectclient.Make(clientConfig, moduleIdentity.Remote(), registryv1alpha1connect.NewPushServiceClient)
+ resp, err := service.Push(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.PushRequest{
+ Owner: moduleIdentity.Owner(),
+ Repository: moduleIdentity.Repository(),
+ Module: protoModule,
+ Tags: flags.Tags,
+ DraftName: flags.Draft,
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeAlreadyExists {
+ if _, err := container.Stderr().Write(
+ []byte("The latest commit has the same content; not creating a new commit.\n"),
+ ); err != nil {
+ return err
+ }
+ return nil
+ }
+ return err
+ }
+ if resp.Msg.LocalModulePin == nil {
+ return errors.New("Missing local module pin in the registry's response.")
+ }
+ if _, err := container.Stdout().Write([]byte(resp.Msg.LocalModulePin.Commit + "\n")); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/push/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/push/usage.gen.go
new file mode 100644
index 000000000..eb5f7b4af
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/push/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package push
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogin/registrylogin.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogin/registrylogin.go
new file mode 100644
index 000000000..4b1945e08
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogin/registrylogin.go
@@ -0,0 +1,230 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 registrylogin
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "strings"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufconnect"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/netrc"
+ "github.com/bufbuild/connect-go"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+const (
+ usernameFlagName = "username"
+ tokenStdinFlagName = "token-stdin"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ Use: name + " ",
+ Short: `Log in to the Buf Schema Registry.`,
+ Long: fmt.Sprintf(`This prompts for your BSR username and a BSR token and updates your %s file with these credentials.
+The argument will default to buf.build if not specified.`, netrc.Filename),
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ BindFlags: flags.Bind,
+ }
+}
+
+type flags struct {
+ Username string
+ TokenStdin bool
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {
+ flagSet.StringVar(
+ &f.Username,
+ usernameFlagName,
+ "",
+ "The username to use. This command prompts for a username by default.",
+ )
+ flagSet.BoolVar(
+ &f.TokenStdin,
+ tokenStdinFlagName,
+ false,
+ "Read the token from stdin. This command prompts for a token by default.",
+ )
+}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ // If a user sends a SIGINT to buf, the top-level application context is
+ // cancelled and signal masks are reset. However, during an interactive
+ // login the context is not respected; for example, it takes two SIGINTs
+ // to interrupt the process.
+
+ // Ideally we could just trigger an I/O timeout by setting the deadline on
+ // stdin, but when stdin is connected to a terminal the underlying fd is in
+ // blocking mode making it ineligible. As changing the mode of stdin is
+ // dangerous, this change takes an alternate approach of simply returning
+ // early.
+
+ // Note that this does not gracefully handle the case where the terminal is
+ // in no-echo mode, as is the case when prompting for a password
+ // interactively.
+ errC := make(chan error, 1)
+ go func() {
+ errC <- inner(ctx, container, flags)
+ close(errC)
+ }()
+ select {
+ case err := <-errC:
+ return err
+ case <-ctx.Done():
+ ctxErr := ctx.Err()
+ // Otherwise we will print "Failure: context canceled".
+ if errors.Is(ctxErr, context.Canceled) {
+ // Otherwise the next terminal line will be on the same line as the
+ // last output from buf.
+ if _, err := fmt.Fprintln(container.Stdout()); err != nil {
+ return err
+ }
+ return nil
+ }
+ return ctxErr
+ }
+}
+
+func inner(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ remote := bufconnect.DefaultRemote
+ if container.NumArgs() == 1 {
+ remote = container.Arg(0)
+ }
+ // Do not print unless we are prompting
+ if flags.Username == "" && !flags.TokenStdin {
+ if _, err := fmt.Fprintf(
+ container.Stdout(),
+ "Log in with your Buf Schema Registry username. If you don't have a username, create one at https://%s.\n\n",
+ remote,
+ ); err != nil {
+ return err
+ }
+ }
+ username := flags.Username
+ if username == "" {
+ var err error
+ username, err = bufcli.PromptUser(container, "Username: ")
+ if err != nil {
+ if errors.Is(err, bufcli.ErrNotATTY) {
+ return errors.New("cannot perform an interactive login from a non-TTY device")
+ }
+ return err
+ }
+ }
+ var token string
+ if flags.TokenStdin {
+ data, err := io.ReadAll(container.Stdin())
+ if err != nil {
+ return err
+ }
+ token = string(data)
+ } else {
+ var err error
+ token, err = bufcli.PromptUserForPassword(container, "Token: ")
+ if err != nil {
+ if errors.Is(err, bufcli.ErrNotATTY) {
+ return errors.New("cannot perform an interactive login from a non-TTY device")
+ }
+ return err
+ }
+ }
+ // Remove leading and trailing spaces from user-supplied token to avoid
+ // common input errors such as trailing new lines, as-is the case of using
+ // echo vs echo -n.
+ token = strings.TrimSpace(token)
+ if token == "" {
+ return errors.New("token cannot be empty string")
+ }
+ clientConfig, err := bufcli.NewConnectClientConfigWithToken(container, token)
+ if err != nil {
+ return err
+ }
+ authnService := connectclient.Make(clientConfig, remote, registryv1alpha1connect.NewAuthnServiceClient)
+ resp, err := authnService.GetCurrentUser(ctx, connect.NewRequest(®istryv1alpha1.GetCurrentUserRequest{}))
+ if err != nil {
+ // We don't want to use the default error from wrapError here if the error
+ // an unauthenticated error.
+ return errors.New("invalid token provided")
+ }
+ user := resp.Msg.User
+ if user == nil {
+ return errors.New("no user found for provided token")
+ }
+ if user.Username != username {
+ return fmt.Errorf("the username associated with that token (%s) does not match the username provided (%s)", user.Username, username)
+ }
+ if err := netrc.PutMachines(
+ container,
+ netrc.NewMachine(
+ remote,
+ username,
+ token,
+ ),
+ netrc.NewMachine(
+ "go."+remote,
+ username,
+ token,
+ ),
+ ); err != nil {
+ return err
+ }
+ netrcFilePath, err := netrc.GetFilePath(container)
+ if err != nil {
+ return err
+ }
+ loggedInMessage := fmt.Sprintf("Credentials saved to %s.\n", netrcFilePath)
+ // Unless we did not prompt at all, print a newline first
+ if flags.Username == "" || !flags.TokenStdin {
+ loggedInMessage = "\n" + loggedInMessage
+ }
+ if _, err := container.Stdout().Write([]byte(loggedInMessage)); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogin/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogin/usage.gen.go
new file mode 100644
index 000000000..1a0189e3b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogin/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package registrylogin
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogout/registrylogout.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogout/registrylogout.go
new file mode 100644
index 000000000..08aaa6f4a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogout/registrylogout.go
@@ -0,0 +1,90 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 registrylogout
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/buf/bufcli"
+ "github.com/bufbuild/buf/private/bufpkg/bufconnect"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/app/appflag"
+ "github.com/bufbuild/buf/private/pkg/netrc"
+ "github.com/spf13/cobra"
+ "github.com/spf13/pflag"
+)
+
+// NewCommand returns a new Command.
+func NewCommand(
+ name string,
+ builder appflag.Builder,
+) *appcmd.Command {
+ flags := newFlags()
+ return &appcmd.Command{
+ // Not documenting the first arg (remote) as this is just for testing for now.
+ // TODO: Update when we have self-hosted.
+ Use: name,
+ Short: `Log out of the Buf Schema Registry.`,
+ Long: fmt.Sprintf(`This command removes any BSR credentials from your %s file.`, netrc.Filename),
+ Args: cobra.MaximumNArgs(1),
+ Run: builder.NewRunFunc(
+ func(ctx context.Context, container appflag.Container) error {
+ return run(ctx, container, flags)
+ },
+ bufcli.NewErrorInterceptor(),
+ ),
+ }
+}
+
+type flags struct {
+}
+
+func newFlags() *flags {
+ return &flags{}
+}
+
+func (f *flags) Bind(flagSet *pflag.FlagSet) {}
+
+func run(
+ ctx context.Context,
+ container appflag.Container,
+ flags *flags,
+) error {
+ remote := bufconnect.DefaultRemote
+ if container.NumArgs() == 1 {
+ remote = container.Arg(0)
+ }
+ modified1, err := netrc.DeleteMachineForName(container, remote)
+ if err != nil {
+ return err
+ }
+ modified2, err := netrc.DeleteMachineForName(container, "go."+remote)
+ if err != nil {
+ return err
+ }
+ netrcFilePath, err := netrc.GetFilePath(container)
+ if err != nil {
+ return err
+ }
+ loggedOutMessage := fmt.Sprintf("All existing BSR credentials removed from %s.\n", netrcFilePath)
+ if !modified1 && !modified2 {
+ loggedOutMessage = fmt.Sprintf("No BSR credentials found in %s; you are already logged out.\n", netrcFilePath)
+ }
+ if _, err := container.Stdout().Write([]byte(loggedOutMessage)); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogout/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogout/usage.gen.go
new file mode 100644
index 000000000..79b5d7f47
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/command/registry/registrylogout/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package registrylogout
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/usage.gen.go b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/usage.gen.go
new file mode 100644
index 000000000..aab3a6882
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/buf/cmd/buf/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package buf
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/bufanalysis.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/bufanalysis.go
new file mode 100644
index 000000000..ab4ebfb29
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/bufanalysis.go
@@ -0,0 +1,305 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufanalysis
+
+import (
+ "crypto/sha256"
+ "fmt"
+ "io"
+ "sort"
+ "strconv"
+ "strings"
+)
+
+const (
+ // FormatText is the text format for FileAnnotations.
+ FormatText Format = iota + 1
+ // FormatJSON is the JSON format for FileAnnotations.
+ FormatJSON
+ // FormatMSVS is the MSVS format for FileAnnotations.
+ FormatMSVS
+ // FormatJUnit is the JUnit format for FileAnnotations.
+ FormatJUnit
+)
+
+var (
+ // AllFormatStrings is all format strings without aliases.
+ //
+ // Sorted in the order we want to display them.
+ AllFormatStrings = []string{
+ "text",
+ "json",
+ "msvs",
+ "junit",
+ }
+ // AllFormatStringsWithAliases is all format strings with aliases.
+ //
+ // Sorted in the order we want to display them.
+ AllFormatStringsWithAliases = []string{
+ "text",
+ "gcc",
+ "json",
+ "msvs",
+ "junit",
+ }
+
+ stringToFormat = map[string]Format{
+ "text": FormatText,
+ // alias for text
+ "gcc": FormatText,
+ "json": FormatJSON,
+ "msvs": FormatMSVS,
+ "junit": FormatJUnit,
+ }
+ formatToString = map[Format]string{
+ FormatText: "text",
+ FormatJSON: "json",
+ FormatMSVS: "msvs",
+ FormatJUnit: "junit",
+ }
+)
+
+// Format is a FileAnnotation format.
+type Format int
+
+// String implements fmt.Stringer.
+func (f Format) String() string {
+ s, ok := formatToString[f]
+ if !ok {
+ return strconv.Itoa(int(f))
+ }
+ return s
+}
+
+// ParseFormat parses the Format.
+//
+// The empty strings defaults to FormatText.
+func ParseFormat(s string) (Format, error) {
+ s = strings.ToLower(strings.TrimSpace(s))
+ if s == "" {
+ return FormatText, nil
+ }
+ f, ok := stringToFormat[s]
+ if ok {
+ return f, nil
+ }
+ return 0, fmt.Errorf("unknown format: %q", s)
+}
+
+// FileInfo is a minimal FileInfo interface.
+type FileInfo interface {
+ Path() string
+ ExternalPath() string
+}
+
+// FileAnnotation is a file annotation.
+type FileAnnotation interface {
+ // Stringer returns the string representation of this annotation.
+ fmt.Stringer
+
+ // FileInfo is the FileInfo for this annotation.
+ //
+ // This may be nil.
+ FileInfo() FileInfo
+
+ // StartLine is the starting line.
+ //
+ // If the starting line is not known, this will be 0.
+ StartLine() int
+ // StartColumn is the starting column.
+ //
+ // If the starting column is not known, this will be 0.
+ StartColumn() int
+ // EndLine is the ending line.
+ //
+ // If the ending line is not known, this will be 0.
+ // If the ending line is the same as the starting line, this will be explicitly
+ // set to the same value as start_line.
+ EndLine() int
+ // EndColumn is the ending column.
+ //
+ // If the ending column is not known, this will be 0.
+ // If the ending column is the same as the starting column, this will be explicitly
+ // set to the same value as start_column.
+ EndColumn() int
+ // Type is the type of annotation, typically an ID representing a failure type.
+ Type() string
+ // Message is the message of the annotation.
+ Message() string
+}
+
+// NewFileAnnotation returns a new FileAnnotation.
+func NewFileAnnotation(
+ fileInfo FileInfo,
+ startLine int,
+ startColumn int,
+ endLine int,
+ endColumn int,
+ typeString string,
+ message string,
+) FileAnnotation {
+ return newFileAnnotation(
+ fileInfo,
+ startLine,
+ startColumn,
+ endLine,
+ endColumn,
+ typeString,
+ message,
+ )
+}
+
+// SortFileAnnotations sorts the FileAnnotations.
+//
+// The order of sorting is:
+//
+// ExternalPath
+// StartLine
+// StartColumn
+// Type
+// Message
+// EndLine
+// EndColumn
+func SortFileAnnotations(fileAnnotations []FileAnnotation) {
+ sort.Stable(sortFileAnnotations(fileAnnotations))
+}
+
+// DeduplicateAndSortFileAnnotations deduplicates the FileAnnotations based on their
+// string representation and sorts them according to the order specified in SortFileAnnotations.
+func DeduplicateAndSortFileAnnotations(fileAnnotations []FileAnnotation) []FileAnnotation {
+ deduplicated := make([]FileAnnotation, 0, len(fileAnnotations))
+ seen := make(map[string]struct{}, len(fileAnnotations))
+ for _, fileAnnotation := range fileAnnotations {
+ key := hash(fileAnnotation)
+ if _, ok := seen[key]; ok {
+ continue
+ }
+ seen[key] = struct{}{}
+ deduplicated = append(deduplicated, fileAnnotation)
+ }
+ SortFileAnnotations(deduplicated)
+ return deduplicated
+}
+
+// PrintFileAnnotations prints the file annotations separated by newlines.
+func PrintFileAnnotations(writer io.Writer, fileAnnotations []FileAnnotation, formatString string) error {
+ format, err := ParseFormat(formatString)
+ if err != nil {
+ return err
+ }
+
+ switch format {
+ case FormatText:
+ return printAsText(writer, fileAnnotations)
+ case FormatJSON:
+ return printAsJSON(writer, fileAnnotations)
+ case FormatMSVS:
+ return printAsMSVS(writer, fileAnnotations)
+ case FormatJUnit:
+ return printAsJUnit(writer, fileAnnotations)
+ default:
+ return fmt.Errorf("unknown FileAnnotation Format: %v", format)
+ }
+}
+
+// hash returns a hash value that uniquely identifies the given FileAnnotation.
+func hash(fileAnnotation FileAnnotation) string {
+ path := ""
+ if fileInfo := fileAnnotation.FileInfo(); fileInfo != nil {
+ path = fileInfo.ExternalPath()
+ }
+ hash := sha256.New()
+ _, _ = hash.Write([]byte(path))
+ _, _ = hash.Write([]byte(strconv.Itoa(fileAnnotation.StartLine())))
+ _, _ = hash.Write([]byte(strconv.Itoa(fileAnnotation.StartColumn())))
+ _, _ = hash.Write([]byte(strconv.Itoa(fileAnnotation.EndLine())))
+ _, _ = hash.Write([]byte(strconv.Itoa(fileAnnotation.EndColumn())))
+ _, _ = hash.Write([]byte(fileAnnotation.Type()))
+ _, _ = hash.Write([]byte(fileAnnotation.Message()))
+ return string(hash.Sum(nil))
+}
+
+type sortFileAnnotations []FileAnnotation
+
+func (a sortFileAnnotations) Len() int { return len(a) }
+func (a sortFileAnnotations) Swap(i int, j int) { a[i], a[j] = a[j], a[i] }
+func (a sortFileAnnotations) Less(i int, j int) bool { return fileAnnotationCompareTo(a[i], a[j]) < 0 }
+
+// fileAnnotationCompareTo returns a value less than 0 if a < b, a value
+// greater than 0 if a > b, and 0 if a == b.
+func fileAnnotationCompareTo(a FileAnnotation, b FileAnnotation) int {
+ if a == nil && b == nil {
+ return 0
+ }
+ if a == nil && b != nil {
+ return -1
+ }
+ if a != nil && b == nil {
+ return 1
+ }
+ aFileInfo := a.FileInfo()
+ bFileInfo := b.FileInfo()
+ if aFileInfo == nil && bFileInfo != nil {
+ return -1
+ }
+ if aFileInfo != nil && bFileInfo == nil {
+ return 1
+ }
+ if aFileInfo != nil && bFileInfo != nil {
+ if aFileInfo.ExternalPath() < bFileInfo.ExternalPath() {
+ return -1
+ }
+ if aFileInfo.ExternalPath() > bFileInfo.ExternalPath() {
+ return 1
+ }
+ }
+ if a.StartLine() < b.StartLine() {
+ return -1
+ }
+ if a.StartLine() > b.StartLine() {
+ return 1
+ }
+ if a.StartColumn() < b.StartColumn() {
+ return -1
+ }
+ if a.StartColumn() > b.StartColumn() {
+ return 1
+ }
+ if a.Type() < b.Type() {
+ return -1
+ }
+ if a.Type() > b.Type() {
+ return 1
+ }
+ if a.Message() < b.Message() {
+ return -1
+ }
+ if a.Message() > b.Message() {
+ return 1
+ }
+ if a.EndLine() < b.EndLine() {
+ return -1
+ }
+ if a.EndLine() > b.EndLine() {
+ return 1
+ }
+ if a.EndColumn() < b.EndColumn() {
+ return -1
+ }
+ if a.EndColumn() > b.EndColumn() {
+ return 1
+ }
+ return 0
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/file_annotation.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/file_annotation.go
new file mode 100644
index 000000000..9bf5ac33d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/file_annotation.go
@@ -0,0 +1,113 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufanalysis
+
+import (
+ "bytes"
+ "strconv"
+)
+
+type fileAnnotation struct {
+ fileInfo FileInfo
+ startLine int
+ startColumn int
+ endLine int
+ endColumn int
+ typeString string
+ message string
+}
+
+func newFileAnnotation(
+ fileInfo FileInfo,
+ startLine int,
+ startColumn int,
+ endLine int,
+ endColumn int,
+ typeString string,
+ message string,
+) *fileAnnotation {
+ return &fileAnnotation{
+ fileInfo: fileInfo,
+ startLine: startLine,
+ startColumn: startColumn,
+ endLine: endLine,
+ endColumn: endColumn,
+ typeString: typeString,
+ message: message,
+ }
+}
+
+func (f *fileAnnotation) FileInfo() FileInfo {
+ return f.fileInfo
+}
+
+func (f *fileAnnotation) StartLine() int {
+ return f.startLine
+}
+
+func (f *fileAnnotation) StartColumn() int {
+ return f.startColumn
+}
+
+func (f *fileAnnotation) EndLine() int {
+ return f.endLine
+}
+
+func (f *fileAnnotation) EndColumn() int {
+ return f.endColumn
+}
+
+func (f *fileAnnotation) Type() string {
+ return f.typeString
+}
+
+func (f *fileAnnotation) Message() string {
+ return f.message
+}
+
+func (f *fileAnnotation) String() string {
+ if f == nil {
+ return ""
+ }
+ path := " "
+ line := f.startLine
+ column := f.startColumn
+ message := f.message
+ if f.fileInfo != nil {
+ path = f.fileInfo.ExternalPath()
+ }
+ if line == 0 {
+ line = 1
+ }
+ if column == 0 {
+ column = 1
+ }
+ if message == "" {
+ message = f.typeString
+ // should never happen but just in case
+ if message == "" {
+ message = "FAILURE"
+ }
+ }
+ buffer := bytes.NewBuffer(nil)
+ _, _ = buffer.WriteString(path)
+ _, _ = buffer.WriteRune(':')
+ _, _ = buffer.WriteString(strconv.Itoa(line))
+ _, _ = buffer.WriteRune(':')
+ _, _ = buffer.WriteString(strconv.Itoa(column))
+ _, _ = buffer.WriteRune(':')
+ _, _ = buffer.WriteString(message)
+ return buffer.String()
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/print.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/print.go
new file mode 100644
index 000000000..fc1aafe90
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/print.go
@@ -0,0 +1,247 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufanalysis
+
+import (
+ "bytes"
+ "encoding/json"
+ "encoding/xml"
+ "fmt"
+ "io"
+ "strconv"
+ "strings"
+)
+
+func printAsText(writer io.Writer, fileAnnotations []FileAnnotation) error {
+ return printEachAnnotationOnNewLine(
+ writer,
+ fileAnnotations,
+ printFileAnnotationAsText,
+ )
+}
+
+func printAsMSVS(writer io.Writer, fileAnnotations []FileAnnotation) error {
+ return printEachAnnotationOnNewLine(
+ writer,
+ fileAnnotations,
+ printFileAnnotationAsMSVS,
+ )
+}
+
+func printAsJSON(writer io.Writer, fileAnnotations []FileAnnotation) error {
+ return printEachAnnotationOnNewLine(
+ writer,
+ fileAnnotations,
+ printFileAnnotationAsJSON,
+ )
+}
+
+func printAsJUnit(writer io.Writer, fileAnnotations []FileAnnotation) error {
+ encoder := xml.NewEncoder(writer)
+ encoder.Indent("", " ")
+ testsuites := xml.StartElement{Name: xml.Name{Local: "testsuites"}}
+ err := encoder.EncodeToken(testsuites)
+ if err != nil {
+ return err
+ }
+ annotationsByPath := groupAnnotationsByPath(fileAnnotations)
+ for _, annotations := range annotationsByPath {
+ path := " "
+ if fileInfo := annotations[0].FileInfo(); fileInfo != nil {
+ path = fileInfo.ExternalPath()
+ }
+ path = strings.TrimSuffix(path, ".proto")
+ testsuite := xml.StartElement{
+ Name: xml.Name{Local: "testsuite"},
+ Attr: []xml.Attr{
+ {Name: xml.Name{Local: "name"}, Value: path},
+ {Name: xml.Name{Local: "tests"}, Value: strconv.Itoa(len(annotations))},
+ {Name: xml.Name{Local: "failures"}, Value: strconv.Itoa(len(annotations))},
+ {Name: xml.Name{Local: "errors"}, Value: "0"},
+ },
+ }
+ if err := encoder.EncodeToken(testsuite); err != nil {
+ return err
+ }
+ for _, annotation := range annotations {
+ if err := printFileAnnotationAsJUnit(encoder, annotation); err != nil {
+ return err
+ }
+ }
+ if err := encoder.EncodeToken(xml.EndElement{Name: testsuite.Name}); err != nil {
+ return err
+ }
+ }
+ if err := encoder.EncodeToken(xml.EndElement{Name: testsuites.Name}); err != nil {
+ return err
+ }
+ if err := encoder.Flush(); err != nil {
+ return err
+ }
+ if _, err := writer.Write([]byte("\n")); err != nil {
+ return err
+ }
+ return nil
+}
+
+func printFileAnnotationAsJUnit(encoder *xml.Encoder, annotation FileAnnotation) error {
+ testcase := xml.StartElement{Name: xml.Name{Local: "testcase"}}
+ name := annotation.Type()
+ if annotation.StartColumn() != 0 {
+ name += fmt.Sprintf("_%d_%d", annotation.StartLine(), annotation.StartColumn())
+ } else if annotation.StartLine() != 0 {
+ name += fmt.Sprintf("_%d", annotation.StartLine())
+ }
+ testcase.Attr = append(testcase.Attr, xml.Attr{Name: xml.Name{Local: "name"}, Value: name})
+ if err := encoder.EncodeToken(testcase); err != nil {
+ return err
+ }
+ failure := xml.StartElement{
+ Name: xml.Name{Local: "failure"},
+ Attr: []xml.Attr{
+ {Name: xml.Name{Local: "message"}, Value: annotation.String()},
+ {Name: xml.Name{Local: "type"}, Value: annotation.Type()},
+ },
+ }
+ if err := encoder.EncodeToken(failure); err != nil {
+ return err
+ }
+ if err := encoder.EncodeToken(xml.EndElement{Name: failure.Name}); err != nil {
+ return err
+ }
+ if err := encoder.EncodeToken(xml.EndElement{Name: testcase.Name}); err != nil {
+ return err
+ }
+ return nil
+}
+
+func groupAnnotationsByPath(annotations []FileAnnotation) [][]FileAnnotation {
+ pathToIndex := make(map[string]int)
+ annotationsByPath := make([][]FileAnnotation, 0)
+ for _, annotation := range annotations {
+ path := " "
+ if fileInfo := annotation.FileInfo(); fileInfo != nil {
+ path = fileInfo.ExternalPath()
+ }
+ index, ok := pathToIndex[path]
+ if !ok {
+ index = len(annotationsByPath)
+ pathToIndex[path] = index
+ annotationsByPath = append(annotationsByPath, nil)
+ }
+ annotationsByPath[index] = append(annotationsByPath[index], annotation)
+ }
+ return annotationsByPath
+}
+
+func printFileAnnotationAsText(buffer *bytes.Buffer, f FileAnnotation) error {
+ _, _ = buffer.WriteString(f.String())
+ return nil
+}
+
+func printFileAnnotationAsMSVS(buffer *bytes.Buffer, f FileAnnotation) error {
+ // This will work as long as f != (*fileAnnotation)(nil)
+ if f == nil {
+ return nil
+ }
+ path := " "
+ line := f.StartLine()
+ column := f.StartColumn()
+ message := f.Message()
+ if f.FileInfo() != nil {
+ path = f.FileInfo().ExternalPath()
+ }
+ if line == 0 {
+ line = 1
+ }
+ typeString := f.Type()
+ if typeString == "" {
+ // should never happen but just in case
+ typeString = "FAILURE"
+ }
+ if message == "" {
+ message = f.Type()
+ // should never happen but just in case
+ if message == "" {
+ message = "FAILURE"
+ }
+ }
+ _, _ = buffer.WriteString(path)
+ _, _ = buffer.WriteRune('(')
+ _, _ = buffer.WriteString(strconv.Itoa(line))
+ if column != 0 {
+ _, _ = buffer.WriteRune(',')
+ _, _ = buffer.WriteString(strconv.Itoa(column))
+ }
+ _, _ = buffer.WriteString(") : error ")
+ _, _ = buffer.WriteString(typeString)
+ _, _ = buffer.WriteString(" : ")
+ _, _ = buffer.WriteString(message)
+ return nil
+}
+
+func printFileAnnotationAsJSON(buffer *bytes.Buffer, f FileAnnotation) error {
+ data, err := json.Marshal(newExternalFileAnnotation(f))
+ if err != nil {
+ return err
+ }
+ _, _ = buffer.Write(data)
+ return nil
+}
+
+type externalFileAnnotation struct {
+ Path string `json:"path,omitempty" yaml:"path,omitempty"`
+ StartLine int `json:"start_line,omitempty" yaml:"start_line,omitempty"`
+ StartColumn int `json:"start_column,omitempty" yaml:"start_column,omitempty"`
+ EndLine int `json:"end_line,omitempty" yaml:"end_line,omitempty"`
+ EndColumn int `json:"end_column,omitempty" yaml:"end_column,omitempty"`
+ Type string `json:"type,omitempty" yaml:"type,omitempty"`
+ Message string `json:"message,omitempty" yaml:"message,omitempty"`
+}
+
+func newExternalFileAnnotation(f FileAnnotation) externalFileAnnotation {
+ path := ""
+ if f.FileInfo() != nil {
+ path = f.FileInfo().ExternalPath()
+ }
+ return externalFileAnnotation{
+ Path: path,
+ StartLine: f.StartLine(),
+ StartColumn: f.StartColumn(),
+ EndLine: f.EndLine(),
+ EndColumn: f.EndColumn(),
+ Type: f.Type(),
+ Message: f.Message(),
+ }
+}
+
+func printEachAnnotationOnNewLine(
+ writer io.Writer,
+ fileAnnotations []FileAnnotation,
+ fileAnnotationPrinter func(writer *bytes.Buffer, fileAnnotation FileAnnotation) error,
+) error {
+ buffer := bytes.NewBuffer(nil)
+ for _, fileAnnotation := range fileAnnotations {
+ buffer.Reset()
+ if err := fileAnnotationPrinter(buffer, fileAnnotation); err != nil {
+ return err
+ }
+ _, _ = buffer.WriteString("\n")
+ if _, err := writer.Write(buffer.Bytes()); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/usage.gen.go
new file mode 100644
index 000000000..af993b3db
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufanalysis/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufanalysis
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/bufapimodule.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/bufapimodule.go
new file mode 100644
index 000000000..64bd14a2e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/bufapimodule.go
@@ -0,0 +1,55 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufapimodule provides bufmodule types based on bufapi types.
+package bufapimodule
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "go.uber.org/zap"
+)
+
+type DownloadServiceClientFactory func(address string) registryv1alpha1connect.DownloadServiceClient
+type RepositoryCommitServiceClientFactory func(address string) registryv1alpha1connect.RepositoryCommitServiceClient
+
+func NewDownloadServiceClientFactory(clientConfig *connectclient.Config) DownloadServiceClientFactory {
+ return func(address string) registryv1alpha1connect.DownloadServiceClient {
+ return connectclient.Make(clientConfig, address, registryv1alpha1connect.NewDownloadServiceClient)
+ }
+}
+
+func NewRepositoryCommitServiceClientFactory(clientConfig *connectclient.Config) RepositoryCommitServiceClientFactory {
+ return func(address string) registryv1alpha1connect.RepositoryCommitServiceClient {
+ return connectclient.Make(clientConfig, address, registryv1alpha1connect.NewRepositoryCommitServiceClient)
+ }
+}
+
+// NewModuleReader returns a new ModuleReader backed by the download service.
+func NewModuleReader(
+ downloadClientFactory DownloadServiceClientFactory,
+) bufmodule.ModuleReader {
+ return newModuleReader(
+ downloadClientFactory,
+ )
+}
+
+// NewModuleResolver returns a new ModuleResolver backed by the resolve service.
+func NewModuleResolver(
+ logger *zap.Logger,
+ repositoryCommitClientFactory RepositoryCommitServiceClientFactory,
+) bufmodule.ModuleResolver {
+ return newModuleResolver(logger, repositoryCommitClientFactory)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/module_reader.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/module_reader.go
new file mode 100644
index 000000000..42c8e7c57
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/module_reader.go
@@ -0,0 +1,68 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufapimodule
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/connect-go"
+)
+
+type moduleReader struct {
+ downloadClientFactory DownloadServiceClientFactory
+}
+
+func newModuleReader(
+ downloadClientFactory DownloadServiceClientFactory,
+) *moduleReader {
+ return &moduleReader{
+ downloadClientFactory: downloadClientFactory,
+ }
+}
+
+func (m *moduleReader) GetModule(ctx context.Context, modulePin bufmoduleref.ModulePin) (bufmodule.Module, error) {
+ downloadService := m.downloadClientFactory(modulePin.Remote())
+ resp, err := downloadService.Download(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.DownloadRequest{
+ Owner: modulePin.Owner(),
+ Repository: modulePin.Repository(),
+ Reference: modulePin.Commit(),
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ // Required by ModuleReader interface spec
+ return nil, storage.NewErrNotExist(modulePin.String())
+ }
+ return nil, err
+ }
+ moduleIdentity, err := bufmoduleref.NewModuleIdentity(
+ modulePin.Remote(),
+ modulePin.Owner(),
+ modulePin.Repository(),
+ )
+ if err != nil {
+ return nil, err
+ }
+ return bufmodule.NewModuleForProto(
+ ctx, resp.Msg.Module,
+ bufmodule.ModuleWithModuleIdentityAndCommit(moduleIdentity, modulePin.Commit()),
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/module_resolver.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/module_resolver.go
new file mode 100644
index 000000000..2f8292dea
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/module_resolver.go
@@ -0,0 +1,71 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufapimodule
+
+import (
+ "context"
+ "errors"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/connect-go"
+ "go.uber.org/zap"
+)
+
+type moduleResolver struct {
+ logger *zap.Logger
+ repositoryCommitClientFactory RepositoryCommitServiceClientFactory
+}
+
+func newModuleResolver(
+ logger *zap.Logger,
+ repositoryCommitClientFactory RepositoryCommitServiceClientFactory,
+) *moduleResolver {
+ return &moduleResolver{
+ logger: logger,
+ repositoryCommitClientFactory: repositoryCommitClientFactory,
+ }
+}
+
+func (m *moduleResolver) GetModulePin(ctx context.Context, moduleReference bufmoduleref.ModuleReference) (bufmoduleref.ModulePin, error) {
+ repositoryCommitService := m.repositoryCommitClientFactory(moduleReference.Remote())
+ resp, err := repositoryCommitService.GetRepositoryCommitByReference(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetRepositoryCommitByReferenceRequest{
+ RepositoryOwner: moduleReference.Owner(),
+ RepositoryName: moduleReference.Repository(),
+ Reference: moduleReference.Reference(),
+ }),
+ )
+ if err != nil {
+ if connect.CodeOf(err) == connect.CodeNotFound {
+ // Required by ModuleResolver interface spec
+ return nil, storage.NewErrNotExist(moduleReference.String())
+ }
+ return nil, err
+ }
+ if resp.Msg.RepositoryCommit == nil {
+ return nil, errors.New("empty response")
+ }
+ return bufmoduleref.NewModulePin(
+ moduleReference.Remote(),
+ moduleReference.Owner(),
+ moduleReference.Repository(),
+ "",
+ resp.Msg.RepositoryCommit.Name,
+ resp.Msg.RepositoryCommit.CreateTime.AsTime(),
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/usage.gen.go
new file mode 100644
index 000000000..f6e61a272
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufapimodule/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufapimodule
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreaking.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreaking.go
new file mode 100644
index 000000000..86a73824d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreaking.go
@@ -0,0 +1,140 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufbreaking contains the breaking change detection functionality.
+//
+// The primary entry point to this package is the Handler.
+package bufbreaking
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "go.uber.org/zap"
+)
+
+// Handler handles the main breaking functionality.
+type Handler interface {
+ // Check runs the breaking checks.
+ //
+ // The image should have source code info for this to work properly. The previousImage
+ // does not need to have source code info.
+ //
+ // Images should be filtered with regards to imports before passing to this function.
+ Check(
+ ctx context.Context,
+ config *bufbreakingconfig.Config,
+ previousImage bufimage.Image,
+ image bufimage.Image,
+ ) ([]bufanalysis.FileAnnotation, error)
+}
+
+// NewHandler returns a new Handler.
+func NewHandler(logger *zap.Logger) Handler {
+ return newHandler(logger)
+}
+
+// RulesForConfig returns the rules for a given config.
+//
+// Should only be used for printing.
+func RulesForConfig(config *bufbreakingconfig.Config) ([]bufcheck.Rule, error) {
+ internalConfig, err := internalConfigForConfig(config)
+ if err != nil {
+ return nil, err
+ }
+ return rulesForInternalRules(internalConfig.Rules), nil
+}
+
+// GetAllRulesV1Beta1 gets all known rules.
+//
+// Should only be used for printing.
+func GetAllRulesV1Beta1() ([]bufcheck.Rule, error) {
+ internalConfig, err := internalConfigForConfig(
+ &bufbreakingconfig.Config{
+ Use: internal.AllIDsForVersionSpec(bufbreakingv1beta1.VersionSpec),
+ Version: bufconfig.V1Beta1Version,
+ },
+ )
+ if err != nil {
+ return nil, err
+ }
+ return rulesForInternalRules(internalConfig.Rules), nil
+}
+
+// GetAllRulesV1 gets all known rules.
+//
+// Should only be used for printing.
+func GetAllRulesV1() ([]bufcheck.Rule, error) {
+ internalConfig, err := internalConfigForConfig(
+ &bufbreakingconfig.Config{
+ Use: internal.AllIDsForVersionSpec(bufbreakingv1.VersionSpec),
+ Version: bufconfig.V1Version,
+ },
+ )
+ if err != nil {
+ return nil, err
+ }
+ return rulesForInternalRules(internalConfig.Rules), nil
+}
+
+// GetAllRulesAndCategoriesV1Beta1 returns all rules and categories for v1beta1 as a string slice.
+//
+// This is used for validation purposes only.
+func GetAllRulesAndCategoriesV1Beta1() []string {
+ return internal.AllCategoriesAndIDsForVersionSpec(bufbreakingv1beta1.VersionSpec)
+}
+
+// GetAllRulesAndCategoriesV1 returns all rules and categories for v1 as a string slice.
+//
+// This is used for validation purposes only.
+func GetAllRulesAndCategoriesV1() []string {
+ return internal.AllCategoriesAndIDsForVersionSpec(bufbreakingv1.VersionSpec)
+}
+
+func internalConfigForConfig(config *bufbreakingconfig.Config) (*internal.Config, error) {
+ var versionSpec *internal.VersionSpec
+ switch config.Version {
+ case bufconfig.V1Beta1Version:
+ versionSpec = bufbreakingv1beta1.VersionSpec
+ case bufconfig.V1Version:
+ versionSpec = bufbreakingv1.VersionSpec
+ }
+ return internal.ConfigBuilder{
+ Use: config.Use,
+ Except: config.Except,
+ IgnoreRootPaths: config.IgnoreRootPaths,
+ IgnoreIDOrCategoryToRootPaths: config.IgnoreIDOrCategoryToRootPaths,
+ IgnoreUnstablePackages: config.IgnoreUnstablePackages,
+ }.NewConfig(
+ versionSpec,
+ )
+}
+
+func rulesForInternalRules(rules []*internal.Rule) []bufcheck.Rule {
+ if rules == nil {
+ return nil
+ }
+ s := make([]bufcheck.Rule, len(rules))
+ for i, e := range rules {
+ s[i] = e
+ }
+ return s
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig/bufbreakingconfig.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig/bufbreakingconfig.go
new file mode 100644
index 000000000..9386c424f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig/bufbreakingconfig.go
@@ -0,0 +1,225 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufbreakingconfig
+
+import (
+ "encoding/json"
+ "sort"
+
+ breakingv1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/breaking/v1"
+)
+
+const (
+ // These versions match the versions in bufconfig. We cannot take an explicit dependency
+ // on bufconfig without creating a circular dependency.
+ v1Beta1Version = "v1beta1"
+ v1Version = "v1"
+)
+
+// Config is the breaking check config.
+type Config struct {
+ // Use is a list of the rule and/or category IDs that are included in the breaking change check.
+ Use []string
+ // Except is a list of the rule and/or category IDs that are excluded from the breaking change check.
+ Except []string
+ // IgnoreRootPaths is a list of the paths of directories and/or files that should be ignored by the breaking change check.
+ // All paths are relative to the root of the module.
+ IgnoreRootPaths []string
+ // IgnoreIDOrCategoryToRootPaths is a map of rule and/or category IDs to directory and/or file paths to exclude from the
+ // breaking change check.
+ IgnoreIDOrCategoryToRootPaths map[string][]string
+ // IgnoreUnstablePackages ignores packages with a last component that is one of the unstable forms recognised
+ // by the PACKAGE_VERSION_SUFFIX:
+ // v\d+test.*
+ // v\d+(alpha|beta)\d+
+ // v\d+p\d+(alpha|beta)\d+
+ IgnoreUnstablePackages bool
+ // Version represents the version of the breaking change rule and category IDs that should be used with this config.
+ Version string
+}
+
+// NewConfigV1Beta1 returns a new Config.
+func NewConfigV1Beta1(externalConfig ExternalConfigV1Beta1) *Config {
+ return &Config{
+ Use: externalConfig.Use,
+ Except: externalConfig.Except,
+ IgnoreRootPaths: externalConfig.Ignore,
+ IgnoreIDOrCategoryToRootPaths: externalConfig.IgnoreOnly,
+ IgnoreUnstablePackages: externalConfig.IgnoreUnstablePackages,
+ Version: v1Beta1Version,
+ }
+}
+
+// NewConfigV1 returns a new Config.
+func NewConfigV1(externalConfig ExternalConfigV1) *Config {
+ return &Config{
+ Use: externalConfig.Use,
+ Except: externalConfig.Except,
+ IgnoreRootPaths: externalConfig.Ignore,
+ IgnoreIDOrCategoryToRootPaths: externalConfig.IgnoreOnly,
+ IgnoreUnstablePackages: externalConfig.IgnoreUnstablePackages,
+ Version: v1Version,
+ }
+}
+
+// ConfigForProto returns the Config given the proto.
+func ConfigForProto(protoConfig *breakingv1.Config) *Config {
+ return &Config{
+ Use: protoConfig.GetUseIds(),
+ Except: protoConfig.GetExceptIds(),
+ IgnoreRootPaths: protoConfig.GetIgnorePaths(),
+ IgnoreIDOrCategoryToRootPaths: ignoreIDOrCategoryToRootPathsForProto(protoConfig.GetIgnoreIdPaths()),
+ IgnoreUnstablePackages: protoConfig.GetIgnoreUnstablePackages(),
+ Version: protoConfig.GetVersion(),
+ }
+}
+
+// ProtoForConfig takes a *Config and returns the proto representation.
+func ProtoForConfig(config *Config) *breakingv1.Config {
+ return &breakingv1.Config{
+ UseIds: config.Use,
+ ExceptIds: config.Except,
+ IgnorePaths: config.IgnoreRootPaths,
+ IgnoreIdPaths: protoForIgnoreIDOrCategoryToRootPaths(config.IgnoreIDOrCategoryToRootPaths),
+ IgnoreUnstablePackages: config.IgnoreUnstablePackages,
+ Version: config.Version,
+ }
+}
+
+// ExternalConfigV1Beta1 is an external config.
+type ExternalConfigV1Beta1 struct {
+ Use []string `json:"use,omitempty" yaml:"use,omitempty"`
+ Except []string `json:"except,omitempty" yaml:"except,omitempty"`
+ // IgnoreRootPaths
+ Ignore []string `json:"ignore,omitempty" yaml:"ignore,omitempty"`
+ // IgnoreIDOrCategoryToRootPaths
+ IgnoreOnly map[string][]string `json:"ignore_only,omitempty" yaml:"ignore_only,omitempty"`
+ IgnoreUnstablePackages bool `json:"ignore_unstable_packages,omitempty" yaml:"ignore_unstable_packages,omitempty"`
+}
+
+// ExternalConfigV1 is an external config.
+type ExternalConfigV1 struct {
+ Use []string `json:"use,omitempty" yaml:"use,omitempty"`
+ Except []string `json:"except,omitempty" yaml:"except,omitempty"`
+ // IgnoreRootPaths
+ Ignore []string `json:"ignore,omitempty" yaml:"ignore,omitempty"`
+ // IgnoreIDOrCategoryToRootPaths
+ IgnoreOnly map[string][]string `json:"ignore_only,omitempty" yaml:"ignore_only,omitempty"`
+ IgnoreUnstablePackages bool `json:"ignore_unstable_packages,omitempty" yaml:"ignore_unstable_packages,omitempty"`
+}
+
+// ExternalConfigV1Beta1ForConfig takes a *Config and returns the v1beta1 external config representation.
+func ExternalConfigV1Beta1ForConfig(config *Config) ExternalConfigV1Beta1 {
+ return ExternalConfigV1Beta1{
+ Use: config.Use,
+ Except: config.Except,
+ Ignore: config.IgnoreRootPaths,
+ IgnoreOnly: config.IgnoreIDOrCategoryToRootPaths,
+ IgnoreUnstablePackages: config.IgnoreUnstablePackages,
+ }
+}
+
+// ExternalConfigV1ForConfig takes a *Config and returns the v1 external config representation.
+func ExternalConfigV1ForConfig(config *Config) ExternalConfigV1 {
+ return ExternalConfigV1{
+ Use: config.Use,
+ Except: config.Except,
+ Ignore: config.IgnoreRootPaths,
+ IgnoreOnly: config.IgnoreIDOrCategoryToRootPaths,
+ IgnoreUnstablePackages: config.IgnoreUnstablePackages,
+ }
+}
+
+// BytesForConfig takes a *Config and returns the deterministic []byte representation.
+// We use an unexported intermediary JSON form and sort all fields to ensure that the bytes
+// associated with the *Config are deterministic.
+func BytesForConfig(config *Config) ([]byte, error) {
+ if config == nil {
+ return nil, nil
+ }
+ return json.Marshal(configToJSON(config))
+}
+
+type configJSON struct {
+ Use []string `json:"use,omitempty"`
+ Except []string `json:"except,omitempty"`
+ IgnoreRootPaths []string `json:"ignore_root_paths,omitempty"`
+ IgnoreIDOrCategoryToRootPaths []idPathsJSON `json:"ignore_id_to_root_paths,omitempty"`
+ IgnoreUnstablePackages bool `json:"ignore_unstable_packages,omitempty"`
+ Version string `json:"version,omitempty"`
+}
+
+type idPathsJSON struct {
+ ID string `json:"id,omitempty"`
+ Paths []string `json:"paths,omitempty"`
+}
+
+func configToJSON(config *Config) *configJSON {
+ ignoreIDPathsJSON := make([]idPathsJSON, 0, len(config.IgnoreIDOrCategoryToRootPaths))
+ for ignoreID, rootPaths := range config.IgnoreIDOrCategoryToRootPaths {
+ rootPathsCopy := make([]string, len(rootPaths))
+ copy(rootPathsCopy, rootPaths)
+ sort.Strings(rootPathsCopy)
+ ignoreIDPathsJSON = append(ignoreIDPathsJSON, idPathsJSON{
+ ID: ignoreID,
+ Paths: rootPathsCopy,
+ })
+ }
+ sort.Slice(ignoreIDPathsJSON, func(i, j int) bool { return ignoreIDPathsJSON[i].ID < ignoreIDPathsJSON[j].ID })
+ // We should not be sorting in place for the config structure, since it will mutate the
+ // underlying config ordering.
+ use := make([]string, len(config.Use))
+ copy(use, config.Use)
+ except := make([]string, len(config.Except))
+ copy(except, config.Except)
+ ignoreRootPaths := make([]string, len(config.IgnoreRootPaths))
+ copy(ignoreRootPaths, config.IgnoreRootPaths)
+ sort.Strings(use)
+ sort.Strings(except)
+ sort.Strings(ignoreRootPaths)
+ return &configJSON{
+ Use: use,
+ Except: except,
+ IgnoreRootPaths: ignoreRootPaths,
+ IgnoreIDOrCategoryToRootPaths: ignoreIDPathsJSON,
+ IgnoreUnstablePackages: config.IgnoreUnstablePackages,
+ Version: config.Version,
+ }
+}
+
+func ignoreIDOrCategoryToRootPathsForProto(protoIgnoreIDPaths []*breakingv1.IDPaths) map[string][]string {
+ if protoIgnoreIDPaths == nil {
+ return nil
+ }
+ ignoreIDOrCategoryToRootPaths := make(map[string][]string)
+ for _, protoIgnoreIDPath := range protoIgnoreIDPaths {
+ ignoreIDOrCategoryToRootPaths[protoIgnoreIDPath.GetId()] = protoIgnoreIDPath.GetPaths()
+ }
+ return ignoreIDOrCategoryToRootPaths
+}
+
+func protoForIgnoreIDOrCategoryToRootPaths(ignoreIDOrCategoryToRootPaths map[string][]string) []*breakingv1.IDPaths {
+ if ignoreIDOrCategoryToRootPaths == nil {
+ return nil
+ }
+ idPathsProto := make([]*breakingv1.IDPaths, 0, len(ignoreIDOrCategoryToRootPaths))
+ for id, paths := range ignoreIDOrCategoryToRootPaths {
+ idPathsProto = append(idPathsProto, &breakingv1.IDPaths{
+ Id: id,
+ Paths: paths,
+ })
+ }
+ return idPathsProto
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig/usage.gen.go
new file mode 100644
index 000000000..b70c27c31
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufbreakingconfig
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/handler.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/handler.go
new file mode 100644
index 000000000..3f963716d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/handler.go
@@ -0,0 +1,64 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufbreaking
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+ "go.uber.org/zap"
+)
+
+type handler struct {
+ logger *zap.Logger
+ runner *internal.Runner
+}
+
+func newHandler(
+ logger *zap.Logger,
+) *handler {
+ return &handler{
+ logger: logger,
+ // comment ignores are not allowed for breaking changes
+ // so do not set the ignore prefix per the RunnerWithIgnorePrefix comments
+ runner: internal.NewRunner(logger),
+ }
+}
+
+func (h *handler) Check(
+ ctx context.Context,
+ config *bufbreakingconfig.Config,
+ previousImage bufimage.Image,
+ image bufimage.Image,
+) ([]bufanalysis.FileAnnotation, error) {
+ previousFiles, err := protosource.NewFilesUnstable(ctx, bufimageutil.NewInputFiles(previousImage.Files())...)
+ if err != nil {
+ return nil, err
+ }
+ files, err := protosource.NewFilesUnstable(ctx, bufimageutil.NewInputFiles(image.Files())...)
+ if err != nil {
+ return nil, err
+ }
+ internalConfig, err := internalConfigForConfig(config)
+ if err != nil {
+ return nil, err
+ }
+ return h.runner.Check(ctx, internalConfig, previousFiles, files)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingbuild/bufbreakingbuild.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingbuild/bufbreakingbuild.go
new file mode 100644
index 000000000..c0744cc9c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingbuild/bufbreakingbuild.go
@@ -0,0 +1,371 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufbreakingbuild contains the RuleBuilders used by bufbreakingv*.
+//
+// In the future, we can have multiple versions of a RuleBuilder here, and then
+// include them separately in the bufbreakingv* packages. For example, FieldSameTypeRuleBuilder
+// could be split into FieldSameTypeRuleBuilder/FieldSameTypeRuleBuilderV2 which handle
+// primitives differently, and we could use the former in v1beta1, and the latter in v1.
+package bufbreakingbuild
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+)
+
+var (
+ // EnumNoDeleteRuleBuilder is a rule builder.
+ EnumNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "ENUM_NO_DELETE",
+ "enums are not deleted from a given file",
+ bufbreakingcheck.CheckEnumNoDelete,
+ )
+ // EnumValueNoDeleteRuleBuilder is a rule builder.
+ EnumValueNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "ENUM_VALUE_NO_DELETE",
+ "enum values are not deleted from a given enum",
+ bufbreakingcheck.CheckEnumValueNoDelete,
+ )
+ // EnumValueNoDeleteUnlessNameReservedRuleBuilder is a rule builder.
+ EnumValueNoDeleteUnlessNameReservedRuleBuilder = internal.NewNopRuleBuilder(
+ "ENUM_VALUE_NO_DELETE_UNLESS_NAME_RESERVED",
+ "enum values are not deleted from a given enum unless the name is reserved",
+ bufbreakingcheck.CheckEnumValueNoDeleteUnlessNameReserved,
+ )
+ // EnumValueNoDeleteUnlessNumberReservedRuleBuilder is a rule builder.
+ EnumValueNoDeleteUnlessNumberReservedRuleBuilder = internal.NewNopRuleBuilder(
+ "ENUM_VALUE_NO_DELETE_UNLESS_NUMBER_RESERVED",
+ "enum values are not deleted from a given enum unless the number is reserved",
+ bufbreakingcheck.CheckEnumValueNoDeleteUnlessNumberReserved,
+ )
+ // EnumValueSameNameRuleBuilder is a rule builder.
+ EnumValueSameNameRuleBuilder = internal.NewNopRuleBuilder(
+ "ENUM_VALUE_SAME_NAME",
+ "enum values have the same name",
+ bufbreakingcheck.CheckEnumValueSameName,
+ )
+ // ExtensionMessageNoDeleteRuleBuilder is a rule builder.
+ ExtensionMessageNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "EXTENSION_MESSAGE_NO_DELETE",
+ "extension ranges are not deleted from a given message",
+ bufbreakingcheck.CheckExtensionMessageNoDelete,
+ )
+ // FieldNoDeleteRuleBuilder is a rule builder.
+ FieldNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_NO_DELETE",
+ "fields are not deleted from a given message",
+ bufbreakingcheck.CheckFieldNoDelete,
+ )
+ // FieldNoDeleteUnlessNameReservedRuleBuilder is a rule builder.
+ FieldNoDeleteUnlessNameReservedRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_NO_DELETE_UNLESS_NAME_RESERVED",
+ "fields are not deleted from a given message unless the name is reserved",
+ bufbreakingcheck.CheckFieldNoDeleteUnlessNameReserved,
+ )
+ // FieldNoDeleteUnlessNumberReservedRuleBuilder is a rule builder.
+ FieldNoDeleteUnlessNumberReservedRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_NO_DELETE_UNLESS_NUMBER_RESERVED",
+ "fields are not deleted from a given message unless the number is reserved",
+ bufbreakingcheck.CheckFieldNoDeleteUnlessNumberReserved,
+ )
+ // FieldSameCTypeRuleBuilder is a rule builder.
+ FieldSameCTypeRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_SAME_CTYPE",
+ "fields have the same value for the ctype option",
+ bufbreakingcheck.CheckFieldSameCType,
+ )
+ // FieldSameJSONNameRuleBuilder is a rule builder.
+ FieldSameJSONNameRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_SAME_JSON_NAME",
+ "fields have the same value for the json_name option",
+ bufbreakingcheck.CheckFieldSameJSONName,
+ )
+ // FieldSameJSTypeRuleBuilder is a rule builder.
+ FieldSameJSTypeRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_SAME_JSTYPE",
+ "fields have the same value for the jstype option",
+ bufbreakingcheck.CheckFieldSameJSType,
+ )
+ // FieldSameLabelRuleBuilder is a rule builder.
+ FieldSameLabelRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_SAME_LABEL",
+ "fields have the same labels in a given message",
+ bufbreakingcheck.CheckFieldSameLabel,
+ )
+ // FieldSameNameRuleBuilder is a rule builder.
+ FieldSameNameRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_SAME_NAME",
+ "fields have the same names in a given message",
+ bufbreakingcheck.CheckFieldSameName,
+ )
+ // FieldSameOneofRuleBuilder is a rule builder.
+ FieldSameOneofRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_SAME_ONEOF",
+ "fields have the same oneofs in a given message",
+ bufbreakingcheck.CheckFieldSameOneof,
+ )
+ // FieldSameTypeRuleBuilder is a rule builder.
+ FieldSameTypeRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_SAME_TYPE",
+ "fields have the same types in a given message",
+ bufbreakingcheck.CheckFieldSameType,
+ )
+ // FieldWireCompatibleTypeRuleBuilder is a rule builder.
+ FieldWireCompatibleTypeRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_WIRE_COMPATIBLE_TYPE",
+ "fields have wire-compatible types in a given message",
+ bufbreakingcheck.CheckFieldWireCompatibleType,
+ )
+ // FieldWireJSONCompatibleTypeRuleBuilder is a rule builder.
+ FieldWireJSONCompatibleTypeRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_WIRE_JSON_COMPATIBLE_TYPE",
+ "fields have wire and JSON compatible types in a given message",
+ bufbreakingcheck.CheckFieldWireJSONCompatibleType,
+ )
+ // FileNoDeleteRuleBuilder is a rule builder.
+ FileNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_NO_DELETE",
+ "files are not deleted",
+ bufbreakingcheck.CheckFileNoDelete,
+ )
+ // FileSameCsharpNamespaceRuleBuilder is a rule builder.
+ FileSameCsharpNamespaceRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_CSHARP_NAMESPACE",
+ "files have the same value for the csharp_namespace option",
+ bufbreakingcheck.CheckFileSameCsharpNamespace,
+ )
+ // FileSameGoPackageRuleBuilder is a rule builder.
+ FileSameGoPackageRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_GO_PACKAGE",
+ "files have the same value for the go_package option",
+ bufbreakingcheck.CheckFileSameGoPackage,
+ )
+ // FileSameJavaMultipleFilesRuleBuilder is a rule builder.
+ FileSameJavaMultipleFilesRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_JAVA_MULTIPLE_FILES",
+ "files have the same value for the java_multiple_files option",
+ bufbreakingcheck.CheckFileSameJavaMultipleFiles,
+ )
+ // FileSameJavaOuterClassnameRuleBuilder is a rule builder.
+ FileSameJavaOuterClassnameRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_JAVA_OUTER_CLASSNAME",
+ "files have the same value for the java_outer_classname option",
+ bufbreakingcheck.CheckFileSameJavaOuterClassname,
+ )
+ // FileSameJavaPackageRuleBuilder is a rule builder.
+ FileSameJavaPackageRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_JAVA_PACKAGE",
+ "files have the same value for the java_package option",
+ bufbreakingcheck.CheckFileSameJavaPackage,
+ )
+ // FileSameJavaStringCheckUtf8RuleBuilder is a rule builder.
+ FileSameJavaStringCheckUtf8RuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_JAVA_STRING_CHECK_UTF8",
+ "files have the same value for the java_string_check_utf8 option",
+ bufbreakingcheck.CheckFileSameJavaStringCheckUtf8,
+ )
+ // FileSameObjcClassPrefixRuleBuilder is a rule builder.
+ FileSameObjcClassPrefixRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_OBJC_CLASS_PREFIX",
+ "files have the same value for the objc_class_prefix option",
+ bufbreakingcheck.CheckFileSameObjcClassPrefix,
+ )
+ // FileSamePackageRuleBuilder is a rule builder.
+ FileSamePackageRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_PACKAGE",
+ "files have the same package",
+ bufbreakingcheck.CheckFileSamePackage,
+ )
+ // FileSamePhpClassPrefixRuleBuilder is a rule builder.
+ FileSamePhpClassPrefixRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_PHP_CLASS_PREFIX",
+ "files have the same value for the php_class_prefix option",
+ bufbreakingcheck.CheckFileSamePhpClassPrefix,
+ )
+ // FileSamePhpMetadataNamespaceRuleBuilder is a rule builder.
+ FileSamePhpMetadataNamespaceRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_PHP_METADATA_NAMESPACE",
+ "files have the same value for the php_metadata_namespace option",
+ bufbreakingcheck.CheckFileSamePhpMetadataNamespace,
+ )
+ // FileSamePhpNamespaceRuleBuilder is a rule builder.
+ FileSamePhpNamespaceRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_PHP_NAMESPACE",
+ "files have the same value for the php_namespace option",
+ bufbreakingcheck.CheckFileSamePhpNamespace,
+ )
+ // FileSameRubyPackageRuleBuilder is a rule builder.
+ FileSameRubyPackageRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_RUBY_PACKAGE",
+ "files have the same value for the ruby_package option",
+ bufbreakingcheck.CheckFileSameRubyPackage,
+ )
+ // FileSameSwiftPrefixRuleBuilder is a rule builder.
+ FileSameSwiftPrefixRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_SWIFT_PREFIX",
+ "files have the same value for the swift_prefix option",
+ bufbreakingcheck.CheckFileSameSwiftPrefix,
+ )
+ // FileSameOptimizeForRuleBuilder is a rule builder.
+ FileSameOptimizeForRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_OPTIMIZE_FOR",
+ "files have the same value for the optimize_for option",
+ bufbreakingcheck.CheckFileSameOptimizeFor,
+ )
+ // FileSameCcGenericServicesRuleBuilder is a rule builder.
+ FileSameCcGenericServicesRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_CC_GENERIC_SERVICES",
+ "files have the same value for the cc_generic_services option",
+ bufbreakingcheck.CheckFileSameCcGenericServices,
+ )
+ // FileSameJavaGenericServicesRuleBuilder is a rule builder.
+ FileSameJavaGenericServicesRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_JAVA_GENERIC_SERVICES",
+ "files have the same value for the java_generic_services option",
+ bufbreakingcheck.CheckFileSameJavaGenericServices,
+ )
+ // FileSamePyGenericServicesRuleBuilder is a rule builder.
+ FileSamePyGenericServicesRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_PY_GENERIC_SERVICES",
+ "files have the same value for the py_generic_services option",
+ bufbreakingcheck.CheckFileSamePyGenericServices,
+ )
+ // FileSamePhpGenericServicesRuleBuilder is a rule builder.
+ FileSamePhpGenericServicesRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_PHP_GENERIC_SERVICES",
+ "files have the same value for the php_generic_services option",
+ bufbreakingcheck.CheckFileSamePhpGenericServices,
+ )
+ // FileSameCcEnableArenasRuleBuilder is a rule builder.
+ FileSameCcEnableArenasRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_CC_ENABLE_ARENAS",
+ "files have the same value for the cc_enable_arenas option",
+ bufbreakingcheck.CheckFileSameCcEnableArenas,
+ )
+ // FileSameSyntaxRuleBuilder is a rule builder.
+ FileSameSyntaxRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_SAME_SYNTAX",
+ "files have the same syntax",
+ bufbreakingcheck.CheckFileSameSyntax,
+ )
+ // MessageNoDeleteRuleBuilder is a rule builder.
+ MessageNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "MESSAGE_NO_DELETE",
+ "messages are not deleted from a given file",
+ bufbreakingcheck.CheckMessageNoDelete,
+ )
+ // MessageNoRemoveStandardDescriptorAccessorRuleBuilder is a rule builder.
+ MessageNoRemoveStandardDescriptorAccessorRuleBuilder = internal.NewNopRuleBuilder(
+ "MESSAGE_NO_REMOVE_STANDARD_DESCRIPTOR_ACCESSOR",
+ "messages do not change the no_standard_descriptor_accessor option from false or unset to true",
+ bufbreakingcheck.CheckMessageNoRemoveStandardDescriptorAccessor,
+ )
+ // MessageSameMessageSetWireFormatRuleBuilder is a rule builder.
+ MessageSameMessageSetWireFormatRuleBuilder = internal.NewNopRuleBuilder(
+ "MESSAGE_SAME_MESSAGE_SET_WIRE_FORMAT",
+ "messages have the same value for the message_set_wire_format option",
+ bufbreakingcheck.CheckMessageSameMessageSetWireFormat,
+ )
+ // MessageSameRequiredFieldsRuleBuilder is a rule builder.
+ MessageSameRequiredFieldsRuleBuilder = internal.NewNopRuleBuilder(
+ "MESSAGE_SAME_REQUIRED_FIELDS",
+ "messages have no added or deleted required fields",
+ bufbreakingcheck.CheckMessageSameRequiredFields,
+ )
+ // OneofNoDeleteRuleBuilder is a rule builder.
+ OneofNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "ONEOF_NO_DELETE",
+ "oneofs are not deleted from a given message",
+ bufbreakingcheck.CheckOneofNoDelete,
+ )
+ // PackageEnumNoDeleteRuleBuilder is a rule builder.
+ PackageEnumNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_ENUM_NO_DELETE",
+ "enums are not deleted from a given package",
+ bufbreakingcheck.CheckPackageEnumNoDelete,
+ )
+ // PackageMessageNoDeleteRuleBuilder is a rule builder.
+ PackageMessageNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_MESSAGE_NO_DELETE",
+ "messages are not deleted from a given package",
+ bufbreakingcheck.CheckPackageMessageNoDelete,
+ )
+ // PackageNoDeleteRuleBuilder is a rule builder.
+ PackageNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_NO_DELETE",
+ "packages are not deleted",
+ bufbreakingcheck.CheckPackageNoDelete,
+ )
+ // PackageServiceNoDeleteRuleBuilder is a rule builder.
+ PackageServiceNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_SERVICE_NO_DELETE",
+ "services are not deleted from a given package",
+ bufbreakingcheck.CheckPackageServiceNoDelete,
+ )
+ // ReservedEnumNoDeleteRuleBuilder is a rule builder.
+ ReservedEnumNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "RESERVED_ENUM_NO_DELETE",
+ "reserved ranges and names are not deleted from a given enum",
+ bufbreakingcheck.CheckReservedEnumNoDelete,
+ )
+ // ReservedMessageNoDeleteRuleBuilder is a rule builder.
+ ReservedMessageNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "RESERVED_MESSAGE_NO_DELETE",
+ "reserved ranges and names are not deleted from a given message",
+ bufbreakingcheck.CheckReservedMessageNoDelete,
+ )
+ // RPCNoDeleteRuleBuilder is a rule builder.
+ RPCNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "RPC_NO_DELETE",
+ "rpcs are not deleted from a given service",
+ bufbreakingcheck.CheckRPCNoDelete,
+ )
+ // RPCSameClientStreamingRuleBuilder is a rule builder.
+ RPCSameClientStreamingRuleBuilder = internal.NewNopRuleBuilder(
+ "RPC_SAME_CLIENT_STREAMING",
+ "rpcs have the same client streaming value",
+ bufbreakingcheck.CheckRPCSameClientStreaming,
+ )
+ // RPCSameIdempotencyLevelRuleBuilder is a rule builder.
+ RPCSameIdempotencyLevelRuleBuilder = internal.NewNopRuleBuilder(
+ "RPC_SAME_IDEMPOTENCY_LEVEL",
+ "rpcs have the same value for the idempotency_level option",
+ bufbreakingcheck.CheckRPCSameIdempotencyLevel,
+ )
+ // RPCSameRequestTypeRuleBuilder is a rule builder.
+ RPCSameRequestTypeRuleBuilder = internal.NewNopRuleBuilder(
+ "RPC_SAME_REQUEST_TYPE",
+ "rpcs are have the same request type",
+ bufbreakingcheck.CheckRPCSameRequestType,
+ )
+ // RPCSameResponseTypeRuleBuilder is a rule builder.
+ RPCSameResponseTypeRuleBuilder = internal.NewNopRuleBuilder(
+ "RPC_SAME_RESPONSE_TYPE",
+ "rpcs are have the same response type",
+ bufbreakingcheck.CheckRPCSameResponseType,
+ )
+ // RPCSameServerStreamingRuleBuilder is a rule builder.
+ RPCSameServerStreamingRuleBuilder = internal.NewNopRuleBuilder(
+ "RPC_SAME_SERVER_STREAMING",
+ "rpcs have the same server streaming value",
+ bufbreakingcheck.CheckRPCSameServerStreaming,
+ )
+ // ServiceNoDeleteRuleBuilder is a rule builder.
+ ServiceNoDeleteRuleBuilder = internal.NewNopRuleBuilder(
+ "SERVICE_NO_DELETE",
+ "services are not deleted from a given file",
+ bufbreakingcheck.CheckServiceNoDelete,
+ )
+)
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingbuild/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingbuild/usage.gen.go
new file mode 100644
index 000000000..4eb420ca3
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingbuild/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufbreakingbuild
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck/bufbreakingcheck.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck/bufbreakingcheck.go
new file mode 100644
index 000000000..9f378126f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck/bufbreakingcheck.go
@@ -0,0 +1,1104 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufbreakingcheck impelements the check functions.
+//
+// These are used by bufbreakingbuild to create RuleBuilders.
+package bufbreakingcheck
+
+import (
+ "errors"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/protosource"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "github.com/bufbuild/buf/private/pkg/tagrangeutil"
+)
+
+// CheckEnumNoDelete is a check function.
+var CheckEnumNoDelete = newFilePairCheckFunc(checkEnumNoDelete)
+
+func checkEnumNoDelete(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ previousNestedNameToEnum, err := protosource.NestedNameToEnum(previousFile)
+ if err != nil {
+ return err
+ }
+ nestedNameToEnum, err := protosource.NestedNameToEnum(file)
+ if err != nil {
+ return err
+ }
+ for previousNestedName := range previousNestedNameToEnum {
+ if _, ok := nestedNameToEnum[previousNestedName]; !ok {
+ // TODO: search for enum in other files and return that the enum was moved?
+ descriptor, location, err := getDescriptorAndLocationForDeletedEnum(file, previousNestedName)
+ if err != nil {
+ return err
+ }
+ add(descriptor, nil, location, `Previously present enum %q was deleted from file.`, previousNestedName)
+ }
+ }
+ return nil
+}
+
+// CheckEnumValueNoDelete is a check function.
+var CheckEnumValueNoDelete = newEnumPairCheckFunc(checkEnumValueNoDelete)
+
+func checkEnumValueNoDelete(add addFunc, corpus *corpus, previousEnum protosource.Enum, enum protosource.Enum) error {
+ return checkEnumValueNoDeleteWithRules(add, previousEnum, enum, false, false)
+}
+
+// CheckEnumValueNoDeleteUnlessNumberReserved is a check function.
+var CheckEnumValueNoDeleteUnlessNumberReserved = newEnumPairCheckFunc(checkEnumValueNoDeleteUnlessNumberReserved)
+
+func checkEnumValueNoDeleteUnlessNumberReserved(add addFunc, corpus *corpus, previousEnum protosource.Enum, enum protosource.Enum) error {
+ return checkEnumValueNoDeleteWithRules(add, previousEnum, enum, true, false)
+}
+
+// CheckEnumValueNoDeleteUnlessNameReserved is a check function.
+var CheckEnumValueNoDeleteUnlessNameReserved = newEnumPairCheckFunc(checkEnumValueNoDeleteUnlessNameReserved)
+
+func checkEnumValueNoDeleteUnlessNameReserved(add addFunc, corpus *corpus, previousEnum protosource.Enum, enum protosource.Enum) error {
+ return checkEnumValueNoDeleteWithRules(add, previousEnum, enum, false, true)
+}
+
+func checkEnumValueNoDeleteWithRules(add addFunc, previousEnum protosource.Enum, enum protosource.Enum, allowIfNumberReserved bool, allowIfNameReserved bool) error {
+ previousNumberToNameToEnumValue, err := protosource.NumberToNameToEnumValue(previousEnum)
+ if err != nil {
+ return err
+ }
+ numberToNameToEnumValue, err := protosource.NumberToNameToEnumValue(enum)
+ if err != nil {
+ return err
+ }
+ for previousNumber, previousNameToEnumValue := range previousNumberToNameToEnumValue {
+ if _, ok := numberToNameToEnumValue[previousNumber]; !ok {
+ if !isDeletedEnumValueAllowedWithRules(previousNumber, previousNameToEnumValue, enum, allowIfNumberReserved, allowIfNameReserved) {
+ suffix := ""
+ if allowIfNumberReserved && allowIfNameReserved {
+ return errors.New("both allowIfNumberReserved and allowIfNameReserved set")
+ }
+ if allowIfNumberReserved {
+ suffix = fmt.Sprintf(` without reserving the number "%d"`, previousNumber)
+ }
+ if allowIfNameReserved {
+ nameSuffix := ""
+ if len(previousNameToEnumValue) > 1 {
+ nameSuffix = "s"
+ }
+ suffix = fmt.Sprintf(` without reserving the name%s %s`, nameSuffix, stringutil.JoinSliceQuoted(getSortedEnumValueNames(previousNameToEnumValue), ", "))
+ }
+ add(enum, nil, enum.Location(), `Previously present enum value "%d" on enum %q was deleted%s.`, previousNumber, enum.Name(), suffix)
+ }
+ }
+ }
+ return nil
+}
+
+func isDeletedEnumValueAllowedWithRules(previousNumber int, previousNameToEnumValue map[string]protosource.EnumValue, enum protosource.Enum, allowIfNumberReserved bool, allowIfNameReserved bool) bool {
+ if allowIfNumberReserved {
+ return protosource.NumberInReservedRanges(previousNumber, enum.ReservedTagRanges()...)
+ }
+ if allowIfNameReserved {
+ // if true for all names, then ok
+ for previousName := range previousNameToEnumValue {
+ if !protosource.NameInReservedNames(previousName, enum.ReservedNames()...) {
+ return false
+ }
+ }
+ return true
+ }
+ return false
+}
+
+// CheckEnumValueSameName is a check function.
+var CheckEnumValueSameName = newEnumValuePairCheckFunc(checkEnumValueSameName)
+
+func checkEnumValueSameName(add addFunc, corpus *corpus, previousNameToEnumValue map[string]protosource.EnumValue, nameToEnumValue map[string]protosource.EnumValue) error {
+ previousNames := getSortedEnumValueNames(previousNameToEnumValue)
+ names := getSortedEnumValueNames(nameToEnumValue)
+ // all current names for this number need to be in the previous set
+ // ie if you now have FOO=2, BAR=2, you need to have had FOO=2, BAR=2 previously
+ // FOO=2, BAR=2, BAZ=2 now would pass
+ // FOO=2, BAR=2, BAZ=2 previously would fail
+ if !stringutil.SliceElementsContained(names, previousNames) {
+ previousNamesString := stringutil.JoinSliceQuoted(previousNames, ", ")
+ namesString := stringutil.JoinSliceQuoted(names, ", ")
+ nameSuffix := ""
+ if len(previousNames) > 1 && len(names) > 1 {
+ nameSuffix = "s"
+ }
+ for _, enumValue := range nameToEnumValue {
+ add(enumValue, nil, enumValue.NumberLocation(), `Enum value "%d" on enum %q changed name%s from %s to %s.`, enumValue.Number(), enumValue.Enum().Name(), nameSuffix, previousNamesString, namesString)
+ }
+ }
+ return nil
+}
+
+// CheckExtensionMessageNoDelete is a check function.
+var CheckExtensionMessageNoDelete = newMessagePairCheckFunc(checkExtensionMessageNoDelete)
+
+func checkExtensionMessageNoDelete(add addFunc, corpus *corpus, previousMessage protosource.Message, message protosource.Message) error {
+ previousStringToExtensionRange := protosource.StringToExtensionMessageRange(previousMessage)
+ stringToExtensionRange := protosource.StringToExtensionMessageRange(message)
+ for previousString := range previousStringToExtensionRange {
+ if _, ok := stringToExtensionRange[previousString]; !ok {
+ add(message, nil, message.Location(), `Previously present extension range %q on message %q was deleted.`, previousString, message.Name())
+ }
+ }
+ return nil
+}
+
+// CheckFieldNoDelete is a check function.
+var CheckFieldNoDelete = newMessagePairCheckFunc(checkFieldNoDelete)
+
+func checkFieldNoDelete(add addFunc, corpus *corpus, previousMessage protosource.Message, message protosource.Message) error {
+ return checkFieldNoDeleteWithRules(add, previousMessage, message, false, false)
+}
+
+// CheckFieldNoDeleteUnlessNumberReserved is a check function.
+var CheckFieldNoDeleteUnlessNumberReserved = newMessagePairCheckFunc(checkFieldNoDeleteUnlessNumberReserved)
+
+func checkFieldNoDeleteUnlessNumberReserved(add addFunc, corpus *corpus, previousMessage protosource.Message, message protosource.Message) error {
+ return checkFieldNoDeleteWithRules(add, previousMessage, message, true, false)
+}
+
+// CheckFieldNoDeleteUnlessNameReserved is a check function.
+var CheckFieldNoDeleteUnlessNameReserved = newMessagePairCheckFunc(checkFieldNoDeleteUnlessNameReserved)
+
+func checkFieldNoDeleteUnlessNameReserved(add addFunc, corpus *corpus, previousMessage protosource.Message, message protosource.Message) error {
+ return checkFieldNoDeleteWithRules(add, previousMessage, message, false, true)
+}
+
+func checkFieldNoDeleteWithRules(add addFunc, previousMessage protosource.Message, message protosource.Message, allowIfNumberReserved bool, allowIfNameReserved bool) error {
+ previousNumberToField, err := protosource.NumberToMessageField(previousMessage)
+ if err != nil {
+ return err
+ }
+ numberToField, err := protosource.NumberToMessageField(message)
+ if err != nil {
+ return err
+ }
+ for previousNumber, previousField := range previousNumberToField {
+ if _, ok := numberToField[previousNumber]; !ok {
+ if !isDeletedFieldAllowedWithRules(previousField, message, allowIfNumberReserved, allowIfNameReserved) {
+ // otherwise prints as hex
+ previousNumberString := strconv.FormatInt(int64(previousNumber), 10)
+ suffix := ""
+ if allowIfNumberReserved && allowIfNameReserved {
+ return errors.New("both allowIfNumberReserved and allowIfNameReserved set")
+ }
+ if allowIfNumberReserved {
+ suffix = fmt.Sprintf(` without reserving the number "%d"`, previousField.Number())
+ }
+ if allowIfNameReserved {
+ suffix = fmt.Sprintf(` without reserving the name %q`, previousField.Name())
+ }
+ add(message, nil, message.Location(), `Previously present field %q with name %q on message %q was deleted%s.`, previousNumberString, previousField.Name(), message.Name(), suffix)
+ }
+ }
+ }
+ return nil
+}
+
+func isDeletedFieldAllowedWithRules(previousField protosource.Field, message protosource.Message, allowIfNumberReserved bool, allowIfNameReserved bool) bool {
+ return (allowIfNumberReserved && protosource.NumberInReservedRanges(previousField.Number(), message.ReservedTagRanges()...)) ||
+ (allowIfNameReserved && protosource.NameInReservedNames(previousField.Name(), message.ReservedNames()...))
+}
+
+// CheckFieldSameCType is a check function.
+var CheckFieldSameCType = newFieldPairCheckFunc(checkFieldSameCType)
+
+func checkFieldSameCType(add addFunc, corpus *corpus, previousField protosource.Field, field protosource.Field) error {
+ if previousField.CType() != field.CType() {
+ // otherwise prints as hex
+ numberString := strconv.FormatInt(int64(field.Number()), 10)
+ add(field, nil, withBackupLocation(field.CTypeLocation(), field.Location()), `Field %q with name %q on message %q changed option "ctype" from %q to %q.`, numberString, field.Name(), field.Message().Name(), previousField.CType().String(), field.CType().String())
+ }
+ return nil
+}
+
+// CheckFieldSameJSONName is a check function.
+var CheckFieldSameJSONName = newFieldPairCheckFunc(checkFieldSameJSONName)
+
+func checkFieldSameJSONName(add addFunc, corpus *corpus, previousField protosource.Field, field protosource.Field) error {
+ if previousField.JSONName() != field.JSONName() {
+ // otherwise prints as hex
+ numberString := strconv.FormatInt(int64(field.Number()), 10)
+ add(field, nil, withBackupLocation(field.JSONNameLocation(), field.Location()), `Field %q with name %q on message %q changed option "json_name" from %q to %q.`, numberString, field.Name(), field.Message().Name(), previousField.JSONName(), field.JSONName())
+ }
+ return nil
+}
+
+// CheckFieldSameJSType is a check function.
+var CheckFieldSameJSType = newFieldPairCheckFunc(checkFieldSameJSType)
+
+func checkFieldSameJSType(add addFunc, corpus *corpus, previousField protosource.Field, field protosource.Field) error {
+ if previousField.JSType() != field.JSType() {
+ // otherwise prints as hex
+ numberString := strconv.FormatInt(int64(field.Number()), 10)
+ add(field, nil, withBackupLocation(field.JSTypeLocation(), field.Location()), `Field %q with name %q on message %q changed option "jstype" from %q to %q.`, numberString, field.Name(), field.Message().Name(), previousField.JSType().String(), field.JSType().String())
+ }
+ return nil
+}
+
+// CheckFieldSameLabel is a check function.
+var CheckFieldSameLabel = newFieldPairCheckFunc(checkFieldSameLabel)
+
+func checkFieldSameLabel(add addFunc, corpus *corpus, previousField protosource.Field, field protosource.Field) error {
+ if previousField.Label() != field.Label() {
+ // otherwise prints as hex
+ numberString := strconv.FormatInt(int64(field.Number()), 10)
+ // TODO: specific label location
+ add(field, nil, field.Location(), `Field %q on message %q changed label from %q to %q.`, numberString, field.Message().Name(), previousField.Label().String(), field.Label().String())
+ }
+ return nil
+}
+
+// CheckFieldSameName is a check function.
+var CheckFieldSameName = newFieldPairCheckFunc(checkFieldSameName)
+
+func checkFieldSameName(add addFunc, corpus *corpus, previousField protosource.Field, field protosource.Field) error {
+ if previousField.Name() != field.Name() {
+ // otherwise prints as hex
+ numberString := strconv.FormatInt(int64(field.Number()), 10)
+ add(field, nil, field.NameLocation(), `Field %q on message %q changed name from %q to %q.`, numberString, field.Message().Name(), previousField.Name(), field.Name())
+ }
+ return nil
+}
+
+// CheckFieldSameOneof is a check function.
+var CheckFieldSameOneof = newFieldPairCheckFunc(checkFieldSameOneof)
+
+func checkFieldSameOneof(add addFunc, corpus *corpus, previousField protosource.Field, field protosource.Field) error {
+ previousOneof := previousField.Oneof()
+ oneof := field.Oneof()
+ previousInsideOneof := previousOneof != nil
+ insideOneof := oneof != nil
+ if !previousInsideOneof && !insideOneof {
+ return nil
+ }
+ if previousInsideOneof && insideOneof {
+ if previousOneof.Name() != oneof.Name() {
+ // otherwise prints as hex
+ numberString := strconv.FormatInt(int64(field.Number()), 10)
+ add(field, nil, field.Location(), `Field %q on message %q moved from oneof %q to oneof %q.`, numberString, field.Message().Name(), previousOneof.Name(), oneof.Name())
+ }
+ return nil
+ }
+
+ previous := "inside"
+ current := "outside"
+ if insideOneof {
+ previous = "outside"
+ current = "inside"
+ }
+ // otherwise prints as hex
+ numberString := strconv.FormatInt(int64(field.Number()), 10)
+ add(field, nil, field.Location(), `Field %q on message %q moved from %s to %s a oneof.`, numberString, field.Message().Name(), previous, current)
+ return nil
+}
+
+// TODO: locations not working for map entries
+// TODO: weird output for map entries:
+//
+// breaking_field_same_type/1.proto:1:1:Field "2" on message "SixEntry" changed type from ".a.One" to ".a.Two".
+// breaking_field_same_type/1.proto:1:1:Field "2" on message "SixEntry" changed type from ".a.One" to ".a.Two".
+// breaking_field_same_type/1.proto:1:1:Field "2" on message "SixEntry" changed type from ".a.One" to ".a.Two".
+// breaking_field_same_type/1.proto:8:3:Field "1" on message "Two" changed type from "int32" to "int64".
+// breaking_field_same_type/1.proto:9:3:Field "2" on message "Two" changed type from ".a.One" to ".a.Two".
+// breaking_field_same_type/1.proto:11:3:Field "4" on message "Two" changed type from ".a.One" to ".a.Two".
+// breaking_field_same_type/1.proto:12:3:Field "5" on message "Two" changed type from ".a.Two.FiveEntry" to ".a.Two".
+// breaking_field_same_type/1.proto:19:7:Field "1" on message "Five" changed type from "int32" to "int64".
+// breaking_field_same_type/1.proto:20:7:Field "2" on message "Five" changed type from ".a.One" to ".a.Two".
+// breaking_field_same_type/1.proto:22:7:Field "4" on message "Five" changed type from ".a.One" to ".a.Two".
+// breaking_field_same_type/1.proto:23:7:Field "5" on message "Five" changed type from ".a.Three.Four.Five.FiveEntry" to ".a.Two".
+// breaking_field_same_type/1.proto:36:5:Field "1" on message "Seven" changed type from "int32" to "int64".
+// breaking_field_same_type/1.proto:37:5:Field "2" on message "Seven" changed type from ".a.One" to ".a.Two".
+// breaking_field_same_type/1.proto:39:5:Field "4" on message "Seven" changed type from ".a.One" to ".a.Two".
+// breaking_field_same_type/1.proto:40:5:Field "5" on message "Seven" changed type from ".a.Three.Seven.FiveEntry" to ".a.Two".
+// breaking_field_same_type/2.proto:64:5:Field "1" on message "Nine" changed type from "int32" to "int64".
+// breaking_field_same_type/2.proto:65:5:Field "2" on message "Nine" changed type from ".a.One" to ".a.Nine".
+
+// CheckFieldSameType is a check function.
+var CheckFieldSameType = newFieldPairCheckFunc(checkFieldSameType)
+
+func checkFieldSameType(add addFunc, corpus *corpus, previousField protosource.Field, field protosource.Field) error {
+ if previousField.Type() != field.Type() {
+ addFieldChangedType(add, previousField, field)
+ return nil
+ }
+
+ switch field.Type() {
+ case protosource.FieldDescriptorProtoTypeEnum,
+ protosource.FieldDescriptorProtoTypeGroup,
+ protosource.FieldDescriptorProtoTypeMessage:
+ if previousField.TypeName() != field.TypeName() {
+ addEnumGroupMessageFieldChangedTypeName(add, previousField, field)
+ }
+ }
+ return nil
+}
+
+// CheckFieldWireCompatibleType is a check function.
+var CheckFieldWireCompatibleType = newFieldPairCheckFunc(checkFieldWireCompatibleType)
+
+func checkFieldWireCompatibleType(add addFunc, corpus *corpus, previousField protosource.Field, field protosource.Field) error {
+ previousWireCompatibilityGroup, ok := fieldDescriptorProtoTypeToWireCompatiblityGroup[previousField.Type()]
+ if !ok {
+ return fmt.Errorf("unknown FieldDescriptorProtoType: %v", previousField.Type())
+ }
+ wireCompatibilityGroup, ok := fieldDescriptorProtoTypeToWireCompatiblityGroup[field.Type()]
+ if !ok {
+ return fmt.Errorf("unknown FieldDescriptorProtoType: %v", field.Type())
+ }
+ if previousWireCompatibilityGroup != wireCompatibilityGroup {
+ extraMessages := []string{
+ "See https://developers.google.com/protocol-buffers/docs/proto3#updating for wire compatibility rules.",
+ }
+ switch {
+ case previousField.Type() == protosource.FieldDescriptorProtoTypeString && field.Type() == protosource.FieldDescriptorProtoTypeBytes:
+ // It is OK to evolve from string to bytes
+ return nil
+ case previousField.Type() == protosource.FieldDescriptorProtoTypeBytes && field.Type() == protosource.FieldDescriptorProtoTypeString:
+ extraMessages = append(
+ extraMessages,
+ "Note that while string and bytes are compatible if the data is valid UTF-8, there is no way to enforce that a field is UTF-8, so these fields may be incompatible.",
+ )
+ }
+ addFieldChangedType(add, previousField, field, extraMessages...)
+ return nil
+ }
+ switch field.Type() {
+ case protosource.FieldDescriptorProtoTypeEnum:
+ if previousField.TypeName() != field.TypeName() {
+ return checkEnumWireCompatibleForField(add, corpus, previousField, field)
+ }
+ case protosource.FieldDescriptorProtoTypeGroup,
+ protosource.FieldDescriptorProtoTypeMessage:
+ if previousField.TypeName() != field.TypeName() {
+ addEnumGroupMessageFieldChangedTypeName(add, previousField, field)
+ return nil
+ }
+ }
+ return nil
+}
+
+// CheckFieldWireJSONCompatibleType is a check function.
+var CheckFieldWireJSONCompatibleType = newFieldPairCheckFunc(checkFieldWireJSONCompatibleType)
+
+func checkFieldWireJSONCompatibleType(add addFunc, corpus *corpus, previousField protosource.Field, field protosource.Field) error {
+ previousWireJSONCompatibilityGroup, ok := fieldDescriptorProtoTypeToWireJSONCompatiblityGroup[previousField.Type()]
+ if !ok {
+ return fmt.Errorf("unknown FieldDescriptorProtoType: %v", previousField.Type())
+ }
+ wireJSONCompatibilityGroup, ok := fieldDescriptorProtoTypeToWireJSONCompatiblityGroup[field.Type()]
+ if !ok {
+ return fmt.Errorf("unknown FieldDescriptorProtoType: %v", field.Type())
+ }
+ if previousWireJSONCompatibilityGroup != wireJSONCompatibilityGroup {
+ addFieldChangedType(
+ add,
+ previousField,
+ field,
+ "See https://developers.google.com/protocol-buffers/docs/proto3#updating for wire compatibility rules and https://developers.google.com/protocol-buffers/docs/proto3#json for JSON compatibility rules.",
+ )
+ return nil
+ }
+ switch field.Type() {
+ case protosource.FieldDescriptorProtoTypeEnum:
+ if previousField.TypeName() != field.TypeName() {
+ return checkEnumWireCompatibleForField(add, corpus, previousField, field)
+ }
+ case protosource.FieldDescriptorProtoTypeGroup,
+ protosource.FieldDescriptorProtoTypeMessage:
+ if previousField.TypeName() != field.TypeName() {
+ addEnumGroupMessageFieldChangedTypeName(add, previousField, field)
+ return nil
+ }
+ }
+ return nil
+}
+
+func checkEnumWireCompatibleForField(add addFunc, corpus *corpus, previousField protosource.Field, field protosource.Field) error {
+ previousEnum, err := getEnumByFullName(
+ corpus.previousFiles,
+ strings.TrimPrefix(previousField.TypeName(), "."),
+ )
+ if err != nil {
+ return err
+ }
+ enum, err := getEnumByFullName(
+ corpus.files,
+ strings.TrimPrefix(field.TypeName(), "."),
+ )
+ if err != nil {
+ return err
+ }
+ if previousEnum.Name() != enum.Name() {
+ // If the short names are not equal, we say that this is a different enum.
+ addEnumGroupMessageFieldChangedTypeName(add, previousField, field)
+ return nil
+ }
+ isSubset, err := protosource.EnumIsSubset(enum, previousEnum)
+ if err != nil {
+ return err
+ }
+ if !isSubset {
+ // If the previous enum is not a subset of the new enum, we say that
+ // this is a different enum.
+ // We allow subsets so that enum values can be added within the
+ // same change.
+ addEnumGroupMessageFieldChangedTypeName(add, previousField, field)
+ return nil
+ }
+ return nil
+}
+
+func addFieldChangedType(add addFunc, previousField protosource.Field, field protosource.Field, extraMessages ...string) {
+ combinedExtraMessage := ""
+ if len(extraMessages) > 0 {
+ // protect against mistakenly added empty extra messages
+ if joined := strings.TrimSpace(strings.Join(extraMessages, " ")); joined != "" {
+ combinedExtraMessage = " " + joined
+ }
+ }
+ var fieldLocation protosource.Location
+ switch field.Type() {
+ case protosource.FieldDescriptorProtoTypeMessage,
+ protosource.FieldDescriptorProtoTypeEnum,
+ protosource.FieldDescriptorProtoTypeGroup:
+ fieldLocation = field.TypeNameLocation()
+ default:
+ fieldLocation = field.TypeLocation()
+ }
+ // otherwise prints as hex
+ previousNumberString := strconv.FormatInt(int64(previousField.Number()), 10)
+ add(
+ field,
+ nil,
+ fieldLocation,
+ `Field %q on message %q changed type from %q to %q.%s`,
+ previousNumberString,
+ field.Message().Name(),
+ previousField.Type().String(),
+ field.Type().String(),
+ combinedExtraMessage,
+ )
+}
+
+func addEnumGroupMessageFieldChangedTypeName(add addFunc, previousField protosource.Field, field protosource.Field) {
+ // otherwise prints as hex
+ numberString := strconv.FormatInt(int64(previousField.Number()), 10)
+ add(
+ field,
+ nil,
+ field.TypeNameLocation(),
+ `Field %q on message %q changed type from %q to %q.`,
+ numberString,
+ field.Message().Name(),
+ strings.TrimPrefix(previousField.TypeName(), "."),
+ strings.TrimPrefix(field.TypeName(), "."),
+ )
+}
+
+// CheckFileNoDelete is a check function.
+var CheckFileNoDelete = newFilesCheckFunc(checkFileNoDelete)
+
+func checkFileNoDelete(add addFunc, corpus *corpus) error {
+ previousFilePathToFile, err := protosource.FilePathToFile(corpus.previousFiles...)
+ if err != nil {
+ return err
+ }
+ filePathToFile, err := protosource.FilePathToFile(corpus.files...)
+ if err != nil {
+ return err
+ }
+ for previousFilePath, previousFile := range previousFilePathToFile {
+ if _, ok := filePathToFile[previousFilePath]; !ok {
+ // Add previous descriptor to check for ignores. This will mean that if
+ // we have ignore_unstable_packages set, this file will cause the ignore
+ // to happen.
+ add(nil, []protosource.Descriptor{previousFile}, nil, `Previously present file %q was deleted.`, previousFilePath)
+ }
+ }
+ return nil
+}
+
+// CheckFileSameCsharpNamespace is a check function.
+var CheckFileSameCsharpNamespace = newFilePairCheckFunc(checkFileSameCsharpNamespace)
+
+func checkFileSameCsharpNamespace(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.CsharpNamespace(), file.CsharpNamespace(), file, file.CsharpNamespaceLocation(), `option "csharp_namespace"`)
+}
+
+// CheckFileSameGoPackage is a check function.
+var CheckFileSameGoPackage = newFilePairCheckFunc(checkFileSameGoPackage)
+
+func checkFileSameGoPackage(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.GoPackage(), file.GoPackage(), file, file.GoPackageLocation(), `option "go_package"`)
+}
+
+// CheckFileSameJavaMultipleFiles is a check function.
+var CheckFileSameJavaMultipleFiles = newFilePairCheckFunc(checkFileSameJavaMultipleFiles)
+
+func checkFileSameJavaMultipleFiles(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, strconv.FormatBool(previousFile.JavaMultipleFiles()), strconv.FormatBool(file.JavaMultipleFiles()), file, file.JavaMultipleFilesLocation(), `option "java_multiple_files"`)
+}
+
+// CheckFileSameJavaOuterClassname is a check function.
+var CheckFileSameJavaOuterClassname = newFilePairCheckFunc(checkFileSameJavaOuterClassname)
+
+func checkFileSameJavaOuterClassname(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.JavaOuterClassname(), file.JavaOuterClassname(), file, file.JavaOuterClassnameLocation(), `option "java_outer_classname"`)
+}
+
+// CheckFileSameJavaPackage is a check function.
+var CheckFileSameJavaPackage = newFilePairCheckFunc(checkFileSameJavaPackage)
+
+func checkFileSameJavaPackage(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.JavaPackage(), file.JavaPackage(), file, file.JavaPackageLocation(), `option "java_package"`)
+}
+
+// CheckFileSameJavaStringCheckUtf8 is a check function.
+var CheckFileSameJavaStringCheckUtf8 = newFilePairCheckFunc(checkFileSameJavaStringCheckUtf8)
+
+func checkFileSameJavaStringCheckUtf8(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, strconv.FormatBool(previousFile.JavaStringCheckUtf8()), strconv.FormatBool(file.JavaStringCheckUtf8()), file, file.JavaStringCheckUtf8Location(), `option "java_string_check_utf8"`)
+}
+
+// CheckFileSameObjcClassPrefix is a check function.
+var CheckFileSameObjcClassPrefix = newFilePairCheckFunc(checkFileSameObjcClassPrefix)
+
+func checkFileSameObjcClassPrefix(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.ObjcClassPrefix(), file.ObjcClassPrefix(), file, file.ObjcClassPrefixLocation(), `option "objc_class_prefix"`)
+}
+
+// CheckFileSamePackage is a check function.
+var CheckFileSamePackage = newFilePairCheckFunc(checkFileSamePackage)
+
+func checkFileSamePackage(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.Package(), file.Package(), file, file.PackageLocation(), `package`)
+}
+
+// CheckFileSamePhpClassPrefix is a check function.
+var CheckFileSamePhpClassPrefix = newFilePairCheckFunc(checkFileSamePhpClassPrefix)
+
+func checkFileSamePhpClassPrefix(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.PhpClassPrefix(), file.PhpClassPrefix(), file, file.PhpClassPrefixLocation(), `option "php_class_prefix"`)
+}
+
+// CheckFileSamePhpNamespace is a check function.
+var CheckFileSamePhpNamespace = newFilePairCheckFunc(checkFileSamePhpNamespace)
+
+func checkFileSamePhpNamespace(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.PhpNamespace(), file.PhpNamespace(), file, file.PhpNamespaceLocation(), `option "php_namespace"`)
+}
+
+// CheckFileSamePhpMetadataNamespace is a check function.
+var CheckFileSamePhpMetadataNamespace = newFilePairCheckFunc(checkFileSamePhpMetadataNamespace)
+
+func checkFileSamePhpMetadataNamespace(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.PhpMetadataNamespace(), file.PhpMetadataNamespace(), file, file.PhpMetadataNamespaceLocation(), `option "php_metadata_namespace"`)
+}
+
+// CheckFileSameRubyPackage is a check function.
+var CheckFileSameRubyPackage = newFilePairCheckFunc(checkFileSameRubyPackage)
+
+func checkFileSameRubyPackage(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.RubyPackage(), file.RubyPackage(), file, file.RubyPackageLocation(), `option "ruby_package"`)
+}
+
+// CheckFileSameSwiftPrefix is a check function.
+var CheckFileSameSwiftPrefix = newFilePairCheckFunc(checkFileSameSwiftPrefix)
+
+func checkFileSameSwiftPrefix(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.SwiftPrefix(), file.SwiftPrefix(), file, file.SwiftPrefixLocation(), `option "swift_prefix"`)
+}
+
+// CheckFileSameOptimizeFor is a check function.
+var CheckFileSameOptimizeFor = newFilePairCheckFunc(checkFileSameOptimizeFor)
+
+func checkFileSameOptimizeFor(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, previousFile.OptimizeFor().String(), file.OptimizeFor().String(), file, file.OptimizeForLocation(), `option "optimize_for"`)
+}
+
+// CheckFileSameCcGenericServices is a check function.
+var CheckFileSameCcGenericServices = newFilePairCheckFunc(checkFileSameCcGenericServices)
+
+func checkFileSameCcGenericServices(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, strconv.FormatBool(previousFile.CcGenericServices()), strconv.FormatBool(file.CcGenericServices()), file, file.CcGenericServicesLocation(), `option "cc_generic_services"`)
+}
+
+// CheckFileSameJavaGenericServices is a check function.
+var CheckFileSameJavaGenericServices = newFilePairCheckFunc(checkFileSameJavaGenericServices)
+
+func checkFileSameJavaGenericServices(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, strconv.FormatBool(previousFile.JavaGenericServices()), strconv.FormatBool(file.JavaGenericServices()), file, file.JavaGenericServicesLocation(), `option "java_generic_services"`)
+}
+
+// CheckFileSamePyGenericServices is a check function.
+var CheckFileSamePyGenericServices = newFilePairCheckFunc(checkFileSamePyGenericServices)
+
+func checkFileSamePyGenericServices(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, strconv.FormatBool(previousFile.PyGenericServices()), strconv.FormatBool(file.PyGenericServices()), file, file.PyGenericServicesLocation(), `option "py_generic_services"`)
+}
+
+// CheckFileSamePhpGenericServices is a check function.
+var CheckFileSamePhpGenericServices = newFilePairCheckFunc(checkFileSamePhpGenericServices)
+
+func checkFileSamePhpGenericServices(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, strconv.FormatBool(previousFile.PhpGenericServices()), strconv.FormatBool(file.PhpGenericServices()), file, file.PhpGenericServicesLocation(), `option "php_generic_services"`)
+}
+
+// CheckFileSameCcEnableArenas is a check function.
+var CheckFileSameCcEnableArenas = newFilePairCheckFunc(checkFileSameCcEnableArenas)
+
+func checkFileSameCcEnableArenas(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ return checkFileSameValue(add, strconv.FormatBool(previousFile.CcEnableArenas()), strconv.FormatBool(file.CcEnableArenas()), file, file.CcEnableArenasLocation(), `option "cc_enable_arenas"`)
+}
+
+// CheckFileSameSyntax is a check function.
+var CheckFileSameSyntax = newFilePairCheckFunc(checkFileSameSyntax)
+
+func checkFileSameSyntax(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ previousSyntax := previousFile.Syntax()
+ if previousSyntax == protosource.SyntaxUnspecified {
+ previousSyntax = protosource.SyntaxProto2
+ }
+ syntax := file.Syntax()
+ if syntax == protosource.SyntaxUnspecified {
+ syntax = protosource.SyntaxProto2
+ }
+ return checkFileSameValue(add, previousSyntax.String(), syntax.String(), file, file.SyntaxLocation(), `syntax`)
+}
+
+func checkFileSameValue(add addFunc, previousValue interface{}, value interface{}, file protosource.File, location protosource.Location, name string) error {
+ if previousValue != value {
+ add(file, nil, location, `File %s changed from %q to %q.`, name, previousValue, value)
+ }
+ return nil
+}
+
+// CheckMessageNoDelete is a check function.
+var CheckMessageNoDelete = newFilePairCheckFunc(checkMessageNoDelete)
+
+func checkMessageNoDelete(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ previousNestedNameToMessage, err := protosource.NestedNameToMessage(previousFile)
+ if err != nil {
+ return err
+ }
+ nestedNameToMessage, err := protosource.NestedNameToMessage(file)
+ if err != nil {
+ return err
+ }
+ for previousNestedName := range previousNestedNameToMessage {
+ if _, ok := nestedNameToMessage[previousNestedName]; !ok {
+ descriptor, location := getDescriptorAndLocationForDeletedMessage(file, nestedNameToMessage, previousNestedName)
+ add(descriptor, nil, location, `Previously present message %q was deleted from file.`, previousNestedName)
+ }
+ }
+ return nil
+}
+
+// CheckMessageNoRemoveStandardDescriptorAccessor is a check function.
+var CheckMessageNoRemoveStandardDescriptorAccessor = newMessagePairCheckFunc(checkMessageNoRemoveStandardDescriptorAccessor)
+
+func checkMessageNoRemoveStandardDescriptorAccessor(add addFunc, corpus *corpus, previousMessage protosource.Message, message protosource.Message) error {
+ previous := strconv.FormatBool(previousMessage.NoStandardDescriptorAccessor())
+ current := strconv.FormatBool(message.NoStandardDescriptorAccessor())
+ if previous == "false" && current == "true" {
+ add(message, nil, message.NoStandardDescriptorAccessorLocation(), `Message option "no_standard_descriptor_accessor" changed from %q to %q.`, previous, current)
+ }
+ return nil
+}
+
+// CheckMessageSameMessageSetWireFormat is a check function.
+var CheckMessageSameMessageSetWireFormat = newMessagePairCheckFunc(checkMessageSameMessageSetWireFormat)
+
+func checkMessageSameMessageSetWireFormat(add addFunc, corpus *corpus, previousMessage protosource.Message, message protosource.Message) error {
+ previous := strconv.FormatBool(previousMessage.MessageSetWireFormat())
+ current := strconv.FormatBool(message.MessageSetWireFormat())
+ if previous != current {
+ add(message, nil, message.MessageSetWireFormatLocation(), `Message option "message_set_wire_format" changed from %q to %q.`, previous, current)
+ }
+ return nil
+}
+
+// CheckMessageSameRequiredFields is a check function.
+var CheckMessageSameRequiredFields = newMessagePairCheckFunc(checkMessageSameRequiredFields)
+
+func checkMessageSameRequiredFields(add addFunc, corpus *corpus, previousMessage protosource.Message, message protosource.Message) error {
+ previousNumberToRequiredField, err := protosource.NumberToMessageFieldForLabel(
+ previousMessage,
+ protosource.FieldDescriptorProtoLabelRequired,
+ )
+ if err != nil {
+ return err
+ }
+ numberToRequiredField, err := protosource.NumberToMessageFieldForLabel(
+ message,
+ protosource.FieldDescriptorProtoLabelRequired,
+ )
+ if err != nil {
+ return err
+ }
+ for previousNumber := range previousNumberToRequiredField {
+ if _, ok := numberToRequiredField[previousNumber]; !ok {
+ // we attach the error to the message as the field no longer exists
+ add(message, nil, message.Location(), `Message %q had required field "%d" deleted. Required fields must always be sent, so if one side does not know about the required field, this will result in a breakage.`, previousMessage.Name(), previousNumber)
+ }
+ }
+ for number, requiredField := range numberToRequiredField {
+ if _, ok := previousNumberToRequiredField[number]; !ok {
+ // we attach the error to the added required field
+ add(message, nil, requiredField.Location(), `Message %q had required field "%d" added. Required fields must always be sent, so if one side does not know about the required field, this will result in a breakage.`, message.Name(), number)
+ }
+ }
+ return nil
+}
+
+// CheckOneofNoDelete is a check function.
+var CheckOneofNoDelete = newMessagePairCheckFunc(checkOneofNoDelete)
+
+func checkOneofNoDelete(add addFunc, corpus *corpus, previousMessage protosource.Message, message protosource.Message) error {
+ previousNameToOneof, err := protosource.NameToMessageOneof(previousMessage)
+ if err != nil {
+ return err
+ }
+ nameToOneof, err := protosource.NameToMessageOneof(message)
+ if err != nil {
+ return err
+ }
+ for previousName := range previousNameToOneof {
+ if _, ok := nameToOneof[previousName]; !ok {
+ add(message, nil, message.Location(), `Previously present oneof %q on message %q was deleted.`, previousName, message.Name())
+ }
+ }
+ return nil
+}
+
+// CheckPackageEnumNoDelete is a check function.
+var CheckPackageEnumNoDelete = newFilesCheckFunc(checkPackageEnumNoDelete)
+
+func checkPackageEnumNoDelete(add addFunc, corpus *corpus) error {
+ previousPackageToNestedNameToEnum, err := protosource.PackageToNestedNameToEnum(corpus.previousFiles...)
+ if err != nil {
+ return err
+ }
+ packageToNestedNameToEnum, err := protosource.PackageToNestedNameToEnum(corpus.files...)
+ if err != nil {
+ return err
+ }
+ // caching across loops
+ var filePathToFile map[string]protosource.File
+ for previousPackage, previousNestedNameToEnum := range previousPackageToNestedNameToEnum {
+ if nestedNameToEnum, ok := packageToNestedNameToEnum[previousPackage]; ok {
+ for previousNestedName, previousEnum := range previousNestedNameToEnum {
+ if _, ok := nestedNameToEnum[previousNestedName]; !ok {
+ // if cache not populated, populate it
+ if filePathToFile == nil {
+ filePathToFile, err = protosource.FilePathToFile(corpus.files...)
+ if err != nil {
+ return err
+ }
+ }
+ // Check if the file still exists.
+ file, ok := filePathToFile[previousEnum.File().Path()]
+ if ok {
+ // File exists, try to get a location to attach the error to.
+ descriptor, location, err := getDescriptorAndLocationForDeletedEnum(file, previousNestedName)
+ if err != nil {
+ return err
+ }
+ add(descriptor, nil, location, `Previously present enum %q was deleted from package %q.`, previousNestedName, previousPackage)
+ } else {
+ // File does not exist, we don't know where the enum was deleted from.
+ // Add the previous enum to check for ignores. This means that if
+ // ignore_unstable_packages is set, this will be triggered if the
+ // previous enum was in an unstable package.
+ add(nil, []protosource.Descriptor{previousEnum}, nil, `Previously present enum %q was deleted from package %q.`, previousNestedName, previousPackage)
+ }
+ }
+ }
+ }
+ }
+ return nil
+}
+
+// CheckPackageMessageNoDelete is a check function.
+var CheckPackageMessageNoDelete = newFilesCheckFunc(checkPackageMessageNoDelete)
+
+func checkPackageMessageNoDelete(add addFunc, corpus *corpus) error {
+ previousPackageToNestedNameToMessage, err := protosource.PackageToNestedNameToMessage(corpus.previousFiles...)
+ if err != nil {
+ return err
+ }
+ packageToNestedNameToMessage, err := protosource.PackageToNestedNameToMessage(corpus.files...)
+ if err != nil {
+ return err
+ }
+ // caching across loops
+ var filePathToFile map[string]protosource.File
+ for previousPackage, previousNestedNameToMessage := range previousPackageToNestedNameToMessage {
+ if nestedNameToMessage, ok := packageToNestedNameToMessage[previousPackage]; ok {
+ for previousNestedName, previousMessage := range previousNestedNameToMessage {
+ if _, ok := nestedNameToMessage[previousNestedName]; !ok {
+ // if cache not populated, populate it
+ if filePathToFile == nil {
+ filePathToFile, err = protosource.FilePathToFile(corpus.files...)
+ if err != nil {
+ return err
+ }
+ }
+ // Check if the file still exists.
+ file, ok := filePathToFile[previousMessage.File().Path()]
+ if ok {
+ // File exists, try to get a location to attach the error to.
+ descriptor, location := getDescriptorAndLocationForDeletedMessage(file, nestedNameToMessage, previousNestedName)
+ add(descriptor, nil, location, `Previously present message %q was deleted from package %q.`, previousNestedName, previousPackage)
+ } else {
+ // File does not exist, we don't know where the message was deleted from.
+ // Add the previous message to check for ignores. This means that if
+ // ignore_unstable_packages is set, this will be triggered if the
+ // previous message was in an unstable package.
+ add(nil, []protosource.Descriptor{previousMessage}, nil, `Previously present message %q was deleted from package %q.`, previousNestedName, previousPackage)
+ }
+ }
+ }
+ }
+ }
+ return nil
+}
+
+// CheckPackageNoDelete is a check function.
+var CheckPackageNoDelete = newFilesCheckFunc(checkPackageNoDelete)
+
+func checkPackageNoDelete(add addFunc, corpus *corpus) error {
+ previousPackageToFiles, err := protosource.PackageToFiles(corpus.previousFiles...)
+ if err != nil {
+ return err
+ }
+ packageToFiles, err := protosource.PackageToFiles(corpus.files...)
+ if err != nil {
+ return err
+ }
+ for previousPackage, previousFiles := range previousPackageToFiles {
+ if _, ok := packageToFiles[previousPackage]; !ok {
+ // Add previous descriptors in the same package as other descriptors to check
+ // for ignores. This will mean that if we have ignore_unstable_packages set,
+ // any one of these files will cause the ignore to happen. Note that we
+ // could probably just attach a single file, but we do this in case we
+ // have other ways to ignore in the future.
+ previousDescriptors := make([]protosource.Descriptor, len(previousFiles))
+ for i, previousFile := range previousFiles {
+ previousDescriptors[i] = previousFile
+ }
+ add(nil, previousDescriptors, nil, `Previously present package %q was deleted.`, previousPackage)
+ }
+ }
+ return nil
+}
+
+// CheckPackageServiceNoDelete is a check function.
+var CheckPackageServiceNoDelete = newFilesCheckFunc(checkPackageServiceNoDelete)
+
+func checkPackageServiceNoDelete(add addFunc, corpus *corpus) error {
+ previousPackageToNameToService, err := protosource.PackageToNameToService(corpus.previousFiles...)
+ if err != nil {
+ return err
+ }
+ packageToNameToService, err := protosource.PackageToNameToService(corpus.files...)
+ if err != nil {
+ return err
+ }
+ // caching across loops
+ var filePathToFile map[string]protosource.File
+ for previousPackage, previousNameToService := range previousPackageToNameToService {
+ if nameToService, ok := packageToNameToService[previousPackage]; ok {
+ for previousName, previousService := range previousNameToService {
+ if _, ok := nameToService[previousName]; !ok {
+ // if cache not populated, populate it
+ if filePathToFile == nil {
+ filePathToFile, err = protosource.FilePathToFile(corpus.files...)
+ if err != nil {
+ return err
+ }
+ }
+ // Check if the file still exists.
+ file, ok := filePathToFile[previousService.File().Path()]
+ if ok {
+ // File exists.
+ add(file, nil, nil, `Previously present service %q was deleted from package %q.`, previousName, previousPackage)
+ } else {
+ // File does not exist, we don't know where the service was deleted from.
+ // Add the previous service to check for ignores. This means that if
+ // ignore_unstable_packages is set, this will be triggered if the
+ // previous service was in an unstable package.
+ // TODO: find the service and print that this moved?
+ add(nil, []protosource.Descriptor{previousService}, nil, `Previously present service %q was deleted from package %q.`, previousName, previousPackage)
+ }
+ }
+ }
+ }
+ }
+ return nil
+}
+
+// CheckReservedEnumNoDelete is a check function.
+var CheckReservedEnumNoDelete = newEnumPairCheckFunc(checkReservedEnumNoDelete)
+
+func checkReservedEnumNoDelete(add addFunc, corpus *corpus, previousEnum protosource.Enum, enum protosource.Enum) error {
+ previousRanges := previousEnum.ReservedTagRanges()
+ ranges := enum.ReservedTagRanges()
+ if isSubset, missing := tagrangeutil.CheckIsSubset(ranges, previousRanges); !isSubset {
+ for _, tagRange := range missing {
+ add(enum, nil, enum.Location(), `Previously present reserved range %q on enum %q was deleted.`, protosource.TagRangeString(tagRange), enum.Name())
+ }
+ }
+ previousValueToReservedName := protosource.ValueToReservedName(previousEnum)
+ valueToReservedName := protosource.ValueToReservedName(enum)
+ for previousValue := range previousValueToReservedName {
+ if _, ok := valueToReservedName[previousValue]; !ok {
+ add(enum, nil, enum.Location(), `Previously present reserved name %q on enum %q was deleted.`, previousValue, enum.Name())
+ }
+ }
+ return nil
+}
+
+// CheckReservedMessageNoDelete is a check function.
+var CheckReservedMessageNoDelete = newMessagePairCheckFunc(checkReservedMessageNoDelete)
+
+func checkReservedMessageNoDelete(add addFunc, corpus *corpus, previousMessage protosource.Message, message protosource.Message) error {
+ previousRanges := previousMessage.ReservedTagRanges()
+ ranges := message.ReservedTagRanges()
+ if isSubset, missing := tagrangeutil.CheckIsSubset(ranges, previousRanges); !isSubset {
+ for _, tagRange := range missing {
+ add(message, nil, message.Location(), `Previously present reserved range %q on message %q was deleted.`, protosource.TagRangeString(tagRange), message.Name())
+ }
+ }
+ previousValueToReservedName := protosource.ValueToReservedName(previousMessage)
+ valueToReservedName := protosource.ValueToReservedName(message)
+ for previousValue := range previousValueToReservedName {
+ if _, ok := valueToReservedName[previousValue]; !ok {
+ add(message, nil, message.Location(), `Previously present reserved name %q on message %q was deleted.`, previousValue, message.Name())
+ }
+ }
+ return nil
+}
+
+// CheckRPCNoDelete is a check function.
+var CheckRPCNoDelete = newServicePairCheckFunc(checkRPCNoDelete)
+
+func checkRPCNoDelete(add addFunc, corpus *corpus, previousService protosource.Service, service protosource.Service) error {
+ previousNameToMethod, err := protosource.NameToMethod(previousService)
+ if err != nil {
+ return err
+ }
+ nameToMethod, err := protosource.NameToMethod(service)
+ if err != nil {
+ return err
+ }
+ for previousName := range previousNameToMethod {
+ if _, ok := nameToMethod[previousName]; !ok {
+ add(service, nil, service.Location(), `Previously present RPC %q on service %q was deleted.`, previousName, service.Name())
+ }
+ }
+ return nil
+}
+
+// CheckRPCSameClientStreaming is a check function.
+var CheckRPCSameClientStreaming = newMethodPairCheckFunc(checkRPCSameClientStreaming)
+
+func checkRPCSameClientStreaming(add addFunc, corpus *corpus, previousMethod protosource.Method, method protosource.Method) error {
+ if previousMethod.ClientStreaming() != method.ClientStreaming() {
+ previous := "streaming"
+ current := "unary"
+ if method.ClientStreaming() {
+ previous = "unary"
+ current = "streaming"
+ }
+ add(method, nil, method.Location(), `RPC %q on service %q changed from client %s to client %s.`, method.Name(), method.Service().Name(), previous, current)
+ }
+ return nil
+}
+
+// CheckRPCSameIdempotencyLevel is a check function.
+var CheckRPCSameIdempotencyLevel = newMethodPairCheckFunc(checkRPCSameIdempotencyLevel)
+
+func checkRPCSameIdempotencyLevel(add addFunc, corpus *corpus, previousMethod protosource.Method, method protosource.Method) error {
+ previous := previousMethod.IdempotencyLevel()
+ current := method.IdempotencyLevel()
+ if previous != current {
+ add(method, nil, method.IdempotencyLevelLocation(), `RPC %q on service %q changed option "idempotency_level" from %q to %q.`, method.Name(), method.Service().Name(), previous.String(), current.String())
+ }
+ return nil
+}
+
+// CheckRPCSameRequestType is a check function.
+var CheckRPCSameRequestType = newMethodPairCheckFunc(checkRPCSameRequestType)
+
+func checkRPCSameRequestType(add addFunc, corpus *corpus, previousMethod protosource.Method, method protosource.Method) error {
+ if previousMethod.InputTypeName() != method.InputTypeName() {
+ add(method, nil, method.InputTypeLocation(), `RPC %q on service %q changed request type from %q to %q.`, method.Name(), method.Service().Name(), previousMethod.InputTypeName(), method.InputTypeName())
+ }
+ return nil
+}
+
+// CheckRPCSameResponseType is a check function.
+var CheckRPCSameResponseType = newMethodPairCheckFunc(checkRPCSameResponseType)
+
+func checkRPCSameResponseType(add addFunc, corpus *corpus, previousMethod protosource.Method, method protosource.Method) error {
+ if previousMethod.OutputTypeName() != method.OutputTypeName() {
+ add(method, nil, method.OutputTypeLocation(), `RPC %q on service %q changed response type from %q to %q.`, method.Name(), method.Service().Name(), previousMethod.OutputTypeName(), method.OutputTypeName())
+ }
+ return nil
+}
+
+// CheckRPCSameServerStreaming is a check function.
+var CheckRPCSameServerStreaming = newMethodPairCheckFunc(checkRPCSameServerStreaming)
+
+func checkRPCSameServerStreaming(add addFunc, corpus *corpus, previousMethod protosource.Method, method protosource.Method) error {
+ if previousMethod.ServerStreaming() != method.ServerStreaming() {
+ previous := "streaming"
+ current := "unary"
+ if method.ServerStreaming() {
+ previous = "unary"
+ current = "streaming"
+ }
+ add(method, nil, method.Location(), `RPC %q on service %q changed from server %s to server %s.`, method.Name(), method.Service().Name(), previous, current)
+ }
+ return nil
+}
+
+// CheckServiceNoDelete is a check function.
+var CheckServiceNoDelete = newFilePairCheckFunc(checkServiceNoDelete)
+
+func checkServiceNoDelete(add addFunc, corpus *corpus, previousFile protosource.File, file protosource.File) error {
+ previousNameToService, err := protosource.NameToService(previousFile)
+ if err != nil {
+ return err
+ }
+ nameToService, err := protosource.NameToService(file)
+ if err != nil {
+ return err
+ }
+ for previousName := range previousNameToService {
+ if _, ok := nameToService[previousName]; !ok {
+ add(file, nil, nil, `Previously present service %q was deleted from file.`, previousName)
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck/usage.gen.go
new file mode 100644
index 000000000..43d83e426
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufbreakingcheck
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck/util.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck/util.go
new file mode 100644
index 000000000..f30606777
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingcheck/util.go
@@ -0,0 +1,352 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufbreakingcheck
+
+import (
+ "fmt"
+ "sort"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+)
+
+var (
+ // https://developers.google.com/protocol-buffers/docs/proto3#updating
+ fieldDescriptorProtoTypeToWireCompatiblityGroup = map[protosource.FieldDescriptorProtoType]int{
+ protosource.FieldDescriptorProtoTypeInt32: 1,
+ protosource.FieldDescriptorProtoTypeInt64: 1,
+ protosource.FieldDescriptorProtoTypeUint32: 1,
+ protosource.FieldDescriptorProtoTypeUint64: 1,
+ protosource.FieldDescriptorProtoTypeBool: 1,
+ protosource.FieldDescriptorProtoTypeSint32: 2,
+ protosource.FieldDescriptorProtoTypeSint64: 2,
+ // While string and bytes are compatible if the bytes are valid UTF-8, we cannot
+ // determine if a field will actually be valid UTF-8, as we are concerned with the
+ // definitions and not individual messages, so we have these in different
+ // compatibility groups. We allow string to evolve to bytes, but not bytes to
+ // string, but we need them to be in different compatibility groups so that
+ // we have to manually detect this.
+ protosource.FieldDescriptorProtoTypeString: 3,
+ protosource.FieldDescriptorProtoTypeBytes: 4,
+ protosource.FieldDescriptorProtoTypeFixed32: 5,
+ protosource.FieldDescriptorProtoTypeSfixed32: 5,
+ protosource.FieldDescriptorProtoTypeFixed64: 6,
+ protosource.FieldDescriptorProtoTypeSfixed64: 6,
+ protosource.FieldDescriptorProtoTypeDouble: 7,
+ protosource.FieldDescriptorProtoTypeFloat: 8,
+ protosource.FieldDescriptorProtoTypeGroup: 9,
+ // Embedded messages are compatible with bytes if the bytes are serialized versions
+ // of the message, but we have no way of verifying this.
+ protosource.FieldDescriptorProtoTypeMessage: 10,
+ // Enum is compatible with int32, uint32, int64, uint64 if the values match
+ // an enum value, but we have no way of verifying this.
+ protosource.FieldDescriptorProtoTypeEnum: 11,
+ }
+
+ // https://developers.google.com/protocol-buffers/docs/proto3#json
+ // this is not just JSON-compatible, but also wire-compatible, i.e. the intersection
+ fieldDescriptorProtoTypeToWireJSONCompatiblityGroup = map[protosource.FieldDescriptorProtoType]int{
+ // fixed32 not compatible for wire so not included
+ protosource.FieldDescriptorProtoTypeInt32: 1,
+ protosource.FieldDescriptorProtoTypeUint32: 1,
+ // fixed64 not compatible for wire so not included
+ protosource.FieldDescriptorProtoTypeInt64: 2,
+ protosource.FieldDescriptorProtoTypeUint64: 2,
+ protosource.FieldDescriptorProtoTypeFixed32: 3,
+ protosource.FieldDescriptorProtoTypeSfixed32: 3,
+ protosource.FieldDescriptorProtoTypeFixed64: 4,
+ protosource.FieldDescriptorProtoTypeSfixed64: 4,
+ protosource.FieldDescriptorProtoTypeBool: 5,
+ protosource.FieldDescriptorProtoTypeSint32: 6,
+ protosource.FieldDescriptorProtoTypeSint64: 7,
+ protosource.FieldDescriptorProtoTypeString: 8,
+ protosource.FieldDescriptorProtoTypeBytes: 9,
+ protosource.FieldDescriptorProtoTypeDouble: 10,
+ protosource.FieldDescriptorProtoTypeFloat: 11,
+ protosource.FieldDescriptorProtoTypeGroup: 12,
+ protosource.FieldDescriptorProtoTypeMessage: 14,
+ protosource.FieldDescriptorProtoTypeEnum: 15,
+ }
+)
+
+// addFunc adds a FileAnnotation.
+//
+// Both the Descriptor and Location can be nil.
+type addFunc func(protosource.Descriptor, []protosource.Descriptor, protosource.Location, string, ...interface{})
+
+// corpus is a store of the previous files and files given to a check function.
+//
+// this is passed down so that pair functions have access to the original inputs.
+type corpus struct {
+ previousFiles []protosource.File
+ files []protosource.File
+}
+
+func newCorpus(
+ previousFiles []protosource.File,
+ files []protosource.File,
+) *corpus {
+ return &corpus{
+ previousFiles: previousFiles,
+ files: files,
+ }
+}
+
+func newFilesCheckFunc(
+ f func(addFunc, *corpus) error,
+) func(string, internal.IgnoreFunc, []protosource.File, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return func(id string, ignoreFunc internal.IgnoreFunc, previousFiles []protosource.File, files []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ helper := internal.NewHelper(id, ignoreFunc)
+ if err := f(helper.AddFileAnnotationWithExtraIgnoreDescriptorsf, newCorpus(previousFiles, files)); err != nil {
+ return nil, err
+ }
+ return helper.FileAnnotations(), nil
+ }
+}
+
+func newFilePairCheckFunc(
+ f func(addFunc, *corpus, protosource.File, protosource.File) error,
+) func(string, internal.IgnoreFunc, []protosource.File, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFilesCheckFunc(
+ func(add addFunc, corpus *corpus) error {
+ previousFilePathToFile, err := protosource.FilePathToFile(corpus.previousFiles...)
+ if err != nil {
+ return err
+ }
+ filePathToFile, err := protosource.FilePathToFile(corpus.files...)
+ if err != nil {
+ return err
+ }
+ for previousFilePath, previousFile := range previousFilePathToFile {
+ if file, ok := filePathToFile[previousFilePath]; ok {
+ if err := f(add, corpus, previousFile, file); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newEnumPairCheckFunc(
+ f func(addFunc, *corpus, protosource.Enum, protosource.Enum) error,
+) func(string, internal.IgnoreFunc, []protosource.File, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFilesCheckFunc(
+ func(add addFunc, corpus *corpus) error {
+ previousFullNameToEnum, err := protosource.FullNameToEnum(corpus.previousFiles...)
+ if err != nil {
+ return err
+ }
+ fullNameToEnum, err := protosource.FullNameToEnum(corpus.files...)
+ if err != nil {
+ return err
+ }
+ for previousFullName, previousEnum := range previousFullNameToEnum {
+ if enum, ok := fullNameToEnum[previousFullName]; ok {
+ if err := f(add, corpus, previousEnum, enum); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ },
+ )
+}
+
+// compares all the enums that are of the same number
+// map is from name to EnumValue for the given number
+func newEnumValuePairCheckFunc(
+ f func(addFunc, *corpus, map[string]protosource.EnumValue, map[string]protosource.EnumValue) error,
+) func(string, internal.IgnoreFunc, []protosource.File, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newEnumPairCheckFunc(
+ func(add addFunc, corpus *corpus, previousEnum protosource.Enum, enum protosource.Enum) error {
+ previousNumberToNameToEnumValue, err := protosource.NumberToNameToEnumValue(previousEnum)
+ if err != nil {
+ return err
+ }
+ numberToNameToEnumValue, err := protosource.NumberToNameToEnumValue(enum)
+ if err != nil {
+ return err
+ }
+ for previousNumber, previousNameToEnumValue := range previousNumberToNameToEnumValue {
+ if nameToEnumValue, ok := numberToNameToEnumValue[previousNumber]; ok {
+ if err := f(add, corpus, previousNameToEnumValue, nameToEnumValue); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newMessagePairCheckFunc(
+ f func(addFunc, *corpus, protosource.Message, protosource.Message) error,
+) func(string, internal.IgnoreFunc, []protosource.File, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFilesCheckFunc(
+ func(add addFunc, corpus *corpus) error {
+ previousFullNameToMessage, err := protosource.FullNameToMessage(corpus.previousFiles...)
+ if err != nil {
+ return err
+ }
+ fullNameToMessage, err := protosource.FullNameToMessage(corpus.files...)
+ if err != nil {
+ return err
+ }
+ for previousFullName, previousMessage := range previousFullNameToMessage {
+ if message, ok := fullNameToMessage[previousFullName]; ok {
+ if err := f(add, corpus, previousMessage, message); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newFieldPairCheckFunc(
+ f func(addFunc, *corpus, protosource.Field, protosource.Field) error,
+) func(string, internal.IgnoreFunc, []protosource.File, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newMessagePairCheckFunc(
+ func(add addFunc, corpus *corpus, previousMessage protosource.Message, message protosource.Message) error {
+ previousNumberToField, err := protosource.NumberToMessageField(previousMessage)
+ if err != nil {
+ return err
+ }
+ numberToField, err := protosource.NumberToMessageField(message)
+ if err != nil {
+ return err
+ }
+ for previousNumber, previousField := range previousNumberToField {
+ if field, ok := numberToField[previousNumber]; ok {
+ if err := f(add, corpus, previousField, field); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newServicePairCheckFunc(
+ f func(addFunc, *corpus, protosource.Service, protosource.Service) error,
+) func(string, internal.IgnoreFunc, []protosource.File, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFilesCheckFunc(
+ func(add addFunc, corpus *corpus) error {
+ previousFullNameToService, err := protosource.FullNameToService(corpus.previousFiles...)
+ if err != nil {
+ return err
+ }
+ fullNameToService, err := protosource.FullNameToService(corpus.files...)
+ if err != nil {
+ return err
+ }
+ for previousFullName, previousService := range previousFullNameToService {
+ if service, ok := fullNameToService[previousFullName]; ok {
+ if err := f(add, corpus, previousService, service); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newMethodPairCheckFunc(
+ f func(addFunc, *corpus, protosource.Method, protosource.Method) error,
+) func(string, internal.IgnoreFunc, []protosource.File, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newServicePairCheckFunc(
+ func(add addFunc, corpus *corpus, previousService protosource.Service, service protosource.Service) error {
+ previousNameToMethod, err := protosource.NameToMethod(previousService)
+ if err != nil {
+ return err
+ }
+ nameToMethod, err := protosource.NameToMethod(service)
+ if err != nil {
+ return err
+ }
+ for previousName, previousMethod := range previousNameToMethod {
+ if method, ok := nameToMethod[previousName]; ok {
+ if err := f(add, corpus, previousMethod, method); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func getDescriptorAndLocationForDeletedEnum(file protosource.File, previousNestedName string) (protosource.Descriptor, protosource.Location, error) {
+ if strings.Contains(previousNestedName, ".") {
+ nestedNameToMessage, err := protosource.NestedNameToMessage(file)
+ if err != nil {
+ return nil, nil, err
+ }
+ split := strings.Split(previousNestedName, ".")
+ for i := len(split) - 1; i > 0; i-- {
+ if message, ok := nestedNameToMessage[strings.Join(split[0:i], ".")]; ok {
+ return message, message.Location(), nil
+ }
+ }
+ }
+ return file, nil, nil
+}
+
+func getDescriptorAndLocationForDeletedMessage(file protosource.File, nestedNameToMessage map[string]protosource.Message, previousNestedName string) (protosource.Descriptor, protosource.Location) {
+ if strings.Contains(previousNestedName, ".") {
+ split := strings.Split(previousNestedName, ".")
+ for i := len(split) - 1; i > 0; i-- {
+ if message, ok := nestedNameToMessage[strings.Join(split[0:i], ".")]; ok {
+ return message, message.Location()
+ }
+ }
+ }
+ return file, nil
+}
+
+func getSortedEnumValueNames(nameToEnumValue map[string]protosource.EnumValue) []string {
+ names := make([]string, 0, len(nameToEnumValue))
+ for name := range nameToEnumValue {
+ names = append(names, name)
+ }
+ sort.Strings(names)
+ return names
+}
+
+func getEnumByFullName(files []protosource.File, enumFullName string) (protosource.Enum, error) {
+ fullNameToEnum, err := protosource.FullNameToEnum(files...)
+ if err != nil {
+ return nil, err
+ }
+ enum, ok := fullNameToEnum[enumFullName]
+ if !ok {
+ return nil, fmt.Errorf("expected enum %q to exist but was not found", enumFullName)
+ }
+ return enum, nil
+}
+
+func withBackupLocation(primary protosource.Location, secondary protosource.Location) protosource.Location {
+ if primary != nil {
+ return primary
+ }
+ return secondary
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1/bufbreakingv1.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1/bufbreakingv1.go
new file mode 100644
index 000000000..7513e387c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1/bufbreakingv1.go
@@ -0,0 +1,37 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufbreakingv1 contains the VersionSpec for v1.
+//
+// It uses bufbreakingcheck and bufbreakingbuild.
+//
+// There were no changes from v1beta1.
+package bufbreakingv1
+
+import "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+
+// VersionSpec is the version specification for v1.
+//
+// Changes from v1beta1:
+//
+// Adds FILE_SAME_PACKAGE to PACKAGE, WIRE, and WIRE_JSON.
+//
+// Splits FIELD_SAME_TYPE into FIELD_SAME_TYPE for FILE AND PACKAGE,
+// FIRE_WIRE_JSON_COMPATIBLE_TYPE for WIRE_JSON, and
+// FIELD_WIRE_COMPATIBLE_TYPE for WIRE.
+var VersionSpec = &internal.VersionSpec{
+ RuleBuilders: v1RuleBuilders,
+ DefaultCategories: v1DefaultCategories,
+ IDToCategories: v1IDToCategories,
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1/usage.gen.go
new file mode 100644
index 000000000..23ad36922
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufbreakingv1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1/vars.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1/vars.go
new file mode 100644
index 000000000..de325f098
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1/vars.go
@@ -0,0 +1,334 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufbreakingv1
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingbuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+)
+
+var (
+ // v1RuleBuilders are the rule builders.
+ v1RuleBuilders = []*internal.RuleBuilder{
+ bufbreakingbuild.EnumNoDeleteRuleBuilder,
+ bufbreakingbuild.EnumValueNoDeleteRuleBuilder,
+ bufbreakingbuild.EnumValueNoDeleteUnlessNameReservedRuleBuilder,
+ bufbreakingbuild.EnumValueNoDeleteUnlessNumberReservedRuleBuilder,
+ bufbreakingbuild.EnumValueSameNameRuleBuilder,
+ bufbreakingbuild.ExtensionMessageNoDeleteRuleBuilder,
+ bufbreakingbuild.FieldNoDeleteRuleBuilder,
+ bufbreakingbuild.FieldNoDeleteUnlessNameReservedRuleBuilder,
+ bufbreakingbuild.FieldNoDeleteUnlessNumberReservedRuleBuilder,
+ bufbreakingbuild.FieldSameCTypeRuleBuilder,
+ bufbreakingbuild.FieldSameJSONNameRuleBuilder,
+ bufbreakingbuild.FieldSameJSTypeRuleBuilder,
+ bufbreakingbuild.FieldSameLabelRuleBuilder,
+ bufbreakingbuild.FieldSameNameRuleBuilder,
+ bufbreakingbuild.FieldSameOneofRuleBuilder,
+ bufbreakingbuild.FieldSameTypeRuleBuilder,
+ bufbreakingbuild.FieldWireCompatibleTypeRuleBuilder,
+ bufbreakingbuild.FieldWireJSONCompatibleTypeRuleBuilder,
+ bufbreakingbuild.FileNoDeleteRuleBuilder,
+ bufbreakingbuild.FileSameCsharpNamespaceRuleBuilder,
+ bufbreakingbuild.FileSameGoPackageRuleBuilder,
+ bufbreakingbuild.FileSameJavaMultipleFilesRuleBuilder,
+ bufbreakingbuild.FileSameJavaOuterClassnameRuleBuilder,
+ bufbreakingbuild.FileSameJavaPackageRuleBuilder,
+ bufbreakingbuild.FileSameJavaStringCheckUtf8RuleBuilder,
+ bufbreakingbuild.FileSameObjcClassPrefixRuleBuilder,
+ bufbreakingbuild.FileSamePackageRuleBuilder,
+ bufbreakingbuild.FileSamePhpClassPrefixRuleBuilder,
+ bufbreakingbuild.FileSamePhpMetadataNamespaceRuleBuilder,
+ bufbreakingbuild.FileSamePhpNamespaceRuleBuilder,
+ bufbreakingbuild.FileSameRubyPackageRuleBuilder,
+ bufbreakingbuild.FileSameSwiftPrefixRuleBuilder,
+ bufbreakingbuild.FileSameOptimizeForRuleBuilder,
+ bufbreakingbuild.FileSameCcGenericServicesRuleBuilder,
+ bufbreakingbuild.FileSameJavaGenericServicesRuleBuilder,
+ bufbreakingbuild.FileSamePyGenericServicesRuleBuilder,
+ bufbreakingbuild.FileSamePhpGenericServicesRuleBuilder,
+ bufbreakingbuild.FileSameCcEnableArenasRuleBuilder,
+ bufbreakingbuild.FileSameSyntaxRuleBuilder,
+ bufbreakingbuild.MessageNoDeleteRuleBuilder,
+ bufbreakingbuild.MessageNoRemoveStandardDescriptorAccessorRuleBuilder,
+ bufbreakingbuild.MessageSameMessageSetWireFormatRuleBuilder,
+ bufbreakingbuild.MessageSameRequiredFieldsRuleBuilder,
+ bufbreakingbuild.OneofNoDeleteRuleBuilder,
+ bufbreakingbuild.PackageEnumNoDeleteRuleBuilder,
+ bufbreakingbuild.PackageMessageNoDeleteRuleBuilder,
+ bufbreakingbuild.PackageNoDeleteRuleBuilder,
+ bufbreakingbuild.PackageServiceNoDeleteRuleBuilder,
+ bufbreakingbuild.ReservedEnumNoDeleteRuleBuilder,
+ bufbreakingbuild.ReservedMessageNoDeleteRuleBuilder,
+ bufbreakingbuild.RPCNoDeleteRuleBuilder,
+ bufbreakingbuild.RPCSameClientStreamingRuleBuilder,
+ bufbreakingbuild.RPCSameIdempotencyLevelRuleBuilder,
+ bufbreakingbuild.RPCSameRequestTypeRuleBuilder,
+ bufbreakingbuild.RPCSameResponseTypeRuleBuilder,
+ bufbreakingbuild.RPCSameServerStreamingRuleBuilder,
+ bufbreakingbuild.ServiceNoDeleteRuleBuilder,
+ }
+
+ // v1DefaultCategories are the default categories.
+ v1DefaultCategories = []string{
+ "FILE",
+ }
+ // v1IDToCategories associates IDs to categories.
+ v1IDToCategories = map[string][]string{
+ "ENUM_NO_DELETE": {
+ "FILE",
+ },
+ "ENUM_VALUE_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "ENUM_VALUE_NO_DELETE_UNLESS_NAME_RESERVED": {
+ "WIRE_JSON",
+ },
+ "ENUM_VALUE_NO_DELETE_UNLESS_NUMBER_RESERVED": {
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "ENUM_VALUE_SAME_NAME": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ },
+ "EXTENSION_MESSAGE_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FIELD_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FIELD_NO_DELETE_UNLESS_NAME_RESERVED": {
+ "WIRE_JSON",
+ },
+ "FIELD_NO_DELETE_UNLESS_NUMBER_RESERVED": {
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "FIELD_SAME_CTYPE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FIELD_SAME_JSON_NAME": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ },
+ "FIELD_SAME_JSTYPE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FIELD_SAME_LABEL": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "FIELD_SAME_NAME": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ },
+ "FIELD_SAME_ONEOF": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "FIELD_SAME_TYPE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FIELD_WIRE_COMPATIBLE_TYPE": {
+ "WIRE",
+ },
+ "FIELD_WIRE_JSON_COMPATIBLE_TYPE": {
+ "WIRE_JSON",
+ },
+ "FILE_NO_DELETE": {
+ "FILE",
+ },
+ "FILE_SAME_CSHARP_NAMESPACE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_GO_PACKAGE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_JAVA_MULTIPLE_FILES": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_JAVA_OUTER_CLASSNAME": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_JAVA_PACKAGE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_JAVA_STRING_CHECK_UTF8": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_OBJC_CLASS_PREFIX": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_PACKAGE": {
+ "FILE",
+ "PACKAGE",
+ "WIRE",
+ "WIRE_JSON",
+ },
+ "FILE_SAME_PHP_CLASS_PREFIX": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_PHP_METADATA_NAMESPACE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_PHP_NAMESPACE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_RUBY_PACKAGE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_SWIFT_PREFIX": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_OPTIMIZE_FOR": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_CC_GENERIC_SERVICES": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_JAVA_GENERIC_SERVICES": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_PY_GENERIC_SERVICES": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_PHP_GENERIC_SERVICES": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_CC_ENABLE_ARENAS": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_SYNTAX": {
+ "FILE",
+ "PACKAGE",
+ },
+ "MESSAGE_NO_DELETE": {
+ "FILE",
+ },
+ "MESSAGE_NO_REMOVE_STANDARD_DESCRIPTOR_ACCESSOR": {
+ "FILE",
+ "PACKAGE",
+ },
+ "MESSAGE_SAME_MESSAGE_SET_WIRE_FORMAT": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "MESSAGE_SAME_REQUIRED_FIELDS": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "ONEOF_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "PACKAGE_ENUM_NO_DELETE": {
+ "PACKAGE",
+ },
+ "PACKAGE_MESSAGE_NO_DELETE": {
+ "PACKAGE",
+ },
+ "PACKAGE_NO_DELETE": {
+ "PACKAGE",
+ },
+ "PACKAGE_SERVICE_NO_DELETE": {
+ "PACKAGE",
+ },
+ "RESERVED_ENUM_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RESERVED_MESSAGE_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RPC_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "RPC_SAME_CLIENT_STREAMING": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RPC_SAME_IDEMPOTENCY_LEVEL": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RPC_SAME_REQUEST_TYPE": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RPC_SAME_RESPONSE_TYPE": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RPC_SAME_SERVER_STREAMING": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "SERVICE_NO_DELETE": {
+ "FILE",
+ },
+ }
+)
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1/bufbreakingv1beta1.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1/bufbreakingv1beta1.go
new file mode 100644
index 000000000..ae6be7dec
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1/bufbreakingv1beta1.go
@@ -0,0 +1,27 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufbreakingv1beta1 contains the VersionSpec for v1beta1.
+//
+// It uses bufbreakingcheck and bufbreakingbuild.
+package bufbreakingv1beta1
+
+import "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+
+// VersionSpec is the version specification for v1beta1.
+var VersionSpec = &internal.VersionSpec{
+ RuleBuilders: v1beta1RuleBuilders,
+ DefaultCategories: v1beta1DefaultCategories,
+ IDToCategories: v1beta1IDToCategories,
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1/usage.gen.go
new file mode 100644
index 000000000..5de9126ef
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufbreakingv1beta1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1/vars.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1/vars.go
new file mode 100644
index 000000000..ed7a79595
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingv1beta1/vars.go
@@ -0,0 +1,325 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufbreakingv1beta1
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/internal/bufbreakingbuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+)
+
+var (
+ // v1beta1RuleBuilders are the rule builders.
+ v1beta1RuleBuilders = []*internal.RuleBuilder{
+ bufbreakingbuild.EnumNoDeleteRuleBuilder,
+ bufbreakingbuild.EnumValueNoDeleteRuleBuilder,
+ bufbreakingbuild.EnumValueNoDeleteUnlessNameReservedRuleBuilder,
+ bufbreakingbuild.EnumValueNoDeleteUnlessNumberReservedRuleBuilder,
+ bufbreakingbuild.EnumValueSameNameRuleBuilder,
+ bufbreakingbuild.ExtensionMessageNoDeleteRuleBuilder,
+ bufbreakingbuild.FieldNoDeleteRuleBuilder,
+ bufbreakingbuild.FieldNoDeleteUnlessNameReservedRuleBuilder,
+ bufbreakingbuild.FieldNoDeleteUnlessNumberReservedRuleBuilder,
+ bufbreakingbuild.FieldSameCTypeRuleBuilder,
+ bufbreakingbuild.FieldSameJSONNameRuleBuilder,
+ bufbreakingbuild.FieldSameJSTypeRuleBuilder,
+ bufbreakingbuild.FieldSameLabelRuleBuilder,
+ bufbreakingbuild.FieldSameNameRuleBuilder,
+ bufbreakingbuild.FieldSameOneofRuleBuilder,
+ bufbreakingbuild.FieldSameTypeRuleBuilder,
+ bufbreakingbuild.FileNoDeleteRuleBuilder,
+ bufbreakingbuild.FileSameCsharpNamespaceRuleBuilder,
+ bufbreakingbuild.FileSameGoPackageRuleBuilder,
+ bufbreakingbuild.FileSameJavaMultipleFilesRuleBuilder,
+ bufbreakingbuild.FileSameJavaOuterClassnameRuleBuilder,
+ bufbreakingbuild.FileSameJavaPackageRuleBuilder,
+ bufbreakingbuild.FileSameJavaStringCheckUtf8RuleBuilder,
+ bufbreakingbuild.FileSameObjcClassPrefixRuleBuilder,
+ bufbreakingbuild.FileSamePackageRuleBuilder,
+ bufbreakingbuild.FileSamePhpClassPrefixRuleBuilder,
+ bufbreakingbuild.FileSamePhpMetadataNamespaceRuleBuilder,
+ bufbreakingbuild.FileSamePhpNamespaceRuleBuilder,
+ bufbreakingbuild.FileSameRubyPackageRuleBuilder,
+ bufbreakingbuild.FileSameSwiftPrefixRuleBuilder,
+ bufbreakingbuild.FileSameOptimizeForRuleBuilder,
+ bufbreakingbuild.FileSameCcGenericServicesRuleBuilder,
+ bufbreakingbuild.FileSameJavaGenericServicesRuleBuilder,
+ bufbreakingbuild.FileSamePyGenericServicesRuleBuilder,
+ bufbreakingbuild.FileSamePhpGenericServicesRuleBuilder,
+ bufbreakingbuild.FileSameCcEnableArenasRuleBuilder,
+ bufbreakingbuild.FileSameSyntaxRuleBuilder,
+ bufbreakingbuild.MessageNoDeleteRuleBuilder,
+ bufbreakingbuild.MessageNoRemoveStandardDescriptorAccessorRuleBuilder,
+ bufbreakingbuild.MessageSameMessageSetWireFormatRuleBuilder,
+ bufbreakingbuild.MessageSameRequiredFieldsRuleBuilder,
+ bufbreakingbuild.OneofNoDeleteRuleBuilder,
+ bufbreakingbuild.PackageEnumNoDeleteRuleBuilder,
+ bufbreakingbuild.PackageMessageNoDeleteRuleBuilder,
+ bufbreakingbuild.PackageNoDeleteRuleBuilder,
+ bufbreakingbuild.PackageServiceNoDeleteRuleBuilder,
+ bufbreakingbuild.ReservedEnumNoDeleteRuleBuilder,
+ bufbreakingbuild.ReservedMessageNoDeleteRuleBuilder,
+ bufbreakingbuild.RPCNoDeleteRuleBuilder,
+ bufbreakingbuild.RPCSameClientStreamingRuleBuilder,
+ bufbreakingbuild.RPCSameIdempotencyLevelRuleBuilder,
+ bufbreakingbuild.RPCSameRequestTypeRuleBuilder,
+ bufbreakingbuild.RPCSameResponseTypeRuleBuilder,
+ bufbreakingbuild.RPCSameServerStreamingRuleBuilder,
+ bufbreakingbuild.ServiceNoDeleteRuleBuilder,
+ }
+
+ // v1beta1DefaultCategories are the default categories.
+ v1beta1DefaultCategories = []string{
+ "FILE",
+ }
+ // v1beta1IDToCategories associates IDs to categories.
+ v1beta1IDToCategories = map[string][]string{
+ "ENUM_NO_DELETE": {
+ "FILE",
+ },
+ "ENUM_VALUE_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "ENUM_VALUE_NO_DELETE_UNLESS_NAME_RESERVED": {
+ "WIRE_JSON",
+ },
+ "ENUM_VALUE_NO_DELETE_UNLESS_NUMBER_RESERVED": {
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "ENUM_VALUE_SAME_NAME": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ },
+ "EXTENSION_MESSAGE_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FIELD_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FIELD_NO_DELETE_UNLESS_NAME_RESERVED": {
+ "WIRE_JSON",
+ },
+ "FIELD_NO_DELETE_UNLESS_NUMBER_RESERVED": {
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "FIELD_SAME_CTYPE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FIELD_SAME_JSON_NAME": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ },
+ "FIELD_SAME_JSTYPE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FIELD_SAME_LABEL": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "FIELD_SAME_NAME": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ },
+ "FIELD_SAME_ONEOF": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "FIELD_SAME_TYPE": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "FILE_NO_DELETE": {
+ "FILE",
+ },
+ "FILE_SAME_CSHARP_NAMESPACE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_GO_PACKAGE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_JAVA_MULTIPLE_FILES": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_JAVA_OUTER_CLASSNAME": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_JAVA_PACKAGE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_JAVA_STRING_CHECK_UTF8": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_OBJC_CLASS_PREFIX": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_PACKAGE": {
+ "FILE",
+ },
+ "FILE_SAME_PHP_CLASS_PREFIX": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_PHP_METADATA_NAMESPACE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_PHP_NAMESPACE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_RUBY_PACKAGE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_SWIFT_PREFIX": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_OPTIMIZE_FOR": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_CC_GENERIC_SERVICES": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_JAVA_GENERIC_SERVICES": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_PY_GENERIC_SERVICES": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_PHP_GENERIC_SERVICES": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_CC_ENABLE_ARENAS": {
+ "FILE",
+ "PACKAGE",
+ },
+ "FILE_SAME_SYNTAX": {
+ "FILE",
+ "PACKAGE",
+ },
+ "MESSAGE_NO_DELETE": {
+ "FILE",
+ },
+ "MESSAGE_NO_REMOVE_STANDARD_DESCRIPTOR_ACCESSOR": {
+ "FILE",
+ "PACKAGE",
+ },
+ "MESSAGE_SAME_MESSAGE_SET_WIRE_FORMAT": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "MESSAGE_SAME_REQUIRED_FIELDS": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "ONEOF_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "PACKAGE_ENUM_NO_DELETE": {
+ "PACKAGE",
+ },
+ "PACKAGE_MESSAGE_NO_DELETE": {
+ "PACKAGE",
+ },
+ "PACKAGE_NO_DELETE": {
+ "PACKAGE",
+ },
+ "PACKAGE_SERVICE_NO_DELETE": {
+ "PACKAGE",
+ },
+ "RESERVED_ENUM_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RESERVED_MESSAGE_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RPC_NO_DELETE": {
+ "FILE",
+ "PACKAGE",
+ },
+ "RPC_SAME_CLIENT_STREAMING": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RPC_SAME_IDEMPOTENCY_LEVEL": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RPC_SAME_REQUEST_TYPE": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RPC_SAME_RESPONSE_TYPE": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "RPC_SAME_SERVER_STREAMING": {
+ "FILE",
+ "PACKAGE",
+ "WIRE_JSON",
+ "WIRE",
+ },
+ "SERVICE_NO_DELETE": {
+ "FILE",
+ },
+ }
+)
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/usage.gen.go
new file mode 100644
index 000000000..cdf9f8a56
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufbreaking
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufcheck.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufcheck.go
new file mode 100644
index 000000000..efb86082c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/bufcheck.go
@@ -0,0 +1,107 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufcheck contains the implementations of the lint and breaking change detection rules.
+//
+// There is a lot of shared logic between the two, and originally they were actually combined into
+// one logical entity (where some checks happened to be linters, and some checks happen to be
+// breaking change detectors), so some of this is historical.
+package bufcheck
+
+import (
+ "encoding/json"
+ "fmt"
+ "io"
+ "strings"
+ "text/tabwriter"
+
+ "go.uber.org/multierr"
+)
+
+// AllRuleFormatStrings is all rule format strings.
+var AllRuleFormatStrings = []string{
+ "text",
+ "json",
+}
+
+// Rule is a rule.
+type Rule interface {
+ json.Marshaler
+
+ // ID returns the ID of the Rule.
+ //
+ // UPPER_SNAKE_CASE.
+ ID() string
+ // Categories returns the categories of the Rule.
+ //
+ // UPPER_SNAKE_CASE.
+ // Sorted.
+ // May be empty.
+ Categories() []string
+ // Purpose returns the purpose of the Rule.
+ //
+ // Full sentence.
+ Purpose() string
+}
+
+// PrintRules prints the rules to the writer.
+//
+// The empty string defaults to text.
+func PrintRules(writer io.Writer, rules []Rule, formatString string) (retErr error) {
+ if len(rules) == 0 {
+ return nil
+ }
+ var asJSON bool
+ switch s := strings.ToLower(strings.TrimSpace(formatString)); s {
+ case "", "text":
+ asJSON = false
+ case "json":
+ asJSON = true
+ default:
+ return fmt.Errorf("unknown format: %q", s)
+ }
+ if !asJSON {
+ tabWriter := tabwriter.NewWriter(writer, 0, 0, 2, ' ', 0)
+ defer func() {
+ retErr = multierr.Append(retErr, tabWriter.Flush())
+ }()
+ writer = tabWriter
+ if _, err := fmt.Fprintln(writer, "ID\tCATEGORIES\tPURPOSE"); err != nil {
+ return err
+ }
+ }
+ for _, rule := range rules {
+ if err := printRule(writer, rule, asJSON); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func printRule(writer io.Writer, rule Rule, asJSON bool) error {
+ if asJSON {
+ data, err := json.Marshal(rule)
+ if err != nil {
+ return err
+ }
+ if _, err := fmt.Fprintln(writer, string(data)); err != nil {
+ return err
+ }
+ return nil
+ }
+ if _, err := fmt.Fprintf(writer, "%s\t%s\t%s\n", rule.ID(), strings.Join(rule.Categories(), ", "), rule.Purpose()); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflint.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflint.go
new file mode 100644
index 000000000..324fbc650
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflint.go
@@ -0,0 +1,149 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflint contains the linting functionality.
+//
+// The primary entry point to this package is the Handler.
+package buflint
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1beta1"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "go.uber.org/zap"
+)
+
+// AllFormatStrings are all format strings.
+var AllFormatStrings = append(
+ bufanalysis.AllFormatStrings,
+ "config-ignore-yaml",
+)
+
+// Handler handles the main lint functionality.
+type Handler interface {
+ // Check runs the lint checks.
+ //
+ // The image should have source code info for this to work properly.
+ //
+ // Images should be filtered with regards to imports before passing to this function.
+ Check(
+ ctx context.Context,
+ config *buflintconfig.Config,
+ image bufimage.Image,
+ ) ([]bufanalysis.FileAnnotation, error)
+}
+
+// NewHandler returns a new Handler.
+func NewHandler(logger *zap.Logger) Handler {
+ return newHandler(logger)
+}
+
+// RulesForConfig returns the rules for a given config.
+//
+// Should only be used for printing.
+func RulesForConfig(config *buflintconfig.Config) ([]bufcheck.Rule, error) {
+ internalConfig, err := internalConfigForConfig(config)
+ if err != nil {
+ return nil, err
+ }
+ return rulesForInternalRules(internalConfig.Rules), nil
+}
+
+// GetAllRulesV1Beta1 gets all known rules.
+//
+// Should only be used for printing.
+func GetAllRulesV1Beta1() ([]bufcheck.Rule, error) {
+ internalConfig, err := internalConfigForConfig(
+ &buflintconfig.Config{
+ Use: internal.AllIDsForVersionSpec(buflintv1beta1.VersionSpec),
+ Version: bufconfig.V1Beta1Version,
+ },
+ )
+ if err != nil {
+ return nil, err
+ }
+ return rulesForInternalRules(internalConfig.Rules), nil
+}
+
+// GetAllRulesV1 gets all known rules.
+//
+// Should only be used for printing.
+func GetAllRulesV1() ([]bufcheck.Rule, error) {
+ internalConfig, err := internalConfigForConfig(
+ &buflintconfig.Config{
+ Use: internal.AllIDsForVersionSpec(buflintv1.VersionSpec),
+ Version: bufconfig.V1Version,
+ },
+ )
+ if err != nil {
+ return nil, err
+ }
+ return rulesForInternalRules(internalConfig.Rules), nil
+}
+
+// GetAllRulesAndCategoriesV1Beta1 returns all rules and categories for v1beta1 as a string slice.
+//
+// This is used for validation purposes only.
+func GetAllRulesAndCategoriesV1Beta1() []string {
+ return internal.AllCategoriesAndIDsForVersionSpec(buflintv1beta1.VersionSpec)
+}
+
+// GetAllRulesAndCategoriesV1 returns all rules and categories for v1 as a string slice.
+//
+// This is used for validation purposes only.
+func GetAllRulesAndCategoriesV1() []string {
+ return internal.AllCategoriesAndIDsForVersionSpec(buflintv1.VersionSpec)
+}
+
+func internalConfigForConfig(config *buflintconfig.Config) (*internal.Config, error) {
+ var versionSpec *internal.VersionSpec
+ switch config.Version {
+ case bufconfig.V1Beta1Version:
+ versionSpec = buflintv1beta1.VersionSpec
+ case bufconfig.V1Version:
+ versionSpec = buflintv1.VersionSpec
+ }
+ return internal.ConfigBuilder{
+ Use: config.Use,
+ Except: config.Except,
+ IgnoreRootPaths: config.IgnoreRootPaths,
+ IgnoreIDOrCategoryToRootPaths: config.IgnoreIDOrCategoryToRootPaths,
+ AllowCommentIgnores: config.AllowCommentIgnores,
+ EnumZeroValueSuffix: config.EnumZeroValueSuffix,
+ RPCAllowSameRequestResponse: config.RPCAllowSameRequestResponse,
+ RPCAllowGoogleProtobufEmptyRequests: config.RPCAllowGoogleProtobufEmptyRequests,
+ RPCAllowGoogleProtobufEmptyResponses: config.RPCAllowGoogleProtobufEmptyResponses,
+ ServiceSuffix: config.ServiceSuffix,
+ }.NewConfig(
+ versionSpec,
+ )
+}
+
+func rulesForInternalRules(rules []*internal.Rule) []bufcheck.Rule {
+ if rules == nil {
+ return nil
+ }
+ s := make([]bufcheck.Rule, len(rules))
+ for i, e := range rules {
+ s[i] = e
+ }
+ return s
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig/buflintconfig.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig/buflintconfig.go
new file mode 100644
index 000000000..a89594996
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig/buflintconfig.go
@@ -0,0 +1,360 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflintconfig
+
+import (
+ "bytes"
+ "encoding/json"
+ "io"
+ "sort"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ lintv1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/lint/v1"
+)
+
+const (
+ // These versions match the versions in bufconfig. We cannot take an explicit dependency
+ // on bufconfig without creating a circular dependency.
+ v1Beta1Version = "v1beta1"
+ v1Version = "v1"
+)
+
+// Config is the lint check config.
+type Config struct {
+ // Use is a list of rule and/or category IDs that are included in the lint check.
+ Use []string
+ // Except is a list of the rule and/or category IDs that are excluded from the lint check.
+ Except []string
+ // IgnoreRootPaths is a list of paths of directories and/or files that should be ignored by the lint check.
+ // All paths are relative to the root of the module.
+ IgnoreRootPaths []string
+ // IgnoreIDOrCategoryToRootPaths is a map of rule and/or category IDs to directory and/or file paths to exclude from the
+ // lint check.
+ IgnoreIDOrCategoryToRootPaths map[string][]string
+ // EnumZeroValueSuffix controls the behavior of the ENUM_ZERO_VALUE lint rule ID. By default, this rule
+ // verifies that the zero value of all enums ends in _UNSPECIFIED. This config allows the user to override
+ // this value with the given string.
+ EnumZeroValueSuffix string
+ // RPCAllowSameRequestResponse allows the same message type for both the request and response of an RPC.
+ RPCAllowSameRequestResponse bool
+ // RPCAllowGoogleProtobufEmptyRequests allows the RPC requests to use the google.protobuf.Empty message.
+ RPCAllowGoogleProtobufEmptyRequests bool
+ // RPCAllowGoogleProtobufEmptyResponse allows the RPC responses to use the google.protobuf.Empty message.
+ RPCAllowGoogleProtobufEmptyResponses bool
+ // ServiceSuffix applies to the SERVICE_SUFFIX rule ID. By default, the rule verifies that all service names
+ // end with the suffix Service. This allows users to override the value with the given string.
+ ServiceSuffix string
+ // AllowCommentIgnores turns on comment-driven ignores.
+ AllowCommentIgnores bool
+ // Version represents the version of the lint rule and category IDs that should be used with this config.
+ Version string
+}
+
+// NewConfigV1Beta1 returns a new Config.
+func NewConfigV1Beta1(externalConfig ExternalConfigV1Beta1) *Config {
+ return &Config{
+ Use: externalConfig.Use,
+ Except: externalConfig.Except,
+ IgnoreRootPaths: externalConfig.Ignore,
+ IgnoreIDOrCategoryToRootPaths: externalConfig.IgnoreOnly,
+ EnumZeroValueSuffix: externalConfig.EnumZeroValueSuffix,
+ RPCAllowSameRequestResponse: externalConfig.RPCAllowSameRequestResponse,
+ RPCAllowGoogleProtobufEmptyRequests: externalConfig.RPCAllowGoogleProtobufEmptyRequests,
+ RPCAllowGoogleProtobufEmptyResponses: externalConfig.RPCAllowGoogleProtobufEmptyResponses,
+ ServiceSuffix: externalConfig.ServiceSuffix,
+ AllowCommentIgnores: externalConfig.AllowCommentIgnores,
+ Version: v1Beta1Version,
+ }
+}
+
+// NewConfigV1 returns a new Config.
+func NewConfigV1(externalConfig ExternalConfigV1) *Config {
+ return &Config{
+ Use: externalConfig.Use,
+ Except: externalConfig.Except,
+ IgnoreRootPaths: externalConfig.Ignore,
+ IgnoreIDOrCategoryToRootPaths: externalConfig.IgnoreOnly,
+ EnumZeroValueSuffix: externalConfig.EnumZeroValueSuffix,
+ RPCAllowSameRequestResponse: externalConfig.RPCAllowSameRequestResponse,
+ RPCAllowGoogleProtobufEmptyRequests: externalConfig.RPCAllowGoogleProtobufEmptyRequests,
+ RPCAllowGoogleProtobufEmptyResponses: externalConfig.RPCAllowGoogleProtobufEmptyResponses,
+ ServiceSuffix: externalConfig.ServiceSuffix,
+ AllowCommentIgnores: externalConfig.AllowCommentIgnores,
+ Version: v1Version,
+ }
+}
+
+// ConfigForProto returns the Config given the proto.
+func ConfigForProto(protoConfig *lintv1.Config) *Config {
+ return &Config{
+ Use: protoConfig.GetUseIds(),
+ Except: protoConfig.GetExceptIds(),
+ IgnoreRootPaths: protoConfig.GetIgnorePaths(),
+ IgnoreIDOrCategoryToRootPaths: ignoreIDOrCategoryToRootPathsForProto(protoConfig.GetIgnoreIdPaths()),
+ EnumZeroValueSuffix: protoConfig.GetEnumZeroValueSuffix(),
+ RPCAllowSameRequestResponse: protoConfig.GetRpcAllowSameRequestResponse(),
+ RPCAllowGoogleProtobufEmptyRequests: protoConfig.GetRpcAllowGoogleProtobufEmptyRequests(),
+ RPCAllowGoogleProtobufEmptyResponses: protoConfig.GetRpcAllowGoogleProtobufEmptyResponses(),
+ ServiceSuffix: protoConfig.GetServiceSuffix(),
+ AllowCommentIgnores: protoConfig.GetAllowCommentIgnores(),
+ Version: protoConfig.GetVersion(),
+ }
+}
+
+// ProtoForConfig takes a *Config and returns the proto representation.
+func ProtoForConfig(config *Config) *lintv1.Config {
+ return &lintv1.Config{
+ UseIds: config.Use,
+ ExceptIds: config.Except,
+ IgnorePaths: config.IgnoreRootPaths,
+ IgnoreIdPaths: protoForIgnoreIDOrCategoryToRootPaths(config.IgnoreIDOrCategoryToRootPaths),
+ EnumZeroValueSuffix: config.EnumZeroValueSuffix,
+ RpcAllowSameRequestResponse: config.RPCAllowSameRequestResponse,
+ RpcAllowGoogleProtobufEmptyRequests: config.RPCAllowGoogleProtobufEmptyRequests,
+ RpcAllowGoogleProtobufEmptyResponses: config.RPCAllowGoogleProtobufEmptyResponses,
+ ServiceSuffix: config.ServiceSuffix,
+ AllowCommentIgnores: config.AllowCommentIgnores,
+ Version: config.Version,
+ }
+}
+
+// ExternalConfigV1Beta1 is an external config.
+type ExternalConfigV1Beta1 struct {
+ Use []string `json:"use,omitempty" yaml:"use,omitempty"`
+ Except []string `json:"except,omitempty" yaml:"except,omitempty"`
+ // IgnoreRootPaths
+ Ignore []string `json:"ignore,omitempty" yaml:"ignore,omitempty"`
+ // IgnoreIDOrCategoryToRootPaths
+ IgnoreOnly map[string][]string `json:"ignore_only,omitempty" yaml:"ignore_only,omitempty"`
+ EnumZeroValueSuffix string `json:"enum_zero_value_suffix,omitempty" yaml:"enum_zero_value_suffix,omitempty"`
+ RPCAllowSameRequestResponse bool `json:"rpc_allow_same_request_response,omitempty" yaml:"rpc_allow_same_request_response,omitempty"`
+ RPCAllowGoogleProtobufEmptyRequests bool `json:"rpc_allow_google_protobuf_empty_requests,omitempty" yaml:"rpc_allow_google_protobuf_empty_requests,omitempty"`
+ RPCAllowGoogleProtobufEmptyResponses bool `json:"rpc_allow_google_protobuf_empty_responses,omitempty" yaml:"rpc_allow_google_protobuf_empty_responses,omitempty"`
+ ServiceSuffix string `json:"service_suffix,omitempty" yaml:"service_suffix,omitempty"`
+ AllowCommentIgnores bool `json:"allow_comment_ignores,omitempty" yaml:"allow_comment_ignores,omitempty"`
+}
+
+// ExternalConfigV1 is an external config.
+type ExternalConfigV1 struct {
+ Use []string `json:"use,omitempty" yaml:"use,omitempty"`
+ Except []string `json:"except,omitempty" yaml:"except,omitempty"`
+ // IgnoreRootPaths
+ Ignore []string `json:"ignore,omitempty" yaml:"ignore,omitempty"`
+ // IgnoreIDOrCategoryToRootPaths
+ IgnoreOnly map[string][]string `json:"ignore_only,omitempty" yaml:"ignore_only,omitempty"`
+ EnumZeroValueSuffix string `json:"enum_zero_value_suffix,omitempty" yaml:"enum_zero_value_suffix,omitempty"`
+ RPCAllowSameRequestResponse bool `json:"rpc_allow_same_request_response,omitempty" yaml:"rpc_allow_same_request_response,omitempty"`
+ RPCAllowGoogleProtobufEmptyRequests bool `json:"rpc_allow_google_protobuf_empty_requests,omitempty" yaml:"rpc_allow_google_protobuf_empty_requests,omitempty"`
+ RPCAllowGoogleProtobufEmptyResponses bool `json:"rpc_allow_google_protobuf_empty_responses,omitempty" yaml:"rpc_allow_google_protobuf_empty_responses,omitempty"`
+ ServiceSuffix string `json:"service_suffix,omitempty" yaml:"service_suffix,omitempty"`
+ AllowCommentIgnores bool `json:"allow_comment_ignores,omitempty" yaml:"allow_comment_ignores,omitempty"`
+}
+
+// ExternalConfigV1Beta1ForConfig takes a *Config and returns the v1beta1 externalconfig representation.
+func ExternalConfigV1Beta1ForConfig(config *Config) ExternalConfigV1Beta1 {
+ return ExternalConfigV1Beta1{
+ Use: config.Use,
+ Except: config.Except,
+ Ignore: config.IgnoreRootPaths,
+ IgnoreOnly: config.IgnoreIDOrCategoryToRootPaths,
+ EnumZeroValueSuffix: config.EnumZeroValueSuffix,
+ RPCAllowSameRequestResponse: config.RPCAllowSameRequestResponse,
+ RPCAllowGoogleProtobufEmptyRequests: config.RPCAllowGoogleProtobufEmptyRequests,
+ RPCAllowGoogleProtobufEmptyResponses: config.RPCAllowGoogleProtobufEmptyResponses,
+ ServiceSuffix: config.ServiceSuffix,
+ AllowCommentIgnores: config.AllowCommentIgnores,
+ }
+}
+
+// ExternalConfigV1ForConfig takes a *Config and returns the v1 externalconfig representation.
+func ExternalConfigV1ForConfig(config *Config) ExternalConfigV1 {
+ return ExternalConfigV1{
+ Use: config.Use,
+ Except: config.Except,
+ Ignore: config.IgnoreRootPaths,
+ IgnoreOnly: config.IgnoreIDOrCategoryToRootPaths,
+ EnumZeroValueSuffix: config.EnumZeroValueSuffix,
+ RPCAllowSameRequestResponse: config.RPCAllowSameRequestResponse,
+ RPCAllowGoogleProtobufEmptyRequests: config.RPCAllowGoogleProtobufEmptyRequests,
+ RPCAllowGoogleProtobufEmptyResponses: config.RPCAllowGoogleProtobufEmptyResponses,
+ ServiceSuffix: config.ServiceSuffix,
+ AllowCommentIgnores: config.AllowCommentIgnores,
+ }
+}
+
+// BytesForConfig takes a *Config and returns the deterministic []byte representation.
+// We use an unexported intermediary JSON form and sort all fields to ensure that the bytes
+// associated with the *Config are deterministic.
+func BytesForConfig(config *Config) ([]byte, error) {
+ if config == nil {
+ return nil, nil
+ }
+ return json.Marshal(configToJSON(config))
+}
+
+type configJSON struct {
+ Use []string `json:"use,omitempty"`
+ Except []string `json:"except,omitempty"`
+ IgnoreRootPaths []string `json:"ignore_root_paths,omitempty"`
+ IgnoreIDOrCategoryToRootPaths []idPathsJSON `json:"ignore_id_to_root_paths,omitempty"`
+ EnumZeroValueSuffix string `json:"enum_zero_value_suffix,omitempty"`
+ RPCAllowSameRequestResponse bool `json:"rpc_allow_same_request_response,omitempty"`
+ RPCAllowGoogleProtobufEmptyRequests bool `json:"rpc_allow_google_protobuf_empty_requests,omitempty"`
+ RPCAllowGoogleProtobufEmptyResponses bool `json:"rpc_allow_google_protobuf_empty_response,omitempty"`
+ ServiceSuffix string `json:"service_suffix,omitempty"`
+ AllowCommentIgnores bool `json:"allow_comment_ignores,omitempty"`
+ Version string `json:"version,omitempty"`
+}
+
+type idPathsJSON struct {
+ ID string `json:"id,omitempty"`
+ Paths []string `json:"paths,omitempty"`
+}
+
+func configToJSON(config *Config) *configJSON {
+ ignoreIDPathsJSON := make([]idPathsJSON, 0, len(config.IgnoreIDOrCategoryToRootPaths))
+ for ignoreID, rootPaths := range config.IgnoreIDOrCategoryToRootPaths {
+ rootPathsCopy := make([]string, len(rootPaths))
+ copy(rootPathsCopy, rootPaths)
+ sort.Strings(rootPathsCopy)
+ ignoreIDPathsJSON = append(ignoreIDPathsJSON, idPathsJSON{
+ ID: ignoreID,
+ Paths: rootPathsCopy,
+ })
+ }
+ sort.Slice(ignoreIDPathsJSON, func(i, j int) bool { return ignoreIDPathsJSON[i].ID < ignoreIDPathsJSON[j].ID })
+ // We should not be sorting in place for the config structure, since it will mutate the
+ // underlying config ordering.
+ use := make([]string, len(config.Use))
+ copy(use, config.Use)
+ except := make([]string, len(config.Except))
+ copy(except, config.Except)
+ ignoreRootPaths := make([]string, len(config.IgnoreRootPaths))
+ copy(ignoreRootPaths, config.IgnoreRootPaths)
+ sort.Strings(use)
+ sort.Strings(except)
+ sort.Strings(ignoreRootPaths)
+ return &configJSON{
+ Use: use,
+ Except: except,
+ IgnoreRootPaths: ignoreRootPaths,
+ IgnoreIDOrCategoryToRootPaths: ignoreIDPathsJSON,
+ EnumZeroValueSuffix: config.EnumZeroValueSuffix,
+ RPCAllowSameRequestResponse: config.RPCAllowSameRequestResponse,
+ RPCAllowGoogleProtobufEmptyRequests: config.RPCAllowGoogleProtobufEmptyRequests,
+ RPCAllowGoogleProtobufEmptyResponses: config.RPCAllowGoogleProtobufEmptyResponses,
+ ServiceSuffix: config.ServiceSuffix,
+ AllowCommentIgnores: config.AllowCommentIgnores,
+ Version: config.Version,
+ }
+}
+
+// PrintFileAnnotations prints the FileAnnotations to the Writer.
+//
+// Also accepts config-ignore-yaml.
+func PrintFileAnnotations(
+ writer io.Writer,
+ fileAnnotations []bufanalysis.FileAnnotation,
+ formatString string,
+) error {
+ switch s := strings.ToLower(strings.TrimSpace(formatString)); s {
+ case "config-ignore-yaml":
+ return printFileAnnotationsConfigIgnoreYAML(writer, fileAnnotations)
+ default:
+ return bufanalysis.PrintFileAnnotations(writer, fileAnnotations, s)
+ }
+}
+
+func printFileAnnotationsConfigIgnoreYAML(
+ writer io.Writer,
+ fileAnnotations []bufanalysis.FileAnnotation,
+) error {
+ if len(fileAnnotations) == 0 {
+ return nil
+ }
+ ignoreIDToRootPathMap := make(map[string]map[string]struct{})
+ for _, fileAnnotation := range fileAnnotations {
+ fileInfo := fileAnnotation.FileInfo()
+ if fileInfo == nil || fileAnnotation.Type() == "" {
+ continue
+ }
+ rootPathMap, ok := ignoreIDToRootPathMap[fileAnnotation.Type()]
+ if !ok {
+ rootPathMap = make(map[string]struct{})
+ ignoreIDToRootPathMap[fileAnnotation.Type()] = rootPathMap
+ }
+ rootPathMap[fileInfo.Path()] = struct{}{}
+ }
+ if len(ignoreIDToRootPathMap) == 0 {
+ return nil
+ }
+
+ sortedIgnoreIDs := make([]string, 0, len(ignoreIDToRootPathMap))
+ ignoreIDToSortedRootPaths := make(map[string][]string, len(ignoreIDToRootPathMap))
+ for id, rootPathMap := range ignoreIDToRootPathMap {
+ sortedIgnoreIDs = append(sortedIgnoreIDs, id)
+ rootPaths := make([]string, 0, len(rootPathMap))
+ for rootPath := range rootPathMap {
+ rootPaths = append(rootPaths, rootPath)
+ }
+ sort.Strings(rootPaths)
+ ignoreIDToSortedRootPaths[id] = rootPaths
+ }
+ sort.Strings(sortedIgnoreIDs)
+
+ buffer := bytes.NewBuffer(nil)
+ _, _ = buffer.WriteString(`version: v1
+lint:
+ ignore_only:
+`)
+ for _, id := range sortedIgnoreIDs {
+ _, _ = buffer.WriteString(" ")
+ _, _ = buffer.WriteString(id)
+ _, _ = buffer.WriteString(":\n")
+ for _, rootPath := range ignoreIDToSortedRootPaths[id] {
+ _, _ = buffer.WriteString(" - ")
+ _, _ = buffer.WriteString(rootPath)
+ _, _ = buffer.WriteString("\n")
+ }
+ }
+ _, err := writer.Write(buffer.Bytes())
+ return err
+}
+
+func ignoreIDOrCategoryToRootPathsForProto(protoIgnoreIDPaths []*lintv1.IDPaths) map[string][]string {
+ if protoIgnoreIDPaths == nil {
+ return nil
+ }
+ ignoreIDOrCategoryToRootPaths := make(map[string][]string)
+ for _, protoIgnoreIDPath := range protoIgnoreIDPaths {
+ ignoreIDOrCategoryToRootPaths[protoIgnoreIDPath.GetId()] = protoIgnoreIDPath.GetPaths()
+ }
+ return ignoreIDOrCategoryToRootPaths
+}
+
+func protoForIgnoreIDOrCategoryToRootPaths(ignoreIDOrCategoryToRootPaths map[string][]string) []*lintv1.IDPaths {
+ if ignoreIDOrCategoryToRootPaths == nil {
+ return nil
+ }
+ idPathsProto := make([]*lintv1.IDPaths, 0, len(ignoreIDOrCategoryToRootPaths))
+ for id, paths := range ignoreIDOrCategoryToRootPaths {
+ idPathsProto = append(idPathsProto, &lintv1.IDPaths{
+ Id: id,
+ Paths: paths,
+ })
+ }
+ return idPathsProto
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig/usage.gen.go
new file mode 100644
index 000000000..686dd71c5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package buflintconfig
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/handler.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/handler.go
new file mode 100644
index 000000000..4d9a7394f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/handler.go
@@ -0,0 +1,63 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflint
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+ "go.uber.org/zap"
+)
+
+type handler struct {
+ logger *zap.Logger
+ runner *internal.Runner
+}
+
+func newHandler(logger *zap.Logger) *handler {
+ return &handler{
+ logger: logger,
+ // linting allows for comment ignores
+ // note that comment ignores still need to be enabled within the config
+ // for a given check, this just says that comment ignores are allowed
+ // in the first place
+ runner: internal.NewRunner(
+ logger,
+ internal.RunnerWithIgnorePrefix(buflintcheck.CommentIgnorePrefix),
+ ),
+ }
+}
+
+func (h *handler) Check(
+ ctx context.Context,
+ config *buflintconfig.Config,
+ image bufimage.Image,
+) ([]bufanalysis.FileAnnotation, error) {
+ files, err := protosource.NewFilesUnstable(ctx, bufimageutil.NewInputFiles(image.Files())...)
+ if err != nil {
+ return nil, err
+ }
+ internalConfig, err := internalConfigForConfig(config)
+ if err != nil {
+ return nil, err
+ }
+ return h.runner.Check(ctx, internalConfig, nil, files)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintbuild/buflintbuild.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintbuild/buflintbuild.go
new file mode 100644
index 000000000..14528de86
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintbuild/buflintbuild.go
@@ -0,0 +1,359 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflintbuild contains the RuleBuilders used by buflintv*.
+package buflintbuild
+
+import (
+ "errors"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+)
+
+var (
+ // CommentEnumRuleBuilder is a rule builder.
+ CommentEnumRuleBuilder = internal.NewNopRuleBuilder(
+ "COMMENT_ENUM",
+ "enums have non-empty comments",
+ newAdapter(buflintcheck.CheckCommentEnum),
+ )
+ // CommentEnumValueRuleBuilder is a rule builder.
+ CommentEnumValueRuleBuilder = internal.NewNopRuleBuilder(
+ "COMMENT_ENUM_VALUE",
+ "enum values have non-empty comments",
+ newAdapter(buflintcheck.CheckCommentEnumValue),
+ )
+ // CommentFieldRuleBuilder is a rule builder.
+ CommentFieldRuleBuilder = internal.NewNopRuleBuilder(
+ "COMMENT_FIELD",
+ "fields have non-empty comments",
+ newAdapter(buflintcheck.CheckCommentField),
+ )
+ // CommentMessageRuleBuilder is a rule builder.
+ CommentMessageRuleBuilder = internal.NewNopRuleBuilder(
+ "COMMENT_MESSAGE",
+ "messages have non-empty comments",
+ newAdapter(buflintcheck.CheckCommentMessage),
+ )
+ // CommentOneofRuleBuilder is a rule builder.
+ CommentOneofRuleBuilder = internal.NewNopRuleBuilder(
+ "COMMENT_ONEOF",
+ "oneof have non-empty comments",
+ newAdapter(buflintcheck.CheckCommentOneof),
+ )
+ // CommentRPCRuleBuilder is a rule builder.
+ CommentRPCRuleBuilder = internal.NewNopRuleBuilder(
+ "COMMENT_RPC",
+ "RPCs have non-empty comments",
+ newAdapter(buflintcheck.CheckCommentRPC),
+ )
+ // CommentServiceRuleBuilder is a rule builder.
+ CommentServiceRuleBuilder = internal.NewNopRuleBuilder(
+ "COMMENT_SERVICE",
+ "services have non-empty comments",
+ newAdapter(buflintcheck.CheckCommentService),
+ )
+ // DirectorySamePackageRuleBuilder is a rule builder.
+ DirectorySamePackageRuleBuilder = internal.NewNopRuleBuilder(
+ "DIRECTORY_SAME_PACKAGE",
+ "all files in a given directory are in the same package",
+ newAdapter(buflintcheck.CheckDirectorySamePackage),
+ )
+ // EnumFirstValueZeroRuleBuilder is a rule builder.
+ EnumFirstValueZeroRuleBuilder = internal.NewNopRuleBuilder(
+ "ENUM_FIRST_VALUE_ZERO",
+ "all first values of enums have a numeric value of 0",
+ newAdapter(buflintcheck.CheckEnumFirstValueZero),
+ )
+ // EnumNoAllowAliasRuleBuilder is a rule builder.
+ EnumNoAllowAliasRuleBuilder = internal.NewNopRuleBuilder(
+ "ENUM_NO_ALLOW_ALIAS",
+ "enums do not have the allow_alias option set",
+ newAdapter(buflintcheck.CheckEnumNoAllowAlias),
+ )
+ // EnumPascalCaseRuleBuilder is a rule builder.
+ EnumPascalCaseRuleBuilder = internal.NewNopRuleBuilder(
+ "ENUM_PASCAL_CASE",
+ "enums are PascalCase",
+ newAdapter(buflintcheck.CheckEnumPascalCase),
+ )
+ // EnumValuePrefixRuleBuilder is a rule builder.
+ EnumValuePrefixRuleBuilder = internal.NewNopRuleBuilder(
+ "ENUM_VALUE_PREFIX",
+ "enum values are prefixed with ENUM_NAME_UPPER_SNAKE_CASE",
+ newAdapter(buflintcheck.CheckEnumValuePrefix),
+ )
+ // EnumValueUpperSnakeCaseRuleBuilder is a rule builder.
+ EnumValueUpperSnakeCaseRuleBuilder = internal.NewNopRuleBuilder(
+ "ENUM_VALUE_UPPER_SNAKE_CASE",
+ "enum values are UPPER_SNAKE_CASE",
+ newAdapter(buflintcheck.CheckEnumValueUpperSnakeCase),
+ )
+ // EnumZeroValueSuffixRuleBuilder is a rule builder.
+ EnumZeroValueSuffixRuleBuilder = internal.NewRuleBuilder(
+ "ENUM_ZERO_VALUE_SUFFIX",
+ func(configBuilder internal.ConfigBuilder) (string, error) {
+ if configBuilder.EnumZeroValueSuffix == "" {
+ return "", errors.New("enum_zero_value_suffix is empty")
+ }
+ return "enum zero values are suffixed with " + configBuilder.EnumZeroValueSuffix + " (suffix is configurable)", nil
+ },
+ func(configBuilder internal.ConfigBuilder) (internal.CheckFunc, error) {
+ if configBuilder.EnumZeroValueSuffix == "" {
+ return nil, errors.New("enum_zero_value_suffix is empty")
+ }
+ return internal.CheckFunc(func(id string, ignoreFunc internal.IgnoreFunc, _ []protosource.File, files []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return buflintcheck.CheckEnumZeroValueSuffix(id, ignoreFunc, files, configBuilder.EnumZeroValueSuffix)
+ }), nil
+ },
+ )
+ // FieldLowerSnakeCaseRuleBuilder is a rule builder.
+ FieldLowerSnakeCaseRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_LOWER_SNAKE_CASE",
+ "field names are lower_snake_case",
+ newAdapter(buflintcheck.CheckFieldLowerSnakeCase),
+ )
+ // FieldNoDescriptorRuleBuilder is a rule builder.
+ FieldNoDescriptorRuleBuilder = internal.NewNopRuleBuilder(
+ "FIELD_NO_DESCRIPTOR",
+ `field names are not name capitalization of "descriptor" with any number of prefix or suffix underscores`,
+ newAdapter(buflintcheck.CheckFieldNoDescriptor),
+ )
+ // FileLowerSnakeCaseRuleBuilder is a rule builder.
+ FileLowerSnakeCaseRuleBuilder = internal.NewNopRuleBuilder(
+ "FILE_LOWER_SNAKE_CASE",
+ "filenames are lower_snake_case",
+ newAdapter(buflintcheck.CheckFileLowerSnakeCase),
+ )
+ // ImportNoPublicRuleBuilder is a rule builder.
+ ImportNoPublicRuleBuilder = internal.NewNopRuleBuilder(
+ "IMPORT_NO_PUBLIC",
+ "imports are not public",
+ newAdapter(buflintcheck.CheckImportNoPublic),
+ )
+ // ImportNoWeakRuleBuilder is a rule builder.
+ ImportNoWeakRuleBuilder = internal.NewNopRuleBuilder(
+ "IMPORT_NO_WEAK",
+ "imports are not weak",
+ newAdapter(buflintcheck.CheckImportNoWeak),
+ )
+ // ImportUsedRuleBuilder is a rule builder.
+ ImportUsedRuleBuilder = internal.NewNopRuleBuilder(
+ "IMPORT_USED",
+ "imports are used",
+ newAdapter(buflintcheck.CheckImportUsed),
+ )
+ // MessagePascalCaseRuleBuilder is a rule builder.
+ MessagePascalCaseRuleBuilder = internal.NewNopRuleBuilder(
+ "MESSAGE_PASCAL_CASE",
+ "messages are PascalCase",
+ newAdapter(buflintcheck.CheckMessagePascalCase),
+ )
+ // OneofLowerSnakeCaseRuleBuilder is a rule builder.
+ OneofLowerSnakeCaseRuleBuilder = internal.NewNopRuleBuilder(
+ "ONEOF_LOWER_SNAKE_CASE",
+ "oneof names are lower_snake_case",
+ newAdapter(buflintcheck.CheckOneofLowerSnakeCase),
+ )
+ // PackageDefinedRuleBuilder is a rule builder.
+ PackageDefinedRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_DEFINED",
+ "all files have a package defined",
+ newAdapter(buflintcheck.CheckPackageDefined),
+ )
+ // PackageDirectoryMatchRuleBuilder is a rule builder.
+ PackageDirectoryMatchRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_DIRECTORY_MATCH",
+ "all files are in a directory that matches their package name",
+ newAdapter(buflintcheck.CheckPackageDirectoryMatch),
+ )
+ // PackageLowerSnakeCaseRuleBuilder is a rule builder.
+ PackageLowerSnakeCaseRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_LOWER_SNAKE_CASE",
+ "packages are lower_snake.case",
+ newAdapter(buflintcheck.CheckPackageLowerSnakeCase),
+ )
+ // PackageNoImportCycleRuleBuilder is a rule builder.
+ PackageNoImportCycleRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_NO_IMPORT_CYCLE",
+ "packages do not have import cycles",
+ newAdapter(buflintcheck.CheckPackageNoImportCycle),
+ )
+ // PackageSameCsharpNamespaceRuleBuilder is a rule builder.
+ PackageSameCsharpNamespaceRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_SAME_CSHARP_NAMESPACE",
+ "all files with a given package have the same value for the csharp_namespace option",
+ newAdapter(buflintcheck.CheckPackageSameCsharpNamespace),
+ )
+ // PackageSameDirectoryRuleBuilder is a rule builder.
+ PackageSameDirectoryRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_SAME_DIRECTORY",
+ "all files with a given package are in the same directory",
+ newAdapter(buflintcheck.CheckPackageSameDirectory),
+ )
+ // PackageSameGoPackageRuleBuilder is a rule builder.
+ PackageSameGoPackageRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_SAME_GO_PACKAGE",
+ "all files with a given package have the same value for the go_package option",
+ newAdapter(buflintcheck.CheckPackageSameGoPackage),
+ )
+ // PackageSameJavaMultipleFilesRuleBuilder is a rule builder.
+ PackageSameJavaMultipleFilesRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_SAME_JAVA_MULTIPLE_FILES",
+ "all files with a given package have the same value for the java_multiple_files option",
+ newAdapter(buflintcheck.CheckPackageSameJavaMultipleFiles),
+ )
+ // PackageSameJavaPackageRuleBuilder is a rule builder.
+ PackageSameJavaPackageRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_SAME_JAVA_PACKAGE",
+ "all files with a given package have the same value for the java_package option",
+ newAdapter(buflintcheck.CheckPackageSameJavaPackage),
+ )
+ // PackageSamePhpNamespaceRuleBuilder is a rule builder.
+ PackageSamePhpNamespaceRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_SAME_PHP_NAMESPACE",
+ "all files with a given package have the same value for the php_namespace option",
+ newAdapter(buflintcheck.CheckPackageSamePhpNamespace),
+ )
+ // PackageSameRubyPackageRuleBuilder is a rule builder.
+ PackageSameRubyPackageRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_SAME_RUBY_PACKAGE",
+ "all files with a given package have the same value for the ruby_package option",
+ newAdapter(buflintcheck.CheckPackageSameRubyPackage),
+ )
+ // PackageSameSwiftPrefixRuleBuilder is a rule builder.
+ PackageSameSwiftPrefixRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_SAME_SWIFT_PREFIX",
+ "all files with a given package have the same value for the swift_prefix option",
+ newAdapter(buflintcheck.CheckPackageSameSwiftPrefix),
+ )
+ // PackageVersionSuffixRuleBuilder is a rule builder.
+ PackageVersionSuffixRuleBuilder = internal.NewNopRuleBuilder(
+ "PACKAGE_VERSION_SUFFIX",
+ `the last component of all packages is a version of the form v\d+, v\d+test.*, v\d+(alpha|beta)\d+, or v\d+p\d+(alpha|beta)\d+, where numbers are >=1`,
+ newAdapter(buflintcheck.CheckPackageVersionSuffix),
+ )
+ // RPCNoClientStreamingRuleBuilder is a rule builder.
+ RPCNoClientStreamingRuleBuilder = internal.NewNopRuleBuilder(
+ "RPC_NO_CLIENT_STREAMING",
+ "RPCs are not client streaming",
+ newAdapter(buflintcheck.CheckRPCNoClientStreaming),
+ )
+ // RPCNoServerStreamingRuleBuilder is a rule builder.
+ RPCNoServerStreamingRuleBuilder = internal.NewNopRuleBuilder(
+ "RPC_NO_SERVER_STREAMING",
+ "RPCs are not server streaming",
+ newAdapter(buflintcheck.CheckRPCNoServerStreaming),
+ )
+ // RPCPascalCaseRuleBuilder is a rule builder.
+ RPCPascalCaseRuleBuilder = internal.NewNopRuleBuilder(
+ "RPC_PASCAL_CASE",
+ "RPCs are PascalCase",
+ newAdapter(buflintcheck.CheckRPCPascalCase),
+ )
+ // RPCRequestResponseUniqueRuleBuilder is a rule builder.
+ RPCRequestResponseUniqueRuleBuilder = internal.NewRuleBuilder(
+ "RPC_REQUEST_RESPONSE_UNIQUE",
+ func(configBuilder internal.ConfigBuilder) (string, error) {
+ return "RPC request and response types are only used in one RPC (configurable)", nil
+ },
+ func(configBuilder internal.ConfigBuilder) (internal.CheckFunc, error) {
+ return internal.CheckFunc(func(id string, ignoreFunc internal.IgnoreFunc, _ []protosource.File, files []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return buflintcheck.CheckRPCRequestResponseUnique(
+ id,
+ ignoreFunc,
+ files,
+ configBuilder.RPCAllowSameRequestResponse,
+ configBuilder.RPCAllowGoogleProtobufEmptyRequests,
+ configBuilder.RPCAllowGoogleProtobufEmptyResponses,
+ )
+ }), nil
+ },
+ )
+ // RPCRequestStandardNameRuleBuilder is a rule builder.
+ RPCRequestStandardNameRuleBuilder = internal.NewRuleBuilder(
+ "RPC_REQUEST_STANDARD_NAME",
+ func(configBuilder internal.ConfigBuilder) (string, error) {
+ return "RPC request type names are RPCNameRequest or ServiceNameRPCNameRequest (configurable)", nil
+ },
+ func(configBuilder internal.ConfigBuilder) (internal.CheckFunc, error) {
+ return internal.CheckFunc(func(id string, ignoreFunc internal.IgnoreFunc, _ []protosource.File, files []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return buflintcheck.CheckRPCRequestStandardName(
+ id,
+ ignoreFunc,
+ files,
+ configBuilder.RPCAllowGoogleProtobufEmptyRequests,
+ )
+ }), nil
+ },
+ )
+ // RPCResponseStandardNameRuleBuilder is a rule builder.
+ RPCResponseStandardNameRuleBuilder = internal.NewRuleBuilder(
+ "RPC_RESPONSE_STANDARD_NAME",
+ func(configBuilder internal.ConfigBuilder) (string, error) {
+ return "RPC response type names are RPCNameResponse or ServiceNameRPCNameResponse (configurable)", nil
+ },
+ func(configBuilder internal.ConfigBuilder) (internal.CheckFunc, error) {
+ return internal.CheckFunc(func(id string, ignoreFunc internal.IgnoreFunc, _ []protosource.File, files []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return buflintcheck.CheckRPCResponseStandardName(
+ id,
+ ignoreFunc,
+ files,
+ configBuilder.RPCAllowGoogleProtobufEmptyResponses,
+ )
+ }), nil
+ },
+ )
+ // ServicePascalCaseRuleBuilder is a rule builder.
+ ServicePascalCaseRuleBuilder = internal.NewNopRuleBuilder(
+ "SERVICE_PASCAL_CASE",
+ "services are PascalCase",
+ newAdapter(buflintcheck.CheckServicePascalCase),
+ )
+ // ServiceSuffixRuleBuilder is a rule builder.
+ ServiceSuffixRuleBuilder = internal.NewRuleBuilder(
+ "SERVICE_SUFFIX",
+ func(configBuilder internal.ConfigBuilder) (string, error) {
+ if configBuilder.ServiceSuffix == "" {
+ return "", errors.New("service_suffix is empty")
+ }
+ return "services are suffixed with " + configBuilder.ServiceSuffix + " (suffix is configurable)", nil
+ },
+ func(configBuilder internal.ConfigBuilder) (internal.CheckFunc, error) {
+ if configBuilder.ServiceSuffix == "" {
+ return nil, errors.New("service_suffix is empty")
+ }
+ return internal.CheckFunc(func(id string, ignoreFunc internal.IgnoreFunc, _ []protosource.File, files []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return buflintcheck.CheckServiceSuffix(id, ignoreFunc, files, configBuilder.ServiceSuffix)
+ }), nil
+ },
+ )
+ // SyntaxSpecifiedRuleBuilder is a rule builder.
+ SyntaxSpecifiedRuleBuilder = internal.NewNopRuleBuilder(
+ "SYNTAX_SPECIFIED",
+ "all files have a syntax specified",
+ newAdapter(buflintcheck.CheckSyntaxSpecified),
+ )
+)
+
+func newAdapter(
+ f func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error),
+) func(string, internal.IgnoreFunc, []protosource.File, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return func(id string, ignoreFunc internal.IgnoreFunc, _ []protosource.File, files []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return f(id, ignoreFunc, files)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintbuild/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintbuild/usage.gen.go
new file mode 100644
index 000000000..8d1b4e354
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintbuild/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package buflintbuild
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck/buflintcheck.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck/buflintcheck.go
new file mode 100644
index 000000000..e4b563f9d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck/buflintcheck.go
@@ -0,0 +1,965 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflintcheck impelements the check functions.
+//
+// These are used by buflintbuild to create RuleBuilders.
+package buflintcheck
+
+import (
+ "errors"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+ "github.com/bufbuild/buf/private/pkg/protoversion"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+)
+
+const (
+ // CommentIgnorePrefix is the comment ignore prefix.
+ //
+ // Comments with this prefix do not count towards valid comments in the comment checkers.
+ // This is also used in buflint when constructing a new Runner, and is passed to the
+ // RunnerWithIgnorePrefix option.
+ CommentIgnorePrefix = "buf:lint:ignore"
+)
+
+var (
+ // CheckCommentEnum is a check function.
+ CheckCommentEnum = newEnumCheckFunc(checkCommentEnum)
+ // CheckCommentEnumValue is a check function.
+ CheckCommentEnumValue = newEnumValueCheckFunc(checkCommentEnumValue)
+ // CheckCommentField is a check function.
+ CheckCommentField = newFieldCheckFunc(checkCommentField)
+ // CheckCommentMessage is a check function.
+ CheckCommentMessage = newMessageCheckFunc(checkCommentMessage)
+ // CheckCommentOneof is a check function.
+ CheckCommentOneof = newOneofCheckFunc(checkCommentOneof)
+ // CheckCommentService is a check function.
+ CheckCommentService = newServiceCheckFunc(checkCommentService)
+ // CheckCommentRPC is a check function.
+ CheckCommentRPC = newMethodCheckFunc(checkCommentRPC)
+)
+
+func checkCommentEnum(add addFunc, value protosource.Enum) error {
+ return checkCommentNamedDescriptor(add, value, "Enum")
+}
+
+func checkCommentEnumValue(add addFunc, value protosource.EnumValue) error {
+ return checkCommentNamedDescriptor(add, value, "Enum value")
+}
+
+func checkCommentField(add addFunc, value protosource.Field) error {
+ return checkCommentNamedDescriptor(add, value, "Field")
+}
+
+func checkCommentMessage(add addFunc, value protosource.Message) error {
+ return checkCommentNamedDescriptor(add, value, "Message")
+}
+
+func checkCommentOneof(add addFunc, value protosource.Oneof) error {
+ return checkCommentNamedDescriptor(add, value, "Oneof")
+}
+
+func checkCommentRPC(add addFunc, value protosource.Method) error {
+ return checkCommentNamedDescriptor(add, value, "RPC")
+}
+
+func checkCommentService(add addFunc, value protosource.Service) error {
+ return checkCommentNamedDescriptor(add, value, "Service")
+}
+
+func checkCommentNamedDescriptor(
+ add addFunc,
+ namedDescriptor protosource.NamedDescriptor,
+ typeName string,
+) error {
+ location := namedDescriptor.Location()
+ if location == nil {
+ // this will magically skip map entry fields as well as a side-effect, although originally unintended
+ return nil
+ }
+ if !validLeadingComment(location.LeadingComments()) {
+ add(namedDescriptor, location, nil, "%s %q should have a non-empty comment for documentation.", typeName, namedDescriptor.Name())
+ }
+ return nil
+}
+
+// CheckDirectorySamePackage is a check function.
+var CheckDirectorySamePackage = newDirToFilesCheckFunc(checkDirectorySamePackage)
+
+func checkDirectorySamePackage(add addFunc, dirPath string, files []protosource.File) error {
+ pkgMap := make(map[string]struct{})
+ for _, file := range files {
+ // works for no package set as this will result in "" which is a valid map key
+ pkgMap[file.Package()] = struct{}{}
+ }
+ if len(pkgMap) > 1 {
+ var messagePrefix string
+ if _, ok := pkgMap[""]; ok {
+ delete(pkgMap, "")
+ if len(pkgMap) > 1 {
+ messagePrefix = fmt.Sprintf("Multiple packages %q and file with no package", strings.Join(stringutil.MapToSortedSlice(pkgMap), ","))
+ } else {
+ // Join works with only one element as well by adding no comma
+ messagePrefix = fmt.Sprintf("Package %q and file with no package", strings.Join(stringutil.MapToSortedSlice(pkgMap), ","))
+ }
+ } else {
+ messagePrefix = fmt.Sprintf("Multiple packages %q", strings.Join(stringutil.MapToSortedSlice(pkgMap), ","))
+ }
+ for _, file := range files {
+ add(file, file.PackageLocation(), nil, "%s detected within directory %q.", messagePrefix, dirPath)
+ }
+ }
+ return nil
+}
+
+// CheckEnumNoAllowAlias is a check function.
+var CheckEnumNoAllowAlias = newEnumCheckFunc(checkEnumNoAllowAlias)
+
+func checkEnumNoAllowAlias(add addFunc, enum protosource.Enum) error {
+ if enum.AllowAlias() {
+ add(enum, enum.AllowAliasLocation(), nil, `Enum option "allow_alias" on enum %q must be false.`, enum.Name())
+ }
+ return nil
+}
+
+// CheckEnumPascalCase is a check function.
+var CheckEnumPascalCase = newEnumCheckFunc(checkEnumPascalCase)
+
+func checkEnumPascalCase(add addFunc, enum protosource.Enum) error {
+ name := enum.Name()
+ expectedName := stringutil.ToPascalCase(name)
+ if name != expectedName {
+ add(enum, enum.NameLocation(), nil, "Enum name %q should be PascalCase, such as %q.", name, expectedName)
+ }
+ return nil
+}
+
+// CheckEnumFirstValueZero is a check function.
+var CheckEnumFirstValueZero = newEnumCheckFunc(checkEnumFirstValueZero)
+
+func checkEnumFirstValueZero(add addFunc, enum protosource.Enum) error {
+ if values := enum.Values(); len(values) > 0 {
+ if firstEnumValue := values[0]; firstEnumValue.Number() != 0 {
+ // proto3 compilation references the number
+ add(
+ firstEnumValue,
+ firstEnumValue.NumberLocation(),
+ // also check the name location for this comment ignore, as the number location might not have the comment
+ // see https://github.com/bufbuild/buf/issues/1186
+ // also check the enum for this comment ignore
+ // this allows users to set this "globally" for an enum
+ // see https://github.com/bufbuild/buf/issues/161
+ []protosource.Location{
+ firstEnumValue.NameLocation(),
+ firstEnumValue.Enum().Location(),
+ },
+ "First enum value %q should have a numeric value of 0",
+ firstEnumValue.Name(),
+ )
+ }
+ }
+ return nil
+}
+
+// CheckEnumValuePrefix is a check function.
+var CheckEnumValuePrefix = newEnumValueCheckFunc(checkEnumValuePrefix)
+
+func checkEnumValuePrefix(add addFunc, enumValue protosource.EnumValue) error {
+ name := enumValue.Name()
+ expectedPrefix := fieldToUpperSnakeCase(enumValue.Enum().Name()) + "_"
+ if !strings.HasPrefix(name, expectedPrefix) {
+ add(
+ enumValue,
+ enumValue.NameLocation(),
+ // also check the enum for this comment ignore
+ // this allows users to set this "globally" for an enum
+ // this came up in https://github.com/bufbuild/buf/issues/161
+ []protosource.Location{
+ enumValue.Enum().Location(),
+ },
+ "Enum value name %q should be prefixed with %q.",
+ name,
+ expectedPrefix,
+ )
+ }
+ return nil
+}
+
+// CheckEnumValueUpperSnakeCase is a check function.
+var CheckEnumValueUpperSnakeCase = newEnumValueCheckFunc(checkEnumValueUpperSnakeCase)
+
+func checkEnumValueUpperSnakeCase(add addFunc, enumValue protosource.EnumValue) error {
+ name := enumValue.Name()
+ expectedName := fieldToUpperSnakeCase(name)
+ if name != expectedName {
+ add(
+ enumValue,
+ enumValue.NameLocation(),
+ // also check the enum for this comment ignore
+ // this allows users to set this "globally" for an enum
+ []protosource.Location{
+ enumValue.Enum().Location(),
+ },
+ "Enum value name %q should be UPPER_SNAKE_CASE, such as %q.",
+ name,
+ expectedName,
+ )
+ }
+ return nil
+}
+
+// CheckEnumZeroValueSuffix is a check function.
+var CheckEnumZeroValueSuffix = func(
+ id string,
+ ignoreFunc internal.IgnoreFunc,
+ files []protosource.File,
+ suffix string,
+) ([]bufanalysis.FileAnnotation, error) {
+ return newEnumValueCheckFunc(
+ func(add addFunc, enumValue protosource.EnumValue) error {
+ return checkEnumZeroValueSuffix(add, enumValue, suffix)
+ },
+ )(id, ignoreFunc, files)
+}
+
+func checkEnumZeroValueSuffix(add addFunc, enumValue protosource.EnumValue, suffix string) error {
+ if enumValue.Number() != 0 {
+ return nil
+ }
+ name := enumValue.Name()
+ if !strings.HasSuffix(name, suffix) {
+ add(
+ enumValue,
+ enumValue.NameLocation(),
+ // also check the enum for this comment ignore
+ // this allows users to set this "globally" for an enum
+ []protosource.Location{
+ enumValue.Enum().Location(),
+ },
+ "Enum zero value name %q should be suffixed with %q.",
+ name,
+ suffix,
+ )
+ }
+ return nil
+}
+
+// CheckFieldLowerSnakeCase is a check function.
+var CheckFieldLowerSnakeCase = newFieldCheckFunc(checkFieldLowerSnakeCase)
+
+func checkFieldLowerSnakeCase(add addFunc, field protosource.Field) error {
+ message := field.Message()
+ if message == nil {
+ // just a sanity check
+ return errors.New("field.Message() was nil")
+ }
+ if message.IsMapEntry() {
+ // this check should always pass anyways but just in case
+ return nil
+ }
+ name := field.Name()
+ expectedName := fieldToLowerSnakeCase(name)
+ if name != expectedName {
+ add(
+ field,
+ field.NameLocation(),
+ // also check the message for this comment ignore
+ // this allows users to set this "globally" for a message
+ []protosource.Location{
+ field.Message().Location(),
+ },
+ "Field name %q should be lower_snake_case, such as %q.",
+ name,
+ expectedName,
+ )
+ }
+ return nil
+}
+
+// CheckFieldNoDescriptor is a check function.
+var CheckFieldNoDescriptor = newFieldCheckFunc(checkFieldNoDescriptor)
+
+func checkFieldNoDescriptor(add addFunc, field protosource.Field) error {
+ name := field.Name()
+ if strings.ToLower(strings.Trim(name, "_")) == "descriptor" {
+ add(
+ field,
+ field.NameLocation(),
+ // also check the message for this comment ignore
+ // this allows users to set this "globally" for a message
+ []protosource.Location{
+ field.Message().Location(),
+ },
+ `Field name %q cannot be any capitalization of "descriptor" with any number of prefix or suffix underscores.`,
+ name,
+ )
+ }
+ return nil
+}
+
+// CheckFileLowerSnakeCase is a check function.
+var CheckFileLowerSnakeCase = newFileCheckFunc(checkFileLowerSnakeCase)
+
+func checkFileLowerSnakeCase(add addFunc, file protosource.File) error {
+ filename := file.Path()
+ base := normalpath.Base(filename)
+ ext := normalpath.Ext(filename)
+ baseWithoutExt := strings.TrimSuffix(base, ext)
+ expectedBaseWithoutExt := stringutil.ToLowerSnakeCase(baseWithoutExt)
+ if baseWithoutExt != expectedBaseWithoutExt {
+ add(file, nil, nil, `Filename %q should be lower_snake_case%s, such as "%s%s".`, base, ext, expectedBaseWithoutExt, ext)
+ }
+ return nil
+}
+
+var (
+ // CheckImportNoPublic is a check function.
+ CheckImportNoPublic = newFileImportCheckFunc(checkImportNoPublic)
+ // CheckImportNoWeak is a check function.
+ CheckImportNoWeak = newFileImportCheckFunc(checkImportNoWeak)
+ // CheckImportUsed is a check function.
+ CheckImportUsed = newFileImportCheckFunc(checkImportUsed)
+)
+
+func checkImportNoPublic(add addFunc, fileImport protosource.FileImport) error {
+ return checkImportNoPublicWeak(add, fileImport, fileImport.IsPublic(), "public")
+}
+
+func checkImportNoWeak(add addFunc, fileImport protosource.FileImport) error {
+ return checkImportNoPublicWeak(add, fileImport, fileImport.IsWeak(), "weak")
+}
+
+func checkImportNoPublicWeak(add addFunc, fileImport protosource.FileImport, value bool, name string) error {
+ if value {
+ add(fileImport, fileImport.Location(), nil, `Import %q must not be %s.`, fileImport.Import(), name)
+ }
+ return nil
+}
+
+func checkImportUsed(add addFunc, fileImport protosource.FileImport) error {
+ if fileImport.IsUnused() {
+ add(fileImport, fileImport.Location(), nil, `Import %q is unused.`, fileImport.Import())
+ }
+ return nil
+}
+
+// CheckMessagePascalCase is a check function.
+var CheckMessagePascalCase = newMessageCheckFunc(checkMessagePascalCase)
+
+func checkMessagePascalCase(add addFunc, message protosource.Message) error {
+ if message.IsMapEntry() {
+ // map entries should always be pascal case but we don't want to check them anyways
+ return nil
+ }
+ name := message.Name()
+ expectedName := stringutil.ToPascalCase(name)
+ if name != expectedName {
+ add(message, message.NameLocation(), nil, "Message name %q should be PascalCase, such as %q.", name, expectedName)
+ }
+ return nil
+}
+
+// CheckOneofLowerSnakeCase is a check function.
+var CheckOneofLowerSnakeCase = newOneofCheckFunc(checkOneofLowerSnakeCase)
+
+func checkOneofLowerSnakeCase(add addFunc, oneof protosource.Oneof) error {
+ name := oneof.Name()
+ expectedName := fieldToLowerSnakeCase(name)
+ if name != expectedName {
+ // if this is an implicit oneof for a proto3 optional field, do not error
+ // https://github.com/protocolbuffers/protobuf/blob/master/docs/implementing_proto3_presence.md
+ if fields := oneof.Fields(); len(fields) == 1 {
+ if fields[0].Proto3Optional() {
+ return nil
+ }
+ }
+ add(
+ oneof,
+ oneof.NameLocation(),
+ // also check the message for this comment ignore
+ // this allows users to set this "globally" for a message
+ []protosource.Location{
+ oneof.Message().Location(),
+ },
+ "Oneof name %q should be lower_snake_case, such as %q.",
+ name,
+ expectedName,
+ )
+ }
+ return nil
+}
+
+// CheckPackageDefined is a check function.
+var CheckPackageDefined = newFileCheckFunc(checkPackageDefined)
+
+func checkPackageDefined(add addFunc, file protosource.File) error {
+ if file.Package() == "" {
+ add(file, nil, nil, "Files must have a package defined.")
+ }
+ return nil
+}
+
+// CheckPackageDirectoryMatch is a check function.
+var CheckPackageDirectoryMatch = newFileCheckFunc(checkPackageDirectoryMatch)
+
+func checkPackageDirectoryMatch(add addFunc, file protosource.File) error {
+ pkg := file.Package()
+ if pkg == "" {
+ return nil
+ }
+ expectedDirPath := strings.ReplaceAll(pkg, ".", "/")
+ dirPath := normalpath.Dir(file.Path())
+ // need to check case where in root relative directory and no package defined
+ // this should be valid although if SENSIBLE is turned on this will be invalid
+ if dirPath != expectedDirPath {
+ add(file, file.PackageLocation(), nil, `Files with package %q must be within a directory "%s" relative to root but were in directory "%s".`, pkg, normalpath.Unnormalize(expectedDirPath), normalpath.Unnormalize(dirPath))
+ }
+ return nil
+}
+
+// CheckPackageLowerSnakeCase is a check function.
+var CheckPackageLowerSnakeCase = newFileCheckFunc(checkPackageLowerSnakeCase)
+
+func checkPackageLowerSnakeCase(add addFunc, file protosource.File) error {
+ pkg := file.Package()
+ if pkg == "" {
+ return nil
+ }
+ split := strings.Split(pkg, ".")
+ for i, elem := range split {
+ split[i] = stringutil.ToLowerSnakeCase(elem)
+ }
+ expectedPkg := strings.Join(split, ".")
+ if pkg != expectedPkg {
+ add(file, file.PackageLocation(), nil, "Package name %q should be lower_snake.case, such as %q.", pkg, expectedPkg)
+ }
+ return nil
+}
+
+// CheckPackageNoImportCycle is a check function.
+var CheckPackageNoImportCycle = newFilesCheckFunc(checkPackageNoImportCycle)
+
+func checkPackageNoImportCycle(add addFunc, files []protosource.File) error {
+ packageToDirectlyImportedPackageToFileImports, err := protosource.PackageToDirectlyImportedPackageToFileImports(files...)
+ if err != nil {
+ return err
+ }
+ // This is way more algorithmically complex than it needs to be.
+ //
+ // We're doing a DFS starting at each package. What we should do is start from any package,
+ // do the DFS and keep track of the packages hit, and then don't ever do DFS from a given
+ // package twice. The problem is is that with the current janky package -> direct -> file imports
+ // setup, we would then end up with error messages like "import cycle: a -> b -> c -> b", and
+ // attach the error message to a file with package a, and we want to just print "b -> c -> b".
+ // So to get this to market, we just do a DFS from each package.
+ //
+ // This may prove to be too expensive but early testing say it is not so far.
+ for pkg := range packageToDirectlyImportedPackageToFileImports {
+ // Can equal "" per the function signature of PackageToDirectlyImportedPackageToFileImports
+ if pkg == "" {
+ continue
+ }
+ // Go one deep in the potential import cycle so that we can get the file imports
+ // we want to potentially attach errors to.
+ //
+ // We know that pkg is never equal to directlyImportedPackage due to the signature
+ // of PackageToDirectlyImportedPackageToFileImports.
+ for directlyImportedPackage, fileImports := range packageToDirectlyImportedPackageToFileImports[pkg] {
+ // Can equal "" per the function signature of PackageToDirectlyImportedPackageToFileImports
+ if directlyImportedPackage == "" {
+ continue
+ }
+ if importCycle := getImportCycleIfExists(
+ directlyImportedPackage,
+ packageToDirectlyImportedPackageToFileImports,
+ map[string]struct{}{
+ pkg: {},
+ },
+ []string{
+ pkg,
+ },
+ ); len(importCycle) > 0 {
+ for _, fileImport := range fileImports {
+ add(fileImport, fileImport.Location(), nil, `Package import cycle: %s`, strings.Join(importCycle, ` -> `))
+ }
+ }
+ }
+ }
+ return nil
+}
+
+// CheckPackageSameDirectory is a check function.
+var CheckPackageSameDirectory = newPackageToFilesCheckFunc(checkPackageSameDirectory)
+
+func checkPackageSameDirectory(add addFunc, pkg string, files []protosource.File) error {
+ dirMap := make(map[string]struct{})
+ for _, file := range files {
+ dirMap[normalpath.Dir(file.Path())] = struct{}{}
+ }
+ if len(dirMap) > 1 {
+ dirs := stringutil.MapToSortedSlice(dirMap)
+ for _, file := range files {
+ add(file, file.PackageLocation(), nil, "Multiple directories %q contain files with package %q.", strings.Join(dirs, ","), pkg)
+ }
+ }
+ return nil
+}
+
+var (
+ // CheckPackageSameCsharpNamespace is a check function.
+ CheckPackageSameCsharpNamespace = newPackageToFilesCheckFunc(checkPackageSameCsharpNamespace)
+ // CheckPackageSameGoPackage is a check function.
+ CheckPackageSameGoPackage = newPackageToFilesCheckFunc(checkPackageSameGoPackage)
+ // CheckPackageSameJavaMultipleFiles is a check function.
+ CheckPackageSameJavaMultipleFiles = newPackageToFilesCheckFunc(checkPackageSameJavaMultipleFiles)
+ // CheckPackageSameJavaPackage is a check function.
+ CheckPackageSameJavaPackage = newPackageToFilesCheckFunc(checkPackageSameJavaPackage)
+ // CheckPackageSamePhpNamespace is a check function.
+ CheckPackageSamePhpNamespace = newPackageToFilesCheckFunc(checkPackageSamePhpNamespace)
+ // CheckPackageSameRubyPackage is a check function.
+ CheckPackageSameRubyPackage = newPackageToFilesCheckFunc(checkPackageSameRubyPackage)
+ // CheckPackageSameSwiftPrefix is a check function.
+ CheckPackageSameSwiftPrefix = newPackageToFilesCheckFunc(checkPackageSameSwiftPrefix)
+)
+
+func checkPackageSameCsharpNamespace(add addFunc, pkg string, files []protosource.File) error {
+ return checkPackageSameOptionValue(add, pkg, files, protosource.File.CsharpNamespace, protosource.File.CsharpNamespaceLocation, "csharp_namespace")
+}
+
+func checkPackageSameGoPackage(add addFunc, pkg string, files []protosource.File) error {
+ return checkPackageSameOptionValue(add, pkg, files, protosource.File.GoPackage, protosource.File.GoPackageLocation, "go_package")
+}
+
+func checkPackageSameJavaMultipleFiles(add addFunc, pkg string, files []protosource.File) error {
+ return checkPackageSameOptionValue(
+ add,
+ pkg,
+ files,
+ func(file protosource.File) string {
+ return strconv.FormatBool(file.JavaMultipleFiles())
+ },
+ protosource.File.JavaMultipleFilesLocation,
+ "java_multiple_files",
+ )
+}
+
+func checkPackageSameJavaPackage(add addFunc, pkg string, files []protosource.File) error {
+ return checkPackageSameOptionValue(add, pkg, files, protosource.File.JavaPackage, protosource.File.JavaPackageLocation, "java_package")
+}
+
+func checkPackageSamePhpNamespace(add addFunc, pkg string, files []protosource.File) error {
+ return checkPackageSameOptionValue(add, pkg, files, protosource.File.PhpNamespace, protosource.File.PhpNamespaceLocation, "php_namespace")
+}
+
+func checkPackageSameRubyPackage(add addFunc, pkg string, files []protosource.File) error {
+ return checkPackageSameOptionValue(add, pkg, files, protosource.File.RubyPackage, protosource.File.RubyPackageLocation, "ruby_package")
+}
+
+func checkPackageSameSwiftPrefix(add addFunc, pkg string, files []protosource.File) error {
+ return checkPackageSameOptionValue(add, pkg, files, protosource.File.SwiftPrefix, protosource.File.SwiftPrefixLocation, "swift_prefix")
+}
+
+func checkPackageSameOptionValue(
+ add addFunc,
+ pkg string,
+ files []protosource.File,
+ getOptionValue func(protosource.File) string,
+ getOptionLocation func(protosource.File) protosource.Location,
+ name string,
+) error {
+ optionValueMap := make(map[string]struct{})
+ for _, file := range files {
+ optionValueMap[getOptionValue(file)] = struct{}{}
+ }
+ if len(optionValueMap) > 1 {
+ _, noOptionValue := optionValueMap[""]
+ delete(optionValueMap, "")
+ optionValues := stringutil.MapToSortedSlice(optionValueMap)
+ for _, file := range files {
+ if noOptionValue {
+ add(file, getOptionLocation(file), nil, "Files in package %q have both values %q and no value for option %q and all values must be equal.", pkg, strings.Join(optionValues, ","), name)
+ } else {
+ add(file, getOptionLocation(file), nil, "Files in package %q have multiple values %q for option %q and all values must be equal.", pkg, strings.Join(optionValues, ","), name)
+ }
+ }
+ }
+ return nil
+}
+
+// CheckPackageVersionSuffix is a check function.
+var CheckPackageVersionSuffix = newFileCheckFunc(checkPackageVersionSuffix)
+
+func checkPackageVersionSuffix(add addFunc, file protosource.File) error {
+ pkg := file.Package()
+ if pkg == "" {
+ return nil
+ }
+ if _, ok := protoversion.NewPackageVersionForPackage(pkg); !ok {
+ add(file, file.PackageLocation(), nil, `Package name %q should be suffixed with a correctly formed version, such as %q.`, pkg, pkg+".v1")
+ }
+ return nil
+}
+
+// CheckRPCNoClientStreaming is a check function.
+var CheckRPCNoClientStreaming = newMethodCheckFunc(checkRPCNoClientStreaming)
+
+func checkRPCNoClientStreaming(add addFunc, method protosource.Method) error {
+ if method.ClientStreaming() {
+ add(
+ method,
+ method.Location(),
+ // also check the service for this comment ignore
+ // this allows users to set this "globally" for a service
+ []protosource.Location{
+ method.Service().Location(),
+ },
+ "RPC %q is client streaming.",
+ method.Name(),
+ )
+ }
+ return nil
+}
+
+// CheckRPCNoServerStreaming is a check function.
+var CheckRPCNoServerStreaming = newMethodCheckFunc(checkRPCNoServerStreaming)
+
+func checkRPCNoServerStreaming(add addFunc, method protosource.Method) error {
+ if method.ServerStreaming() {
+ add(
+ method,
+ method.Location(),
+ // also check the service for this comment ignore
+ // this allows users to set this "globally" for a service
+ []protosource.Location{
+ method.Service().Location(),
+ },
+ "RPC %q is server streaming.",
+ method.Name(),
+ )
+ }
+ return nil
+}
+
+// CheckRPCPascalCase is a check function.
+var CheckRPCPascalCase = newMethodCheckFunc(checkRPCPascalCase)
+
+func checkRPCPascalCase(add addFunc, method protosource.Method) error {
+ name := method.Name()
+ expectedName := stringutil.ToPascalCase(name)
+ if name != expectedName {
+ add(
+ method,
+ method.NameLocation(),
+ // also check the service for this comment ignore
+ // this allows users to set this "globally" for a service
+ []protosource.Location{
+ method.Service().Location(),
+ },
+ "RPC name %q should be PascalCase, such as %q.",
+ name,
+ expectedName,
+ )
+ }
+ return nil
+}
+
+// CheckRPCRequestResponseUnique is a check function.
+var CheckRPCRequestResponseUnique = func(
+ id string,
+ ignoreFunc internal.IgnoreFunc,
+ files []protosource.File,
+ allowSameRequestResponse bool,
+ allowGoogleProtobufEmptyRequests bool,
+ allowGoogleProtobufEmptyResponses bool,
+) ([]bufanalysis.FileAnnotation, error) {
+ return newFilesCheckFunc(
+ func(add addFunc, files []protosource.File) error {
+ return checkRPCRequestResponseUnique(
+ add,
+ files,
+ allowSameRequestResponse,
+ allowGoogleProtobufEmptyRequests,
+ allowGoogleProtobufEmptyResponses,
+ )
+ },
+ )(id, ignoreFunc, files)
+}
+
+func checkRPCRequestResponseUnique(
+ add addFunc,
+ files []protosource.File,
+ allowSameRequestResponse bool,
+ allowGoogleProtobufEmptyRequests bool,
+ allowGoogleProtobufEmptyResponses bool,
+) error {
+ allFullNameToMethod, err := protosource.FullNameToMethod(files...)
+ if err != nil {
+ return err
+ }
+ // first check if any requests or responses are the same
+ // if not, we can treat requests and responses equally for checking if more than
+ // one method uses a type
+ if !allowSameRequestResponse {
+ for _, method := range allFullNameToMethod {
+ if method.InputTypeName() == method.OutputTypeName() {
+ // if we allow both empty requests and responses, we do not want to add a FileAnnotation
+ if !(method.InputTypeName() == "google.protobuf.Empty" && allowGoogleProtobufEmptyRequests && allowGoogleProtobufEmptyResponses) {
+ add(
+ method,
+ method.Location(),
+ // also check the service for this comment ignore
+ // this allows users to set this "globally" for a service
+ []protosource.Location{
+ method.Service().Location(),
+ },
+ "RPC %q has the same type %q for the request and response.",
+ method.Name(),
+ method.InputTypeName(),
+ )
+ }
+ }
+ }
+ }
+ // we have now added errors for the same request and response type if applicable
+ // we can now check methods for unique usage of a given type
+ requestResponseTypeToFullNameToMethod := make(map[string]map[string]protosource.Method)
+ for fullName, method := range allFullNameToMethod {
+ for _, requestResponseType := range []string{method.InputTypeName(), method.OutputTypeName()} {
+ fullNameToMethod, ok := requestResponseTypeToFullNameToMethod[requestResponseType]
+ if !ok {
+ fullNameToMethod = make(map[string]protosource.Method)
+ requestResponseTypeToFullNameToMethod[requestResponseType] = fullNameToMethod
+ }
+ fullNameToMethod[fullName] = method
+ }
+ }
+ for requestResponseType, fullNameToMethod := range requestResponseTypeToFullNameToMethod {
+ // only this method uses this request or response type, no issue
+ if len(fullNameToMethod) == 1 {
+ continue
+ }
+ // if the request or response type is google.protobuf.Empty and we allow this for requests or responses,
+ // we have to do a harder check
+ if requestResponseType == "google.protobuf.Empty" && (allowGoogleProtobufEmptyRequests || allowGoogleProtobufEmptyResponses) {
+ // if both requests and responses can be google.protobuf.Empty, then do not add any error
+ // else, we check
+ if !(allowGoogleProtobufEmptyRequests && allowGoogleProtobufEmptyResponses) {
+ // inside this if statement, one of allowGoogleProtobufEmptyRequests or allowGoogleProtobufEmptyResponses is true
+ var requestMethods []protosource.Method
+ var responseMethods []protosource.Method
+ for _, method := range fullNameToMethod {
+ if method.InputTypeName() == "google.protobuf.Empty" {
+ requestMethods = append(requestMethods, method)
+ }
+ if method.OutputTypeName() == "google.protobuf.Empty" {
+ responseMethods = append(responseMethods, method)
+ }
+ }
+ if !allowGoogleProtobufEmptyRequests && len(requestMethods) > 1 {
+ for _, method := range requestMethods {
+ add(
+ method,
+ method.Location(),
+ // also check the service for this comment ignore
+ // this allows users to set this "globally" for a service
+ []protosource.Location{
+ method.Service().Location(),
+ },
+ "%q is used as the request for multiple RPCs.",
+ requestResponseType,
+ )
+ }
+ }
+ if !allowGoogleProtobufEmptyResponses && len(responseMethods) > 1 {
+ for _, method := range responseMethods {
+ add(
+ method,
+ method.Location(),
+ // also check the service for this comment ignore
+ // this allows users to set this "globally" for a service
+ []protosource.Location{
+ method.Service().Location(),
+ },
+ "%q is used as the response for multiple RPCs.",
+ requestResponseType,
+ )
+ }
+ }
+ }
+ } else {
+ // else, we have a duplicate usage of requestResponseType, add an FileAnnotation to each method
+ for _, method := range fullNameToMethod {
+ add(
+ method,
+ method.Location(),
+ // also check the service for this comment ignore
+ // this allows users to set this "globally" for a service
+ []protosource.Location{
+ method.Service().Location(),
+ },
+ "%q is used as the request or response type for multiple RPCs.",
+ requestResponseType,
+ )
+ }
+ }
+ }
+ return nil
+}
+
+// CheckRPCRequestStandardName is a check function.
+var CheckRPCRequestStandardName = func(
+ id string,
+ ignoreFunc internal.IgnoreFunc,
+ files []protosource.File,
+ allowGoogleProtobufEmptyRequests bool,
+) ([]bufanalysis.FileAnnotation, error) {
+ return newMethodCheckFunc(
+ func(add addFunc, method protosource.Method) error {
+ return checkRPCRequestStandardName(add, method, allowGoogleProtobufEmptyRequests)
+ },
+ )(id, ignoreFunc, files)
+}
+
+func checkRPCRequestStandardName(add addFunc, method protosource.Method, allowGoogleProtobufEmptyRequests bool) error {
+ service := method.Service()
+ if service == nil {
+ return errors.New("method.Service() is nil")
+ }
+ name := method.InputTypeName()
+ if allowGoogleProtobufEmptyRequests && name == "google.protobuf.Empty" {
+ return nil
+ }
+ if strings.Contains(name, ".") {
+ split := strings.Split(name, ".")
+ name = split[len(split)-1]
+ }
+ expectedName1 := stringutil.ToPascalCase(method.Name()) + "Request"
+ expectedName2 := stringutil.ToPascalCase(service.Name()) + expectedName1
+ if name != expectedName1 && name != expectedName2 {
+ add(
+ method,
+ method.InputTypeLocation(),
+ // also check the method and service for this comment ignore
+ // this came up in https://github.com/bufbuild/buf/issues/242
+ []protosource.Location{
+ method.Location(),
+ method.Service().Location(),
+ },
+ "RPC request type %q should be named %q or %q.",
+ name,
+ expectedName1,
+ expectedName2,
+ )
+ }
+ return nil
+}
+
+// CheckRPCResponseStandardName is a check function.
+var CheckRPCResponseStandardName = func(
+ id string,
+ ignoreFunc internal.IgnoreFunc,
+ files []protosource.File,
+ allowGoogleProtobufEmptyResponses bool,
+) ([]bufanalysis.FileAnnotation, error) {
+ return newMethodCheckFunc(
+ func(add addFunc, method protosource.Method) error {
+ return checkRPCResponseStandardName(add, method, allowGoogleProtobufEmptyResponses)
+ },
+ )(id, ignoreFunc, files)
+}
+
+func checkRPCResponseStandardName(add addFunc, method protosource.Method, allowGoogleProtobufEmptyResponses bool) error {
+ service := method.Service()
+ if service == nil {
+ return errors.New("method.Service() is nil")
+ }
+ name := method.OutputTypeName()
+ if allowGoogleProtobufEmptyResponses && name == "google.protobuf.Empty" {
+ return nil
+ }
+ if strings.Contains(name, ".") {
+ split := strings.Split(name, ".")
+ name = split[len(split)-1]
+ }
+ expectedName1 := stringutil.ToPascalCase(method.Name()) + "Response"
+ expectedName2 := stringutil.ToPascalCase(service.Name()) + expectedName1
+ if name != expectedName1 && name != expectedName2 {
+ add(
+ method,
+ method.OutputTypeLocation(),
+ // also check the method and service for this comment ignore
+ // this came up in https://github.com/bufbuild/buf/issues/242
+ []protosource.Location{
+ method.Location(),
+ method.Service().Location(),
+ },
+ "RPC response type %q should be named %q or %q.",
+ name,
+ expectedName1,
+ expectedName2,
+ )
+ }
+ return nil
+}
+
+// CheckServicePascalCase is a check function.
+var CheckServicePascalCase = newServiceCheckFunc(checkServicePascalCase)
+
+func checkServicePascalCase(add addFunc, service protosource.Service) error {
+ name := service.Name()
+ expectedName := stringutil.ToPascalCase(name)
+ if name != expectedName {
+ add(service, service.NameLocation(), nil, "Service name %q should be PascalCase, such as %q.", name, expectedName)
+ }
+ return nil
+}
+
+// CheckServiceSuffix is a check function.
+var CheckServiceSuffix = func(
+ id string,
+ ignoreFunc internal.IgnoreFunc,
+ files []protosource.File,
+ suffix string,
+) ([]bufanalysis.FileAnnotation, error) {
+ return newServiceCheckFunc(
+ func(add addFunc, service protosource.Service) error {
+ return checkServiceSuffix(add, service, suffix)
+ },
+ )(id, ignoreFunc, files)
+}
+
+func checkServiceSuffix(add addFunc, service protosource.Service, suffix string) error {
+ name := service.Name()
+ if !strings.HasSuffix(name, suffix) {
+ add(service, service.NameLocation(), nil, "Service name %q should be suffixed with %q.", name, suffix)
+ }
+ return nil
+}
+
+// CheckSyntaxSpecified is a check function.
+var CheckSyntaxSpecified = newFileCheckFunc(checkSyntaxSpecified)
+
+func checkSyntaxSpecified(add addFunc, file protosource.File) error {
+ if file.Syntax() == protosource.SyntaxUnspecified {
+ add(file, file.SyntaxLocation(), nil, `Files must have a syntax explicitly specified. If no syntax is specified, the file defaults to "proto2".`)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck/usage.gen.go
new file mode 100644
index 000000000..4a10195fb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package buflintcheck
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck/util.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck/util.go
new file mode 100644
index 000000000..5479dedd7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintcheck/util.go
@@ -0,0 +1,288 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflintcheck
+
+import (
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+)
+
+// addFunc adds a FileAnnotation.
+//
+// Both the Descriptor and Locations can be nil.
+type addFunc func(protosource.Descriptor, protosource.Location, []protosource.Location, string, ...interface{})
+
+func fieldToLowerSnakeCase(s string) string {
+ // Try running this on googleapis and watch
+ // We allow both effectively by not passing the option
+ //return stringutil.ToLowerSnakeCase(s, stringutil.SnakeCaseWithNewWordOnDigits())
+ return stringutil.ToLowerSnakeCase(s)
+}
+
+func fieldToUpperSnakeCase(s string) string {
+ // Try running this on googleapis and watch
+ // We allow both effectively by not passing the option
+ //return stringutil.ToUpperSnakeCase(s, stringutil.SnakeCaseWithNewWordOnDigits())
+ return stringutil.ToUpperSnakeCase(s)
+}
+
+// validLeadingComment returns true if comment has at least one line that isn't empty
+// and doesn't start with CommentIgnorePrefix.
+func validLeadingComment(comment string) bool {
+ for _, line := range strings.Split(comment, "\n") {
+ line = strings.TrimSpace(line)
+ if line != "" && !strings.HasPrefix(line, CommentIgnorePrefix) {
+ return true
+ }
+ }
+ return false
+}
+
+// Returns the usedPackageList if there is an import cycle.
+//
+// Note this stops on the first import cycle detected, it doesn't attempt to get all of them - not perfect.
+func getImportCycleIfExists(
+ // Should never be ""
+ pkg string,
+ packageToDirectlyImportedPackageToFileImports map[string]map[string][]protosource.FileImport,
+ usedPackageMap map[string]struct{},
+ usedPackageList []string,
+) []string {
+ // Append before checking so that the returned import cycle is actually a cycle
+ usedPackageList = append(usedPackageList, pkg)
+ if _, ok := usedPackageMap[pkg]; ok {
+ // We have an import cycle, but if the first package in the list does not
+ // equal the last, do not return as an import cycle unless the first
+ // element equals the last - we do DFS from each package so this will
+ // be picked up separately
+ if usedPackageList[0] == usedPackageList[len(usedPackageList)-1] {
+ return usedPackageList
+ }
+ return nil
+ }
+ usedPackageMap[pkg] = struct{}{}
+ // Will never equal pkg
+ for directlyImportedPackage := range packageToDirectlyImportedPackageToFileImports[pkg] {
+ // Can equal "" per the function signature of PackageToDirectlyImportedPackageToFileImports
+ if directlyImportedPackage == "" {
+ continue
+ }
+ if importCycle := getImportCycleIfExists(
+ directlyImportedPackage,
+ packageToDirectlyImportedPackageToFileImports,
+ usedPackageMap,
+ usedPackageList,
+ ); len(importCycle) != 0 {
+ return importCycle
+ }
+ }
+ delete(usedPackageMap, pkg)
+ return nil
+}
+
+func newFilesCheckFunc(
+ f func(addFunc, []protosource.File) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return func(id string, ignoreFunc internal.IgnoreFunc, files []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ helper := internal.NewHelper(id, ignoreFunc)
+ if err := f(helper.AddFileAnnotationWithExtraIgnoreLocationsf, files); err != nil {
+ return nil, err
+ }
+ return helper.FileAnnotations(), nil
+ }
+}
+
+func newPackageToFilesCheckFunc(
+ f func(add addFunc, pkg string, files []protosource.File) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFilesCheckFunc(
+ func(add addFunc, files []protosource.File) error {
+ packageToFiles, err := protosource.PackageToFiles(files...)
+ if err != nil {
+ return err
+ }
+ for pkg, files := range packageToFiles {
+ if err := f(add, pkg, files); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newDirToFilesCheckFunc(
+ f func(add addFunc, dirPath string, files []protosource.File) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFilesCheckFunc(
+ func(add addFunc, files []protosource.File) error {
+ dirPathToFiles, err := protosource.DirPathToFiles(files...)
+ if err != nil {
+ return err
+ }
+ for dirPath, files := range dirPathToFiles {
+ if err := f(add, dirPath, files); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newFileCheckFunc(
+ f func(addFunc, protosource.File) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFilesCheckFunc(
+ func(add addFunc, files []protosource.File) error {
+ for _, file := range files {
+ if err := f(add, file); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newFileImportCheckFunc(
+ f func(addFunc, protosource.FileImport) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFileCheckFunc(
+ func(add addFunc, file protosource.File) error {
+ for _, fileImport := range file.FileImports() {
+ if err := f(add, fileImport); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newEnumCheckFunc(
+ f func(addFunc, protosource.Enum) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFileCheckFunc(
+ func(add addFunc, file protosource.File) error {
+ return protosource.ForEachEnum(
+ func(enum protosource.Enum) error {
+ return f(add, enum)
+ },
+ file,
+ )
+ },
+ )
+}
+
+func newEnumValueCheckFunc(
+ f func(addFunc, protosource.EnumValue) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newEnumCheckFunc(
+ func(add addFunc, enum protosource.Enum) error {
+ for _, enumValue := range enum.Values() {
+ if err := f(add, enumValue); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newMessageCheckFunc(
+ f func(addFunc, protosource.Message) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFileCheckFunc(
+ func(add addFunc, file protosource.File) error {
+ return protosource.ForEachMessage(
+ func(message protosource.Message) error {
+ return f(add, message)
+ },
+ file,
+ )
+ },
+ )
+}
+
+func newFieldCheckFunc(
+ f func(addFunc, protosource.Field) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newMessageCheckFunc(
+ func(add addFunc, message protosource.Message) error {
+ for _, field := range message.Fields() {
+ if err := f(add, field); err != nil {
+ return err
+ }
+ }
+ // TODO: is this right?
+ for _, field := range message.Extensions() {
+ if err := f(add, field); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newOneofCheckFunc(
+ f func(addFunc, protosource.Oneof) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newMessageCheckFunc(
+ func(add addFunc, message protosource.Message) error {
+ for _, oneof := range message.Oneofs() {
+ if err := f(add, oneof); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newServiceCheckFunc(
+ f func(addFunc, protosource.Service) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newFileCheckFunc(
+ func(add addFunc, file protosource.File) error {
+ for _, service := range file.Services() {
+ if err := f(add, service); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func newMethodCheckFunc(
+ f func(addFunc, protosource.Method) error,
+) func(string, internal.IgnoreFunc, []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return newServiceCheckFunc(
+ func(add addFunc, service protosource.Service) error {
+ for _, method := range service.Methods() {
+ if err := f(add, method); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1/buflintv1.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1/buflintv1.go
new file mode 100644
index 000000000..7ac79e906
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1/buflintv1.go
@@ -0,0 +1,80 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflintv1 contains the VersionSpec for v1.
+//
+// It uses buflintcheck and buflintbuild.
+//
+// The only changes from v1beta1 to v1 were that ENUM_FIRST_VALUE_ZERO was moved
+// from OTHER to MINIMAL, and the OTHER category was deleted.
+package buflintv1
+
+import "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+
+// VersionSpec is the version specification for v1.
+//
+// The SYNTAX_SPECIFIED rule was added to BASIC, DEFAULT.
+// The IMPORT_USED rule was added to BASIC, DEFAULT.
+// ENUM_FIRST_VALUE_ZERO was added to BASIC, DEFAULT.
+// PACKAGE_NO_IMPORT_CYCLE was added as an uncategorized lint rule.
+// The FIELD_NO_DESCRIPTOR rule was removed altogether.
+//
+// A number of categories were removed between v1beta1 and v1. The difference
+// is shown below:
+//
+// Removed:
+// - FILE_LAYOUT
+// - PACKAGE_AFFINITY
+// - SENSIBLE
+// - STYLE_BASIC
+// - STYLE_DEFAULT
+// - OTHER
+//
+// Thus, the only remaining categories are:
+//
+// Categories:
+// - MINIMAL
+// - BASIC
+// - DEFAULT
+// - COMMENTS
+// - UNARY_RPC
+//
+// The rules included in the MINIMAL lint category have also been adjusted.
+// The difference is shown below:
+//
+// Removed:
+// - ENUM_NO_ALLOW_ALIAS
+// - FIELD_NO_DESCRIPTOR
+// - IMPORT_NO_PUBLIC
+// - IMPORT_NO_WEAK
+// - PACKAGE_SAME_CSHARP_NAMESPACE
+// - PACKAGE_SAME_GO_PACKAGE
+// - PACKAGE_SAME_JAVA_MULTIPLE_FILES
+// - PACKAGE_SAME_JAVA_PACKAGE
+// - PACKAGE_SAME_PHP_NAMESPACE
+// - PACKAGE_SAME_RUBY_PACKAGE
+// - PACKAGE_SAME_SWIFT_PREFIX
+//
+// With these changes applied, the final result of MINIMAL is:
+//
+// MINIMAL:
+// - DIRECTORY_SAME_PACKAGE
+// - PACKAGE_DEFINED
+// - PACKAGE_DIRECTORY_MATCH
+// - PACKAGE_SAME_DIRECTORY
+var VersionSpec = &internal.VersionSpec{
+ RuleBuilders: v1RuleBuilders,
+ DefaultCategories: v1DefaultCategories,
+ IDToCategories: v1IDToCategories,
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1/usage.gen.go
new file mode 100644
index 000000000..c49e57de6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package buflintv1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1/vars.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1/vars.go
new file mode 100644
index 000000000..b98b089ec
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1/vars.go
@@ -0,0 +1,233 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflintv1
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintbuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+)
+
+var (
+ // v1RuleBuilders are the rule builders.
+ v1RuleBuilders = []*internal.RuleBuilder{
+ buflintbuild.CommentEnumRuleBuilder,
+ buflintbuild.CommentEnumValueRuleBuilder,
+ buflintbuild.CommentFieldRuleBuilder,
+ buflintbuild.CommentMessageRuleBuilder,
+ buflintbuild.CommentOneofRuleBuilder,
+ buflintbuild.CommentRPCRuleBuilder,
+ buflintbuild.CommentServiceRuleBuilder,
+ buflintbuild.DirectorySamePackageRuleBuilder,
+ buflintbuild.EnumFirstValueZeroRuleBuilder,
+ buflintbuild.EnumNoAllowAliasRuleBuilder,
+ buflintbuild.EnumPascalCaseRuleBuilder,
+ buflintbuild.EnumValuePrefixRuleBuilder,
+ buflintbuild.EnumValueUpperSnakeCaseRuleBuilder,
+ buflintbuild.EnumZeroValueSuffixRuleBuilder,
+ buflintbuild.FieldLowerSnakeCaseRuleBuilder,
+ buflintbuild.FileLowerSnakeCaseRuleBuilder,
+ buflintbuild.ImportNoPublicRuleBuilder,
+ buflintbuild.ImportNoWeakRuleBuilder,
+ buflintbuild.ImportUsedRuleBuilder,
+ buflintbuild.MessagePascalCaseRuleBuilder,
+ buflintbuild.OneofLowerSnakeCaseRuleBuilder,
+ buflintbuild.PackageDefinedRuleBuilder,
+ buflintbuild.PackageDirectoryMatchRuleBuilder,
+ buflintbuild.PackageLowerSnakeCaseRuleBuilder,
+ buflintbuild.PackageNoImportCycleRuleBuilder,
+ buflintbuild.PackageSameCsharpNamespaceRuleBuilder,
+ buflintbuild.PackageSameDirectoryRuleBuilder,
+ buflintbuild.PackageSameGoPackageRuleBuilder,
+ buflintbuild.PackageSameJavaMultipleFilesRuleBuilder,
+ buflintbuild.PackageSameJavaPackageRuleBuilder,
+ buflintbuild.PackageSamePhpNamespaceRuleBuilder,
+ buflintbuild.PackageSameRubyPackageRuleBuilder,
+ buflintbuild.PackageSameSwiftPrefixRuleBuilder,
+ buflintbuild.PackageVersionSuffixRuleBuilder,
+ buflintbuild.RPCNoClientStreamingRuleBuilder,
+ buflintbuild.RPCNoServerStreamingRuleBuilder,
+ buflintbuild.RPCPascalCaseRuleBuilder,
+ buflintbuild.RPCRequestResponseUniqueRuleBuilder,
+ buflintbuild.RPCRequestStandardNameRuleBuilder,
+ buflintbuild.RPCResponseStandardNameRuleBuilder,
+ buflintbuild.ServicePascalCaseRuleBuilder,
+ buflintbuild.ServiceSuffixRuleBuilder,
+ buflintbuild.SyntaxSpecifiedRuleBuilder,
+ }
+
+ // v1DefaultCategories are the default categories.
+ v1DefaultCategories = []string{
+ "DEFAULT",
+ }
+ // v1IDToCategories associates IDs to categories.
+ v1IDToCategories = map[string][]string{
+ "COMMENT_ENUM": {
+ "COMMENTS",
+ },
+ "COMMENT_ENUM_VALUE": {
+ "COMMENTS",
+ },
+ "COMMENT_FIELD": {
+ "COMMENTS",
+ },
+ "COMMENT_MESSAGE": {
+ "COMMENTS",
+ },
+ "COMMENT_ONEOF": {
+ "COMMENTS",
+ },
+ "COMMENT_RPC": {
+ "COMMENTS",
+ },
+ "COMMENT_SERVICE": {
+ "COMMENTS",
+ },
+ "DIRECTORY_SAME_PACKAGE": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ },
+ "ENUM_FIRST_VALUE_ZERO": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "ENUM_NO_ALLOW_ALIAS": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "ENUM_PASCAL_CASE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "ENUM_VALUE_PREFIX": {
+ "DEFAULT",
+ },
+ "ENUM_VALUE_UPPER_SNAKE_CASE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "ENUM_ZERO_VALUE_SUFFIX": {
+ "DEFAULT",
+ },
+ "FIELD_LOWER_SNAKE_CASE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "FILE_LOWER_SNAKE_CASE": {
+ "DEFAULT",
+ },
+ "IMPORT_NO_PUBLIC": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "IMPORT_NO_WEAK": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "IMPORT_USED": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "MESSAGE_PASCAL_CASE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "ONEOF_LOWER_SNAKE_CASE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_DEFINED": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_DIRECTORY_MATCH": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_LOWER_SNAKE_CASE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_NO_IMPORT_CYCLE": {},
+ "PACKAGE_SAME_CSHARP_NAMESPACE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_SAME_DIRECTORY": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_SAME_GO_PACKAGE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_SAME_JAVA_MULTIPLE_FILES": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_SAME_JAVA_PACKAGE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_SAME_PHP_NAMESPACE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_SAME_RUBY_PACKAGE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_SAME_SWIFT_PREFIX": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "PACKAGE_VERSION_SUFFIX": {
+ "DEFAULT",
+ },
+ "RPC_NO_CLIENT_STREAMING": {
+ "UNARY_RPC",
+ },
+ "RPC_NO_SERVER_STREAMING": {
+ "UNARY_RPC",
+ },
+ "RPC_PASCAL_CASE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "RPC_REQUEST_RESPONSE_UNIQUE": {
+ "DEFAULT",
+ },
+ "RPC_REQUEST_STANDARD_NAME": {
+ "DEFAULT",
+ },
+ "RPC_RESPONSE_STANDARD_NAME": {
+ "DEFAULT",
+ },
+ "SERVICE_PASCAL_CASE": {
+ "BASIC",
+ "DEFAULT",
+ },
+ "SERVICE_SUFFIX": {
+ "DEFAULT",
+ },
+ "SYNTAX_SPECIFIED": {
+ "BASIC",
+ "DEFAULT",
+ },
+ }
+)
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1beta1/buflintv1beta1.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1beta1/buflintv1beta1.go
new file mode 100644
index 000000000..4cd3f4bde
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1beta1/buflintv1beta1.go
@@ -0,0 +1,27 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflintv1beta1 contains the VersionSpec for v1beta1.
+//
+// It uses buflintcheck and buflintbuild.
+package buflintv1beta1
+
+import "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+
+// VersionSpec is the version specification for v1beta1.
+var VersionSpec = &internal.VersionSpec{
+ RuleBuilders: v1beta1RuleBuilders,
+ DefaultCategories: v1beta1DefaultCategories,
+ IDToCategories: v1beta1IDToCategories,
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1beta1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1beta1/usage.gen.go
new file mode 100644
index 000000000..824130adc
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1beta1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package buflintv1beta1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1beta1/vars.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1beta1/vars.go
new file mode 100644
index 000000000..36f60f021
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintv1beta1/vars.go
@@ -0,0 +1,275 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflintv1beta1
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/internal/buflintbuild"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/internal"
+)
+
+var (
+ // v1beta1RuleBuilders are the rule builders.
+ v1beta1RuleBuilders = []*internal.RuleBuilder{
+ buflintbuild.CommentEnumRuleBuilder,
+ buflintbuild.CommentEnumValueRuleBuilder,
+ buflintbuild.CommentFieldRuleBuilder,
+ buflintbuild.CommentMessageRuleBuilder,
+ buflintbuild.CommentOneofRuleBuilder,
+ buflintbuild.CommentRPCRuleBuilder,
+ buflintbuild.CommentServiceRuleBuilder,
+ buflintbuild.DirectorySamePackageRuleBuilder,
+ buflintbuild.EnumFirstValueZeroRuleBuilder,
+ buflintbuild.EnumNoAllowAliasRuleBuilder,
+ buflintbuild.EnumPascalCaseRuleBuilder,
+ buflintbuild.EnumValuePrefixRuleBuilder,
+ buflintbuild.EnumValueUpperSnakeCaseRuleBuilder,
+ buflintbuild.EnumZeroValueSuffixRuleBuilder,
+ buflintbuild.FieldLowerSnakeCaseRuleBuilder,
+ buflintbuild.FieldNoDescriptorRuleBuilder,
+ buflintbuild.FileLowerSnakeCaseRuleBuilder,
+ buflintbuild.ImportNoPublicRuleBuilder,
+ buflintbuild.ImportNoWeakRuleBuilder,
+ buflintbuild.MessagePascalCaseRuleBuilder,
+ buflintbuild.OneofLowerSnakeCaseRuleBuilder,
+ buflintbuild.PackageDefinedRuleBuilder,
+ buflintbuild.PackageDirectoryMatchRuleBuilder,
+ buflintbuild.PackageLowerSnakeCaseRuleBuilder,
+ buflintbuild.PackageSameCsharpNamespaceRuleBuilder,
+ buflintbuild.PackageSameDirectoryRuleBuilder,
+ buflintbuild.PackageSameGoPackageRuleBuilder,
+ buflintbuild.PackageSameJavaMultipleFilesRuleBuilder,
+ buflintbuild.PackageSameJavaPackageRuleBuilder,
+ buflintbuild.PackageSamePhpNamespaceRuleBuilder,
+ buflintbuild.PackageSameRubyPackageRuleBuilder,
+ buflintbuild.PackageSameSwiftPrefixRuleBuilder,
+ buflintbuild.PackageVersionSuffixRuleBuilder,
+ buflintbuild.RPCNoClientStreamingRuleBuilder,
+ buflintbuild.RPCNoServerStreamingRuleBuilder,
+ buflintbuild.RPCPascalCaseRuleBuilder,
+ buflintbuild.RPCRequestResponseUniqueRuleBuilder,
+ buflintbuild.RPCRequestStandardNameRuleBuilder,
+ buflintbuild.RPCResponseStandardNameRuleBuilder,
+ buflintbuild.ServicePascalCaseRuleBuilder,
+ buflintbuild.ServiceSuffixRuleBuilder,
+ }
+
+ // v1beta1DefaultCategories are the default categories.
+ v1beta1DefaultCategories = []string{
+ "DEFAULT",
+ }
+ // v1beta1IDToCategories associates IDs to categories.
+ v1beta1IDToCategories = map[string][]string{
+ "COMMENT_ENUM": {
+ "COMMENTS",
+ },
+ "COMMENT_ENUM_VALUE": {
+ "COMMENTS",
+ },
+ "COMMENT_FIELD": {
+ "COMMENTS",
+ },
+ "COMMENT_MESSAGE": {
+ "COMMENTS",
+ },
+ "COMMENT_ONEOF": {
+ "COMMENTS",
+ },
+ "COMMENT_RPC": {
+ "COMMENTS",
+ },
+ "COMMENT_SERVICE": {
+ "COMMENTS",
+ },
+ "DIRECTORY_SAME_PACKAGE": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "FILE_LAYOUT",
+ },
+ "ENUM_FIRST_VALUE_ZERO": {
+ "OTHER",
+ },
+ "ENUM_NO_ALLOW_ALIAS": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "SENSIBLE",
+ },
+ "ENUM_PASCAL_CASE": {
+ "BASIC",
+ "DEFAULT",
+ "STYLE_BASIC",
+ "STYLE_DEFAULT",
+ },
+ "ENUM_VALUE_PREFIX": {
+ "DEFAULT",
+ "STYLE_DEFAULT",
+ },
+ "ENUM_VALUE_UPPER_SNAKE_CASE": {
+ "BASIC",
+ "DEFAULT",
+ "STYLE_BASIC",
+ "STYLE_DEFAULT",
+ },
+ "ENUM_ZERO_VALUE_SUFFIX": {
+ "DEFAULT",
+ "STYLE_DEFAULT",
+ },
+ "FIELD_LOWER_SNAKE_CASE": {
+ "BASIC",
+ "DEFAULT",
+ "STYLE_BASIC",
+ "STYLE_DEFAULT",
+ },
+ "FIELD_NO_DESCRIPTOR": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "SENSIBLE",
+ },
+ "FILE_LOWER_SNAKE_CASE": {
+ "DEFAULT",
+ "STYLE_DEFAULT",
+ },
+ "IMPORT_NO_PUBLIC": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "SENSIBLE",
+ },
+ "IMPORT_NO_WEAK": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "SENSIBLE",
+ },
+ "MESSAGE_PASCAL_CASE": {
+ "BASIC",
+ "DEFAULT",
+ "STYLE_BASIC",
+ "STYLE_DEFAULT",
+ },
+ "ONEOF_LOWER_SNAKE_CASE": {
+ "BASIC",
+ "DEFAULT",
+ "STYLE_BASIC",
+ "STYLE_DEFAULT",
+ },
+ "PACKAGE_DEFINED": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "SENSIBLE",
+ },
+ "PACKAGE_DIRECTORY_MATCH": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "FILE_LAYOUT",
+ },
+ "PACKAGE_LOWER_SNAKE_CASE": {
+ "BASIC",
+ "DEFAULT",
+ "STYLE_BASIC",
+ "STYLE_DEFAULT",
+ },
+ "PACKAGE_SAME_CSHARP_NAMESPACE": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "PACKAGE_AFFINITY",
+ },
+ "PACKAGE_SAME_DIRECTORY": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "FILE_LAYOUT",
+ },
+ "PACKAGE_SAME_GO_PACKAGE": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "PACKAGE_AFFINITY",
+ },
+ "PACKAGE_SAME_JAVA_MULTIPLE_FILES": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "PACKAGE_AFFINITY",
+ },
+ "PACKAGE_SAME_JAVA_PACKAGE": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "PACKAGE_AFFINITY",
+ },
+ "PACKAGE_SAME_PHP_NAMESPACE": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "PACKAGE_AFFINITY",
+ },
+ "PACKAGE_SAME_RUBY_PACKAGE": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "PACKAGE_AFFINITY",
+ },
+ "PACKAGE_SAME_SWIFT_PREFIX": {
+ "MINIMAL",
+ "BASIC",
+ "DEFAULT",
+ "PACKAGE_AFFINITY",
+ },
+ "PACKAGE_VERSION_SUFFIX": {
+ "DEFAULT",
+ "STYLE_DEFAULT",
+ },
+ "RPC_NO_CLIENT_STREAMING": {
+ "UNARY_RPC",
+ },
+ "RPC_NO_SERVER_STREAMING": {
+ "UNARY_RPC",
+ },
+ "RPC_PASCAL_CASE": {
+ "BASIC",
+ "DEFAULT",
+ "STYLE_BASIC",
+ "STYLE_DEFAULT",
+ },
+ "RPC_REQUEST_RESPONSE_UNIQUE": {
+ "DEFAULT",
+ "STYLE_DEFAULT",
+ },
+ "RPC_REQUEST_STANDARD_NAME": {
+ "DEFAULT",
+ "STYLE_DEFAULT",
+ },
+ "RPC_RESPONSE_STANDARD_NAME": {
+ "DEFAULT",
+ "STYLE_DEFAULT",
+ },
+ "SERVICE_PASCAL_CASE": {
+ "BASIC",
+ "DEFAULT",
+ "STYLE_BASIC",
+ "STYLE_DEFAULT",
+ },
+ "SERVICE_SUFFIX": {
+ "DEFAULT",
+ "STYLE_DEFAULT",
+ },
+ }
+)
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/usage.gen.go
new file mode 100644
index 000000000..033e083b4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package buflint
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/config.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/config.go
new file mode 100644
index 000000000..f168230c1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/config.go
@@ -0,0 +1,323 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "fmt"
+ "sort"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+)
+
+const (
+ defaultEnumZeroValueSuffix = "_UNSPECIFIED"
+ defaultServiceSuffix = "Service"
+)
+
+// Config is the check config.
+type Config struct {
+ // Rules are the rules to run.
+ //
+ // Rules will be sorted by first categories, then id when Configs are
+ // created from this package, i.e. created wth ConfigBuilder.NewConfig.
+ Rules []*Rule
+
+ IgnoreRootPaths map[string]struct{}
+ IgnoreIDToRootPaths map[string]map[string]struct{}
+
+ AllowCommentIgnores bool
+ IgnoreUnstablePackages bool
+}
+
+// ConfigBuilder is a config builder.
+type ConfigBuilder struct {
+ Use []string
+ Except []string
+
+ IgnoreRootPaths []string
+ IgnoreIDOrCategoryToRootPaths map[string][]string
+
+ AllowCommentIgnores bool
+ IgnoreUnstablePackages bool
+
+ EnumZeroValueSuffix string
+ RPCAllowSameRequestResponse bool
+ RPCAllowGoogleProtobufEmptyRequests bool
+ RPCAllowGoogleProtobufEmptyResponses bool
+ ServiceSuffix string
+}
+
+// NewConfig returns a new Config.
+func (b ConfigBuilder) NewConfig(versionSpec *VersionSpec) (*Config, error) {
+ return newConfig(b, versionSpec)
+}
+
+func newConfig(configBuilder ConfigBuilder, versionSpec *VersionSpec) (*Config, error) {
+ configBuilder.Use = stringutil.SliceToUniqueSortedSliceFilterEmptyStrings(configBuilder.Use)
+ configBuilder.Except = stringutil.SliceToUniqueSortedSliceFilterEmptyStrings(configBuilder.Except)
+ if len(configBuilder.Use) == 0 {
+ // default behavior
+ configBuilder.Use = versionSpec.DefaultCategories
+ }
+ if configBuilder.EnumZeroValueSuffix == "" {
+ configBuilder.EnumZeroValueSuffix = defaultEnumZeroValueSuffix
+ }
+ if configBuilder.ServiceSuffix == "" {
+ configBuilder.ServiceSuffix = defaultServiceSuffix
+ }
+ return newConfigForRuleBuilders(
+ configBuilder,
+ versionSpec.RuleBuilders,
+ versionSpec.IDToCategories,
+ )
+}
+
+func newConfigForRuleBuilders(
+ configBuilder ConfigBuilder,
+ ruleBuilders []*RuleBuilder,
+ idToCategories map[string][]string,
+) (*Config, error) {
+ // this checks that there are not duplicate IDs for a given revision
+ // which would be a system error
+ idToRuleBuilder, err := getIDToRuleBuilder(ruleBuilders)
+ if err != nil {
+ return nil, err
+ }
+ categoryToIDs := getCategoryToIDs(idToCategories)
+ useIDMap, err := transformToIDMap(configBuilder.Use, idToCategories, categoryToIDs)
+ if err != nil {
+ return nil, err
+ }
+ exceptIDMap, err := transformToIDMap(configBuilder.Except, idToCategories, categoryToIDs)
+ if err != nil {
+ return nil, err
+ }
+
+ // this removes duplicates
+ // we already know that a given rule with the same ID is equivalent
+ resultIDToRuleBuilder := make(map[string]*RuleBuilder)
+
+ for id := range useIDMap {
+ ruleBuilder, ok := idToRuleBuilder[id]
+ if !ok {
+ return nil, fmt.Errorf("%q is not a known id after verification", id)
+ }
+ resultIDToRuleBuilder[ruleBuilder.id] = ruleBuilder
+ }
+ for id := range exceptIDMap {
+ if _, ok := idToRuleBuilder[id]; !ok {
+ return nil, fmt.Errorf("%q is not a known id after verification", id)
+ }
+ delete(resultIDToRuleBuilder, id)
+ }
+
+ resultRuleBuilders := make([]*RuleBuilder, 0, len(resultIDToRuleBuilder))
+ for _, ruleBuilder := range resultIDToRuleBuilder {
+ resultRuleBuilders = append(resultRuleBuilders, ruleBuilder)
+ }
+ resultRules := make([]*Rule, 0, len(resultRuleBuilders))
+ for _, ruleBuilder := range resultRuleBuilders {
+ categories, err := getRuleBuilderCategories(ruleBuilder, idToCategories)
+ if err != nil {
+ return nil, err
+ }
+ rule, err := ruleBuilder.NewRule(configBuilder, categories)
+ if err != nil {
+ return nil, err
+ }
+ resultRules = append(resultRules, rule)
+ }
+ sortRules(resultRules)
+
+ ignoreIDToRootPathsUnnormalized, err := transformToIDToListMap(configBuilder.IgnoreIDOrCategoryToRootPaths, idToCategories, categoryToIDs)
+ if err != nil {
+ return nil, err
+ }
+ ignoreIDToRootPaths := make(map[string]map[string]struct{})
+ for id, rootPaths := range ignoreIDToRootPathsUnnormalized {
+ for rootPath := range rootPaths {
+ if rootPath == "" {
+ continue
+ }
+ rootPath, err := normalpath.NormalizeAndValidate(rootPath)
+ if err != nil {
+ return nil, err
+ }
+ if rootPath == "." {
+ return nil, fmt.Errorf("cannot specify %q as an ignore path", rootPath)
+ }
+ resultRootPathMap, ok := ignoreIDToRootPaths[id]
+ if !ok {
+ resultRootPathMap = make(map[string]struct{})
+ ignoreIDToRootPaths[id] = resultRootPathMap
+ }
+ resultRootPathMap[rootPath] = struct{}{}
+ }
+ }
+
+ ignoreRootPaths := make(map[string]struct{}, len(configBuilder.IgnoreRootPaths))
+ for _, rootPath := range configBuilder.IgnoreRootPaths {
+ if rootPath == "" {
+ continue
+ }
+ rootPath, err := normalpath.NormalizeAndValidate(rootPath)
+ if err != nil {
+ return nil, err
+ }
+ if rootPath == "." {
+ return nil, fmt.Errorf("cannot specify %q as an ignore path", rootPath)
+ }
+ ignoreRootPaths[rootPath] = struct{}{}
+ }
+
+ return &Config{
+ Rules: resultRules,
+ IgnoreIDToRootPaths: ignoreIDToRootPaths,
+ IgnoreRootPaths: ignoreRootPaths,
+ AllowCommentIgnores: configBuilder.AllowCommentIgnores,
+ IgnoreUnstablePackages: configBuilder.IgnoreUnstablePackages,
+ }, nil
+}
+
+func transformToIDMap(idsOrCategories []string, idToCategories map[string][]string, categoryToIDs map[string][]string) (map[string]struct{}, error) {
+ if len(idsOrCategories) == 0 {
+ return nil, nil
+ }
+ idMap := make(map[string]struct{}, len(idsOrCategories))
+ for _, idOrCategory := range idsOrCategories {
+ if idOrCategory == "" {
+ continue
+ }
+ if _, ok := idToCategories[idOrCategory]; ok {
+ id := idOrCategory
+ idMap[id] = struct{}{}
+ } else if ids, ok := categoryToIDs[idOrCategory]; ok {
+ for _, id := range ids {
+ idMap[id] = struct{}{}
+ }
+ } else {
+ return nil, fmt.Errorf("%q is not a known id or category", idOrCategory)
+ }
+ }
+ return idMap, nil
+}
+
+func transformToIDToListMap(idOrCategoryToList map[string][]string, idToCategories map[string][]string, categoryToIDs map[string][]string) (map[string]map[string]struct{}, error) {
+ if len(idOrCategoryToList) == 0 {
+ return nil, nil
+ }
+ idToListMap := make(map[string]map[string]struct{}, len(idOrCategoryToList))
+ for idOrCategory, list := range idOrCategoryToList {
+ if idOrCategory == "" {
+ continue
+ }
+ if _, ok := idToCategories[idOrCategory]; ok {
+ id := idOrCategory
+ if _, ok := idToListMap[id]; !ok {
+ idToListMap[id] = make(map[string]struct{})
+ }
+ for _, elem := range list {
+ idToListMap[id][elem] = struct{}{}
+ }
+ } else if ids, ok := categoryToIDs[idOrCategory]; ok {
+ for _, id := range ids {
+ if _, ok := idToListMap[id]; !ok {
+ idToListMap[id] = make(map[string]struct{})
+ }
+ for _, elem := range list {
+ idToListMap[id][elem] = struct{}{}
+ }
+ }
+ } else {
+ return nil, fmt.Errorf("%q is not a known id or category", idOrCategory)
+ }
+ }
+ return idToListMap, nil
+}
+
+func getCategoryToIDs(idToCategories map[string][]string) map[string][]string {
+ categoryToIDs := make(map[string][]string)
+ for id, categories := range idToCategories {
+ for _, category := range categories {
+ // handles empty category as well
+ categoryToIDs[category] = append(categoryToIDs[category], id)
+ }
+ }
+ return categoryToIDs
+}
+
+func getIDToRuleBuilder(ruleBuilders []*RuleBuilder) (map[string]*RuleBuilder, error) {
+ m := make(map[string]*RuleBuilder)
+ for _, ruleBuilder := range ruleBuilders {
+ if _, ok := m[ruleBuilder.id]; ok {
+ return nil, fmt.Errorf("duplicate rule ID: %q", ruleBuilder.id)
+ }
+ m[ruleBuilder.id] = ruleBuilder
+ }
+ return m, nil
+}
+
+func getRuleBuilderCategories(
+ ruleBuilder *RuleBuilder,
+ idToCategories map[string][]string,
+) ([]string, error) {
+ categories, ok := idToCategories[ruleBuilder.id]
+ if !ok {
+ return nil, fmt.Errorf("%q is not configured for categories", ruleBuilder.id)
+ }
+ // it is ok for categories to be empty, however the map must contain an entry
+ // or otherwise this is a system error
+ return categories, nil
+}
+
+func sortRules(rules []*Rule) {
+ sort.Slice(
+ rules,
+ func(i int, j int) bool {
+ // categories are sorted at this point
+ // so we know the first category is a top-level category if present
+ one := rules[i]
+ two := rules[j]
+ oneCategories := one.Categories()
+ twoCategories := two.Categories()
+ if len(oneCategories) == 0 && len(twoCategories) > 0 {
+ return false
+ }
+ if len(oneCategories) > 0 && len(twoCategories) == 0 {
+ return true
+ }
+ if len(oneCategories) > 0 && len(twoCategories) > 0 {
+ compare := categoryCompare(oneCategories[0], twoCategories[0])
+ if compare < 0 {
+ return true
+ }
+ if compare > 0 {
+ return false
+ }
+ }
+ oneCategoriesString := strings.Join(oneCategories, ",")
+ twoCategoriesString := strings.Join(twoCategories, ",")
+ if oneCategoriesString < twoCategoriesString {
+ return true
+ }
+ if oneCategoriesString > twoCategoriesString {
+ return false
+ }
+ return one.ID() < two.ID()
+ },
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/helper.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/helper.go
new file mode 100644
index 000000000..fd6cc1c41
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/helper.go
@@ -0,0 +1,171 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+)
+
+// Helper is a helper for rules.
+type Helper struct {
+ id string
+ ignoreFunc IgnoreFunc
+ fileAnnotations []bufanalysis.FileAnnotation
+}
+
+// NewHelper returns a new Helper for the given id.
+func NewHelper(id string, ignoreFunc IgnoreFunc) *Helper {
+ return &Helper{
+ id: id,
+ ignoreFunc: ignoreFunc,
+ }
+}
+
+// AddFileAnnotationf adds a FileAnnotation with the id as the Type.
+//
+// If descriptor is nil, no filename information is added.
+// If location is nil, no line or column information will be added.
+func (h *Helper) AddFileAnnotationf(
+ descriptor protosource.Descriptor,
+ location protosource.Location,
+ format string,
+ args ...interface{},
+) {
+ h.addFileAnnotationf(
+ descriptor,
+ nil,
+ location,
+ nil,
+ format,
+ args...,
+ )
+}
+
+// AddFileAnnotationWithExtraIgnoreDescriptorsf adds a FileAnnotation with the id as the Type.
+//
+// extraIgnoreDescriptors are extra desciptors to check for ignores.
+//
+// If descriptor is nil, no filename information is added.
+// If location is nil, no line or column information will be added.
+func (h *Helper) AddFileAnnotationWithExtraIgnoreDescriptorsf(
+ descriptor protosource.Descriptor,
+ extraIgnoreDescriptors []protosource.Descriptor,
+ location protosource.Location,
+ format string,
+ args ...interface{},
+) {
+ h.addFileAnnotationf(
+ descriptor,
+ extraIgnoreDescriptors,
+ location,
+ nil,
+ format,
+ args...,
+ )
+}
+
+// AddFileAnnotationWithExtraIgnoreLocationsf adds a FileAnnotation with the id as the Type.
+//
+// extraIgnoreLocations are extra locations to check for comment ignores.
+//
+// If descriptor is nil, no filename information is added.
+// If location is nil, no line or column information will be added.
+func (h *Helper) AddFileAnnotationWithExtraIgnoreLocationsf(
+ descriptor protosource.Descriptor,
+ location protosource.Location,
+ extraIgnoreLocations []protosource.Location,
+ format string,
+ args ...interface{},
+) {
+ h.addFileAnnotationf(
+ descriptor,
+ nil,
+ location,
+ extraIgnoreLocations,
+ format,
+ args...,
+ )
+}
+
+func (h *Helper) addFileAnnotationf(
+ descriptor protosource.Descriptor,
+ extraIgnoreDescriptors []protosource.Descriptor,
+ location protosource.Location,
+ extraIgnoreLocations []protosource.Location,
+ format string,
+ args ...interface{},
+) {
+ if h.ignoreFunc != nil && h.ignoreFunc(
+ h.id,
+ append([]protosource.Descriptor{descriptor}, extraIgnoreDescriptors...),
+ append([]protosource.Location{location}, extraIgnoreLocations...),
+ ) {
+ return
+ }
+ h.fileAnnotations = append(
+ h.fileAnnotations,
+ newFileAnnotationf(
+ h.id,
+ descriptor,
+ location,
+ format,
+ args...,
+ ),
+ )
+}
+
+// FileAnnotations returns the added FileAnnotations.
+func (h *Helper) FileAnnotations() []bufanalysis.FileAnnotation {
+ return h.fileAnnotations
+}
+
+// newFileAnnotationf adds a FileAnnotation with the id as the Type.
+//
+// If descriptor is nil, no filename information is added.
+// If location is nil, no line or column information will be added.
+func newFileAnnotationf(
+ id string,
+ descriptor protosource.Descriptor,
+ location protosource.Location,
+ format string,
+ args ...interface{},
+) bufanalysis.FileAnnotation {
+ startLine := 0
+ startColumn := 0
+ endLine := 0
+ endColumn := 0
+ if location != nil {
+ startLine = location.StartLine()
+ startColumn = location.StartColumn()
+ endLine = location.EndLine()
+ endColumn = location.EndColumn()
+ }
+ var fileInfo bufanalysis.FileInfo
+ if descriptor != nil {
+ fileInfo = descriptor.File()
+ }
+ return bufanalysis.NewFileAnnotation(
+ fileInfo,
+ startLine,
+ startColumn,
+ endLine,
+ endColumn,
+ id,
+ fmt.Sprintf(format, args...),
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/rule.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/rule.go
new file mode 100644
index 000000000..2038ead6c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/rule.go
@@ -0,0 +1,103 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "encoding/json"
+ "sort"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+)
+
+// IgnoreFunc is an ignore function.
+//
+// Descriptors are the descriptors to check for ignores.
+// Sometimes we have multiple descriptors, such as when we want to check previous
+// file descriptors, or if an entire package is deleted.
+//
+// Locations are the locations to check for comment ignores.
+// Sometimes, we have multiple locations to check, for example with RPC_REQUEST_STANDARD_NAME
+// and RPC_RESPONSE_STANDARD_NAME, we want to check both the input/output type, and the method.
+//
+// Any descriptor or location may be nil.
+type IgnoreFunc func(id string, descriptors []protosource.Descriptor, locations []protosource.Location) bool
+
+// CheckFunc is a check function.
+type CheckFunc func(id string, ignoreFunc IgnoreFunc, previousFiles []protosource.File, files []protosource.File) ([]bufanalysis.FileAnnotation, error)
+
+// Rule provides a base embeddable rule.
+type Rule struct {
+ id string
+ categories []string
+ purpose string
+ checkFunc CheckFunc
+}
+
+// newRule returns a new Rule.
+//
+// Categories will be sorted and purpose will have "Checks that "
+// prepended and "." appended.
+func newRule(
+ id string,
+ categories []string,
+ purpose string,
+ checkFunc CheckFunc,
+) *Rule {
+ c := make([]string, len(categories))
+ copy(c, categories)
+ sort.Slice(
+ c,
+ func(i int, j int) bool {
+ return categoryLess(c[i], c[j])
+ },
+ )
+ return &Rule{
+ id: id,
+ categories: c,
+ purpose: "Checks that " + purpose + ".",
+ checkFunc: checkFunc,
+ }
+}
+
+// ID implements Rule.
+func (c *Rule) ID() string {
+ return c.id
+}
+
+// Categories implements Rule.
+func (c *Rule) Categories() []string {
+ return c.categories
+}
+
+// Purpose implements Rule.
+func (c *Rule) Purpose() string {
+ return c.purpose
+}
+
+// MarshalJSON implements Rule.
+func (c *Rule) MarshalJSON() ([]byte, error) {
+ return json.Marshal(ruleJSON{ID: c.id, Categories: c.categories, Purpose: c.purpose})
+}
+
+func (c *Rule) check(ignoreFunc IgnoreFunc, previousFiles []protosource.File, files []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ return c.checkFunc(c.ID(), ignoreFunc, previousFiles, files)
+}
+
+type ruleJSON struct {
+ ID string `json:"id" yaml:"id"`
+ Categories []string `json:"categories" yaml:"categories"`
+ Purpose string `json:"purpose" yaml:"purpose"`
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/rule_builder.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/rule_builder.go
new file mode 100644
index 000000000..717fc21d9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/rule_builder.go
@@ -0,0 +1,96 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+)
+
+// RuleBuilder is a rule builder.
+type RuleBuilder struct {
+ id string
+ newPurpose func(ConfigBuilder) (string, error)
+ newCheck func(ConfigBuilder) (CheckFunc, error)
+}
+
+// NewRuleBuilder returns a new RuleBuilder.
+func NewRuleBuilder(
+ id string,
+ newPurpose func(ConfigBuilder) (string, error),
+ newCheck func(ConfigBuilder) (CheckFunc, error),
+) *RuleBuilder {
+ return &RuleBuilder{
+ id: id,
+ newPurpose: newPurpose,
+ newCheck: newCheck,
+ }
+}
+
+// NewNopRuleBuilder returns a new RuleBuilder for the direct
+// purpose and CheckFunc.
+func NewNopRuleBuilder(
+ id string,
+ purpose string,
+ checkFunc CheckFunc,
+) *RuleBuilder {
+ return NewRuleBuilder(
+ id,
+ newNopPurpose(purpose),
+ newNopCheckFunc(checkFunc),
+ )
+}
+
+// NewRule returns a new Rule.
+//
+// Categories will be sorted and Purpose will be prepended with "Checks that "
+// and appended with ".".
+//
+// Categories is an actual copy from the ruleBuilder.
+func (c *RuleBuilder) NewRule(configBuilder ConfigBuilder, categories []string) (*Rule, error) {
+ purpose, err := c.newPurpose(configBuilder)
+ if err != nil {
+ return nil, err
+ }
+ check, err := c.newCheck(configBuilder)
+ if err != nil {
+ return nil, err
+ }
+ return newRule(
+ c.id,
+ categories,
+ purpose,
+ check,
+ ), nil
+}
+
+// ID returns the id.
+func (c *RuleBuilder) ID() string {
+ return c.id
+}
+
+func newNopPurpose(purpose string) func(ConfigBuilder) (string, error) {
+ return func(ConfigBuilder) (string, error) {
+ return purpose, nil
+ }
+}
+
+func newNopCheckFunc(
+ f func(string, IgnoreFunc, []protosource.File, []protosource.File) ([]bufanalysis.FileAnnotation, error),
+) func(ConfigBuilder) (CheckFunc, error) {
+ return func(ConfigBuilder) (CheckFunc, error) {
+ return f, nil
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/runner.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/runner.go
new file mode 100644
index 000000000..2f309b3d6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/runner.go
@@ -0,0 +1,194 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "context"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+ "github.com/bufbuild/buf/private/pkg/protoversion"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+// Runner is a runner.
+type Runner struct {
+ logger *zap.Logger
+ ignorePrefix string
+}
+
+// NewRunner returns a new Runner.
+func NewRunner(logger *zap.Logger, options ...RunnerOption) *Runner {
+ runner := &Runner{
+ logger: logger,
+ }
+ for _, option := range options {
+ option(runner)
+ }
+ return runner
+}
+
+// RunnerOption is an option for a new Runner.
+type RunnerOption func(*Runner)
+
+// RunnerWithIgnorePrefix returns a new RunnerOption that sets the comment ignore prefix.
+//
+// This will result in failures where the location has "ignore_prefix id" in the leading
+// comment being ignored.
+//
+// The default is to not enable comment ignores.
+func RunnerWithIgnorePrefix(ignorePrefix string) RunnerOption {
+ return func(runner *Runner) {
+ runner.ignorePrefix = ignorePrefix
+ }
+}
+
+// Check runs the Rules.
+func (r *Runner) Check(ctx context.Context, config *Config, previousFiles []protosource.File, files []protosource.File) ([]bufanalysis.FileAnnotation, error) {
+ rules := config.Rules
+ if len(rules) == 0 {
+ return nil, nil
+ }
+ ctx, span := trace.StartSpan(ctx, "check")
+ span.AddAttributes(
+ trace.Int64Attribute("num_files", int64(len(files))),
+ trace.Int64Attribute("num_rules", int64(len(rules))),
+ )
+ defer span.End()
+
+ ignoreFunc := r.newIgnoreFunc(config)
+ var fileAnnotations []bufanalysis.FileAnnotation
+ resultC := make(chan *result, len(rules))
+ for _, rule := range rules {
+ rule := rule
+ go func() {
+ iFileAnnotations, iErr := rule.check(ignoreFunc, previousFiles, files)
+ resultC <- newResult(iFileAnnotations, iErr)
+ }()
+ }
+ var err error
+ for i := 0; i < len(rules); i++ {
+ select {
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ case result := <-resultC:
+ fileAnnotations = append(fileAnnotations, result.FileAnnotations...)
+ err = multierr.Append(err, result.Err)
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ bufanalysis.SortFileAnnotations(fileAnnotations)
+ return fileAnnotations, nil
+}
+
+func (r *Runner) newIgnoreFunc(config *Config) IgnoreFunc {
+ return func(id string, descriptors []protosource.Descriptor, locations []protosource.Location) bool {
+ if idIsIgnored(id, descriptors, config) {
+ return true
+ }
+ // if ignorePrefix is empty, comment ignores are not enabled for the runner
+ // this is the case with breaking changes
+ if r.ignorePrefix != "" && config.AllowCommentIgnores &&
+ locationsAreIgnored(id, r.ignorePrefix, locations, config) {
+ return true
+ }
+ if config.IgnoreUnstablePackages {
+ for _, descriptor := range descriptors {
+ if descriptorPackageIsUnstable(descriptor) {
+ return true
+ }
+ }
+ }
+ return false
+ }
+}
+
+func idIsIgnored(id string, descriptors []protosource.Descriptor, config *Config) bool {
+ for _, descriptor := range descriptors {
+ // OR of descriptors
+ if idIsIgnoredForDescriptor(id, descriptor, config) {
+ return true
+ }
+ }
+ return false
+}
+
+func idIsIgnoredForDescriptor(id string, descriptor protosource.Descriptor, config *Config) bool {
+ if descriptor == nil {
+ return false
+ }
+ path := descriptor.File().Path()
+ if normalpath.MapHasEqualOrContainingPath(config.IgnoreRootPaths, path, normalpath.Relative) {
+ return true
+ }
+ if id == "" {
+ return false
+ }
+ ignoreRootPaths, ok := config.IgnoreIDToRootPaths[id]
+ if !ok {
+ return false
+ }
+ return normalpath.MapHasEqualOrContainingPath(ignoreRootPaths, path, normalpath.Relative)
+}
+
+func locationsAreIgnored(id string, ignorePrefix string, locations []protosource.Location, config *Config) bool {
+ // we already check that ignorePrefix is non-empty, but just doing here for safety
+ if id == "" || ignorePrefix == "" {
+ return false
+ }
+ fullIgnorePrefix := ignorePrefix + " " + id
+ for _, location := range locations {
+ if location != nil {
+ if leadingComments := location.LeadingComments(); leadingComments != "" {
+ for _, line := range stringutil.SplitTrimLinesNoEmpty(leadingComments) {
+ if strings.HasPrefix(line, fullIgnorePrefix) {
+ return true
+ }
+ }
+ }
+ }
+ }
+ return false
+}
+
+func descriptorPackageIsUnstable(descriptor protosource.Descriptor) bool {
+ if descriptor == nil {
+ return false
+ }
+ packageVersion, ok := protoversion.NewPackageVersionForPackage(descriptor.File().Package())
+ if !ok {
+ return false
+ }
+ return packageVersion.StabilityLevel() != protoversion.StabilityLevelStable
+}
+
+type result struct {
+ FileAnnotations []bufanalysis.FileAnnotation
+ Err error
+}
+
+func newResult(fileAnnotations []bufanalysis.FileAnnotation, err error) *result {
+ return &result{
+ FileAnnotations: fileAnnotations,
+ Err: err,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/usage.gen.go
new file mode 100644
index 000000000..edcedfbef
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package internal
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/vars.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/vars.go
new file mode 100644
index 000000000..ffe0db1a9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/vars.go
@@ -0,0 +1,59 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+// priority 1 is higher than priority two
+var topLevelCategoryToPriority = map[string]int{
+ "MINIMAL": 1,
+ "BASIC": 2,
+ "DEFAULT": 3,
+ "COMMENTS": 4,
+ "UNARY_RPC": 5,
+ "OTHER": 6,
+ "FILE": 1,
+ "PACKAGE": 2,
+ "WIRE_JSON": 3,
+ "WIRE": 4,
+}
+
+func categoryLess(one string, two string) bool {
+ return categoryCompare(one, two) < 0
+}
+
+func categoryCompare(one string, two string) int {
+ onePriority, oneIsTopLevel := topLevelCategoryToPriority[one]
+ twoPriority, twoIsTopLevel := topLevelCategoryToPriority[two]
+ if oneIsTopLevel && !twoIsTopLevel {
+ return -1
+ }
+ if !oneIsTopLevel && twoIsTopLevel {
+ return 1
+ }
+ if oneIsTopLevel && twoIsTopLevel {
+ if onePriority < twoPriority {
+ return -1
+ }
+ if onePriority > twoPriority {
+ return 1
+ }
+ }
+ if one < two {
+ return -1
+ }
+ if one > two {
+ return 1
+ }
+ return 0
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/version_spec.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/version_spec.go
new file mode 100644
index 000000000..26ff51052
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/internal/version_spec.go
@@ -0,0 +1,75 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "sort"
+
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+)
+
+// VersionSpec specifies the rules, ids, and categories for a given version.
+type VersionSpec struct {
+ RuleBuilders []*RuleBuilder
+ DefaultCategories []string
+ // May include IDs without any categories.
+ // To get all categories, use AllCategoriesForVersionSpec.
+ IDToCategories map[string][]string
+}
+
+// AllCategoriesForVersionSpec returns all categories for the VersionSpec.
+//
+// Sorted by category priority.
+func AllCategoriesForVersionSpec(versionSpec *VersionSpec) []string {
+ categoriesMap := make(map[string]struct{})
+ for _, categories := range versionSpec.IDToCategories {
+ for _, category := range categories {
+ categoriesMap[category] = struct{}{}
+ }
+ }
+ categories := stringutil.MapToSlice(categoriesMap)
+ sort.Slice(
+ categories,
+ func(i int, j int) bool {
+ return categoryLess(categories[i], categories[j])
+ },
+ )
+ return categories
+}
+
+// AllIDsForVersionSpec returns all ids for the VersionSpec.
+//
+// Sorted lexographically.
+func AllIDsForVersionSpec(versionSpec *VersionSpec) []string {
+ m := make(map[string]struct{})
+ for id := range versionSpec.IDToCategories {
+ m[id] = struct{}{}
+ }
+ return stringutil.MapToSortedSlice(m)
+}
+
+// AllCategoriesAndIDsForVersionSpec returns all categories and rules for the VersionSpec.
+//
+// Sorted lexographically.
+func AllCategoriesAndIDsForVersionSpec(versionSpec *VersionSpec) []string {
+ m := make(map[string]struct{})
+ for id, categories := range versionSpec.IDToCategories {
+ m[id] = struct{}{}
+ for _, category := range categories {
+ m[category] = struct{}{}
+ }
+ }
+ return stringutil.MapToSortedSlice(m)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/usage.gen.go
new file mode 100644
index 000000000..26e4ac8b7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufcheck/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufcheck
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/bufconfig.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/bufconfig.go
new file mode 100644
index 000000000..c9dc7569e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/bufconfig.go
@@ -0,0 +1,260 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufconfig contains the configuration functionality.
+package bufconfig
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+const (
+ // ExternalConfigV1FilePath is the default configuration file path.
+ ExternalConfigV1FilePath = "buf.yaml"
+
+ // ExternalConfigV1Beta1FilePath is the v1beta1 file path.
+ ExternalConfigV1Beta1FilePath = "buf.yaml"
+
+ // V1Version is the v1 version.
+ V1Version = "v1"
+
+ // V1Beta1Version is the v1beta1 version.
+ V1Beta1Version = "v1beta1"
+
+ // backupExternalConfigV1FilePath is another acceptable configuration file path for v1.
+ //
+ // Originally we thought we were going to move to buf.mod, and had this around for
+ // a while, but then reverted back to buf.yaml. We still need to support buf.mod as
+ // we released with it, however.
+ backupExternalConfigV1FilePath = "buf.mod"
+)
+
+var (
+ // All versions are all the versions in order.
+ AllVersions = []string{
+ V1Beta1Version,
+ V1Version,
+ }
+
+ // AllConfigFilePaths are all acceptable config file paths without overrides.
+ //
+ // These are in the order we should check.
+ AllConfigFilePaths = []string{
+ ExternalConfigV1FilePath,
+ backupExternalConfigV1FilePath,
+ }
+)
+
+// Config is the user config.
+type Config struct {
+ Version string
+ ModuleIdentity bufmoduleref.ModuleIdentity
+ Build *bufmoduleconfig.Config
+ Breaking *bufbreakingconfig.Config
+ Lint *buflintconfig.Config
+}
+
+// GetConfigForBucket gets the Config for the YAML data at ConfigFilePath.
+//
+// If the data is of length 0, returns the default config.
+func GetConfigForBucket(ctx context.Context, readBucket storage.ReadBucket) (*Config, error) {
+ return getConfigForBucket(ctx, readBucket)
+}
+
+// GetConfigForData gets the Config for the given JSON or YAML data.
+//
+// If the data is of length 0, returns the default config.
+func GetConfigForData(ctx context.Context, data []byte) (*Config, error) {
+ return getConfigForData(ctx, data)
+}
+
+// WriteConfig writes an initial configuration file into the bucket.
+func WriteConfig(
+ ctx context.Context,
+ writeBucket storage.WriteBucket,
+ options ...WriteConfigOption,
+) error {
+ return writeConfig(
+ ctx,
+ writeBucket,
+ options...,
+ )
+}
+
+// WriteConfigOption is an option for WriteConfig.
+type WriteConfigOption func(*writeConfigOptions)
+
+// WriteConfigWithDocumentationComments returns a new WriteConfigOption that documents the resulting configuration file.
+func WriteConfigWithDocumentationComments() WriteConfigOption {
+ return func(writeConfigOptions *writeConfigOptions) {
+ writeConfigOptions.documentationComments = true
+ }
+}
+
+// WriteConfigWithUncomment returns a new WriteConfigOption that uncomments the resulting configuration file
+// options that are commented out by default.
+//
+// If this option is used, WriteConfigWithDocumentationComments must also be used.
+func WriteConfigWithUncomment() WriteConfigOption {
+ return func(writeConfigOptions *writeConfigOptions) {
+ writeConfigOptions.uncomment = true
+ }
+}
+
+// WriteConfigWithModuleIdentity returns a new WriteConfigOption that sets the name of the
+// module to the given ModuleIdentity.
+//
+// The default is to not set the name.
+//
+// Only use in tests.
+func WriteConfigWithModuleIdentity(moduleIdentity bufmoduleref.ModuleIdentity) WriteConfigOption {
+ return func(writeConfigOptions *writeConfigOptions) {
+ writeConfigOptions.moduleIdentity = moduleIdentity
+ }
+}
+
+// WriteConfigWithDependencyModuleReferences returns a new WriteConfigOption that sets the
+// dependencies of the module.
+//
+// The default is to not have any dependencies.
+// If this option is used, WriteConfigWithModuleIdentity must also be used.
+//
+// Only use in tests.
+func WriteConfigWithDependencyModuleReferences(dependencyModuleReferences ...bufmoduleref.ModuleReference) WriteConfigOption {
+ return func(writeConfigOptions *writeConfigOptions) {
+ writeConfigOptions.dependencyModuleReferences = dependencyModuleReferences
+ }
+}
+
+// WriteConfigWithBreakingConfig returns a new WriteConfigOption that sets the breaking change
+// config for the module.
+//
+// If this option is used then the version used must be consistent with the rest of the config.
+func WriteConfigWithBreakingConfig(breakingConfig *bufbreakingconfig.Config) WriteConfigOption {
+ return func(writeConfigOptions *writeConfigOptions) {
+ writeConfigOptions.breakingConfig = breakingConfig
+ }
+}
+
+// WriteConfigWithLintConfig returns a new WriteConfigOption that sets the lint config for the module.
+//
+// If this option is used then the version used must be consistent with the rest of the config.
+func WriteConfigWithLintConfig(lintConfig *buflintconfig.Config) WriteConfigOption {
+ return func(writeConfigOptions *writeConfigOptions) {
+ writeConfigOptions.lintConfig = lintConfig
+ }
+}
+
+// WriteConfigWithVersion returns a new WriteConfigOption that sets the version of the config
+// being written.
+//
+// If this is not set, the default is v1beta1.
+func WriteConfigWithVersion(version string) WriteConfigOption {
+ return func(writeConfigOptions *writeConfigOptions) {
+ writeConfigOptions.version = version
+ }
+}
+
+// ReadConfigOS reads the configuration from the OS or an override, if any.
+//
+// ONLY USE IN CLI TOOLS.
+func ReadConfigOS(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ options ...ReadConfigOSOption,
+) (*Config, error) {
+ return readConfigOS(
+ ctx,
+ readBucket,
+ options...,
+ )
+}
+
+// ReadConfigOSOption is an option for ReadConfig.
+type ReadConfigOSOption func(*readConfigOSOptions)
+
+// ReadConfigOSWithOverride sets the override.
+//
+// If override is set, this will first check if the override ends in .json or .yaml, if so,
+// this reads the file at this path and uses it. Otherwise, this assumes this is configuration
+// data in either JSON or YAML format, and unmarshals it.
+//
+// If no override is set, this reads ExternalConfigFilePath in the bucket.
+func ReadConfigOSWithOverride(override string) ReadConfigOSOption {
+ return func(readConfigOSOptions *readConfigOSOptions) {
+ readConfigOSOptions.override = override
+ }
+}
+
+// ExistingConfigFilePath checks if a configuration file exists, and if so, returns the path
+// within the ReadBucket of this configuration file.
+//
+// Returns empty string and no error if no configuration file exists.
+func ExistingConfigFilePath(ctx context.Context, readBucket storage.ReadBucket) (string, error) {
+ for _, configFilePath := range AllConfigFilePaths {
+ exists, err := storage.Exists(ctx, readBucket, configFilePath)
+ if err != nil {
+ return "", err
+ }
+ if exists {
+ return configFilePath, nil
+ }
+ }
+ return "", nil
+}
+
+// ValidateVersion checks that a given version string is valid.
+func ValidateVersion(version string) error {
+ switch version {
+ case V1Version, V1Beta1Version:
+ return nil
+ default:
+ return fmt.Errorf("invalid config version %q provided", version)
+ }
+}
+
+// ExternalConfigV1Beta1 represents the on-disk representation of the Config
+// at version v1beta1.
+type ExternalConfigV1Beta1 struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+ Deps []string `json:"deps,omitempty" yaml:"deps,omitempty"`
+ Build bufmoduleconfig.ExternalConfigV1Beta1 `json:"build,omitempty" yaml:"build,omitempty"`
+ Breaking bufbreakingconfig.ExternalConfigV1Beta1 `json:"breaking,omitempty" yaml:"breaking,omitempty"`
+ Lint buflintconfig.ExternalConfigV1Beta1 `json:"lint,omitempty" yaml:"lint,omitempty"`
+}
+
+// ExternalConfigV1 represents the on-disk representation of the Config
+// at version v1.
+type ExternalConfigV1 struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+ Deps []string `json:"deps,omitempty" yaml:"deps,omitempty"`
+ Build bufmoduleconfig.ExternalConfigV1 `json:"build,omitempty" yaml:"build,omitempty"`
+ Breaking bufbreakingconfig.ExternalConfigV1 `json:"breaking,omitempty" yaml:"breaking,omitempty"`
+ Lint buflintconfig.ExternalConfigV1 `json:"lint,omitempty" yaml:"lint,omitempty"`
+}
+
+// ExternalConfigVersion defines the subset of all config
+// file versions that is used to determine the configuration version.
+type ExternalConfigVersion struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/config.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/config.go
new file mode 100644
index 000000000..1a692ba1c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/config.go
@@ -0,0 +1,64 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufconfig
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+)
+
+func newConfigV1Beta1(externalConfig ExternalConfigV1Beta1) (*Config, error) {
+ buildConfig, err := bufmoduleconfig.NewConfigV1Beta1(externalConfig.Build, externalConfig.Deps...)
+ if err != nil {
+ return nil, err
+ }
+ var moduleIdentity bufmoduleref.ModuleIdentity
+ if externalConfig.Name != "" {
+ moduleIdentity, err = bufmoduleref.ModuleIdentityForString(externalConfig.Name)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return &Config{
+ Version: V1Beta1Version,
+ ModuleIdentity: moduleIdentity,
+ Build: buildConfig,
+ Breaking: bufbreakingconfig.NewConfigV1Beta1(externalConfig.Breaking),
+ Lint: buflintconfig.NewConfigV1Beta1(externalConfig.Lint),
+ }, nil
+}
+
+func newConfigV1(externalConfig ExternalConfigV1) (*Config, error) {
+ buildConfig, err := bufmoduleconfig.NewConfigV1(externalConfig.Build, externalConfig.Deps...)
+ if err != nil {
+ return nil, err
+ }
+ var moduleIdentity bufmoduleref.ModuleIdentity
+ if externalConfig.Name != "" {
+ moduleIdentity, err = bufmoduleref.ModuleIdentityForString(externalConfig.Name)
+ if err != nil {
+ return nil, err
+ }
+ }
+ return &Config{
+ Version: V1Version,
+ ModuleIdentity: moduleIdentity,
+ Build: buildConfig,
+ Breaking: bufbreakingconfig.NewConfigV1(externalConfig.Breaking),
+ Lint: buflintconfig.NewConfigV1(externalConfig.Lint),
+ }, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/get.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/get.go
new file mode 100644
index 000000000..e76bc5636
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/get.go
@@ -0,0 +1,121 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufconfig
+
+import (
+ "context"
+ "fmt"
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/encoding"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+)
+
+func getConfigForBucket(ctx context.Context, readBucket storage.ReadBucket) (_ *Config, retErr error) {
+ ctx, span := trace.StartSpan(ctx, "get_config")
+ defer span.End()
+
+ // This will be in the order of precedence.
+ var foundConfigFilePaths []string
+ // Go through all valid config file paths and see which ones are present.
+ // If none are present, return the default config.
+ // If multiple are present, error.
+ for _, configFilePath := range AllConfigFilePaths {
+ exists, err := storage.Exists(ctx, readBucket, configFilePath)
+ if err != nil {
+ return nil, err
+ }
+ if exists {
+ foundConfigFilePaths = append(foundConfigFilePaths, configFilePath)
+ }
+ }
+ switch len(foundConfigFilePaths) {
+ case 0:
+ // Did not find anything, return the default.
+ return newConfigV1(ExternalConfigV1{})
+ case 1:
+ readObjectCloser, err := readBucket.Get(ctx, foundConfigFilePaths[0])
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, readObjectCloser.Close())
+ }()
+ data, err := io.ReadAll(readObjectCloser)
+ if err != nil {
+ return nil, err
+ }
+ return getConfigForDataInternal(
+ ctx,
+ encoding.UnmarshalYAMLNonStrict,
+ encoding.UnmarshalYAMLStrict,
+ data,
+ readObjectCloser.ExternalPath(),
+ )
+ default:
+ return nil, fmt.Errorf("only one configuration file can exist but found multiple configuration files: %s", stringutil.SliceToString(foundConfigFilePaths))
+ }
+}
+
+func getConfigForData(ctx context.Context, data []byte) (*Config, error) {
+ _, span := trace.StartSpan(ctx, "get_config_for_data")
+ defer span.End()
+ return getConfigForDataInternal(
+ ctx,
+ encoding.UnmarshalJSONOrYAMLNonStrict,
+ encoding.UnmarshalJSONOrYAMLStrict,
+ data,
+ "Configuration data",
+ )
+}
+
+func getConfigForDataInternal(
+ ctx context.Context,
+ unmarshalNonStrict func([]byte, interface{}) error,
+ unmarshalStrict func([]byte, interface{}) error,
+ data []byte,
+ id string,
+) (*Config, error) {
+ var externalConfigVersion ExternalConfigVersion
+ if err := unmarshalNonStrict(data, &externalConfigVersion); err != nil {
+ return nil, err
+ }
+ switch externalConfigVersion.Version {
+ case "":
+ return nil, fmt.Errorf(`%s has no version set. Please add "version: %s". See https://docs.buf.build/faq for more details`, id, V1Version)
+ case V1Beta1Version:
+ var externalConfigV1Beta1 ExternalConfigV1Beta1
+ if err := unmarshalStrict(data, &externalConfigV1Beta1); err != nil {
+ return nil, err
+ }
+ return newConfigV1Beta1(externalConfigV1Beta1)
+ case V1Version:
+ var externalConfigV1 ExternalConfigV1
+ if err := unmarshalStrict(data, &externalConfigV1); err != nil {
+ return nil, err
+ }
+ return newConfigV1(externalConfigV1)
+ default:
+ return nil, fmt.Errorf(
+ `%s has an invalid "version: %s" set. Please add "version: %s". See https://docs.buf.build/faq for more details`,
+ id,
+ externalConfigVersion.Version,
+ V1Version,
+ )
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/read.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/read.go
new file mode 100644
index 000000000..01aee0d02
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/read.go
@@ -0,0 +1,58 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufconfig
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+func readConfigOS(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ options ...ReadConfigOSOption,
+) (*Config, error) {
+ readConfigOSOptions := newReadConfigOSOptions()
+ for _, option := range options {
+ option(readConfigOSOptions)
+ }
+ if readConfigOSOptions.override != "" {
+ var data []byte
+ var err error
+ switch filepath.Ext(readConfigOSOptions.override) {
+ case ".json", ".yaml", ".yml":
+ data, err = os.ReadFile(readConfigOSOptions.override)
+ if err != nil {
+ return nil, fmt.Errorf("could not read file: %v", err)
+ }
+ default:
+ data = []byte(readConfigOSOptions.override)
+ }
+ return GetConfigForData(ctx, data)
+ }
+ return GetConfigForBucket(ctx, readBucket)
+}
+
+type readConfigOSOptions struct {
+ override string
+}
+
+func newReadConfigOSOptions() *readConfigOSOptions {
+ return &readConfigOSOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/usage.gen.go
new file mode 100644
index 000000000..28733f7dc
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufconfig
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/write.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/write.go
new file mode 100644
index 000000000..e781d9080
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconfig/write.go
@@ -0,0 +1,467 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufconfig
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ "fmt"
+ "text/template"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "gopkg.in/yaml.v3"
+)
+
+// If this is updated, make sure to update docs.buf.build TODO automate this
+
+const (
+ exampleName = "buf.build/acme/weather"
+ // This is only used for `buf mod init`.
+ tmplDocumentationCommentsData = `{{$top := .}}# This specifies the configuration file version.
+#
+# This controls the configuration file layout, defaults, and lint/breaking
+# rules and rule categories. Buf takes breaking changes seriously in
+# all aspects, and none of these will ever change for a given version.
+#
+# The only valid versions are "v1beta1", "v1".
+# This key is required.
+version: {{.Version}}
+
+# name is the module name.
+{{if .NameUnset}}#{{end}}name: {{.Name}}
+
+# deps are the module dependencies
+{{if .DepsUnset}}#{{end}}deps:
+{{range $dep := .Deps}}{{if $top.DepsUnset}}#{{end}} - {{$dep}}
+{{end}}
+# build contains the options for builds.
+#
+# This affects the behavior of buf build, as well as the build behavior
+# for source lint and breaking change rules.
+#
+# If you want to build all files in your repository, this section can be
+# omitted.
+build:
+
+ # excludes is the list of directories to exclude.
+ #
+ # These directories will not be built or checked. If a directory is excluded,
+ # buf treats the directory as if it does not exist.
+ #
+ # All directory paths in exclude must be relative to the directory of
+ # your buf.yaml. Only directories can be specified, and all specified
+ # directories must within the root directory.
+ {{if not .Uncomment}}#{{end}}excludes:
+ {{if not .Uncomment}}#{{end}} - foo
+ {{if not .Uncomment}}#{{end}} - bar/baz
+
+# lint contains the options for lint rules.
+lint:
+
+ # use is the list of rule categories and ids to use for buf lint.
+ #
+ # Categories are sets of rule ids.
+ # Run buf config ls-lint-rules --all to get a list of all rules.
+ #
+ # The union of the categories and ids will be used.
+ #
+ # The default is [DEFAULT].
+ use:
+{{range $lint_id := .LintConfig.Use}} - {{$lint_id}}
+{{end}}
+ # except is the list of rule ids or categories to remove from the use
+ # list.
+ #
+ # This allows removal of specific rules from the union of rules derived
+ # from the use list of categories and ids.
+ {{if not .Uncomment}}#{{end}}except:
+ {{if not .Uncomment}}#{{end}} - ENUM_VALUE_UPPER_SNAKE_CASE
+
+ # ignore is the list of directories or files to ignore for all rules.
+ #
+ # All directories and file paths are specified relative to the root directory.
+ # The directory "." is not allowed - this is equivalent to ignoring
+ # everything.
+ {{if not .Uncomment}}#{{end}}ignore:
+ {{if not .Uncomment}}#{{end}} - bat
+ {{if not .Uncomment}}#{{end}} - ban/ban.proto
+
+ # ignore_only is the map from rule id or category to file or directory to
+ # ignore.
+ #
+ # All directories and file paths are specified relative to the root directory.
+ # The directory "." is not allowed - this is equivalent to using the "except"
+ # option.
+ #
+ # Note you can generate this section using
+ # "buf lint --error-format=config-ignore-yaml". The result of this command
+ # can be copy/pasted here.
+ {{if not .Uncomment}}#{{end}}ignore_only:
+ {{if not .Uncomment}}#{{end}} ENUM_PASCAL_CASE:
+ {{if not .Uncomment}}#{{end}} - foo/foo.proto
+ {{if not .Uncomment}}#{{end}} - bar
+ {{if not .Uncomment}}#{{end}} FIELD_LOWER_SNAKE_CASE:
+ {{if not .Uncomment}}#{{end}} - foo
+
+ # enum_zero_value_suffix affects the behavior of the ENUM_ZERO_VALUE_SUFFIX
+ # rule.
+ #
+ # This will result in this suffix being used instead of the default
+ # "_UNSPECIFIED" suffix.
+ {{if not .Uncomment}}#{{end}}enum_zero_value_suffix: _UNSPECIFIED
+
+ # rpc_allow_same_request_response affects the behavior of the
+ # RPC_REQUEST_RESPONSE_UNIQUE rule.
+ #
+ # This will result in requests and responses being allowed to be the same
+ # type for a single RPC.
+ {{if not .Uncomment}}#{{end}}rpc_allow_same_request_response: false
+
+ # rpc_allow_google_protobuf_empty_requests affects the behavior of the
+ # RPC_REQUEST_STANDARD_NAME and RPC_REQUEST_RESPONSE_UNIQUE rules.
+ #
+ # This will result in google.protobuf.Empty requests being ignored for
+ # RPC_REQUEST_STANDARD_NAME, and google.protobuf.Empty requests being allowed
+ # in multiple RPCs.
+ {{if not .Uncomment}}#{{end}}rpc_allow_google_protobuf_empty_requests: false
+
+ # rpc_allow_google_protobuf_empty_responses affects the behavior of the
+ # RPC_RESPONSE_STANDARD_NAME and the RPC_REQUEST_RESPONSE_UNIQUE rules.
+ #
+ # This will result in google.protobuf.Empty responses being ignored for
+ # RPC_RESPONSE_STANDARD_NAME, and google.protobuf.Empty responses being
+ # allowed in multiple RPCs.
+ {{if not .Uncomment}}#{{end}}rpc_allow_google_protobuf_empty_responses: false
+
+ # service_suffix affects the behavior of the SERVICE_SUFFIX rule.
+ #
+ # This will result in this suffix being used instead of the default "Service"
+ # suffix.
+ {{if not .Uncomment}}#{{end}}service_suffix: Service
+
+ # allow_comment_ignores allows comment-driven ignores.
+ #
+ # If this option is set, leading comments can be added within Protobuf files
+ # to ignore lint errors for certain components. If any line in a leading
+ # comment starts with "buf:lint:ignore ID", then Buf will ignore lint errors
+ # for this id. For example:
+ #
+ # syntax = "proto3";
+ #
+ # // buf:lint:ignore PACKAGE_LOWER_SNAKE_CASE
+ # // buf:lint:ignore PACKAGE_VERSION_SUFFIX
+ # package A;
+ #
+ # We do not recommend using this, as it allows individual engineers in a
+ # large organization to decide on their own lint rule exceptions. However,
+ # there are cases where this is necessarily, and we want users to be able to
+ # make informed decisions, so we provide this as an opt-in.
+ {{if not .Uncomment}}#{{end}}allow_comment_ignores: false
+
+# breaking contains the options for breaking rules.
+breaking:
+
+ # use is the list of rule categories and ids to use for
+ # buf breaking.
+ #
+ # Categories are sets of rule ids.
+ # Run buf config ls-breaking-rules --all to get a list of all rules.
+ #
+ # The union of the categories and ids will be used.
+ #
+ # As opposed to lint, where you may want to do more customization, with
+ # breaking is is generally better to only choose one of the following
+ # options:
+ #
+ # - [FILE]
+ # - [PACKAGE]
+ # - [WIRE]
+ # - [WIRE_JSON]
+ #
+ # The default is [FILE], as done below.
+ use:
+{{range $breaking_id := .BreakingConfig.Use}} - {{$breaking_id}}
+{{end}}
+ # except is the list of rule ids or categories to remove from the use
+ # list.
+ #
+ # This allows removal of specific rules from the union of rules derived
+ # from the use list of categories and ids.
+ #
+ # As opposed to lint, we generally recommend using one of the preconfigured
+ # options. Removing specific rules from breaking change detection is an
+ # advanced option.
+ {{if not .Uncomment}}#{{end}}except:
+ {{if not .Uncomment}}#{{end}} - FIELD_SAME_NAME
+
+ # ignore is the list of directories or files to ignore for all rules.
+ #
+ # All directories and file paths are specified relative to the root directory.
+ # The directory "." is not allowed - this is equivalent to ignoring
+ # everything.
+ {{if not .Uncomment}}#{{end}}ignore:
+ {{if not .Uncomment}}#{{end}} - bat
+ {{if not .Uncomment}}#{{end}} - ban/ban.proto
+
+ # ignore_only is the map from rule id or category to file or directory to
+ # ignore.
+ #
+ # All directories and file paths are specified relative to a root directory.
+ # The directory "." is not allowed - this is equivalent to using the "except"
+ # option.
+ {{if not .Uncomment}}#{{end}}ignore_only:
+ {{if not .Uncomment}}#{{end}} FIELD_NO_DELETE:
+ {{if not .Uncomment}}#{{end}} - foo/foo.proto
+ {{if not .Uncomment}}#{{end}} - bar
+ {{if not .Uncomment}}#{{end}} WIRE_JSON:
+ {{if not .Uncomment}}#{{end}} - foo
+
+ # ignore_unstable_packages results in ignoring packages with a last component
+ # that is one of the unstable forms recognized by the "PACKAGE_VERSION_SUFFIX"
+ # lint rule. The following forms will be ignored:
+ #
+ # - v\d+test.*
+ # - v\d+(alpha|beta)\d+
+ # - v\d+p\d+(alpha|beta)\d+
+ #
+ # For example, if this option is set, the following packages will be ignored:
+ #
+ # - foo.bar.v1alpha1
+ # - foo.bar.v1beta1
+ # - foo.bar.v1test
+ {{if not .Uncomment}}#{{end}}ignore_unstable_packages: false`
+)
+
+func writeConfig(
+ ctx context.Context,
+ writeBucket storage.WriteBucket,
+ options ...WriteConfigOption,
+) error {
+ writeConfigOptions := newWriteConfigOptions()
+ for _, option := range options {
+ option(writeConfigOptions)
+ }
+ if err := validateWriteConfigOptions(writeConfigOptions); err != nil {
+ return err
+ }
+ // This is the same default as the bufconfig getters.
+ version := V1Version
+ if writeConfigOptions.version != "" {
+ if err := ValidateVersion(writeConfigOptions.version); err != nil {
+ return err
+ }
+ version = writeConfigOptions.version
+ }
+ config := &Config{
+ Version: version,
+ ModuleIdentity: writeConfigOptions.moduleIdentity,
+ }
+ var breakingConfigVersion string
+ breakingConfig := writeConfigOptions.breakingConfig
+ if breakingConfig != nil {
+ breakingConfigVersion = breakingConfig.Version
+ if breakingConfigVersion != version {
+ return fmt.Errorf("version %q found for breaking config, does not match top level config version: %q", breakingConfigVersion, version)
+ }
+ config.Breaking = breakingConfig
+ }
+ var lintConfigVersion string
+ lintConfig := writeConfigOptions.lintConfig
+ if lintConfig != nil {
+ lintConfigVersion = lintConfig.Version
+ if lintConfigVersion != version {
+ return fmt.Errorf("version %q found for lint config, does not match top level config version: %q", lintConfigVersion, version)
+ }
+ config.Lint = lintConfig
+ }
+ // We should never hit this condition since we are already validating against `version`.
+ if breakingConfigVersion != lintConfigVersion {
+ return fmt.Errorf("breaking config version %q does not match lint config version %q", breakingConfigVersion, lintConfigVersion)
+ }
+ var dependencies []string
+ if len(writeConfigOptions.dependencyModuleReferences) > 0 {
+ dependencies = make([]string, len(writeConfigOptions.dependencyModuleReferences))
+ for i, dependencyModuleReference := range writeConfigOptions.dependencyModuleReferences {
+ dependencies[i] = dependencyModuleReference.String()
+ }
+ }
+ if writeConfigOptions.documentationComments {
+ // Write out config using template with document comments.
+ return writeCommentedConfig(ctx, writeBucket, config, dependencies, writeConfigOptions.uncomment)
+ }
+ // Write out raw default config without comments using externalConfig{V1, V1Beta1}
+ return writeExternalConfig(ctx, writeBucket, version, config, dependencies)
+}
+
+func writeExternalConfig(
+ ctx context.Context,
+ writeBucket storage.WriteBucket,
+ version string,
+ config *Config,
+ dependencies []string,
+) error {
+ var name string
+ if config.ModuleIdentity != nil {
+ name = config.ModuleIdentity.IdentityString()
+ }
+ breakingConfig := config.Breaking
+ lintConfig := config.Lint
+ switch version {
+ case V1Beta1Version:
+ var externalBreakingConfig bufbreakingconfig.ExternalConfigV1Beta1
+ if breakingConfig != nil {
+ externalBreakingConfig = bufbreakingconfig.ExternalConfigV1Beta1ForConfig(breakingConfig)
+ }
+ var externalLintConfig buflintconfig.ExternalConfigV1Beta1
+ if lintConfig != nil {
+ externalLintConfig = buflintconfig.ExternalConfigV1Beta1ForConfig(lintConfig)
+ }
+ externalConfig := ExternalConfigV1Beta1{
+ Name: name,
+ Version: config.Version,
+ Deps: dependencies,
+ Breaking: externalBreakingConfig,
+ Lint: externalLintConfig,
+ }
+ buffer := bytes.NewBuffer(nil)
+ encoder := yaml.NewEncoder(buffer)
+ encoder.SetIndent(2)
+ if err := encoder.Encode(externalConfig); err != nil {
+ return err
+ }
+ return storage.PutPath(ctx, writeBucket, ExternalConfigV1Beta1FilePath, buffer.Bytes())
+ case V1Version:
+ var externalBreakingConfig bufbreakingconfig.ExternalConfigV1
+ if breakingConfig != nil {
+ externalBreakingConfig = bufbreakingconfig.ExternalConfigV1ForConfig(breakingConfig)
+ }
+ var externalLintConfig buflintconfig.ExternalConfigV1
+ if lintConfig != nil {
+ externalLintConfig = buflintconfig.ExternalConfigV1ForConfig(lintConfig)
+ }
+ externalConfig := ExternalConfigV1{
+ Name: name,
+ Version: config.Version,
+ Deps: dependencies,
+ Breaking: externalBreakingConfig,
+ Lint: externalLintConfig,
+ }
+ buffer := bytes.NewBuffer(nil)
+ encoder := yaml.NewEncoder(buffer)
+ encoder.SetIndent(2)
+ if err := encoder.Encode(externalConfig); err != nil {
+ return err
+ }
+ return storage.PutPath(ctx, writeBucket, ExternalConfigV1FilePath, buffer.Bytes())
+ default:
+ return fmt.Errorf(`%s has an invalid "version %s"`, name, version)
+ }
+}
+
+type tmplParam struct {
+ Uncomment bool
+ Version string
+ Name string
+ NameUnset bool
+ Deps []string
+ DepsUnset bool
+ LintConfig *buflintconfig.Config
+ BreakingConfig *bufbreakingconfig.Config
+}
+
+func newTmplParam(config *Config, dependencies []string, uncomment bool) *tmplParam {
+ var name string
+ var nameUnset bool
+ if config.ModuleIdentity != nil {
+ name = config.ModuleIdentity.IdentityString()
+ }
+ if name == "" {
+ name = exampleName
+ nameUnset = true
+ }
+ var dependenciesUnset bool
+ if len(dependencies) == 0 {
+ dependencies = []string{
+ "buf.build/acme/petapis",
+ "buf.build/acme/pkg:alpha",
+ "buf.build/acme/paymentapis:7e8b594e68324329a7aefc6e750d18b9",
+ }
+ dependenciesUnset = true
+ }
+ return &tmplParam{
+ Uncomment: uncomment,
+ Version: config.Version,
+ Name: name,
+ NameUnset: nameUnset,
+ Deps: dependencies,
+ DepsUnset: dependenciesUnset,
+ LintConfig: config.Lint,
+ BreakingConfig: config.Breaking,
+ }
+}
+
+func writeCommentedConfig(
+ ctx context.Context,
+ writeBucket storage.WriteBucket,
+ config *Config,
+ dependencies []string,
+ uncomment bool,
+) error {
+ tmplData := tmplDocumentationCommentsData
+ tmpl, err := template.New("tmpl").Parse(tmplData)
+ if err != nil {
+ return err
+ }
+ buffer := bytes.NewBuffer(nil)
+ if err := tmpl.Execute(
+ buffer,
+ newTmplParam(
+ config,
+ dependencies,
+ uncomment,
+ ),
+ ); err != nil {
+ return err
+ }
+ return storage.PutPath(ctx, writeBucket, ExternalConfigV1FilePath, buffer.Bytes())
+}
+
+type writeConfigOptions struct {
+ documentationComments bool
+ uncomment bool
+ moduleIdentity bufmoduleref.ModuleIdentity
+ dependencyModuleReferences []bufmoduleref.ModuleReference
+ breakingConfig *bufbreakingconfig.Config
+ lintConfig *buflintconfig.Config
+ version string
+}
+
+func newWriteConfigOptions() *writeConfigOptions {
+ return &writeConfigOptions{}
+}
+
+func validateWriteConfigOptions(writeConfigOptions *writeConfigOptions) error {
+ if !writeConfigOptions.documentationComments && writeConfigOptions.uncomment {
+ return errors.New("cannot set uncomment without documentationComments for WriteConfig")
+ }
+ if writeConfigOptions.moduleIdentity == nil && len(writeConfigOptions.dependencyModuleReferences) > 0 {
+ return errors.New("cannot set deps without a name for WriteConfig")
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/bufconnect.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/bufconnect.go
new file mode 100644
index 000000000..94bafe737
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/bufconnect.go
@@ -0,0 +1,29 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufconnect provides buf-specific Connect functionality.
+package bufconnect
+
+const (
+ // AuthenticationHeader is the standard OAuth header used for authenticating
+ // a user. Ignore the misnomer.
+ AuthenticationHeader = "Authorization"
+ // AuthenticationTokenPrefix is the standard OAuth token prefix.
+ // We use it for familiarity.
+ AuthenticationTokenPrefix = "Bearer "
+ // CliVersionHeaderName is the name of the header carrying the buf CLI version.
+ CliVersionHeaderName = "buf-version"
+ // DefaultRemote is the default remote if none can be inferred from a module name.
+ DefaultRemote = "buf.build"
+)
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/errors.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/errors.go
new file mode 100644
index 000000000..45ba35160
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/errors.go
@@ -0,0 +1,49 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufconnect
+
+import "errors"
+
+// ErrAuth wraps the error returned in the auth provider to add additional context.
+type ErrAuth struct {
+ cause error
+
+ tokenEnvKey string
+}
+
+// Unwrap returns the underlying error.
+func (e *ErrAuth) Unwrap() error {
+ return e.cause
+}
+
+// Error implements the error interface and returns the error message.
+func (e *ErrAuth) Error() string {
+ if e.cause == nil {
+ return "unknown error"
+ }
+ return e.cause.Error()
+}
+
+// TokenEnvKey returns the environment variable used, if any, for authentication.
+func (e *ErrAuth) TokenEnvKey() string {
+ return e.tokenEnvKey
+}
+
+// AsAuthError uses errors.As to unwrap any error and look for an *ErrAuth.
+func AsAuthError(err error) (*ErrAuth, bool) {
+ var authErr *ErrAuth
+ ok := errors.As(err, &authErr)
+ return authErr, ok
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/interceptors.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/interceptors.go
new file mode 100644
index 000000000..60d28d95d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/interceptors.go
@@ -0,0 +1,106 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufconnect
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/netrc"
+ "github.com/bufbuild/connect-go"
+)
+
+const (
+ // tokenEnvKey is the environment variable key for the auth token
+ tokenEnvKey = "BUF_TOKEN"
+)
+
+// NewSetCLIVersionInterceptor returns a new Connect Interceptor that sets the Buf CLI version into all request headers
+func NewSetCLIVersionInterceptor(version string) connect.UnaryInterceptorFunc {
+ interceptor := func(next connect.UnaryFunc) connect.UnaryFunc {
+ return func(
+ ctx context.Context,
+ req connect.AnyRequest,
+ ) (connect.AnyResponse, error) {
+ req.Header().Set(CliVersionHeaderName, version)
+ return next(ctx, req)
+ }
+ }
+ return interceptor
+}
+
+// NewAuthorizationInterceptorProvider returns a new provider function which, when invoked, returns an interceptor
+// which will look up an auth token by address and set it into the request header. This is used for registry providers
+// where the token is looked up by the client address at the time of client construction (i.e. for clients where a
+// user is already authenticated and the token is stored in .netrc)
+//
+// Note that the interceptor returned from this provider is always applied LAST in the series of interceptors added to
+// a client.
+func NewAuthorizationInterceptorProvider(container app.EnvContainer) func(string) connect.UnaryInterceptorFunc {
+ return func(address string) connect.UnaryInterceptorFunc {
+ interceptor := func(next connect.UnaryFunc) connect.UnaryFunc {
+ return connect.UnaryFunc(func(
+ ctx context.Context,
+ req connect.AnyRequest,
+ ) (connect.AnyResponse, error) {
+ envKey := tokenEnvKey
+ token := container.Env(envKey)
+ if token == "" {
+ envKey = ""
+ machine, err := netrc.GetMachineForName(container, address)
+ if err != nil {
+ return nil, fmt.Errorf("failed to read server password from netrc: %w", err)
+ }
+ if machine != nil {
+ token = machine.Password()
+ }
+ }
+ if token != "" {
+ req.Header().Set(AuthenticationHeader, AuthenticationTokenPrefix+token)
+ }
+ response, err := next(ctx, req)
+ if err != nil {
+ err = &ErrAuth{cause: err, tokenEnvKey: envKey}
+ }
+ return response, err
+ })
+ }
+ return interceptor
+ }
+}
+
+// NewAuthorizationInterceptorProviderWithToken returns a new provider function which, when invoked, returns an
+// interceptor which sets the provided auth token into the request header. This is used for registry providers where
+// the token is known at provider creation (i.e. when logging in and explicitly pasting a token into stdin
+//
+// Note that the interceptor returned from this provider is always applied LAST in the series of interceptors added to
+// a client.
+func NewAuthorizationInterceptorProviderWithToken(token string) func(string) connect.UnaryInterceptorFunc {
+ return func(address string) connect.UnaryInterceptorFunc {
+ interceptor := func(next connect.UnaryFunc) connect.UnaryFunc {
+ return connect.UnaryFunc(func(
+ ctx context.Context,
+ req connect.AnyRequest,
+ ) (connect.AnyResponse, error) {
+ if token != "" {
+ req.Header().Set(AuthenticationHeader, AuthenticationTokenPrefix+token)
+ }
+ return next(ctx, req)
+ })
+ }
+ return interceptor
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/usage.gen.go
new file mode 100644
index 000000000..a1c56815c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufconnect/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufconnect
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimage.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimage.go
new file mode 100644
index 000000000..564854362
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimage.go
@@ -0,0 +1,489 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimage
+
+import (
+ "fmt"
+ "sort"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/protodescriptor"
+ "github.com/bufbuild/buf/private/pkg/protoencoding"
+ "google.golang.org/protobuf/types/descriptorpb"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+// ImageFile is a Protobuf file within an image.
+type ImageFile interface {
+ bufmoduleref.FileInfo
+ // Proto is the backing *descriptorpb.FileDescriptorProto for this File.
+ //
+ // FileDescriptor should be preferred to Proto. We keep this method around
+ // because we have code that does modification to the ImageFile via this.
+ //
+ // This will never be nil.
+ // The value Path() is equal to Proto.GetName() .
+ Proto() *descriptorpb.FileDescriptorProto
+ // FileDescriptor is the backing FileDescriptor for this File.
+ //
+ // This will never be nil.
+ // The value Path() is equal to FileDescriptor.GetName() .
+ FileDescriptor() protodescriptor.FileDescriptor
+ // IsSyntaxUnspecified will be true if the syntax was not explicitly specified.
+ IsSyntaxUnspecified() bool
+ // UnusedDependencyIndexes returns the indexes of the unused dependencies within
+ // FileDescriptor.GetDependency().
+ //
+ // All indexes will be valid.
+ // Will return nil if empty.
+ UnusedDependencyIndexes() []int32
+
+ withIsImport(isImport bool) ImageFile
+ isImageFile()
+}
+
+// NewImageFile returns a new ImageFile.
+//
+// If externalPath is empty, path is used.
+//
+// TODO: moduleIdentity and commit should be options since they are optional.
+func NewImageFile(
+ fileDescriptor protodescriptor.FileDescriptor,
+ moduleIdentity bufmoduleref.ModuleIdentity,
+ commit string,
+ externalPath string,
+ isImport bool,
+ isSyntaxUnspecified bool,
+ unusedDependencyIndexes []int32,
+) (ImageFile, error) {
+ return newImageFile(
+ fileDescriptor,
+ moduleIdentity,
+ commit,
+ externalPath,
+ isImport,
+ isSyntaxUnspecified,
+ unusedDependencyIndexes,
+ )
+}
+
+// Image is a buf image.
+type Image interface {
+ // Files are the files that comprise the image.
+ //
+ // This contains all files, including imports if available.
+ // The returned files are in correct DAG order.
+ Files() []ImageFile
+ // GetFile gets the file for the root relative file path.
+ //
+ // If the file does not exist, nil is returned.
+ // The path is expected to be normalized and validated.
+ // Note that all values of GetDependency() can be used here.
+ GetFile(path string) ImageFile
+ isImage()
+}
+
+// NewImage returns a new Image for the given ImageFiles.
+//
+// The input ImageFiles are expected to be in correct DAG order!
+// TODO: Consider checking the above, and if not, reordering the Files.
+// If imageFiles is empty, returns error
+func NewImage(imageFiles []ImageFile) (Image, error) {
+ return newImage(imageFiles, false)
+}
+
+// NewMultiImage returns a new Image for the given Images.
+//
+// Reorders the ImageFiles to be in DAG order.
+// Duplicates cannot exist across the Images.
+func NewMultiImage(images ...Image) (Image, error) {
+ switch len(images) {
+ case 0:
+ return nil, nil
+ case 1:
+ return images[0], nil
+ default:
+ var imageFiles []ImageFile
+ for _, image := range images {
+ imageFiles = append(imageFiles, image.Files()...)
+ }
+ return newImage(imageFiles, true)
+ }
+}
+
+// MergeImages returns a new Image for the given Images. ImageFiles
+// treated as non-imports in at least one of the given Images will
+// be treated as non-imports in the returned Image. The first non-import
+// version of a file will be used in the result.
+//
+// Reorders the ImageFiles to be in DAG order.
+// Duplicates can exist across the Images, but only if duplicates are non-imports.
+func MergeImages(images ...Image) (Image, error) {
+ switch len(images) {
+ case 0:
+ return nil, nil
+ case 1:
+ return images[0], nil
+ default:
+ var paths []string
+ imageFileSet := make(map[string]ImageFile)
+ for _, image := range images {
+ for _, currentImageFile := range image.Files() {
+ storedImageFile, ok := imageFileSet[currentImageFile.Path()]
+ if !ok {
+ imageFileSet[currentImageFile.Path()] = currentImageFile
+ paths = append(paths, currentImageFile.Path())
+ continue
+ }
+ if !storedImageFile.IsImport() && !currentImageFile.IsImport() {
+ return nil, fmt.Errorf("%s is a non-import in multiple images", currentImageFile.Path())
+ }
+ if storedImageFile.IsImport() && !currentImageFile.IsImport() {
+ imageFileSet[currentImageFile.Path()] = currentImageFile
+ }
+ }
+ }
+ // We need to preserve order for deterministic results, so we add
+ // the files in the order they're given, but base our selection
+ // on the imageFileSet.
+ imageFiles := make([]ImageFile, 0, len(imageFileSet))
+ for _, path := range paths {
+ imageFiles = append(imageFiles, imageFileSet[path] /* Guaranteed to exist */)
+ }
+ return newImage(imageFiles, true)
+ }
+}
+
+// NewImageForProto returns a new Image for the given proto Image.
+//
+// The input Files are expected to be in correct DAG order!
+// TODO: Consider checking the above, and if not, reordering the Files.
+//
+// TODO: do we want to add the ability to do external path resolution here?
+func NewImageForProto(protoImage *imagev1.Image, options ...NewImageForProtoOption) (Image, error) {
+ var newImageOptions newImageForProtoOptions
+ for _, option := range options {
+ option(&newImageOptions)
+ }
+ if !newImageOptions.noReparse {
+ if err := reparseImageProto(protoImage); err != nil {
+ return nil, err
+ }
+ }
+ if err := validateProtoImage(protoImage); err != nil {
+ return nil, err
+ }
+ imageFiles := make([]ImageFile, len(protoImage.File))
+ for i, protoImageFile := range protoImage.File {
+ var isImport bool
+ var isSyntaxUnspecified bool
+ var unusedDependencyIndexes []int32
+ var moduleIdentity bufmoduleref.ModuleIdentity
+ var commit string
+ var err error
+ if protoImageFileExtension := protoImageFile.GetBufExtension(); protoImageFileExtension != nil {
+ isImport = protoImageFileExtension.GetIsImport()
+ isSyntaxUnspecified = protoImageFileExtension.GetIsSyntaxUnspecified()
+ unusedDependencyIndexes = protoImageFileExtension.GetUnusedDependency()
+ if protoModuleInfo := protoImageFileExtension.GetModuleInfo(); protoModuleInfo != nil {
+ if protoModuleName := protoModuleInfo.GetName(); protoModuleName != nil {
+ moduleIdentity, err = bufmoduleref.NewModuleIdentity(
+ protoModuleName.GetRemote(),
+ protoModuleName.GetOwner(),
+ protoModuleName.GetRepository(),
+ )
+ if err != nil {
+ return nil, err
+ }
+ // we only want to set this if there is a module name
+ commit = protoModuleInfo.GetCommit()
+ }
+ }
+ }
+ imageFile, err := NewImageFile(
+ protoImageFile,
+ moduleIdentity,
+ commit,
+ protoImageFile.GetName(),
+ isImport,
+ isSyntaxUnspecified,
+ unusedDependencyIndexes,
+ )
+ if err != nil {
+ return nil, err
+ }
+ imageFiles[i] = imageFile
+ }
+ return NewImage(imageFiles)
+}
+
+// NewImageForCodeGeneratorRequest returns a new Image from a given CodeGeneratorRequest.
+//
+// The input Files are expected to be in correct DAG order!
+// TODO: Consider checking the above, and if not, reordering the Files.
+func NewImageForCodeGeneratorRequest(request *pluginpb.CodeGeneratorRequest, options ...NewImageForProtoOption) (Image, error) {
+ if err := protodescriptor.ValidateCodeGeneratorRequestExceptFileDescriptorProtos(request); err != nil {
+ return nil, err
+ }
+ protoImageFiles := make([]*imagev1.ImageFile, len(request.GetProtoFile()))
+ for i, fileDescriptorProto := range request.GetProtoFile() {
+ // we filter whether something is an import or not in ImageWithOnlyPaths
+ // we cannot determine if the syntax was unset
+ protoImageFiles[i] = fileDescriptorProtoToProtoImageFile(fileDescriptorProto, false, false, nil, nil, "")
+ }
+ image, err := NewImageForProto(
+ &imagev1.Image{
+ File: protoImageFiles,
+ },
+ options...,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return ImageWithOnlyPaths(
+ image,
+ request.GetFileToGenerate(),
+ nil,
+ )
+}
+
+// NewImageForProtoOption is an option for use with NewImageForProto.
+type NewImageForProtoOption func(*newImageForProtoOptions)
+
+// WithNoReparse instructs NewImageForProto to skip the reparse step. The reparse
+// step is usually needed when unmarshalling the image from bytes. It reconstitutes
+// custom options, from unrecognized bytes to known extension fields.
+func WithNoReparse() NewImageForProtoOption {
+ return func(options *newImageForProtoOptions) {
+ options.noReparse = true
+ }
+}
+
+// ImageWithoutImports returns a copy of the Image without imports.
+//
+// The backing Files are not copied.
+func ImageWithoutImports(image Image) Image {
+ imageFiles := image.Files()
+ newImageFiles := make([]ImageFile, 0, len(imageFiles))
+ for _, imageFile := range imageFiles {
+ if !imageFile.IsImport() {
+ newImageFiles = append(newImageFiles, imageFile)
+ }
+ }
+ return newImageNoValidate(newImageFiles)
+}
+
+// ImageWithOnlyPaths returns a copy of the Image that only includes the files
+// with the given root relative file paths or directories.
+//
+// Note that paths can be either files or directories - whether or not a path
+// is included is a result of normalpath.EqualsOrContainsPath.
+//
+// If a root relative file path does not exist, this errors.
+func ImageWithOnlyPaths(
+ image Image,
+ paths []string,
+ excludePaths []string,
+) (Image, error) {
+ return imageWithOnlyPaths(image, paths, excludePaths, false)
+}
+
+// ImageWithOnlyPathsAllowNotExist returns a copy of the Image that only includes the files
+// with the given root relative file paths.
+//
+// Note that paths can be either files or directories - whether or not a path
+// is included is a result of normalpath.EqualsOrContainsPath.
+//
+// If a root relative file path does not exist, this skips this path.
+func ImageWithOnlyPathsAllowNotExist(
+ image Image,
+ paths []string,
+ excludePaths []string,
+) (Image, error) {
+ return imageWithOnlyPaths(image, paths, excludePaths, true)
+}
+
+// ImageByDir returns multiple images that have non-imports split
+// by directory.
+//
+// That is, each Image will only contain a single directory's files
+// as it's non-imports, along with all required imports for the
+// files in that directory.
+func ImageByDir(image Image) ([]Image, error) {
+ imageFiles := image.Files()
+ paths := make([]string, 0, len(imageFiles))
+ for _, imageFile := range imageFiles {
+ if !imageFile.IsImport() {
+ paths = append(paths, imageFile.Path())
+ }
+ }
+ dirToPaths := normalpath.ByDir(paths...)
+ // we need this to produce a deterministic order of the returned Images
+ dirs := make([]string, 0, len(dirToPaths))
+ for dir := range dirToPaths {
+ dirs = append(dirs, dir)
+ }
+ sort.Strings(dirs)
+ newImages := make([]Image, 0, len(dirToPaths))
+ for _, dir := range dirs {
+ paths, ok := dirToPaths[dir]
+ if !ok {
+ // this should never happen
+ return nil, fmt.Errorf("no dir for %q in dirToPaths", dir)
+ }
+ newImage, err := ImageWithOnlyPaths(image, paths, nil)
+ if err != nil {
+ return nil, err
+ }
+ newImages = append(newImages, newImage)
+ }
+ return newImages, nil
+}
+
+// ImageToProtoImage returns a new ProtoImage for the Image.
+func ImageToProtoImage(image Image) *imagev1.Image {
+ imageFiles := image.Files()
+ protoImage := &imagev1.Image{
+ File: make([]*imagev1.ImageFile, len(imageFiles)),
+ }
+ for i, imageFile := range imageFiles {
+ protoImage.File[i] = imageFileToProtoImageFile(imageFile)
+ }
+ return protoImage
+}
+
+// ImageToFileDescriptorSet returns a new FileDescriptorSet for the Image.
+func ImageToFileDescriptorSet(image Image) *descriptorpb.FileDescriptorSet {
+ return protodescriptor.FileDescriptorSetForFileDescriptors(ImageToFileDescriptors(image)...)
+}
+
+// ImageToFileDescriptors returns the FileDescriptors for the Image.
+func ImageToFileDescriptors(image Image) []protodescriptor.FileDescriptor {
+ return imageFilesToFileDescriptors(image.Files())
+}
+
+// ImageToFileDescriptorProtos returns the FileDescriptorProtos for the Image.
+func ImageToFileDescriptorProtos(image Image) []*descriptorpb.FileDescriptorProto {
+ return imageFilesToFileDescriptorProtos(image.Files())
+}
+
+// ImageToCodeGeneratorRequest returns a new CodeGeneratorRequest for the Image.
+//
+// All non-imports are added as files to generate.
+// If includeImports is set, all non-well-known-type imports are also added as files to generate.
+// If includeWellKnownTypes is set, well-known-type imports are also added as files to generate.
+// includeWellKnownTypes has no effect if includeImports is not set.
+func ImageToCodeGeneratorRequest(
+ image Image,
+ parameter string,
+ compilerVersion *pluginpb.Version,
+ includeImports bool,
+ includeWellKnownTypes bool,
+) *pluginpb.CodeGeneratorRequest {
+ return imageToCodeGeneratorRequest(
+ image,
+ parameter,
+ compilerVersion,
+ includeImports,
+ includeWellKnownTypes,
+ nil,
+ nil,
+ )
+}
+
+// ImagesToCodeGeneratorRequests converts the Images to CodeGeneratorRequests.
+//
+// All non-imports are added as files to generate.
+// If includeImports is set, all non-well-known-type imports are also added as files to generate.
+// If includeImports is set, only one CodeGeneratorRequest will contain any given file as a FileToGenerate.
+// If includeWellKnownTypes is set, well-known-type imports are also added as files to generate.
+// includeWellKnownTypes has no effect if includeImports is not set.
+func ImagesToCodeGeneratorRequests(
+ images []Image,
+ parameter string,
+ compilerVersion *pluginpb.Version,
+ includeImports bool,
+ includeWellKnownTypes bool,
+) []*pluginpb.CodeGeneratorRequest {
+ requests := make([]*pluginpb.CodeGeneratorRequest, len(images))
+ // alreadyUsedPaths is a map of paths that have already been added to an image.
+ //
+ // We track this if includeImports is set, so that when we find an import, we can
+ // see if the import was already added to a CodeGeneratorRequest via another Image
+ // in the Image slice. If the import was already added, we do not add duplicates
+ // across CodeGeneratorRequests.
+ var alreadyUsedPaths map[string]struct{}
+ // nonImportPaths is a map of non-import paths.
+ //
+ // We track this if includeImports is set. If we find a non-import file in Image A
+ // and this file is an import in Image B, the file will have already been added to
+ // a CodeGeneratorRequest via Image A, so do not add the duplicate to any other
+ // CodeGeneratorRequest.
+ var nonImportPaths map[string]struct{}
+ if includeImports {
+ // We don't need to track these if includeImports is false, so we only populate
+ // the maps if includeImports is true. If includeImports is false, only non-imports
+ // will be added to each CodeGeneratorRequest, so figuring out whether or not
+ // we should add a given import to a given CodeGeneratorRequest is unnecessary.
+ //
+ // imageToCodeGeneratorRequest checks if these maps are nil before every access.
+ alreadyUsedPaths = make(map[string]struct{})
+ nonImportPaths = make(map[string]struct{})
+ for _, image := range images {
+ for _, imageFile := range image.Files() {
+ if !imageFile.IsImport() {
+ nonImportPaths[imageFile.Path()] = struct{}{}
+ }
+ }
+ }
+ }
+ for i, image := range images {
+ requests[i] = imageToCodeGeneratorRequest(
+ image,
+ parameter,
+ compilerVersion,
+ includeImports,
+ includeWellKnownTypes,
+ alreadyUsedPaths,
+ nonImportPaths,
+ )
+ }
+ return requests
+}
+
+// ProtoImageToFileDescriptors returns the FileDescriptors for the proto Image.
+func ProtoImageToFileDescriptors(protoImage *imagev1.Image) []protodescriptor.FileDescriptor {
+ return protoImageFilesToFileDescriptors(protoImage.File)
+}
+
+type newImageForProtoOptions struct {
+ noReparse bool
+}
+
+func reparseImageProto(protoImage *imagev1.Image) error {
+ // TODO right now, NewResolver sets AllowUnresolvable to true all the time
+ // we want to make this into a check, and we verify if we need this for the individual command
+ resolver := protoencoding.NewLazyResolver(
+ ProtoImageToFileDescriptors(
+ protoImage,
+ )...,
+ )
+ if err := protoencoding.ReparseUnrecognized(resolver, protoImage.ProtoReflect()); err != nil {
+ return fmt.Errorf("could not reparse image: %v", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild/bufimagebuild.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild/bufimagebuild.go
new file mode 100644
index 000000000..a8b77884c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild/bufimagebuild.go
@@ -0,0 +1,57 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagebuild
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "go.uber.org/zap"
+)
+
+// Builder builds Protobuf files into Images.
+type Builder interface {
+ // Build runs compilation.
+ //
+ // The FileRefs are assumed to have been created by a FileRefProvider, that is
+ // they are unique relative to the roots.
+ //
+ // If an error is returned, it is a system error.
+ // Only one of Image and FileAnnotations will be returned.
+ //
+ // FileAnnotations will use external file paths.
+ Build(
+ ctx context.Context,
+ moduleFileSet bufmodule.ModuleFileSet,
+ options ...BuildOption,
+ ) (bufimage.Image, []bufanalysis.FileAnnotation, error)
+}
+
+// NewBuilder returns a new Builder.
+func NewBuilder(logger *zap.Logger) Builder {
+ return newBuilder(logger)
+}
+
+// BuildOption is an option for Build.
+type BuildOption func(*buildOptions)
+
+// WithExcludeSourceCodeInfo returns a BuildOption that excludes sourceCodeInfo.
+func WithExcludeSourceCodeInfo() BuildOption {
+ return func(buildOptions *buildOptions) {
+ buildOptions.excludeSourceCodeInfo = true
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild/builder.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild/builder.go
new file mode 100644
index 000000000..144b73b8e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild/builder.go
@@ -0,0 +1,449 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagebuild
+
+import (
+ "context"
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleprotocompile"
+ "github.com/bufbuild/buf/private/pkg/thread"
+ "github.com/bufbuild/protocompile"
+ "github.com/bufbuild/protocompile/linker"
+ "github.com/bufbuild/protocompile/parser"
+ "github.com/bufbuild/protocompile/protoutil"
+ "github.com/bufbuild/protocompile/reporter"
+ "go.opencensus.io/trace"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/reflect/protoreflect"
+)
+
+type builder struct {
+ logger *zap.Logger
+}
+
+func newBuilder(logger *zap.Logger) *builder {
+ return &builder{
+ logger: logger.Named("bufimagebuild"),
+ }
+}
+
+func (b *builder) Build(
+ ctx context.Context,
+ moduleFileSet bufmodule.ModuleFileSet,
+ options ...BuildOption,
+) (bufimage.Image, []bufanalysis.FileAnnotation, error) {
+ buildOptions := newBuildOptions()
+ for _, option := range options {
+ option(buildOptions)
+ }
+ return b.build(
+ ctx,
+ moduleFileSet,
+ buildOptions.excludeSourceCodeInfo,
+ )
+}
+
+func (b *builder) build(
+ ctx context.Context,
+ moduleFileSet bufmodule.ModuleFileSet,
+ excludeSourceCodeInfo bool,
+) (bufimage.Image, []bufanalysis.FileAnnotation, error) {
+ ctx, span := trace.StartSpan(ctx, "build")
+ defer span.End()
+
+ parserAccessorHandler := bufmoduleprotocompile.NewParserAccessorHandler(ctx, moduleFileSet)
+ targetFileInfos, err := moduleFileSet.TargetFileInfos(ctx)
+ if err != nil {
+ return nil, nil, err
+ }
+ if len(targetFileInfos) == 0 {
+ return nil, nil, errors.New("no input files specified")
+ }
+ paths := make([]string, len(targetFileInfos))
+ for i, targetFileInfo := range targetFileInfos {
+ paths[i] = targetFileInfo.Path()
+ }
+
+ buildResult := getBuildResult(
+ ctx,
+ parserAccessorHandler,
+ paths,
+ excludeSourceCodeInfo,
+ )
+ if buildResult.Err != nil {
+ return nil, nil, buildResult.Err
+ }
+ if len(buildResult.FileAnnotations) > 0 {
+ return nil, bufanalysis.DeduplicateAndSortFileAnnotations(buildResult.FileAnnotations), nil
+ }
+
+ fileDescriptors, err := checkAndSortFileDescriptors(buildResult.FileDescriptors, paths)
+ if err != nil {
+ return nil, nil, err
+ }
+ image, err := getImage(
+ ctx,
+ excludeSourceCodeInfo,
+ fileDescriptors,
+ parserAccessorHandler,
+ buildResult.SyntaxUnspecifiedFilenames,
+ buildResult.FilenameToUnusedDependencyFilenames,
+ )
+ if err != nil {
+ return nil, nil, err
+ }
+ return image, nil, nil
+}
+
+func getBuildResult(
+ ctx context.Context,
+ parserAccessorHandler bufmoduleprotocompile.ParserAccessorHandler,
+ paths []string,
+ excludeSourceCodeInfo bool,
+) *buildResult {
+ var errorsWithPos []reporter.ErrorWithPos
+ var warningErrorsWithPos []reporter.ErrorWithPos
+ sourceInfoMode := protocompile.SourceInfoStandard
+ if excludeSourceCodeInfo {
+ sourceInfoMode = protocompile.SourceInfoNone
+ }
+ compiler := protocompile.Compiler{
+ MaxParallelism: thread.Parallelism(),
+ SourceInfoMode: sourceInfoMode,
+ Resolver: &protocompile.SourceResolver{Accessor: parserAccessorHandler.Open},
+ Reporter: reporter.NewReporter(
+ func(errorWithPos reporter.ErrorWithPos) error {
+ errorsWithPos = append(errorsWithPos, errorWithPos)
+ return nil
+ },
+ func(errorWithPos reporter.ErrorWithPos) {
+ warningErrorsWithPos = append(warningErrorsWithPos, errorWithPos)
+ },
+ ),
+ }
+ // fileDescriptors are in the same order as paths per the documentation
+ compiledFiles, err := compiler.Compile(ctx, paths...)
+ if err != nil {
+ if err == reporter.ErrInvalidSource {
+ if len(errorsWithPos) == 0 {
+ return newBuildResult(
+ nil,
+ nil,
+ nil,
+ nil,
+ errors.New("got invalid source error from parse but no errors reported"),
+ )
+ }
+ fileAnnotations, err := bufmoduleprotocompile.GetFileAnnotations(
+ ctx,
+ parserAccessorHandler,
+ errorsWithPos,
+ )
+ if err != nil {
+ return newBuildResult(nil, nil, nil, nil, err)
+ }
+ return newBuildResult(nil, nil, nil, fileAnnotations, nil)
+ }
+ if errorWithPos, ok := err.(reporter.ErrorWithPos); ok {
+ fileAnnotations, err := bufmoduleprotocompile.GetFileAnnotations(
+ ctx,
+ parserAccessorHandler,
+ []reporter.ErrorWithPos{errorWithPos},
+ )
+ if err != nil {
+ return newBuildResult(nil, nil, nil, nil, err)
+ }
+ return newBuildResult(nil, nil, nil, fileAnnotations, nil)
+ }
+ return newBuildResult(nil, nil, nil, nil, err)
+ } else if len(errorsWithPos) > 0 {
+ // https://github.com/jhump/protoreflect/pull/331
+ return newBuildResult(
+ nil,
+ nil,
+ nil,
+ nil,
+ errors.New("got no error from parse but errors reported"),
+ )
+ }
+ if len(compiledFiles) != len(paths) {
+ return newBuildResult(
+ nil,
+ nil,
+ nil,
+ nil,
+ fmt.Errorf("expected FileDescriptors to be of length %d but was %d", len(paths), len(compiledFiles)),
+ )
+ }
+ for i, fileDescriptor := range compiledFiles {
+ path := paths[i]
+ filename := fileDescriptor.Path()
+ // doing another rough verification
+ // NO LONGER NEED TO DO SUFFIX SINCE WE KNOW THE ROOT FILE NAME
+ if path != filename {
+ return newBuildResult(
+ nil,
+ nil,
+ nil,
+ nil,
+ fmt.Errorf("expected fileDescriptor name %s to be a equal to %s", filename, path),
+ )
+ }
+ }
+ syntaxUnspecifiedFilenames := make(map[string]struct{})
+ filenameToUnusedDependencyFilenames := make(map[string]map[string]struct{})
+ for _, warningErrorWithPos := range warningErrorsWithPos {
+ maybeAddSyntaxUnspecified(syntaxUnspecifiedFilenames, warningErrorWithPos)
+ maybeAddUnusedImport(filenameToUnusedDependencyFilenames, warningErrorWithPos)
+ }
+ fileDescriptors := make([]protoreflect.FileDescriptor, len(compiledFiles))
+ for i := range compiledFiles {
+ fileDescriptors[i] = compiledFiles[i]
+ }
+ return newBuildResult(
+ fileDescriptors,
+ syntaxUnspecifiedFilenames,
+ filenameToUnusedDependencyFilenames,
+ nil,
+ nil,
+ )
+}
+
+// We need to sort the FileDescriptors as they may/probably are out of order
+// relative to input order after concurrent builds. This mimics the output
+// order of protoc.
+func checkAndSortFileDescriptors(
+ fileDescriptors []protoreflect.FileDescriptor,
+ rootRelFilePaths []string,
+) ([]protoreflect.FileDescriptor, error) {
+ if len(fileDescriptors) != len(rootRelFilePaths) {
+ return nil, fmt.Errorf("rootRelFilePath length was %d but FileDescriptor length was %d", len(rootRelFilePaths), len(fileDescriptors))
+ }
+ nameToFileDescriptor := make(map[string]protoreflect.FileDescriptor, len(fileDescriptors))
+ for _, fileDescriptor := range fileDescriptors {
+ name := fileDescriptor.Path()
+ if name == "" {
+ return nil, errors.New("no name on FileDescriptor")
+ }
+ if _, ok := nameToFileDescriptor[name]; ok {
+ return nil, fmt.Errorf("duplicate FileDescriptor: %s", name)
+ }
+ nameToFileDescriptor[name] = fileDescriptor
+ }
+ // We now know that all FileDescriptors had unique names and the number of FileDescriptors
+ // is equal to the number of rootRelFilePaths. We also verified earlier that rootRelFilePaths
+ // has only unique values. Now we can put them in order.
+ sortedFileDescriptors := make([]protoreflect.FileDescriptor, 0, len(fileDescriptors))
+ for _, rootRelFilePath := range rootRelFilePaths {
+ fileDescriptor, ok := nameToFileDescriptor[rootRelFilePath]
+ if !ok {
+ return nil, fmt.Errorf("no FileDescriptor for rootRelFilePath: %q", rootRelFilePath)
+ }
+ sortedFileDescriptors = append(sortedFileDescriptors, fileDescriptor)
+ }
+ return sortedFileDescriptors, nil
+}
+
+// getImage gets the Image for the protoreflect.FileDescriptors.
+//
+// This mimics protoc's output order.
+// This assumes checkAndSortFileDescriptors was called.
+func getImage(
+ ctx context.Context,
+ excludeSourceCodeInfo bool,
+ sortedFileDescriptors []protoreflect.FileDescriptor,
+ parserAccessorHandler bufmoduleprotocompile.ParserAccessorHandler,
+ syntaxUnspecifiedFilenames map[string]struct{},
+ filenameToUnusedDependencyFilenames map[string]map[string]struct{},
+) (bufimage.Image, error) {
+ ctx, span := trace.StartSpan(ctx, "get_image")
+ defer span.End()
+
+ // if we aren't including imports, then we need a set of file names that
+ // are included so we can create a topologically sorted list w/out
+ // including imports that should not be present.
+ //
+ // if we are including imports, then we need to know what filenames
+ // are imports are what filenames are not
+ // all input protoreflect.FileDescriptors are not imports, we derive the imports
+ // from GetDependencies.
+ nonImportFilenames := map[string]struct{}{}
+ for _, fileDescriptor := range sortedFileDescriptors {
+ nonImportFilenames[fileDescriptor.Path()] = struct{}{}
+ }
+
+ var imageFiles []bufimage.ImageFile
+ var err error
+ alreadySeen := map[string]struct{}{}
+ for _, fileDescriptor := range sortedFileDescriptors {
+ imageFiles, err = getImageFilesRec(
+ ctx,
+ excludeSourceCodeInfo,
+ fileDescriptor,
+ parserAccessorHandler,
+ syntaxUnspecifiedFilenames,
+ filenameToUnusedDependencyFilenames,
+ alreadySeen,
+ nonImportFilenames,
+ imageFiles,
+ )
+ if err != nil {
+ return nil, err
+ }
+ }
+ return bufimage.NewImage(imageFiles)
+}
+
+func getImageFilesRec(
+ ctx context.Context,
+ excludeSourceCodeInfo bool,
+ fileDescriptor protoreflect.FileDescriptor,
+ parserAccessorHandler bufmoduleprotocompile.ParserAccessorHandler,
+ syntaxUnspecifiedFilenames map[string]struct{},
+ filenameToUnusedDependencyFilenames map[string]map[string]struct{},
+ alreadySeen map[string]struct{},
+ nonImportFilenames map[string]struct{},
+ imageFiles []bufimage.ImageFile,
+) ([]bufimage.ImageFile, error) {
+ if fileDescriptor == nil {
+ return nil, errors.New("nil FileDescriptor")
+ }
+ path := fileDescriptor.Path()
+ if _, ok := alreadySeen[path]; ok {
+ return imageFiles, nil
+ }
+ alreadySeen[path] = struct{}{}
+
+ unusedDependencyFilenames, ok := filenameToUnusedDependencyFilenames[path]
+ var unusedDependencyIndexes []int32
+ if ok {
+ unusedDependencyIndexes = make([]int32, 0, len(unusedDependencyFilenames))
+ }
+ var err error
+ for i := 0; i < fileDescriptor.Imports().Len(); i++ {
+ dependency := fileDescriptor.Imports().Get(i).FileDescriptor
+ if unusedDependencyFilenames != nil {
+ if _, ok := unusedDependencyFilenames[dependency.Path()]; ok {
+ unusedDependencyIndexes = append(
+ unusedDependencyIndexes,
+ int32(i),
+ )
+ }
+ }
+ imageFiles, err = getImageFilesRec(
+ ctx,
+ excludeSourceCodeInfo,
+ dependency,
+ parserAccessorHandler,
+ syntaxUnspecifiedFilenames,
+ filenameToUnusedDependencyFilenames,
+ alreadySeen,
+ nonImportFilenames,
+ imageFiles,
+ )
+ if err != nil {
+ return nil, err
+ }
+ }
+
+ fileDescriptorProto := protoutil.ProtoFromFileDescriptor(fileDescriptor)
+ if fileDescriptorProto == nil {
+ return nil, errors.New("nil FileDescriptorProto")
+ }
+ if excludeSourceCodeInfo {
+ // need to do this anyways as Parser does not respect this for FileDescriptorProtos
+ fileDescriptorProto.SourceCodeInfo = nil
+ }
+ _, isNotImport := nonImportFilenames[path]
+ _, syntaxUnspecified := syntaxUnspecifiedFilenames[path]
+ imageFile, err := bufimage.NewImageFile(
+ fileDescriptorProto,
+ parserAccessorHandler.ModuleIdentity(path),
+ parserAccessorHandler.Commit(path),
+ // if empty, defaults to path
+ parserAccessorHandler.ExternalPath(path),
+ !isNotImport,
+ syntaxUnspecified,
+ unusedDependencyIndexes,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return append(imageFiles, imageFile), nil
+}
+
+func maybeAddSyntaxUnspecified(
+ syntaxUnspecifiedFilenames map[string]struct{},
+ errorWithPos reporter.ErrorWithPos,
+) {
+ if errorWithPos.Unwrap() != parser.ErrNoSyntax {
+ return
+ }
+ syntaxUnspecifiedFilenames[errorWithPos.GetPosition().Filename] = struct{}{}
+}
+
+func maybeAddUnusedImport(
+ filenameToUnusedImportFilenames map[string]map[string]struct{},
+ errorWithPos reporter.ErrorWithPos,
+) {
+ errorUnusedImport, ok := errorWithPos.Unwrap().(linker.ErrorUnusedImport)
+ if !ok {
+ return
+ }
+ pos := errorWithPos.GetPosition()
+ unusedImportFilenames, ok := filenameToUnusedImportFilenames[pos.Filename]
+ if !ok {
+ unusedImportFilenames = make(map[string]struct{})
+ filenameToUnusedImportFilenames[pos.Filename] = unusedImportFilenames
+ }
+ unusedImportFilenames[errorUnusedImport.UnusedImport()] = struct{}{}
+}
+
+type buildResult struct {
+ FileDescriptors []protoreflect.FileDescriptor
+ SyntaxUnspecifiedFilenames map[string]struct{}
+ FilenameToUnusedDependencyFilenames map[string]map[string]struct{}
+ FileAnnotations []bufanalysis.FileAnnotation
+ Err error
+}
+
+func newBuildResult(
+ fileDescriptors []protoreflect.FileDescriptor,
+ syntaxUnspecifiedFilenames map[string]struct{},
+ filenameToUnusedDependencyFilenames map[string]map[string]struct{},
+ fileAnnotations []bufanalysis.FileAnnotation,
+ err error,
+) *buildResult {
+ return &buildResult{
+ FileDescriptors: fileDescriptors,
+ SyntaxUnspecifiedFilenames: syntaxUnspecifiedFilenames,
+ FilenameToUnusedDependencyFilenames: filenameToUnusedDependencyFilenames,
+ FileAnnotations: fileAnnotations,
+ Err: err,
+ }
+}
+
+type buildOptions struct {
+ excludeSourceCodeInfo bool
+}
+
+func newBuildOptions() *buildOptions {
+ return &buildOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild/usage.gen.go
new file mode 100644
index 000000000..e84159dfd
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagebuild/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufimagebuild
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/bufimagemodify.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/bufimagemodify.go
new file mode 100644
index 000000000..41d760d36
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/bufimagemodify.go
@@ -0,0 +1,333 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+ "fmt"
+ "path"
+ "strconv"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/data/datawkt"
+ "github.com/bufbuild/buf/private/pkg/protoversion"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// Modifier modifies Images.
+type Modifier interface {
+ // Modify modifies the Image.
+ Modify(context.Context, bufimage.Image) error
+}
+
+// NewMultiModifier returns a new Modifier for the given Modifiers.
+func NewMultiModifier(modifiers ...Modifier) Modifier {
+ switch len(modifiers) {
+ case 0:
+ return nil
+ case 1:
+ return modifiers[0]
+ default:
+ return newMultiModifier(modifiers)
+ }
+}
+
+// ModifierFunc is a convenience type that implements the Modifier interface.
+type ModifierFunc func(context.Context, bufimage.Image) error
+
+// Modify invokes the ModifierFunc with the given context and image.
+func (m ModifierFunc) Modify(ctx context.Context, image bufimage.Image) error {
+ return m(ctx, image)
+}
+
+// Sweeper is used to mark-and-sweep SourceCodeInfo_Locations from images.
+type Sweeper interface {
+ // Sweep implements the ModifierFunc signature so that the Sweeper
+ // can be used as a Modifier.
+ Sweep(context.Context, bufimage.Image) error
+
+ // mark is un-exported so that the Sweeper cannot be implemented
+ // outside of this package.
+ mark(string, []int32)
+}
+
+// NewFileOptionSweeper constructs a new file option Sweeper that removes
+// the SourceCodeInfo_Locations associated with the marks.
+func NewFileOptionSweeper() Sweeper {
+ return newFileOptionSweeper()
+}
+
+// Merge merges the given modifiers together so that they are run in the order
+// they are provided. This is particularly useful for constructing a modifier
+// from its initial 'nil' value.
+//
+// var modifier Modifier
+// if config.JavaMultipleFiles {
+// modifier = Merge(modifier, JavaMultipleFiles)
+// }
+func Merge(left Modifier, right Modifier) Modifier {
+ if left == nil {
+ return right
+ }
+ if right == nil {
+ return left
+ }
+ return NewMultiModifier(left, right)
+}
+
+// CcEnableArenas returns a Modifier that sets the cc_enable_arenas
+// file option to the given value in all of the files contained in
+// the Image.
+func CcEnableArenas(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ value bool,
+ overrides map[string]string,
+) (Modifier, error) {
+ validatedOverrides, err := stringOverridesToBoolOverrides(overrides)
+ if err != nil {
+ return nil, fmt.Errorf("invalid override for %s: %w", CcEnableArenasID, err)
+ }
+ return ccEnableArenas(logger, sweeper, value, validatedOverrides), nil
+}
+
+// GoPackage returns a Modifier that sets the go_package file option
+// according to the given defaultImportPathPrefix, exceptions, and
+// overrides.
+func GoPackage(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ defaultImportPathPrefix string,
+ except []bufmoduleref.ModuleIdentity,
+ moduleOverrides map[bufmoduleref.ModuleIdentity]string,
+ overrides map[string]string,
+) (Modifier, error) {
+ return goPackage(
+ logger,
+ sweeper,
+ defaultImportPathPrefix,
+ except,
+ moduleOverrides,
+ overrides,
+ )
+}
+
+// JavaMultipleFiles returns a Modifier that sets the java_multiple_files
+// file option to the given value in all of the files contained in
+// the Image.
+func JavaMultipleFiles(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ value bool,
+ overrides map[string]string,
+) (Modifier, error) {
+ validatedOverrides, err := stringOverridesToBoolOverrides(overrides)
+ if err != nil {
+ return nil, fmt.Errorf("invalid override for %s: %w", JavaMultipleFilesID, err)
+ }
+ return javaMultipleFiles(logger, sweeper, value, validatedOverrides), nil
+}
+
+// JavaOuterClassname returns a Modifier that sets the java_outer_classname file option
+// in all of the files contained in the Image based on the PascalCase of their filename.
+func JavaOuterClassname(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ overrides map[string]string,
+) Modifier {
+ return javaOuterClassname(logger, sweeper, overrides)
+}
+
+// JavaPackage returns a Modifier that sets the java_package file option
+// according to the given packagePrefix.
+func JavaPackage(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ defaultPrefix string,
+ except []bufmoduleref.ModuleIdentity,
+ moduleOverrides map[bufmoduleref.ModuleIdentity]string,
+ overrides map[string]string,
+) (Modifier, error) {
+ return javaPackage(
+ logger,
+ sweeper,
+ defaultPrefix,
+ except,
+ moduleOverrides,
+ overrides,
+ )
+}
+
+// JavaStringCheckUtf8 returns a Modifier that sets the java_string_check_utf8 file option according
+// to the given value.
+func JavaStringCheckUtf8(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ value bool,
+ overrides map[string]string,
+) (Modifier, error) {
+ validatedOverrides, err := stringOverridesToBoolOverrides(overrides)
+ if err != nil {
+ return nil, fmt.Errorf("invalid override for %s: %w", JavaStringCheckUtf8ID, err)
+ }
+ return javaStringCheckUtf8(logger, sweeper, value, validatedOverrides), nil
+}
+
+// OptimizeFor returns a Modifier that sets the optimize_for file
+// option to the given value in all of the files contained in
+// the Image.
+func OptimizeFor(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ defaultOptimizeFor descriptorpb.FileOptions_OptimizeMode,
+ except []bufmoduleref.ModuleIdentity,
+ moduleOverrides map[bufmoduleref.ModuleIdentity]descriptorpb.FileOptions_OptimizeMode,
+ overrides map[string]string,
+) (Modifier, error) {
+ validatedOverrides, err := stringOverridesToOptimizeModeOverrides(overrides)
+ if err != nil {
+ return nil, fmt.Errorf("invalid override for %s: %w", OptimizeForID, err)
+ }
+ return optimizeFor(logger, sweeper, defaultOptimizeFor, except, moduleOverrides, validatedOverrides), nil
+}
+
+// GoPackageImportPathForFile returns the go_package import path for the given
+// ImageFile. If the package contains a version suffix, and if there are more
+// than two components, concatenate the final two components. Otherwise, we
+// exclude the ';' separator and adopt the default behavior from the import path.
+//
+// For example, an ImageFile with `package acme.weather.v1;` will include `;weatherv1`
+// in the `go_package` declaration so that the generated package is named as such.
+func GoPackageImportPathForFile(imageFile bufimage.ImageFile, importPathPrefix string) string {
+ goPackageImportPath := path.Join(importPathPrefix, path.Dir(imageFile.Path()))
+ packageName := imageFile.FileDescriptor().GetPackage()
+ if _, ok := protoversion.NewPackageVersionForPackage(packageName); ok {
+ parts := strings.Split(packageName, ".")
+ if len(parts) >= 2 {
+ goPackageImportPath += ";" + parts[len(parts)-2] + parts[len(parts)-1]
+ }
+ }
+ return goPackageImportPath
+}
+
+// ObjcClassPrefix returns a Modifier that sets the objc_class_prefix file option
+// according to the package name. It is set to the uppercase first letter of each package sub-name,
+// not including the package version, with the following rules:
+// - If the resulting abbreviation is 2 characters, add "X".
+// - If the resulting abbreviation is 1 character, add "XX".
+// - If the resulting abbreviation is "GPB", change it to "GPX".
+// "GPB" is reserved by Google for the Protocol Buffers implementation.
+func ObjcClassPrefix(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ overrides map[string]string,
+) Modifier {
+ return objcClassPrefix(logger, sweeper, overrides)
+}
+
+// CsharpNamespace returns a Modifier that sets the csharp_namespace file option
+// according to the package name. It is set to the package name with each package sub-name capitalized.
+func CsharpNamespace(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ except []bufmoduleref.ModuleIdentity,
+ moduleOverrides map[bufmoduleref.ModuleIdentity]string,
+ overrides map[string]string,
+) Modifier {
+ return csharpNamespace(
+ logger,
+ sweeper,
+ except,
+ moduleOverrides,
+ overrides,
+ )
+}
+
+// PhpNamespace returns a Modifier that sets the php_namespace file option
+// according to the package name. It is set to the package name with each package sub-name capitalized
+// and each "." replaced with "\\".
+func PhpNamespace(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ overrides map[string]string,
+) Modifier {
+ return phpNamespace(logger, sweeper, overrides)
+}
+
+// PhpMetadataNamespace returns a Modifier that sets the php_metadata_namespace file option
+// according to the package name. It appends "\\GPBMetadata" to the heuristic used by PhpNamespace.
+func PhpMetadataNamespace(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ overrides map[string]string,
+) Modifier {
+ return phpMetadataNamespace(logger, sweeper, overrides)
+}
+
+// RubyPackage returns a Modifier that sets the ruby_package file option
+// according to the given packagePrefix. It is set to the package name with each package sub-name capitalized
+// and each "." replaced with "::".
+func RubyPackage(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ overrides map[string]string,
+) Modifier {
+ return rubyPackage(logger, sweeper, overrides)
+}
+
+// isWellKnownType returns true if the given path is one of the well-known types.
+func isWellKnownType(ctx context.Context, imageFile bufimage.ImageFile) bool {
+ return datawkt.Exists(imageFile.Path())
+}
+
+// int32SliceIsEqual returns true if x and y contain the same elements.
+func int32SliceIsEqual(x []int32, y []int32) bool {
+ if len(x) != len(y) {
+ return false
+ }
+ for i, elem := range x {
+ if elem != y[i] {
+ return false
+ }
+ }
+ return true
+}
+
+func stringOverridesToBoolOverrides(stringOverrides map[string]string) (map[string]bool, error) {
+ validatedOverrides := make(map[string]bool, len(stringOverrides))
+ for fileImportPath, overrideString := range stringOverrides {
+ overrideBool, err := strconv.ParseBool(overrideString)
+ if err != nil {
+ return nil, fmt.Errorf("non-boolean override %s set for file %s", overrideString, fileImportPath)
+ }
+ validatedOverrides[fileImportPath] = overrideBool
+ }
+ return validatedOverrides, nil
+}
+
+func stringOverridesToOptimizeModeOverrides(stringOverrides map[string]string) (map[string]descriptorpb.FileOptions_OptimizeMode, error) {
+ validatedOverrides := make(map[string]descriptorpb.FileOptions_OptimizeMode, len(stringOverrides))
+ for fileImportPath, stringOverride := range stringOverrides {
+ optimizeMode, ok := descriptorpb.FileOptions_OptimizeMode_value[stringOverride]
+ if !ok {
+ return nil, fmt.Errorf("invalid optimize mode %s set for file %s", stringOverride, fileImportPath)
+ }
+ validatedOverrides[fileImportPath] = descriptorpb.FileOptions_OptimizeMode(optimizeMode)
+ }
+ return validatedOverrides, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/cc_enable_arenas.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/cc_enable_arenas.go
new file mode 100644
index 000000000..dd460bc2a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/cc_enable_arenas.go
@@ -0,0 +1,90 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// CcEnableArenasID is the ID of the cc_enable_arenas modifier.
+const CcEnableArenasID = "CC_ENABLE_ARENAS"
+
+// ccEnableArenas is the SourceCodeInfo path for the cc_enable_arenas option.
+// https://github.com/protocolbuffers/protobuf/blob/29152fbc064921ca982d64a3a9eae1daa8f979bb/src/google/protobuf/descriptor.proto#L420
+var ccEnableArenasPath = []int32{8, 31}
+
+func ccEnableArenas(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ value bool,
+ overrides map[string]bool,
+) Modifier {
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ for _, imageFile := range image.Files() {
+ modifierValue := value
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ modifierValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := ccEnableArenasForFile(ctx, sweeper, imageFile, modifierValue); err != nil {
+ return err
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", CcEnableArenasID, overrideFile)
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func ccEnableArenasForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ value bool,
+) error {
+ descriptor := imageFile.Proto()
+ options := descriptor.GetOptions()
+ switch {
+ case isWellKnownType(ctx, imageFile):
+ // The file is a well-known type, don't do anything.
+ return nil
+ case options != nil && options.GetCcEnableArenas() == value:
+ // The option is already set to the same value, don't do anything.
+ return nil
+ case options == nil && descriptorpb.Default_FileOptions_CcEnableArenas == value:
+ // The option is not set, but the value we want to set is the
+ // same as the default, don't do anything.
+ return nil
+ }
+ if options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.CcEnableArenas = proto.Bool(value)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), ccEnableArenasPath)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/csharp_namespace.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/csharp_namespace.go
new file mode 100644
index 000000000..c36b62d01
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/csharp_namespace.go
@@ -0,0 +1,151 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// CsharpNamespaceID is the ID of the csharp_namespace modifier.
+const CsharpNamespaceID = "CSHARP_NAMESPACE"
+
+// csharpNamespacePath is the SourceCodeInfo path for the csharp_namespace option.
+// https://github.com/protocolbuffers/protobuf/blob/61689226c0e3ec88287eaed66164614d9c4f2bf7/src/google/protobuf/descriptor.proto#L428
+var csharpNamespacePath = []int32{8, 37}
+
+func csharpNamespace(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ except []bufmoduleref.ModuleIdentity,
+ moduleOverrides map[bufmoduleref.ModuleIdentity]string,
+ overrides map[string]string,
+) Modifier {
+ // Convert the bufmoduleref.ModuleIdentity types into
+ // strings so that they're comparable.
+ exceptModuleIdentityStrings := make(map[string]struct{}, len(except))
+ for _, moduleIdentity := range except {
+ exceptModuleIdentityStrings[moduleIdentity.IdentityString()] = struct{}{}
+ }
+ overrideModuleIdentityStrings := make(map[string]string, len(moduleOverrides))
+ for moduleIdentity, csharpNamespace := range moduleOverrides {
+ overrideModuleIdentityStrings[moduleIdentity.IdentityString()] = csharpNamespace
+ }
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ seenModuleIdentityStrings := make(map[string]struct{}, len(overrideModuleIdentityStrings))
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ for _, imageFile := range image.Files() {
+ csharpNamespaceValue := csharpNamespaceValue(imageFile)
+ if moduleIdentity := imageFile.ModuleIdentity(); moduleIdentity != nil {
+ moduleIdentityString := moduleIdentity.IdentityString()
+ if moduleNamespaceOverride, ok := overrideModuleIdentityStrings[moduleIdentityString]; ok {
+ seenModuleIdentityStrings[moduleIdentityString] = struct{}{}
+ csharpNamespaceValue = moduleNamespaceOverride
+ }
+ }
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ csharpNamespaceValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := csharpNamespaceForFile(
+ ctx,
+ sweeper,
+ imageFile,
+ csharpNamespaceValue,
+ exceptModuleIdentityStrings,
+ ); err != nil {
+ return err
+ }
+ }
+ for moduleIdentityString := range overrideModuleIdentityStrings {
+ if _, ok := seenModuleIdentityStrings[moduleIdentityString]; !ok {
+ logger.Sugar().Warnf("csharp_namespace_prefix override for %q was unused", moduleIdentityString)
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", CsharpNamespaceID, overrideFile)
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func csharpNamespaceForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ csharpNamespaceValue string,
+ exceptModuleIdentityStrings map[string]struct{},
+) error {
+ if shouldSkipCsharpNamespaceForFile(ctx, imageFile, csharpNamespaceValue, exceptModuleIdentityStrings) {
+ // This is a well-known type or we could not resolve a non-empty csharp_namespace
+ // value, so this is a no-op.
+ return nil
+ }
+ descriptor := imageFile.Proto()
+ if descriptor.Options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.CsharpNamespace = proto.String(csharpNamespaceValue)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), csharpNamespacePath)
+ }
+ return nil
+}
+
+func shouldSkipCsharpNamespaceForFile(
+ ctx context.Context,
+ imageFile bufimage.ImageFile,
+ csharpNamespaceValue string,
+ exceptModuleIdentityStrings map[string]struct{},
+) bool {
+ if isWellKnownType(ctx, imageFile) || csharpNamespaceValue == "" {
+ // This is a well-known type or we could not resolve a non-empty csharp_namespace
+ // value, so this is a no-op.
+ return true
+ }
+
+ if moduleIdentity := imageFile.ModuleIdentity(); moduleIdentity != nil {
+ if _, ok := exceptModuleIdentityStrings[moduleIdentity.IdentityString()]; ok {
+ return true
+ }
+ }
+ return false
+}
+
+// csharpNamespaceValue returns the csharp_namespace for the given ImageFile based on its
+// package declaration. If the image file doesn't have a package declaration, an
+// empty string is returned.
+func csharpNamespaceValue(imageFile bufimage.ImageFile) string {
+ pkg := imageFile.Proto().GetPackage()
+ if pkg == "" {
+ return ""
+ }
+ packageParts := strings.Split(pkg, ".")
+ for i, part := range packageParts {
+ packageParts[i] = stringutil.ToPascalCase(part)
+ }
+ return strings.Join(packageParts, ".")
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/file_option_sweeper.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/file_option_sweeper.go
new file mode 100644
index 000000000..deada3561
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/file_option_sweeper.go
@@ -0,0 +1,115 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// fileOptionPath is the path prefix used for FileOptions.
+// All file option locations are preceded by a location
+// with a path set to the fileOptionPath.
+// https://github.com/protocolbuffers/protobuf/blob/053966b4959bdd21e4a24e657bcb97cb9de9e8a4/src/google/protobuf/descriptor.proto#L80
+var fileOptionPath = []int32{8}
+
+type fileOptionSweeper struct {
+ // Filepath -> SourceCodeInfo_Location.Path keys.
+ sourceCodeInfoPaths map[string]map[string]struct{}
+}
+
+func newFileOptionSweeper() *fileOptionSweeper {
+ return &fileOptionSweeper{
+ sourceCodeInfoPaths: make(map[string]map[string]struct{}),
+ }
+}
+
+// mark is used to mark the given SourceCodeInfo_Location indices for
+// deletion. This method should be called in each of the file option
+// modifiers.
+func (s *fileOptionSweeper) mark(imageFilePath string, path []int32) {
+ paths, ok := s.sourceCodeInfoPaths[imageFilePath]
+ if !ok {
+ paths = make(map[string]struct{})
+ s.sourceCodeInfoPaths[imageFilePath] = paths
+ }
+ paths[getPathKey(path)] = struct{}{}
+}
+
+// Sweep applies all of the marks and sweeps the file option SourceCodeInfo_Locations.
+func (s *fileOptionSweeper) Sweep(ctx context.Context, image bufimage.Image) error {
+ for _, imageFile := range image.Files() {
+ descriptor := imageFile.Proto()
+ if descriptor.SourceCodeInfo == nil {
+ continue
+ }
+ paths, ok := s.sourceCodeInfoPaths[imageFile.Path()]
+ if !ok {
+ continue
+ }
+ // We can't just match on an exact path match because the target
+ // file option's parent path elements would remain (i.e [8]).
+ // Instead, we perform an initial pass to validate that the paths
+ // are structured as expect, and collect all of the indices that
+ // we need to delete.
+ indices := make(map[int]struct{}, len(paths)*2)
+ for i, location := range descriptor.SourceCodeInfo.Location {
+ if _, ok := paths[getPathKey(location.Path)]; !ok {
+ continue
+ }
+ if i == 0 {
+ return fmt.Errorf("path %v must have a preceding parent path", location.Path)
+ }
+ if !int32SliceIsEqual(descriptor.SourceCodeInfo.Location[i-1].Path, fileOptionPath) {
+ return fmt.Errorf("path %v must have a preceding parent path equal to %v", location.Path, fileOptionPath)
+ }
+ // Add the target path and its parent.
+ indices[i-1] = struct{}{}
+ indices[i] = struct{}{}
+ }
+ // Now that we know exactly which indices to exclude, we can
+ // filter the SourceCodeInfo_Locations as needed.
+ locations := make(
+ []*descriptorpb.SourceCodeInfo_Location,
+ 0,
+ len(descriptor.SourceCodeInfo.Location)-len(indices),
+ )
+ for i, location := range descriptor.SourceCodeInfo.Location {
+ if _, ok := indices[i]; ok {
+ continue
+ }
+ locations = append(locations, location)
+ }
+ descriptor.SourceCodeInfo.Location = locations
+ }
+ return nil
+}
+
+// getPathKey returns a unique key for the given path.
+func getPathKey(path []int32) string {
+ key := make([]byte, len(path)*4)
+ j := 0
+ for _, elem := range path {
+ key[j] = byte(elem)
+ key[j+1] = byte(elem >> 8)
+ key[j+2] = byte(elem >> 16)
+ key[j+3] = byte(elem >> 24)
+ j += 4
+ }
+ return string(key)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/go_package.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/go_package.go
new file mode 100644
index 000000000..a9174fb5b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/go_package.go
@@ -0,0 +1,137 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// GoPackageID is the ID of the go_package modifier.
+const GoPackageID = "GO_PACKAGE"
+
+// goPackagePath is the SourceCodeInfo path for the go_package option.
+// https://github.com/protocolbuffers/protobuf/blob/ee04809540c098718121e092107fbc0abc231725/src/google/protobuf/descriptor.proto#L392
+var goPackagePath = []int32{8, 11}
+
+func goPackage(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ defaultImportPathPrefix string,
+ except []bufmoduleref.ModuleIdentity,
+ moduleOverrides map[bufmoduleref.ModuleIdentity]string,
+ overrides map[string]string,
+) (Modifier, error) {
+ if defaultImportPathPrefix == "" {
+ return nil, fmt.Errorf("a non-empty import path prefix is required")
+ }
+ // Convert the bufmoduleref.ModuleIdentity types into
+ // strings so that they're comparable.
+ exceptModuleIdentityStrings := make(map[string]struct{}, len(except))
+ for _, moduleIdentity := range except {
+ exceptModuleIdentityStrings[moduleIdentity.IdentityString()] = struct{}{}
+ }
+ overrideModuleIdentityStrings := make(map[string]string, len(moduleOverrides))
+ for moduleIdentity, goPackagePrefix := range moduleOverrides {
+ overrideModuleIdentityStrings[moduleIdentity.IdentityString()] = goPackagePrefix
+ }
+ seenModuleIdentityStrings := make(map[string]struct{}, len(overrideModuleIdentityStrings))
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ for _, imageFile := range image.Files() {
+ importPathPrefix := defaultImportPathPrefix
+ if moduleIdentity := imageFile.ModuleIdentity(); moduleIdentity != nil {
+ moduleIdentityString := moduleIdentity.IdentityString()
+ if modulePrefixOverride, ok := overrideModuleIdentityStrings[moduleIdentityString]; ok {
+ importPathPrefix = modulePrefixOverride
+ seenModuleIdentityStrings[moduleIdentityString] = struct{}{}
+ }
+ }
+ goPackageValue := GoPackageImportPathForFile(imageFile, importPathPrefix)
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ goPackageValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := goPackageForFile(
+ ctx,
+ sweeper,
+ imageFile,
+ goPackageValue,
+ exceptModuleIdentityStrings,
+ ); err != nil {
+ return err
+ }
+ }
+ for moduleIdentityString := range overrideModuleIdentityStrings {
+ if _, ok := seenModuleIdentityStrings[moduleIdentityString]; !ok {
+ logger.Sugar().Warnf("go_package_prefix override for %q was unused", moduleIdentityString)
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", GoPackageID, overrideFile)
+ }
+ }
+ return nil
+ },
+ ), nil
+}
+
+func goPackageForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ goPackageValue string,
+ exceptModuleIdentityStrings map[string]struct{},
+) error {
+ if shouldSkipGoPackageForFile(ctx, imageFile, exceptModuleIdentityStrings) {
+ return nil
+ }
+ descriptor := imageFile.Proto()
+ if descriptor.Options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.GoPackage = proto.String(goPackageValue)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), goPackagePath)
+ }
+ return nil
+}
+
+func shouldSkipGoPackageForFile(
+ ctx context.Context,
+ imageFile bufimage.ImageFile,
+ exceptModuleIdentityStrings map[string]struct{},
+) bool {
+ if isWellKnownType(ctx, imageFile) && imageFile.Proto().GetOptions().GetGoPackage() != "" {
+ // The well-known type defines the go_package option, so this is a no-op.
+ // If a well-known type ever omits the go_package option, we make sure
+ // to include it.
+ return true
+ }
+ if moduleIdentity := imageFile.ModuleIdentity(); moduleIdentity != nil {
+ if _, ok := exceptModuleIdentityStrings[moduleIdentity.IdentityString()]; ok {
+ return true
+ }
+ }
+ return false
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_multiple_files.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_multiple_files.go
new file mode 100644
index 000000000..8815a5519
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_multiple_files.go
@@ -0,0 +1,95 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+const (
+ // DefaultJavaMultipleFilesValue is the default value for the java_multiple_files modifier.
+ DefaultJavaMultipleFilesValue = true
+
+ // JavaMultipleFilesID is the ID of the java_multiple_files modifier.
+ JavaMultipleFilesID = "JAVA_MULTIPLE_FILES"
+)
+
+// javaMultipleFilesPath is the SourceCodeInfo path for the java_multiple_files option.
+// https://github.com/protocolbuffers/protobuf/blob/ee04809540c098718121e092107fbc0abc231725/src/google/protobuf/descriptor.proto#L364
+var javaMultipleFilesPath = []int32{8, 10}
+
+func javaMultipleFiles(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ value bool,
+ overrides map[string]bool,
+) Modifier {
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ for _, imageFile := range image.Files() {
+ modifierValue := value
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ modifierValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := javaMultipleFilesForFile(ctx, sweeper, imageFile, modifierValue); err != nil {
+ return err
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", JavaMultipleFilesID, overrideFile)
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func javaMultipleFilesForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ value bool,
+) error {
+ descriptor := imageFile.Proto()
+ options := descriptor.GetOptions()
+ switch {
+ case isWellKnownType(ctx, imageFile):
+ // The file is a well-known type, don't do anything.
+ return nil
+ case options != nil && options.GetJavaMultipleFiles() == value:
+ // The option is already set to the same value, don't do anything.
+ return nil
+ case options == nil && descriptorpb.Default_FileOptions_JavaMultipleFiles == value:
+ // The option is not set, but the value we want to set is the
+ // same as the default, don't do anything.
+ return nil
+ }
+ if options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.JavaMultipleFiles = proto.Bool(value)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), javaMultipleFilesPath)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_outer_classname.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_outer_classname.go
new file mode 100644
index 000000000..924347b97
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_outer_classname.go
@@ -0,0 +1,87 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// JavaOuterClassNameID is the ID for the java_outer_classname modifier.
+const JavaOuterClassNameID = "JAVA_OUTER_CLASSNAME"
+
+// javaOuterClassnamePath is the SourceCodeInfo path for the java_outer_classname option.
+// https://github.com/protocolbuffers/protobuf/blob/87d140f851131fb8a6e8a80449cf08e73e568259/src/google/protobuf/descriptor.proto#L356
+var javaOuterClassnamePath = []int32{8, 8}
+
+func javaOuterClassname(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ overrides map[string]string,
+) Modifier {
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ for _, imageFile := range image.Files() {
+ javaOuterClassnameValue := javaOuterClassnameValue(imageFile)
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ javaOuterClassnameValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := javaOuterClassnameForFile(ctx, sweeper, imageFile, javaOuterClassnameValue); err != nil {
+ return err
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", JavaOuterClassNameID, overrideFile)
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func javaOuterClassnameForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ javaOuterClassnameValue string,
+) error {
+ descriptor := imageFile.Proto()
+ if options := descriptor.GetOptions(); isWellKnownType(ctx, imageFile) || (options != nil && options.GetJavaOuterClassname() == javaOuterClassnameValue) {
+ // The file is a well-known type or already defines the java_outer_classname
+ // option with the given value, so this is a no-op.
+ return nil
+ }
+ if descriptor.Options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.JavaOuterClassname = proto.String(javaOuterClassnameValue)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), javaOuterClassnamePath)
+ }
+ return nil
+}
+
+func javaOuterClassnameValue(imageFile bufimage.ImageFile) string {
+ return stringutil.ToPascalCase(normalpath.Base(imageFile.Path()))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_package.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_package.go
new file mode 100644
index 000000000..43cf24311
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_package.go
@@ -0,0 +1,153 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+const (
+ // DefaultJavaPackagePrefix is the default java_package prefix used in the java_package modifier.
+ DefaultJavaPackagePrefix = "com"
+
+ // JavaPackageID is the ID of the java_package modifier.
+ JavaPackageID = "JAVA_PACKAGE"
+)
+
+// javaPackagePath is the SourceCodeInfo path for the java_package option.
+// https://github.com/protocolbuffers/protobuf/blob/61689226c0e3ec88287eaed66164614d9c4f2bf7/src/google/protobuf/descriptor.proto#L348
+var javaPackagePath = []int32{8, 1}
+
+func javaPackage(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ defaultPackagePrefix string,
+ except []bufmoduleref.ModuleIdentity,
+ moduleOverrides map[bufmoduleref.ModuleIdentity]string,
+ overrides map[string]string,
+) (Modifier, error) {
+ if defaultPackagePrefix == "" {
+ return nil, fmt.Errorf("a non-empty package prefix is required")
+ }
+ // Convert the bufmoduleref.ModuleIdentity types into
+ // strings so that they're comparable.
+ exceptModuleIdentityStrings := make(map[string]struct{}, len(except))
+ for _, moduleIdentity := range except {
+ exceptModuleIdentityStrings[moduleIdentity.IdentityString()] = struct{}{}
+ }
+ overrideModuleIdentityStrings := make(map[string]string, len(moduleOverrides))
+ for moduleIdentity, javaPackagePrefix := range moduleOverrides {
+ overrideModuleIdentityStrings[moduleIdentity.IdentityString()] = javaPackagePrefix
+ }
+ seenModuleIdentityStrings := make(map[string]struct{}, len(overrideModuleIdentityStrings))
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ for _, imageFile := range image.Files() {
+ packagePrefix := defaultPackagePrefix
+ if moduleIdentity := imageFile.ModuleIdentity(); moduleIdentity != nil {
+ moduleIdentityString := moduleIdentity.IdentityString()
+ if modulePrefixOverride, ok := overrideModuleIdentityStrings[moduleIdentityString]; ok {
+ packagePrefix = modulePrefixOverride
+ seenModuleIdentityStrings[moduleIdentityString] = struct{}{}
+ }
+ }
+ javaPackageValue := javaPackageValue(imageFile, packagePrefix)
+ if overridePackagePrefix, ok := overrides[imageFile.Path()]; ok {
+ javaPackageValue = overridePackagePrefix
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := javaPackageForFile(
+ ctx,
+ sweeper,
+ imageFile,
+ javaPackageValue,
+ exceptModuleIdentityStrings,
+ ); err != nil {
+ return err
+ }
+ }
+ for moduleIdentityString := range overrideModuleIdentityStrings {
+ if _, ok := seenModuleIdentityStrings[moduleIdentityString]; !ok {
+ logger.Sugar().Warnf("java_package_prefix override for %q was unused", moduleIdentityString)
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", JavaPackageID, overrideFile)
+ }
+ }
+ return nil
+ },
+ ), nil
+}
+
+func javaPackageForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ javaPackageValue string,
+ exceptModuleIdentityStrings map[string]struct{},
+) error {
+ if shouldSkipJavaPackageForFile(ctx, imageFile, javaPackageValue, exceptModuleIdentityStrings) {
+ return nil
+ }
+ descriptor := imageFile.Proto()
+ if descriptor.Options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.JavaPackage = proto.String(javaPackageValue)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), javaPackagePath)
+ }
+ return nil
+}
+
+func shouldSkipJavaPackageForFile(
+ ctx context.Context,
+ imageFile bufimage.ImageFile,
+ javaPackageValue string,
+ exceptModuleIdentityStrings map[string]struct{},
+) bool {
+ if isWellKnownType(ctx, imageFile) || javaPackageValue == "" {
+ // This is a well-known type or we could not resolve a non-empty java_package
+ // value, so this is a no-op.
+ return true
+ }
+
+ if moduleIdentity := imageFile.ModuleIdentity(); moduleIdentity != nil {
+ if _, ok := exceptModuleIdentityStrings[moduleIdentity.IdentityString()]; ok {
+ return true
+ }
+ }
+ return false
+}
+
+// javaPackageValue returns the java_package for the given ImageFile based on its
+// package declaration. If the image file doesn't have a package declaration, an
+// empty string is returned.
+func javaPackageValue(imageFile bufimage.ImageFile, packagePrefix string) string {
+ if pkg := imageFile.Proto().GetPackage(); pkg != "" {
+ return packagePrefix + "." + pkg
+ }
+ return ""
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_string_check_utf8.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_string_check_utf8.go
new file mode 100644
index 000000000..854c65958
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/java_string_check_utf8.go
@@ -0,0 +1,90 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// JavaStringCheckUtf8ID is the ID of the java_string_check_utf8 modifier.
+const JavaStringCheckUtf8ID = "JAVA_STRING_CHECK_UTF8"
+
+// javaStringCheckUtf8Path is the SourceCodeInfo path for the java_string_check_utf8 option.
+// https://github.com/protocolbuffers/protobuf/blob/61689226c0e3ec88287eaed66164614d9c4f2bf7/src/google/protobuf/descriptor.proto#L375
+var javaStringCheckUtf8Path = []int32{8, 27}
+
+func javaStringCheckUtf8(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ value bool,
+ overrides map[string]bool,
+) Modifier {
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ for _, imageFile := range image.Files() {
+ modifierValue := value
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ modifierValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := javaStringCheckUtf8ForFile(ctx, sweeper, imageFile, modifierValue); err != nil {
+ return err
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", JavaStringCheckUtf8ID, overrideFile)
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func javaStringCheckUtf8ForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ value bool,
+) error {
+ descriptor := imageFile.Proto()
+ options := descriptor.GetOptions()
+ switch {
+ case isWellKnownType(ctx, imageFile):
+ // The file is a well-known type, don't do anything.
+ return nil
+ case options != nil && options.GetJavaStringCheckUtf8() == value:
+ // The option is already set to the same value, don't do anything.
+ return nil
+ case options == nil && descriptorpb.Default_FileOptions_JavaStringCheckUtf8 == value:
+ // The option is not set, but the value we want to set is the
+ // same as the default, don't do anything.
+ return nil
+ }
+ if options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.JavaStringCheckUtf8 = proto.Bool(value)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), javaStringCheckUtf8Path)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/multi_modifier.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/multi_modifier.go
new file mode 100644
index 000000000..e06aeda33
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/multi_modifier.go
@@ -0,0 +1,45 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+)
+
+type multiModifier struct {
+ delegates []Modifier
+}
+
+func newMultiModifier(
+ delegates []Modifier,
+) *multiModifier {
+ return &multiModifier{
+ delegates: delegates,
+ }
+}
+
+func (m *multiModifier) Modify(
+ ctx context.Context,
+ image bufimage.Image,
+) error {
+ for _, delegate := range m.delegates {
+ if err := delegate.Modify(ctx, image); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/objc_class_prefix.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/objc_class_prefix.go
new file mode 100644
index 000000000..13fd51bf7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/objc_class_prefix.go
@@ -0,0 +1,115 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+ "strings"
+ "unicode"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/protoversion"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// ObjcClassPrefixID is the ID of the objc_class_prefix modifier.
+const ObjcClassPrefixID = "OBJC_CLASS_PREFIX"
+
+// objcClassPrefixPath is the SourceCodeInfo path for the objc_class_prefix option.
+// https://github.com/protocolbuffers/protobuf/blob/61689226c0e3ec88287eaed66164614d9c4f2bf7/src/google/protobuf/descriptor.proto#L425
+var objcClassPrefixPath = []int32{8, 36}
+
+func objcClassPrefix(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ overrides map[string]string,
+) Modifier {
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ for _, imageFile := range image.Files() {
+ objcClassPrefixValue := objcClassPrefixValue(imageFile)
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ objcClassPrefixValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := objcClassPrefixForFile(ctx, sweeper, imageFile, objcClassPrefixValue); err != nil {
+ return err
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", ObjcClassPrefixID, overrideFile)
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func objcClassPrefixForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ objcClassPrefixValue string,
+) error {
+ descriptor := imageFile.Proto()
+ if isWellKnownType(ctx, imageFile) || objcClassPrefixValue == "" {
+ // This is a well-known type or we could not resolve a non-empty objc_class_prefix
+ // value, so this is a no-op.
+ return nil
+ }
+ if descriptor.Options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.ObjcClassPrefix = proto.String(objcClassPrefixValue)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), objcClassPrefixPath)
+ }
+ return nil
+}
+
+// objcClassPrefixValue returns the objc_class_prefix for the given ImageFile based on its
+// package declaration. If the image file doesn't have a package declaration, an
+// empty string is returned.
+func objcClassPrefixValue(imageFile bufimage.ImageFile) string {
+ pkg := imageFile.Proto().GetPackage()
+ if pkg == "" {
+ return ""
+ }
+ _, hasPackageVersion := protoversion.NewPackageVersionForPackage(pkg)
+ packageParts := strings.Split(pkg, ".")
+ var prefixParts []rune
+ for i, part := range packageParts {
+ // Check if last part is a version before appending.
+ if i == len(packageParts)-1 && hasPackageVersion {
+ continue
+ }
+ // Probably should never be a non-ASCII character,
+ // but why not support it just in case?
+ runeSlice := []rune(part)
+ prefixParts = append(prefixParts, unicode.ToUpper(runeSlice[0]))
+ }
+ for len(prefixParts) < 3 {
+ prefixParts = append(prefixParts, 'X')
+ }
+ prefix := string(prefixParts)
+ if prefix == "GPB" {
+ prefix = "GPX"
+ }
+ return prefix
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/optimize_for.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/optimize_for.go
new file mode 100644
index 000000000..190b5145b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/optimize_for.go
@@ -0,0 +1,130 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// OptimizeForID is the ID for the optimize_for modifier.
+const OptimizeForID = "OPTIMIZE_FOR"
+
+// optimizeFor is the SourceCodeInfo path for the optimize_for option.
+// https://github.com/protocolbuffers/protobuf/blob/61689226c0e3ec88287eaed66164614d9c4f2bf7/src/google/protobuf/descriptor.proto#L385
+var optimizeForPath = []int32{8, 9}
+
+func optimizeFor(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ defaultOptimizeFor descriptorpb.FileOptions_OptimizeMode,
+ except []bufmoduleref.ModuleIdentity,
+ moduleOverrides map[bufmoduleref.ModuleIdentity]descriptorpb.FileOptions_OptimizeMode,
+ overrides map[string]descriptorpb.FileOptions_OptimizeMode,
+) Modifier {
+ // Convert the bufmoduleref.ModuleIdentity types into
+ // strings so that they're comparable.
+ exceptModuleIdentityStrings := make(map[string]struct{}, len(except))
+ for _, moduleIdentity := range except {
+ exceptModuleIdentityStrings[moduleIdentity.IdentityString()] = struct{}{}
+ }
+ overrideModuleIdentityStrings := make(
+ map[string]descriptorpb.FileOptions_OptimizeMode,
+ len(moduleOverrides),
+ )
+ for moduleIdentity, optimizeFor := range moduleOverrides {
+ overrideModuleIdentityStrings[moduleIdentity.IdentityString()] = optimizeFor
+ }
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ seenModuleIdentityStrings := make(map[string]struct{}, len(overrideModuleIdentityStrings))
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ for _, imageFile := range image.Files() {
+ modifierValue := defaultOptimizeFor
+ if moduleIdentity := imageFile.ModuleIdentity(); moduleIdentity != nil {
+ moduleIdentityString := moduleIdentity.IdentityString()
+ if optimizeForOverrdie, ok := overrideModuleIdentityStrings[moduleIdentityString]; ok {
+ modifierValue = optimizeForOverrdie
+ seenModuleIdentityStrings[moduleIdentityString] = struct{}{}
+ }
+ }
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ modifierValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := optimizeForForFile(
+ ctx,
+ sweeper,
+ imageFile,
+ modifierValue,
+ exceptModuleIdentityStrings,
+ ); err != nil {
+ return err
+ }
+ }
+ for moduleIdentityString := range overrideModuleIdentityStrings {
+ if _, ok := seenModuleIdentityStrings[moduleIdentityString]; !ok {
+ logger.Sugar().Warnf("optimize_for override for %q was unused", moduleIdentityString)
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", OptimizeForID, overrideFile)
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func optimizeForForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ value descriptorpb.FileOptions_OptimizeMode,
+ exceptModuleIdentityStrings map[string]struct{},
+) error {
+ descriptor := imageFile.Proto()
+ options := descriptor.GetOptions()
+ switch {
+ case isWellKnownType(ctx, imageFile):
+ // The file is a well-known type, don't do anything.
+ return nil
+ case options != nil && options.GetOptimizeFor() == value:
+ // The option is already set to the same value, don't do anything.
+ return nil
+ case options == nil && descriptorpb.Default_FileOptions_OptimizeFor == value:
+ // The option is not set, but the value we want to set is the
+ // same as the default, don't do anything.
+ return nil
+ }
+ if moduleIdentity := imageFile.ModuleIdentity(); moduleIdentity != nil {
+ if _, ok := exceptModuleIdentityStrings[moduleIdentity.IdentityString()]; ok {
+ return nil
+ }
+ }
+ if options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.OptimizeFor = &value
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), optimizeForPath)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/php_metadata_namespace.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/php_metadata_namespace.go
new file mode 100644
index 000000000..c2f4cfc8f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/php_metadata_namespace.go
@@ -0,0 +1,94 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// PhpMetadataNamespaceID is the ID of the php_metadata_namespace modifier.
+const PhpMetadataNamespaceID = "PHP_METADATA_NAMESPACE"
+
+var (
+ // phpMetadataNamespacePath is the SourceCodeInfo path for the php_metadata_namespace option.
+ // Ref: https://github.com/protocolbuffers/protobuf/blob/61689226c0e3ec88287eaed66164614d9c4f2bf7/src/google/protobuf/descriptor.proto#L448
+ phpMetadataNamespacePath = []int32{8, 41}
+)
+
+func phpMetadataNamespace(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ overrides map[string]string,
+) Modifier {
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ for _, imageFile := range image.Files() {
+ phpMetadataNamespaceValue := phpMetadataNamespaceValue(imageFile)
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ phpMetadataNamespaceValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := phpMetadataNamespaceForFile(ctx, sweeper, imageFile, phpMetadataNamespaceValue); err != nil {
+ return err
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", PhpMetadataNamespaceID, overrideFile)
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func phpMetadataNamespaceForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ phpMetadataNamespaceValue string,
+) error {
+ descriptor := imageFile.Proto()
+ if isWellKnownType(ctx, imageFile) || phpMetadataNamespaceValue == "" {
+ // This is a well-known type or we could not resolve a non-empty php_metadata_namespace
+ // value, so this is a no-op.
+ return nil
+ }
+ if descriptor.Options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.PhpMetadataNamespace = proto.String(phpMetadataNamespaceValue)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), phpMetadataNamespacePath)
+ }
+ return nil
+}
+
+// phpMetadataNamespaceValue returns the php_metadata_namespace for the given ImageFile based on its
+// package declaration. If the image file doesn't have a package declaration, an
+// empty string is returned.
+func phpMetadataNamespaceValue(imageFile bufimage.ImageFile) string {
+ phpNamespace := phpNamespaceValue(imageFile)
+ if phpNamespace == "" {
+ return ""
+ }
+ return phpNamespace + `\GPBMetadata`
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/php_namespace.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/php_namespace.go
new file mode 100644
index 000000000..14a198046
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/php_namespace.go
@@ -0,0 +1,203 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// PhpNamespaceID is the ID of the php_namespace modifier.
+const PhpNamespaceID = "PHP_NAMESPACE"
+
+var (
+ // phpNamespacePath is the SourceCodeInfo path for the php_namespace option.
+ // Ref: https://github.com/protocolbuffers/protobuf/blob/61689226c0e3ec88287eaed66164614d9c4f2bf7/src/google/protobuf/descriptor.proto#L443
+ phpNamespacePath = []int32{8, 41}
+
+ // Keywords and classes that could be produced by our heuristic.
+ // They must not be used in a php_namespace.
+ // Ref: https://www.php.net/manual/en/reserved.php
+ phpReservedKeywords = map[string]struct{}{
+ // Reserved classes as per above.
+ "directory": {},
+ "exception": {},
+ "errorexception": {},
+ "closure": {},
+ "generator": {},
+ "arithmeticerror": {},
+ "assertionerror": {},
+ "divisionbyzeroerror": {},
+ "error": {},
+ "throwable": {},
+ "parseerror": {},
+ "typeerror": {},
+ // Keywords avoided by protoc.
+ // Ref: https://github.com/protocolbuffers/protobuf/blob/66d749188ff2a2e30e932110222d58da7c6a8d49/src/google/protobuf/compiler/php/php_generator.cc#L50-L66
+ "abstract": {},
+ "and": {},
+ "array": {},
+ "as": {},
+ "break": {},
+ "callable": {},
+ "case": {},
+ "catch": {},
+ "class": {},
+ "clone": {},
+ "const": {},
+ "continue": {},
+ "declare": {},
+ "default": {},
+ "die": {},
+ "do": {},
+ "echo": {},
+ "else": {},
+ "elseif": {},
+ "empty": {},
+ "enddeclare": {},
+ "endfor": {},
+ "endforeach": {},
+ "endif": {},
+ "endswitch": {},
+ "endwhile": {},
+ "eval": {},
+ "exit": {},
+ "extends": {},
+ "final": {},
+ "finally": {},
+ "fn": {},
+ "for": {},
+ "foreach": {},
+ "function": {},
+ "global": {},
+ "goto": {},
+ "if": {},
+ "implements": {},
+ "include": {},
+ "include_once": {},
+ "instanceof": {},
+ "insteadof": {},
+ "interface": {},
+ "isset": {},
+ "list": {},
+ "match": {},
+ "namespace": {},
+ "new": {},
+ "or": {},
+ "print": {},
+ "private": {},
+ "protected": {},
+ "public": {},
+ "require": {},
+ "require_once": {},
+ "return": {},
+ "static": {},
+ "switch": {},
+ "throw": {},
+ "trait": {},
+ "try": {},
+ "unset": {},
+ "use": {},
+ "var": {},
+ "while": {},
+ "xor": {},
+ "yield": {},
+ "int": {},
+ "float": {},
+ "bool": {},
+ "string": {},
+ "true": {},
+ "false": {},
+ "null": {},
+ "void": {},
+ "iterable": {},
+ }
+)
+
+func phpNamespace(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ overrides map[string]string,
+) Modifier {
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ for _, imageFile := range image.Files() {
+ phpNamespaceValue := phpNamespaceValue(imageFile)
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ phpNamespaceValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := phpNamespaceForFile(ctx, sweeper, imageFile, phpNamespaceValue); err != nil {
+ return err
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", PhpNamespaceID, overrideFile)
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func phpNamespaceForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ phpNamespaceValue string,
+) error {
+ descriptor := imageFile.Proto()
+ if isWellKnownType(ctx, imageFile) || phpNamespaceValue == "" {
+ // This is a well-known type or we could not resolve a non-empty php_namespace
+ // value, so this is a no-op.
+ return nil
+ }
+ if descriptor.Options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.PhpNamespace = proto.String(phpNamespaceValue)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), phpNamespacePath)
+ }
+ return nil
+}
+
+// phpNamespaceValue returns the php_namespace for the given ImageFile based on its
+// package declaration. If the image file doesn't have a package declaration, an
+// empty string is returned.
+func phpNamespaceValue(imageFile bufimage.ImageFile) string {
+ pkg := imageFile.Proto().GetPackage()
+ if pkg == "" {
+ return ""
+ }
+ packageParts := strings.Split(pkg, ".")
+ for i, part := range packageParts {
+ packagePart := stringutil.ToPascalCase(part)
+ if _, ok := phpReservedKeywords[strings.ToLower(part)]; ok {
+ // Append _ to the package part if it is a reserved keyword.
+ packagePart += "_"
+ }
+ packageParts[i] = packagePart
+ }
+ return strings.Join(packageParts, `\`)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/ruby_package.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/ruby_package.go
new file mode 100644
index 000000000..209aa40ea
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/ruby_package.go
@@ -0,0 +1,98 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimagemodify
+
+import (
+ "context"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// RubyPackageID is the ID of the ruby_package modifier.
+const RubyPackageID = "RUBY_PACKAGE"
+
+// rubyPackagePath is the SourceCodeInfo path for the ruby_package option.
+// https://github.com/protocolbuffers/protobuf/blob/61689226c0e3ec88287eaed66164614d9c4f2bf7/src/google/protobuf/descriptor.proto#L453
+var rubyPackagePath = []int32{8, 45}
+
+func rubyPackage(
+ logger *zap.Logger,
+ sweeper Sweeper,
+ overrides map[string]string,
+) Modifier {
+ return ModifierFunc(
+ func(ctx context.Context, image bufimage.Image) error {
+ seenOverrideFiles := make(map[string]struct{}, len(overrides))
+ for _, imageFile := range image.Files() {
+ rubyPackageValue := rubyPackageValue(imageFile)
+ if overrideValue, ok := overrides[imageFile.Path()]; ok {
+ rubyPackageValue = overrideValue
+ seenOverrideFiles[imageFile.Path()] = struct{}{}
+ }
+ if err := rubyPackageForFile(ctx, sweeper, imageFile, rubyPackageValue); err != nil {
+ return err
+ }
+ }
+ for overrideFile := range overrides {
+ if _, ok := seenOverrideFiles[overrideFile]; !ok {
+ logger.Sugar().Warnf("%s override for %q was unused", RubyPackageID, overrideFile)
+ }
+ }
+ return nil
+ },
+ )
+}
+
+func rubyPackageForFile(
+ ctx context.Context,
+ sweeper Sweeper,
+ imageFile bufimage.ImageFile,
+ rubyPackageValue string,
+) error {
+ descriptor := imageFile.Proto()
+ if isWellKnownType(ctx, imageFile) || rubyPackageValue == "" {
+ // This is a well-known type or we could not resolve a non-empty ruby_package
+ // value, so this is a no-op.
+ return nil
+ }
+ if descriptor.Options == nil {
+ descriptor.Options = &descriptorpb.FileOptions{}
+ }
+ descriptor.Options.RubyPackage = proto.String(rubyPackageValue)
+ if sweeper != nil {
+ sweeper.mark(imageFile.Path(), rubyPackagePath)
+ }
+ return nil
+}
+
+// rubyPackageValue returns the ruby_package for the given ImageFile based on its
+// package declaration. If the image file doesn't have a package declaration, an
+// empty string is returned.
+func rubyPackageValue(imageFile bufimage.ImageFile) string {
+ pkg := imageFile.Proto().GetPackage()
+ if pkg == "" {
+ return ""
+ }
+ packageParts := strings.Split(pkg, ".")
+ for i, part := range packageParts {
+ packageParts[i] = stringutil.ToPascalCase(part)
+ }
+ return strings.Join(packageParts, "::")
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/usage.gen.go
new file mode 100644
index 000000000..ec13ebb4b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimagemodify/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufimagemodify
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/bufimageutil.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/bufimageutil.go
new file mode 100644
index 000000000..b4901ae5c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/bufimageutil.go
@@ -0,0 +1,682 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimageutil
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+var (
+ // ErrImageFilterTypeNotFound is returned from ImageFilteredByTypes when
+ // a specified type cannot be found in an image.
+ ErrImageFilterTypeNotFound = errors.New("not found")
+
+ // ErrImageFilterTypeIsImport is returned from ImageFilteredByTypes when
+ // a specified type name is declared in a module dependency.
+ ErrImageFilterTypeIsImport = errors.New("type declared in imported module")
+)
+
+// NewInputFiles converts the ImageFiles to InputFiles.
+//
+// Since protosource is a pkg package, it cannot depend on bufmoduleref, which has the
+// definition for bufmoduleref.ModuleIdentity, so we have our own interfaces for this
+// in protosource. Given Go's type system, we need to do a conversion here.
+func NewInputFiles(imageFiles []bufimage.ImageFile) []protosource.InputFile {
+ inputFiles := make([]protosource.InputFile, len(imageFiles))
+ for i, imageFile := range imageFiles {
+ inputFiles[i] = newInputFile(imageFile)
+ }
+ return inputFiles
+}
+
+// FreeMessageRangeStrings gets the free MessageRange strings for the target files.
+//
+// Recursive.
+func FreeMessageRangeStrings(
+ ctx context.Context,
+ filePaths []string,
+ image bufimage.Image,
+) ([]string, error) {
+ var s []string
+ for _, filePath := range filePaths {
+ imageFile := image.GetFile(filePath)
+ if imageFile == nil {
+ return nil, fmt.Errorf("unexpected nil image file: %q", filePath)
+ }
+ file, err := protosource.NewFile(newInputFile(imageFile))
+ if err != nil {
+ return nil, err
+ }
+ for _, message := range file.Messages() {
+ s = freeMessageRangeStringsRec(s, message)
+ }
+ }
+ return s, nil
+}
+
+// ImageFilterOption is an option that can be passed to ImageFilteredByTypesWithOptions.
+type ImageFilterOption func(*imageFilterOptions)
+
+// WithExcludeCustomOptions returns an option that will cause an image filtered via
+// ImageFilteredByTypesWithOptions to *not* include custom options unless they are
+// explicitly named in the list of filter types.
+func WithExcludeCustomOptions() ImageFilterOption {
+ return func(opts *imageFilterOptions) {
+ opts.includeCustomOptions = false
+ }
+}
+
+// WithExcludeKnownExtensions returns an option that will cause an image filtered via
+// ImageFilteredByTypesWithOptions to *not* include the known extensions for included
+// extendable messages unless they are explicitly named in the list of filter types.
+func WithExcludeKnownExtensions() ImageFilterOption {
+ return func(opts *imageFilterOptions) {
+ opts.includeKnownExtensions = false
+ }
+}
+
+// WithAllowFilterByImportedType returns an option for ImageFilteredByTypesWithOptions
+// that allows a named filter type to be in an imported file or module. Without this
+// option, only types defined directly in the image to be filtered are allowed.
+func WithAllowFilterByImportedType() ImageFilterOption {
+ return func(opts *imageFilterOptions) {
+ opts.allowImportedTypes = true
+ }
+}
+
+// ImageFilteredByTypes returns a minimal image containing only the descriptors
+// required to define those types. The resulting contains only files in which
+// those descriptors and their transitive closure of required descriptors, with
+// each file only contains the minimal required types and imports.
+//
+// Although this returns a new [bufimage.Image], it mutates the original image's
+// underlying file's [descriptorpb.FileDescriptorProto]. So the old image should
+// not continue to be used.
+//
+// A descriptor is said to require another descriptor if the dependent
+// descriptor is needed to accurately and completely describe that descriptor.
+// For the following types that includes:
+//
+// Messages
+// - messages & enums referenced in fields
+// - proto2 extension declarations for this field
+// - custom options for the message, its fields, and the file in which the
+// message is defined
+// - the parent message if this message is a nested definition
+//
+// Enums
+// - Custom options used in the enum, enum values, and the file
+// in which the message is defined
+// - the parent message if this message is a nested definition
+//
+// Services
+// - request & response types referenced in methods
+// - custom options for the service, its methods, and the file
+// in which the message is defined
+//
+// As an example, consider the following proto structure:
+//
+// --- foo.proto ---
+// package pkg;
+// message Foo {
+// optional Bar bar = 1;
+// extensions 2 to 3;
+// }
+// message Bar { ... }
+// message Baz {
+// other.Qux qux = 1 [(other.my_option).field = "buf"];
+// }
+// --- baz.proto ---
+// package other;
+// extend Foo {
+// optional Qux baz = 2;
+// }
+// message Qux{ ... }
+// message Quux{ ... }
+// extend google.protobuf.FieldOptions {
+// optional Quux my_option = 51234;
+// }
+//
+// A filtered image for type `pkg.Foo` would include
+//
+// files: [foo.proto, bar.proto]
+// messages: [pkg.Foo, pkg.Bar, other.Qux]
+// extensions: [other.baz]
+//
+// A filtered image for type `pkg.Bar` would include
+//
+// files: [foo.proto]
+// messages: [pkg.Bar]
+//
+// A filtered image for type `pkg.Baz` would include
+// files: [foo.proto, bar.proto]
+// messages: [pkg.Baz, other.Quux, other.Qux]
+// extensions: [other.my_option]
+func ImageFilteredByTypes(image bufimage.Image, types ...string) (bufimage.Image, error) {
+ return ImageFilteredByTypesWithOptions(image, types)
+}
+
+// ImageFilteredByTypesWithOptions returns a minimal image containing only the descriptors
+// required to define those types. See ImageFilteredByTypes for more details. This version
+// allows for customizing the behavior with options.
+func ImageFilteredByTypesWithOptions(image bufimage.Image, types []string, opts ...ImageFilterOption) (bufimage.Image, error) {
+ options := newImageFilterOptions()
+ for _, o := range opts {
+ o(options)
+ }
+
+ imageIndex, err := newImageIndexForImage(image, options)
+ if err != nil {
+ return nil, err
+ }
+ // Check types exist
+ startingDescriptors := make([]namedDescriptor, 0, len(types))
+ for _, typeName := range types {
+ startingDescriptor, ok := imageIndex.ByName[typeName]
+ if !ok {
+ return nil, fmt.Errorf("filtering by type %q: %w", typeName, ErrImageFilterTypeNotFound)
+ }
+ typeInfo := imageIndex.ByDescriptor[startingDescriptor]
+ if image.GetFile(typeInfo.file).IsImport() && !options.allowImportedTypes {
+ return nil, fmt.Errorf("filtering by type %q: %w", typeName, ErrImageFilterTypeIsImport)
+ }
+ startingDescriptors = append(startingDescriptors, startingDescriptor)
+ }
+ // Find all types to include in filtered image.
+ closure := newTransitiveClosure()
+ for _, startingDescriptor := range startingDescriptors {
+ if err := closure.addElement(startingDescriptor, "", false, imageIndex, options); err != nil {
+ return nil, err
+ }
+ }
+ // After all typs are added, add their known extensions
+ if err := closure.addExtensions(imageIndex, options); err != nil {
+ return nil, err
+ }
+ // Create a new image with only the required descriptors.
+ var includedFiles []bufimage.ImageFile
+ for _, imageFile := range image.Files() {
+ _, ok := closure.files[imageFile.Path()]
+ if !ok {
+ continue
+ }
+ includedFiles = append(includedFiles, imageFile)
+ imageFileDescriptor := imageFile.Proto()
+
+ importsRequired := closure.imports[imageFile.Path()]
+ // While employing
+ // https://github.com/golang/go/wiki/SliceTricks#filter-in-place,
+ // also keep a record of which index moved where, so we can fixup
+ // the file's WeakDependency field.
+ indexFromTo := make(map[int32]int32)
+ indexTo := 0
+ for indexFrom, importPath := range imageFileDescriptor.GetDependency() {
+ if _, ok := importsRequired[importPath]; ok {
+ indexFromTo[int32(indexFrom)] = int32(indexTo)
+ imageFileDescriptor.Dependency[indexTo] = importPath
+ indexTo++
+ // delete them as we go, so we know which ones weren't in the list
+ delete(importsRequired, importPath)
+ }
+ }
+ imageFileDescriptor.Dependency = imageFileDescriptor.Dependency[:indexTo]
+
+ // Add any other imports (which may not have been in the list because
+ // they were picked up via a public import). The filtered files will not
+ // use public imports.
+ for importPath := range importsRequired {
+ imageFileDescriptor.Dependency = append(imageFileDescriptor.Dependency, importPath)
+ }
+ imageFileDescriptor.PublicDependency = nil
+
+ i := 0
+ for _, indexFrom := range imageFileDescriptor.WeakDependency {
+ if indexTo, ok := indexFromTo[indexFrom]; ok {
+ imageFileDescriptor.WeakDependency[i] = indexTo
+ i++
+ }
+ }
+ imageFileDescriptor.WeakDependency = imageFileDescriptor.WeakDependency[:i]
+
+ imageFileDescriptor.MessageType = trimMessageDescriptors(imageFileDescriptor.MessageType, closure.elements)
+ imageFileDescriptor.EnumType = trimSlice(imageFileDescriptor.EnumType, closure.elements)
+ imageFileDescriptor.Extension = trimSlice(imageFileDescriptor.Extension, closure.elements)
+ imageFileDescriptor.Service = trimSlice(imageFileDescriptor.Service, closure.elements)
+ for _, serviceDescriptor := range imageFileDescriptor.Service {
+ serviceDescriptor.Method = trimSlice(serviceDescriptor.Method, closure.elements)
+ }
+
+ // TODO: With some from/to mappings, perhaps even sourcecodeinfo
+ // isn't too bad.
+ imageFileDescriptor.SourceCodeInfo = nil
+ }
+ return bufimage.NewImage(includedFiles)
+}
+
+// trimMessageDescriptors removes (nested) messages and nested enums from a slice
+// of message descriptors if their type names are not found in the toKeep map.
+func trimMessageDescriptors(in []*descriptorpb.DescriptorProto, toKeep map[namedDescriptor]closureInclusionMode) []*descriptorpb.DescriptorProto {
+ in = trimSlice(in, toKeep)
+ for _, messageDescriptor := range in {
+ mode, ok := toKeep[messageDescriptor]
+ if !ok {
+ continue
+ }
+ if mode == inclusionModeEnclosing {
+ // if this is just an enclosing element, we only care about it as a namespace for
+ // other types and don't care about the rest of its contents
+ messageDescriptor.Field = nil
+ messageDescriptor.OneofDecl = nil
+ messageDescriptor.ExtensionRange = nil
+ messageDescriptor.ReservedRange = nil
+ messageDescriptor.ReservedName = nil
+ }
+ messageDescriptor.NestedType = trimMessageDescriptors(messageDescriptor.NestedType, toKeep)
+ messageDescriptor.EnumType = trimSlice(messageDescriptor.EnumType, toKeep)
+ messageDescriptor.Extension = trimSlice(messageDescriptor.Extension, toKeep)
+ }
+ return in
+}
+
+// trimSlice removes elements from a slice of descriptors if they are
+// not present in the given map.
+func trimSlice[T namedDescriptor](in []T, toKeep map[namedDescriptor]closureInclusionMode) []T {
+ i := 0
+ for _, descriptor := range in {
+ if _, ok := toKeep[descriptor]; ok {
+ in[i] = descriptor
+ i++
+ }
+ }
+ return in[:i]
+}
+
+// transitiveClosure accumulates the elements, files, and needed imports for a
+// subset of an image. When an element is added to the closure, all of its
+// dependencies are recursively added.
+type transitiveClosure struct {
+ elements map[namedDescriptor]closureInclusionMode
+ files map[string]struct{}
+ imports map[string]map[string]struct{}
+}
+
+type closureInclusionMode int
+
+const (
+ // Element is included in closure because it is directly reachable from a root.
+ inclusionModeExplicit = closureInclusionMode(iota)
+ // Element is included in closure because it is a message or service that
+ // *contains* an explicitly included element but is not itself directly
+ // reachable.
+ inclusionModeEnclosing
+ // Element is included in closure because it is implied by the presence of a
+ // custom option. For example, a field element with a custom option implies
+ // the presence of google.protobuf.FieldOptions. An option type could instead be
+ // explicitly included if it is also directly reachable (i.e. some type in the
+ // graph explicitly refers to the option type).
+ inclusionModeImplicit
+)
+
+func newTransitiveClosure() *transitiveClosure {
+ return &transitiveClosure{
+ elements: map[namedDescriptor]closureInclusionMode{},
+ files: map[string]struct{}{},
+ imports: map[string]map[string]struct{}{},
+ }
+}
+
+func (t *transitiveClosure) addImport(fromPath, toPath string) {
+ if fromPath == toPath {
+ return // no need for a file to import itself
+ }
+ imps := t.imports[fromPath]
+ if imps == nil {
+ imps = map[string]struct{}{}
+ t.imports[fromPath] = imps
+ }
+ imps[toPath] = struct{}{}
+}
+
+func (t *transitiveClosure) addFile(file string, imageIndex *imageIndex, opts *imageFilterOptions) error {
+ if _, ok := t.files[file]; ok {
+ return nil // already added
+ }
+ t.files[file] = struct{}{}
+ return t.exploreCustomOptions(imageIndex.Files[file], file, imageIndex, opts)
+}
+
+func (t *transitiveClosure) addElement(
+ descriptor namedDescriptor,
+ referrerFile string,
+ impliedByCustomOption bool,
+ imageIndex *imageIndex,
+ opts *imageFilterOptions,
+) error {
+ descriptorInfo := imageIndex.ByDescriptor[descriptor]
+ if err := t.addFile(descriptorInfo.file, imageIndex, opts); err != nil {
+ return err
+ }
+ if referrerFile != "" {
+ t.addImport(referrerFile, descriptorInfo.file)
+ }
+
+ if existingMode, ok := t.elements[descriptor]; ok && existingMode != inclusionModeEnclosing {
+ if existingMode == inclusionModeImplicit && !impliedByCustomOption {
+ // upgrade from implied to explicitly part of closure
+ t.elements[descriptor] = inclusionModeExplicit
+ }
+ return nil // already added this element
+ }
+ if impliedByCustomOption {
+ t.elements[descriptor] = inclusionModeImplicit
+ } else {
+ t.elements[descriptor] = inclusionModeExplicit
+ }
+
+ // if this type is enclosed inside another, add enclosing types
+ if err := t.addEnclosing(descriptorInfo.parent, descriptorInfo.file, imageIndex, opts); err != nil {
+ return err
+ }
+ // add any custom options and their dependencies
+ if err := t.exploreCustomOptions(descriptor, descriptorInfo.file, imageIndex, opts); err != nil {
+ return err
+ }
+
+ switch typedDescriptor := descriptor.(type) {
+ case *descriptorpb.DescriptorProto:
+ // Options and types for all fields
+ for _, field := range typedDescriptor.GetField() {
+ if err := t.addFieldType(field, descriptorInfo.file, imageIndex, opts); err != nil {
+ return err
+ }
+ if err := t.exploreCustomOptions(field, referrerFile, imageIndex, opts); err != nil {
+ return err
+ }
+ }
+ // Options for all oneofs in this message
+ for _, oneOfDescriptor := range typedDescriptor.GetOneofDecl() {
+ if err := t.exploreCustomOptions(oneOfDescriptor, descriptorInfo.file, imageIndex, opts); err != nil {
+ return err
+ }
+ }
+ // Options for all extension ranges in this message
+ for _, extRange := range typedDescriptor.GetExtensionRange() {
+ if err := t.exploreCustomOptions(extRange, descriptorInfo.file, imageIndex, opts); err != nil {
+ return err
+ }
+ }
+
+ case *descriptorpb.EnumDescriptorProto:
+ for _, enumValue := range typedDescriptor.GetValue() {
+ if err := t.exploreCustomOptions(enumValue, descriptorInfo.file, imageIndex, opts); err != nil {
+ return err
+ }
+ }
+
+ case *descriptorpb.ServiceDescriptorProto:
+ for _, method := range typedDescriptor.GetMethod() {
+ if err := t.addElement(method, "", false, imageIndex, opts); err != nil {
+ return err
+ }
+ }
+
+ case *descriptorpb.MethodDescriptorProto:
+ inputName := strings.TrimPrefix(typedDescriptor.GetInputType(), ".")
+ inputDescriptor, ok := imageIndex.ByName[inputName]
+ if !ok {
+ return fmt.Errorf("missing %q", inputName)
+ }
+ if err := t.addElement(inputDescriptor, descriptorInfo.file, false, imageIndex, opts); err != nil {
+ return err
+ }
+
+ outputName := strings.TrimPrefix(typedDescriptor.GetOutputType(), ".")
+ outputDescriptor, ok := imageIndex.ByName[outputName]
+ if !ok {
+ return fmt.Errorf("missing %q", outputName)
+ }
+ if err := t.addElement(outputDescriptor, descriptorInfo.file, false, imageIndex, opts); err != nil {
+ return err
+ }
+
+ case *descriptorpb.FieldDescriptorProto:
+ // Regular fields are handled above in message descriptor case.
+ // We should only find our way here for extensions.
+ if typedDescriptor.Extendee == nil {
+ return errorUnsupportedFilterType(descriptor, descriptorInfo.fullName)
+ }
+ if typedDescriptor.GetExtendee() == "" {
+ return fmt.Errorf("expected extendee for field %q to not be empty", descriptorInfo.fullName)
+ }
+ extendeeName := strings.TrimPrefix(typedDescriptor.GetExtendee(), ".")
+ extendeeDescriptor, ok := imageIndex.ByName[extendeeName]
+ if !ok {
+ return fmt.Errorf("missing %q", extendeeName)
+ }
+ if err := t.addElement(extendeeDescriptor, descriptorInfo.file, impliedByCustomOption, imageIndex, opts); err != nil {
+ return err
+ }
+ if err := t.addFieldType(typedDescriptor, descriptorInfo.file, imageIndex, opts); err != nil {
+ return err
+ }
+
+ default:
+ return errorUnsupportedFilterType(descriptor, descriptorInfo.fullName)
+ }
+
+ return nil
+}
+
+func errorUnsupportedFilterType(descriptor namedDescriptor, fullName string) error {
+ var descriptorType string
+ switch d := descriptor.(type) {
+ case *descriptorpb.FileDescriptorProto:
+ descriptorType = "file"
+ case *descriptorpb.DescriptorProto:
+ descriptorType = "message"
+ case *descriptorpb.FieldDescriptorProto:
+ if d.Extendee != nil {
+ descriptorType = "extension field"
+ } else {
+ descriptorType = "non-extension field"
+ }
+ case *descriptorpb.OneofDescriptorProto:
+ descriptorType = "oneof"
+ case *descriptorpb.EnumDescriptorProto:
+ descriptorType = "enum"
+ case *descriptorpb.EnumValueDescriptorProto:
+ descriptorType = "enum value"
+ case *descriptorpb.ServiceDescriptorProto:
+ descriptorType = "service"
+ case *descriptorpb.MethodDescriptorProto:
+ descriptorType = "method"
+ default:
+ descriptorType = fmt.Sprintf("%T", d)
+ }
+ return fmt.Errorf("%s is unsupported filter type: %s", fullName, descriptorType)
+}
+
+func (t *transitiveClosure) addEnclosing(descriptor namedDescriptor, enclosingFile string, imageIndex *imageIndex, opts *imageFilterOptions) error {
+ // loop through all enclosing parents since nesting level
+ // could be arbitrarily deep
+ for descriptor != nil {
+ _, isMsg := descriptor.(*descriptorpb.DescriptorProto)
+ _, isSvc := descriptor.(*descriptorpb.ServiceDescriptorProto)
+ if !isMsg && !isSvc {
+ break // not an enclosing type
+ }
+ if _, ok := t.elements[descriptor]; ok {
+ break // already in closure
+ }
+ t.elements[descriptor] = inclusionModeEnclosing
+ if err := t.exploreCustomOptions(descriptor, enclosingFile, imageIndex, opts); err != nil {
+ return err
+ }
+ // now move into this element's parent
+ descriptor = imageIndex.ByDescriptor[descriptor].parent
+ }
+ return nil
+}
+
+func (t *transitiveClosure) addFieldType(field *descriptorpb.FieldDescriptorProto, referrerFile string, imageIndex *imageIndex, opts *imageFilterOptions) error {
+ switch field.GetType() {
+ case descriptorpb.FieldDescriptorProto_TYPE_ENUM,
+ descriptorpb.FieldDescriptorProto_TYPE_MESSAGE,
+ descriptorpb.FieldDescriptorProto_TYPE_GROUP:
+ typeName := strings.TrimPrefix(field.GetTypeName(), ".")
+ typeDescriptor, ok := imageIndex.ByName[typeName]
+ if !ok {
+ return fmt.Errorf("missing %q", typeName)
+ }
+ err := t.addElement(typeDescriptor, referrerFile, false, imageIndex, opts)
+ if err != nil {
+ return err
+ }
+ case descriptorpb.FieldDescriptorProto_TYPE_DOUBLE,
+ descriptorpb.FieldDescriptorProto_TYPE_FLOAT,
+ descriptorpb.FieldDescriptorProto_TYPE_INT64,
+ descriptorpb.FieldDescriptorProto_TYPE_UINT64,
+ descriptorpb.FieldDescriptorProto_TYPE_INT32,
+ descriptorpb.FieldDescriptorProto_TYPE_FIXED64,
+ descriptorpb.FieldDescriptorProto_TYPE_FIXED32,
+ descriptorpb.FieldDescriptorProto_TYPE_BOOL,
+ descriptorpb.FieldDescriptorProto_TYPE_STRING,
+ descriptorpb.FieldDescriptorProto_TYPE_BYTES,
+ descriptorpb.FieldDescriptorProto_TYPE_UINT32,
+ descriptorpb.FieldDescriptorProto_TYPE_SFIXED32,
+ descriptorpb.FieldDescriptorProto_TYPE_SFIXED64,
+ descriptorpb.FieldDescriptorProto_TYPE_SINT32,
+ descriptorpb.FieldDescriptorProto_TYPE_SINT64:
+ // nothing to follow, custom options handled below.
+ default:
+ return fmt.Errorf("unknown field type %d", field.GetType())
+ }
+ return nil
+}
+
+func (t *transitiveClosure) addExtensions(
+ imageIndex *imageIndex,
+ opts *imageFilterOptions,
+) error {
+ if !opts.includeKnownExtensions {
+ return nil // nothing to do
+ }
+ for e, mode := range t.elements {
+ if mode != inclusionModeExplicit {
+ // we only collect extensions for messages that are directly reachable/referenced.
+ continue
+ }
+ msgDescriptor, ok := e.(*descriptorpb.DescriptorProto)
+ if !ok {
+ // not a message, nothing to do
+ continue
+ }
+ descriptorInfo := imageIndex.ByDescriptor[msgDescriptor]
+ for _, extendsDescriptor := range imageIndex.NameToExtensions[descriptorInfo.fullName] {
+ if err := t.addElement(extendsDescriptor, "", false, imageIndex, opts); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func (t *transitiveClosure) exploreCustomOptions(
+ descriptor proto.Message,
+ referrerFile string,
+ imageIndex *imageIndex,
+ opts *imageFilterOptions,
+) error {
+ if !opts.includeCustomOptions {
+ return nil
+ }
+
+ var options protoreflect.Message
+ switch descriptor := descriptor.(type) {
+ case *descriptorpb.FileDescriptorProto:
+ options = descriptor.GetOptions().ProtoReflect()
+ case *descriptorpb.DescriptorProto:
+ options = descriptor.GetOptions().ProtoReflect()
+ case *descriptorpb.FieldDescriptorProto:
+ options = descriptor.GetOptions().ProtoReflect()
+ case *descriptorpb.OneofDescriptorProto:
+ options = descriptor.GetOptions().ProtoReflect()
+ case *descriptorpb.EnumDescriptorProto:
+ options = descriptor.GetOptions().ProtoReflect()
+ case *descriptorpb.EnumValueDescriptorProto:
+ options = descriptor.GetOptions().ProtoReflect()
+ case *descriptorpb.ServiceDescriptorProto:
+ options = descriptor.GetOptions().ProtoReflect()
+ case *descriptorpb.MethodDescriptorProto:
+ options = descriptor.GetOptions().ProtoReflect()
+ case *descriptorpb.DescriptorProto_ExtensionRange:
+ options = descriptor.GetOptions().ProtoReflect()
+ default:
+ return fmt.Errorf("unexpected type for exploring options %T", descriptor)
+ }
+
+ optionsName := string(options.Descriptor().FullName())
+ var err error
+ options.Range(func(fd protoreflect.FieldDescriptor, val protoreflect.Value) bool {
+ if !fd.IsExtension() {
+ return true
+ }
+ optionsByNumber := imageIndex.NameToOptions[optionsName]
+ field, ok := optionsByNumber[int32(fd.Number())]
+ if !ok {
+ err = fmt.Errorf("cannot find ext no %d on %s", fd.Number(), optionsName)
+ return false
+ }
+ err = t.addElement(field, referrerFile, true, imageIndex, opts)
+ return err == nil
+ })
+ return err
+}
+
+func freeMessageRangeStringsRec(
+ s []string,
+ message protosource.Message,
+) []string {
+ for _, nestedMessage := range message.Messages() {
+ s = freeMessageRangeStringsRec(s, nestedMessage)
+ }
+ if e := protosource.FreeMessageRangeString(message); e != "" {
+ return append(s, e)
+ }
+ return s
+}
+
+type imageFilterOptions struct {
+ includeCustomOptions bool
+ includeKnownExtensions bool
+ allowImportedTypes bool
+}
+
+func newImageFilterOptions() *imageFilterOptions {
+ return &imageFilterOptions{
+ includeCustomOptions: true,
+ includeKnownExtensions: true,
+ allowImportedTypes: false,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/image_index.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/image_index.go
new file mode 100644
index 000000000..5e1fd36ff
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/image_index.go
@@ -0,0 +1,153 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimageutil
+
+import (
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/protocompile/walk"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// imageIndex holds an index that allows for easily navigating a descriptor
+// hierarchy and its relationships.
+type imageIndex struct {
+ // ByDescriptor maps descriptor proto pointers to information about the
+ // element. The info includes the actual descriptor proto, its parent
+ // element (if it has one), and the file in which it is defined.
+ ByDescriptor map[namedDescriptor]elementInfo
+ // ByName maps fully qualified type names to information about the named
+ // element.
+ ByName map[string]namedDescriptor
+ // Files maps fully qualified type names to the path of the file that
+ // declares the type.
+ Files map[string]*descriptorpb.FileDescriptorProto
+
+ // NameToExtensions maps fully qualified type names to all known
+ // extension definitions for a type name.
+ NameToExtensions map[string][]*descriptorpb.FieldDescriptorProto
+
+ // NameToOptions maps `google.protobuf.*Options` type names to their
+ // known extensions by field tag.
+ NameToOptions map[string]map[int32]*descriptorpb.FieldDescriptorProto
+}
+
+type namedDescriptor interface {
+ proto.Message
+ GetName() string
+}
+
+var _ namedDescriptor = (*descriptorpb.FileDescriptorProto)(nil)
+var _ namedDescriptor = (*descriptorpb.DescriptorProto)(nil)
+var _ namedDescriptor = (*descriptorpb.FieldDescriptorProto)(nil)
+var _ namedDescriptor = (*descriptorpb.OneofDescriptorProto)(nil)
+var _ namedDescriptor = (*descriptorpb.EnumDescriptorProto)(nil)
+var _ namedDescriptor = (*descriptorpb.EnumValueDescriptorProto)(nil)
+var _ namedDescriptor = (*descriptorpb.ServiceDescriptorProto)(nil)
+var _ namedDescriptor = (*descriptorpb.MethodDescriptorProto)(nil)
+
+type elementInfo struct {
+ fullName, file string
+ parent namedDescriptor
+}
+
+// newImageIndexForImage builds an imageIndex for a given image.
+func newImageIndexForImage(image bufimage.Image, opts *imageFilterOptions) (*imageIndex, error) {
+ index := &imageIndex{
+ ByName: make(map[string]namedDescriptor),
+ ByDescriptor: make(map[namedDescriptor]elementInfo),
+ Files: make(map[string]*descriptorpb.FileDescriptorProto),
+ }
+ if opts.includeCustomOptions {
+ index.NameToOptions = make(map[string]map[int32]*descriptorpb.FieldDescriptorProto)
+ }
+ if opts.includeKnownExtensions {
+ index.NameToExtensions = make(map[string][]*descriptorpb.FieldDescriptorProto)
+ }
+
+ for _, file := range image.Files() {
+ fileName := file.Path()
+ fileDescriptorProto := file.Proto()
+ index.Files[fileName] = fileDescriptorProto
+ err := walk.DescriptorProtos(fileDescriptorProto, func(name protoreflect.FullName, msg proto.Message) error {
+ if existing := index.ByName[string(name)]; existing != nil {
+ return fmt.Errorf("duplicate for %q", name)
+ }
+ descriptor, ok := msg.(namedDescriptor)
+ if !ok {
+ return fmt.Errorf("unexpected descriptor type %T", msg)
+ }
+ var parent namedDescriptor
+ if pos := strings.LastIndexByte(string(name), '.'); pos != -1 {
+ parent = index.ByName[string(name[:pos])]
+ if parent == nil {
+ // parent name was a package name, not an element name
+ parent = fileDescriptorProto
+ }
+ }
+
+ index.ByName[string(name)] = descriptor
+ index.ByDescriptor[descriptor] = elementInfo{
+ fullName: string(name),
+ parent: parent,
+ file: fileName,
+ }
+
+ ext, ok := descriptor.(*descriptorpb.FieldDescriptorProto)
+ if !ok || ext.Extendee == nil {
+ // not an extension, so the rest does not apply
+ return nil
+ }
+
+ extendeeName := strings.TrimPrefix(ext.GetExtendee(), ".")
+ if opts.includeCustomOptions && isOptionsTypeName(extendeeName) {
+ if _, ok := index.NameToOptions[extendeeName]; !ok {
+ index.NameToOptions[extendeeName] = make(map[int32]*descriptorpb.FieldDescriptorProto)
+ }
+ index.NameToOptions[extendeeName][ext.GetNumber()] = ext
+ }
+ if opts.includeKnownExtensions {
+ index.NameToExtensions[extendeeName] = append(index.NameToExtensions[extendeeName], ext)
+ }
+
+ return nil
+ })
+ if err != nil {
+ return nil, err
+ }
+ }
+ return index, nil
+}
+
+func isOptionsTypeName(typeName string) bool {
+ switch typeName {
+ case "google.protobuf.FileOptions",
+ "google.protobuf.MessageOptions",
+ "google.protobuf.FieldOptions",
+ "google.protobuf.OneofOptions",
+ "google.protobuf.ExtensionRangeOptions",
+ "google.protobuf.EnumOptions",
+ "google.protobuf.EnumValueOptions",
+ "google.protobuf.ServiceOptions",
+ "google.protobuf.MethodOptions":
+ return true
+ default:
+ return false
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/input_file.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/input_file.go
new file mode 100644
index 000000000..81f30eee6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/input_file.go
@@ -0,0 +1,34 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimageutil
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "github.com/bufbuild/buf/private/pkg/protosource"
+)
+
+type inputFile struct {
+ bufimage.ImageFile
+}
+
+func newInputFile(imageFile bufimage.ImageFile) *inputFile {
+ return &inputFile{
+ ImageFile: imageFile,
+ }
+}
+
+func (i *inputFile) ModuleIdentity() protosource.ModuleIdentity {
+ return i.ImageFile.ModuleIdentity()
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/usage.gen.go
new file mode 100644
index 000000000..d43ca3e04
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/bufimageutil/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufimageutil
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/image.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/image.go
new file mode 100644
index 000000000..53fbc85a0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/image.go
@@ -0,0 +1,113 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimage
+
+import (
+ "errors"
+ "fmt"
+)
+
+var _ Image = &image{}
+
+type image struct {
+ files []ImageFile
+ pathToImageFile map[string]ImageFile
+}
+
+func newImage(files []ImageFile, reorder bool) (*image, error) {
+ if len(files) == 0 {
+ return nil, errors.New("image contains no files")
+ }
+ pathToImageFile := make(map[string]ImageFile, len(files))
+ for _, file := range files {
+ path := file.Path()
+ if _, ok := pathToImageFile[path]; ok {
+ return nil, fmt.Errorf("duplicate file: %s", path)
+ }
+ pathToImageFile[path] = file
+ }
+ if reorder {
+ files = orderImageFiles(files, pathToImageFile)
+ }
+ return &image{
+ files: files,
+ pathToImageFile: pathToImageFile,
+ }, nil
+}
+
+func newImageNoValidate(files []ImageFile) *image {
+ pathToImageFile := make(map[string]ImageFile, len(files))
+ for _, file := range files {
+ path := file.Path()
+ pathToImageFile[path] = file
+ }
+ return &image{
+ files: files,
+ pathToImageFile: pathToImageFile,
+ }
+}
+
+func (i *image) Files() []ImageFile {
+ return i.files
+}
+
+func (i *image) GetFile(path string) ImageFile {
+ return i.pathToImageFile[path]
+}
+
+func (*image) isImage() {}
+
+// orderImageFiles re-orders the ImageFiles in DAG order.
+func orderImageFiles(
+ inputImageFiles []ImageFile,
+ pathToImageFile map[string]ImageFile,
+) []ImageFile {
+ outputImageFiles := make([]ImageFile, 0, len(inputImageFiles))
+ alreadySeen := map[string]struct{}{}
+ for _, inputImageFile := range inputImageFiles {
+ outputImageFiles = orderImageFilesRec(
+ inputImageFile,
+ outputImageFiles,
+ pathToImageFile,
+ alreadySeen,
+ )
+ }
+ return outputImageFiles
+}
+
+func orderImageFilesRec(
+ inputImageFile ImageFile,
+ outputImageFiles []ImageFile,
+ pathToImageFile map[string]ImageFile,
+ alreadySeen map[string]struct{},
+) []ImageFile {
+ path := inputImageFile.Path()
+ if _, ok := alreadySeen[path]; ok {
+ return outputImageFiles
+ }
+ alreadySeen[path] = struct{}{}
+ for _, dependency := range inputImageFile.FileDescriptor().GetDependency() {
+ dependencyImageFile, ok := pathToImageFile[dependency]
+ if ok {
+ outputImageFiles = orderImageFilesRec(
+ dependencyImageFile,
+ outputImageFiles,
+ pathToImageFile,
+ alreadySeen,
+ )
+ }
+ }
+ return append(outputImageFiles, inputImageFile)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/image_file.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/image_file.go
new file mode 100644
index 000000000..35aaab99c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/image_file.go
@@ -0,0 +1,94 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimage
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/protodescriptor"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+var _ ImageFile = &imageFile{}
+
+type imageFile struct {
+ bufmoduleref.FileInfo
+
+ fileDescriptorProto *descriptorpb.FileDescriptorProto
+
+ isSyntaxUnspecified bool
+ storedUnusedDependencyIndexes []int32
+}
+
+func newImageFile(
+ fileDescriptor protodescriptor.FileDescriptor,
+ moduleIdentity bufmoduleref.ModuleIdentity,
+ commit string,
+ externalPath string,
+ isImport bool,
+ isSyntaxUnspecified bool,
+ unusedDependencyIndexes []int32,
+) (*imageFile, error) {
+ if err := protodescriptor.ValidateFileDescriptor(fileDescriptor); err != nil {
+ return nil, err
+ }
+ fileInfo, err := bufmoduleref.NewFileInfo(
+ fileDescriptor.GetName(),
+ externalPath,
+ isImport,
+ moduleIdentity,
+ commit,
+ )
+ if err != nil {
+ return nil, err
+ }
+ // just to normalize in other places between empty and unset
+ if len(unusedDependencyIndexes) == 0 {
+ unusedDependencyIndexes = nil
+ }
+ return &imageFile{
+ FileInfo: fileInfo,
+ // protodescriptor.FileDescriptorProtoForFileDescriptor is a no-op if fileDescriptor
+ // is already a *descriptorpb.FileDescriptorProto
+ fileDescriptorProto: protodescriptor.FileDescriptorProtoForFileDescriptor(fileDescriptor),
+ isSyntaxUnspecified: isSyntaxUnspecified,
+ storedUnusedDependencyIndexes: unusedDependencyIndexes,
+ }, nil
+}
+
+func (f *imageFile) Proto() *descriptorpb.FileDescriptorProto {
+ return f.fileDescriptorProto
+}
+
+func (f *imageFile) FileDescriptor() protodescriptor.FileDescriptor {
+ return f.fileDescriptorProto
+}
+
+func (f *imageFile) IsSyntaxUnspecified() bool {
+ return f.isSyntaxUnspecified
+}
+
+func (f *imageFile) UnusedDependencyIndexes() []int32 {
+ return f.storedUnusedDependencyIndexes
+}
+
+func (f *imageFile) withIsImport(isImport bool) ImageFile {
+ return &imageFile{
+ FileInfo: f.FileInfo.WithIsImport(isImport),
+ fileDescriptorProto: f.fileDescriptorProto,
+ isSyntaxUnspecified: f.isSyntaxUnspecified,
+ }
+}
+
+func (*imageFile) isImageFile() {}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/usage.gen.go
new file mode 100644
index 000000000..143ce9b81
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufimage
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/util.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/util.go
new file mode 100644
index 000000000..19d929a5a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/util.go
@@ -0,0 +1,448 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimage
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/data/datawkt"
+ imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/protodescriptor"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+// paths can be either files (ending in .proto) or directories
+// paths must be normalized and validated, and not duplicated
+// if a directory, all .proto files underneath will be included
+func imageWithOnlyPaths(image Image, fileOrDirPaths []string, excludeFileOrDirPaths []string, allowNotExist bool) (Image, error) {
+ if err := normalpath.ValidatePathsNormalizedValidatedUnique(fileOrDirPaths); err != nil {
+ return nil, err
+ }
+ if err := normalpath.ValidatePathsNormalizedValidatedUnique(excludeFileOrDirPaths); err != nil {
+ return nil, err
+ }
+ excludeFileOrDirPathMap := stringutil.SliceToMap(excludeFileOrDirPaths)
+ // These are the files that fileOrDirPaths actually reference and will
+ // result in the non-imports in our resulting Image. The Image will also include
+ // the ImageFiles that the nonImportImageFiles import
+ nonImportPaths := make(map[string]struct{})
+ var nonImportImageFiles []ImageFile
+ // We have only exclude paths, and therefore all other paths are target paths.
+ if len(fileOrDirPaths) == 0 && len(excludeFileOrDirPaths) > 0 {
+ for _, imageFile := range image.Files() {
+ if !imageFile.IsImport() {
+ if !normalpath.MapHasEqualOrContainingPath(excludeFileOrDirPathMap, imageFile.Path(), normalpath.Relative) {
+ nonImportPaths[imageFile.Path()] = struct{}{}
+ nonImportImageFiles = append(nonImportImageFiles, imageFile)
+ }
+ }
+ }
+ // Finally, before we construct the image, we need to validate that all exclude paths
+ // provided adhere to the allowNotExist flag.
+ if !allowNotExist {
+ if err := checkExcludePathsExistInImage(image, excludeFileOrDirPaths); err != nil {
+ return nil, err
+ }
+ }
+ return getImageWithImports(image, nonImportPaths, nonImportImageFiles)
+ }
+ // We do a check here to ensure that no paths are duplicated as a target and an exclude.
+ for _, fileOrDirPath := range fileOrDirPaths {
+ if _, ok := excludeFileOrDirPathMap[fileOrDirPath]; ok {
+ return nil, fmt.Errorf(
+ "cannot set the same path for both --path and --exclude-path flags: %s",
+ normalpath.Unnormalize(fileOrDirPath),
+ )
+ }
+ }
+ // potentialDirPaths are paths that we need to check if they are directories
+ // these are any files that do not end in .proto, as well as files that
+ // end in .proto but do not have a corresponding ImageFile - if there
+ // is not an ImageFile, the path ending in .proto could be a directory
+ // that itself contains ImageFiles, i.e. a/b.proto/c.proto is valid if not dumb
+ var potentialDirPaths []string
+ for _, fileOrDirPath := range fileOrDirPaths {
+ // this is not allowed, this is the equivalent of a root
+ if fileOrDirPath == "." {
+ return nil, errors.New(`"." is not a valid path value`)
+ }
+ if normalpath.Ext(fileOrDirPath) != ".proto" {
+ // not a .proto file, therefore must be a directory
+ potentialDirPaths = append(potentialDirPaths, fileOrDirPath)
+ } else {
+ if imageFile := image.GetFile(fileOrDirPath); imageFile != nil {
+ // We do not need to check excludes here, since we already checked for duplicated
+ // paths, and target files that resolve to a specific image file are always a leaf,
+ // thus, we would always include it if it's specified.
+ // We have an ImageFile, therefore the fileOrDirPath was a file path
+ // add to the nonImportImageFiles if does not already exist
+ if _, ok := nonImportPaths[fileOrDirPath]; !ok {
+ nonImportPaths[fileOrDirPath] = struct{}{}
+ nonImportImageFiles = append(nonImportImageFiles, imageFile)
+ }
+ } else {
+ // we do not have an image file, so even though this path ends
+ // in .proto, this could be a directory - we need to check it
+ potentialDirPaths = append(potentialDirPaths, fileOrDirPath)
+ }
+ }
+ }
+ if len(potentialDirPaths) == 0 {
+ // We had no potential directory paths as we were able to get
+ // an ImageFile for all fileOrDirPaths, so we can return an Image now.
+ // This means we do not have to do the expensive O(image.Files()) operation
+ // to check to see if each file is within a potential directory path.
+ //
+ // We do not need to check the excluded paths for the allowNotExist flag because all target
+ // paths were image files, therefore the exclude paths would not apply in this case.
+ //
+ // Unfortunately, we need to do the expensive operation of checking to make sure the exclude
+ // paths exist in the case where `allowNotExist == false`.
+ if !allowNotExist {
+ if err := checkExcludePathsExistInImage(image, excludeFileOrDirPaths); err != nil {
+ return nil, err
+ }
+ }
+ return getImageWithImports(image, nonImportPaths, nonImportImageFiles)
+ }
+ // we have potential directory paths, do the expensive operation
+ // make a map of the directory paths
+ // note that we do not make this a map to begin with as maps are unordered,
+ // and we want to make sure we iterate over the paths in a deterministic order
+ potentialDirPathMap := stringutil.SliceToMap(potentialDirPaths)
+
+ // map of all paths based on the imageFiles
+ // the map of paths within potentialDirPath that matches a file in image.Files()
+ // this needs to contain all paths in potentialDirPathMap at the end for us to
+ // have had matches for every inputted fileOrDirPath
+ matchingPotentialDirPathMap := make(map[string]struct{})
+ // the same thing is done for exclude paths
+ matchingPotentialExcludePathMap := make(map[string]struct{})
+ for _, imageFile := range image.Files() {
+ imageFilePath := imageFile.Path()
+ fileMatchingExcludePathMap := normalpath.MapAllEqualOrContainingPathMap(
+ excludeFileOrDirPathMap,
+ imageFilePath,
+ normalpath.Relative,
+ )
+ if len(fileMatchingExcludePathMap) > 0 {
+ for key := range fileMatchingExcludePathMap {
+ matchingPotentialExcludePathMap[key] = struct{}{}
+ }
+ }
+ // get the paths in potentialDirPathMap that match this imageFilePath
+ fileMatchingPathMap := normalpath.MapAllEqualOrContainingPathMap(
+ potentialDirPathMap,
+ imageFilePath,
+ normalpath.Relative,
+ )
+ if shouldExcludeFile(fileMatchingPathMap, fileMatchingExcludePathMap) {
+ continue
+ }
+ if len(fileMatchingPathMap) > 0 {
+ // we had a match, this means that some path in potentialDirPaths matched
+ // the imageFilePath, add all the paths in potentialDirPathMap that
+ // matched to matchingPotentialDirPathMap
+ for key := range fileMatchingPathMap {
+ matchingPotentialDirPathMap[key] = struct{}{}
+ }
+ // then, add the file to non-imports if it is not added
+ if _, ok := nonImportPaths[imageFilePath]; !ok {
+ nonImportPaths[imageFilePath] = struct{}{}
+ nonImportImageFiles = append(nonImportImageFiles, imageFile)
+ }
+ }
+ }
+ // if !allowNotExist, i.e. if all fileOrDirPaths must have a matching ImageFile,
+ // we check the matchingPotentialDirPathMap against the potentialDirPathMap
+ // to make sure that potentialDirPathMap is covered
+ if !allowNotExist {
+ for potentialDirPath := range potentialDirPathMap {
+ if _, ok := matchingPotentialDirPathMap[potentialDirPath]; !ok {
+ // no match, this is an error given that allowNotExist is false
+ return nil, fmt.Errorf("path %q has no matching file in the image", potentialDirPath)
+ }
+ }
+ for excludeFileOrDirPath := range excludeFileOrDirPathMap {
+ if _, ok := matchingPotentialExcludePathMap[excludeFileOrDirPath]; !ok {
+ // no match, this is an error given that allowNotExist is false
+ return nil, fmt.Errorf("path %q has no matching file in the image", excludeFileOrDirPath)
+ }
+ }
+ }
+ // we finally have all files that match fileOrDirPath that we can find, make the image
+ return getImageWithImports(image, nonImportPaths, nonImportImageFiles)
+}
+
+// shouldExcludeFile takes the map of all the matching target paths and the map of all the matching
+// exclude paths for an image file and takes the union of the two sets of matches to return
+// a bool on whether or not we should exclude the file from the image.
+func shouldExcludeFile(
+ fileMatchingPathMap map[string]struct{},
+ fileMatchingExcludePathMap map[string]struct{},
+) bool {
+ for fileMatchingPath := range fileMatchingPathMap {
+ for fileMatchingExcludePath := range fileMatchingExcludePathMap {
+ if normalpath.EqualsOrContainsPath(fileMatchingPath, fileMatchingExcludePath, normalpath.Relative) {
+ delete(fileMatchingPathMap, fileMatchingPath)
+ continue
+ }
+ }
+ }
+ // If there are no potential paths remaining,
+ // then the file should be excluded.
+ return len(fileMatchingPathMap) == 0
+}
+
+func getImageWithImports(
+ image Image,
+ nonImportPaths map[string]struct{},
+ nonImportImageFiles []ImageFile,
+) (Image, error) {
+ var imageFiles []ImageFile
+ seenPaths := make(map[string]struct{})
+ for _, nonImportImageFile := range nonImportImageFiles {
+ imageFiles = addFileWithImports(
+ imageFiles,
+ image,
+ nonImportPaths,
+ seenPaths,
+ nonImportImageFile,
+ )
+ }
+ return NewImage(imageFiles)
+}
+
+// returns accumulated files in correct order
+func addFileWithImports(
+ accumulator []ImageFile,
+ image Image,
+ nonImportPaths map[string]struct{},
+ seenPaths map[string]struct{},
+ imageFile ImageFile,
+) []ImageFile {
+ path := imageFile.Path()
+ // if seen already, skip
+ if _, ok := seenPaths[path]; ok {
+ return accumulator
+ }
+ seenPaths[path] = struct{}{}
+
+ // then, add imports first, for proper ordering
+ for _, importPath := range imageFile.FileDescriptor().GetDependency() {
+ if importFile := image.GetFile(importPath); importFile != nil {
+ accumulator = addFileWithImports(
+ accumulator,
+ image,
+ nonImportPaths,
+ seenPaths,
+ importFile,
+ )
+ }
+ }
+
+ // finally, add this file
+ // check if this is an import or not
+ _, isNotImport := nonImportPaths[path]
+ accumulator = append(
+ accumulator,
+ imageFile.withIsImport(!isNotImport),
+ )
+ return accumulator
+}
+
+func checkExcludePathsExistInImage(image Image, excludeFileOrDirPaths []string) error {
+ for _, excludeFileOrDirPath := range excludeFileOrDirPaths {
+ var foundPath bool
+ for _, imageFile := range image.Files() {
+ if normalpath.EqualsOrContainsPath(excludeFileOrDirPath, imageFile.Path(), normalpath.Relative) {
+ foundPath = true
+ break
+ }
+ }
+ if !foundPath {
+ // no match, this is an error given that allowNotExist is false
+ return fmt.Errorf("path %q has no matching file in the image", excludeFileOrDirPath)
+ }
+ }
+ return nil
+}
+
+func protoImageFilesToFileDescriptors(protoImageFiles []*imagev1.ImageFile) []protodescriptor.FileDescriptor {
+ fileDescriptors := make([]protodescriptor.FileDescriptor, len(protoImageFiles))
+ for i, protoImageFile := range protoImageFiles {
+ fileDescriptors[i] = protoImageFile
+ }
+ return fileDescriptors
+}
+
+func imageFilesToFileDescriptors(imageFiles []ImageFile) []protodescriptor.FileDescriptor {
+ fileDescriptors := make([]protodescriptor.FileDescriptor, len(imageFiles))
+ for i, imageFile := range imageFiles {
+ fileDescriptors[i] = imageFile.FileDescriptor()
+ }
+ return fileDescriptors
+}
+
+func imageFilesToFileDescriptorProtos(imageFiles []ImageFile) []*descriptorpb.FileDescriptorProto {
+ fileDescriptorProtos := make([]*descriptorpb.FileDescriptorProto, len(imageFiles))
+ for i, imageFile := range imageFiles {
+ fileDescriptorProtos[i] = imageFile.Proto()
+ }
+ return fileDescriptorProtos
+}
+
+func imageFileToProtoImageFile(imageFile ImageFile) *imagev1.ImageFile {
+ return fileDescriptorProtoToProtoImageFile(
+ imageFile.Proto(),
+ imageFile.IsImport(),
+ imageFile.IsSyntaxUnspecified(),
+ imageFile.UnusedDependencyIndexes(),
+ imageFile.ModuleIdentity(),
+ imageFile.Commit(),
+ )
+}
+
+func fileDescriptorProtoToProtoImageFile(
+ fileDescriptorProto *descriptorpb.FileDescriptorProto,
+ isImport bool,
+ isSyntaxUnspecified bool,
+ unusedDependencyIndexes []int32,
+ moduleIdentity bufmoduleref.ModuleIdentity,
+ moduleCommit string,
+) *imagev1.ImageFile {
+ var protoModuleInfo *imagev1.ModuleInfo
+ if moduleIdentity != nil {
+ protoModuleInfo = &imagev1.ModuleInfo{
+ Name: &imagev1.ModuleName{
+ Remote: proto.String(moduleIdentity.Remote()),
+ Owner: proto.String(moduleIdentity.Owner()),
+ Repository: proto.String(moduleIdentity.Repository()),
+ },
+ }
+ if moduleCommit != "" {
+ protoModuleInfo.Commit = proto.String(moduleCommit)
+ }
+ }
+ if len(unusedDependencyIndexes) == 0 {
+ unusedDependencyIndexes = nil
+ }
+ return &imagev1.ImageFile{
+ Name: fileDescriptorProto.Name,
+ Package: fileDescriptorProto.Package,
+ Syntax: fileDescriptorProto.Syntax,
+ Dependency: fileDescriptorProto.GetDependency(),
+ PublicDependency: fileDescriptorProto.GetPublicDependency(),
+ WeakDependency: fileDescriptorProto.GetWeakDependency(),
+ MessageType: fileDescriptorProto.GetMessageType(),
+ EnumType: fileDescriptorProto.GetEnumType(),
+ Service: fileDescriptorProto.GetService(),
+ Extension: fileDescriptorProto.GetExtension(),
+ Options: fileDescriptorProto.GetOptions(),
+ SourceCodeInfo: fileDescriptorProto.GetSourceCodeInfo(),
+ BufExtension: &imagev1.ImageFileExtension{
+ // we might actually want to differentiate between unset and false
+ IsImport: proto.Bool(isImport),
+ // we might actually want to differentiate between unset and false
+ IsSyntaxUnspecified: proto.Bool(isSyntaxUnspecified),
+ UnusedDependency: unusedDependencyIndexes,
+ ModuleInfo: protoModuleInfo,
+ },
+ }
+}
+
+func imageToCodeGeneratorRequest(
+ image Image,
+ parameter string,
+ compilerVersion *pluginpb.Version,
+ includeImports bool,
+ includeWellKnownTypes bool,
+ alreadyUsedPaths map[string]struct{},
+ nonImportPaths map[string]struct{},
+) *pluginpb.CodeGeneratorRequest {
+ imageFiles := image.Files()
+ request := &pluginpb.CodeGeneratorRequest{
+ ProtoFile: make([]*descriptorpb.FileDescriptorProto, len(imageFiles)),
+ CompilerVersion: compilerVersion,
+ }
+ if parameter != "" {
+ request.Parameter = proto.String(parameter)
+ }
+ for i, imageFile := range imageFiles {
+ request.ProtoFile[i] = imageFile.Proto()
+ if isFileToGenerate(
+ imageFile,
+ alreadyUsedPaths,
+ nonImportPaths,
+ includeImports,
+ includeWellKnownTypes,
+ ) {
+ request.FileToGenerate = append(request.FileToGenerate, imageFile.Path())
+ }
+ }
+ return request
+}
+
+func isFileToGenerate(
+ imageFile ImageFile,
+ alreadyUsedPaths map[string]struct{},
+ nonImportPaths map[string]struct{},
+ includeImports bool,
+ includeWellKnownTypes bool,
+) bool {
+ path := imageFile.Path()
+ if !imageFile.IsImport() {
+ if alreadyUsedPaths != nil {
+ // set as already used
+ alreadyUsedPaths[path] = struct{}{}
+ }
+ // this is a non-import in this image, we always want to generate
+ return true
+ }
+ if !includeImports {
+ // we don't want to include imports
+ return false
+ }
+ if !includeWellKnownTypes && datawkt.Exists(path) {
+ // we don't want to generate wkt even if includeImports is set unless
+ // includeWellKnownTypes is set
+ return false
+ }
+ if alreadyUsedPaths != nil {
+ if _, ok := alreadyUsedPaths[path]; ok {
+ // this was already added for generate to another image
+ return false
+ }
+ }
+ if nonImportPaths != nil {
+ if _, ok := nonImportPaths[path]; ok {
+ // this is a non-import in another image so it will be generated
+ // from another image
+ return false
+ }
+ }
+ // includeImports is set, this isn't a wkt, and it won't be generated in another image
+ if alreadyUsedPaths != nil {
+ // set as already used
+ alreadyUsedPaths[path] = struct{}{}
+ }
+ return true
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/validate.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/validate.go
new file mode 100644
index 000000000..01e791d26
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufimage/validate.go
@@ -0,0 +1,73 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufimage
+
+import (
+ "errors"
+ "fmt"
+
+ imagev1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1"
+)
+
+// we validate the actual fields of the FileDescriptorProtos as part of newImageFile
+func validateProtoImage(protoImage *imagev1.Image) error {
+ if protoImage == nil {
+ return errors.New("nil Image")
+ }
+ if len(protoImage.File) == 0 {
+ return errors.New("image contains no files")
+ }
+ for _, protoImageFile := range protoImage.File {
+ if err := validateProtoImageFile(protoImageFile); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func validateProtoImageFile(protoImageFile *imagev1.ImageFile) error {
+ if protoImageFileExtension := protoImageFile.GetBufExtension(); protoImageFileExtension != nil {
+ lenDependencies := len(protoImageFile.GetDependency())
+ for _, index := range protoImageFileExtension.GetUnusedDependency() {
+ if int(index) >= lenDependencies || int(index) < 0 {
+ return fmt.Errorf("unused dependency index %d is out of range", index)
+ }
+ }
+ if protoModuleInfo := protoImageFileExtension.GetModuleInfo(); protoModuleInfo != nil {
+ return validateProtoModuleInfo(protoModuleInfo)
+ }
+ }
+ return nil
+}
+
+func validateProtoModuleInfo(protoModuleInfo *imagev1.ModuleInfo) error {
+ if protoModuleName := protoModuleInfo.GetName(); protoModuleName != nil {
+ return validateProtoModuleName(protoModuleInfo.Name)
+ }
+ return nil
+}
+
+func validateProtoModuleName(protoModuleName *imagev1.ModuleName) error {
+ if protoModuleName.GetRemote() == "" {
+ return errors.New("empty ModuleName.Remote")
+ }
+ if protoModuleName.GetOwner() == "" {
+ return errors.New("empty ModuleName.Owner")
+ }
+ if protoModuleName.GetRepository() == "" {
+ return errors.New("empty ModuleName.Repository")
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/buflock/buflock.go b/vendor/github.com/bufbuild/buf/private/bufpkg/buflock/buflock.go
new file mode 100644
index 000000000..7cc4aa6fe
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/buflock/buflock.go
@@ -0,0 +1,144 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflock manages the buf.lock lock file.
+package buflock
+
+import (
+ "context"
+ "time"
+
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+const (
+ // ExternalConfigFilePath defines the path to the lock file, relative to the root of the module.
+ ExternalConfigFilePath = "buf.lock"
+ // V1Version is the string used to identify the v1 version of the lock file.
+ V1Version = "v1"
+ // V1Beta1Version is the string used to identify the v1beta1 version of the lock file.
+ V1Beta1Version = "v1beta1"
+ // Header is the header prepended to any lock files.
+ Header = "# Generated by buf. DO NOT EDIT.\n"
+)
+
+// Config holds the parsed lock file information.
+type Config struct {
+ Dependencies []Dependency
+}
+
+// Dependency describes a single pinned dependency.
+type Dependency struct {
+ Remote string
+ Owner string
+ Repository string
+ Commit string
+}
+
+// ReadConfig reads the lock file at ExternalConfigFilePath relative
+// to the root of the bucket.
+func ReadConfig(ctx context.Context, readBucket storage.ReadBucket) (*Config, error) {
+ return readConfig(ctx, readBucket)
+}
+
+// WriteConfig writes the lock file to the WriteBucket at ExternalConfigFilePath.
+func WriteConfig(ctx context.Context, writeBucket storage.WriteBucket, config *Config) error {
+ return writeConfig(ctx, writeBucket, config)
+}
+
+// ExternalConfigV1 represents the v1 lock file.
+type ExternalConfigV1 struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ Deps []ExternalConfigDependencyV1 `json:"deps,omitempty" yaml:"deps,omitempty"`
+}
+
+// ExternalConfigV1Beta1 represents the v1beta1 lock file.
+type ExternalConfigV1Beta1 struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ Deps []ExternalConfigDependencyV1Beta1 `json:"deps,omitempty" yaml:"deps,omitempty"`
+}
+
+// ExternalConfigDependencyV1 represents a single dependency within
+// the v1 lock file.
+type ExternalConfigDependencyV1 struct {
+ Remote string `json:"remote,omitempty" yaml:"remote,omitempty"`
+ Owner string `json:"owner,omitempty" yaml:"owner,omitempty"`
+ Repository string `json:"repository,omitempty" yaml:"repository,omitempty"`
+ Branch string `json:"branch,omitempty" yaml:"branch,omitempty"`
+ Commit string `json:"commit,omitempty" yaml:"commit,omitempty"`
+ Digest string `json:"digest,omitempty" yaml:"digest,omitempty"`
+ CreateTime time.Time `json:"create_time,omitempty" yaml:"create_time,omitempty"`
+}
+
+// DependencyForExternalConfigDependencyV1 returns the Dependency representation of a ExternalConfigDependencyV1.
+func DependencyForExternalConfigDependencyV1(dep ExternalConfigDependencyV1) Dependency {
+ return Dependency{
+ Remote: dep.Remote,
+ Owner: dep.Owner,
+ Repository: dep.Repository,
+ Commit: dep.Commit,
+ }
+}
+
+// ExternalConfigDependencyV1ForDependency returns the ExternalConfigDependencyV1 of a Dependency.
+//
+// Note, some fields will be their empty value since not all values are available on the Dependency.
+func ExternalConfigDependencyV1ForDependency(dep Dependency) ExternalConfigDependencyV1 {
+ return ExternalConfigDependencyV1{
+ Remote: dep.Remote,
+ Owner: dep.Owner,
+ Repository: dep.Repository,
+ Commit: dep.Commit,
+ }
+}
+
+// ExternalConfigDependencyV1Beta1 represents a single dependency within
+// the v1beta1 lock file.
+type ExternalConfigDependencyV1Beta1 struct {
+ Remote string `json:"remote,omitempty" yaml:"remote,omitempty"`
+ Owner string `json:"owner,omitempty" yaml:"owner,omitempty"`
+ Repository string `json:"repository,omitempty" yaml:"repository,omitempty"`
+ Branch string `json:"branch,omitempty" yaml:"branch,omitempty"`
+ Commit string `json:"commit,omitempty" yaml:"commit,omitempty"`
+ Digest string `json:"digest,omitempty" yaml:"digest,omitempty"`
+ CreateTime time.Time `json:"create_time,omitempty" yaml:"create_time,omitempty"`
+}
+
+// DepedencyForExternalConfigDependencyV1Beta1 returns the Dependency representation of a ExternalConfigDependencyV1Beta1.
+func DependencyForExternalConfigDependencyV1Beta1(dep ExternalConfigDependencyV1Beta1) Dependency {
+ return Dependency{
+ Remote: dep.Remote,
+ Owner: dep.Owner,
+ Repository: dep.Repository,
+ Commit: dep.Commit,
+ }
+}
+
+// ExternalConfigDependencyV1Beta1ForDependency returns the ExternalConfigDependencyV1Beta1 of a Dependency.
+//
+// Note, some fields will be their empty value since not all values are available on the Dependency.
+func ExternalConfigDependencyV1Beta1ForDependency(dep Dependency) ExternalConfigDependencyV1Beta1 {
+ return ExternalConfigDependencyV1Beta1{
+ Remote: dep.Remote,
+ Owner: dep.Owner,
+ Repository: dep.Repository,
+ Commit: dep.Commit,
+ }
+}
+
+// ExternalConfigVersion defines the subset of all lock
+// file versions that is used to determine the version.
+type ExternalConfigVersion struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/buflock/lock_file.go b/vendor/github.com/bufbuild/buf/private/bufpkg/buflock/lock_file.go
new file mode 100644
index 000000000..9b047b676
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/buflock/lock_file.go
@@ -0,0 +1,85 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buflock
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/pkg/encoding"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+func readConfig(ctx context.Context, readBucket storage.ReadBucket) (_ *Config, retErr error) {
+ configBytes, err := storage.ReadPath(ctx, readBucket, ExternalConfigFilePath)
+ if err != nil {
+ if storage.IsNotExist(err) {
+ // If the lock file doesn't exist, just return no dependencies.
+ return &Config{}, nil
+ }
+ return nil, fmt.Errorf("failed to read lock file: %w", err)
+ }
+ var configVersion ExternalConfigVersion
+ if err := encoding.UnmarshalYAMLNonStrict(configBytes, &configVersion); err != nil {
+ return nil, fmt.Errorf("failed to decode lock file as YAML: %w", err)
+ }
+ switch configVersion.Version {
+ case "", V1Beta1Version:
+ var externalConfig ExternalConfigV1Beta1
+ if err := encoding.UnmarshalYAMLStrict(configBytes, &externalConfig); err != nil {
+ return nil, fmt.Errorf("failed to unmarshal lock file at %s: %w", V1Beta1Version, err)
+ }
+ config := &Config{}
+ for _, dep := range externalConfig.Deps {
+ config.Dependencies = append(config.Dependencies, DependencyForExternalConfigDependencyV1Beta1(dep))
+ }
+ return config, nil
+ case V1Version:
+ var externalConfig ExternalConfigV1
+ if err := encoding.UnmarshalYAMLStrict(configBytes, &externalConfig); err != nil {
+ return nil, fmt.Errorf("failed to unmarshal lock file at %s: %w", V1Version, err)
+ }
+ config := &Config{}
+ for _, dep := range externalConfig.Deps {
+ config.Dependencies = append(config.Dependencies, DependencyForExternalConfigDependencyV1(dep))
+ }
+ return config, nil
+ default:
+ return nil, fmt.Errorf("unknown lock file versions %q", configVersion.Version)
+ }
+}
+
+func writeConfig(ctx context.Context, writeBucket storage.WriteBucket, config *Config) error {
+ externalConfig := ExternalConfigV1{
+ Version: V1Version,
+ Deps: make([]ExternalConfigDependencyV1, 0, len(config.Dependencies)),
+ }
+ for _, dep := range config.Dependencies {
+ externalConfig.Deps = append(externalConfig.Deps, ExternalConfigDependencyV1ForDependency(dep))
+ }
+ configBytes, err := encoding.MarshalYAML(&externalConfig)
+ if err != nil {
+ return fmt.Errorf("failed to marshal lock file: %w", err)
+ }
+ if err := storage.PutPath(
+ ctx,
+ writeBucket,
+ ExternalConfigFilePath,
+ append([]byte(Header), configBytes...),
+ ); err != nil {
+ return fmt.Errorf("failed to write lock file: %w", err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/buflock/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/buflock/usage.gen.go
new file mode 100644
index 000000000..9ba40c13a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/buflock/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package buflock
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodule.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodule.go
new file mode 100644
index 000000000..744289b26
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodule.go
@@ -0,0 +1,495 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "context"
+ "crypto/sha256"
+ "encoding/base64"
+ "fmt"
+ "io"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ breakingv1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/breaking/v1"
+ lintv1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/lint/v1"
+ modulev1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "go.uber.org/multierr"
+)
+
+const (
+ // DocumentationFilePath defines the path to the documentation file, relative to the root of the module.
+ DocumentationFilePath = "buf.md"
+ // LicenseFilePath defines the path to the license file, relative to the root of the module.
+ LicenseFilePath = "LICENSE"
+
+ // b3DigestPrefix is the digest prefix for the third version of the digest function.
+ //
+ // It is used by the CLI cache and intended to eventually replace b1 entirely.
+ b3DigestPrefix = "b3"
+)
+
+// ModuleFile is a module file.
+type ModuleFile interface {
+ bufmoduleref.FileInfo
+ io.ReadCloser
+
+ isModuleFile()
+}
+
+// Module is a Protobuf module.
+//
+// It contains the files for the sources, and the dependency names.
+//
+// Terminology:
+//
+// Targets (Modules and ModuleFileSets):
+//
+// Just the files specified to build. This will either be sources, or will be specific files
+// within sources, ie this is a subset of Sources. The difference between Targets and Sources happens
+// when i.e. the --path flag is used.
+//
+// Sources (Modules and ModuleFileSets):
+//
+// The files with no dependencies. This is a superset of Targets and subset of All.
+//
+// All (ModuleFileSets only):
+//
+// All files including dependencies. This is a superset of Sources.
+type Module interface {
+ // TargetFileInfos gets all FileInfos specified as target files. This is either
+ // all the FileInfos belonging to the module, or those specified by ModuleWithTargetPaths().
+ //
+ // It does not include dependencies.
+ //
+ // The returned TargetFileInfos are sorted by path.
+ TargetFileInfos(ctx context.Context) ([]bufmoduleref.FileInfo, error)
+ // SourceFileInfos gets all FileInfos belonging to the module.
+ //
+ // It does not include dependencies.
+ //
+ // The returned SourceFileInfos are sorted by path.
+ SourceFileInfos(ctx context.Context) ([]bufmoduleref.FileInfo, error)
+ // GetModuleFile gets the source file for the given path.
+ //
+ // Returns storage.IsNotExist error if the file does not exist.
+ GetModuleFile(ctx context.Context, path string) (ModuleFile, error)
+ // DependencyModulePins gets the dependency ModulePins.
+ //
+ // The returned ModulePins are sorted by remote, owner, repository, branch, commit, and then digest.
+ // The returned ModulePins are unique by remote, owner, repository.
+ //
+ // This includes all transitive dependencies.
+ DependencyModulePins() []bufmoduleref.ModulePin
+ // Documentation gets the contents of the module documentation file, buf.md and returns the string representation.
+ // This may return an empty string if the documentation file does not exist.
+ Documentation() string
+ // License gets the contents of the module license file, LICENSE and returns the string representation.
+ // This may return an empty string if the documentation file does not exist.
+ License() string
+ // BreakingConfig returns the breaking change check configuration set for the module.
+ //
+ // This may be nil, since older versions of the module would not have this stored.
+ BreakingConfig() *bufbreakingconfig.Config
+ // LintConfig returns the lint check configuration set for the module.
+ //
+ // This may be nil, since older versions of the module would not have this stored.
+ LintConfig() *buflintconfig.Config
+
+ getSourceReadBucket() storage.ReadBucket
+ // Note this *can* be nil if we did not build from a named module.
+ // All code must assume this can be nil.
+ // nil checking should work since the backing type is always a pointer.
+ //
+ // TODO: We can remove the getModuleReference method on the if we fetch
+ // FileInfos from the Module and plumb in the ModuleReference here.
+ //
+ // This approach assumes that all of the FileInfos returned
+ // from SourceFileInfos will have their ModuleReference
+ // set to the same value, which can be validated.
+ getModuleIdentity() bufmoduleref.ModuleIdentity
+ // Note this can be empty.
+ getCommit() string
+ isModule()
+}
+
+// ModuleOption is used to construct Modules.
+type ModuleOption func(*module)
+
+// ModuleWithModuleIdentity is used to construct a Module with a ModuleIdentity.
+func ModuleWithModuleIdentity(moduleIdentity bufmoduleref.ModuleIdentity) ModuleOption {
+ return func(module *module) {
+ module.moduleIdentity = moduleIdentity
+ }
+}
+
+// ModuleWithModuleIdentityAndCommit is used to construct a Module with a ModuleIdentity and commit.
+func ModuleWithModuleIdentityAndCommit(moduleIdentity bufmoduleref.ModuleIdentity, commit string) ModuleOption {
+ return func(module *module) {
+ module.moduleIdentity = moduleIdentity
+ module.commit = commit
+ }
+}
+
+// NewModuleForBucket returns a new Module. It attempts reads dependencies
+// from a lock file in the read bucket.
+func NewModuleForBucket(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ options ...ModuleOption,
+) (Module, error) {
+ return newModuleForBucket(ctx, readBucket, options...)
+}
+
+// NewModuleForProto returns a new Module for the given proto Module.
+func NewModuleForProto(
+ ctx context.Context,
+ protoModule *modulev1alpha1.Module,
+ options ...ModuleOption,
+) (Module, error) {
+ return newModuleForProto(ctx, protoModule, options...)
+}
+
+// ModuleWithTargetPaths returns a new Module that specifies specific file or directory paths to build.
+//
+// These paths must exist.
+// These paths must be relative to the roots.
+// These paths will be normalized and validated.
+// These paths must be unique when normalized and validated.
+// Multiple calls to this option will override previous calls.
+//
+// Note that this will result in TargetFileInfos containing only these paths, and not
+// any imports. Imports, and non-targeted files, are still available via SourceFileInfos.
+func ModuleWithTargetPaths(
+ module Module,
+ targetPaths []string,
+ excludePaths []string,
+) (Module, error) {
+ return newTargetingModule(module, targetPaths, excludePaths, false)
+}
+
+// ModuleWithTargetPathsAllowNotExist returns a new Module specifies specific file or directory paths to build,
+// but allows the specified paths to not exist.
+//
+// Note that this will result in TargetFileInfos containing only these paths, and not
+// any imports. Imports, and non-targeted files, are still available via SourceFileInfos.
+func ModuleWithTargetPathsAllowNotExist(
+ module Module,
+ targetPaths []string,
+ excludePaths []string,
+) (Module, error) {
+ return newTargetingModule(module, targetPaths, excludePaths, true)
+}
+
+// ModuleWithExcludePaths returns a new Module that excludes specific file or directory
+// paths to build.
+//
+// Note that this will result in TargetFileInfos containing only the paths that have not been
+// excluded and any imports. Imports are still available via SourceFileInfos.
+func ModuleWithExcludePaths(
+ module Module,
+ excludePaths []string,
+) (Module, error) {
+ return newTargetingModule(module, nil, excludePaths, false)
+}
+
+// ModuleWithExcludePathsAllowNotExist returns a new Module that excludes specific file or
+// directory paths to build, but allows the specified paths to not exist.
+//
+// Note that this will result in TargetFileInfos containing only these paths, and not
+// any imports. Imports, and non-targeted files, are still available via SourceFileInfos.
+func ModuleWithExcludePathsAllowNotExist(
+ module Module,
+ excludePaths []string,
+) (Module, error) {
+ return newTargetingModule(module, nil, excludePaths, true)
+}
+
+// ModuleResolver resolves modules.
+type ModuleResolver interface {
+ // GetModulePin resolves the provided ModuleReference to a ModulePin.
+ //
+ // Returns an error that fufills storage.IsNotExist if the named Module does not exist.
+ GetModulePin(ctx context.Context, moduleReference bufmoduleref.ModuleReference) (bufmoduleref.ModulePin, error)
+}
+
+// NewNopModuleResolver returns a new ModuleResolver that always returns a storage.IsNotExist error.
+func NewNopModuleResolver() ModuleResolver {
+ return newNopModuleResolver()
+}
+
+// ModuleReader reads resolved modules.
+type ModuleReader interface {
+ // GetModule gets the Module for the ModulePin.
+ //
+ // Returns an error that fufills storage.IsNotExist if the Module does not exist.
+ GetModule(ctx context.Context, modulePin bufmoduleref.ModulePin) (Module, error)
+}
+
+// NewNopModuleReader returns a new ModuleReader that always returns a storage.IsNotExist error.
+func NewNopModuleReader() ModuleReader {
+ return newNopModuleReader()
+}
+
+// ModuleFileSet is a Protobuf module file set.
+//
+// It contains the files for both targets, sources and dependencies.
+//
+// TODO: we should not have ModuleFileSet inherit from Module, this is confusing
+type ModuleFileSet interface {
+ // Note that GetModuleFile will pull from All files instead of just Source Files!
+ Module
+ // AllFileInfos gets all FileInfos associated with the module, including dependencies.
+ //
+ // The returned FileInfos are sorted by path.
+ AllFileInfos(ctx context.Context) ([]bufmoduleref.FileInfo, error)
+
+ isModuleFileSet()
+}
+
+// NewModuleFileSet returns a new ModuleFileSet.
+func NewModuleFileSet(
+ module Module,
+ dependencies []Module,
+) ModuleFileSet {
+ return newModuleFileSet(module, dependencies)
+}
+
+// Workspace represents a module workspace.
+type Workspace interface {
+ // GetModule gets the module identified by the given ModuleIdentity.
+ GetModule(moduleIdentity bufmoduleref.ModuleIdentity) (Module, bool)
+ // GetModules returns all of the modules found in the workspace.
+ GetModules() []Module
+}
+
+// NewWorkspace returns a new module workspace.
+func NewWorkspace(
+ namedModules map[string]Module,
+ allModules []Module,
+) Workspace {
+ return newWorkspace(
+ namedModules,
+ allModules,
+ )
+}
+
+// ModuleToProtoModule converts the Module to a proto Module.
+//
+// This takes all Sources and puts them in the Module, not just Targets.
+func ModuleToProtoModule(ctx context.Context, module Module) (*modulev1alpha1.Module, error) {
+ // these are returned sorted, so there is no need to sort
+ // the resulting protoModuleFiles afterwards
+ sourceFileInfos, err := module.SourceFileInfos(ctx)
+ if err != nil {
+ return nil, err
+ }
+ protoModuleFiles := make([]*modulev1alpha1.ModuleFile, len(sourceFileInfos))
+ for i, sourceFileInfo := range sourceFileInfos {
+ protoModuleFile, err := moduleFileToProto(ctx, module, sourceFileInfo.Path())
+ if err != nil {
+ return nil, err
+ }
+ protoModuleFiles[i] = protoModuleFile
+ }
+ // these are returned sorted, so there is no need to sort
+ // the resulting protoModuleNames afterwards
+ dependencyModulePins := module.DependencyModulePins()
+ protoModulePins := make([]*modulev1alpha1.ModulePin, len(dependencyModulePins))
+ for i, dependencyModulePin := range dependencyModulePins {
+ protoModulePins[i] = bufmoduleref.NewProtoModulePinForModulePin(dependencyModulePin)
+ }
+ var protoBreakingConfig *breakingv1.Config
+ if module.BreakingConfig() != nil {
+ protoBreakingConfig = bufbreakingconfig.ProtoForConfig(module.BreakingConfig())
+ }
+ var protoLintConfig *lintv1.Config
+ if module.LintConfig() != nil {
+ protoLintConfig = buflintconfig.ProtoForConfig(module.LintConfig())
+ }
+ protoModule := &modulev1alpha1.Module{
+ Files: protoModuleFiles,
+ Dependencies: protoModulePins,
+ Documentation: module.Documentation(),
+ BreakingConfig: protoBreakingConfig,
+ LintConfig: protoLintConfig,
+ License: module.License(),
+ }
+ if err := ValidateProtoModule(protoModule); err != nil {
+ return nil, err
+ }
+ return protoModule, nil
+}
+
+// ModuleDigestB3 returns the b3 digest for the Module.
+//
+// To create the module digest (SHA256):
+// 1. For every file in the module (sorted lexicographically by path):
+// a. Add the file path
+// b. Add the file contents
+// 2. Add the dependency's module identity and commit ID (sorted lexicographically by commit ID)
+// 3. Add the module identity if available.
+// 4. Add the module documentation if available.
+// 5. Add the module license if available.
+// 6. Add the breaking and lint configurations if available.
+// 7. Produce the final digest by URL-base64 encoding the summed bytes and prefixing it with the digest prefix
+func ModuleDigestB3(ctx context.Context, module Module) (string, error) {
+ hash := sha256.New()
+ // We do not want to change the sort order as the rest of the codebase relies on it,
+ // but we only want to use commit as part of the sort order, so we make a copy of
+ // the slice and sort it by commit
+ for _, dependencyModulePin := range copyModulePinsSortedByOnlyCommit(module.DependencyModulePins()) {
+ if _, err := hash.Write([]byte(dependencyModulePin.IdentityString() + ":" + dependencyModulePin.Commit())); err != nil {
+ return "", err
+ }
+ }
+ sourceFileInfos, err := module.SourceFileInfos(ctx)
+ if err != nil {
+ return "", err
+ }
+ for _, sourceFileInfo := range sourceFileInfos {
+ if _, err := hash.Write([]byte(sourceFileInfo.Path())); err != nil {
+ return "", err
+ }
+ moduleFile, err := module.GetModuleFile(ctx, sourceFileInfo.Path())
+ if err != nil {
+ return "", err
+ }
+ if _, err := io.Copy(hash, moduleFile); err != nil {
+ return "", multierr.Append(err, moduleFile.Close())
+ }
+ if err := moduleFile.Close(); err != nil {
+ return "", err
+ }
+ }
+ if moduleIdentity := module.getModuleIdentity(); moduleIdentity != nil {
+ if _, err := hash.Write([]byte(moduleIdentity.IdentityString())); err != nil {
+ return "", err
+ }
+ }
+ if docs := module.Documentation(); docs != "" {
+ if _, err := hash.Write([]byte(docs)); err != nil {
+ return "", err
+ }
+ }
+ if license := module.License(); license != "" {
+ if _, err := hash.Write([]byte(license)); err != nil {
+ return "", err
+ }
+ }
+ if breakingConfig := module.BreakingConfig(); breakingConfig != nil {
+ breakingConfigBytes, err := bufbreakingconfig.BytesForConfig(breakingConfig)
+ if err != nil {
+ return "", err
+ }
+ if _, err := hash.Write(breakingConfigBytes); err != nil {
+ return "", err
+ }
+ }
+ if lintConfig := module.LintConfig(); lintConfig != nil {
+ lintConfigBytes, err := buflintconfig.BytesForConfig(lintConfig)
+ if err != nil {
+ return "", err
+ }
+ if _, err := hash.Write(lintConfigBytes); err != nil {
+ return "", err
+ }
+ }
+ return fmt.Sprintf("%s-%s", b3DigestPrefix, base64.URLEncoding.EncodeToString(hash.Sum(nil))), nil
+}
+
+// ModuleToBucket writes the given Module to the WriteBucket.
+//
+// This writes the sources and the buf.lock file.
+// This copies external paths if the WriteBucket supports setting of external paths.
+func ModuleToBucket(
+ ctx context.Context,
+ module Module,
+ writeBucket storage.WriteBucket,
+) error {
+ fileInfos, err := module.SourceFileInfos(ctx)
+ if err != nil {
+ return err
+ }
+ for _, fileInfo := range fileInfos {
+ if err := putModuleFileToBucket(ctx, module, fileInfo.Path(), writeBucket); err != nil {
+ return err
+ }
+ }
+ if docs := module.Documentation(); docs != "" {
+ if err := storage.PutPath(ctx, writeBucket, DocumentationFilePath, []byte(docs)); err != nil {
+ return err
+ }
+ }
+ if license := module.License(); license != "" {
+ if err := storage.PutPath(ctx, writeBucket, LicenseFilePath, []byte(license)); err != nil {
+ return err
+ }
+ }
+ if err := bufmoduleref.PutDependencyModulePinsToBucket(ctx, writeBucket, module.DependencyModulePins()); err != nil {
+ return err
+ }
+ // This is the default version created by bufconfig getters. The versions should be the
+ // same across lint and breaking configs.
+ version := bufconfig.V1Version
+ var breakingConfigVersion string
+ if module.BreakingConfig() != nil {
+ breakingConfigVersion = module.BreakingConfig().Version
+ }
+ var lintConfigVersion string
+ if module.LintConfig() != nil {
+ lintConfigVersion = module.LintConfig().Version
+ }
+ // If one of either breaking or lint config is non-nil, then other config will also be non-nil,
+ // even if a module does not set both configurations. An empty with the correct version
+ // will be set by the configuration getters.
+ if breakingConfigVersion != lintConfigVersion {
+ return fmt.Errorf("breaking config version %q does not match lint config version %q", breakingConfigVersion, lintConfigVersion)
+ }
+ if breakingConfigVersion != "" || lintConfigVersion != "" {
+ version = breakingConfigVersion
+ }
+ writeConfigOptions := []bufconfig.WriteConfigOption{
+ bufconfig.WriteConfigWithModuleIdentity(module.getModuleIdentity()),
+ bufconfig.WriteConfigWithBreakingConfig(module.BreakingConfig()),
+ bufconfig.WriteConfigWithLintConfig(module.LintConfig()),
+ bufconfig.WriteConfigWithVersion(version),
+ }
+ return bufconfig.WriteConfig(ctx, writeBucket, writeConfigOptions...)
+}
+
+// TargetModuleFilesToBucket writes the target files of the given Module to the WriteBucket.
+//
+// This does not write the buf.lock file.
+// This copies external paths if the WriteBucket supports setting of external paths.
+func TargetModuleFilesToBucket(
+ ctx context.Context,
+ module Module,
+ writeBucket storage.WriteBucket,
+) error {
+ fileInfos, err := module.TargetFileInfos(ctx)
+ if err != nil {
+ return err
+ }
+ for _, fileInfo := range fileInfos {
+ if err := putModuleFileToBucket(ctx, module, fileInfo.Path(), writeBucket); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/bufmodulebuild.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/bufmodulebuild.go
new file mode 100644
index 000000000..523f7598b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/bufmodulebuild.go
@@ -0,0 +1,158 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodulebuild
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+)
+
+// ModuleFileSetBuilder builds ModuleFileSets from Modules.
+type ModuleFileSetBuilder interface {
+ Build(
+ ctx context.Context,
+ module bufmodule.Module,
+ options ...BuildModuleFileSetOption,
+ ) (bufmodule.ModuleFileSet, error)
+}
+
+// NewModuleFileSetBuilder returns a new ModuleSetProvider.
+func NewModuleFileSetBuilder(
+ logger *zap.Logger,
+ moduleReader bufmodule.ModuleReader,
+) ModuleFileSetBuilder {
+ return newModuleFileSetBuilder(logger, moduleReader)
+}
+
+// BuildModuleFileSetOption is an option for Build.
+type BuildModuleFileSetOption func(*buildModuleFileSetOptions)
+
+// WithWorkspace returns a new BuildModuleFileSetOption that specifies a workspace.
+func WithWorkspace(workspace bufmodule.Workspace) BuildModuleFileSetOption {
+ return func(buildModuleFileSetOptions *buildModuleFileSetOptions) {
+ buildModuleFileSetOptions.workspace = workspace
+ }
+}
+
+// ModuleBucketBuilder builds modules for buckets.
+type ModuleBucketBuilder interface {
+ // BuildForBucket builds a module for the given bucket.
+ //
+ // If paths is empty, all files are built.
+ // Paths should be relative to the bucket, not the roots.
+ BuildForBucket(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ config *bufmoduleconfig.Config,
+ options ...BuildOption,
+ ) (bufmodule.Module, error)
+}
+
+// NewModuleBucketBuilder returns a new BucketBuilder.
+func NewModuleBucketBuilder(logger *zap.Logger) ModuleBucketBuilder {
+ return newModuleBucketBuilder(logger)
+}
+
+// ModuleIncludeBuilder builds modules for includes.
+//
+// This is used for protoc.
+type ModuleIncludeBuilder interface {
+ // BuildForIncludes builds a module for the given includes and file paths.
+ BuildForIncludes(
+ ctx context.Context,
+ includeDirPaths []string,
+ options ...BuildOption,
+ ) (bufmodule.Module, error)
+}
+
+// NewModuleIncludeBuilder returns a new ModuleIncludeBuilder.
+//
+// TODO: we should parse includeDirPaths for modules as well in theory
+// would be nice to be able to do buf alpha protoc -I path/to/dir -I buf.build/foo/bar/v1
+func NewModuleIncludeBuilder(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+) ModuleIncludeBuilder {
+ return newModuleIncludeBuilder(logger, storageosProvider)
+}
+
+// BuildOption is an option for BuildForBucket.
+type BuildOption func(*buildOptions)
+
+// WithPaths returns a new BuildOption that specifies specific file or directory paths to build.
+//
+// These paths must exist.
+// These paths must be relative to the bucket or include directory paths.
+// These paths will be normalized.
+// Multiple calls to this option and WithPathsAllowNotExist will override previous calls.
+//
+// This results in ModuleWithTargetPaths being used on the resulting build module.
+// This is done within bufmodulebuild so we can resolve the paths relative to their roots.
+func WithPaths(paths []string) BuildOption {
+ return func(buildOptions *buildOptions) {
+ buildOptions.paths = &paths
+ }
+}
+
+// WithPathsAllowNotExist returns a new BuildOption that specifies specific file or directory paths to build,
+// but allows the specified paths to not exist.
+//
+// These paths must exist.
+// These paths must be relative to the bucket or include directory paths.
+// These paths will be normalized.
+// Multiple calls to this option and WithPaths will override previous calls.
+//
+// This results in ModuleWithPathsAllowNotExist being used on the resulting build module.
+// This is done within bufmodulebuild so we can resolve the paths relative to their roots.
+func WithPathsAllowNotExist(paths []string) BuildOption {
+ return func(buildOptions *buildOptions) {
+ buildOptions.paths = &paths
+ buildOptions.pathsAllowNotExist = true
+ }
+}
+
+// WithModuleIdentity returns a new BuildOption that is used to construct a Module with a ModuleIdentity.
+//
+// TODO: this is never called
+// TODO: we also have ModuleWithModuleIdentityAndCommit in bufmodule
+// We need to disambiguate module building between bufmodule and bufmodulebuild
+// bufimage and bufimagebuild work, but bufmodule and bufmodulebuild are a mess
+func WithModuleIdentity(moduleIdentity bufmoduleref.ModuleIdentity) BuildOption {
+ return func(buildOptions *buildOptions) {
+ buildOptions.moduleIdentity = moduleIdentity
+ }
+}
+
+// WithExcludePaths returns a new BuildOption that specifies files to be excluded from the build.
+func WithExcludePaths(excludePaths []string) BuildOption {
+ return func(buildOptions *buildOptions) {
+ buildOptions.excludePaths = excludePaths
+ }
+}
+
+// WithExcludePathsAllowNotExist returns a new BuildOption that specifies files to be excluded from the build,
+// but allows the specified paths to not exist.
+func WithExcludePathsAllowNotExist(excludePaths []string) BuildOption {
+ return func(buildOptions *buildOptions) {
+ buildOptions.excludePaths = excludePaths
+ buildOptions.pathsAllowNotExist = true
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/module_bucket_builder.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/module_bucket_builder.go
new file mode 100644
index 000000000..2255d48ff
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/module_bucket_builder.go
@@ -0,0 +1,164 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodulebuild
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/buflock"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem"
+ "go.uber.org/zap"
+)
+
+type moduleBucketBuilder struct {
+ logger *zap.Logger
+}
+
+func newModuleBucketBuilder(
+ logger *zap.Logger,
+) *moduleBucketBuilder {
+ return &moduleBucketBuilder{
+ logger: logger,
+ }
+}
+
+func (b *moduleBucketBuilder) BuildForBucket(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ config *bufmoduleconfig.Config,
+ options ...BuildOption,
+) (bufmodule.Module, error) {
+ buildOptions := &buildOptions{}
+ for _, option := range options {
+ option(buildOptions)
+ }
+ return b.buildForBucket(
+ ctx,
+ readBucket,
+ config,
+ buildOptions.moduleIdentity,
+ buildOptions.paths,
+ buildOptions.excludePaths,
+ buildOptions.pathsAllowNotExist,
+ )
+}
+
+func (b *moduleBucketBuilder) buildForBucket(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ config *bufmoduleconfig.Config,
+ moduleIdentity bufmoduleref.ModuleIdentity,
+ bucketRelPaths *[]string,
+ excludeRelPaths []string,
+ bucketRelPathsAllowNotExist bool,
+) (bufmodule.Module, error) {
+ // proxy plain files
+ externalPaths := []string{
+ buflock.ExternalConfigFilePath,
+ bufmodule.DocumentationFilePath,
+ bufmodule.LicenseFilePath,
+ }
+ externalPaths = append(externalPaths, bufconfig.AllConfigFilePaths...)
+ rootBuckets := make([]storage.ReadBucket, 0, len(externalPaths))
+ for _, path := range externalPaths {
+ bucket, err := getFileReadBucket(ctx, readBucket, path)
+ if err != nil {
+ return nil, err
+ }
+ if bucket != nil {
+ rootBuckets = append(rootBuckets, bucket)
+ }
+ }
+
+ roots := make([]string, 0, len(config.RootToExcludes))
+ for root, excludes := range config.RootToExcludes {
+ roots = append(roots, root)
+ mappers := []storage.Mapper{
+ // need to do match extension here
+ // https://github.com/bufbuild/buf/issues/113
+ storage.MatchPathExt(".proto"),
+ storage.MapOnPrefix(root),
+ }
+ if len(excludes) != 0 {
+ var notOrMatchers []storage.Matcher
+ for _, exclude := range excludes {
+ notOrMatchers = append(
+ notOrMatchers,
+ storage.MatchPathContained(exclude),
+ )
+ }
+ mappers = append(
+ mappers,
+ storage.MatchNot(
+ storage.MatchOr(
+ notOrMatchers...,
+ ),
+ ),
+ )
+ }
+ rootBuckets = append(
+ rootBuckets,
+ storage.MapReadBucket(
+ readBucket,
+ mappers...,
+ ),
+ )
+ }
+ module, err := bufmodule.NewModuleForBucket(
+ ctx,
+ storage.MultiReadBucket(rootBuckets...),
+ bufmodule.ModuleWithModuleIdentity(moduleIdentity /* This may be nil */),
+ )
+ if err != nil {
+ return nil, err
+ }
+ return applyModulePaths(
+ module,
+ roots,
+ bucketRelPaths,
+ excludeRelPaths,
+ bucketRelPathsAllowNotExist,
+ normalpath.Relative,
+ )
+}
+
+// may return nil.
+func getFileReadBucket(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ filePath string,
+) (storage.ReadBucket, error) {
+ fileData, err := storage.ReadPath(ctx, readBucket, filePath)
+ if err != nil {
+ if storage.IsNotExist(err) {
+ return nil, nil
+ }
+ return nil, err
+ }
+ if len(fileData) == 0 {
+ return nil, nil
+ }
+ return storagemem.NewReadBucket(
+ map[string][]byte{
+ filePath: fileData,
+ },
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/module_file_set_builder.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/module_file_set_builder.go
new file mode 100644
index 000000000..a27d6f28a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/module_file_set_builder.go
@@ -0,0 +1,89 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodulebuild
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "go.uber.org/zap"
+)
+
+type moduleFileSetBuilder struct {
+ logger *zap.Logger
+ moduleReader bufmodule.ModuleReader
+}
+
+func newModuleFileSetBuilder(
+ logger *zap.Logger,
+ moduleReader bufmodule.ModuleReader,
+) *moduleFileSetBuilder {
+ return &moduleFileSetBuilder{
+ logger: logger,
+ moduleReader: moduleReader,
+ }
+}
+func (m *moduleFileSetBuilder) Build(
+ ctx context.Context,
+ module bufmodule.Module,
+ options ...BuildModuleFileSetOption,
+) (bufmodule.ModuleFileSet, error) {
+ buildModuleFileSetOptions := &buildModuleFileSetOptions{}
+ for _, option := range options {
+ option(buildModuleFileSetOptions)
+ }
+ return m.build(
+ ctx,
+ module,
+ buildModuleFileSetOptions.workspace,
+ )
+}
+
+func (m *moduleFileSetBuilder) build(
+ ctx context.Context,
+ module bufmodule.Module,
+ workspace bufmodule.Workspace,
+) (bufmodule.ModuleFileSet, error) {
+ var dependencyModules []bufmodule.Module
+ if workspace != nil {
+ // From the perspective of the ModuleFileSet, we include all of the files
+ // specified in the workspace. When we build the Image from the ModuleFileSet,
+ // we construct it based on the TargetFileInfos, and thus only include the files
+ // in the transitive closure.
+ //
+ // We *could* determine which modules could be omitted here, but it would incur
+ // the cost of parsing the target files and detecting exactly which imports are
+ // used. We already get this for free in Image construction, so it's simplest and
+ // most efficient to bundle all of the modules together like so.
+ dependencyModules = workspace.GetModules()
+ }
+ // We know these are unique by remote, owner, repository and
+ // contain all transitive dependencies.
+ for _, dependencyModulePin := range module.DependencyModulePins() {
+ if workspace != nil {
+ if _, ok := workspace.GetModule(dependencyModulePin); ok {
+ // This dependency is already provided by the workspace, so we don't
+ // need to consult the ModuleReader.
+ continue
+ }
+ }
+ dependencyModule, err := m.moduleReader.GetModule(ctx, dependencyModulePin)
+ if err != nil {
+ return nil, err
+ }
+ dependencyModules = append(dependencyModules, dependencyModule)
+ }
+ return bufmodule.NewModuleFileSet(module, dependencyModules), nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/module_include_builder.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/module_include_builder.go
new file mode 100644
index 000000000..3bde04c46
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/module_include_builder.go
@@ -0,0 +1,118 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodulebuild
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/internal"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+)
+
+type moduleIncludeBuilder struct {
+ logger *zap.Logger
+ storageosProvider storageos.Provider
+}
+
+func newModuleIncludeBuilder(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+) *moduleIncludeBuilder {
+ return &moduleIncludeBuilder{
+ logger: logger,
+ storageosProvider: storageosProvider,
+ }
+}
+
+func (b *moduleIncludeBuilder) BuildForIncludes(
+ ctx context.Context,
+ includeDirPaths []string,
+ options ...BuildOption,
+) (bufmodule.Module, error) {
+ buildOptions := &buildOptions{}
+ for _, option := range options {
+ option(buildOptions)
+ }
+ return b.buildForIncludes(
+ ctx,
+ includeDirPaths,
+ buildOptions.paths,
+ buildOptions.pathsAllowNotExist,
+ )
+}
+
+func (b *moduleIncludeBuilder) buildForIncludes(
+ ctx context.Context,
+ includeDirPaths []string,
+ fileOrDirPaths *[]string,
+ fileOrDirPathsAllowNotExist bool,
+) (bufmodule.Module, error) {
+ if len(includeDirPaths) == 0 {
+ includeDirPaths = []string{"."}
+ }
+ absIncludeDirPaths, err := internal.NormalizeAndCheckPaths(
+ includeDirPaths,
+ "include directory",
+ normalpath.Absolute,
+ true,
+ )
+ if err != nil {
+ return nil, err
+ }
+ var absFileOrDirPaths *[]string
+ if fileOrDirPaths != nil {
+ normalizedAndCheckedFileOrDirPaths, err := internal.NormalizeAndCheckPaths(
+ *fileOrDirPaths,
+ "input file",
+ normalpath.Absolute,
+ false,
+ )
+ if err != nil {
+ return nil, err
+ }
+ if len(normalizedAndCheckedFileOrDirPaths) > 0 {
+ absFileOrDirPaths = &normalizedAndCheckedFileOrDirPaths
+ }
+ }
+ var rootBuckets []storage.ReadBucket
+ for _, includeDirPath := range includeDirPaths {
+ rootBucket, err := b.storageosProvider.NewReadWriteBucket(
+ includeDirPath,
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return nil, err
+ }
+ // need to do match extension here
+ // https://github.com/bufbuild/buf/issues/113
+ rootBuckets = append(rootBuckets, storage.MapReadBucket(rootBucket, storage.MatchPathExt(".proto")))
+ }
+ module, err := bufmodule.NewModuleForBucket(ctx, storage.MultiReadBucket(rootBuckets...))
+ if err != nil {
+ return nil, err
+ }
+ return applyModulePaths(
+ module,
+ absIncludeDirPaths,
+ absFileOrDirPaths,
+ nil, // Excluding files isn't supported for the ModuleIncludeBuilder.
+ fileOrDirPathsAllowNotExist,
+ normalpath.Absolute,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/usage.gen.go
new file mode 100644
index 000000000..4f86aa7c4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufmodulebuild
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/util.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/util.go
new file mode 100644
index 000000000..072a90637
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulebuild/util.go
@@ -0,0 +1,121 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodulebuild
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+)
+
+func applyModulePaths(
+ module bufmodule.Module,
+ roots []string,
+ fileOrDirPaths *[]string,
+ excludeFileOrDirPaths []string,
+ fileOrDirPathsAllowNotExist bool,
+ pathType normalpath.PathType,
+) (bufmodule.Module, error) {
+ if fileOrDirPaths == nil && excludeFileOrDirPaths == nil {
+ return module, nil
+ }
+ var excludePaths []string
+ if len(excludeFileOrDirPaths) != 0 {
+ var err error
+ excludePaths, err = pathsToTargetPaths(roots, excludeFileOrDirPaths, pathType)
+ if err != nil {
+ return nil, err
+ }
+ }
+ if fileOrDirPaths == nil {
+ if fileOrDirPathsAllowNotExist {
+ return bufmodule.ModuleWithExcludePathsAllowNotExist(module, excludePaths)
+ }
+ return bufmodule.ModuleWithExcludePaths(module, excludePaths)
+ }
+ targetPaths, err := pathsToTargetPaths(roots, *fileOrDirPaths, pathType)
+ if err != nil {
+ return nil, err
+ }
+ if fileOrDirPathsAllowNotExist {
+ return bufmodule.ModuleWithTargetPathsAllowNotExist(module, targetPaths, excludePaths)
+ }
+ return bufmodule.ModuleWithTargetPaths(module, targetPaths, excludePaths)
+}
+
+func pathsToTargetPaths(roots []string, paths []string, pathType normalpath.PathType) ([]string, error) {
+ if len(roots) == 0 {
+ // this should never happen
+ return nil, errors.New("no roots on config")
+ }
+
+ targetPaths := make([]string, len(paths))
+ for i, path := range paths {
+ targetPath, err := pathToTargetPath(roots, path, pathType)
+ if err != nil {
+ return nil, err
+ }
+ targetPaths[i] = targetPath
+ }
+ return targetPaths, nil
+}
+
+func pathToTargetPath(roots []string, path string, pathType normalpath.PathType) (string, error) {
+ var matchingRoots []string
+ for _, root := range roots {
+ if normalpath.ContainsPath(root, path, pathType) {
+ matchingRoots = append(matchingRoots, root)
+ }
+ }
+ switch len(matchingRoots) {
+ case 0:
+ // this is a user error and will likely happen often
+ return "", fmt.Errorf(
+ "path %q is not contained within any of roots %s - note that specified paths "+
+ "cannot be roots, but must be contained within roots",
+ path,
+ stringutil.SliceToHumanStringQuoted(roots),
+ )
+ case 1:
+ targetPath, err := normalpath.Rel(matchingRoots[0], path)
+ if err != nil {
+ return "", err
+ }
+ // just in case
+ return normalpath.NormalizeAndValidate(targetPath)
+ default:
+ // this should never happen
+ return "", fmt.Errorf("%q is contained in multiple roots %s", path, stringutil.SliceToHumanStringQuoted(roots))
+ }
+}
+
+type buildOptions struct {
+ moduleIdentity bufmoduleref.ModuleIdentity
+ // If nil, all files are considered targets.
+ // If empty (but non-nil), the module will have no target paths.
+ paths *[]string
+ pathsAllowNotExist bool
+ // Paths that will be excluded from the module build process. This is handled in conjunction
+ // with `paths`.
+ excludePaths []string
+}
+
+type buildModuleFileSetOptions struct {
+ workspace bufmodule.Workspace
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/bufmodulecache.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/bufmodulecache.go
new file mode 100644
index 000000000..3e625264f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/bufmodulecache.go
@@ -0,0 +1,72 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodulecache
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect"
+ "github.com/bufbuild/buf/private/pkg/connectclient"
+ "github.com/bufbuild/buf/private/pkg/filelock"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/verbose"
+ "go.uber.org/zap"
+)
+
+// ModuleReaderOption is an option for creating a ModuleReader.
+type ModuleReaderOption func(*moduleReaderOptions)
+
+type RepositoryServiceClientFactory func(address string) registryv1alpha1connect.RepositoryServiceClient
+
+func NewRepositoryServiceClientFactory(clientConfig *connectclient.Config) RepositoryServiceClientFactory {
+ return func(address string) registryv1alpha1connect.RepositoryServiceClient {
+ return connectclient.Make(clientConfig, address, registryv1alpha1connect.NewRepositoryServiceClient)
+ }
+}
+
+// NewModuleReader returns a new ModuleReader that uses cache as a caching layer, and
+// delegate as the source of truth.
+func NewModuleReader(
+ logger *zap.Logger,
+ verbosePrinter verbose.Printer,
+ fileLocker filelock.Locker,
+ dataReadWriteBucket storage.ReadWriteBucket,
+ sumReadWriteBucket storage.ReadWriteBucket,
+ delegate bufmodule.ModuleReader,
+ repositoryClientFactory RepositoryServiceClientFactory,
+ options ...ModuleReaderOption,
+) bufmodule.ModuleReader {
+ return newModuleReader(
+ logger,
+ verbosePrinter,
+ fileLocker,
+ dataReadWriteBucket,
+ sumReadWriteBucket,
+ delegate,
+ repositoryClientFactory,
+ options...,
+ )
+}
+
+// ModuleReaderWithExternalPaths is used to preserve the external paths
+// to the files resolved from the module cache.
+func ModuleReaderWithExternalPaths() ModuleReaderOption {
+ return func(moduleReaderOptions *moduleReaderOptions) {
+ moduleReaderOptions.allowCacheExternalPaths = true
+ }
+}
+
+type moduleReaderOptions struct {
+ allowCacheExternalPaths bool
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/module_cacher.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/module_cacher.go
new file mode 100644
index 000000000..29eb7ec32
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/module_cacher.go
@@ -0,0 +1,161 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodulecache
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/buflock"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+type moduleCacher struct {
+ logger *zap.Logger
+ dataReadWriteBucket storage.ReadWriteBucket
+ sumReadWriteBucket storage.ReadWriteBucket
+ allowCacheExternalPaths bool
+}
+
+func newModuleCacher(
+ logger *zap.Logger,
+ dataReadWriteBucket storage.ReadWriteBucket,
+ sumReadWriteBucket storage.ReadWriteBucket,
+ allowCacheExternalPaths bool,
+) *moduleCacher {
+ return &moduleCacher{
+ logger: logger,
+ dataReadWriteBucket: dataReadWriteBucket,
+ sumReadWriteBucket: sumReadWriteBucket,
+ allowCacheExternalPaths: allowCacheExternalPaths,
+ }
+}
+
+func (m *moduleCacher) GetModule(
+ ctx context.Context,
+ modulePin bufmoduleref.ModulePin,
+) (bufmodule.Module, error) {
+ modulePath := newCacheKey(modulePin)
+ // Explicitly assign the variable as a storage.ReadBucket so
+ // that we can easily transform it with storage.NoExternalPathReadBucket
+ // below.
+ var dataReadWriteBucket storage.ReadBucket = storage.MapReadWriteBucket(
+ m.dataReadWriteBucket,
+ storage.MapOnPrefix(modulePath),
+ )
+ if !m.allowCacheExternalPaths {
+ // In general, we do not want the external path of the cache to be propagated to the user.
+ dataReadWriteBucket = storage.NoExternalPathReadBucket(dataReadWriteBucket)
+ }
+ exists, err := storage.Exists(ctx, dataReadWriteBucket, buflock.ExternalConfigFilePath)
+ if err != nil {
+ return nil, err
+ }
+ if !exists {
+ return nil, storage.NewErrNotExist(modulePath)
+ }
+ module, err := bufmodule.NewModuleForBucket(
+ ctx,
+ dataReadWriteBucket,
+ bufmodule.ModuleWithModuleIdentityAndCommit(modulePin, modulePin.Commit()),
+ )
+ if err != nil {
+ return nil, err
+ }
+ storedDigestData, err := storage.ReadPath(ctx, m.sumReadWriteBucket, modulePath)
+ if err != nil {
+ // This can happen if we couldn't find the sum file, which means
+ // we are in an invalid state
+ if storage.IsNotExist(err) {
+ m.logger.Sugar().Warnf(
+ "Module %q has invalid cache state: no stored digest could be found. The cache will attempt to self-correct.",
+ modulePin.String(),
+ )
+ // We want to return ErrNotExist so that the ModuleReader can re-download
+ return nil, storage.NewErrNotExist(modulePath)
+ }
+ return nil, err
+ }
+ storedDigest := string(storedDigestData)
+ // This can happen if we couldn't find the sum file, which means
+ // we are in an invalid state
+ if storedDigest == "" {
+ m.logger.Sugar().Warnf(
+ "Module %q has invalid cache state: no stored digest could be found. The cache will attempt to self-correct.",
+ modulePin.String(),
+ )
+ // We want to return ErrNotExist so that the ModuleReader can re-download
+ // Note that we deal with invalid data in the cache at the ModuleReader level by overwriting via PutModule
+ return nil, storage.NewErrNotExist(modulePath)
+ }
+ digest, err := bufmodule.ModuleDigestB3(ctx, module)
+ if err != nil {
+ return nil, err
+ }
+ if digest != storedDigest {
+ m.logger.Sugar().Warnf(
+ "Module %q has invalid cache state: calculated digest %q does not match stored digest %q. The cache will attempt to self-correct.",
+ modulePin.String(),
+ digest,
+ storedDigest,
+ )
+ // We want to return ErrNotExist so that the ModuleReader can re-download
+ // Note that we deal with invalid data in the cache at the ModuleReader level by overwriting via PutModule
+ return nil, storage.NewErrNotExist(modulePath)
+ }
+ return module, nil
+}
+
+func (m *moduleCacher) PutModule(
+ ctx context.Context,
+ modulePin bufmoduleref.ModulePin,
+ module bufmodule.Module,
+) error {
+ modulePath := newCacheKey(modulePin)
+ digest, err := bufmodule.ModuleDigestB3(ctx, module)
+ if err != nil {
+ return err
+ }
+ dataReadWriteBucket := storage.MapReadWriteBucket(
+ m.dataReadWriteBucket,
+ storage.MapOnPrefix(modulePath),
+ )
+ exists, err := storage.Exists(ctx, dataReadWriteBucket, buflock.ExternalConfigFilePath)
+ if err != nil {
+ return err
+ }
+ if exists {
+ // If the module already exists in the cache, we want to make sure we delete it
+ // before putting new data
+ if err := dataReadWriteBucket.DeleteAll(ctx, ""); err != nil {
+ return err
+ }
+ }
+ if err := bufmodule.ModuleToBucket(ctx, module, dataReadWriteBucket); err != nil {
+ return err
+ }
+ // This will overwrite if necessary
+ if err := storage.PutPath(ctx, m.sumReadWriteBucket, modulePath, []byte(digest)); err != nil {
+ return multierr.Append(
+ err,
+ // Try to clean up after ourselves.
+ dataReadWriteBucket.DeleteAll(ctx, ""),
+ )
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/module_reader.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/module_reader.go
new file mode 100644
index 000000000..0a7053958
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/module_reader.go
@@ -0,0 +1,184 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodulecache
+
+import (
+ "context"
+ "fmt"
+ "sync"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/filelock"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/verbose"
+ "github.com/bufbuild/connect-go"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+type moduleReader struct {
+ logger *zap.Logger
+ verbosePrinter verbose.Printer
+ fileLocker filelock.Locker
+ cache *moduleCacher
+ delegate bufmodule.ModuleReader
+ repositoryClientFactory RepositoryServiceClientFactory
+
+ count int
+ cacheHits int
+ lock sync.RWMutex
+}
+
+func newModuleReader(
+ logger *zap.Logger,
+ verbosePrinter verbose.Printer,
+ fileLocker filelock.Locker,
+ dataReadWriteBucket storage.ReadWriteBucket,
+ sumReadWriteBucket storage.ReadWriteBucket,
+ delegate bufmodule.ModuleReader,
+ repositoryClientFactory RepositoryServiceClientFactory,
+ options ...ModuleReaderOption,
+) *moduleReader {
+ moduleReaderOptions := &moduleReaderOptions{}
+ for _, option := range options {
+ option(moduleReaderOptions)
+ }
+ return &moduleReader{
+ logger: logger,
+ verbosePrinter: verbosePrinter,
+ fileLocker: fileLocker,
+ cache: newModuleCacher(
+ logger,
+ dataReadWriteBucket,
+ sumReadWriteBucket,
+ moduleReaderOptions.allowCacheExternalPaths,
+ ),
+ delegate: delegate,
+ repositoryClientFactory: repositoryClientFactory,
+ }
+}
+
+func (m *moduleReader) GetModule(
+ ctx context.Context,
+ modulePin bufmoduleref.ModulePin,
+) (_ bufmodule.Module, retErr error) {
+ cacheKey := newCacheKey(modulePin)
+
+ // First, do a GetModule with a read lock to see if we have a valid module.
+ readUnlocker, err := m.fileLocker.RLock(ctx, cacheKey)
+ if err != nil {
+ return nil, err
+ }
+ module, err := m.cache.GetModule(ctx, modulePin)
+ err = multierr.Append(err, readUnlocker.Unlock())
+ if err == nil {
+ m.logger.Debug(
+ "cache_hit",
+ zap.String("module_pin", modulePin.String()),
+ )
+ m.lock.Lock()
+ m.count++
+ m.cacheHits++
+ m.lock.Unlock()
+ return module, nil
+ }
+ if !storage.IsNotExist(err) {
+ return nil, err
+ }
+
+ // We now had a IsNotExist error, so we do a write lock and check again (double locking).
+ // If we still have an error, we do a GetModule from the delegate, and put the result.
+ //
+ // Note that IsNotExist will happen if there was a checksum mismatch as well, in which case
+ // we want to overwrite whatever is actually in the cache and self-correct the issue
+ unlocker, err := m.fileLocker.Lock(ctx, cacheKey)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, unlocker.Unlock())
+ }()
+ module, err = m.cache.GetModule(ctx, modulePin)
+ if err == nil {
+ m.logger.Debug(
+ "cache_hit",
+ zap.String("module_pin", modulePin.String()),
+ )
+ m.lock.Lock()
+ m.count++
+ m.cacheHits++
+ m.lock.Unlock()
+ return module, nil
+ }
+ if !storage.IsNotExist(err) {
+ return nil, err
+ }
+
+ // We now had a IsNotExist error within a write lock, so go to the delegate and then put.
+ m.logger.Debug(
+ "cache_miss",
+ zap.String("module_pin", modulePin.String()),
+ )
+ m.verbosePrinter.Printf("downloading " + modulePin.String())
+ module, err = m.delegate.GetModule(ctx, modulePin)
+ if err != nil {
+ return nil, err
+ }
+ if err := m.cache.PutModule(
+ ctx,
+ modulePin,
+ module,
+ ); err != nil {
+ return nil, err
+ }
+
+ repositoryService := m.repositoryClientFactory(modulePin.Remote())
+ resp, err := repositoryService.GetRepositoryByFullName(
+ ctx,
+ connect.NewRequest(®istryv1alpha1.GetRepositoryByFullNameRequest{
+ FullName: fmt.Sprintf("%s/%s", modulePin.Owner(), modulePin.Repository()),
+ }),
+ )
+ if err != nil {
+ return nil, err
+ }
+ repository := resp.Msg.Repository
+ if repository.Deprecated {
+ warnMsg := fmt.Sprintf(`Repository "%s" is deprecated`, modulePin.IdentityString())
+ if repository.DeprecationMessage != "" {
+ warnMsg = fmt.Sprintf("%s: %s", warnMsg, repository.DeprecationMessage)
+ }
+ m.logger.Sugar().Warn(warnMsg)
+ }
+
+ m.lock.Lock()
+ m.count++
+ m.lock.Unlock()
+ return module, nil
+}
+
+func (m *moduleReader) getCount() int {
+ m.lock.RLock()
+ defer m.lock.RUnlock()
+ return m.count
+}
+
+func (m *moduleReader) getCacheHits() int {
+ m.lock.RLock()
+ defer m.lock.RUnlock()
+ return m.cacheHits
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/usage.gen.go
new file mode 100644
index 000000000..9eb0618c5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufmodulecache
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/util.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/util.go
new file mode 100644
index 000000000..8dbaabd2f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmodulecache/util.go
@@ -0,0 +1,26 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodulecache
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+// newCacheKey returns the key associated with the given module pin.
+// The cache key is of the form: remote/owner/repository/commit.
+func newCacheKey(modulePin bufmoduleref.ModulePin) string {
+ return normalpath.Join(modulePin.Remote(), modulePin.Owner(), modulePin.Repository(), modulePin.Commit())
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig/bufmoduleconfig.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig/bufmoduleconfig.go
new file mode 100644
index 000000000..6bdd38996
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig/bufmoduleconfig.go
@@ -0,0 +1,63 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleconfig
+
+import "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+
+// Config is a configuration for build.
+type Config struct {
+ // RootToExcludes contains a map from root to the excludes for that root.
+ //
+ // Roots are the root directories within a bucket to search for Protobuf files.
+ //
+ // There will be no between the roots, ie foo/bar and foo are not allowed.
+ // All Protobuf files must be unique relative to the roots, ie if foo and bar
+ // are roots, then foo/baz.proto and bar/baz.proto are not allowed.
+ //
+ // All roots will be normalized and validated.
+ //
+ // Excludes are the directories within a bucket to exclude.
+ //
+ // There should be no overlap between the excludes, ie foo/bar and foo are not allowed.
+ //
+ // All excludes must reside within a root, but none will be equal to a root.
+ // All excludes will be normalized and validated.
+ // The excludes in this map will be relative to the root they map to!
+ //
+ // If RootToExcludes is empty, the default is "." with no excludes.
+ RootToExcludes map[string][]string
+ DependencyModuleReferences []bufmoduleref.ModuleReference
+}
+
+// NewConfigV1Beta1 returns a new, validated Config for the ExternalConfig.
+func NewConfigV1Beta1(externalConfig ExternalConfigV1Beta1, deps ...string) (*Config, error) {
+ return newConfigV1Beta1(externalConfig, deps...)
+}
+
+// NewConfigV1 returns a new, validated Config for the ExternalConfig.
+func NewConfigV1(externalConfig ExternalConfigV1, deps ...string) (*Config, error) {
+ return newConfigV1(externalConfig, deps...)
+}
+
+// ExternalConfigV1Beta1 is an external config.
+type ExternalConfigV1Beta1 struct {
+ Roots []string `json:"roots,omitempty" yaml:"roots,omitempty"`
+ Excludes []string `json:"excludes,omitempty" yaml:"excludes,omitempty"`
+}
+
+// ExternalConfigV1 is an external config.
+type ExternalConfigV1 struct {
+ Excludes []string `json:"excludes,omitempty" yaml:"excludes,omitempty"`
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig/config.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig/config.go
new file mode 100644
index 000000000..dbe94667e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig/config.go
@@ -0,0 +1,161 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleconfig
+
+import (
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/internal"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+)
+
+func newConfigV1Beta1(externalConfig ExternalConfigV1Beta1, deps ...string) (*Config, error) {
+ dependencyModuleReferences, err := parseDependencyModuleReferences(deps...)
+ if err != nil {
+ return nil, err
+ }
+
+ rootToExcludes := make(map[string][]string)
+
+ roots := externalConfig.Roots
+ // not yet relative to roots
+ fullExcludes := externalConfig.Excludes
+
+ if len(roots) == 0 {
+ roots = []string{"."}
+ }
+ roots, err = internal.NormalizeAndCheckPaths(roots, "root", normalpath.Relative, true)
+ if err != nil {
+ return nil, err
+ }
+ for _, root := range roots {
+ // we already checked duplicates, but just in case
+ if _, ok := rootToExcludes[root]; ok {
+ return nil, fmt.Errorf("unexpected duplicate root: %q", root)
+ }
+ rootToExcludes[root] = make([]string, 0)
+ }
+
+ if len(fullExcludes) == 0 {
+ return &Config{
+ RootToExcludes: rootToExcludes,
+ DependencyModuleReferences: dependencyModuleReferences,
+ }, nil
+ }
+
+ // this also verifies that fullExcludes is unique
+ fullExcludes, err = internal.NormalizeAndCheckPaths(fullExcludes, "exclude", normalpath.Relative, true)
+ if err != nil {
+ return nil, err
+ }
+
+ // verify that no exclude equals a root directly and only directories are specified
+ for _, fullExclude := range fullExcludes {
+ if normalpath.Ext(fullExclude) == ".proto" {
+ return nil, fmt.Errorf("excludes can only be directories but file %s discovered", fullExclude)
+ }
+ if _, ok := rootToExcludes[fullExclude]; ok {
+ return nil, fmt.Errorf("%s is both a root and exclude, which means the entire root is excluded, which is not valid", fullExclude)
+ }
+ }
+
+ // verify that all excludes are within a root
+ rootMap := stringutil.SliceToMap(roots)
+ for _, fullExclude := range fullExcludes {
+ switch matchingRoots := normalpath.MapAllEqualOrContainingPaths(rootMap, fullExclude, normalpath.Relative); len(matchingRoots) {
+ case 0:
+ return nil, fmt.Errorf("exclude %s is not contained in any root, which is not valid", fullExclude)
+ case 1:
+ root := matchingRoots[0]
+ exclude, err := normalpath.Rel(root, fullExclude)
+ if err != nil {
+ return nil, err
+ }
+ // just in case
+ exclude, err = normalpath.NormalizeAndValidate(exclude)
+ if err != nil {
+ return nil, err
+ }
+ rootToExcludes[root] = append(rootToExcludes[root], exclude)
+ default:
+ // this should never happen, but just in case
+ return nil, fmt.Errorf("exclude %q was in multiple roots %v (system error)", fullExclude, matchingRoots)
+ }
+ }
+
+ for root, excludes := range rootToExcludes {
+ uniqueSortedExcludes := stringutil.SliceToUniqueSortedSliceFilterEmptyStrings(excludes)
+ if len(excludes) != len(uniqueSortedExcludes) {
+ // this should never happen, but just in case
+ return nil, fmt.Errorf("excludes %v are not unique (system error)", excludes)
+ }
+ rootToExcludes[root] = uniqueSortedExcludes
+ }
+ return &Config{
+ RootToExcludes: rootToExcludes,
+ DependencyModuleReferences: dependencyModuleReferences,
+ }, nil
+}
+
+func newConfigV1(externalConfig ExternalConfigV1, deps ...string) (*Config, error) {
+ dependencyModuleReferences, err := parseDependencyModuleReferences(deps...)
+ if err != nil {
+ return nil, err
+ }
+ // this also verifies that the excludes are unique, normalized, and validated
+ excludes, err := internal.NormalizeAndCheckPaths(externalConfig.Excludes, "exclude", normalpath.Relative, true)
+ if err != nil {
+ return nil, err
+ }
+ for _, exclude := range excludes {
+ if normalpath.Ext(exclude) == ".proto" {
+ return nil, fmt.Errorf("excludes can only be directories but file %s discovered", exclude)
+ }
+ }
+ uniqueSortedExcludes := stringutil.SliceToUniqueSortedSliceFilterEmptyStrings(excludes)
+ if len(excludes) != len(uniqueSortedExcludes) {
+ // this should never happen, but just in case
+ return nil, fmt.Errorf("excludes %v are not unique (system error)", excludes)
+ }
+ rootToExcludes := map[string][]string{
+ ".": excludes, // all excludes are relative to the root
+ }
+ return &Config{
+ RootToExcludes: rootToExcludes,
+ DependencyModuleReferences: dependencyModuleReferences,
+ }, nil
+}
+
+func parseDependencyModuleReferences(deps ...string) ([]bufmoduleref.ModuleReference, error) {
+ if len(deps) == 0 {
+ return nil, nil
+ }
+ moduleReferences := make([]bufmoduleref.ModuleReference, 0, len(deps))
+ for _, dep := range deps {
+ dep := strings.TrimSpace(dep)
+ moduleReference, err := bufmoduleref.ModuleReferenceForString(dep)
+ if err != nil {
+ return nil, err
+ }
+ moduleReferences = append(moduleReferences, moduleReference)
+ }
+ if err := bufmoduleref.ValidateModuleReferencesUniqueByIdentity(moduleReferences); err != nil {
+ return nil, err
+ }
+ return moduleReferences, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig/usage.gen.go
new file mode 100644
index 000000000..b74c86390
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleconfig/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufmoduleconfig
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleprotocompile/bufmoduleprotocompile.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleprotocompile/bufmoduleprotocompile.go
new file mode 100644
index 000000000..c6487f487
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleprotocompile/bufmoduleprotocompile.go
@@ -0,0 +1,129 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleprotocompile
+
+import (
+ "context"
+ "io"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufanalysis"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/protocompile/reporter"
+)
+
+// ParserAccessorHandler handles source file access operations for protocompile.
+type ParserAccessorHandler interface {
+ // Open opens the given path, and tracks the external path and import status.
+ //
+ // This function can be used as the accessor function for a protocompile.SourceResolver.
+ Open(path string) (io.ReadCloser, error)
+ // ExternalPath returns the external path for the input path.
+ //
+ // Returns the input path if the external path is not known.
+ ExternalPath(path string) string
+ // IsImport returns true if the path is an import.
+ IsImport(path string) bool
+ // ModuleIdentity returns nil if not available.
+ ModuleIdentity(path string) bufmoduleref.ModuleIdentity
+ // Commit returns empty if not available.
+ Commit(path string) string
+}
+
+// NewParserAccessorHandler returns a new ParserAccessorHandler.
+//
+// The given module should be a bufmodule.ModuleFileSet for image builds, as it needs
+// access to not just the target files, but all dependency files as well.
+//
+// For AST building, this can just be a bufmodule.Module.
+func NewParserAccessorHandler(ctx context.Context, module bufmodule.Module) ParserAccessorHandler {
+ return newParserAccessorHandler(ctx, module)
+}
+
+// GetFileAnnotations gets the FileAnnotations for the ErrorWithPos errors.
+func GetFileAnnotations(
+ ctx context.Context,
+ parserAccessorHandler ParserAccessorHandler,
+ errorsWithPos []reporter.ErrorWithPos,
+) ([]bufanalysis.FileAnnotation, error) {
+ fileAnnotations := make([]bufanalysis.FileAnnotation, 0, len(errorsWithPos))
+ for _, errorWithPos := range errorsWithPos {
+ fileAnnotation, err := GetFileAnnotation(
+ ctx,
+ parserAccessorHandler,
+ errorWithPos,
+ )
+ if err != nil {
+ return nil, err
+ }
+ fileAnnotations = append(fileAnnotations, fileAnnotation)
+ }
+ return fileAnnotations, nil
+}
+
+// GetFileAnnotation gets the FileAnnotation for the ErrorWithPos error.
+func GetFileAnnotation(
+ ctx context.Context,
+ parserAccessorHandler ParserAccessorHandler,
+ errorWithPos reporter.ErrorWithPos,
+) (bufanalysis.FileAnnotation, error) {
+ var fileInfo bufmoduleref.FileInfo
+ var startLine int
+ var startColumn int
+ var endLine int
+ var endColumn int
+ typeString := "COMPILE"
+ message := "Compile error."
+ // this should never happen
+ // maybe we should error
+ if errorWithPos.Unwrap() != nil {
+ message = errorWithPos.Unwrap().Error()
+ }
+ sourcePos := errorWithPos.GetPosition()
+ if sourcePos.Filename != "" {
+ path, err := normalpath.NormalizeAndValidate(sourcePos.Filename)
+ if err != nil {
+ return nil, err
+ }
+ fileInfo, err = bufmoduleref.NewFileInfo(
+ path,
+ parserAccessorHandler.ExternalPath(path),
+ parserAccessorHandler.IsImport(path),
+ nil,
+ "",
+ )
+ if err != nil {
+ return nil, err
+ }
+ }
+ if sourcePos.Line > 0 {
+ startLine = sourcePos.Line
+ endLine = sourcePos.Line
+ }
+ if sourcePos.Col > 0 {
+ startColumn = sourcePos.Col
+ endColumn = sourcePos.Col
+ }
+ return bufanalysis.NewFileAnnotation(
+ fileInfo,
+ startLine,
+ startColumn,
+ endLine,
+ endColumn,
+ typeString,
+ message,
+ ), nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleprotocompile/path_resolver.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleprotocompile/path_resolver.go
new file mode 100644
index 000000000..c03f90d8d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleprotocompile/path_resolver.go
@@ -0,0 +1,148 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleprotocompile
+
+import (
+ "context"
+ "fmt"
+ "io"
+ "sync"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/gen/data/datawkt"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "go.uber.org/multierr"
+)
+
+type parserAccessorHandler struct {
+ ctx context.Context
+ module bufmodule.Module
+ pathToExternalPath map[string]string
+ nonImportPaths map[string]struct{}
+ pathToModuleIdentity map[string]bufmoduleref.ModuleIdentity
+ pathToCommit map[string]string
+ lock sync.RWMutex
+}
+
+func newParserAccessorHandler(
+ ctx context.Context,
+ module bufmodule.Module,
+) *parserAccessorHandler {
+ return &parserAccessorHandler{
+ ctx: ctx,
+ module: module,
+ pathToExternalPath: make(map[string]string),
+ nonImportPaths: make(map[string]struct{}),
+ pathToModuleIdentity: make(map[string]bufmoduleref.ModuleIdentity),
+ pathToCommit: make(map[string]string),
+ }
+}
+
+func (p *parserAccessorHandler) Open(path string) (_ io.ReadCloser, retErr error) {
+ moduleFile, moduleErr := p.module.GetModuleFile(p.ctx, path)
+ if moduleErr != nil {
+ if !storage.IsNotExist(moduleErr) {
+ return nil, moduleErr
+ }
+ if wktModuleFile, wktErr := datawkt.ReadBucket.Get(p.ctx, path); wktErr == nil {
+ if wktModuleFile.Path() != path {
+ // this should never happen, but just in case
+ return nil, fmt.Errorf("parser accessor requested path %q but got %q", path, wktModuleFile.Path())
+ }
+ if err := p.addPath(path, path, true, nil, ""); err != nil {
+ return nil, err
+ }
+ return wktModuleFile, nil
+ }
+ return nil, moduleErr
+ }
+ defer func() {
+ if retErr != nil {
+ retErr = multierr.Append(retErr, moduleFile.Close())
+ }
+ }()
+ if moduleFile.Path() != path {
+ // this should never happen, but just in case
+ return nil, fmt.Errorf("parser accessor requested path %q but got %q", path, moduleFile.Path())
+ }
+ if err := p.addPath(
+ path,
+ moduleFile.ExternalPath(),
+ moduleFile.IsImport(),
+ moduleFile.ModuleIdentity(),
+ moduleFile.Commit(),
+ ); err != nil {
+ return nil, err
+ }
+ return moduleFile, nil
+}
+
+func (p *parserAccessorHandler) ExternalPath(path string) string {
+ p.lock.RLock()
+ defer p.lock.RUnlock()
+ if externalPath := p.pathToExternalPath[path]; externalPath != "" {
+ return externalPath
+ }
+ return path
+}
+
+func (p *parserAccessorHandler) IsImport(path string) bool {
+ p.lock.RLock()
+ defer p.lock.RUnlock()
+ _, isNotImport := p.nonImportPaths[path]
+ return !isNotImport
+}
+
+func (p *parserAccessorHandler) ModuleIdentity(path string) bufmoduleref.ModuleIdentity {
+ p.lock.RLock()
+ defer p.lock.RUnlock()
+ return p.pathToModuleIdentity[path] // nil is a valid value.
+}
+
+func (p *parserAccessorHandler) Commit(path string) string {
+ p.lock.RLock()
+ defer p.lock.RUnlock()
+ return p.pathToCommit[path] // empty is a valid value.
+}
+
+func (p *parserAccessorHandler) addPath(
+ path string,
+ externalPath string,
+ isImport bool,
+ moduleIdentity bufmoduleref.ModuleIdentity,
+ commit string,
+) error {
+ p.lock.Lock()
+ defer p.lock.Unlock()
+ existingExternalPath, ok := p.pathToExternalPath[path]
+ if ok {
+ if existingExternalPath != externalPath {
+ return fmt.Errorf("parser accessor had external paths %q and %q for path %q", existingExternalPath, externalPath, path)
+ }
+ } else {
+ p.pathToExternalPath[path] = externalPath
+ }
+ if !isImport {
+ p.nonImportPaths[path] = struct{}{}
+ }
+ if moduleIdentity != nil {
+ p.pathToModuleIdentity[path] = moduleIdentity
+ }
+ if commit != "" {
+ p.pathToCommit[path] = commit
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleprotocompile/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleprotocompile/usage.gen.go
new file mode 100644
index 000000000..64af4c6fb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleprotocompile/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufmoduleprotocompile
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/bufmoduleref.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/bufmoduleref.go
new file mode 100644
index 000000000..08977c862
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/bufmoduleref.go
@@ -0,0 +1,487 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleref
+
+import (
+ "context"
+ "fmt"
+ "sort"
+ "strings"
+ "time"
+
+ "github.com/bufbuild/buf/private/bufpkg/buflock"
+ modulev1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/uuidutil"
+)
+
+const (
+ // Main is the default reference used if no other reference is specified.
+ Main = "main"
+)
+
+// FileInfo contains module file info.
+type FileInfo interface {
+ // Path is the path of the file relative to the root it is contained within.
+ // This will be normalized, validated and never empty,
+ // This will be unique within a given Image.
+ Path() string
+ // ExternalPath returns the path that identifies this file externally.
+ //
+ // This will be unnormalized.
+ // Never empty. Falls back to Path if there is not an external path.
+ //
+ // Example:
+ // Assume we had the input path /foo/bar which is a local directory.
+ // Path: one/one.proto
+ // RootDirPath: proto
+ // ExternalPath: /foo/bar/proto/one/one.proto
+ ExternalPath() string
+ // IsImport returns true if this file is an import.
+ IsImport() bool
+ // ModuleIdentity is the module that this file came from.
+ //
+ // Note this *can* be nil if we did not build from a named module.
+ // All code must assume this can be nil.
+ // Note that nil checking should work since the backing type is always a pointer.
+ ModuleIdentity() ModuleIdentity
+ // Commit is the commit for the module that this file came from.
+ //
+ // This will only be set if ModuleIdentity is set. but may not be set
+ // even if ModuleIdentity is set, that is commit is optional information
+ // even if we know what module this file came from.
+ Commit() string
+ // WithIsImport returns this FileInfo with the given IsImport value.
+ WithIsImport(isImport bool) FileInfo
+
+ isFileInfo()
+}
+
+// NewFileInfo returns a new FileInfo.
+//
+// TODO: we should make moduleIdentity and commit options.
+// TODO: we don't validate commit
+func NewFileInfo(
+ path string,
+ externalPath string,
+ isImport bool,
+ moduleIdentity ModuleIdentity,
+ commit string,
+) (FileInfo, error) {
+ return newFileInfo(
+ path,
+ externalPath,
+ isImport,
+ moduleIdentity,
+ commit,
+ )
+}
+
+// ModuleOwner is a module owner.
+//
+// It just contains remote, owner.
+//
+// This is shared by ModuleIdentity.
+type ModuleOwner interface {
+ Remote() string
+ Owner() string
+
+ isModuleOwner()
+}
+
+// NewModuleOwner returns a new ModuleOwner.
+func NewModuleOwner(
+ remote string,
+ owner string,
+) (ModuleOwner, error) {
+ return newModuleOwner(remote, owner)
+}
+
+// ModuleOwnerForString returns a new ModuleOwner for the given string.
+//
+// This parses the path in the form remote/owner.
+func ModuleOwnerForString(path string) (ModuleOwner, error) {
+ slashSplit := strings.Split(path, "/")
+ if len(slashSplit) != 2 {
+ return nil, newInvalidModuleOwnerStringError(path)
+ }
+ remote := strings.TrimSpace(slashSplit[0])
+ if remote == "" {
+ return nil, newInvalidModuleIdentityStringError(path)
+ }
+ owner := strings.TrimSpace(slashSplit[1])
+ if owner == "" {
+ return nil, newInvalidModuleIdentityStringError(path)
+ }
+ return NewModuleOwner(remote, owner)
+}
+
+// ModuleIdentity is a module identity.
+//
+// It just contains remote, owner, repository.
+//
+// This is shared by ModuleReference and ModulePin.
+type ModuleIdentity interface {
+ ModuleOwner
+
+ Repository() string
+
+ // IdentityString is the string remote/owner/repository.
+ IdentityString() string
+
+ isModuleIdentity()
+}
+
+// NewModuleIdentity returns a new ModuleIdentity.
+func NewModuleIdentity(
+ remote string,
+ owner string,
+ repository string,
+) (ModuleIdentity, error) {
+ return newModuleIdentity(remote, owner, repository)
+}
+
+// ModuleIdentityForString returns a new ModuleIdentity for the given string.
+//
+// This parses the path in the form remote/owner/repository
+//
+// TODO: we may want to add a special error if we detect / or @ as this may be a common mistake.
+func ModuleIdentityForString(path string) (ModuleIdentity, error) {
+ remote, owner, repository, err := parseModuleIdentityComponents(path)
+ if err != nil {
+ return nil, err
+ }
+ return NewModuleIdentity(remote, owner, repository)
+}
+
+// ModuleReference is a module reference.
+//
+// It references either a branch, tag, or a commit.
+// Note that since commits belong to branches, we can deduce
+// the branch from the commit when resolving.
+type ModuleReference interface {
+ ModuleIdentity
+
+ // Prints either remote/owner/repository:{branch,commit}
+ // If the reference is equal to MainBranch, prints remote/owner/repository.
+ fmt.Stringer
+
+ // Either branch, tag, or commit
+ Reference() string
+
+ isModuleReference()
+}
+
+// NewModuleReference returns a new validated ModuleReference.
+func NewModuleReference(
+ remote string,
+ owner string,
+ repository string,
+ reference string,
+) (ModuleReference, error) {
+ return newModuleReference(remote, owner, repository, reference)
+}
+
+// NewModuleReferenceForProto returns a new ModuleReference for the given proto ModuleReference.
+func NewModuleReferenceForProto(protoModuleReference *modulev1alpha1.ModuleReference) (ModuleReference, error) {
+ return newModuleReferenceForProto(protoModuleReference)
+}
+
+// NewModuleReferencesForProtos maps the Protobuf equivalent into the internal representation.
+func NewModuleReferencesForProtos(protoModuleReferences ...*modulev1alpha1.ModuleReference) ([]ModuleReference, error) {
+ if len(protoModuleReferences) == 0 {
+ return nil, nil
+ }
+ moduleReferences := make([]ModuleReference, len(protoModuleReferences))
+ for i, protoModuleReference := range protoModuleReferences {
+ moduleReference, err := NewModuleReferenceForProto(protoModuleReference)
+ if err != nil {
+ return nil, err
+ }
+ moduleReferences[i] = moduleReference
+ }
+ return moduleReferences, nil
+}
+
+// NewProtoModuleReferenceForModuleReference returns a new proto ModuleReference for the given ModuleReference.
+func NewProtoModuleReferenceForModuleReference(moduleReference ModuleReference) *modulev1alpha1.ModuleReference {
+ return newProtoModuleReferenceForModuleReference(moduleReference)
+}
+
+// NewProtoModuleReferencesForModuleReferences maps the given module references into the protobuf representation.
+func NewProtoModuleReferencesForModuleReferences(moduleReferences ...ModuleReference) []*modulev1alpha1.ModuleReference {
+ if len(moduleReferences) == 0 {
+ return nil
+ }
+ protoModuleReferences := make([]*modulev1alpha1.ModuleReference, len(moduleReferences))
+ for i, moduleReference := range moduleReferences {
+ protoModuleReferences[i] = NewProtoModuleReferenceForModuleReference(moduleReference)
+ }
+ return protoModuleReferences
+}
+
+// ModuleReferenceForString returns a new ModuleReference for the given string.
+// If a branch, commit, draft, or tag is not provided, the "main" branch is used.
+//
+// This parses the path in the form remote/owner/repository{:branch,:commit,:draft,:tag}.
+func ModuleReferenceForString(path string) (ModuleReference, error) {
+ remote, owner, repository, reference, err := parseModuleReferenceComponents(path)
+ if err != nil {
+ return nil, err
+ }
+ if reference == "" {
+ // Default to the main branch if a ':' separator was not specified.
+ reference = Main
+ }
+ return NewModuleReference(remote, owner, repository, reference)
+}
+
+// IsCommitModuleReference returns true if the ModuleReference references a commit.
+//
+// If false, this means the ModuleReference references a branch or tag.
+// Branch and tag disambiguation needs to be done server-side.
+func IsCommitModuleReference(moduleReference ModuleReference) bool {
+ return IsCommitReference(moduleReference.Reference())
+}
+
+// IsCommitReference returns whether the provided reference is a commit.
+func IsCommitReference(reference string) bool {
+ _, err := uuidutil.FromDashless(reference)
+ return err == nil
+}
+
+// ModulePin is a module pin.
+//
+// It references a specific point in time of a Module.
+//
+// Note that a commit does this itself, but we want all this information.
+// This is what is stored in a buf.lock file.
+type ModulePin interface {
+ ModuleIdentity
+
+ // Prints remote/owner/repository:commit, which matches ModuleReference
+ fmt.Stringer
+
+ // all of these will be set
+ Branch() string
+ Commit() string
+ CreateTime() time.Time
+
+ isModulePin()
+}
+
+// NewModulePin returns a new validated ModulePin.
+func NewModulePin(
+ remote string,
+ owner string,
+ repository string,
+ branch string,
+ commit string,
+ createTime time.Time,
+) (ModulePin, error) {
+ return newModulePin(remote, owner, repository, branch, commit, createTime)
+}
+
+// NewModulePinForProto returns a new ModulePin for the given proto ModulePin.
+func NewModulePinForProto(protoModulePin *modulev1alpha1.ModulePin) (ModulePin, error) {
+ return newModulePinForProto(protoModulePin)
+}
+
+// NewModulePinsForProtos maps the Protobuf equivalent into the internal representation.
+func NewModulePinsForProtos(protoModulePins ...*modulev1alpha1.ModulePin) ([]ModulePin, error) {
+ if len(protoModulePins) == 0 {
+ return nil, nil
+ }
+ modulePins := make([]ModulePin, len(protoModulePins))
+ for i, protoModulePin := range protoModulePins {
+ modulePin, err := NewModulePinForProto(protoModulePin)
+ if err != nil {
+ return nil, err
+ }
+ modulePins[i] = modulePin
+ }
+ return modulePins, nil
+}
+
+// NewProtoModulePinForModulePin returns a new proto ModulePin for the given ModulePin.
+func NewProtoModulePinForModulePin(modulePin ModulePin) *modulev1alpha1.ModulePin {
+ return newProtoModulePinForModulePin(modulePin)
+}
+
+// NewProtoModulePinsForModulePins maps the given module pins into the protobuf representation.
+func NewProtoModulePinsForModulePins(modulePins ...ModulePin) []*modulev1alpha1.ModulePin {
+ if len(modulePins) == 0 {
+ return nil
+ }
+ protoModulePins := make([]*modulev1alpha1.ModulePin, len(modulePins))
+ for i, modulePin := range modulePins {
+ protoModulePins[i] = NewProtoModulePinForModulePin(modulePin)
+ }
+ return protoModulePins
+}
+
+// ValidateModuleReferencesUniqueByIdentity returns an error if the module references contain any duplicates.
+//
+// This only checks remote, owner, repository.
+func ValidateModuleReferencesUniqueByIdentity(moduleReferences []ModuleReference) error {
+ seenModuleReferences := make(map[string]struct{})
+ for _, moduleReference := range moduleReferences {
+ moduleIdentityString := moduleReference.IdentityString()
+ if _, ok := seenModuleReferences[moduleIdentityString]; ok {
+ return fmt.Errorf("module %s appeared twice", moduleIdentityString)
+ }
+ seenModuleReferences[moduleIdentityString] = struct{}{}
+ }
+ return nil
+}
+
+// ValidateModulePinsUniqueByIdentity returns an error if the module pins contain any duplicates.
+//
+// This only checks remote, owner, repository.
+func ValidateModulePinsUniqueByIdentity(modulePins []ModulePin) error {
+ seenModulePins := make(map[string]struct{})
+ for _, modulePin := range modulePins {
+ moduleIdentityString := modulePin.IdentityString()
+ if _, ok := seenModulePins[moduleIdentityString]; ok {
+ return fmt.Errorf("module %s appeared twice", moduleIdentityString)
+ }
+ seenModulePins[moduleIdentityString] = struct{}{}
+ }
+ return nil
+}
+
+// ModuleReferenceEqual returns true if a equals b.
+func ModuleReferenceEqual(a ModuleReference, b ModuleReference) bool {
+ if (a == nil) != (b == nil) {
+ return false
+ }
+ if a == nil {
+ return true
+ }
+ return a.Remote() == b.Remote() &&
+ a.Owner() == b.Owner() &&
+ a.Repository() == b.Repository() &&
+ a.Reference() == b.Reference()
+}
+
+// ModulePinEqual returns true if a equals b.
+func ModulePinEqual(a ModulePin, b ModulePin) bool {
+ if (a == nil) != (b == nil) {
+ return false
+ }
+ if a == nil {
+ return true
+ }
+ return a.Remote() == b.Remote() &&
+ a.Owner() == b.Owner() &&
+ a.Repository() == b.Repository() &&
+ a.Branch() == b.Branch() &&
+ a.Commit() == b.Commit() &&
+ a.CreateTime().Equal(b.CreateTime())
+}
+
+// DependencyModulePinsForBucket reads the module dependencies from the lock file in the bucket.
+func DependencyModulePinsForBucket(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+) ([]ModulePin, error) {
+ lockFile, err := buflock.ReadConfig(ctx, readBucket)
+ if err != nil {
+ return nil, fmt.Errorf("failed to read lock file: %w", err)
+ }
+ modulePins := make([]ModulePin, 0, len(lockFile.Dependencies))
+ for _, dep := range lockFile.Dependencies {
+ modulePin, err := NewModulePin(
+ dep.Remote,
+ dep.Owner,
+ dep.Repository,
+ "",
+ dep.Commit,
+ time.Time{},
+ )
+ if err != nil {
+ return nil, err
+ }
+ modulePins = append(modulePins, modulePin)
+ }
+ // just to be safe
+ SortModulePins(modulePins)
+ if err := ValidateModulePinsUniqueByIdentity(modulePins); err != nil {
+ return nil, err
+ }
+ return modulePins, nil
+}
+
+// PutDependencyModulePinsToBucket writes the module dependencies to the write bucket in the form of a lock file.
+func PutDependencyModulePinsToBucket(
+ ctx context.Context,
+ writeBucket storage.WriteBucket,
+ modulePins []ModulePin,
+) error {
+ if err := ValidateModulePinsUniqueByIdentity(modulePins); err != nil {
+ return err
+ }
+ SortModulePins(modulePins)
+ lockFile := &buflock.Config{
+ Dependencies: make([]buflock.Dependency, 0, len(modulePins)),
+ }
+ for _, pin := range modulePins {
+ lockFile.Dependencies = append(
+ lockFile.Dependencies,
+ buflock.Dependency{
+ Remote: pin.Remote(),
+ Owner: pin.Owner(),
+ Repository: pin.Repository(),
+ Commit: pin.Commit(),
+ },
+ )
+ }
+ return buflock.WriteConfig(ctx, writeBucket, lockFile)
+}
+
+// SortFileInfos sorts the FileInfos by Path.
+//
+// This should be treated as the default sorting mechanism.
+func SortFileInfos(fileInfos []FileInfo) {
+ if len(fileInfos) == 0 {
+ return
+ }
+ sort.Slice(
+ fileInfos,
+ func(i int, j int) bool {
+ return fileInfos[i].Path() < fileInfos[j].Path()
+ },
+ )
+}
+
+// SortFileInfosByExternalPath sorts the FileInfos by ExternalPath.
+func SortFileInfosByExternalPath(fileInfos []FileInfo) {
+ if len(fileInfos) == 0 {
+ return
+ }
+ sort.Slice(
+ fileInfos,
+ func(i int, j int) bool {
+ return fileInfos[i].ExternalPath() < fileInfos[j].ExternalPath()
+ },
+ )
+}
+
+// SortModulePins sorts the ModulePins.
+func SortModulePins(modulePins []ModulePin) {
+ sort.Slice(modulePins, func(i, j int) bool {
+ return modulePinLess(modulePins[i], modulePins[j])
+ })
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/file_info.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/file_info.go
new file mode 100644
index 000000000..c37712ec1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/file_info.go
@@ -0,0 +1,99 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleref
+
+import (
+ "github.com/bufbuild/buf/private/pkg/protodescriptor"
+)
+
+var _ FileInfo = &fileInfo{}
+
+type fileInfo struct {
+ path string
+ externalPath string
+ isImport bool
+ moduleIdentity ModuleIdentity
+ commit string
+}
+
+func newFileInfo(
+ path string,
+ externalPath string,
+ isImport bool,
+ moduleIdentity ModuleIdentity,
+ commit string,
+) (*fileInfo, error) {
+ if err := protodescriptor.ValidateProtoPath("root relative file path", path); err != nil {
+ return nil, err
+ }
+ if externalPath == "" {
+ externalPath = path
+ }
+ return newFileInfoNoValidate(
+ path,
+ externalPath,
+ isImport,
+ moduleIdentity,
+ commit,
+ ), nil
+}
+
+func newFileInfoNoValidate(
+ path string,
+ externalPath string,
+ isImport bool,
+ moduleIdentity ModuleIdentity,
+ commit string,
+) *fileInfo {
+ return &fileInfo{
+ path: path,
+ externalPath: externalPath,
+ isImport: isImport,
+ moduleIdentity: moduleIdentity,
+ commit: commit,
+ }
+}
+
+func (f *fileInfo) Path() string {
+ return f.path
+}
+
+func (f *fileInfo) ExternalPath() string {
+ return f.externalPath
+}
+
+func (f *fileInfo) IsImport() bool {
+ return f.isImport
+}
+
+func (f *fileInfo) ModuleIdentity() ModuleIdentity {
+ return f.moduleIdentity
+}
+
+func (f *fileInfo) Commit() string {
+ return f.commit
+}
+
+func (f *fileInfo) WithIsImport(isImport bool) FileInfo {
+ return newFileInfoNoValidate(
+ f.path,
+ f.externalPath,
+ isImport,
+ f.moduleIdentity,
+ f.commit,
+ )
+}
+
+func (*fileInfo) isFileInfo() {}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_identity.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_identity.go
new file mode 100644
index 000000000..5d903991b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_identity.go
@@ -0,0 +1,56 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleref
+
+type moduleIdentity struct {
+ remote string
+ owner string
+ repository string
+}
+
+func newModuleIdentity(
+ remote string,
+ owner string,
+ repository string,
+) (*moduleIdentity, error) {
+ moduleIdentity := &moduleIdentity{
+ remote: remote,
+ owner: owner,
+ repository: repository,
+ }
+ if err := validateModuleIdentity(moduleIdentity); err != nil {
+ return nil, err
+ }
+ return moduleIdentity, nil
+}
+
+func (m *moduleIdentity) Remote() string {
+ return m.remote
+}
+
+func (m *moduleIdentity) Owner() string {
+ return m.owner
+}
+
+func (m *moduleIdentity) Repository() string {
+ return m.repository
+}
+
+func (m *moduleIdentity) IdentityString() string {
+ return m.remote + "/" + m.owner + "/" + m.repository
+}
+
+func (*moduleIdentity) isModuleOwner() {}
+func (*moduleIdentity) isModuleIdentity() {}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_owner.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_owner.go
new file mode 100644
index 000000000..6105134f3
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_owner.go
@@ -0,0 +1,44 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleref
+
+type moduleOwner struct {
+ remote string
+ owner string
+}
+
+func newModuleOwner(
+ remote string,
+ owner string,
+) (*moduleOwner, error) {
+ moduleOwner := &moduleOwner{
+ remote: remote,
+ owner: owner,
+ }
+ if err := validateModuleOwner(moduleOwner); err != nil {
+ return nil, err
+ }
+ return moduleOwner, nil
+}
+
+func (m *moduleOwner) Remote() string {
+ return m.remote
+}
+
+func (m *moduleOwner) Owner() string {
+ return m.owner
+}
+
+func (*moduleOwner) isModuleOwner() {}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_pin.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_pin.go
new file mode 100644
index 000000000..821eb5c17
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_pin.go
@@ -0,0 +1,122 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleref
+
+import (
+ "time"
+
+ modulev1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/prototime"
+ "google.golang.org/protobuf/types/known/timestamppb"
+)
+
+type modulePin struct {
+ remote string
+ owner string
+ repository string
+ branch string
+ commit string
+ createTime time.Time
+}
+
+func newModulePin(
+ remote string,
+ owner string,
+ repository string,
+ branch string,
+ commit string,
+ createTime time.Time,
+) (*modulePin, error) {
+ protoCreateTime, err := prototime.NewTimestamp(createTime)
+ if err != nil {
+ return nil, err
+ }
+ return newModulePinForProto(
+ &modulev1alpha1.ModulePin{
+ Remote: remote,
+ Owner: owner,
+ Repository: repository,
+ Branch: branch,
+ Commit: commit,
+ CreateTime: protoCreateTime,
+ },
+ )
+}
+
+func newModulePinForProto(
+ protoModulePin *modulev1alpha1.ModulePin,
+) (*modulePin, error) {
+ if err := ValidateProtoModulePin(protoModulePin); err != nil {
+ return nil, err
+ }
+ return &modulePin{
+ remote: protoModulePin.Remote,
+ owner: protoModulePin.Owner,
+ repository: protoModulePin.Repository,
+ branch: protoModulePin.Branch,
+ commit: protoModulePin.Commit,
+ createTime: protoModulePin.CreateTime.AsTime(),
+ }, nil
+}
+
+func newProtoModulePinForModulePin(
+ modulePin ModulePin,
+) *modulev1alpha1.ModulePin {
+ return &modulev1alpha1.ModulePin{
+ Remote: modulePin.Remote(),
+ Owner: modulePin.Owner(),
+ Repository: modulePin.Repository(),
+ Branch: modulePin.Branch(),
+ Commit: modulePin.Commit(),
+ // no need to validate as we already know this is valid
+ CreateTime: timestamppb.New(modulePin.CreateTime()),
+ }
+}
+
+func (m *modulePin) Remote() string {
+ return m.remote
+}
+
+func (m *modulePin) Owner() string {
+ return m.owner
+}
+
+func (m *modulePin) Repository() string {
+ return m.repository
+}
+
+func (m *modulePin) Branch() string {
+ return m.branch
+}
+
+func (m *modulePin) Commit() string {
+ return m.commit
+}
+
+func (m *modulePin) CreateTime() time.Time {
+ return m.createTime
+}
+
+func (m *modulePin) String() string {
+ return m.remote + "/" + m.owner + "/" + m.repository + ":" + m.commit
+}
+
+func (m *modulePin) IdentityString() string {
+ return m.remote + "/" + m.owner + "/" + m.repository
+}
+
+func (*modulePin) isModuleOwner() {}
+func (*modulePin) isModuleIdentity() {}
+func (*modulePin) isModulePin() {}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_reference.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_reference.go
new file mode 100644
index 000000000..3e548176a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/module_reference.go
@@ -0,0 +1,99 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleref
+
+import (
+ modulev1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+)
+
+type moduleReference struct {
+ remote string
+ owner string
+ repository string
+ reference string
+}
+
+func newModuleReference(
+ remote string,
+ owner string,
+ repository string,
+ reference string,
+) (*moduleReference, error) {
+ protoModuleReference := &modulev1alpha1.ModuleReference{
+ Remote: remote,
+ Owner: owner,
+ Repository: repository,
+ Reference: reference,
+ }
+ return newModuleReferenceForProto(protoModuleReference)
+}
+
+func newModuleReferenceForProto(
+ protoModuleReference *modulev1alpha1.ModuleReference,
+) (*moduleReference, error) {
+ if err := ValidateProtoModuleReference(protoModuleReference); err != nil {
+ return nil, err
+ }
+ return &moduleReference{
+ remote: protoModuleReference.Remote,
+ owner: protoModuleReference.Owner,
+ repository: protoModuleReference.Repository,
+ reference: protoModuleReference.Reference,
+ }, nil
+}
+
+func newProtoModuleReferenceForModuleReference(
+ moduleReference ModuleReference,
+) *modulev1alpha1.ModuleReference {
+ // no need to validate as we know we have a valid ModuleReference constructed
+ // by this package due to the private interface
+ return &modulev1alpha1.ModuleReference{
+ Remote: moduleReference.Remote(),
+ Owner: moduleReference.Owner(),
+ Repository: moduleReference.Repository(),
+ Reference: moduleReference.Reference(),
+ }
+}
+
+func (m *moduleReference) Remote() string {
+ return m.remote
+}
+
+func (m *moduleReference) Owner() string {
+ return m.owner
+}
+
+func (m *moduleReference) Repository() string {
+ return m.repository
+}
+
+func (m *moduleReference) Reference() string {
+ return m.reference
+}
+
+func (m *moduleReference) String() string {
+ if m.reference == Main {
+ return m.remote + "/" + m.owner + "/" + m.repository
+ }
+ return m.remote + "/" + m.owner + "/" + m.repository + ":" + m.reference
+}
+
+func (m *moduleReference) IdentityString() string {
+ return m.remote + "/" + m.owner + "/" + m.repository
+}
+
+func (*moduleReference) isModuleOwner() {}
+func (*moduleReference) isModuleIdentity() {}
+func (*moduleReference) isModuleReference() {}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/usage.gen.go
new file mode 100644
index 000000000..822b6d278
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufmoduleref
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/util.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/util.go
new file mode 100644
index 000000000..f48bc7990
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/util.go
@@ -0,0 +1,137 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleref
+
+import (
+ "fmt"
+ "strings"
+)
+
+// parseModuleReferenceComponents parses and returns the remote, owner, repository,
+// and ref (branch, commit, draft, or tag) from the given path.
+func parseModuleReferenceComponents(path string) (remote string, owner string, repository string, ref string, err error) {
+ // split by the first "/" to separate the remote and remaining part
+ slashSplit := strings.SplitN(path, "/", 2)
+ if len(slashSplit) != 2 {
+ return "", "", "", "", newInvalidModuleReferenceStringError(path)
+ }
+ remote, rest := slashSplit[0], slashSplit[1]
+ // split the remaining part by ":" to separate the reference
+ colonSplit := strings.Split(rest, ":")
+ switch len(colonSplit) {
+ case 1:
+ // path excluding remote has no colon, no need to handle its ref
+ case 2:
+ ref = strings.TrimSpace(colonSplit[1])
+ if ref == "" {
+ return "", "", "", "", newInvalidModuleReferenceStringError(path)
+ }
+ default:
+ return "", "", "", "", newInvalidModuleReferenceStringError(path)
+ }
+ remote, owner, repository, err = parseModuleIdentityComponents(remote + "/" + colonSplit[0])
+ if err != nil {
+ return "", "", "", "", newInvalidModuleReferenceStringError(path)
+ }
+ return remote, owner, repository, ref, nil
+}
+
+func parseModuleIdentityComponents(path string) (remote string, owner string, repository string, err error) {
+ slashSplit := strings.Split(path, "/")
+ if len(slashSplit) != 3 {
+ return "", "", "", newInvalidModuleIdentityStringError(path)
+ }
+ remote = strings.TrimSpace(slashSplit[0])
+ if remote == "" {
+ return "", "", "", newInvalidModuleIdentityStringError(path)
+ }
+ owner = strings.TrimSpace(slashSplit[1])
+ if owner == "" {
+ return "", "", "", newInvalidModuleIdentityStringError(path)
+ }
+ repository = strings.TrimSpace(slashSplit[2])
+ if repository == "" {
+ return "", "", "", newInvalidModuleIdentityStringError(path)
+ }
+ return remote, owner, repository, nil
+}
+
+func modulePinLess(a ModulePin, b ModulePin) bool {
+ return modulePinCompareTo(a, b) < 0
+}
+
+// return -1 if less
+// return 1 if greater
+// return 0 if equal
+func modulePinCompareTo(a ModulePin, b ModulePin) int {
+ if a == nil && b == nil {
+ return 0
+ }
+ if a == nil && b != nil {
+ return -1
+ }
+ if a != nil && b == nil {
+ return 1
+ }
+ if a.Remote() < b.Remote() {
+ return -1
+ }
+ if a.Remote() > b.Remote() {
+ return 1
+ }
+ if a.Owner() < b.Owner() {
+ return -1
+ }
+ if a.Owner() > b.Owner() {
+ return 1
+ }
+ if a.Repository() < b.Repository() {
+ return -1
+ }
+ if a.Repository() > b.Repository() {
+ return 1
+ }
+ if a.Branch() < b.Branch() {
+ return -1
+ }
+ if a.Branch() > b.Branch() {
+ return 1
+ }
+ if a.Commit() < b.Commit() {
+ return -1
+ }
+ if a.Commit() > b.Commit() {
+ return 1
+ }
+ if a.CreateTime().Before(b.CreateTime()) {
+ return -1
+ }
+ if a.CreateTime().After(b.CreateTime()) {
+ return 1
+ }
+ return 0
+}
+
+func newInvalidModuleOwnerStringError(s string) error {
+ return fmt.Errorf("module owner %q is invalid: must be in the form remote/owner", s)
+}
+
+func newInvalidModuleIdentityStringError(s string) error {
+ return fmt.Errorf("module identity %q is invalid: must be in the form remote/owner/repository", s)
+}
+
+func newInvalidModuleReferenceStringError(s string) error {
+ return fmt.Errorf("module reference %q is invalid: must be in the form remote/owner/repository:reference", s)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/validate.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/validate.go
new file mode 100644
index 000000000..e9fa1b55f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref/validate.go
@@ -0,0 +1,210 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmoduleref
+
+import (
+ "errors"
+ "fmt"
+ "strings"
+
+ modulev1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/netextended"
+)
+
+// ValidateProtoModuleReference verifies the given module reference is well-formed.
+// It performs client-side validation only, and is limited to fields
+// we do not think will change in the future.
+func ValidateProtoModuleReference(protoModuleReference *modulev1alpha1.ModuleReference) error {
+ if protoModuleReference == nil {
+ return errors.New("module reference is required")
+ }
+ if err := validateRemote(protoModuleReference.Remote); err != nil {
+ return err
+ }
+ if err := ValidateOwner(protoModuleReference.Owner, "owner"); err != nil {
+ return err
+ }
+ if err := ValidateRepository(protoModuleReference.Repository); err != nil {
+ return err
+ }
+ return ValidateReference(protoModuleReference.Reference)
+}
+
+// ValidateProtoModulePin verifies the given module pin is well-formed.
+// It performs client-side validation only, and is limited to fields
+// we do not think will change in the future.
+func ValidateProtoModulePin(protoModulePin *modulev1alpha1.ModulePin) error {
+ if protoModulePin == nil {
+ return errors.New("module pin is required")
+ }
+ if err := validateRemote(protoModulePin.Remote); err != nil {
+ return err
+ }
+ if err := ValidateOwner(protoModulePin.Owner, "owner"); err != nil {
+ return err
+ }
+ if err := ValidateRepository(protoModulePin.Repository); err != nil {
+ return err
+ }
+ if err := ValidateCommit(protoModulePin.Commit); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ValidateUser verifies the given user name is well-formed.
+// It performs client-side validation only, and is limited to properties
+// we do not think will change in the future.
+func ValidateUser(user string) error {
+ return ValidateOwner(user, "user")
+}
+
+// ValidateOrganization verifies the given organization name is well-formed.
+// It performs client-side validation only, and is limited to properties
+// we do not think will change in the future.
+func ValidateOrganization(organization string) error {
+ return ValidateOwner(organization, "organization")
+}
+
+// ValidateOwner verifies the given owner name is well-formed.
+// It performs client-side validation only, and is limited to properties
+// we do not think will change in the future.
+func ValidateOwner(owner string, ownerType string) error {
+ if owner == "" {
+ return fmt.Errorf("%s name is required", ownerType)
+ }
+ return nil
+}
+
+// ValidateRepository verifies the given repository name is well-formed.
+// It performs client-side validation only, and is limited to properties
+// we do not think will change in the future.
+func ValidateRepository(repository string) error {
+ if repository == "" {
+ return errors.New("repository name is required")
+ }
+ return nil
+}
+
+// ValidateReference validates that the given ModuleReference reference is well-formed.
+// It performs client-side validation only, and is limited to properties
+// we do not think will change in the future.
+func ValidateReference(reference string) error {
+ if reference == "" {
+ return errors.New("repository reference is required")
+ }
+ return nil
+}
+
+// ValidateCommit verifies the given commit is well-formed.
+// It performs client-side validation only, and is limited to properties
+// we do not think will change in the future.
+func ValidateCommit(commit string) error {
+ if commit == "" {
+ return errors.New("empty commit")
+ }
+ return nil
+}
+
+// ValidateBranch verifies the given repository branch is well-formed.
+// It performs client-side validation only, and is limited to properties
+// we do not think will change in the future.
+func ValidateBranch(branch string) error {
+ if branch != Main {
+ return fmt.Errorf("branch is not %s", Main)
+ }
+ //if branch == "" {
+ // return errors.New("repository branch is required")
+ //}
+ return nil
+}
+
+// ValidateTag verifies the given tag is well-formed.
+// It performs client-side validation only, and is limited to properties
+// we do not think will change in the future.
+func ValidateTag(tag string) error {
+ if tag == "" {
+ return errors.New("repository tag is required")
+ }
+ return nil
+}
+
+// ValidateModuleFilePath validates that the module file path is not empty.
+// It performs client-side validation only, and is limited to properties
+// we do not think will change in the future.
+func ValidateModuleFilePath(path string) error {
+ if path == "" {
+ return errors.New("empty path")
+ }
+ return nil
+}
+
+// ValidateRemoteNotEmpty validates that the given remote address is not an empty string
+// It performs client-side validation only, and is limited to fields
+// we do not think will change in the future.
+func ValidateRemoteNotEmpty(remote string) error {
+ if remote == "" {
+ return appcmd.NewInvalidArgumentError("you must specify a remote module")
+ }
+ return nil
+}
+
+// ValidateRemoteHasNoPaths validates that the given remote address contains no paths/subdirectories after the root
+// It performs client-side validation only, and is limited to fields
+// we do not think will change in the future.
+func ValidateRemoteHasNoPaths(remote string) error {
+ _, path, ok := strings.Cut(remote, "/")
+ if ok && path != "" {
+ return appcmd.NewInvalidArgumentError(fmt.Sprintf(`invalid remote address, must not contain any paths. Try removing "/%s" from the address.`, path))
+ }
+ return nil
+}
+
+func validateModuleOwner(moduleOwner ModuleOwner) error {
+ if moduleOwner == nil {
+ return errors.New("module owner is required")
+ }
+ if err := validateRemote(moduleOwner.Remote()); err != nil {
+ return err
+ }
+ if err := ValidateOwner(moduleOwner.Owner(), "owner"); err != nil {
+ return err
+ }
+ return nil
+}
+
+func validateModuleIdentity(moduleIdentity ModuleIdentity) error {
+ if moduleIdentity == nil {
+ return errors.New("module identity is required")
+ }
+ if err := validateRemote(moduleIdentity.Remote()); err != nil {
+ return err
+ }
+ if err := ValidateOwner(moduleIdentity.Owner(), "owner"); err != nil {
+ return err
+ }
+ if err := ValidateRepository(moduleIdentity.Repository()); err != nil {
+ return err
+ }
+ return nil
+}
+
+func validateRemote(remote string) error {
+ if _, err := netextended.ValidateHostname(remote); err != nil {
+ return fmt.Errorf("invalid remote %q: %w", remote, err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/internal/internal.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/internal/internal.go
new file mode 100644
index 000000000..d8873d81b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/internal/internal.go
@@ -0,0 +1,86 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "fmt"
+ "sort"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+// NormalizeAndCheckPaths verifies that:
+//
+// - No paths are empty.
+// - All paths are normalized and validated if pathType is Relative.
+// - All paths are normalized if pathType is Absolute.
+//
+// If sortAndCheckDuplicates is true:
+
+// - All paths are unique.
+// - No path contains another path.
+//
+// Normalizes the paths.
+// Sorts the paths if sortAndCheckDuplicates is true.
+// Makes the paths absolute if pathType is Absolute.
+func NormalizeAndCheckPaths(
+ paths []string,
+ name string,
+ pathType normalpath.PathType,
+ sortAndCheckDuplicates bool,
+) ([]string, error) {
+ if len(paths) == 0 {
+ return paths, nil
+ }
+ outputs := make([]string, len(paths))
+ for i, path := range paths {
+ if path == "" {
+ return nil, fmt.Errorf("%s contained an empty path", name)
+ }
+ output, err := normalpath.NormalizeAndTransformForPathType(path, pathType)
+ if err != nil {
+ // user error
+ return nil, err
+ }
+ outputs[i] = output
+ }
+ if sortAndCheckDuplicates {
+ return sortAndCheckDuplicatePaths(outputs, name, pathType)
+ }
+ return outputs, nil
+}
+
+// TODO: refactor this
+func sortAndCheckDuplicatePaths(outputs []string, name string, pathType normalpath.PathType) ([]string, error) {
+ sort.Strings(outputs)
+ for i := 0; i < len(outputs); i++ {
+ for j := i + 1; j < len(outputs); j++ {
+ output1 := outputs[i]
+ output2 := outputs[j]
+
+ if output1 == output2 {
+ return nil, fmt.Errorf("duplicate %s %q", name, output1)
+ }
+ if normalpath.EqualsOrContainsPath(output2, output1, pathType) {
+ return nil, fmt.Errorf("%s %q is within %s %q which is not allowed", name, output1, name, output2)
+ }
+ if normalpath.EqualsOrContainsPath(output1, output2, pathType) {
+ return nil, fmt.Errorf("%s %q is within %s %q which is not allowed", name, output2, name, output1)
+ }
+ }
+ }
+
+ return outputs, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/internal/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/internal/usage.gen.go
new file mode 100644
index 000000000..edcedfbef
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/internal/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package internal
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module.go
new file mode 100644
index 000000000..763b85ad7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module.go
@@ -0,0 +1,292 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/bufbreaking/bufbreakingconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufcheck/buflint/buflintconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ breakingv1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/breaking/v1"
+ lintv1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/lint/v1"
+ modulev1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem"
+)
+
+type module struct {
+ sourceReadBucket storage.ReadBucket
+ dependencyModulePins []bufmoduleref.ModulePin
+ moduleIdentity bufmoduleref.ModuleIdentity
+ commit string
+ documentation string
+ license string
+ breakingConfig *bufbreakingconfig.Config
+ lintConfig *buflintconfig.Config
+}
+
+func newModuleForProto(
+ ctx context.Context,
+ protoModule *modulev1alpha1.Module,
+ options ...ModuleOption,
+) (*module, error) {
+ if err := ValidateProtoModule(protoModule); err != nil {
+ return nil, err
+ }
+ // We store this as a ReadBucket as this should never be modified outside of this function.
+ readWriteBucket := storagemem.NewReadWriteBucket()
+ for _, moduleFile := range protoModule.Files {
+ if normalpath.Ext(moduleFile.Path) != ".proto" {
+ return nil, fmt.Errorf("expected .proto file but got %q", moduleFile)
+ }
+ // we already know that paths are unique from validation
+ if err := storage.PutPath(ctx, readWriteBucket, moduleFile.Path, moduleFile.Content); err != nil {
+ return nil, err
+ }
+ }
+ dependencyModulePins, err := bufmoduleref.NewModulePinsForProtos(protoModule.Dependencies...)
+ if err != nil {
+ return nil, err
+ }
+ breakingConfig, lintConfig, err := configsForProto(protoModule.GetBreakingConfig(), protoModule.GetLintConfig())
+ if err != nil {
+ return nil, err
+ }
+ return newModule(
+ ctx,
+ readWriteBucket,
+ dependencyModulePins,
+ nil, // The module identity is not stored on the proto. We rely on the layer above, (e.g. `ModuleReader`) to set this as needed.
+ protoModule.GetDocumentation(),
+ protoModule.GetLicense(),
+ breakingConfig,
+ lintConfig,
+ options...,
+ )
+}
+
+func configsForProto(
+ protoBreakingConfig *breakingv1.Config,
+ protoLintConfig *lintv1.Config,
+) (*bufbreakingconfig.Config, *buflintconfig.Config, error) {
+ var breakingConfig *bufbreakingconfig.Config
+ var breakingConfigVersion string
+ if protoBreakingConfig != nil {
+ breakingConfig = bufbreakingconfig.ConfigForProto(protoBreakingConfig)
+ breakingConfigVersion = breakingConfig.Version
+ }
+ var lintConfig *buflintconfig.Config
+ var lintConfigVersion string
+ if protoLintConfig != nil {
+ lintConfig = buflintconfig.ConfigForProto(protoLintConfig)
+ lintConfigVersion = lintConfig.Version
+ }
+ if lintConfigVersion != breakingConfigVersion {
+ return nil, nil, fmt.Errorf("mismatched breaking config version %q and lint config version %q found", breakingConfigVersion, lintConfigVersion)
+ }
+ // If there is no breaking and lint configs, we want to default to the v1 version.
+ if breakingConfig == nil && lintConfig == nil {
+ breakingConfig = &bufbreakingconfig.Config{
+ Version: bufconfig.V1Version,
+ }
+ lintConfig = &buflintconfig.Config{
+ Version: bufconfig.V1Version,
+ }
+ } else if breakingConfig == nil {
+ // In the case that only breaking config is nil, we'll use generated an empty default config
+ // using the lint config version.
+ breakingConfig = &bufbreakingconfig.Config{
+ Version: lintConfigVersion,
+ }
+ } else if lintConfig == nil {
+ // In the case that only lint config is nil, we'll use generated an empty default config
+ // using the breaking config version.
+ lintConfig = &buflintconfig.Config{
+ Version: breakingConfigVersion,
+ }
+ }
+ // Finally, validate the config versions are valid. This should always pass in the case of
+ // the default values.
+ if err := bufconfig.ValidateVersion(breakingConfig.Version); err != nil {
+ return nil, nil, err
+ }
+ if err := bufconfig.ValidateVersion(lintConfig.Version); err != nil {
+ return nil, nil, err
+ }
+ return breakingConfig, lintConfig, nil
+}
+
+func newModuleForBucket(
+ ctx context.Context,
+ sourceReadBucket storage.ReadBucket,
+ options ...ModuleOption,
+) (*module, error) {
+ dependencyModulePins, err := bufmoduleref.DependencyModulePinsForBucket(ctx, sourceReadBucket)
+ if err != nil {
+ return nil, err
+ }
+ documentation, err := getFileContentForBucket(ctx, sourceReadBucket, DocumentationFilePath)
+ if err != nil {
+ return nil, err
+ }
+ license, err := getFileContentForBucket(ctx, sourceReadBucket, LicenseFilePath)
+ if err != nil {
+ return nil, err
+ }
+ moduleConfig, err := bufconfig.GetConfigForBucket(ctx, sourceReadBucket)
+ if err != nil {
+ return nil, err
+ }
+ var moduleIdentity bufmoduleref.ModuleIdentity
+ // if the module config has an identity, set the module identity
+ if moduleConfig.ModuleIdentity != nil {
+ moduleIdentity = moduleConfig.ModuleIdentity
+ }
+ return newModule(
+ ctx,
+ storage.MapReadBucket(sourceReadBucket, storage.MatchPathExt(".proto")),
+ dependencyModulePins,
+ moduleIdentity,
+ documentation,
+ license,
+ moduleConfig.Breaking,
+ moduleConfig.Lint,
+ options...,
+ )
+}
+
+// this should only be called by other newModule constructors
+func newModule(
+ ctx context.Context,
+ // must only contain .proto files
+ sourceReadBucket storage.ReadBucket,
+ dependencyModulePins []bufmoduleref.ModulePin,
+ moduleIdentity bufmoduleref.ModuleIdentity,
+ documentation string,
+ license string,
+ breakingConfig *bufbreakingconfig.Config,
+ lintConfig *buflintconfig.Config,
+ options ...ModuleOption,
+) (_ *module, retErr error) {
+ if err := bufmoduleref.ValidateModulePinsUniqueByIdentity(dependencyModulePins); err != nil {
+ return nil, err
+ }
+ // we rely on this being sorted here
+ bufmoduleref.SortModulePins(dependencyModulePins)
+ module := &module{
+ sourceReadBucket: sourceReadBucket,
+ dependencyModulePins: dependencyModulePins,
+ moduleIdentity: moduleIdentity,
+ documentation: documentation,
+ license: license,
+ breakingConfig: breakingConfig,
+ lintConfig: lintConfig,
+ }
+ for _, option := range options {
+ option(module)
+ }
+ return module, nil
+}
+
+func (m *module) TargetFileInfos(ctx context.Context) ([]bufmoduleref.FileInfo, error) {
+ return m.SourceFileInfos(ctx)
+}
+
+func (m *module) SourceFileInfos(ctx context.Context) ([]bufmoduleref.FileInfo, error) {
+ var fileInfos []bufmoduleref.FileInfo
+ if walkErr := m.sourceReadBucket.Walk(ctx, "", func(objectInfo storage.ObjectInfo) error {
+ // super overkill but ok
+ if err := bufmoduleref.ValidateModuleFilePath(objectInfo.Path()); err != nil {
+ return err
+ }
+ fileInfo, err := bufmoduleref.NewFileInfo(
+ objectInfo.Path(),
+ objectInfo.ExternalPath(),
+ false,
+ m.moduleIdentity,
+ m.commit,
+ )
+ if err != nil {
+ return err
+ }
+ fileInfos = append(fileInfos, fileInfo)
+ return nil
+ }); walkErr != nil {
+ return nil, fmt.Errorf("failed to enumerate module files: %w", walkErr)
+ }
+ bufmoduleref.SortFileInfos(fileInfos)
+ return fileInfos, nil
+}
+
+func (m *module) GetModuleFile(ctx context.Context, path string) (ModuleFile, error) {
+ // super overkill but ok
+ if err := bufmoduleref.ValidateModuleFilePath(path); err != nil {
+ return nil, err
+ }
+ readObjectCloser, err := m.sourceReadBucket.Get(ctx, path)
+ if err != nil {
+ return nil, err
+ }
+ fileInfo, err := bufmoduleref.NewFileInfo(
+ readObjectCloser.Path(),
+ readObjectCloser.ExternalPath(),
+ false,
+ m.moduleIdentity,
+ m.commit,
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newModuleFile(fileInfo, readObjectCloser), nil
+}
+
+func (m *module) DependencyModulePins() []bufmoduleref.ModulePin {
+ // already sorted in constructor
+ return m.dependencyModulePins
+}
+
+func (m *module) Documentation() string {
+ return m.documentation
+}
+
+func (m *module) License() string {
+ return m.license
+}
+
+func (m *module) BreakingConfig() *bufbreakingconfig.Config {
+ return m.breakingConfig
+}
+
+func (m *module) LintConfig() *buflintconfig.Config {
+ return m.lintConfig
+}
+
+func (m *module) getModuleIdentity() bufmoduleref.ModuleIdentity {
+ return m.moduleIdentity
+}
+
+func (m *module) getSourceReadBucket() storage.ReadBucket {
+ return m.sourceReadBucket
+}
+
+func (m *module) getCommit() string {
+ return m.commit
+}
+
+func (m *module) isModule() {}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_file.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_file.go
new file mode 100644
index 000000000..009381662
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_file.go
@@ -0,0 +1,37 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "io"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+)
+
+var _ ModuleFile = &moduleFile{}
+
+type moduleFile struct {
+ bufmoduleref.FileInfo
+ io.ReadCloser
+}
+
+func newModuleFile(fileInfo bufmoduleref.FileInfo, readCloser io.ReadCloser) moduleFile {
+ return moduleFile{
+ FileInfo: fileInfo,
+ ReadCloser: readCloser,
+ }
+}
+
+func (moduleFile) isModuleFile() {}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_file_set.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_file_set.go
new file mode 100644
index 000000000..eda02ae29
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_file_set.go
@@ -0,0 +1,124 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+var _ ModuleFileSet = &moduleFileSet{}
+
+type moduleFileSet struct {
+ Module
+
+ allModuleReadBucket moduleReadBucket
+}
+
+func newModuleFileSet(
+ module Module,
+ dependencies []Module,
+) *moduleFileSet {
+ // TODO: We can remove the getModuleRef method on the
+ // Module type if we fetch FileInfos from the Module
+ // and plumb in the ModuleRef here.
+ //
+ // This approach assumes that all of the FileInfos returned
+ // from SourceFileInfos will have their ModuleRef
+ // set to the same value. That can be enforced here.
+ moduleReadBuckets := []moduleReadBucket{
+ newSingleModuleReadBucket(
+ module.getSourceReadBucket(),
+ module.getModuleIdentity(),
+ module.getCommit(),
+ ),
+ }
+ for _, dependency := range dependencies {
+ moduleReadBuckets = append(
+ moduleReadBuckets,
+ newSingleModuleReadBucket(
+ dependency.getSourceReadBucket(),
+ dependency.getModuleIdentity(),
+ dependency.getCommit(),
+ ),
+ )
+ }
+ return &moduleFileSet{
+ Module: module,
+ allModuleReadBucket: newMultiModuleReadBucket(moduleReadBuckets...),
+ }
+}
+
+func (m *moduleFileSet) AllFileInfos(ctx context.Context) ([]bufmoduleref.FileInfo, error) {
+ var fileInfos []bufmoduleref.FileInfo
+ if walkErr := m.allModuleReadBucket.WalkModuleFiles(ctx, "", func(moduleObjectInfo *moduleObjectInfo) error {
+ if err := bufmoduleref.ValidateModuleFilePath(moduleObjectInfo.Path()); err != nil {
+ return err
+ }
+ isNotImport, err := storage.Exists(ctx, m.Module.getSourceReadBucket(), moduleObjectInfo.Path())
+ if err != nil {
+ return err
+ }
+ fileInfo, err := bufmoduleref.NewFileInfo(
+ moduleObjectInfo.Path(),
+ moduleObjectInfo.ExternalPath(),
+ !isNotImport,
+ moduleObjectInfo.ModuleIdentity(),
+ moduleObjectInfo.Commit(),
+ )
+ if err != nil {
+ return err
+ }
+ fileInfos = append(fileInfos, fileInfo)
+ return nil
+ }); walkErr != nil {
+ return nil, walkErr
+ }
+ bufmoduleref.SortFileInfos(fileInfos)
+ return fileInfos, nil
+}
+
+func (m *moduleFileSet) GetModuleFile(ctx context.Context, path string) (ModuleFile, error) {
+ if err := bufmoduleref.ValidateModuleFilePath(path); err != nil {
+ return nil, err
+ }
+ readObjectCloser, err := m.allModuleReadBucket.Get(ctx, path)
+ if err != nil {
+ return nil, err
+ }
+ isNotImport, err := storage.Exists(ctx, m.Module.getSourceReadBucket(), path)
+ if err != nil {
+ return nil, err
+ }
+ moduleObjectInfo, err := m.allModuleReadBucket.StatModuleFile(ctx, path)
+ if err != nil {
+ return nil, err
+ }
+ fileInfo, err := bufmoduleref.NewFileInfo(
+ readObjectCloser.Path(),
+ readObjectCloser.ExternalPath(),
+ !isNotImport,
+ moduleObjectInfo.ModuleIdentity(),
+ moduleObjectInfo.Commit(),
+ )
+ if err != nil {
+ return nil, err
+ }
+ return newModuleFile(fileInfo, readObjectCloser), nil
+}
+
+func (*moduleFileSet) isModuleFileSet() {}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_object_info.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_object_info.go
new file mode 100644
index 000000000..a42cb6462
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_object_info.go
@@ -0,0 +1,48 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+// moduleObjectInfo is used in moduleReadBucket.
+type moduleObjectInfo struct {
+ storage.ObjectInfo
+
+ moduleIdentity bufmoduleref.ModuleIdentity
+ commit string
+}
+
+func newModuleObjectInfo(
+ storageObjectInfo storage.ObjectInfo,
+ moduleIdentity bufmoduleref.ModuleIdentity,
+ commit string,
+) *moduleObjectInfo {
+ return &moduleObjectInfo{
+ ObjectInfo: storageObjectInfo,
+ moduleIdentity: moduleIdentity,
+ commit: commit,
+ }
+}
+
+func (o *moduleObjectInfo) ModuleIdentity() bufmoduleref.ModuleIdentity {
+ return o.moduleIdentity
+}
+
+func (o *moduleObjectInfo) Commit() string {
+ return o.commit
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_read_bucket.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_read_bucket.go
new file mode 100644
index 000000000..155304bee
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/module_read_bucket.go
@@ -0,0 +1,35 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+// moduleReadBucket is a ReadBucket that has associated module information.
+//
+// this is a helper type used in moduleFileSet.
+type moduleReadBucket interface {
+ storage.ReadBucket
+
+ // StatModuleFile gets info in the object, including info
+ // specific to the file's module.
+ StatModuleFile(ctx context.Context, path string) (*moduleObjectInfo, error)
+ // WalkModuleFiles walks the bucket with the prefix, calling f on
+ // each path. If the prefix doesn't exist, this is a no-op.
+ WalkModuleFiles(ctx context.Context, path string, f func(*moduleObjectInfo) error) error
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/multi_module_read_bucket.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/multi_module_read_bucket.go
new file mode 100644
index 000000000..c0cd51538
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/multi_module_read_bucket.go
@@ -0,0 +1,63 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+type multiModuleReadBucket struct {
+ storage.ReadBucket
+
+ delegates []moduleReadBucket
+}
+
+func newMultiModuleReadBucket(
+ delegates ...moduleReadBucket,
+) *multiModuleReadBucket {
+ storageReadBuckets := make([]storage.ReadBucket, len(delegates))
+ for i, delegate := range delegates {
+ storageReadBuckets[i] = delegate
+ }
+ return &multiModuleReadBucket{
+ ReadBucket: storage.MultiReadBucket(storageReadBuckets...),
+ delegates: delegates,
+ }
+}
+
+func (m *multiModuleReadBucket) StatModuleFile(ctx context.Context, path string) (*moduleObjectInfo, error) {
+ for _, delegate := range m.delegates {
+ objectInfo, err := delegate.StatModuleFile(ctx, path)
+ if err != nil {
+ if storage.IsNotExist(err) {
+ continue
+ }
+ return nil, err
+ }
+ return objectInfo, nil
+ }
+ return nil, storage.NewErrNotExist(path)
+}
+
+func (m *multiModuleReadBucket) WalkModuleFiles(ctx context.Context, prefix string, f func(*moduleObjectInfo) error) error {
+ for _, delegate := range m.delegates {
+ if err := delegate.WalkModuleFiles(ctx, prefix, f); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/nop_module_reader.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/nop_module_reader.go
new file mode 100644
index 000000000..38c0aeb04
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/nop_module_reader.go
@@ -0,0 +1,32 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+type nopModuleReader struct{}
+
+func newNopModuleReader() *nopModuleReader {
+ return &nopModuleReader{}
+}
+
+func (*nopModuleReader) GetModule(_ context.Context, modulePin bufmoduleref.ModulePin) (Module, error) {
+ return nil, storage.NewErrNotExist(modulePin.String())
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/nop_module_resolver.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/nop_module_resolver.go
new file mode 100644
index 000000000..fa2020824
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/nop_module_resolver.go
@@ -0,0 +1,32 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+type nopModuleResolver struct{}
+
+func newNopModuleResolver() *nopModuleResolver {
+ return &nopModuleResolver{}
+}
+
+func (*nopModuleResolver) GetModulePin(_ context.Context, moduleReference bufmoduleref.ModuleReference) (bufmoduleref.ModulePin, error) {
+ return nil, storage.NewErrNotExist(moduleReference.String())
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/single_module_read_bucket.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/single_module_read_bucket.go
new file mode 100644
index 000000000..d6c0eb20b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/single_module_read_bucket.go
@@ -0,0 +1,59 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+type singleModuleReadBucket struct {
+ storage.ReadBucket
+
+ moduleIdentity bufmoduleref.ModuleIdentity
+ commit string
+}
+
+func newSingleModuleReadBucket(
+ sourceReadBucket storage.ReadBucket,
+ moduleIdentity bufmoduleref.ModuleIdentity,
+ commit string,
+) *singleModuleReadBucket {
+ return &singleModuleReadBucket{
+ ReadBucket: sourceReadBucket,
+ moduleIdentity: moduleIdentity,
+ commit: commit,
+ }
+}
+
+func (r *singleModuleReadBucket) StatModuleFile(ctx context.Context, path string) (*moduleObjectInfo, error) {
+ objectInfo, err := r.ReadBucket.Stat(ctx, path)
+ if err != nil {
+ return nil, err
+ }
+ return newModuleObjectInfo(objectInfo, r.moduleIdentity, r.commit), nil
+}
+
+func (r *singleModuleReadBucket) WalkModuleFiles(ctx context.Context, path string, f func(*moduleObjectInfo) error) error {
+ return r.ReadBucket.Walk(
+ ctx,
+ path,
+ func(objectInfo storage.ObjectInfo) error {
+ return f(newModuleObjectInfo(objectInfo, r.moduleIdentity, r.commit))
+ },
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/targeting_module.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/targeting_module.go
new file mode 100644
index 000000000..7f916ca7a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/targeting_module.go
@@ -0,0 +1,248 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "context"
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+)
+
+type targetingModule struct {
+ Module
+ targetPaths []string
+ pathsAllowNotExistOnWalk bool
+ excludePaths []string
+}
+
+func newTargetingModule(
+ delegate Module,
+ targetPaths []string,
+ excludePaths []string,
+ pathsAllowNotExistOnWalk bool,
+) (*targetingModule, error) {
+ if err := normalpath.ValidatePathsNormalizedValidatedUnique(targetPaths); err != nil {
+ return nil, err
+ }
+ return &targetingModule{
+ Module: delegate,
+ targetPaths: targetPaths,
+ pathsAllowNotExistOnWalk: pathsAllowNotExistOnWalk,
+ excludePaths: excludePaths,
+ }, nil
+}
+
+func (m *targetingModule) TargetFileInfos(ctx context.Context) (fileInfos []bufmoduleref.FileInfo, retErr error) {
+ defer func() {
+ if retErr == nil {
+ bufmoduleref.SortFileInfos(fileInfos)
+ }
+ }()
+ excludePathMap := stringutil.SliceToMap(m.excludePaths)
+ // We start by ensuring that no paths have been duplicated between target and exclude pathes.
+ for _, targetPath := range m.targetPaths {
+ if _, ok := excludePathMap[targetPath]; ok {
+ return nil, fmt.Errorf(
+ "cannot set the same path for both --path and --exclude-path flags: %s",
+ normalpath.Unnormalize(targetPath),
+ )
+ }
+ }
+ sourceReadBucket := m.getSourceReadBucket()
+ // potentialDirPaths are paths that we need to check if they are directories.
+ // These are any files that do not end in .proto, as well as files that end in .proto, but
+ // do not have a corresponding file in the source ReadBucket.
+ // If there is not an file the path ending in .proto could be a directory
+ // that itself contains files, i.e. a/b.proto/c.proto is valid.
+ var potentialDirPaths []string
+ // fileInfoPaths are the paths that are files, so we return them as a separate set.
+ fileInfoPaths := make(map[string]struct{})
+ // If m.targetPaths == nil then we are accepting all paths and we only need to filter on
+ // the excluded paths.
+ //
+ // In the event that we do have target paths, we need first gather up all the target paths
+ // that are proto files. If all target paths proto files, we can return them first.
+ if m.targetPaths != nil {
+ for _, targetPath := range m.targetPaths {
+ if normalpath.Ext(targetPath) != ".proto" {
+ // not a .proto file, therefore must be a directory
+ potentialDirPaths = append(potentialDirPaths, targetPath)
+ } else {
+ objectInfo, err := sourceReadBucket.Stat(ctx, targetPath)
+ if err != nil {
+ if !storage.IsNotExist(err) {
+ return nil, err
+ }
+ // we do not have a file, so even though this path ends
+ // in .proto, this could be a directory - we need to check it
+ potentialDirPaths = append(potentialDirPaths, targetPath)
+ } else {
+ // Since all of these are specific files to include, and we've already checked
+ // for duplicated excludes, we know that this file is not excluded.
+ // We have a file, therefore the targetPath was a file path
+ // add to the nonImportImageFiles if does not already exist
+ if _, ok := fileInfoPaths[targetPath]; !ok {
+ fileInfoPaths[targetPath] = struct{}{}
+ fileInfo, err := bufmoduleref.NewFileInfo(
+ objectInfo.Path(),
+ objectInfo.ExternalPath(),
+ false,
+ m.Module.getModuleIdentity(),
+ m.Module.getCommit(),
+ )
+ if err != nil {
+ return nil, err
+ }
+ fileInfos = append(fileInfos, fileInfo)
+ }
+ }
+ }
+ }
+ if len(potentialDirPaths) == 0 {
+ // We had no potential directory paths as we were able to get
+ // an file for all targetPaths, so we can return the FileInfos now
+ // this means we do not have to do the expensive O(sourceReadBucketSize) operation
+ // to check to see if each file is within a potential directory path.
+ if !m.pathsAllowNotExistOnWalk {
+ foundPathSentinelError := errors.New("sentinel")
+ for _, excludePath := range m.excludePaths {
+ var foundPath bool
+ if walkErr := sourceReadBucket.Walk(
+ ctx,
+ "",
+ func(objectInfo storage.ObjectInfo) error {
+ if normalpath.EqualsOrContainsPath(excludePath, objectInfo.Path(), normalpath.Relative) {
+ foundPath = true
+ // We return early using the sentinel error here, since we don't need to do
+ // the rest of the walk if the path is found.
+ return foundPathSentinelError
+ }
+ return nil
+ },
+ ); walkErr != nil && !errors.Is(walkErr, foundPathSentinelError) {
+ return nil, walkErr
+ }
+ if !foundPath {
+ return nil, fmt.Errorf("path %q has no matching file in the image", excludePath)
+ }
+ }
+ }
+ return fileInfos, nil
+ }
+ }
+ // We have potential directory paths, do the expensive operation to
+ // make a map of the directory paths.
+ potentialDirPathMap := stringutil.SliceToMap(potentialDirPaths)
+ // The map of paths within potentialDirPath that matches a file.
+ // This needs to contain all paths in potentialDirPathMap at the end for us to
+ // have had matches for every targetPath input.
+ matchingPotentialDirPathMap := make(map[string]struct{})
+ // The map of exclude paths that have a match on the walk. This is used to check against
+ // pathsAllowNotExistOnWalk.
+ matchingExcludePaths := make(map[string]struct{})
+ if walkErr := sourceReadBucket.Walk(
+ ctx,
+ "",
+ func(objectInfo storage.ObjectInfo) error {
+ path := objectInfo.Path()
+ fileMatchingExcludePathMap := normalpath.MapAllEqualOrContainingPathMap(
+ excludePathMap,
+ path,
+ normalpath.Relative,
+ )
+ for excludeMatchingPath := range fileMatchingExcludePathMap {
+ if _, ok := matchingExcludePaths[excludeMatchingPath]; !ok {
+ matchingExcludePaths[excludeMatchingPath] = struct{}{}
+ }
+ }
+ // get the paths in potentialDirPathMap that match this path
+ fileMatchingPathMap := normalpath.MapAllEqualOrContainingPathMap(
+ potentialDirPathMap,
+ path,
+ normalpath.Relative,
+ )
+ if shouldExcludeFile(fileMatchingPathMap, fileMatchingExcludePathMap) {
+ return nil
+ }
+ if m.targetPaths != nil {
+ // We had a match, this means that some path in potentialDirPaths matched
+ // the path, add all the paths in potentialDirPathMap that
+ // matched to matchingPotentialDirPathMap.
+ for key := range fileMatchingPathMap {
+ matchingPotentialDirPathMap[key] = struct{}{}
+ }
+ }
+ // then, add the file if it is not added
+ if _, ok := fileInfoPaths[path]; !ok {
+ fileInfoPaths[path] = struct{}{}
+ fileInfo, err := bufmoduleref.NewFileInfo(
+ objectInfo.Path(),
+ objectInfo.ExternalPath(),
+ false,
+ m.Module.getModuleIdentity(),
+ m.Module.getCommit(),
+ )
+ if err != nil {
+ return err
+ }
+ fileInfos = append(fileInfos, fileInfo)
+ }
+ return nil
+ },
+ ); walkErr != nil {
+ return nil, walkErr
+ }
+ // if !allowNotExist, i.e. if all targetPaths must have a matching file,
+ // we check the matchingPotentialDirPathMap against the potentialDirPathMap
+ // to make sure that potentialDirPathMap is covered
+ if !m.pathsAllowNotExistOnWalk {
+ for potentialDirPath := range potentialDirPathMap {
+ if _, ok := matchingPotentialDirPathMap[potentialDirPath]; !ok {
+ // no match, this is an error given that allowNotExist is false
+ return nil, fmt.Errorf("path %q has no matching file in the module", potentialDirPath)
+ }
+ }
+ for excludePath := range excludePathMap {
+ if _, ok := matchingExcludePaths[excludePath]; !ok {
+ // no match, this is an error given that allowNotExist is false
+ return nil, fmt.Errorf("path %q has no matching file in the module", excludePath)
+ }
+ }
+ }
+ return fileInfos, nil
+}
+
+func shouldExcludeFile(
+ fileMatchingPathMap map[string]struct{},
+ fileMatchingExcludePathMap map[string]struct{},
+) bool {
+ if fileMatchingPathMap == nil {
+ return len(fileMatchingExcludePathMap) > 0
+ }
+ for fileMatchingPath := range fileMatchingPathMap {
+ for fileMatchingExcludePath := range fileMatchingExcludePathMap {
+ if normalpath.EqualsOrContainsPath(fileMatchingPath, fileMatchingExcludePath, normalpath.Relative) {
+ delete(fileMatchingPathMap, fileMatchingPath)
+ continue
+ }
+ }
+ }
+ return len(fileMatchingPathMap) == 0
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/usage.gen.go
new file mode 100644
index 000000000..ad4480f16
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufmodule
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/util.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/util.go
new file mode 100644
index 000000000..b7f1d1106
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/util.go
@@ -0,0 +1,127 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "context"
+ "io"
+ "sort"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ modulev1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "go.uber.org/multierr"
+)
+
+func putModuleFileToBucket(ctx context.Context, module Module, path string, writeBucket storage.WriteBucket) (retErr error) {
+ moduleFile, err := module.GetModuleFile(ctx, path)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, moduleFile.Close())
+ }()
+ var copyOptions []storage.CopyOption
+ if writeBucket.SetExternalPathSupported() {
+ copyOptions = append(copyOptions, storage.CopyWithExternalPaths())
+ }
+ return storage.CopyReadObject(ctx, writeBucket, moduleFile, copyOptions...)
+}
+
+func moduleFileToProto(ctx context.Context, module Module, path string) (_ *modulev1alpha1.ModuleFile, retErr error) {
+ protoModuleFile := &modulev1alpha1.ModuleFile{
+ Path: path,
+ }
+ moduleFile, err := module.GetModuleFile(ctx, path)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, moduleFile.Close())
+ }()
+ protoModuleFile.Content, err = io.ReadAll(moduleFile)
+ if err != nil {
+ return nil, err
+ }
+ return protoModuleFile, nil
+}
+
+func getFileContentForBucket(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ path string,
+) (string, error) {
+ data, err := storage.ReadPath(ctx, readBucket, path)
+ if err != nil {
+ if storage.IsNotExist(err) {
+ return "", nil
+ }
+ return "", err
+ }
+ return string(data), nil
+}
+
+func copyModulePinsSortedByOnlyCommit(modulePins []bufmoduleref.ModulePin) []bufmoduleref.ModulePin {
+ s := make([]bufmoduleref.ModulePin, len(modulePins))
+ copy(s, modulePins)
+ sort.Slice(s, func(i, j int) bool {
+ return modulePinLessOnlyCommit(s[i], s[j])
+ })
+ return s
+}
+
+func modulePinLessOnlyCommit(a bufmoduleref.ModulePin, b bufmoduleref.ModulePin) bool {
+ return modulePinCompareToOnlyCommit(a, b) < 0
+}
+
+// return -1 if less
+// return 1 if greater
+// return 0 if equal
+func modulePinCompareToOnlyCommit(a bufmoduleref.ModulePin, b bufmoduleref.ModulePin) int {
+ if a == nil && b == nil {
+ return 0
+ }
+ if a == nil && b != nil {
+ return -1
+ }
+ if a != nil && b == nil {
+ return 1
+ }
+ if a.Remote() < b.Remote() {
+ return -1
+ }
+ if a.Remote() > b.Remote() {
+ return 1
+ }
+ if a.Owner() < b.Owner() {
+ return -1
+ }
+ if a.Owner() > b.Owner() {
+ return 1
+ }
+ if a.Repository() < b.Repository() {
+ return -1
+ }
+ if a.Repository() > b.Repository() {
+ return 1
+ }
+ if a.Commit() < b.Commit() {
+ return -1
+ }
+ if a.Commit() > b.Commit() {
+ return 1
+ }
+ return 0
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/validate.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/validate.go
new file mode 100644
index 000000000..cfb894503
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/validate.go
@@ -0,0 +1,65 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+ modulev1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+)
+
+const (
+ // 32MB
+ maxModuleTotalContentLength = 32 << 20
+ protoFileMaxCount = 16384
+)
+
+// ValidateProtoModule verifies the given module is well-formed.
+// It performs client-side validation only, and is limited to fields
+// we do not think will change in the future.
+func ValidateProtoModule(protoModule *modulev1alpha1.Module) error {
+ if protoModule == nil {
+ return errors.New("module is required")
+ }
+ if len(protoModule.Files) == 0 {
+ return errors.New("module has no files")
+ }
+ if len(protoModule.Files) > protoFileMaxCount {
+ return fmt.Errorf("module can contain at most %d files", protoFileMaxCount)
+ }
+ totalContentLength := 0
+ filePathMap := make(map[string]struct{}, len(protoModule.Files))
+ for _, protoModuleFile := range protoModule.Files {
+ if err := bufmoduleref.ValidateModuleFilePath(protoModuleFile.Path); err != nil {
+ return err
+ }
+ if _, ok := filePathMap[protoModuleFile.Path]; ok {
+ return fmt.Errorf("duplicate module file path: %s", protoModuleFile.Path)
+ }
+ filePathMap[protoModuleFile.Path] = struct{}{}
+ totalContentLength += len(protoModuleFile.Content)
+ }
+ if totalContentLength > maxModuleTotalContentLength {
+ return fmt.Errorf("total module content length is %d when max is %d", totalContentLength, maxModuleTotalContentLength)
+ }
+ for _, dependency := range protoModule.Dependencies {
+ if err := bufmoduleref.ValidateProtoModulePin(dependency); err != nil {
+ return fmt.Errorf("module had invalid dependency: %v", err)
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/workspace.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/workspace.go
new file mode 100644
index 000000000..a2ab58472
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufmodule/workspace.go
@@ -0,0 +1,42 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufmodule
+
+import "github.com/bufbuild/buf/private/bufpkg/bufmodule/bufmoduleref"
+
+type workspace struct {
+ // bufmoduleref.ModuleIdentity -> bufmodule.Module
+ namedModules map[string]Module
+ allModules []Module
+}
+
+func newWorkspace(
+ namedModules map[string]Module,
+ allModules []Module,
+) *workspace {
+ return &workspace{
+ namedModules: namedModules,
+ allModules: allModules,
+ }
+}
+
+func (w *workspace) GetModule(moduleIdentity bufmoduleref.ModuleIdentity) (Module, bool) {
+ module, ok := w.namedModules[moduleIdentity.IdentityString()]
+ return module, ok
+}
+
+func (w *workspace) GetModules() []Module {
+ return w.allModules
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugin.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugin.go
new file mode 100644
index 000000000..d994dded9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugin.go
@@ -0,0 +1,276 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufplugin
+
+import (
+ "fmt"
+ "sort"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref"
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+)
+
+// Plugin represents a plugin defined by a buf.plugin.yaml.
+type Plugin interface {
+ // Version is the version of the plugin's implementation
+ // (e.g the protoc-gen-connect-go implementation is v0.2.0).
+ Version() string
+ // SourceURL is an optional attribute used to specify where the source
+ // for the plugin can be found.
+ SourceURL() string
+ // Description is an optional attribute to provide a more detailed
+ // description for the plugin.
+ Description() string
+ // Dependencies are the dependencies this plugin has on other plugins.
+ //
+ // An example of a dependency might be a 'protoc-gen-go-grpc' plugin
+ // which depends on the 'protoc-gen-go' generated code.
+ Dependencies() []bufpluginref.PluginReference
+ // Registry is the registry configuration, which lets the user specify
+ // registry dependencies, and other metadata that applies to a specific
+ // remote generation registry (e.g. the Go module proxy, NPM registry,
+ // etc).
+ Registry() *bufpluginconfig.RegistryConfig
+ // ContainerImageDigest returns the plugin's source image digest.
+ //
+ // For now we only support docker image sources, but this
+ // might evolve to support others later on.
+ ContainerImageDigest() string
+}
+
+// NewPlugin creates a new plugin from the given configuration and image digest.
+func NewPlugin(
+ version string,
+ dependencies []bufpluginref.PluginReference,
+ registryConfig *bufpluginconfig.RegistryConfig,
+ imageDigest string,
+ sourceURL string,
+ description string,
+) (Plugin, error) {
+ return newPlugin(version, dependencies, registryConfig, imageDigest, sourceURL, description)
+}
+
+// PluginToProtoPluginRegistryType determines the appropriate registryv1alpha1.PluginRegistryType for the plugin.
+func PluginToProtoPluginRegistryType(plugin Plugin) registryv1alpha1.PluginRegistryType {
+ registryType := registryv1alpha1.PluginRegistryType_PLUGIN_REGISTRY_TYPE_UNSPECIFIED
+ if plugin.Registry() != nil {
+ if plugin.Registry().Go != nil {
+ registryType = registryv1alpha1.PluginRegistryType_PLUGIN_REGISTRY_TYPE_GO
+ } else if plugin.Registry().NPM != nil {
+ registryType = registryv1alpha1.PluginRegistryType_PLUGIN_REGISTRY_TYPE_NPM
+ }
+ }
+ return registryType
+}
+
+// OutputLanguagesToProtoLanguages determines the appropriate registryv1alpha1.PluginRegistryType for the plugin.
+func OutputLanguagesToProtoLanguages(languages []string) ([]registryv1alpha1.PluginLanguage, error) {
+ languageToEnum := make(map[string]registryv1alpha1.PluginLanguage)
+ var supportedLanguages []string
+ for pluginLanguageKey, pluginLanguage := range registryv1alpha1.PluginLanguage_value {
+ if pluginLanguage == 0 {
+ continue
+ }
+ pluginLanguageKey := strings.TrimPrefix(pluginLanguageKey, "PLUGIN_LANGUAGE_")
+ pluginLanguageKey = strings.ToLower(pluginLanguageKey)
+ // Example:
+ // { go: 1, javascript: 2 }
+ languageToEnum[pluginLanguageKey] = registryv1alpha1.PluginLanguage(pluginLanguage)
+ supportedLanguages = append(supportedLanguages, pluginLanguageKey)
+ }
+ sort.Strings(supportedLanguages)
+ var protoLanguages []registryv1alpha1.PluginLanguage
+ for _, language := range languages {
+ if pluginLanguage, ok := languageToEnum[language]; ok {
+ protoLanguages = append(protoLanguages, pluginLanguage)
+ continue
+ }
+ return nil, fmt.Errorf("invalid plugin output language: %q\nsupported languages: %s", language, strings.Join(supportedLanguages, ", "))
+ }
+ sort.Slice(protoLanguages, func(i, j int) bool {
+ return protoLanguages[i] < protoLanguages[j]
+ })
+ return protoLanguages, nil
+}
+
+// PluginRegistryToProtoRegistryConfig converts a bufpluginconfig.RegistryConfig to a registryv1alpha1.RegistryConfig.
+func PluginRegistryToProtoRegistryConfig(pluginRegistry *bufpluginconfig.RegistryConfig) (*registryv1alpha1.RegistryConfig, error) {
+ if pluginRegistry == nil {
+ return nil, nil
+ }
+ registryConfig := ®istryv1alpha1.RegistryConfig{
+ Options: bufpluginconfig.PluginOptionsToOptionsSlice(pluginRegistry.Options),
+ }
+ if pluginRegistry.Go != nil {
+ goConfig := ®istryv1alpha1.GoConfig{}
+ goConfig.MinimumVersion = pluginRegistry.Go.MinVersion
+ if pluginRegistry.Go.Deps != nil {
+ goConfig.RuntimeLibraries = make([]*registryv1alpha1.GoConfig_RuntimeLibrary, 0, len(pluginRegistry.Go.Deps))
+ for _, dependency := range pluginRegistry.Go.Deps {
+ goConfig.RuntimeLibraries = append(goConfig.RuntimeLibraries, goRuntimeDependencyToProtoGoRuntimeLibrary(dependency))
+ }
+ }
+ registryConfig.RegistryConfig = ®istryv1alpha1.RegistryConfig_GoConfig{GoConfig: goConfig}
+ } else if pluginRegistry.NPM != nil {
+ importStyle, err := npmImportStyleToNPMProtoImportStyle(pluginRegistry.NPM.ImportStyle)
+ if err != nil {
+ return nil, err
+ }
+ npmConfig := ®istryv1alpha1.NPMConfig{
+ RewriteImportPathSuffix: pluginRegistry.NPM.RewriteImportPathSuffix,
+ ImportStyle: importStyle,
+ }
+ if pluginRegistry.NPM.Deps != nil {
+ npmConfig.RuntimeLibraries = make([]*registryv1alpha1.NPMConfig_RuntimeLibrary, 0, len(pluginRegistry.NPM.Deps))
+ for _, dependency := range pluginRegistry.NPM.Deps {
+ npmConfig.RuntimeLibraries = append(npmConfig.RuntimeLibraries, npmRuntimeDependencyToProtoNPMRuntimeLibrary(dependency))
+ }
+ }
+ registryConfig.RegistryConfig = ®istryv1alpha1.RegistryConfig_NpmConfig{NpmConfig: npmConfig}
+ }
+ return registryConfig, nil
+}
+
+// ProtoRegistryConfigToPluginRegistry converts a registryv1alpha1.RegistryConfig to a bufpluginconfig.RegistryConfig .
+func ProtoRegistryConfigToPluginRegistry(config *registryv1alpha1.RegistryConfig) (*bufpluginconfig.RegistryConfig, error) {
+ if config == nil {
+ return nil, nil
+ }
+ registryConfig := &bufpluginconfig.RegistryConfig{
+ Options: bufpluginconfig.OptionsSliceToPluginOptions(config.Options),
+ }
+ if config.GetGoConfig() != nil {
+ goConfig := &bufpluginconfig.GoRegistryConfig{}
+ goConfig.MinVersion = config.GetGoConfig().GetMinimumVersion()
+ runtimeLibraries := config.GetGoConfig().GetRuntimeLibraries()
+ if runtimeLibraries != nil {
+ goConfig.Deps = make([]*bufpluginconfig.GoRegistryDependencyConfig, 0, len(runtimeLibraries))
+ for _, library := range runtimeLibraries {
+ goConfig.Deps = append(goConfig.Deps, protoGoRuntimeLibraryToGoRuntimeDependency(library))
+ }
+ }
+ registryConfig.Go = goConfig
+ } else if config.GetNpmConfig() != nil {
+ importStyle, err := npmProtoImportStyleToNPMImportStyle(config.GetNpmConfig().GetImportStyle())
+ if err != nil {
+ return nil, err
+ }
+ npmConfig := &bufpluginconfig.NPMRegistryConfig{
+ RewriteImportPathSuffix: config.GetNpmConfig().GetRewriteImportPathSuffix(),
+ ImportStyle: importStyle,
+ }
+ runtimeLibraries := config.GetNpmConfig().GetRuntimeLibraries()
+ if runtimeLibraries != nil {
+ npmConfig.Deps = make([]*bufpluginconfig.NPMRegistryDependencyConfig, 0, len(runtimeLibraries))
+ for _, library := range runtimeLibraries {
+ npmConfig.Deps = append(npmConfig.Deps, protoNPMRuntimeLibraryToNPMRuntimeDependency(library))
+ }
+ }
+ registryConfig.NPM = npmConfig
+ }
+ return registryConfig, nil
+}
+
+func npmImportStyleToNPMProtoImportStyle(importStyle string) (registryv1alpha1.NPMImportStyle, error) {
+ switch importStyle {
+ case "commonjs":
+ return registryv1alpha1.NPMImportStyle_NPM_IMPORT_STYLE_COMMONJS, nil
+ case "module":
+ return registryv1alpha1.NPMImportStyle_NPM_IMPORT_STYLE_MODULE, nil
+ }
+ return 0, fmt.Errorf(`invalid import style %q: must be one of "module" or "commonjs"`, importStyle)
+}
+
+func npmProtoImportStyleToNPMImportStyle(importStyle registryv1alpha1.NPMImportStyle) (string, error) {
+ switch importStyle {
+ case registryv1alpha1.NPMImportStyle_NPM_IMPORT_STYLE_COMMONJS:
+ return "commonjs", nil
+ case registryv1alpha1.NPMImportStyle_NPM_IMPORT_STYLE_MODULE:
+ return "module", nil
+ }
+ return "", fmt.Errorf("unknown import style: %v", importStyle)
+}
+
+// goRuntimeDependencyToProtoGoRuntimeLibrary converts a bufpluginconfig.GoRegistryDependencyConfig to a registryv1alpha1.GoConfig_RuntimeLibrary.
+func goRuntimeDependencyToProtoGoRuntimeLibrary(config *bufpluginconfig.GoRegistryDependencyConfig) *registryv1alpha1.GoConfig_RuntimeLibrary {
+ return ®istryv1alpha1.GoConfig_RuntimeLibrary{
+ Module: config.Module,
+ Version: config.Version,
+ }
+}
+
+// protoGoRuntimeLibraryToGoRuntimeDependency converts a registryv1alpha1.GoConfig_RuntimeLibrary to a bufpluginconfig.GoRegistryDependencyConfig.
+func protoGoRuntimeLibraryToGoRuntimeDependency(config *registryv1alpha1.GoConfig_RuntimeLibrary) *bufpluginconfig.GoRegistryDependencyConfig {
+ return &bufpluginconfig.GoRegistryDependencyConfig{
+ Module: config.Module,
+ Version: config.Version,
+ }
+}
+
+// npmRuntimeDependencyToProtoNPMRuntimeLibrary converts a bufpluginconfig.NPMRegistryConfig to a registryv1alpha1.NPMConfig_RuntimeLibrary.
+func npmRuntimeDependencyToProtoNPMRuntimeLibrary(config *bufpluginconfig.NPMRegistryDependencyConfig) *registryv1alpha1.NPMConfig_RuntimeLibrary {
+ return ®istryv1alpha1.NPMConfig_RuntimeLibrary{
+ Package: config.Package,
+ Version: config.Version,
+ }
+}
+
+// protoNPMRuntimeLibraryToNPMRuntimeDependency converts a registryv1alpha1.NPMConfig_RuntimeLibrary to a bufpluginconfig.NPMRegistryDependencyConfig.
+func protoNPMRuntimeLibraryToNPMRuntimeDependency(config *registryv1alpha1.NPMConfig_RuntimeLibrary) *bufpluginconfig.NPMRegistryDependencyConfig {
+ return &bufpluginconfig.NPMRegistryDependencyConfig{
+ Package: config.Package,
+ Version: config.Version,
+ }
+}
+
+// PluginReferencesToCuratedProtoPluginReferences converts a slice of bufpluginref.PluginReference to a slice of registryv1alpha1.CuratedPluginReference.
+func PluginReferencesToCuratedProtoPluginReferences(references []bufpluginref.PluginReference) []*registryv1alpha1.CuratedPluginReference {
+ if references == nil {
+ return nil
+ }
+ protoReferences := make([]*registryv1alpha1.CuratedPluginReference, 0, len(references))
+ for _, reference := range references {
+ protoReferences = append(protoReferences, PluginReferenceToProtoCuratedPluginReference(reference))
+ }
+ return protoReferences
+}
+
+// PluginReferenceToProtoCuratedPluginReference converts a bufpluginref.PluginReference to a registryv1alpha1.CuratedPluginReference.
+func PluginReferenceToProtoCuratedPluginReference(reference bufpluginref.PluginReference) *registryv1alpha1.CuratedPluginReference {
+ if reference == nil {
+ return nil
+ }
+ return ®istryv1alpha1.CuratedPluginReference{
+ Owner: reference.Owner(),
+ Name: reference.Plugin(),
+ Version: reference.Version(),
+ Revision: uint32(reference.Revision()),
+ }
+}
+
+// PluginIdentityToProtoCuratedPluginReference converts a bufpluginref.PluginIdentity to a registryv1alpha1.CuratedPluginReference.
+//
+// The returned CuratedPluginReference contains no Version/Revision information.
+func PluginIdentityToProtoCuratedPluginReference(identity bufpluginref.PluginIdentity) *registryv1alpha1.CuratedPluginReference {
+ if identity == nil {
+ return nil
+ }
+ return ®istryv1alpha1.CuratedPluginReference{
+ Owner: identity.Owner(),
+ Name: identity.Plugin(),
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/bufpluginconfig.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/bufpluginconfig.go
new file mode 100644
index 000000000..ca61bcf0d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/bufpluginconfig.go
@@ -0,0 +1,290 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufpluginconfig defines the buf.plugin.yaml file.
+package bufpluginconfig
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "path/filepath"
+ "sort"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref"
+ "github.com/bufbuild/buf/private/pkg/encoding"
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+const (
+ // ExternalConfigFilePath is the default configuration file path for v1.
+ ExternalConfigFilePath = "buf.plugin.yaml"
+ // V1Version is the version string used to indicate the v1 version of the buf.plugin.yaml file.
+ V1Version = "v1"
+)
+
+var (
+ // AllConfigFilePaths are all acceptable config file paths without overrides.
+ //
+ // These are in the order we should check.
+ AllConfigFilePaths = []string{
+ ExternalConfigFilePath,
+ }
+)
+
+// Config is the plugin config.
+type Config struct {
+ // Name is the name of the plugin (e.g. 'buf.build/protocolbuffers/go').
+ Name bufpluginref.PluginIdentity
+ // PluginVersion is the version of the plugin's implementation
+ // (e.g the protoc-gen-connect-go implementation is v0.2.0).
+ //
+ // This excludes any other details found in the buf.plugin.yaml
+ // or plugin source (e.g. Dockerfile) that would otherwise influence
+ // the plugin's behavior.
+ PluginVersion string
+ // SourceURL is an optional attribute used to specify where the source
+ // for the plugin can be found.
+ SourceURL string
+ // Description is an optional attribute to provide a more detailed
+ // description for the plugin.
+ Description string
+ // Dependencies are the dependencies this plugin has on other plugins.
+ //
+ // An example of a dependency might be a 'protoc-gen-go-grpc' plugin
+ // which depends on the 'protoc-gen-go' generated code.
+ Dependencies []bufpluginref.PluginReference
+ // OutputLanguages is a list of output languages the plugin supports.
+ OutputLanguages []string
+ // Registry is the registry configuration, which lets the user specify
+ // dependencies and other metadata that applies to a specific
+ // remote generation registry (e.g. the Go module proxy, NPM registry,
+ // etc).
+ Registry *RegistryConfig
+ // SPDXLicenseID is the license of the plugin, which should be one of
+ // the identifiers defined in https://spdx.org/licenses
+ SPDXLicenseID string
+ // LicenseURL specifies where the plugin's license can be found.
+ LicenseURL string
+}
+
+// RegistryConfig is the configuration for the registry of a plugin.
+//
+// Only one field will be set.
+type RegistryConfig struct {
+ Go *GoRegistryConfig
+ NPM *NPMRegistryConfig
+ // Options is the set of options passed into the plugin for the
+ // remote registry.
+ //
+ // For now, all options are string values. This could eventually
+ // support other types (like JSON Schema and Terraform variables),
+ // where strings are the default value unless otherwise specified.
+ //
+ // Note that some legacy plugins don't always express their options
+ // as key value pairs. For example, protoc-gen-java has an option
+ // that can be passed like so:
+ //
+ // java_opt=annotate_code
+ //
+ // In those cases, the option value in this map will be set to
+ // the empty string, and the option will be propagated to the
+ // compiler without the '=' delimiter.
+ Options map[string]string
+}
+
+// GoRegistryConfig is the registry configuration for a Go plugin.
+type GoRegistryConfig struct {
+ MinVersion string
+ Deps []*GoRegistryDependencyConfig
+}
+
+// GoRegistryDependencyConfig is the go registry dependency configuration.
+type GoRegistryDependencyConfig struct {
+ Module string
+ Version string
+}
+
+// NPMRegistryConfig is the registry configuration for a JavaScript NPM plugin.
+type NPMRegistryConfig struct {
+ RewriteImportPathSuffix string
+ Deps []*NPMRegistryDependencyConfig
+ ImportStyle string
+}
+
+// NPMRegistryDependencyConfig is the npm registry dependency configuration.
+type NPMRegistryDependencyConfig struct {
+ Package string
+ Version string
+}
+
+// ConfigOption is an optional option used when loading a Config.
+type ConfigOption func(*configOptions)
+
+// WithOverrideRemote will update the remote found in the plugin name and dependencies.
+func WithOverrideRemote(remote string) ConfigOption {
+ return func(options *configOptions) {
+ options.overrideRemote = remote
+ }
+}
+
+// GetConfigForBucket gets the Config for the YAML data at ConfigFilePath.
+//
+// If the data is of length 0, returns the default config.
+func GetConfigForBucket(ctx context.Context, readBucket storage.ReadBucket, options ...ConfigOption) (*Config, error) {
+ return getConfigForBucket(ctx, readBucket, options)
+}
+
+// GetConfigForData gets the Config for the given JSON or YAML data.
+//
+// If the data is of length 0, returns the default config.
+func GetConfigForData(ctx context.Context, data []byte, options ...ConfigOption) (*Config, error) {
+ return getConfigForData(ctx, data, options)
+}
+
+// ExistingConfigFilePath checks if a configuration file exists, and if so, returns the path
+// within the ReadBucket of this configuration file.
+//
+// Returns empty string and no error if no configuration file exists.
+func ExistingConfigFilePath(ctx context.Context, readBucket storage.ReadBucket) (string, error) {
+ for _, configFilePath := range AllConfigFilePaths {
+ exists, err := storage.Exists(ctx, readBucket, configFilePath)
+ if err != nil {
+ return "", err
+ }
+ if exists {
+ return configFilePath, nil
+ }
+ }
+ return "", nil
+}
+
+// ParseConfig parses the file at the given path as a Config.
+func ParseConfig(config string, options ...ConfigOption) (*Config, error) {
+ var data []byte
+ var err error
+ switch filepath.Ext(config) {
+ case ".json", ".yaml", ".yml":
+ data, err = os.ReadFile(config)
+ if err != nil {
+ return nil, fmt.Errorf("could not read file: %w", err)
+ }
+ default:
+ return nil, fmt.Errorf("invalid extension %s, must be .json, .yaml or .yml", filepath.Ext(config))
+ }
+ var externalConfig ExternalConfig
+ if err := encoding.UnmarshalJSONOrYAMLStrict(data, &externalConfig); err != nil {
+ return nil, fmt.Errorf("failed to unmarshal plugin config: %w", err)
+ }
+ switch externalConfig.Version {
+ case V1Version:
+ return newConfig(externalConfig, options)
+ }
+ return nil, fmt.Errorf("invalid plugin configuration version: must be one of %v", AllConfigFilePaths)
+}
+
+// PluginOptionsToOptionsSlice converts a map representation of plugin options to a slice of the form '=' or '' for empty values.
+func PluginOptionsToOptionsSlice(pluginOptions map[string]string) []string {
+ if pluginOptions == nil {
+ return nil
+ }
+ options := make([]string, 0, len(pluginOptions))
+ for key, value := range pluginOptions {
+ if len(value) > 0 {
+ options = append(options, key+"="+value)
+ } else {
+ options = append(options, key)
+ }
+ }
+ sort.Strings(options)
+ return options
+}
+
+// OptionsSliceToPluginOptions converts a slice of plugin options to a map (using the first '=' as a delimiter between key and value).
+// If no '=' is found, the option will be stored in the map with an empty string value.
+func OptionsSliceToPluginOptions(options []string) map[string]string {
+ if options == nil {
+ return nil
+ }
+ pluginOptions := make(map[string]string, len(options))
+ for _, option := range options {
+ fields := strings.SplitN(option, "=", 2)
+ if len(fields) == 2 {
+ pluginOptions[fields[0]] = fields[1]
+ } else {
+ pluginOptions[option] = ""
+ }
+ }
+ return pluginOptions
+}
+
+// ExternalConfig represents the on-disk representation
+// of the plugin configuration at version v1.
+type ExternalConfig struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+ PluginVersion string `json:"plugin_version,omitempty" yaml:"plugin_version,omitempty"`
+ SourceURL string `json:"source_url,omitempty" yaml:"source_url,omitempty"`
+ Description string `json:"description,omitempty" yaml:"description,omitempty"`
+ Deps []ExternalDependency `json:"deps,omitempty" yaml:"deps,omitempty"`
+ OutputLanguages []string `json:"output_languages,omitempty" yaml:"output_languages,omitempty"`
+ Registry ExternalRegistryConfig `json:"registry,omitempty" yaml:"registry,omitempty"`
+ SPDXLicenseID string `json:"spdx_license_id,omitempty" yaml:"spdx_license_id,omitempty"`
+ LicenseURL string `json:"license_url,omitempty" yaml:"license_url,omitempty"`
+}
+
+// ExternalDependency represents a dependency on another plugin.
+type ExternalDependency struct {
+ Plugin string `json:"plugin,omitempty" yaml:"plugin,omitempty"`
+ Revision int `json:"revision,omitempty" yaml:"revision,omitempty"`
+}
+
+// ExternalRegistryConfig is the external configuration for the registry
+// of a plugin.
+type ExternalRegistryConfig struct {
+ Go *ExternalGoRegistryConfig `json:"go,omitempty" yaml:"go,omitempty"`
+ NPM *ExternalNPMRegistryConfig `json:"npm,omitempty" yaml:"npm,omitempty"`
+ Opts []string `json:"opts,omitempty" yaml:"opts,omitempty"`
+}
+
+// ExternalGoRegistryConfig is the external registry configuration for a Go plugin.
+type ExternalGoRegistryConfig struct {
+ // The minimum Go version required by the plugin.
+ MinVersion string `json:"min_version,omitempty" yaml:"min_version,omitempty"`
+ Deps []struct {
+ Module string `json:"module,omitempty" yaml:"module,omitempty"`
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ } `json:"deps,omitempty" yaml:"deps,omitempty"`
+}
+
+// ExternalNPMRegistryConfig is the external registry configuration for a JavaScript NPM plugin.
+type ExternalNPMRegistryConfig struct {
+ RewriteImportPathSuffix string `json:"rewrite_import_path_suffix,omitempty" yaml:"rewrite_import_path_suffix,omitempty"`
+ Deps []struct {
+ Package string `json:"package,omitempty" yaml:"package,omitempty"`
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ } `json:"deps,omitempty" yaml:"deps,omitempty"`
+ // The import style used for the "type" field in the package.json file.
+ // Must be one of "module" or "commonjs".
+ ImportStyle string `json:"import_style,omitempty" yaml:"import_style,omitempty"`
+}
+
+type externalConfigVersion struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+}
+
+type configOptions struct {
+ overrideRemote string
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/config.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/config.go
new file mode 100644
index 000000000..261d090ed
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/config.go
@@ -0,0 +1,233 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufpluginconfig
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref"
+ "github.com/bufbuild/buf/private/gen/data/dataspdx"
+ "golang.org/x/mod/modfile"
+ "golang.org/x/mod/semver"
+)
+
+func newConfig(externalConfig ExternalConfig, options []ConfigOption) (*Config, error) {
+ opts := &configOptions{}
+ for _, option := range options {
+ option(opts)
+ }
+ pluginIdentity, err := pluginIdentityForStringWithOverrideRemote(externalConfig.Name, opts.overrideRemote)
+ if err != nil {
+ return nil, err
+ }
+ pluginVersion := externalConfig.PluginVersion
+ if pluginVersion == "" {
+ return nil, errors.New("a plugin_version is required")
+ }
+ if !semver.IsValid(pluginVersion) {
+ return nil, fmt.Errorf("plugin_version %q must be a valid semantic version", externalConfig.PluginVersion)
+ }
+ var dependencies []bufpluginref.PluginReference
+ if len(externalConfig.Deps) > 0 {
+ existingDeps := make(map[string]struct{})
+ for _, dependency := range externalConfig.Deps {
+ reference, err := pluginReferenceForStringWithOverrideRemote(dependency.Plugin, dependency.Revision, opts.overrideRemote)
+ if err != nil {
+ return nil, err
+ }
+ if reference.Remote() != pluginIdentity.Remote() {
+ return nil, fmt.Errorf("plugin dependency %q must use same remote as plugin %q", dependency, pluginIdentity.Remote())
+ }
+ if _, ok := existingDeps[reference.IdentityString()]; ok {
+ return nil, fmt.Errorf("plugin dependency %q was specified more than once", dependency)
+ }
+ existingDeps[reference.IdentityString()] = struct{}{}
+ dependencies = append(dependencies, reference)
+ }
+ }
+ registryConfig, err := newRegistryConfig(externalConfig.Registry)
+ if err != nil {
+ return nil, err
+ }
+ spdxLicenseID := externalConfig.SPDXLicenseID
+ if spdxLicenseID != "" {
+ if licenseInfo, ok := dataspdx.GetLicenseInfo(spdxLicenseID); ok {
+ spdxLicenseID = licenseInfo.ID()
+ } else {
+ return nil, fmt.Errorf("unknown SPDX License ID %q", spdxLicenseID)
+ }
+ }
+ return &Config{
+ Name: pluginIdentity,
+ PluginVersion: pluginVersion,
+ Dependencies: dependencies,
+ Registry: registryConfig,
+ SourceURL: externalConfig.SourceURL,
+ Description: externalConfig.Description,
+ OutputLanguages: externalConfig.OutputLanguages,
+ SPDXLicenseID: spdxLicenseID,
+ LicenseURL: externalConfig.LicenseURL,
+ }, nil
+}
+
+func newRegistryConfig(externalRegistryConfig ExternalRegistryConfig) (*RegistryConfig, error) {
+ var (
+ isGoEmpty = externalRegistryConfig.Go == nil
+ isNPMEmpty = externalRegistryConfig.NPM == nil
+ )
+ var registryCount int
+ for _, isEmpty := range []bool{
+ isGoEmpty,
+ isNPMEmpty,
+ } {
+ if !isEmpty {
+ registryCount++
+ }
+ if registryCount > 1 {
+ // We might eventually want to support multiple runtime configuration,
+ // but it's safe to start with an error for now.
+ return nil, fmt.Errorf("%s configuration contains multiple registry configurations", ExternalConfigFilePath)
+ }
+ }
+ if registryCount == 0 {
+ // It's possible that the plugin doesn't have any runtime dependencies.
+ return nil, nil
+ }
+ options := OptionsSliceToPluginOptions(externalRegistryConfig.Opts)
+ if !isNPMEmpty {
+ npmRegistryConfig, err := newNPMRegistryConfig(externalRegistryConfig.NPM)
+ if err != nil {
+ return nil, err
+ }
+ return &RegistryConfig{
+ NPM: npmRegistryConfig,
+ Options: options,
+ }, nil
+ }
+ // At this point, the Go runtime is guaranteed to be specified. Note
+ // that this will change if/when there are more runtime languages supported.
+ goRegistryConfig, err := newGoRegistryConfig(externalRegistryConfig.Go)
+ if err != nil {
+ return nil, err
+ }
+ return &RegistryConfig{
+ Go: goRegistryConfig,
+ Options: options,
+ }, nil
+}
+
+func newNPMRegistryConfig(externalNPMRegistryConfig *ExternalNPMRegistryConfig) (*NPMRegistryConfig, error) {
+ if externalNPMRegistryConfig == nil {
+ return nil, nil
+ }
+ var dependencies []*NPMRegistryDependencyConfig
+ for _, dep := range externalNPMRegistryConfig.Deps {
+ if dep.Package == "" {
+ return nil, errors.New("npm runtime dependency requires a non-empty package name")
+ }
+ if dep.Version == "" {
+ return nil, errors.New("npm runtime dependency requires a non-empty version name")
+ }
+ // TODO: Note that we don't have NPM-specific validation yet - any
+ // non-empty string will work for the package and version.
+ //
+ // For a complete set of the version syntax we need to support, see
+ // https://docs.npmjs.com/cli/v6/using-npm/semver
+ //
+ // https://github.com/Masterminds/semver might be a good candidate for
+ // this, but it might not support all of the constraints supported
+ // by NPM.
+ dependencies = append(
+ dependencies,
+ &NPMRegistryDependencyConfig{
+ Package: dep.Package,
+ Version: dep.Version,
+ },
+ )
+ }
+ switch externalNPMRegistryConfig.ImportStyle {
+ case "module", "commonjs":
+ default:
+ return nil, errors.New(`npm registry config import_style must be one of: "module" or "commonjs"`)
+ }
+ return &NPMRegistryConfig{
+ RewriteImportPathSuffix: externalNPMRegistryConfig.RewriteImportPathSuffix,
+ Deps: dependencies,
+ ImportStyle: externalNPMRegistryConfig.ImportStyle,
+ }, nil
+}
+
+func newGoRegistryConfig(externalGoRegistryConfig *ExternalGoRegistryConfig) (*GoRegistryConfig, error) {
+ if externalGoRegistryConfig == nil {
+ return nil, nil
+ }
+ if externalGoRegistryConfig.MinVersion != "" && !modfile.GoVersionRE.MatchString(externalGoRegistryConfig.MinVersion) {
+ return nil, fmt.Errorf("the go minimum version %q must be a valid semantic version in the form of .", externalGoRegistryConfig.MinVersion)
+ }
+ var dependencies []*GoRegistryDependencyConfig
+ for _, dep := range externalGoRegistryConfig.Deps {
+ if dep.Module == "" {
+ return nil, errors.New("go runtime dependency requires a non-empty module name")
+ }
+ if dep.Version == "" {
+ return nil, errors.New("go runtime dependency requires a non-empty version name")
+ }
+ if !semver.IsValid(dep.Version) {
+ return nil, fmt.Errorf("go runtime dependency %s:%s does not have a valid semantic version", dep.Module, dep.Version)
+ }
+ dependencies = append(
+ dependencies,
+ &GoRegistryDependencyConfig{
+ Module: dep.Module,
+ Version: dep.Version,
+ },
+ )
+ }
+ return &GoRegistryConfig{
+ MinVersion: externalGoRegistryConfig.MinVersion,
+ Deps: dependencies,
+ }, nil
+}
+
+func pluginIdentityForStringWithOverrideRemote(identityStr string, overrideRemote string) (bufpluginref.PluginIdentity, error) {
+ identity, err := bufpluginref.PluginIdentityForString(identityStr)
+ if err != nil {
+ return nil, err
+ }
+ if len(overrideRemote) == 0 {
+ return identity, nil
+ }
+ return bufpluginref.NewPluginIdentity(overrideRemote, identity.Owner(), identity.Plugin())
+}
+
+func pluginReferenceForStringWithOverrideRemote(
+ referenceStr string,
+ revision int,
+ overrideRemote string,
+) (bufpluginref.PluginReference, error) {
+ reference, err := bufpluginref.PluginReferenceForString(referenceStr, revision)
+ if err != nil {
+ return nil, err
+ }
+ if len(overrideRemote) == 0 {
+ return reference, nil
+ }
+ overrideIdentity, err := pluginIdentityForStringWithOverrideRemote(reference.IdentityString(), overrideRemote)
+ if err != nil {
+ return nil, err
+ }
+ return bufpluginref.NewPluginReference(overrideIdentity, reference.Version(), reference.Revision())
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/get.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/get.go
new file mode 100644
index 000000000..2dd3224b2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/get.go
@@ -0,0 +1,128 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufpluginconfig
+
+import (
+ "context"
+ "fmt"
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/encoding"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+)
+
+func getConfigForBucket(ctx context.Context, readBucket storage.ReadBucket, options []ConfigOption) (_ *Config, retErr error) {
+ ctx, span := trace.StartSpan(ctx, "get_plugin_config")
+ defer span.End()
+ // This will be in the order of precedence.
+ var foundConfigFilePaths []string
+ // Go through all valid config file paths and see which ones are present.
+ // If none are present, return the default config.
+ // If multiple are present, error.
+ for _, configFilePath := range AllConfigFilePaths {
+ exists, err := storage.Exists(ctx, readBucket, configFilePath)
+ if err != nil {
+ return nil, err
+ }
+ if exists {
+ foundConfigFilePaths = append(foundConfigFilePaths, configFilePath)
+ }
+ }
+ switch len(foundConfigFilePaths) {
+ case 0:
+ // Did not find anything, return the default.
+ return newConfig(ExternalConfig{}, options)
+ case 1:
+ readObjectCloser, err := readBucket.Get(ctx, foundConfigFilePaths[0])
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, readObjectCloser.Close())
+ }()
+ data, err := io.ReadAll(readObjectCloser)
+ if err != nil {
+ return nil, err
+ }
+ return getConfigForDataInternal(
+ ctx,
+ encoding.UnmarshalYAMLNonStrict,
+ encoding.UnmarshalYAMLStrict,
+ data,
+ readObjectCloser.ExternalPath(),
+ options,
+ )
+ default:
+ return nil, fmt.Errorf("only one plugin file can exist but found multiple plugin files: %s", stringutil.SliceToString(foundConfigFilePaths))
+ }
+}
+
+func getConfigForData(ctx context.Context, data []byte, options []ConfigOption) (*Config, error) {
+ _, span := trace.StartSpan(ctx, "get_plugin_config_for_data")
+ defer span.End()
+ return getConfigForDataInternal(
+ ctx,
+ encoding.UnmarshalJSONOrYAMLNonStrict,
+ encoding.UnmarshalJSONOrYAMLStrict,
+ data,
+ "Plugin configuration data",
+ options,
+ )
+}
+
+func getConfigForDataInternal(
+ ctx context.Context,
+ unmarshalNonStrict func([]byte, interface{}) error,
+ unmarshalStrict func([]byte, interface{}) error,
+ data []byte,
+ id string,
+ options []ConfigOption,
+) (*Config, error) {
+ var externalConfigVersion externalConfigVersion
+ if err := unmarshalNonStrict(data, &externalConfigVersion); err != nil {
+ return nil, err
+ }
+ if err := validateExternalConfigVersion(externalConfigVersion, id); err != nil {
+ return nil, err
+ }
+ var externalConfig ExternalConfig
+ if err := unmarshalStrict(data, &externalConfig); err != nil {
+ return nil, err
+ }
+ return newConfig(externalConfig, options)
+}
+
+func validateExternalConfigVersion(externalConfigVersion externalConfigVersion, id string) error {
+ switch externalConfigVersion.Version {
+ case "":
+ return fmt.Errorf(
+ `%s has no version set. Please add "version: %s"`,
+ id,
+ V1Version,
+ )
+ case V1Version:
+ return nil
+ default:
+ return fmt.Errorf(
+ `%s has an invalid "version: %s" set. Please add "version: %s"`,
+ id,
+ externalConfigVersion.Version,
+ V1Version,
+ )
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/usage.gen.go
new file mode 100644
index 000000000..a0200538c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufpluginconfig
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/bufplugindocker.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/bufplugindocker.go
new file mode 100644
index 000000000..f214d232c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/bufplugindocker.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufplugindocker contains utilities for building Buf plugins using the Docker API.
+package bufplugindocker
+
+// ImagePath is the default location for the Docker image archive in a plugin zip file.
+const ImagePath = "image.tar"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/docker.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/docker.go
new file mode 100644
index 000000000..5396e446c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/docker.go
@@ -0,0 +1,267 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufplugindocker
+
+import (
+ "bufio"
+ "context"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "strings"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig"
+ "github.com/docker/docker/api/types"
+ "github.com/docker/docker/client"
+ "github.com/docker/docker/pkg/jsonmessage"
+ "github.com/docker/docker/pkg/stringid"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+const (
+ // PluginsImagePrefix is used to prefix all image names with the correct path for pushing to the OCI registry.
+ PluginsImagePrefix = "plugins."
+
+ // Setting this value on the buf docker client allows us to propagate a custom
+ // value to the OCI registry. This is a useful property that enables registries
+ // to differentiate between the buf cli vs other tools like docker cli.
+ // Note, this does not override the final User-Agent entirely, but instead adds
+ // the value to the final outgoing User-Agent value in the form: [docker client's UA] UpstreamClient(buf-cli-1.11.0)
+ //
+ // Example: User-Agent = [docker/20.10.21 go/go1.18.7 git-commit/3056208 kernel/5.15.49-linuxkit os/linux arch/arm64 UpstreamClient(buf-cli-1.11.0)]
+ BufUpstreamClientUserAgentPrefix = "buf-cli-"
+)
+
+// Client is a small abstraction over a Docker API client, providing the basic APIs we need to build plugins.
+// It ensures that we pass the appropriate parameters to build images (i.e. platform 'linux/amd64').
+type Client interface {
+ // Load imports a Docker image into the local Docker Engine.
+ Load(ctx context.Context, image io.Reader) (*LoadResponse, error)
+ // Push the Docker image to the remote registry.
+ Push(ctx context.Context, image string, auth *RegistryAuthConfig) (*PushResponse, error)
+ // Delete removes the Docker image from local Docker Engine.
+ Delete(ctx context.Context, image string) (*DeleteResponse, error)
+ // Tag creates a Docker image tag from an existing image and plugin config.
+ Tag(ctx context.Context, image string, config *bufpluginconfig.Config) (*TagResponse, error)
+ // Inspect inspects an image and returns the image id.
+ Inspect(ctx context.Context, image string) (*InspectResponse, error)
+ // Close releases any resources used by the underlying Docker client.
+ Close() error
+}
+
+// LoadResponse returns details of a successful load image call.
+type LoadResponse struct {
+ // ImageID specifies the Docker image id in the format :.
+ // Example: sha256:65001659f150f085e0b37b697a465a95cbfd885d9315b61960883b9ac588744e
+ ImageID string
+}
+
+// PushResponse is a placeholder for data to be returned from a successful image push call.
+type PushResponse struct {
+ // Digest specifies the Docker image digest in the format :.
+ // The digest returned from Client.Push differs from the image id returned in Client.Build.
+ Digest string
+}
+
+// TagResponse returns details of a successful image tag call.
+type TagResponse struct {
+ // Image contains the Docker image name in the local Docker engine including the tag.
+ // It is created from the bufpluginconfig.Config's Name.IdentityString() and a unique id.
+ Image string
+}
+
+// DeleteResponse is a placeholder for data to be returned from a successful image delete call.
+type DeleteResponse struct{}
+
+// InspectResponse returns the image id for a given image.
+type InspectResponse struct {
+ // ImageID contains the Docker image's ID.
+ ImageID string
+}
+
+type dockerAPIClient struct {
+ cli *client.Client
+ logger *zap.Logger
+}
+
+var _ Client = (*dockerAPIClient)(nil)
+
+func (d *dockerAPIClient) Load(ctx context.Context, image io.Reader) (_ *LoadResponse, retErr error) {
+ response, err := d.cli.ImageLoad(ctx, image, true)
+ if err != nil {
+ return nil, err
+ }
+ defer func(Body io.ReadCloser) {
+ if err := Body.Close(); err != nil {
+ retErr = multierr.Append(retErr, err)
+ }
+ }(response.Body)
+ imageID := ""
+ responseScanner := bufio.NewScanner(response.Body)
+ for responseScanner.Scan() {
+ var jsonMessage jsonmessage.JSONMessage
+ if err := json.Unmarshal(responseScanner.Bytes(), &jsonMessage); err == nil {
+ _, loadedImageID, found := strings.Cut(strings.TrimSpace(jsonMessage.Stream), "Loaded image ID: ")
+ if !found {
+ continue
+ }
+ if !strings.HasPrefix(loadedImageID, "sha256:") {
+ d.logger.Warn("Unsupported image digest", zap.String("imageID", loadedImageID))
+ continue
+ }
+ if err := stringid.ValidateID(strings.TrimPrefix(loadedImageID, "sha256:")); err != nil {
+ d.logger.Warn("Invalid image id", zap.String("imageID", loadedImageID))
+ continue
+ }
+ imageID = loadedImageID
+ }
+ }
+ if err := responseScanner.Err(); err != nil {
+ return nil, err
+ }
+ if imageID == "" {
+ return nil, fmt.Errorf("failed to determine image ID of loaded image")
+ }
+ return &LoadResponse{ImageID: imageID}, nil
+}
+
+func (d *dockerAPIClient) Tag(ctx context.Context, image string, config *bufpluginconfig.Config) (*TagResponse, error) {
+ buildID := stringid.GenerateRandomID()
+ imageName := config.Name.IdentityString() + ":" + buildID
+ if !strings.HasPrefix(imageName, PluginsImagePrefix) {
+ imageName = PluginsImagePrefix + imageName
+ }
+ if err := d.cli.ImageTag(ctx, image, imageName); err != nil {
+ return nil, err
+ }
+ return &TagResponse{Image: imageName}, nil
+}
+
+func (d *dockerAPIClient) Push(ctx context.Context, image string, auth *RegistryAuthConfig) (response *PushResponse, retErr error) {
+ registryAuth, err := auth.ToHeader()
+ if err != nil {
+ return nil, err
+ }
+ pushReader, err := d.cli.ImagePush(ctx, image, types.ImagePushOptions{
+ RegistryAuth: registryAuth,
+ })
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, pushReader.Close())
+ }()
+ var imageDigest string
+ pushScanner := bufio.NewScanner(pushReader)
+ for pushScanner.Scan() {
+ d.logger.Debug(pushScanner.Text())
+ var message jsonmessage.JSONMessage
+ if err := json.Unmarshal([]byte(pushScanner.Text()), &message); err == nil {
+ if message.Error != nil {
+ return nil, message.Error
+ }
+ if message.Aux != nil {
+ var pushResult types.PushResult
+ if err := json.Unmarshal(*message.Aux, &pushResult); err == nil {
+ imageDigest = pushResult.Digest
+ }
+ }
+ }
+ }
+ if err := pushScanner.Err(); err != nil {
+ return nil, err
+ }
+ if len(imageDigest) == 0 {
+ return nil, fmt.Errorf("failed to determine image digest after push")
+ }
+ return &PushResponse{Digest: imageDigest}, nil
+}
+
+func (d *dockerAPIClient) Delete(ctx context.Context, image string) (*DeleteResponse, error) {
+ _, err := d.cli.ImageRemove(ctx, image, types.ImageRemoveOptions{})
+ if err != nil {
+ return nil, err
+ }
+ return &DeleteResponse{}, nil
+}
+
+func (d *dockerAPIClient) Inspect(ctx context.Context, image string) (*InspectResponse, error) {
+ inspect, _, err := d.cli.ImageInspectWithRaw(ctx, image)
+ if err != nil {
+ return nil, err
+ }
+ return &InspectResponse{ImageID: inspect.ID}, nil
+}
+
+func (d *dockerAPIClient) Close() error {
+ return d.cli.Close()
+}
+
+// NewClient creates a new Client to use to build Docker plugins.
+func NewClient(logger *zap.Logger, cliVersion string, options ...ClientOption) (Client, error) {
+ if logger == nil {
+ return nil, errors.New("logger required")
+ }
+ opts := &clientOptions{}
+ for _, option := range options {
+ option(opts)
+ }
+ dockerClientOpts := []client.Opt{
+ client.FromEnv,
+ client.WithHTTPHeaders(map[string]string{
+ "User-Agent": BufUpstreamClientUserAgentPrefix + cliVersion,
+ }),
+ }
+ if len(opts.host) > 0 {
+ dockerClientOpts = append(dockerClientOpts, client.WithHost(opts.host))
+ }
+ if len(opts.version) > 0 {
+ dockerClientOpts = append(dockerClientOpts, client.WithVersion(opts.version))
+ }
+ cli, err := client.NewClientWithOpts(dockerClientOpts...)
+ if err != nil {
+ return nil, err
+ }
+ return &dockerAPIClient{
+ cli: cli,
+ logger: logger,
+ }, nil
+}
+
+type clientOptions struct {
+ host string
+ version string
+}
+
+// ClientOption defines options for the NewClient call to customize the underlying Docker client.
+type ClientOption func(options *clientOptions)
+
+// WithHost allows specifying a Docker engine host to connect to (instead of the default lookup using DOCKER_HOST env var).
+// This makes it suitable for use by parallel tests.
+func WithHost(host string) ClientOption {
+ return func(options *clientOptions) {
+ options.host = host
+ }
+}
+
+// WithVersion allows specifying a Docker API client version instead of using the default version negotiation algorithm.
+// This allows tests to implement the Docker engine API using stable URLs.
+func WithVersion(version string) ClientOption {
+ return func(options *clientOptions) {
+ options.version = version
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/registry_auth_config.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/registry_auth_config.go
new file mode 100644
index 000000000..227feed74
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/registry_auth_config.go
@@ -0,0 +1,54 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufplugindocker
+
+import (
+ "encoding/base64"
+ "encoding/json"
+ "strings"
+)
+
+// RegistryAuthConfig represents the fields required to authenticate with the Docker Engine API.
+// Ref: https://docs.docker.com/engine/api/v1.41/#section/Authentication
+type RegistryAuthConfig struct {
+ Username string `json:"username,omitempty"`
+ Password string `json:"password,omitempty"`
+ Email string `json:"email,omitempty"`
+ ServerAddress string `json:"serveraddress,omitempty"` // domain/ip without a protocol
+}
+
+// ToHeader marshals the auth information as a base64 encoded JSON object.
+// This is suitable for passing to the Docker API as the X-Registry-Auth header.
+func (r *RegistryAuthConfig) ToHeader() (string, error) {
+ var buffer strings.Builder
+ writer := base64.NewEncoder(base64.URLEncoding, &buffer)
+ err := json.NewEncoder(writer).Encode(r)
+ if err != nil {
+ return "", err
+ }
+ if err := writer.Close(); err != nil {
+ return "", err
+ }
+ return buffer.String(), nil
+}
+
+// fromHeader decodes auth information from a base64 encoded JSON object (see ToHeader).
+func (r *RegistryAuthConfig) fromHeader(encoded string) error {
+ base64Reader := base64.NewDecoder(base64.URLEncoding, strings.NewReader(encoded))
+ if err := json.NewDecoder(base64Reader).Decode(r); err != nil {
+ return err
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/usage.gen.go
new file mode 100644
index 000000000..472749bde
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufplugindocker/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufplugindocker
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/bufpluginref.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/bufpluginref.go
new file mode 100644
index 000000000..d76ce6cb6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/bufpluginref.go
@@ -0,0 +1,142 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufpluginref
+
+import (
+ "fmt"
+ "strings"
+)
+
+// PluginIdentity is a plugin identity.
+//
+// It just contains remote, owner, plugin.
+type PluginIdentity interface {
+ Remote() string
+ Owner() string
+ Plugin() string
+
+ // IdentityString is the string remote/owner/plugin.
+ IdentityString() string
+
+ // Prevents this type from being implemented by
+ // another package.
+ isPluginIdentity()
+}
+
+// NewPluginIdentity returns a new PluginIdentity.
+func NewPluginIdentity(
+ remote string,
+ owner string,
+ plugin string,
+) (PluginIdentity, error) {
+ return newPluginIdentity(remote, owner, plugin)
+}
+
+// PluginIdentityForString returns a new PluginIdentity for the given string.
+//
+// This parses the path in the form remote/owner/plugin.
+func PluginIdentityForString(path string) (PluginIdentity, error) {
+ remote, owner, plugin, err := parsePluginIdentityComponents(path)
+ if err != nil {
+ return nil, err
+ }
+ return NewPluginIdentity(remote, owner, plugin)
+}
+
+// PluginReference uniquely references a plugin (including version and revision information).
+//
+// It can be used to identify dependencies on other plugins.
+type PluginReference interface {
+ PluginIdentity
+
+ // ReferenceString is the string representation of identity:version:revision.
+ ReferenceString() string
+
+ // Version is the plugin's semantic version.
+ Version() string
+
+ // Revision is the plugin's revision number.
+ //
+ // The accepted range for this value is 0 - math.MaxInt32.
+ Revision() int
+
+ // Prevents this type from being implemented by
+ // another package.
+ isPluginReference()
+}
+
+// NewPluginReference returns a new PluginReference.
+func NewPluginReference(
+ identity PluginIdentity,
+ version string,
+ revision int,
+) (PluginReference, error) {
+ return newPluginReference(identity, version, revision)
+}
+
+// PluginReferenceForString returns a new PluginReference for the given string.
+//
+// This parses the path in the form remote/owner/plugin:version.
+func PluginReferenceForString(reference string, revision int) (PluginReference, error) {
+ return parsePluginReference(reference, revision)
+}
+
+// IsPluginReferenceOrIdentity returns true if the argument matches a plugin
+// reference (with version) or a plugin identity (without version).
+func IsPluginReferenceOrIdentity(plugin string) bool {
+ if _, err := PluginReferenceForString(plugin, 0); err == nil {
+ return true
+ }
+ if _, err := PluginIdentityForString(plugin); err == nil {
+ return true
+ }
+ return false
+}
+
+func parsePluginIdentityComponents(path string) (remote string, owner string, plugin string, err error) {
+ slashSplit := strings.Split(path, "/")
+ if len(slashSplit) != 3 {
+ return "", "", "", newInvalidPluginIdentityStringError(path)
+ }
+ remote = strings.TrimSpace(slashSplit[0])
+ if remote == "" {
+ return "", "", "", newInvalidPluginIdentityStringError(path)
+ }
+ owner = strings.TrimSpace(slashSplit[1])
+ if owner == "" {
+ return "", "", "", newInvalidPluginIdentityStringError(path)
+ }
+ plugin = strings.TrimSpace(slashSplit[2])
+ if plugin == "" || strings.ContainsRune(plugin, ':') {
+ return "", "", "", newInvalidPluginIdentityStringError(path)
+ }
+ return remote, owner, plugin, nil
+}
+
+func newInvalidPluginIdentityStringError(s string) error {
+ return fmt.Errorf("plugin identity %q is invalid: must be in the form remote/owner/plugin", s)
+}
+
+func parsePluginReference(reference string, revision int) (PluginReference, error) {
+ name, version, ok := strings.Cut(reference, ":")
+ if !ok {
+ return nil, fmt.Errorf("plugin references must be specified as \":\" strings")
+ }
+ identity, err := PluginIdentityForString(name)
+ if err != nil {
+ return nil, err
+ }
+ return NewPluginReference(identity, version, revision)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/plugin_identity.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/plugin_identity.go
new file mode 100644
index 000000000..5e7913346
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/plugin_identity.go
@@ -0,0 +1,88 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufpluginref
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/pkg/netextended"
+)
+
+type pluginIdentity struct {
+ remote string
+ owner string
+ plugin string
+}
+
+func newPluginIdentity(
+ remote string,
+ owner string,
+ plugin string,
+) (*pluginIdentity, error) {
+ pluginIdentity := &pluginIdentity{
+ remote: remote,
+ owner: owner,
+ plugin: plugin,
+ }
+ if err := validatePluginIdentity(pluginIdentity); err != nil {
+ return nil, err
+ }
+ return pluginIdentity, nil
+}
+
+func (m *pluginIdentity) Remote() string {
+ return m.remote
+}
+
+func (m *pluginIdentity) Owner() string {
+ return m.owner
+}
+
+func (m *pluginIdentity) Plugin() string {
+ return m.plugin
+}
+
+func (m *pluginIdentity) IdentityString() string {
+ return m.remote + "/" + m.owner + "/" + m.plugin
+}
+
+func (*pluginIdentity) isPluginIdentity() {}
+
+func validatePluginIdentity(pluginIdentity PluginIdentity) error {
+ if pluginIdentity == nil {
+ return errors.New("plugin identity is required")
+ }
+ if err := validateRemote(pluginIdentity.Remote()); err != nil {
+ return err
+ }
+ if pluginIdentity.Owner() == "" {
+ return errors.New("owner name is required")
+ }
+ if pluginIdentity.Plugin() == "" {
+ return errors.New("plugin name is required")
+ }
+ return nil
+}
+
+func validateRemote(remote string) error {
+ if remote == "" {
+ return errors.New("remote name is required")
+ }
+ if _, err := netextended.ValidateHostname(remote); err != nil {
+ return fmt.Errorf("invalid remote %q: %w", remote, err)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/plugin_reference.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/plugin_reference.go
new file mode 100644
index 000000000..e9c362ee1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/plugin_reference.go
@@ -0,0 +1,92 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufpluginref
+
+import (
+ "fmt"
+ "math"
+ "strconv"
+
+ "golang.org/x/mod/semver"
+)
+
+type pluginReference struct {
+ identity PluginIdentity
+ version string
+ revision int
+}
+
+func (p *pluginReference) Remote() string {
+ return p.identity.Remote()
+}
+
+func (p *pluginReference) Owner() string {
+ return p.identity.Owner()
+}
+
+func (p *pluginReference) Plugin() string {
+ return p.identity.Plugin()
+}
+
+func (p *pluginReference) IdentityString() string {
+ return p.identity.IdentityString()
+}
+
+func (p *pluginReference) isPluginIdentity() {}
+
+func (p *pluginReference) ReferenceString() string {
+ return p.identity.IdentityString() + ":" + p.version + ":" + strconv.Itoa(p.revision)
+}
+
+func (p *pluginReference) Version() string {
+ return p.version
+}
+
+func (p *pluginReference) Revision() int {
+ return p.revision
+}
+
+func (p *pluginReference) isPluginReference() {}
+
+func newPluginReference(identity PluginIdentity, version string, revision int) (*pluginReference, error) {
+ if err := validatePluginIdentity(identity); err != nil {
+ return nil, err
+ }
+ if err := validatePluginVersion(version); err != nil {
+ return nil, err
+ }
+ if err := validatePluginRevision(revision); err != nil {
+ return nil, err
+ }
+ return &pluginReference{
+ identity: identity,
+ version: version,
+ revision: revision,
+ }, nil
+}
+
+func validatePluginVersion(version string) error {
+ if !semver.IsValid(version) {
+ return fmt.Errorf("plugin version %q is not a valid semantic version", version)
+ }
+ return nil
+}
+
+func validatePluginRevision(revision int) error {
+ if revision < 0 || revision > math.MaxInt32 {
+ return fmt.Errorf("revision %d is out of accepted range %d-%d", revision, 0, math.MaxInt32)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/usage.gen.go
new file mode 100644
index 000000000..6fcb6ffab
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufpluginref
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/plugin.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/plugin.go
new file mode 100644
index 000000000..349858e0c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/plugin.go
@@ -0,0 +1,96 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufplugin
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginconfig"
+ "github.com/bufbuild/buf/private/bufpkg/bufplugin/bufpluginref"
+ "golang.org/x/mod/semver"
+)
+
+type plugin struct {
+ version string
+ dependencies []bufpluginref.PluginReference
+ registry *bufpluginconfig.RegistryConfig
+ containerImageDigest string
+ sourceURL string
+ description string
+}
+
+var _ Plugin = (*plugin)(nil)
+
+func newPlugin(
+ version string,
+ dependencies []bufpluginref.PluginReference,
+ registryConfig *bufpluginconfig.RegistryConfig,
+ containerImageDigest string,
+ sourceURL string,
+ description string,
+) (*plugin, error) {
+ if version == "" {
+ return nil, errors.New("plugin version is required")
+ }
+ if !semver.IsValid(version) {
+ // This will probably already be validated in other call-sites
+ // (e.g. when we construct a *bufpluginconfig.Config or when we
+ // map from the Protobuf representation), but we may as well
+ // include it at the lowest common denominator, too.
+ return nil, fmt.Errorf("plugin version %q must be a valid semantic version", version)
+ }
+ if containerImageDigest == "" {
+ return nil, errors.New("plugin image digest is required")
+ }
+ return &plugin{
+ version: version,
+ dependencies: dependencies,
+ registry: registryConfig,
+ containerImageDigest: containerImageDigest,
+ sourceURL: sourceURL,
+ description: description,
+ }, nil
+}
+
+// Version returns the plugin's version.
+func (p *plugin) Version() string {
+ return p.version
+}
+
+// Dependencies returns the plugin's dependencies on other plugins.
+func (p *plugin) Dependencies() []bufpluginref.PluginReference {
+ return p.dependencies
+}
+
+// Registry returns the plugin's registry configuration.
+func (p *plugin) Registry() *bufpluginconfig.RegistryConfig {
+ return p.registry
+}
+
+// ContainerImageDigest returns the plugin's image digest.
+func (p *plugin) ContainerImageDigest() string {
+ return p.containerImageDigest
+}
+
+// SourceURL is an optional attribute used to specify where the source for the plugin can be found.
+func (p *plugin) SourceURL() string {
+ return p.sourceURL
+}
+
+// Description is an optional attribute to provide a more detailed description for the plugin.
+func (p *plugin) Description() string {
+ return p.description
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/usage.gen.go
new file mode 100644
index 000000000..a8ae876c6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufplugin/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufplugin
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufreflect/bufreflect.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufreflect/bufreflect.go
new file mode 100644
index 000000000..e306a2829
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufreflect/bufreflect.go
@@ -0,0 +1,60 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufreflect
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/bufpkg/bufimage"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protodesc"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/dynamicpb"
+)
+
+// NewMessage returns a new dynamic proto.Message for the fully qualified typeName
+// in the bufimage.Image.
+func NewMessage(
+ ctx context.Context,
+ image bufimage.Image,
+ typeName string,
+) (proto.Message, error) {
+ if err := ValidateTypeName(typeName); err != nil {
+ return nil, err
+ }
+ files, err := protodesc.NewFiles(bufimage.ImageToFileDescriptorSet(image))
+ if err != nil {
+ return nil, err
+ }
+ descriptor, err := files.FindDescriptorByName(protoreflect.FullName(typeName))
+ if err != nil {
+ return nil, err
+ }
+ typedDescriptor, ok := descriptor.(protoreflect.MessageDescriptor)
+ if !ok {
+ return nil, fmt.Errorf("%q must be a message but is a %T", typeName, descriptor)
+ }
+ return dynamicpb.NewMessage(typedDescriptor), nil
+}
+
+// ValidateTypeName validates that the typeName is well-formed, such that it has one or more
+// '.'-delimited package components and no '/' elements.
+func ValidateTypeName(typeName string) error {
+ if fullName := protoreflect.FullName(typeName); !fullName.IsValid() {
+ return fmt.Errorf("%q is not a valid fully qualified type name", fullName)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufreflect/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufreflect/usage.gen.go
new file mode 100644
index 000000000..719e216a1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufreflect/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufreflect
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/bufremoteplugin.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/bufremoteplugin.go
new file mode 100644
index 000000000..cf6483b4f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/bufremoteplugin.go
@@ -0,0 +1,268 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufremoteplugin
+
+import (
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+ "strings"
+
+ registryv1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ "github.com/bufbuild/buf/private/pkg/app/appcmd"
+ "github.com/bufbuild/buf/private/pkg/encoding"
+)
+
+const (
+ // PluginsPathName is the path prefix used to signify that
+ // a name belongs to a plugin.
+ PluginsPathName = "plugins"
+
+ // TemplatesPathName is the path prefix used to signify that
+ // a name belongs to a template.
+ TemplatesPathName = "templates"
+
+ v1Version = "v1"
+)
+
+// ParsePluginPath parses a string in the format
+// into remote, owner and name.
+func ParsePluginPath(pluginPath string) (remote string, owner string, name string, _ error) {
+ if pluginPath == "" {
+ return "", "", "", appcmd.NewInvalidArgumentError("you must specify a plugin path")
+ }
+ components := strings.Split(pluginPath, "/")
+ if len(components) != 4 || components[2] != PluginsPathName {
+ return "", "", "", appcmd.NewInvalidArgumentErrorf("%s is not a valid plugin path", pluginPath)
+ }
+ return components[0], components[1], components[3], nil
+}
+
+// ParsePluginVersionPath parses a string in the format
+// into remote, owner, name and version. The version is empty if not specified.
+func ParsePluginVersionPath(pluginVersionPath string) (remote string, owner string, name string, version string, _ error) {
+ remote, owner, name, err := ParsePluginPath(pluginVersionPath)
+ if err != nil {
+ return "", "", "", "", err
+ }
+ components := strings.Split(name, ":")
+ switch len(components) {
+ case 2:
+ return remote, owner, components[0], components[1], nil
+ case 1:
+ return remote, owner, name, "", nil
+ default:
+ return "", "", "", "", fmt.Errorf("invalid version: %q", name)
+ }
+}
+
+// ParseTemplatePath parses a string in the format
+// into remote, owner and name.
+func ParseTemplatePath(templatePath string) (remote string, owner string, name string, _ error) {
+ if templatePath == "" {
+ return "", "", "", appcmd.NewInvalidArgumentError("you must specify a template path")
+ }
+ components := strings.Split(templatePath, "/")
+ if len(components) != 4 || components[2] != TemplatesPathName {
+ return "", "", "", appcmd.NewInvalidArgumentErrorf("%s is not a valid template path", templatePath)
+ }
+ return components[0], components[1], components[3], nil
+}
+
+// ValidateTemplateName validates the format of the template name.
+// This is only used for client side validation and attempts to avoid
+// validation constraints that we may want to change.
+func ValidateTemplateName(templateName string) error {
+ if templateName == "" {
+ return errors.New("template name is required")
+ }
+ return nil
+}
+
+// TemplateConfig is the config used to describe the plugins
+// of a new template.
+type TemplateConfig struct {
+ Plugins []PluginConfig
+}
+
+// TemplateConfigToProtoPluginConfigs converts the template config to a slice of proto plugin configs,
+// suitable for use with the Plugin Service CreateTemplate RPC.
+func TemplateConfigToProtoPluginConfigs(templateConfig *TemplateConfig) []*registryv1alpha1.PluginConfig {
+ pluginConfigs := make([]*registryv1alpha1.PluginConfig, 0, len(templateConfig.Plugins))
+ for _, plugin := range templateConfig.Plugins {
+ pluginConfigs = append(
+ pluginConfigs,
+ ®istryv1alpha1.PluginConfig{
+ PluginOwner: plugin.Owner,
+ PluginName: plugin.Name,
+ Parameters: plugin.Parameters,
+ },
+ )
+ }
+ return pluginConfigs
+}
+
+// PluginConfig is the config used to describe a plugin in
+// a new template.
+type PluginConfig struct {
+ Owner string
+ Name string
+ Parameters []string
+}
+
+// ParseTemplateConfig parses the input template config as a path or JSON/YAML literal.
+func ParseTemplateConfig(config string) (*TemplateConfig, error) {
+ var data []byte
+ var err error
+ switch filepath.Ext(config) {
+ case ".json", ".yaml", ".yml":
+ data, err = os.ReadFile(config)
+ if err != nil {
+ return nil, fmt.Errorf("could not read file: %v", err)
+ }
+ default:
+ data = []byte(config)
+ }
+ var version externalTemplateConfigVersion
+ if err := encoding.UnmarshalJSONOrYAMLNonStrict(data, &version); err != nil {
+ return nil, fmt.Errorf("failed to determine version of template config: %w", err)
+ }
+ switch version.Version {
+ case "":
+ return nil, errors.New("template config version is required")
+ case v1Version:
+ default:
+ return nil, fmt.Errorf("unknown template config version: %q", version.Version)
+ }
+ var externalConfig externalTemplateConfig
+ if err := encoding.UnmarshalJSONOrYAMLStrict(data, &externalConfig); err != nil {
+ return nil, fmt.Errorf("failed to unmarshal template config: %w", err)
+ }
+ templateConfig := &TemplateConfig{
+ Plugins: make([]PluginConfig, 0, len(externalConfig.Plugins)),
+ }
+ for _, plugin := range externalConfig.Plugins {
+ templatePlugin := PluginConfig{
+ Owner: plugin.Owner,
+ Name: plugin.Name,
+ }
+ parameterString, err := encoding.InterfaceSliceOrStringToCommaSepString(plugin.Options)
+ if err != nil {
+ return nil, fmt.Errorf("failed to parse options: %w", err)
+ }
+ if parameterString != "" {
+ templatePlugin.Parameters = strings.Split(parameterString, ",")
+ }
+ templateConfig.Plugins = append(templateConfig.Plugins, templatePlugin)
+ }
+ return templateConfig, nil
+}
+
+// TemplateVersionConfig is the config used to describe the plugin
+// version of a new template version.
+type TemplateVersionConfig struct {
+ PluginVersions []PluginVersion
+}
+
+// TemplateVersionConfigToProtoPluginVersionMappings converts the template version config to a
+// slice of Plugin version mappings, suitable for use with the Plugin Service CreateTemplateVersion RPC.
+func TemplateVersionConfigToProtoPluginVersionMappings(
+ templateVersionConfig *TemplateVersionConfig,
+) []*registryv1alpha1.PluginVersionMapping {
+ pluginVersions := make([]*registryv1alpha1.PluginVersionMapping, 0, len(templateVersionConfig.PluginVersions))
+ for _, pluginVersion := range templateVersionConfig.PluginVersions {
+ pluginVersions = append(
+ pluginVersions,
+ ®istryv1alpha1.PluginVersionMapping{
+ PluginOwner: pluginVersion.Owner,
+ PluginName: pluginVersion.Name,
+ Version: pluginVersion.Version,
+ },
+ )
+ }
+ return pluginVersions
+}
+
+// PluginVersion describes a version of a plugin for
+// use in a template version.
+type PluginVersion struct {
+ Owner string
+ Name string
+ Version string
+}
+
+// ParseTemplateVersionConfig parses the input template version config as a path or JSON/YAML literal.
+func ParseTemplateVersionConfig(config string) (*TemplateVersionConfig, error) {
+ var data []byte
+ var err error
+ switch filepath.Ext(config) {
+ case ".json", ".yaml", ".yml":
+ data, err = os.ReadFile(config)
+ if err != nil {
+ return nil, fmt.Errorf("could not read file: %v", err)
+ }
+ default:
+ data = []byte(config)
+ }
+ var version externalTemplateConfigVersion
+ if err := encoding.UnmarshalJSONOrYAMLNonStrict(data, &version); err != nil {
+ return nil, fmt.Errorf("failed to determine version of template version config: %w", err)
+ }
+ switch version.Version {
+ case "":
+ return nil, errors.New("template version config version is required")
+ case v1Version:
+ default:
+ return nil, fmt.Errorf("unknown template version config version: %q", version.Version)
+ }
+ var externalConfig externalTemplateVersionConfig
+ if err := encoding.UnmarshalJSONOrYAMLStrict(data, &externalConfig); err != nil {
+ return nil, fmt.Errorf("failed to unmarshal template version config: %w", err)
+ }
+ templateVersionConfig := &TemplateVersionConfig{
+ PluginVersions: make([]PluginVersion, 0, len(externalConfig.PluginVersions)),
+ }
+ for _, pluginVersion := range externalConfig.PluginVersions {
+ templateVersionConfig.PluginVersions = append(templateVersionConfig.PluginVersions, PluginVersion(pluginVersion))
+ }
+ return templateVersionConfig, nil
+}
+
+type externalTemplateConfig struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ Plugins []externalPluginConfig `json:"plugins,omitempty" yaml:"plugins,omitempty"`
+}
+
+type externalPluginConfig struct {
+ Owner string `json:"owner,omitempty" yaml:"owner,omitempty"`
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+ Options interface{} `json:"opt,omitempty" yaml:"opt,omitempty"`
+}
+
+type externalTemplateVersionConfig struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+ PluginVersions []externalPluginVersion `json:"plugin_versions,omitempty" yaml:"plugin_versions,omitempty"`
+}
+
+type externalPluginVersion struct {
+ Owner string `json:"owner,omitempty" yaml:"owner,omitempty"`
+ Name string `json:"name,omitempty" yaml:"name,omitempty"`
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+}
+
+type externalTemplateConfigVersion struct {
+ Version string `json:"version,omitempty" yaml:"version,omitempty"`
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/usage.gen.go
new file mode 100644
index 000000000..ae3fe5502
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufremoteplugin/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufremoteplugin
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/buffer_codec.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/buffer_codec.go
new file mode 100644
index 000000000..2024ba7d0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/buffer_codec.go
@@ -0,0 +1,68 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufstudioagent
+
+import (
+ "bytes"
+ "fmt"
+ "io"
+
+ connect "github.com/bufbuild/connect-go"
+ "google.golang.org/protobuf/proto"
+)
+
+// bufferCodec is a connect.Codec for use with clients of type
+// connect.Client[bytes.Buffer, bytes.Buffer] which does not attempt to parse
+// messages but instead allows the application layer to work on the buffers
+// directly. This is useful for creating proxies.
+type bufferCodec struct {
+ name string
+}
+
+var _ connect.Codec = (*bufferCodec)(nil)
+
+func (b *bufferCodec) Name() string { return b.name }
+
+func (b *bufferCodec) Marshal(src any) ([]byte, error) {
+ switch typedSrc := src.(type) {
+ case *bytes.Buffer:
+ return typedSrc.Bytes(), nil
+ case proto.Message:
+ // When the codec is named "proto", connect will assume that it
+ // may also be used to unmarshal the errors in the
+ // grpc-status-details-bin trailer. The type used is not
+ // exported so we match against the general proto.Message.
+ return proto.Marshal(typedSrc)
+ default:
+ return nil, fmt.Errorf("marshal unexpected type %T", src)
+ }
+}
+
+func (b *bufferCodec) Unmarshal(src []byte, dst any) error {
+ switch destination := dst.(type) {
+ case *bytes.Buffer:
+ destination.Reset()
+ _, err := io.Copy(destination, bytes.NewReader(src))
+ return err
+ case proto.Message:
+ // When the codec is named "proto", connect will assume that it
+ // may also be used to unmarshal the errors in the
+ // grpc-status-details-bin trailer. The type used is not
+ // exported so we match against the general proto.Message.
+ return proto.Unmarshal(src, destination)
+ default:
+ return fmt.Errorf("unmarshal unexpected type %T", dst)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/bufstudioagent.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/bufstudioagent.go
new file mode 100644
index 000000000..cd6f57b1d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/bufstudioagent.go
@@ -0,0 +1,55 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufstudioagent
+
+import (
+ "crypto/tls"
+ "net/http"
+
+ "github.com/rs/cors"
+ "go.uber.org/zap"
+)
+
+// NewHandler creates a new handler that serves the invoke endpoints for the
+// agent.
+func NewHandler(
+ logger *zap.Logger,
+ origin string,
+ tlsClientConfig *tls.Config,
+ disallowedHeaders map[string]struct{},
+ forwardHeaders map[string]string,
+) http.Handler {
+ corsHandler := cors.New(cors.Options{
+ AllowedOrigins: []string{origin},
+ AllowedMethods: []string{http.MethodPost},
+ AllowCredentials: true,
+ })
+ plainHandler := corsHandler.Handler(newPlainPostHandler(logger, disallowedHeaders, forwardHeaders, tlsClientConfig))
+ mux := http.NewServeMux()
+ mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
+ switch r.Method {
+ case http.MethodGet:
+ // In the future we could check for an upgrade header here.
+ _, _ = w.Write([]byte("OK"))
+ case http.MethodPost:
+ plainHandler.ServeHTTP(w, r)
+ return
+ default:
+ http.Error(w, "", http.StatusMethodNotAllowed)
+ return
+ }
+ })
+ return mux
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/plain_post_handler.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/plain_post_handler.go
new file mode 100644
index 000000000..429493621
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/plain_post_handler.go
@@ -0,0 +1,268 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 bufstudioagent
+
+import (
+ "bytes"
+ "crypto/tls"
+ "encoding/base64"
+ "errors"
+ "fmt"
+ "io"
+ "net"
+ "net/http"
+ "net/textproto"
+ "net/url"
+
+ studiov1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/studio/v1alpha1"
+ "github.com/bufbuild/connect-go"
+ "go.uber.org/zap"
+ "golang.org/x/net/http2"
+ "google.golang.org/protobuf/proto"
+)
+
+// MaxMessageSizeBytesDefault determines the maximum number of bytes to read
+// from the request body.
+const MaxMessageSizeBytesDefault = 1024 * 1024 * 5
+
+// plainPostHandler implements a POST handler for forwarding requests that can
+// be called with simple CORS requests.
+//
+// Simple CORS requests are limited [1] to certain headers and content types, so
+// this handler expects base64 encoded protobuf messages in the body and writes
+// out base64 encoded protobuf messages to be able to use Content-Type: text/plain.
+//
+// Because of the content-type restriction we do not define a protobuf service
+// that gets served by connect but instead use a plain post handler.
+//
+// [1] https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS#simple_requests).
+type plainPostHandler struct {
+ Logger *zap.Logger
+ MaxMessageSizeBytes int64
+ B64Encoding *base64.Encoding
+ TLSClient *http.Client
+ H2CClient *http.Client
+ DisallowedHeaders map[string]struct{}
+ ForwardHeaders map[string]string
+}
+
+func newPlainPostHandler(
+ logger *zap.Logger,
+ disallowedHeaders map[string]struct{},
+ forwardHeaders map[string]string,
+ tlsClientConfig *tls.Config,
+) *plainPostHandler {
+ canonicalDisallowedHeaders := make(map[string]struct{}, len(disallowedHeaders))
+ for k := range disallowedHeaders {
+ canonicalDisallowedHeaders[textproto.CanonicalMIMEHeaderKey(k)] = struct{}{}
+ }
+ canonicalForwardHeaders := make(map[string]string, len(forwardHeaders))
+ for k, v := range forwardHeaders {
+ canonicalForwardHeaders[textproto.CanonicalMIMEHeaderKey(k)] = v
+ }
+ return &plainPostHandler{
+ B64Encoding: base64.StdEncoding,
+ DisallowedHeaders: canonicalDisallowedHeaders,
+ ForwardHeaders: canonicalForwardHeaders,
+ H2CClient: &http.Client{
+ Transport: &http2.Transport{
+ AllowHTTP: true,
+ DialTLS: func(netw, addr string, config *tls.Config) (net.Conn, error) {
+ return net.Dial(netw, addr)
+ },
+ },
+ },
+ Logger: logger,
+ MaxMessageSizeBytes: MaxMessageSizeBytesDefault,
+ TLSClient: &http.Client{
+ Transport: &http2.Transport{
+ TLSClientConfig: tlsClientConfig,
+ },
+ },
+ }
+}
+
+func (i *plainPostHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
+ if r.Method != http.MethodPost {
+ http.Error(w, "", http.StatusMethodNotAllowed)
+ return
+ }
+ if r.Header.Get("content-type") != "text/plain" {
+ http.Error(w, "", http.StatusUnsupportedMediaType)
+ return
+ }
+ bodyBytes, err := io.ReadAll(
+ base64.NewDecoder(
+ i.B64Encoding,
+ http.MaxBytesReader(w, r.Body, i.MaxMessageSizeBytes),
+ ),
+ )
+ if err != nil {
+ if b64Err := new(base64.CorruptInputError); errors.As(err, &b64Err) {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ return
+ }
+ http.Error(w, err.Error(), http.StatusRequestEntityTooLarge)
+ return
+ }
+ envelopeRequest := &studiov1alpha1.InvokeRequest{}
+ if err := proto.Unmarshal(bodyBytes, envelopeRequest); err != nil {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ return
+ }
+ request := connect.NewRequest(bytes.NewBuffer(envelopeRequest.GetBody()))
+ for _, header := range envelopeRequest.Headers {
+ if _, ok := i.DisallowedHeaders[textproto.CanonicalMIMEHeaderKey(header.Key)]; ok {
+ http.Error(w, fmt.Sprintf("header %q disallowed by agent", header.Key), http.StatusBadRequest)
+ return
+ }
+ for _, value := range header.Value {
+ request.Header().Add(header.Key, value)
+ }
+ }
+ for fromHeader, toHeader := range i.ForwardHeaders {
+ headerValues := r.Header.Values(fromHeader)
+ if len(headerValues) > 0 {
+ request.Header().Del(toHeader)
+ for _, headerValue := range headerValues {
+ request.Header().Add(toHeader, headerValue)
+ }
+ }
+ }
+ targetURL, err := url.Parse(envelopeRequest.GetTarget())
+ if err != nil {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ return
+ }
+ var httpClient *http.Client
+ switch targetURL.Scheme {
+ case "http":
+ httpClient = i.H2CClient
+ case "https":
+ httpClient = i.TLSClient
+ default:
+ http.Error(w, fmt.Sprintf("must specify http or https url scheme, got %q", targetURL.Scheme), http.StatusBadRequest)
+ return
+ }
+ clientOptions, err := connectClientOptionsFromContentType(request.Header().Get("Content-Type"))
+ if err != nil {
+ http.Error(w, err.Error(), http.StatusBadRequest)
+ return
+ }
+ client := connect.NewClient[bytes.Buffer, bytes.Buffer](
+ httpClient,
+ targetURL.String(),
+ clientOptions...,
+ )
+ // TODO(rvanginkel) should this context be cloned to remove attached values (but keep timeout)?
+ response, err := client.CallUnary(r.Context(), request)
+ if err != nil {
+ // We need to differentiate client errors from server errors. In the former,
+ // trigger a `StatusBadGateway` result, and in the latter surface whatever
+ // error information came back from the server.
+ //
+ // Any error here is expected to be wrapped in a `connect.Error` struct. We
+ // need to check *first* if it's not a wire error, so we can assume the
+ // request never left the client, or a response never arrived from the
+ // server. In those scenarios we trigger a `StatusBadGateway` to signal
+ // that the upstream server is unreachable or in a bad status...
+ if !connect.IsWireError(err) {
+ http.Error(w, err.Error(), http.StatusBadGateway)
+ return
+ }
+ // ... but if a response was received from the server, we assume there's
+ // error information from the server we can surface to the user by including
+ // it in the headers response, unless it is a `CodeUnknown` error. Connect
+ // marks any issues connecting with the `CodeUnknown` error.
+ if connectErr := new(connect.Error); errors.As(err, &connectErr) {
+ if connectErr.Code() == connect.CodeUnknown {
+ http.Error(w, err.Error(), http.StatusBadGateway)
+ return
+ }
+ i.writeProtoMessage(w, &studiov1alpha1.InvokeResponse{
+ // connectErr.Meta contains the trailers for the
+ // caller to find out the error details.
+ Headers: goHeadersToProtoHeaders(connectErr.Meta()),
+ })
+ return
+ }
+ i.Logger.Warn(
+ "non_connect_unary_error",
+ zap.Error(err),
+ )
+ http.Error(w, err.Error(), http.StatusBadGateway)
+ return
+ }
+ i.writeProtoMessage(w, &studiov1alpha1.InvokeResponse{
+ Headers: goHeadersToProtoHeaders(response.Header()),
+ Body: response.Msg.Bytes(),
+ Trailers: goHeadersToProtoHeaders(response.Trailer()),
+ })
+}
+
+func connectClientOptionsFromContentType(contentType string) ([]connect.ClientOption, error) {
+ switch contentType {
+ case "application/grpc", "application/grpc+proto":
+ return []connect.ClientOption{
+ connect.WithGRPC(),
+ connect.WithCodec(&bufferCodec{name: "proto"}),
+ }, nil
+ case "application/grpc+json":
+ return []connect.ClientOption{
+ connect.WithGRPC(),
+ connect.WithCodec(&bufferCodec{name: "json"}),
+ }, nil
+ case "application/json":
+ return []connect.ClientOption{
+ connect.WithCodec(&bufferCodec{name: "json"}),
+ }, nil
+ case "application/proto":
+ return []connect.ClientOption{
+ connect.WithCodec(&bufferCodec{name: "proto"}),
+ }, nil
+ default:
+ return nil, fmt.Errorf("unknown Content-Type: %q", contentType)
+ }
+}
+
+func (i *plainPostHandler) writeProtoMessage(w http.ResponseWriter, message proto.Message) {
+ responseProtoBytes, err := proto.Marshal(message)
+ if err != nil {
+ http.Error(w, err.Error(), http.StatusInternalServerError)
+ return
+ }
+ responseB64Bytes := make([]byte, i.B64Encoding.EncodedLen(len(responseProtoBytes)))
+ i.B64Encoding.Encode(responseB64Bytes, responseProtoBytes)
+ w.Header().Set("Content-Type", "text/plain")
+ if n, err := w.Write(responseB64Bytes); n != len(responseB64Bytes) && err != nil {
+ i.Logger.Error(
+ "write_error",
+ zap.Int("expected_bytes", len(responseB64Bytes)),
+ zap.Int("actual_bytes", n),
+ zap.Error(err),
+ )
+ }
+}
+
+func goHeadersToProtoHeaders(in http.Header) []*studiov1alpha1.Headers {
+ var out []*studiov1alpha1.Headers
+ for k, v := range in {
+ out = append(out, &studiov1alpha1.Headers{
+ Key: k,
+ Value: v,
+ })
+ }
+ return out
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/usage.gen.go
new file mode 100644
index 000000000..c55bd309f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/bufstudioagent/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package bufstudioagent
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/buftransport/buftransport.go b/vendor/github.com/bufbuild/buf/private/bufpkg/buftransport/buftransport.go
new file mode 100644
index 000000000..a7814fa7d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/buftransport/buftransport.go
@@ -0,0 +1,57 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 buftransport
+
+import (
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+)
+
+const (
+ // APISubdomain is the subdomain used for calls to the BSR API
+ APISubdomain = "api"
+
+ schemeHTTP = "http"
+ schemeHTTPS = "https"
+
+ // TODO: change to based on "use"
+ disableAPISubdomainEnvKey = "BUF_DISABLE_API_SUBDOMAIN"
+)
+
+// IsAPISubdomainEnabled returns true if the container says to use the API subdomain.
+func IsAPISubdomainEnabled(container app.EnvContainer) bool {
+ return strings.TrimSpace(strings.ToLower(container.Env(disableAPISubdomainEnvKey))) == ""
+}
+
+// SetDisableAPISubdomain sets the environment map to disable the API subdomain.
+func SetDisableAPISubdomain(env map[string]string) {
+ env[disableAPISubdomainEnvKey] = "disable"
+}
+
+// PrependAPISubdomain prepends the API subdomain to the given address.
+func PrependAPISubdomain(address string) string {
+ return APISubdomain + "." + address
+}
+
+// PrependHTTP prepends an http scheme to the given address
+func PrependHTTP(address string) string {
+ return schemeHTTP + "://" + address
+}
+
+// PrependHTTPS prepends an https scheme to the given address
+func PrependHTTPS(address string) string {
+ return schemeHTTPS + "://" + address
+}
diff --git a/vendor/github.com/bufbuild/buf/private/bufpkg/buftransport/usage.gen.go b/vendor/github.com/bufbuild/buf/private/bufpkg/buftransport/usage.gen.go
new file mode 100644
index 000000000..9dccd8cd9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/bufpkg/buftransport/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package buftransport
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/gen/data/dataspdx/dataspdx.gen.go b/vendor/github.com/bufbuild/buf/private/gen/data/dataspdx/dataspdx.gen.go
new file mode 100644
index 000000000..fffb373e4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/data/dataspdx/dataspdx.gen.go
@@ -0,0 +1,1536 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by spdx-go-data. DO NOT EDIT.
+
+package dataspdx
+
+import "strings"
+
+// LicenseInfo is SPDX license information.
+//
+// See https://spdx.org/licenses.
+type LicenseInfo interface {
+ // The SPDX identifier.
+ //
+ // Case-sensitive.
+ ID() string
+}
+
+// GetLicenseInfo gets the LicenseInfo for the id.
+//
+// The parameter id is not case-sensitive.
+func GetLicenseInfo(id string) (LicenseInfo, bool) {
+ licenseInfo, ok := lowercaseIDToLicenseInfo[strings.ToLower(id)]
+ return licenseInfo, ok
+}
+
+var lowercaseIDToLicenseInfo = map[string]*licenseInfo{
+ "0bsd": {
+ id: "0BSD",
+ },
+ "aal": {
+ id: "AAL",
+ },
+ "abstyles": {
+ id: "Abstyles",
+ },
+ "adobe-2006": {
+ id: "Adobe-2006",
+ },
+ "adobe-glyph": {
+ id: "Adobe-Glyph",
+ },
+ "adsl": {
+ id: "ADSL",
+ },
+ "afl-1.1": {
+ id: "AFL-1.1",
+ },
+ "afl-1.2": {
+ id: "AFL-1.2",
+ },
+ "afl-2.0": {
+ id: "AFL-2.0",
+ },
+ "afl-2.1": {
+ id: "AFL-2.1",
+ },
+ "afl-3.0": {
+ id: "AFL-3.0",
+ },
+ "afmparse": {
+ id: "Afmparse",
+ },
+ "agpl-1.0": {
+ id: "AGPL-1.0",
+ },
+ "agpl-1.0-only": {
+ id: "AGPL-1.0-only",
+ },
+ "agpl-1.0-or-later": {
+ id: "AGPL-1.0-or-later",
+ },
+ "agpl-3.0": {
+ id: "AGPL-3.0",
+ },
+ "agpl-3.0-only": {
+ id: "AGPL-3.0-only",
+ },
+ "agpl-3.0-or-later": {
+ id: "AGPL-3.0-or-later",
+ },
+ "aladdin": {
+ id: "Aladdin",
+ },
+ "amdplpa": {
+ id: "AMDPLPA",
+ },
+ "aml": {
+ id: "AML",
+ },
+ "ampas": {
+ id: "AMPAS",
+ },
+ "antlr-pd": {
+ id: "ANTLR-PD",
+ },
+ "antlr-pd-fallback": {
+ id: "ANTLR-PD-fallback",
+ },
+ "apache-1.0": {
+ id: "Apache-1.0",
+ },
+ "apache-1.1": {
+ id: "Apache-1.1",
+ },
+ "apache-2.0": {
+ id: "Apache-2.0",
+ },
+ "apafml": {
+ id: "APAFML",
+ },
+ "apl-1.0": {
+ id: "APL-1.0",
+ },
+ "app-s2p": {
+ id: "App-s2p",
+ },
+ "apsl-1.0": {
+ id: "APSL-1.0",
+ },
+ "apsl-1.1": {
+ id: "APSL-1.1",
+ },
+ "apsl-1.2": {
+ id: "APSL-1.2",
+ },
+ "apsl-2.0": {
+ id: "APSL-2.0",
+ },
+ "arphic-1999": {
+ id: "Arphic-1999",
+ },
+ "artistic-1.0": {
+ id: "Artistic-1.0",
+ },
+ "artistic-1.0-cl8": {
+ id: "Artistic-1.0-cl8",
+ },
+ "artistic-1.0-perl": {
+ id: "Artistic-1.0-Perl",
+ },
+ "artistic-2.0": {
+ id: "Artistic-2.0",
+ },
+ "baekmuk": {
+ id: "Baekmuk",
+ },
+ "bahyph": {
+ id: "Bahyph",
+ },
+ "barr": {
+ id: "Barr",
+ },
+ "beerware": {
+ id: "Beerware",
+ },
+ "bitstream-vera": {
+ id: "Bitstream-Vera",
+ },
+ "bittorrent-1.0": {
+ id: "BitTorrent-1.0",
+ },
+ "bittorrent-1.1": {
+ id: "BitTorrent-1.1",
+ },
+ "blessing": {
+ id: "blessing",
+ },
+ "blueoak-1.0.0": {
+ id: "BlueOak-1.0.0",
+ },
+ "borceux": {
+ id: "Borceux",
+ },
+ "bsd-1-clause": {
+ id: "BSD-1-Clause",
+ },
+ "bsd-2-clause": {
+ id: "BSD-2-Clause",
+ },
+ "bsd-2-clause-freebsd": {
+ id: "BSD-2-Clause-FreeBSD",
+ },
+ "bsd-2-clause-netbsd": {
+ id: "BSD-2-Clause-NetBSD",
+ },
+ "bsd-2-clause-patent": {
+ id: "BSD-2-Clause-Patent",
+ },
+ "bsd-2-clause-views": {
+ id: "BSD-2-Clause-Views",
+ },
+ "bsd-3-clause": {
+ id: "BSD-3-Clause",
+ },
+ "bsd-3-clause-attribution": {
+ id: "BSD-3-Clause-Attribution",
+ },
+ "bsd-3-clause-clear": {
+ id: "BSD-3-Clause-Clear",
+ },
+ "bsd-3-clause-lbnl": {
+ id: "BSD-3-Clause-LBNL",
+ },
+ "bsd-3-clause-modification": {
+ id: "BSD-3-Clause-Modification",
+ },
+ "bsd-3-clause-no-military-license": {
+ id: "BSD-3-Clause-No-Military-License",
+ },
+ "bsd-3-clause-no-nuclear-license": {
+ id: "BSD-3-Clause-No-Nuclear-License",
+ },
+ "bsd-3-clause-no-nuclear-license-2014": {
+ id: "BSD-3-Clause-No-Nuclear-License-2014",
+ },
+ "bsd-3-clause-no-nuclear-warranty": {
+ id: "BSD-3-Clause-No-Nuclear-Warranty",
+ },
+ "bsd-3-clause-open-mpi": {
+ id: "BSD-3-Clause-Open-MPI",
+ },
+ "bsd-4-clause": {
+ id: "BSD-4-Clause",
+ },
+ "bsd-4-clause-shortened": {
+ id: "BSD-4-Clause-Shortened",
+ },
+ "bsd-4-clause-uc": {
+ id: "BSD-4-Clause-UC",
+ },
+ "bsd-protection": {
+ id: "BSD-Protection",
+ },
+ "bsd-source-code": {
+ id: "BSD-Source-Code",
+ },
+ "bsl-1.0": {
+ id: "BSL-1.0",
+ },
+ "busl-1.1": {
+ id: "BUSL-1.1",
+ },
+ "bzip2-1.0.5": {
+ id: "bzip2-1.0.5",
+ },
+ "bzip2-1.0.6": {
+ id: "bzip2-1.0.6",
+ },
+ "c-uda-1.0": {
+ id: "C-UDA-1.0",
+ },
+ "cal-1.0": {
+ id: "CAL-1.0",
+ },
+ "cal-1.0-combined-work-exception": {
+ id: "CAL-1.0-Combined-Work-Exception",
+ },
+ "caldera": {
+ id: "Caldera",
+ },
+ "catosl-1.1": {
+ id: "CATOSL-1.1",
+ },
+ "cc-by-1.0": {
+ id: "CC-BY-1.0",
+ },
+ "cc-by-2.0": {
+ id: "CC-BY-2.0",
+ },
+ "cc-by-2.5": {
+ id: "CC-BY-2.5",
+ },
+ "cc-by-2.5-au": {
+ id: "CC-BY-2.5-AU",
+ },
+ "cc-by-3.0": {
+ id: "CC-BY-3.0",
+ },
+ "cc-by-3.0-at": {
+ id: "CC-BY-3.0-AT",
+ },
+ "cc-by-3.0-de": {
+ id: "CC-BY-3.0-DE",
+ },
+ "cc-by-3.0-igo": {
+ id: "CC-BY-3.0-IGO",
+ },
+ "cc-by-3.0-nl": {
+ id: "CC-BY-3.0-NL",
+ },
+ "cc-by-3.0-us": {
+ id: "CC-BY-3.0-US",
+ },
+ "cc-by-4.0": {
+ id: "CC-BY-4.0",
+ },
+ "cc-by-nc-1.0": {
+ id: "CC-BY-NC-1.0",
+ },
+ "cc-by-nc-2.0": {
+ id: "CC-BY-NC-2.0",
+ },
+ "cc-by-nc-2.5": {
+ id: "CC-BY-NC-2.5",
+ },
+ "cc-by-nc-3.0": {
+ id: "CC-BY-NC-3.0",
+ },
+ "cc-by-nc-3.0-de": {
+ id: "CC-BY-NC-3.0-DE",
+ },
+ "cc-by-nc-4.0": {
+ id: "CC-BY-NC-4.0",
+ },
+ "cc-by-nc-nd-1.0": {
+ id: "CC-BY-NC-ND-1.0",
+ },
+ "cc-by-nc-nd-2.0": {
+ id: "CC-BY-NC-ND-2.0",
+ },
+ "cc-by-nc-nd-2.5": {
+ id: "CC-BY-NC-ND-2.5",
+ },
+ "cc-by-nc-nd-3.0": {
+ id: "CC-BY-NC-ND-3.0",
+ },
+ "cc-by-nc-nd-3.0-de": {
+ id: "CC-BY-NC-ND-3.0-DE",
+ },
+ "cc-by-nc-nd-3.0-igo": {
+ id: "CC-BY-NC-ND-3.0-IGO",
+ },
+ "cc-by-nc-nd-4.0": {
+ id: "CC-BY-NC-ND-4.0",
+ },
+ "cc-by-nc-sa-1.0": {
+ id: "CC-BY-NC-SA-1.0",
+ },
+ "cc-by-nc-sa-2.0": {
+ id: "CC-BY-NC-SA-2.0",
+ },
+ "cc-by-nc-sa-2.0-fr": {
+ id: "CC-BY-NC-SA-2.0-FR",
+ },
+ "cc-by-nc-sa-2.0-uk": {
+ id: "CC-BY-NC-SA-2.0-UK",
+ },
+ "cc-by-nc-sa-2.5": {
+ id: "CC-BY-NC-SA-2.5",
+ },
+ "cc-by-nc-sa-3.0": {
+ id: "CC-BY-NC-SA-3.0",
+ },
+ "cc-by-nc-sa-3.0-de": {
+ id: "CC-BY-NC-SA-3.0-DE",
+ },
+ "cc-by-nc-sa-3.0-igo": {
+ id: "CC-BY-NC-SA-3.0-IGO",
+ },
+ "cc-by-nc-sa-4.0": {
+ id: "CC-BY-NC-SA-4.0",
+ },
+ "cc-by-nd-1.0": {
+ id: "CC-BY-ND-1.0",
+ },
+ "cc-by-nd-2.0": {
+ id: "CC-BY-ND-2.0",
+ },
+ "cc-by-nd-2.5": {
+ id: "CC-BY-ND-2.5",
+ },
+ "cc-by-nd-3.0": {
+ id: "CC-BY-ND-3.0",
+ },
+ "cc-by-nd-3.0-de": {
+ id: "CC-BY-ND-3.0-DE",
+ },
+ "cc-by-nd-4.0": {
+ id: "CC-BY-ND-4.0",
+ },
+ "cc-by-sa-1.0": {
+ id: "CC-BY-SA-1.0",
+ },
+ "cc-by-sa-2.0": {
+ id: "CC-BY-SA-2.0",
+ },
+ "cc-by-sa-2.0-uk": {
+ id: "CC-BY-SA-2.0-UK",
+ },
+ "cc-by-sa-2.1-jp": {
+ id: "CC-BY-SA-2.1-JP",
+ },
+ "cc-by-sa-2.5": {
+ id: "CC-BY-SA-2.5",
+ },
+ "cc-by-sa-3.0": {
+ id: "CC-BY-SA-3.0",
+ },
+ "cc-by-sa-3.0-at": {
+ id: "CC-BY-SA-3.0-AT",
+ },
+ "cc-by-sa-3.0-de": {
+ id: "CC-BY-SA-3.0-DE",
+ },
+ "cc-by-sa-4.0": {
+ id: "CC-BY-SA-4.0",
+ },
+ "cc-pddc": {
+ id: "CC-PDDC",
+ },
+ "cc0-1.0": {
+ id: "CC0-1.0",
+ },
+ "cddl-1.0": {
+ id: "CDDL-1.0",
+ },
+ "cddl-1.1": {
+ id: "CDDL-1.1",
+ },
+ "cdl-1.0": {
+ id: "CDL-1.0",
+ },
+ "cdla-permissive-1.0": {
+ id: "CDLA-Permissive-1.0",
+ },
+ "cdla-permissive-2.0": {
+ id: "CDLA-Permissive-2.0",
+ },
+ "cdla-sharing-1.0": {
+ id: "CDLA-Sharing-1.0",
+ },
+ "cecill-1.0": {
+ id: "CECILL-1.0",
+ },
+ "cecill-1.1": {
+ id: "CECILL-1.1",
+ },
+ "cecill-2.0": {
+ id: "CECILL-2.0",
+ },
+ "cecill-2.1": {
+ id: "CECILL-2.1",
+ },
+ "cecill-b": {
+ id: "CECILL-B",
+ },
+ "cecill-c": {
+ id: "CECILL-C",
+ },
+ "cern-ohl-1.1": {
+ id: "CERN-OHL-1.1",
+ },
+ "cern-ohl-1.2": {
+ id: "CERN-OHL-1.2",
+ },
+ "cern-ohl-p-2.0": {
+ id: "CERN-OHL-P-2.0",
+ },
+ "cern-ohl-s-2.0": {
+ id: "CERN-OHL-S-2.0",
+ },
+ "cern-ohl-w-2.0": {
+ id: "CERN-OHL-W-2.0",
+ },
+ "clartistic": {
+ id: "ClArtistic",
+ },
+ "cnri-jython": {
+ id: "CNRI-Jython",
+ },
+ "cnri-python": {
+ id: "CNRI-Python",
+ },
+ "cnri-python-gpl-compatible": {
+ id: "CNRI-Python-GPL-Compatible",
+ },
+ "coil-1.0": {
+ id: "COIL-1.0",
+ },
+ "community-spec-1.0": {
+ id: "Community-Spec-1.0",
+ },
+ "condor-1.1": {
+ id: "Condor-1.1",
+ },
+ "copyleft-next-0.3.0": {
+ id: "copyleft-next-0.3.0",
+ },
+ "copyleft-next-0.3.1": {
+ id: "copyleft-next-0.3.1",
+ },
+ "cpal-1.0": {
+ id: "CPAL-1.0",
+ },
+ "cpl-1.0": {
+ id: "CPL-1.0",
+ },
+ "cpol-1.02": {
+ id: "CPOL-1.02",
+ },
+ "crossword": {
+ id: "Crossword",
+ },
+ "crystalstacker": {
+ id: "CrystalStacker",
+ },
+ "cua-opl-1.0": {
+ id: "CUA-OPL-1.0",
+ },
+ "cube": {
+ id: "Cube",
+ },
+ "curl": {
+ id: "curl",
+ },
+ "d-fsl-1.0": {
+ id: "D-FSL-1.0",
+ },
+ "diffmark": {
+ id: "diffmark",
+ },
+ "dl-de-by-2.0": {
+ id: "DL-DE-BY-2.0",
+ },
+ "doc": {
+ id: "DOC",
+ },
+ "dotseqn": {
+ id: "Dotseqn",
+ },
+ "drl-1.0": {
+ id: "DRL-1.0",
+ },
+ "dsdp": {
+ id: "DSDP",
+ },
+ "dvipdfm": {
+ id: "dvipdfm",
+ },
+ "ecl-1.0": {
+ id: "ECL-1.0",
+ },
+ "ecl-2.0": {
+ id: "ECL-2.0",
+ },
+ "ecos-2.0": {
+ id: "eCos-2.0",
+ },
+ "efl-1.0": {
+ id: "EFL-1.0",
+ },
+ "efl-2.0": {
+ id: "EFL-2.0",
+ },
+ "egenix": {
+ id: "eGenix",
+ },
+ "elastic-2.0": {
+ id: "Elastic-2.0",
+ },
+ "entessa": {
+ id: "Entessa",
+ },
+ "epics": {
+ id: "EPICS",
+ },
+ "epl-1.0": {
+ id: "EPL-1.0",
+ },
+ "epl-2.0": {
+ id: "EPL-2.0",
+ },
+ "erlpl-1.1": {
+ id: "ErlPL-1.1",
+ },
+ "etalab-2.0": {
+ id: "etalab-2.0",
+ },
+ "eudatagrid": {
+ id: "EUDatagrid",
+ },
+ "eupl-1.0": {
+ id: "EUPL-1.0",
+ },
+ "eupl-1.1": {
+ id: "EUPL-1.1",
+ },
+ "eupl-1.2": {
+ id: "EUPL-1.2",
+ },
+ "eurosym": {
+ id: "Eurosym",
+ },
+ "fair": {
+ id: "Fair",
+ },
+ "fdk-aac": {
+ id: "FDK-AAC",
+ },
+ "frameworx-1.0": {
+ id: "Frameworx-1.0",
+ },
+ "freebsd-doc": {
+ id: "FreeBSD-DOC",
+ },
+ "freeimage": {
+ id: "FreeImage",
+ },
+ "fsfap": {
+ id: "FSFAP",
+ },
+ "fsful": {
+ id: "FSFUL",
+ },
+ "fsfullr": {
+ id: "FSFULLR",
+ },
+ "ftl": {
+ id: "FTL",
+ },
+ "gd": {
+ id: "GD",
+ },
+ "gfdl-1.1": {
+ id: "GFDL-1.1",
+ },
+ "gfdl-1.1-invariants-only": {
+ id: "GFDL-1.1-invariants-only",
+ },
+ "gfdl-1.1-invariants-or-later": {
+ id: "GFDL-1.1-invariants-or-later",
+ },
+ "gfdl-1.1-no-invariants-only": {
+ id: "GFDL-1.1-no-invariants-only",
+ },
+ "gfdl-1.1-no-invariants-or-later": {
+ id: "GFDL-1.1-no-invariants-or-later",
+ },
+ "gfdl-1.1-only": {
+ id: "GFDL-1.1-only",
+ },
+ "gfdl-1.1-or-later": {
+ id: "GFDL-1.1-or-later",
+ },
+ "gfdl-1.2": {
+ id: "GFDL-1.2",
+ },
+ "gfdl-1.2-invariants-only": {
+ id: "GFDL-1.2-invariants-only",
+ },
+ "gfdl-1.2-invariants-or-later": {
+ id: "GFDL-1.2-invariants-or-later",
+ },
+ "gfdl-1.2-no-invariants-only": {
+ id: "GFDL-1.2-no-invariants-only",
+ },
+ "gfdl-1.2-no-invariants-or-later": {
+ id: "GFDL-1.2-no-invariants-or-later",
+ },
+ "gfdl-1.2-only": {
+ id: "GFDL-1.2-only",
+ },
+ "gfdl-1.2-or-later": {
+ id: "GFDL-1.2-or-later",
+ },
+ "gfdl-1.3": {
+ id: "GFDL-1.3",
+ },
+ "gfdl-1.3-invariants-only": {
+ id: "GFDL-1.3-invariants-only",
+ },
+ "gfdl-1.3-invariants-or-later": {
+ id: "GFDL-1.3-invariants-or-later",
+ },
+ "gfdl-1.3-no-invariants-only": {
+ id: "GFDL-1.3-no-invariants-only",
+ },
+ "gfdl-1.3-no-invariants-or-later": {
+ id: "GFDL-1.3-no-invariants-or-later",
+ },
+ "gfdl-1.3-only": {
+ id: "GFDL-1.3-only",
+ },
+ "gfdl-1.3-or-later": {
+ id: "GFDL-1.3-or-later",
+ },
+ "giftware": {
+ id: "Giftware",
+ },
+ "gl2ps": {
+ id: "GL2PS",
+ },
+ "glide": {
+ id: "Glide",
+ },
+ "glulxe": {
+ id: "Glulxe",
+ },
+ "glwtpl": {
+ id: "GLWTPL",
+ },
+ "gnuplot": {
+ id: "gnuplot",
+ },
+ "gpl-1.0": {
+ id: "GPL-1.0",
+ },
+ "gpl-1.0+": {
+ id: "GPL-1.0+",
+ },
+ "gpl-1.0-only": {
+ id: "GPL-1.0-only",
+ },
+ "gpl-1.0-or-later": {
+ id: "GPL-1.0-or-later",
+ },
+ "gpl-2.0": {
+ id: "GPL-2.0",
+ },
+ "gpl-2.0+": {
+ id: "GPL-2.0+",
+ },
+ "gpl-2.0-only": {
+ id: "GPL-2.0-only",
+ },
+ "gpl-2.0-or-later": {
+ id: "GPL-2.0-or-later",
+ },
+ "gpl-2.0-with-autoconf-exception": {
+ id: "GPL-2.0-with-autoconf-exception",
+ },
+ "gpl-2.0-with-bison-exception": {
+ id: "GPL-2.0-with-bison-exception",
+ },
+ "gpl-2.0-with-classpath-exception": {
+ id: "GPL-2.0-with-classpath-exception",
+ },
+ "gpl-2.0-with-font-exception": {
+ id: "GPL-2.0-with-font-exception",
+ },
+ "gpl-2.0-with-gcc-exception": {
+ id: "GPL-2.0-with-GCC-exception",
+ },
+ "gpl-3.0": {
+ id: "GPL-3.0",
+ },
+ "gpl-3.0+": {
+ id: "GPL-3.0+",
+ },
+ "gpl-3.0-only": {
+ id: "GPL-3.0-only",
+ },
+ "gpl-3.0-or-later": {
+ id: "GPL-3.0-or-later",
+ },
+ "gpl-3.0-with-autoconf-exception": {
+ id: "GPL-3.0-with-autoconf-exception",
+ },
+ "gpl-3.0-with-gcc-exception": {
+ id: "GPL-3.0-with-GCC-exception",
+ },
+ "gsoap-1.3b": {
+ id: "gSOAP-1.3b",
+ },
+ "haskellreport": {
+ id: "HaskellReport",
+ },
+ "hippocratic-2.1": {
+ id: "Hippocratic-2.1",
+ },
+ "hpnd": {
+ id: "HPND",
+ },
+ "hpnd-sell-variant": {
+ id: "HPND-sell-variant",
+ },
+ "htmltidy": {
+ id: "HTMLTIDY",
+ },
+ "ibm-pibs": {
+ id: "IBM-pibs",
+ },
+ "icu": {
+ id: "ICU",
+ },
+ "ijg": {
+ id: "IJG",
+ },
+ "imagemagick": {
+ id: "ImageMagick",
+ },
+ "imatix": {
+ id: "iMatix",
+ },
+ "imlib2": {
+ id: "Imlib2",
+ },
+ "info-zip": {
+ id: "Info-ZIP",
+ },
+ "intel": {
+ id: "Intel",
+ },
+ "intel-acpi": {
+ id: "Intel-ACPI",
+ },
+ "interbase-1.0": {
+ id: "Interbase-1.0",
+ },
+ "ipa": {
+ id: "IPA",
+ },
+ "ipl-1.0": {
+ id: "IPL-1.0",
+ },
+ "isc": {
+ id: "ISC",
+ },
+ "jam": {
+ id: "Jam",
+ },
+ "jasper-2.0": {
+ id: "JasPer-2.0",
+ },
+ "jpnic": {
+ id: "JPNIC",
+ },
+ "json": {
+ id: "JSON",
+ },
+ "lal-1.2": {
+ id: "LAL-1.2",
+ },
+ "lal-1.3": {
+ id: "LAL-1.3",
+ },
+ "latex2e": {
+ id: "Latex2e",
+ },
+ "leptonica": {
+ id: "Leptonica",
+ },
+ "lgpl-2.0": {
+ id: "LGPL-2.0",
+ },
+ "lgpl-2.0+": {
+ id: "LGPL-2.0+",
+ },
+ "lgpl-2.0-only": {
+ id: "LGPL-2.0-only",
+ },
+ "lgpl-2.0-or-later": {
+ id: "LGPL-2.0-or-later",
+ },
+ "lgpl-2.1": {
+ id: "LGPL-2.1",
+ },
+ "lgpl-2.1+": {
+ id: "LGPL-2.1+",
+ },
+ "lgpl-2.1-only": {
+ id: "LGPL-2.1-only",
+ },
+ "lgpl-2.1-or-later": {
+ id: "LGPL-2.1-or-later",
+ },
+ "lgpl-3.0": {
+ id: "LGPL-3.0",
+ },
+ "lgpl-3.0+": {
+ id: "LGPL-3.0+",
+ },
+ "lgpl-3.0-only": {
+ id: "LGPL-3.0-only",
+ },
+ "lgpl-3.0-or-later": {
+ id: "LGPL-3.0-or-later",
+ },
+ "lgpllr": {
+ id: "LGPLLR",
+ },
+ "libpng": {
+ id: "Libpng",
+ },
+ "libpng-2.0": {
+ id: "libpng-2.0",
+ },
+ "libselinux-1.0": {
+ id: "libselinux-1.0",
+ },
+ "libtiff": {
+ id: "libtiff",
+ },
+ "liliq-p-1.1": {
+ id: "LiLiQ-P-1.1",
+ },
+ "liliq-r-1.1": {
+ id: "LiLiQ-R-1.1",
+ },
+ "liliq-rplus-1.1": {
+ id: "LiLiQ-Rplus-1.1",
+ },
+ "linux-man-pages-copyleft": {
+ id: "Linux-man-pages-copyleft",
+ },
+ "linux-openib": {
+ id: "Linux-OpenIB",
+ },
+ "lpl-1.0": {
+ id: "LPL-1.0",
+ },
+ "lpl-1.02": {
+ id: "LPL-1.02",
+ },
+ "lppl-1.0": {
+ id: "LPPL-1.0",
+ },
+ "lppl-1.1": {
+ id: "LPPL-1.1",
+ },
+ "lppl-1.2": {
+ id: "LPPL-1.2",
+ },
+ "lppl-1.3a": {
+ id: "LPPL-1.3a",
+ },
+ "lppl-1.3c": {
+ id: "LPPL-1.3c",
+ },
+ "lzma-sdk-9.11-to-9.20": {
+ id: "LZMA-SDK-9.11-to-9.20",
+ },
+ "lzma-sdk-9.22": {
+ id: "LZMA-SDK-9.22",
+ },
+ "makeindex": {
+ id: "MakeIndex",
+ },
+ "minpack": {
+ id: "Minpack",
+ },
+ "miros": {
+ id: "MirOS",
+ },
+ "mit": {
+ id: "MIT",
+ },
+ "mit-0": {
+ id: "MIT-0",
+ },
+ "mit-advertising": {
+ id: "MIT-advertising",
+ },
+ "mit-cmu": {
+ id: "MIT-CMU",
+ },
+ "mit-enna": {
+ id: "MIT-enna",
+ },
+ "mit-feh": {
+ id: "MIT-feh",
+ },
+ "mit-modern-variant": {
+ id: "MIT-Modern-Variant",
+ },
+ "mit-open-group": {
+ id: "MIT-open-group",
+ },
+ "mitnfa": {
+ id: "MITNFA",
+ },
+ "motosoto": {
+ id: "Motosoto",
+ },
+ "mpi-permissive": {
+ id: "mpi-permissive",
+ },
+ "mpich2": {
+ id: "mpich2",
+ },
+ "mpl-1.0": {
+ id: "MPL-1.0",
+ },
+ "mpl-1.1": {
+ id: "MPL-1.1",
+ },
+ "mpl-2.0": {
+ id: "MPL-2.0",
+ },
+ "mpl-2.0-no-copyleft-exception": {
+ id: "MPL-2.0-no-copyleft-exception",
+ },
+ "mplus": {
+ id: "mplus",
+ },
+ "ms-lpl": {
+ id: "MS-LPL",
+ },
+ "ms-pl": {
+ id: "MS-PL",
+ },
+ "ms-rl": {
+ id: "MS-RL",
+ },
+ "mtll": {
+ id: "MTLL",
+ },
+ "mulanpsl-1.0": {
+ id: "MulanPSL-1.0",
+ },
+ "mulanpsl-2.0": {
+ id: "MulanPSL-2.0",
+ },
+ "multics": {
+ id: "Multics",
+ },
+ "mup": {
+ id: "Mup",
+ },
+ "naist-2003": {
+ id: "NAIST-2003",
+ },
+ "nasa-1.3": {
+ id: "NASA-1.3",
+ },
+ "naumen": {
+ id: "Naumen",
+ },
+ "nbpl-1.0": {
+ id: "NBPL-1.0",
+ },
+ "ncgl-uk-2.0": {
+ id: "NCGL-UK-2.0",
+ },
+ "ncsa": {
+ id: "NCSA",
+ },
+ "net-snmp": {
+ id: "Net-SNMP",
+ },
+ "netcdf": {
+ id: "NetCDF",
+ },
+ "newsletr": {
+ id: "Newsletr",
+ },
+ "ngpl": {
+ id: "NGPL",
+ },
+ "nicta-1.0": {
+ id: "NICTA-1.0",
+ },
+ "nist-pd": {
+ id: "NIST-PD",
+ },
+ "nist-pd-fallback": {
+ id: "NIST-PD-fallback",
+ },
+ "nlod-1.0": {
+ id: "NLOD-1.0",
+ },
+ "nlod-2.0": {
+ id: "NLOD-2.0",
+ },
+ "nlpl": {
+ id: "NLPL",
+ },
+ "nokia": {
+ id: "Nokia",
+ },
+ "nosl": {
+ id: "NOSL",
+ },
+ "noweb": {
+ id: "Noweb",
+ },
+ "npl-1.0": {
+ id: "NPL-1.0",
+ },
+ "npl-1.1": {
+ id: "NPL-1.1",
+ },
+ "nposl-3.0": {
+ id: "NPOSL-3.0",
+ },
+ "nrl": {
+ id: "NRL",
+ },
+ "ntp": {
+ id: "NTP",
+ },
+ "ntp-0": {
+ id: "NTP-0",
+ },
+ "nunit": {
+ id: "Nunit",
+ },
+ "o-uda-1.0": {
+ id: "O-UDA-1.0",
+ },
+ "occt-pl": {
+ id: "OCCT-PL",
+ },
+ "oclc-2.0": {
+ id: "OCLC-2.0",
+ },
+ "odbl-1.0": {
+ id: "ODbL-1.0",
+ },
+ "odc-by-1.0": {
+ id: "ODC-By-1.0",
+ },
+ "ofl-1.0": {
+ id: "OFL-1.0",
+ },
+ "ofl-1.0-no-rfn": {
+ id: "OFL-1.0-no-RFN",
+ },
+ "ofl-1.0-rfn": {
+ id: "OFL-1.0-RFN",
+ },
+ "ofl-1.1": {
+ id: "OFL-1.1",
+ },
+ "ofl-1.1-no-rfn": {
+ id: "OFL-1.1-no-RFN",
+ },
+ "ofl-1.1-rfn": {
+ id: "OFL-1.1-RFN",
+ },
+ "ogc-1.0": {
+ id: "OGC-1.0",
+ },
+ "ogdl-taiwan-1.0": {
+ id: "OGDL-Taiwan-1.0",
+ },
+ "ogl-canada-2.0": {
+ id: "OGL-Canada-2.0",
+ },
+ "ogl-uk-1.0": {
+ id: "OGL-UK-1.0",
+ },
+ "ogl-uk-2.0": {
+ id: "OGL-UK-2.0",
+ },
+ "ogl-uk-3.0": {
+ id: "OGL-UK-3.0",
+ },
+ "ogtsl": {
+ id: "OGTSL",
+ },
+ "oldap-1.1": {
+ id: "OLDAP-1.1",
+ },
+ "oldap-1.2": {
+ id: "OLDAP-1.2",
+ },
+ "oldap-1.3": {
+ id: "OLDAP-1.3",
+ },
+ "oldap-1.4": {
+ id: "OLDAP-1.4",
+ },
+ "oldap-2.0": {
+ id: "OLDAP-2.0",
+ },
+ "oldap-2.0.1": {
+ id: "OLDAP-2.0.1",
+ },
+ "oldap-2.1": {
+ id: "OLDAP-2.1",
+ },
+ "oldap-2.2": {
+ id: "OLDAP-2.2",
+ },
+ "oldap-2.2.1": {
+ id: "OLDAP-2.2.1",
+ },
+ "oldap-2.2.2": {
+ id: "OLDAP-2.2.2",
+ },
+ "oldap-2.3": {
+ id: "OLDAP-2.3",
+ },
+ "oldap-2.4": {
+ id: "OLDAP-2.4",
+ },
+ "oldap-2.5": {
+ id: "OLDAP-2.5",
+ },
+ "oldap-2.6": {
+ id: "OLDAP-2.6",
+ },
+ "oldap-2.7": {
+ id: "OLDAP-2.7",
+ },
+ "oldap-2.8": {
+ id: "OLDAP-2.8",
+ },
+ "oml": {
+ id: "OML",
+ },
+ "openssl": {
+ id: "OpenSSL",
+ },
+ "opl-1.0": {
+ id: "OPL-1.0",
+ },
+ "opubl-1.0": {
+ id: "OPUBL-1.0",
+ },
+ "oset-pl-2.1": {
+ id: "OSET-PL-2.1",
+ },
+ "osl-1.0": {
+ id: "OSL-1.0",
+ },
+ "osl-1.1": {
+ id: "OSL-1.1",
+ },
+ "osl-2.0": {
+ id: "OSL-2.0",
+ },
+ "osl-2.1": {
+ id: "OSL-2.1",
+ },
+ "osl-3.0": {
+ id: "OSL-3.0",
+ },
+ "parity-6.0.0": {
+ id: "Parity-6.0.0",
+ },
+ "parity-7.0.0": {
+ id: "Parity-7.0.0",
+ },
+ "pddl-1.0": {
+ id: "PDDL-1.0",
+ },
+ "php-3.0": {
+ id: "PHP-3.0",
+ },
+ "php-3.01": {
+ id: "PHP-3.01",
+ },
+ "plexus": {
+ id: "Plexus",
+ },
+ "polyform-noncommercial-1.0.0": {
+ id: "PolyForm-Noncommercial-1.0.0",
+ },
+ "polyform-small-business-1.0.0": {
+ id: "PolyForm-Small-Business-1.0.0",
+ },
+ "postgresql": {
+ id: "PostgreSQL",
+ },
+ "psf-2.0": {
+ id: "PSF-2.0",
+ },
+ "psfrag": {
+ id: "psfrag",
+ },
+ "psutils": {
+ id: "psutils",
+ },
+ "python-2.0": {
+ id: "Python-2.0",
+ },
+ "python-2.0.1": {
+ id: "Python-2.0.1",
+ },
+ "qhull": {
+ id: "Qhull",
+ },
+ "qpl-1.0": {
+ id: "QPL-1.0",
+ },
+ "rdisc": {
+ id: "Rdisc",
+ },
+ "rhecos-1.1": {
+ id: "RHeCos-1.1",
+ },
+ "rpl-1.1": {
+ id: "RPL-1.1",
+ },
+ "rpl-1.5": {
+ id: "RPL-1.5",
+ },
+ "rpsl-1.0": {
+ id: "RPSL-1.0",
+ },
+ "rsa-md": {
+ id: "RSA-MD",
+ },
+ "rscpl": {
+ id: "RSCPL",
+ },
+ "ruby": {
+ id: "Ruby",
+ },
+ "sax-pd": {
+ id: "SAX-PD",
+ },
+ "saxpath": {
+ id: "Saxpath",
+ },
+ "scea": {
+ id: "SCEA",
+ },
+ "schemereport": {
+ id: "SchemeReport",
+ },
+ "sendmail": {
+ id: "Sendmail",
+ },
+ "sendmail-8.23": {
+ id: "Sendmail-8.23",
+ },
+ "sgi-b-1.0": {
+ id: "SGI-B-1.0",
+ },
+ "sgi-b-1.1": {
+ id: "SGI-B-1.1",
+ },
+ "sgi-b-2.0": {
+ id: "SGI-B-2.0",
+ },
+ "shl-0.5": {
+ id: "SHL-0.5",
+ },
+ "shl-0.51": {
+ id: "SHL-0.51",
+ },
+ "simpl-2.0": {
+ id: "SimPL-2.0",
+ },
+ "sissl": {
+ id: "SISSL",
+ },
+ "sissl-1.2": {
+ id: "SISSL-1.2",
+ },
+ "sleepycat": {
+ id: "Sleepycat",
+ },
+ "smlnj": {
+ id: "SMLNJ",
+ },
+ "smppl": {
+ id: "SMPPL",
+ },
+ "snia": {
+ id: "SNIA",
+ },
+ "spencer-86": {
+ id: "Spencer-86",
+ },
+ "spencer-94": {
+ id: "Spencer-94",
+ },
+ "spencer-99": {
+ id: "Spencer-99",
+ },
+ "spl-1.0": {
+ id: "SPL-1.0",
+ },
+ "ssh-openssh": {
+ id: "SSH-OpenSSH",
+ },
+ "ssh-short": {
+ id: "SSH-short",
+ },
+ "sspl-1.0": {
+ id: "SSPL-1.0",
+ },
+ "standardml-nj": {
+ id: "StandardML-NJ",
+ },
+ "sugarcrm-1.1.3": {
+ id: "SugarCRM-1.1.3",
+ },
+ "swl": {
+ id: "SWL",
+ },
+ "tapr-ohl-1.0": {
+ id: "TAPR-OHL-1.0",
+ },
+ "tcl": {
+ id: "TCL",
+ },
+ "tcp-wrappers": {
+ id: "TCP-wrappers",
+ },
+ "tmate": {
+ id: "TMate",
+ },
+ "torque-1.1": {
+ id: "TORQUE-1.1",
+ },
+ "tosl": {
+ id: "TOSL",
+ },
+ "tu-berlin-1.0": {
+ id: "TU-Berlin-1.0",
+ },
+ "tu-berlin-2.0": {
+ id: "TU-Berlin-2.0",
+ },
+ "ucl-1.0": {
+ id: "UCL-1.0",
+ },
+ "unicode-dfs-2015": {
+ id: "Unicode-DFS-2015",
+ },
+ "unicode-dfs-2016": {
+ id: "Unicode-DFS-2016",
+ },
+ "unicode-tou": {
+ id: "Unicode-TOU",
+ },
+ "unlicense": {
+ id: "Unlicense",
+ },
+ "upl-1.0": {
+ id: "UPL-1.0",
+ },
+ "vim": {
+ id: "Vim",
+ },
+ "vostrom": {
+ id: "VOSTROM",
+ },
+ "vsl-1.0": {
+ id: "VSL-1.0",
+ },
+ "w3c": {
+ id: "W3C",
+ },
+ "w3c-19980720": {
+ id: "W3C-19980720",
+ },
+ "w3c-20150513": {
+ id: "W3C-20150513",
+ },
+ "watcom-1.0": {
+ id: "Watcom-1.0",
+ },
+ "wsuipa": {
+ id: "Wsuipa",
+ },
+ "wtfpl": {
+ id: "WTFPL",
+ },
+ "wxwindows": {
+ id: "wxWindows",
+ },
+ "x11": {
+ id: "X11",
+ },
+ "x11-distribute-modifications-variant": {
+ id: "X11-distribute-modifications-variant",
+ },
+ "xerox": {
+ id: "Xerox",
+ },
+ "xfree86-1.1": {
+ id: "XFree86-1.1",
+ },
+ "xinetd": {
+ id: "xinetd",
+ },
+ "xnet": {
+ id: "Xnet",
+ },
+ "xpp": {
+ id: "xpp",
+ },
+ "xskat": {
+ id: "XSkat",
+ },
+ "ypl-1.0": {
+ id: "YPL-1.0",
+ },
+ "ypl-1.1": {
+ id: "YPL-1.1",
+ },
+ "zed": {
+ id: "Zed",
+ },
+ "zend-2.0": {
+ id: "Zend-2.0",
+ },
+ "zimbra-1.3": {
+ id: "Zimbra-1.3",
+ },
+ "zimbra-1.4": {
+ id: "Zimbra-1.4",
+ },
+ "zlib": {
+ id: "Zlib",
+ },
+ "zlib-acknowledgement": {
+ id: "zlib-acknowledgement",
+ },
+ "zpl-1.1": {
+ id: "ZPL-1.1",
+ },
+ "zpl-2.0": {
+ id: "ZPL-2.0",
+ },
+ "zpl-2.1": {
+ id: "ZPL-2.1",
+ },
+}
+
+type licenseInfo struct {
+ id string
+}
+
+func (l *licenseInfo) ID() string {
+ return l.id
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/data/dataspdx/usage.gen.go b/vendor/github.com/bufbuild/buf/private/gen/data/dataspdx/usage.gen.go
new file mode 100644
index 000000000..6f916161d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/data/dataspdx/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package dataspdx
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/gen/data/datawkt/datawkt.gen.go b/vendor/github.com/bufbuild/buf/private/gen/data/datawkt/datawkt.gen.go
new file mode 100644
index 000000000..96b6fe46a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/data/datawkt/datawkt.gen.go
@@ -0,0 +1,170 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by wkt-go-data. DO NOT EDIT.
+
+package datawkt
+
+import (
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem"
+)
+
+var (
+ // ReadBucket is the storage.ReadBucket with the static data generated for this package.
+ ReadBucket storage.ReadBucket
+
+ pathToData = map[string][]byte{
+ "google/protobuf/any.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x61, 0x6e, 0x79, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x6e, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x41, 0x6e, 0x79, 0x60, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, 0x79, 0x20, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x61, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x0a, 0x2f, 0x2f, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x73, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x2f, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x41, 0x6e, 0x79, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x74, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x6e, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x31, 0x3a, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x43, 0x2b, 0x2b, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x6f, 0x6f, 0x20, 0x66, 0x6f, 0x6f, 0x20, 0x3d, 0x20, 0x2e, 0x2e, 0x2e, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, 0x6e, 0x79, 0x20, 0x61, 0x6e, 0x79, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6e, 0x79, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x46, 0x72, 0x6f, 0x6d, 0x28, 0x66, 0x6f, 0x6f, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x6e, 0x79, 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x54, 0x6f, 0x28, 0x26, 0x66, 0x6f, 0x6f, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x32, 0x3a, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x6f, 0x6f, 0x20, 0x66, 0x6f, 0x6f, 0x20, 0x3d, 0x20, 0x2e, 0x2e, 0x2e, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x41, 0x6e, 0x79, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x3d, 0x20, 0x41, 0x6e, 0x79, 0x2e, 0x70, 0x61, 0x63, 0x6b, 0x28, 0x66, 0x6f, 0x6f, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x61, 0x6e, 0x79, 0x2e, 0x69, 0x73, 0x28, 0x46, 0x6f, 0x6f, 0x2e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x6f, 0x20, 0x3d, 0x20, 0x61, 0x6e, 0x79, 0x2e, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x28, 0x46, 0x6f, 0x6f, 0x2e, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x33, 0x3a, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x6f, 0x20, 0x3d, 0x20, 0x46, 0x6f, 0x6f, 0x28, 0x2e, 0x2e, 0x2e, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x3d, 0x20, 0x41, 0x6e, 0x79, 0x28, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6e, 0x79, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x28, 0x66, 0x6f, 0x6f, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x2e, 0x49, 0x73, 0x28, 0x46, 0x6f, 0x6f, 0x2e, 0x44, 0x45, 0x53, 0x43, 0x52, 0x49, 0x50, 0x54, 0x4f, 0x52, 0x29, 0x3a, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6e, 0x79, 0x2e, 0x55, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x28, 0x66, 0x6f, 0x6f, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x34, 0x3a, 0x20, 0x50, 0x61, 0x63, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x47, 0x6f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x6f, 0x20, 0x3a, 0x3d, 0x20, 0x26, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x7b, 0x2e, 0x2e, 0x2e, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x6e, 0x79, 0x2c, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3a, 0x3d, 0x20, 0x61, 0x6e, 0x79, 0x70, 0x62, 0x2e, 0x4e, 0x65, 0x77, 0x28, 0x66, 0x6f, 0x6f, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x21, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x6f, 0x6f, 0x20, 0x3a, 0x3d, 0x20, 0x26, 0x70, 0x62, 0x2e, 0x46, 0x6f, 0x6f, 0x7b, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x65, 0x72, 0x72, 0x20, 0x3a, 0x3d, 0x20, 0x61, 0x6e, 0x79, 0x2e, 0x55, 0x6e, 0x6d, 0x61, 0x72, 0x73, 0x68, 0x61, 0x6c, 0x54, 0x6f, 0x28, 0x66, 0x6f, 0x6f, 0x29, 0x3b, 0x20, 0x65, 0x72, 0x72, 0x20, 0x21, 0x3d, 0x20, 0x6e, 0x69, 0x6c, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x20, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x79, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x75, 0x73, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x27, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x66, 0x75, 0x6c, 0x6c, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x27, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x63, 0x6b, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x20, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x27, 0x2f, 0x27, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x2c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x22, 0x66, 0x6f, 0x6f, 0x2e, 0x62, 0x61, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x78, 0x2f, 0x79, 0x2e, 0x7a, 0x22, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x22, 0x79, 0x2e, 0x7a, 0x22, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x60, 0x41, 0x6e, 0x79, 0x60, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x75, 0x73, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x2c, 0x20, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x60, 0x40, 0x74, 0x79, 0x70, 0x65, 0x60, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x2e, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x66, 0x69, 0x72, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x6c, 0x61, 0x73, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x20, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x3e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x69, 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x2d, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x0a, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x65, 0x64, 0x20, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x68, 0x6f, 0x6c, 0x64, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x40, 0x74, 0x79, 0x70, 0x65, 0x60, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x28, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x5b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5b, 0x5d, 0x29, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x40, 0x74, 0x79, 0x70, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x22, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x3a, 0x20, 0x22, 0x31, 0x2e, 0x32, 0x31, 0x32, 0x73, 0x22, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x41, 0x6e, 0x79, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x55, 0x52, 0x4c, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x75, 0x6e, 0x69, 0x71, 0x75, 0x65, 0x6c, 0x79, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x61, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x22, 0x2f, 0x22, 0x20, 0x63, 0x68, 0x61, 0x72, 0x61, 0x63, 0x74, 0x65, 0x72, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x27, 0x73, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x20, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x28, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x60, 0x70, 0x61, 0x74, 0x68, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x60, 0x29, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x61, 0x6e, 0x6f, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x28, 0x65, 0x2e, 0x67, 0x2e, 0x2c, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x22, 0x2e, 0x22, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x65, 0x64, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x20, 0x70, 0x72, 0x61, 0x63, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x65, 0x61, 0x6d, 0x73, 0x20, 0x75, 0x73, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x41, 0x6e, 0x79, 0x2e, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x55, 0x52, 0x4c, 0x73, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x60, 0x68, 0x74, 0x74, 0x70, 0x60, 0x2c, 0x20, 0x60, 0x68, 0x74, 0x74, 0x70, 0x73, 0x60, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2c, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x73, 0x65, 0x74, 0x20, 0x75, 0x70, 0x20, 0x61, 0x20, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x61, 0x70, 0x73, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2a, 0x20, 0x49, 0x66, 0x20, 0x6e, 0x6f, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x2c, 0x20, 0x60, 0x68, 0x74, 0x74, 0x70, 0x73, 0x60, 0x20, 0x69, 0x73, 0x20, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2a, 0x20, 0x41, 0x6e, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x47, 0x45, 0x54, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x79, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x61, 0x20, 0x5b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x5d, 0x5b, 0x5d, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2a, 0x20, 0x41, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x61, 0x63, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x55, 0x52, 0x4c, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x70, 0x72, 0x65, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x61, 0x6e, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x75, 0x70, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x2c, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x6e, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x20, 0x28, 0x55, 0x73, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x2e, 0x29, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x3a, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x66, 0x66, 0x69, 0x63, 0x69, 0x61, 0x6c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x73, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x60, 0x68, 0x74, 0x74, 0x70, 0x60, 0x2c, 0x20, 0x60, 0x68, 0x74, 0x74, 0x70, 0x73, 0x60, 0x20, 0x28, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x29, 0x20, 0x6d, 0x69, 0x67, 0x68, 0x74, 0x20, 0x62, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x7d, 0x0a,
+ },
+ "google/protobuf/api.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x41, 0x70, 0x69, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x61, 0x70, 0x69, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x70, 0x69, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x2d, 0x77, 0x65, 0x69, 0x67, 0x68, 0x74, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x22, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x20, 0x6b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x61, 0x72, 0x65, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x41, 0x50, 0x49, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x72, 0x65, 0x74, 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x73, 0x20, 0x6f, 0x70, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x79, 0x20, 0x61, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x79, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x79, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x73, 0x20, 0x22, 0x41, 0x50, 0x49, 0x73, 0x22, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x73, 0x2c, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x74, 0x73, 0x65, 0x6c, 0x66, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x63, 0x6c, 0x6f, 0x75, 0x64, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x2f, 0x67, 0x6c, 0x6f, 0x73, 0x73, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x6f, 0x6c, 0x6f, 0x67, 0x79, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x41, 0x70, 0x69, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x20, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x27, 0x73, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6e, 0x79, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2c, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x60, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x2d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x2d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x60, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x60, 0x31, 0x2e, 0x31, 0x30, 0x60, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x7a, 0x65, 0x72, 0x6f, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x6f, 0x75, 0x74, 0x6c, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x20, 0x75, 0x73, 0x65, 0x73, 0x20, 0x5b, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x69, 0x6e, 0x67, 0x5d, 0x28, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x73, 0x65, 0x6d, 0x76, 0x65, 0x72, 0x2e, 0x6f, 0x72, 0x67, 0x29, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x20, 0x42, 0x6f, 0x74, 0x68, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x63, 0x61, 0x72, 0x65, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x68, 0x6f, 0x73, 0x65, 0x6e, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x20, 0x70, 0x6c, 0x61, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x60, 0x76, 0x3c, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x2d, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x3e, 0x60, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x60, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x60, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x30, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x31, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x20, 0x63, 0x61, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x2e, 0x20, 0x5a, 0x65, 0x72, 0x6f, 0x20, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x2c, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x47, 0x41, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x5b, 0x4d, 0x69, 0x78, 0x69, 0x6e, 0x5d, 0x5b, 0x5d, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4d, 0x69, 0x78, 0x69, 0x6e, 0x20, 0x6d, 0x69, 0x78, 0x69, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x69, 0x73, 0x20, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x69, 0x73, 0x20, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6e, 0x79, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x2d, 0x20, 0x49, 0x66, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x68, 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x2d, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x20, 0x28, 0x68, 0x74, 0x74, 0x70, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x29, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x65, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x2d, 0x20, 0x49, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x68, 0x74, 0x74, 0x70, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x2e, 0x20, 0x41, 0x6e, 0x79, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x70, 0x6c, 0x75, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x5b, 0x72, 0x6f, 0x6f, 0x74, 0x5d, 0x5b, 0x5d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x69, 0x66, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x6d, 0x69, 0x78, 0x69, 0x6e, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x43, 0x4c, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x70, 0x63, 0x20, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x28, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x41, 0x63, 0x6c, 0x29, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x29, 0x2e, 0x67, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x22, 0x2f, 0x76, 0x31, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x2a, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x22, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x70, 0x63, 0x20, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x28, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x41, 0x63, 0x6c, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x74, 0x20, 0x61, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x70, 0x63, 0x20, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x28, 0x47, 0x65, 0x74, 0x44, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x44, 0x61, 0x74, 0x61, 0x29, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x29, 0x2e, 0x67, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x22, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x2a, 0x2a, 0x7d, 0x22, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x6d, 0x69, 0x78, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x70, 0x69, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, 0x78, 0x69, 0x6e, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6d, 0x69, 0x78, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x60, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x60, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x60, 0x2e, 0x20, 0x41, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x60, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x60, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x43, 0x4c, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x70, 0x63, 0x20, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x28, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x41, 0x63, 0x6c, 0x29, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x29, 0x2e, 0x67, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x22, 0x2f, 0x76, 0x32, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x2a, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x22, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x70, 0x61, 0x74, 0x74, 0x65, 0x72, 0x6e, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x60, 0x76, 0x31, 0x60, 0x20, 0x74, 0x6f, 0x20, 0x60, 0x76, 0x32, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x72, 0x6f, 0x6f, 0x74, 0x60, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x69, 0x78, 0x69, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x61, 0x0a, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x65, 0x64, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x2e, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x70, 0x69, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x73, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x32, 0x2e, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x69, 0x78, 0x69, 0x6e, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x63, 0x6c, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x3a, 0x20, 0x61, 0x63, 0x6c, 0x73, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x65, 0x64, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x6c, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x41, 0x43, 0x4c, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x70, 0x63, 0x20, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x28, 0x47, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x41, 0x63, 0x6c, 0x29, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x29, 0x2e, 0x67, 0x65, 0x74, 0x20, 0x3d, 0x20, 0x22, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x63, 0x6c, 0x73, 0x2f, 0x7b, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x3d, 0x2a, 0x2a, 0x7d, 0x3a, 0x67, 0x65, 0x74, 0x41, 0x63, 0x6c, 0x22, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x2e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4d, 0x69, 0x78, 0x69, 0x6e, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x20, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x68, 0x65, 0x72, 0x69, 0x74, 0x65, 0x64, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x72, 0x65, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x7d, 0x0a,
+ },
+ "google/protobuf/compiler/plugin.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x6b, 0x65, 0x6e, 0x74, 0x6f, 0x6e, 0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x20, 0x28, 0x4b, 0x65, 0x6e, 0x74, 0x6f, 0x6e, 0x20, 0x56, 0x61, 0x72, 0x64, 0x61, 0x29, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x41, 0x52, 0x4e, 0x49, 0x4e, 0x47, 0x3a, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x20, 0x45, 0x58, 0x50, 0x45, 0x52, 0x49, 0x4d, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x73, 0x20, 0x73, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x20, 0x28, 0x61, 0x6b, 0x61, 0x20, 0x74, 0x68, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x29, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x76, 0x69, 0x61, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x2e, 0x20, 0x20, 0x41, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x20, 0x69, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x67, 0x72, 0x61, 0x6d, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x72, 0x65, 0x61, 0x64, 0x73, 0x20, 0x61, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x73, 0x20, 0x61, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x68, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x65, 0x61, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x61, 0x77, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x73, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2d, 0x67, 0x65, 0x6e, 0x2d, 0x24, 0x4e, 0x41, 0x4d, 0x45, 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x20, 0x22, 0x2d, 0x2d, 0x24, 0x7b, 0x4e, 0x41, 0x4d, 0x45, 0x7d, 0x5f, 0x6f, 0x75, 0x74, 0x22, 0x20, 0x69, 0x73, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x0a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x22, 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, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x6d, 0x61, 0x6a, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x6d, 0x69, 0x6e, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x70, 0x61, 0x74, 0x63, 0x68, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2c, 0x20, 0x62, 0x65, 0x74, 0x61, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x63, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x2c, 0x20, 0x65, 0x2e, 0x67, 0x2e, 0x2c, 0x20, 0x22, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2d, 0x31, 0x22, 0x2c, 0x20, 0x22, 0x72, 0x63, 0x32, 0x22, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x6e, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x69, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x27, 0x73, 0x20, 0x73, 0x74, 0x64, 0x69, 0x6e, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x20, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x27, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x2c, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2d, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x5f, 0x74, 0x6f, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x6f, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x2c, 0x20, 0x73, 0x6f, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x73, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x20, 0x69, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x20, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2c, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x74, 0x65, 0x63, 0x68, 0x6e, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x67, 0x75, 0x61, 0x72, 0x61, 0x6e, 0x74, 0x65, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x20, 0x77, 0x69, 0x72, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6f, 0x72, 0x65, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x61, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x61, 0x6e, 0x64, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x62, 0x79, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x72, 0x61, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x72, 0x65, 0x61, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x20, 0x73, 0x65, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x20, 0x61, 0x74, 0x20, 0x6f, 0x6e, 0x63, 0x65, 0x2e, 0x20, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x6c, 0x79, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x27, 0x73, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x69, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x20, 0x61, 0x74, 0x20, 0x6f, 0x6e, 0x63, 0x65, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x73, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x79, 0x70, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x20, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x35, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x20, 0x77, 0x72, 0x69, 0x74, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x74, 0x64, 0x6f, 0x75, 0x74, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x65, 0x78, 0x69, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x7a, 0x65, 0x72, 0x6f, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x69, 0x66, 0x20, 0x69, 0x74, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x77, 0x61, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x70, 0x72, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x20, 0x20, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x20, 0x61, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x6c, 0x65, 0x6d, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x20, 0x69, 0x74, 0x73, 0x65, 0x6c, 0x66, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x75, 0x6e, 0x70, 0x61, 0x72, 0x73, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x77, 0x72, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x74, 0x64, 0x65, 0x72, 0x72, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x78, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x7a, 0x65, 0x72, 0x6f, 0x20, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x62, 0x69, 0x74, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x62, 0x69, 0x74, 0x77, 0x69, 0x73, 0x65, 0x20, 0x22, 0x6f, 0x72, 0x22, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x79, 0x6e, 0x63, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x68, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x46, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x4e, 0x4f, 0x4e, 0x45, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x46, 0x45, 0x41, 0x54, 0x55, 0x52, 0x45, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x22, 0x2e, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x2e, 0x2e, 0x22, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x2c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x61, 0x62, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x65, 0x20, 0x28, 0x73, 0x6f, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x69, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x29, 0x2e, 0x20, 0x20, 0x22, 0x2f, 0x22, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x22, 0x5c, 0x22, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6f, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x73, 0x6d, 0x61, 0x6c, 0x6c, 0x20, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x74, 0x65, 0x78, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x65, 0x64, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x20, 0x73, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x73, 0x69, 0x64, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x6d, 0x65, 0x6d, 0x6f, 0x72, 0x79, 0x20, 0x61, 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x20, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x73, 0x20, 0x6f, 0x66, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x77, 0x72, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x2d, 0x2d, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x72, 0x65, 0x61, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x77, 0x72, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x69, 0x73, 0x6b, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x61, 0x74, 0x20, 0x61, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x62, 0x79, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x40, 0x40, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x28, 0x4e, 0x41, 0x4d, 0x45, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x72, 0x62, 0x69, 0x74, 0x72, 0x61, 0x72, 0x79, 0x20, 0x74, 0x65, 0x78, 0x74, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x69, 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x20, 0x20, 0x4e, 0x41, 0x4d, 0x45, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x20, 0x6e, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x77, 0x68, 0x61, 0x74, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x75, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x2e, 0x20, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6d, 0x6d, 0x65, 0x64, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x28, 0x74, 0x68, 0x75, 0x73, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x61, 0x64, 0x64, 0x65, 0x64, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2d, 0x40, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x69, 0x74, 0x20, 0x75, 0x6e, 0x6c, 0x69, 0x6b, 0x65, 0x6c, 0x79, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x62, 0x79, 0x20, 0x61, 0x63, 0x63, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2e, 0x70, 0x62, 0x2e, 0x68, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x73, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x40, 0x40, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x5f, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x28, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x29, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x75, 0x74, 0x73, 0x69, 0x64, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2e, 0x20, 0x20, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x5f, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x22, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x20, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x77, 0x68, 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x68, 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x61, 0x64, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x2c, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x73, 0x2e, 0x20, 0x20, 0x49, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x69, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x72, 0x75, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x76, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x7c, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x7c, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x7c, 0x6e, 0x61, 0x6d, 0x65, 0x7c, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x35, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x73, 0x65, 0x72, 0x74, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x31, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x35, 0x3b, 0x0a, 0x7d, 0x0a,
+ },
+ "google/protobuf/descriptor.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x3a, 0x20, 0x6b, 0x65, 0x6e, 0x74, 0x6f, 0x6e, 0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x20, 0x28, 0x4b, 0x65, 0x6e, 0x74, 0x6f, 0x6e, 0x20, 0x56, 0x61, 0x72, 0x64, 0x61, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x42, 0x61, 0x73, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x62, 0x79, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x53, 0x61, 0x6e, 0x6a, 0x61, 0x79, 0x20, 0x47, 0x68, 0x65, 0x6d, 0x61, 0x77, 0x61, 0x74, 0x2c, 0x20, 0x4a, 0x65, 0x66, 0x66, 0x20, 0x44, 0x65, 0x61, 0x6e, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x2f, 0x2f, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x65, 0x2e, 0x67, 0x2e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x72, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x74, 0x73, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x29, 0x2e, 0x0a, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x70, 0x65, 0x65, 0x64, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x73, 0x20, 0x64, 0x6f, 0x6e, 0x27, 0x74, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x6f, 0x6f, 0x74, 0x73, 0x74, 0x72, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x53, 0x50, 0x45, 0x45, 0x44, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x61, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x69, 0x74, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x73, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x53, 0x65, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x74, 0x72, 0x65, 0x65, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x2e, 0x67, 0x2e, 0x20, 0x22, 0x66, 0x6f, 0x6f, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x6f, 0x6f, 0x2e, 0x62, 0x61, 0x72, 0x22, 0x2c, 0x20, 0x65, 0x74, 0x63, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x65, 0x61, 0x6b, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x2e, 0x20, 0x44, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x75, 0x73, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x77, 0x65, 0x61, 0x6b, 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x74, 0x6f, 0x70, 0x2d, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x38, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x73, 0x61, 0x66, 0x65, 0x6c, 0x79, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x68, 0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x75, 0x6e, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x62, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x20, 0x3d, 0x20, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x22, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x31, 0x32, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x20, 0x3d, 0x20, 0x38, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x74, 0x61, 0x67, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2e, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x74, 0x61, 0x67, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x70, 0x2e, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x39, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x63, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x39, 0x39, 0x39, 0x3b, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x30, 0x30, 0x30, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x78, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x54, 0x79, 0x70, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x30, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x69, 0x73, 0x20, 0x77, 0x65, 0x69, 0x72, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x68, 0x69, 0x73, 0x74, 0x6f, 0x72, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x5a, 0x69, 0x67, 0x5a, 0x61, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x2e, 0x20, 0x20, 0x4e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x31, 0x30, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x20, 0x20, 0x55, 0x73, 0x65, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x20, 0x69, 0x66, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x6c, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x20, 0x5a, 0x69, 0x67, 0x5a, 0x61, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x2e, 0x20, 0x20, 0x4e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x31, 0x30, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x20, 0x20, 0x55, 0x73, 0x65, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x20, 0x69, 0x66, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x6c, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x20, 0x3d, 0x20, 0x38, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x20, 0x3d, 0x20, 0x39, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x61, 0x67, 0x2d, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2e, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x77, 0x69, 0x72, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x72, 0x65, 0x61, 0x74, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x73, 0x20, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x20, 0x3d, 0x20, 0x31, 0x31, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2d, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x65, 0x77, 0x20, 0x69, 0x6e, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x32, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x20, 0x3d, 0x20, 0x31, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x31, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x20, 0x3d, 0x20, 0x31, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x31, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x31, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x31, 0x37, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x73, 0x65, 0x73, 0x20, 0x5a, 0x69, 0x67, 0x5a, 0x61, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x31, 0x38, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x73, 0x65, 0x73, 0x20, 0x5a, 0x69, 0x67, 0x5a, 0x61, 0x67, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x30, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x69, 0x73, 0x20, 0x73, 0x65, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x74, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x65, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x2c, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x20, 0x6f, 0x72, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x54, 0x79, 0x70, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x27, 0x2e, 0x27, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2d, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x2e, 0x20, 0x20, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x2c, 0x20, 0x43, 0x2b, 0x2b, 0x2d, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x73, 0x63, 0x6f, 0x70, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x72, 0x75, 0x6c, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x28, 0x69, 0x2e, 0x65, 0x2e, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x65, 0x64, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x6f, 0x6e, 0x20, 0x75, 0x70, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x62, 0x65, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x2e, 0x20, 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x6e, 0x6e, 0x65, 0x72, 0x20, 0x61, 0x73, 0x20, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x74, 0x65, 0x78, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x73, 0x2c, 0x20, 0x22, 0x74, 0x72, 0x75, 0x65, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x22, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x74, 0x65, 0x78, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x28, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x77, 0x61, 0x79, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x31, 0x32, 0x38, 0x20, 0x61, 0x72, 0x65, 0x20, 0x65, 0x73, 0x63, 0x61, 0x70, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x73, 0x65, 0x74, 0x2c, 0x20, 0x67, 0x69, 0x76, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x79, 0x70, 0x65, 0x27, 0x73, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x64, 0x65, 0x63, 0x6c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x73, 0x65, 0x74, 0x20, 0x62, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x68, 0x61, 0x73, 0x20, 0x73, 0x65, 0x74, 0x20, 0x61, 0x20, 0x22, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2c, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x2e, 0x20, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x2c, 0x20, 0x69, 0x74, 0x27, 0x73, 0x20, 0x64, 0x65, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x27, 0x73, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x62, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x61, 0x6d, 0x65, 0x6c, 0x43, 0x61, 0x73, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x38, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x20, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x2e, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2c, 0x20, 0x69, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x73, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x73, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x6c, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x69, 0x73, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x22, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x22, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x69, 0x74, 0x73, 0x20, 0x73, 0x6f, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x28, 0x65, 0x61, 0x63, 0x68, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x67, 0x65, 0x74, 0x73, 0x20, 0x69, 0x74, 0x73, 0x20, 0x6f, 0x77, 0x6e, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x29, 0x2e, 0x20, 0x53, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x41, 0x50, 0x49, 0x2e, 0x20, 0x53, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x22, 0x72, 0x65, 0x61, 0x6c, 0x22, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x20, 0x69, 0x74, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x20, 0x6f, 0x66, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x77, 0x72, 0x6f, 0x74, 0x65, 0x20, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x22, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x2d, 0x74, 0x72, 0x69, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x20, 0x77, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x67, 0x69, 0x76, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x2c, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x65, 0x73, 0x70, 0x65, 0x63, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x27, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x65, 0x6c, 0x6c, 0x20, 0x69, 0x66, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x2c, 0x20, 0x73, 0x6f, 0x20, 0x69, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x20, 0x61, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x68, 0x65, 0x74, 0x69, 0x63, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x65, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x6c, 0x61, 0x67, 0x2c, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x60, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x3d, 0x20, 0x31, 0x37, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x61, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x70, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x63, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 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, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x69, 0x63, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x79, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x70, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x75, 0x73, 0x65, 0x64, 0x2e, 0x20, 0x41, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x63, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x61, 0x79, 0x20, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x69, 0x66, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x35, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x69, 0x66, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x73, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x3d, 0x20, 0x36, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x22, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x6c, 0x69, 0x67, 0x68, 0x74, 0x6c, 0x79, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x68, 0x69, 0x6e, 0x74, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6d, 0x61, 0x6e, 0x69, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x73, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2a, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x73, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x79, 0x65, 0x74, 0x20, 0x62, 0x65, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x61, 0x74, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2c, 0x20, 0x73, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x63, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x2e, 0x20, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x69, 0x74, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2a, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x2a, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x20, 0x57, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x77, 0x65, 0x20, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x20, 0x61, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2c, 0x20, 0x61, 0x74, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x6f, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x63, 0x68, 0x6f, 0x73, 0x65, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x20, 0x2a, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x70, 0x65, 0x72, 0x69, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x6c, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x75, 0x73, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x35, 0x30, 0x30, 0x30, 0x30, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x39, 0x39, 0x39, 0x39, 0x39, 0x2e, 0x20, 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x75, 0x70, 0x20, 0x74, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x2a, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x73, 0x68, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x6c, 0x79, 0x20, 0x62, 0x79, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x74, 0x69, 0x65, 0x73, 0x2c, 0x20, 0x65, 0x2d, 0x6d, 0x61, 0x69, 0x6c, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2d, 0x67, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x2d, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x40, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2e, 0x20, 0x53, 0x69, 0x6d, 0x70, 0x6c, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x28, 0x65, 0x2e, 0x67, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x2d, 0x43, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x29, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x77, 0x65, 0x62, 0x73, 0x69, 0x74, 0x65, 0x20, 0x28, 0x69, 0x66, 0x20, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x29, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x27, 0x73, 0x20, 0x6e, 0x6f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x20, 0x68, 0x6f, 0x77, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x2e, 0x20, 0x55, 0x73, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x65, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x62, 0x79, 0x20, 0x70, 0x75, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x75, 0x62, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x23, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x70, 0x6f, 0x70, 0x75, 0x6c, 0x61, 0x72, 0x2c, 0x20, 0x61, 0x20, 0x77, 0x65, 0x62, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x74, 0x20, 0x75, 0x70, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x74, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x2e, 0x20, 0x20, 0x42, 0x79, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6f, 0x66, 0x74, 0x65, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x70, 0x72, 0x69, 0x61, 0x74, 0x65, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x20, 0x64, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x6f, 0x6c, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x61, 0x74, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x28, 0x29, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x6f, 0x70, 0x2d, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x69, 0x73, 0x20, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x38, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x61, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x20, 0x2e, 0x6a, 0x61, 0x76, 0x61, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x74, 0x6f, 0x70, 0x2d, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x75, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x2a, 0x6e, 0x6f, 0x74, 0x2a, 0x20, 0x62, 0x65, 0x20, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x67, 0x65, 0x74, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x28, 0x29, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x61, 0x73, 0x20, 0x77, 0x65, 0x6c, 0x6c, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x70, 0x2d, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 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, 0x20, 0x3d, 0x20, 0x32, 0x30, 0x20, 0x5b, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3d, 0x74, 0x72, 0x75, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x73, 0x65, 0x74, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x32, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x77, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x65, 0x76, 0x65, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x74, 0x74, 0x65, 0x6d, 0x70, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6d, 0x61, 0x64, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x73, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x61, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x79, 0x74, 0x65, 0x20, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x64, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x73, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x55, 0x54, 0x46, 0x2d, 0x38, 0x20, 0x62, 0x79, 0x74, 0x65, 0x20, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x68, 0x61, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x74, 0x65, 0x20, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x5f, 0x75, 0x74, 0x66, 0x38, 0x20, 0x3d, 0x20, 0x32, 0x37, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x70, 0x65, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x73, 0x69, 0x7a, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x53, 0x50, 0x45, 0x45, 0x44, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x74, 0x63, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x4f, 0x44, 0x45, 0x5f, 0x53, 0x49, 0x5a, 0x45, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x73, 0x65, 0x20, 0x52, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x4f, 0x70, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x49, 0x54, 0x45, 0x5f, 0x52, 0x55, 0x4e, 0x54, 0x49, 0x4d, 0x45, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4c, 0x69, 0x74, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x74, 0x65, 0x20, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x4d, 0x6f, 0x64, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6d, 0x69, 0x7a, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x39, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x53, 0x50, 0x45, 0x45, 0x44, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x74, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x6f, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x64, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x6f, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x47, 0x6f, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x3a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x54, 0x68, 0x65, 0x20, 0x62, 0x61, 0x73, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x70, 0x61, 0x74, 0x68, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x73, 0x74, 0x61, 0x74, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2d, 0x20, 0x4f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x61, 0x73, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x31, 0x3b, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x62, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x3f, 0x20, 0x20, 0x22, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x22, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x52, 0x50, 0x43, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x79, 0x20, 0x61, 0x72, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x20, 0x28, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x66, 0x61, 0x76, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x74, 0x6f, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x52, 0x50, 0x43, 0x20, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x2e, 0x20, 0x20, 0x4f, 0x6c, 0x64, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x20, 0x73, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x72, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x63, 0x63, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x36, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x37, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x70, 0x79, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x38, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x70, 0x68, 0x70, 0x5f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x34, 0x32, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x65, 0x6d, 0x69, 0x74, 0x20, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x76, 0x65, 0x72, 0x79, 0x74, 0x68, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3b, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x32, 0x33, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x43, 0x2b, 0x2b, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x33, 0x31, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x74, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x63, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x76, 0x65, 0x20, 0x63, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x33, 0x36, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x3b, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x33, 0x37, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x42, 0x79, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x53, 0x77, 0x69, 0x66, 0x74, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x74, 0x61, 0x6b, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x43, 0x61, 0x6d, 0x65, 0x6c, 0x43, 0x61, 0x73, 0x65, 0x20, 0x69, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x70, 0x6c, 0x61, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x27, 0x2e, 0x27, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x63, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x2e, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2f, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x77, 0x69, 0x66, 0x74, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x33, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x74, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x68, 0x70, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x70, 0x68, 0x70, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x68, 0x70, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x34, 0x30, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x68, 0x70, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x2e, 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x68, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x68, 0x70, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x68, 0x70, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x34, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x72, 0x75, 0x62, 0x79, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x65, 0x73, 0x2e, 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x65, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x75, 0x62, 0x79, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x75, 0x62, 0x79, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x35, 0x3b, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x39, 0x39, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x73, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x30, 0x30, 0x30, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x78, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x33, 0x38, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x74, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x6c, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x31, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x20, 0x77, 0x69, 0x72, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x73, 0x2d, 0x63, 0x6f, 0x6d, 0x70, 0x61, 0x74, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x20, 0x77, 0x69, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x20, 0x20, 0x59, 0x6f, 0x75, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x3a, 0x20, 0x20, 0x49, 0x74, 0x27, 0x73, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x68, 0x61, 0x73, 0x20, 0x66, 0x65, 0x77, 0x65, 0x72, 0x20, 0x66, 0x65, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x73, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x65, 0x78, 0x61, 0x63, 0x74, 0x6c, 0x79, 0x20, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x6f, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x34, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x78, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x3b, 0x20, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x65, 0x74, 0x73, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x3b, 0x20, 0x65, 0x2e, 0x67, 0x2e, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x63, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x73, 0x2c, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x42, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x74, 0x77, 0x6f, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x65, 0x6e, 0x66, 0x6f, 0x72, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x65, 0x74, 0x5f, 0x77, 0x69, 0x72, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x28, 0x29, 0x22, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x61, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x66, 0x6c, 0x69, 0x63, 0x74, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x6b, 0x65, 0x20, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x31, 0x20, 0x65, 0x61, 0x73, 0x69, 0x65, 0x72, 0x3b, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x64, 0x20, 0x22, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x22, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 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, 0x20, 0x3d, 0x20, 0x32, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x65, 0x6d, 0x69, 0x74, 0x20, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3b, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x33, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x34, 0x2c, 0x20, 0x35, 0x2c, 0x20, 0x36, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x57, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x75, 0x74, 0x6f, 0x6d, 0x61, 0x74, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6d, 0x61, 0x70, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6d, 0x61, 0x70, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x6d, 0x61, 0x70, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x3a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x70, 0x3c, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x2c, 0x20, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x3e, 0x20, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x73, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x3a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x4b, 0x65, 0x79, 0x54, 0x79, 0x70, 0x65, 0x20, 0x6b, 0x65, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x54, 0x79, 0x70, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4d, 0x61, 0x70, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x6d, 0x61, 0x70, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x3d, 0x74, 0x72, 0x75, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x6d, 0x61, 0x70, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x68, 0x6f, 0x6c, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6b, 0x65, 0x79, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x66, 0x6c, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x41, 0x50, 0x49, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x75, 0x63, 0x68, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x77, 0x6f, 0x72, 0x6b, 0x20, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x4f, 0x54, 0x45, 0x3a, 0x20, 0x44, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x73, 0x65, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x20, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x70, 0x73, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x20, 0x73, 0x65, 0x74, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x38, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x6c, 0x69, 0x74, 0x65, 0x5f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x62, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x39, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x6e, 0x61, 0x6e, 0x6f, 0x5f, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x39, 0x39, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x30, 0x30, 0x30, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x78, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x63, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x43, 0x2b, 0x2b, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x6e, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x2e, 0x20, 0x20, 0x53, 0x65, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x79, 0x65, 0x74, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x65, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x2d, 0x2d, 0x20, 0x73, 0x6f, 0x72, 0x72, 0x79, 0x2c, 0x20, 0x77, 0x65, 0x27, 0x6c, 0x6c, 0x20, 0x74, 0x72, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x20, 0x69, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x20, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x21, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x43, 0x54, 0x79, 0x70, 0x65, 0x20, 0x63, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x43, 0x54, 0x79, 0x70, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x6d, 0x6f, 0x64, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x4f, 0x52, 0x44, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x5f, 0x50, 0x49, 0x45, 0x43, 0x45, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x69, 0x72, 0x65, 0x2e, 0x20, 0x52, 0x61, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x6c, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x77, 0x72, 0x69, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x67, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x2d, 0x64, 0x65, 0x6c, 0x69, 0x6d, 0x69, 0x74, 0x65, 0x64, 0x20, 0x62, 0x6c, 0x6f, 0x62, 0x2e, 0x20, 0x49, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x2c, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x74, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x65, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x36, 0x34, 0x20, 0x62, 0x69, 0x74, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x67, 0x72, 0x61, 0x6c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x69, 0x78, 0x65, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x28, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2c, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2c, 0x20, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2c, 0x20, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2c, 0x20, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x29, 0x2e, 0x20, 0x20, 0x41, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x20, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x73, 0x20, 0x6c, 0x6f, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x70, 0x72, 0x65, 0x63, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x68, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x20, 0x6c, 0x61, 0x72, 0x67, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x20, 0x63, 0x61, 0x75, 0x73, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x22, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x22, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x61, 0x64, 0x64, 0x65, 0x64, 0x2c, 0x20, 0x65, 0x2e, 0x67, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x2e, 0x6d, 0x61, 0x74, 0x68, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x67, 0x65, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x20, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x36, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x4a, 0x53, 0x54, 0x79, 0x70, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x4a, 0x53, 0x5f, 0x4e, 0x4f, 0x52, 0x4d, 0x41, 0x4c, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x73, 0x65, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x4a, 0x53, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x73, 0x65, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x4a, 0x53, 0x5f, 0x4e, 0x55, 0x4d, 0x42, 0x45, 0x52, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x6c, 0x61, 0x7a, 0x69, 0x6c, 0x79, 0x3f, 0x20, 0x20, 0x4c, 0x61, 0x7a, 0x79, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2d, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x20, 0x20, 0x49, 0x74, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x27, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x62, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x61, 0x63, 0x74, 0x75, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x61, 0x20, 0x68, 0x69, 0x6e, 0x74, 0x2e, 0x20, 0x20, 0x49, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x66, 0x72, 0x65, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x61, 0x67, 0x65, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x61, 0x7a, 0x79, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x20, 0x48, 0x6f, 0x77, 0x65, 0x76, 0x65, 0x72, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x73, 0x75, 0x67, 0x67, 0x65, 0x73, 0x74, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x20, 0x62, 0x65, 0x6c, 0x69, 0x65, 0x76, 0x65, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x61, 0x7a, 0x79, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x77, 0x6f, 0x72, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6b, 0x6b, 0x65, 0x65, 0x70, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x68, 0x65, 0x61, 0x64, 0x20, 0x74, 0x79, 0x70, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x75, 0x62, 0x6c, 0x69, 0x63, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x73, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x20, 0x46, 0x75, 0x72, 0x74, 0x68, 0x65, 0x72, 0x6d, 0x6f, 0x72, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x2d, 0x73, 0x61, 0x66, 0x65, 0x74, 0x79, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x66, 0x61, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x66, 0x66, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x73, 0x61, 0x66, 0x65, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x72, 0x65, 0x61, 0x64, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x6c, 0x79, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x69, 0x6e, 0x75, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x20, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x20, 0x6c, 0x61, 0x7a, 0x79, 0x20, 0x73, 0x75, 0x62, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x2c, 0x20, 0x63, 0x61, 0x6c, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x49, 0x73, 0x49, 0x6e, 0x69, 0x74, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x64, 0x28, 0x29, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x65, 0x76, 0x65, 0x6e, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x68, 0x61, 0x73, 0x20, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x79, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x6e, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x77, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x2c, 0x20, 0x64, 0x65, 0x66, 0x65, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x75, 0x72, 0x70, 0x6f, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x6c, 0x61, 0x7a, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x2e, 0x20, 0x20, 0x41, 0x6e, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x69, 0x74, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x2c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x73, 0x75, 0x62, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x2a, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x2a, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x69, 0x74, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x2a, 0x6e, 0x65, 0x76, 0x65, 0x72, 0x2a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x20, 0x69, 0x74, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2c, 0x20, 0x72, 0x65, 0x67, 0x61, 0x72, 0x64, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x77, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x68, 0x61, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x32, 0x30, 0x32, 0x31, 0x2c, 0x20, 0x6c, 0x61, 0x7a, 0x79, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x79, 0x74, 0x65, 0x20, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x20, 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x72, 0x61, 0x73, 0x68, 0x65, 0x73, 0x20, 0x69, 0x66, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x20, 0x62, 0x79, 0x74, 0x65, 0x20, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x20, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x6e, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x64, 0x20, 0x75, 0x70, 0x6f, 0x6e, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x4f, 0x44, 0x4f, 0x28, 0x62, 0x2f, 0x32, 0x31, 0x31, 0x39, 0x30, 0x36, 0x31, 0x31, 0x33, 0x29, 0x3a, 0x20, 0x20, 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x20, 0x6c, 0x61, 0x7a, 0x79, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x6c, 0x61, 0x7a, 0x79, 0x20, 0x3d, 0x20, 0x35, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x63, 0x74, 0x6e, 0x65, 0x73, 0x73, 0x20, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x79, 0x74, 0x65, 0x20, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x6c, 0x61, 0x7a, 0x79, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x68, 0x69, 0x62, 0x69, 0x74, 0x69, 0x76, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x65, 0x72, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6e, 0x63, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x75, 0x6e, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65, 0x64, 0x5f, 0x6c, 0x61, 0x7a, 0x79, 0x20, 0x3d, 0x20, 0x31, 0x35, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x65, 0x6d, 0x69, 0x74, 0x20, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x6f, 0x72, 0x73, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3b, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x33, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2d, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x6d, 0x69, 0x67, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x2e, 0x20, 0x44, 0x6f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x75, 0x73, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x77, 0x65, 0x61, 0x6b, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x39, 0x39, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x30, 0x30, 0x30, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x78, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x34, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x20, 0x6a, 0x74, 0x79, 0x70, 0x65, 0x0a, 0x7d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x39, 0x39, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x30, 0x30, 0x30, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x78, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x65, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x20, 0x6d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x61, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x65, 0x6d, 0x69, 0x74, 0x20, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3b, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x33, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x35, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x6e, 0x61, 0x6e, 0x6f, 0x5f, 0x61, 0x73, 0x5f, 0x6c, 0x69, 0x74, 0x65, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x39, 0x39, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x30, 0x30, 0x30, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x78, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x65, 0x6d, 0x69, 0x74, 0x20, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3b, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x31, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x39, 0x39, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x30, 0x30, 0x30, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x78, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x3a, 0x20, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x31, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x33, 0x32, 0x20, 0x61, 0x72, 0x65, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x52, 0x50, 0x43, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x20, 0x20, 0x57, 0x65, 0x20, 0x61, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x7a, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x68, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x6c, 0x76, 0x65, 0x73, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x77, 0x65, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x77, 0x65, 0x20, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x65, 0x6d, 0x69, 0x74, 0x20, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3b, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x33, 0x33, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x39, 0x39, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x30, 0x30, 0x30, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x78, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x7b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x3a, 0x20, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x31, 0x20, 0x74, 0x68, 0x72, 0x6f, 0x75, 0x67, 0x68, 0x20, 0x33, 0x32, 0x20, 0x61, 0x72, 0x65, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x20, 0x52, 0x50, 0x43, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x77, 0x6f, 0x72, 0x6b, 0x2e, 0x20, 0x20, 0x57, 0x65, 0x20, 0x61, 0x70, 0x6f, 0x6c, 0x6f, 0x67, 0x69, 0x7a, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x68, 0x6f, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x75, 0x72, 0x73, 0x65, 0x6c, 0x76, 0x65, 0x73, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x77, 0x65, 0x20, 0x77, 0x65, 0x72, 0x65, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x77, 0x65, 0x20, 0x64, 0x65, 0x63, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x61, 0x73, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2e, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x70, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x65, 0x6d, 0x69, 0x74, 0x20, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x3b, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x65, 0x72, 0x79, 0x20, 0x6c, 0x65, 0x61, 0x73, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x6c, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x33, 0x33, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x73, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x73, 0x69, 0x64, 0x65, 0x2d, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x2d, 0x66, 0x72, 0x65, 0x65, 0x20, 0x28, 0x6f, 0x72, 0x20, 0x73, 0x61, 0x66, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x70, 0x61, 0x72, 0x6c, 0x61, 0x6e, 0x63, 0x65, 0x29, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x3f, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x52, 0x50, 0x43, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x68, 0x6f, 0x6f, 0x73, 0x65, 0x20, 0x47, 0x45, 0x54, 0x20, 0x76, 0x65, 0x72, 0x62, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x73, 0x61, 0x66, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x50, 0x55, 0x54, 0x20, 0x76, 0x65, 0x72, 0x62, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x50, 0x4f, 0x53, 0x54, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x4e, 0x4f, 0x5f, 0x53, 0x49, 0x44, 0x45, 0x5f, 0x45, 0x46, 0x46, 0x45, 0x43, 0x54, 0x53, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x54, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x73, 0x69, 0x64, 0x65, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x73, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x49, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x3d, 0x20, 0x33, 0x34, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5b, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x49, 0x44, 0x45, 0x4d, 0x50, 0x4f, 0x54, 0x45, 0x4e, 0x43, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x20, 0x68, 0x65, 0x72, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x39, 0x39, 0x39, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x53, 0x65, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x31, 0x30, 0x30, 0x30, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x61, 0x78, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x20, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x3a, 0x3a, 0x50, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x6f, 0x6f, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x72, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x20, 0x28, 0x65, 0x2e, 0x67, 0x2e, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x28, 0x29, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x3a, 0x3a, 0x43, 0x6f, 0x70, 0x79, 0x54, 0x6f, 0x28, 0x29, 0x29, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6e, 0x65, 0x76, 0x65, 0x72, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x6d, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x55, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x20, 0x64, 0x6f, 0x74, 0x2d, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x20, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x74, 0x72, 0x75, 0x65, 0x20, 0x69, 0x66, 0x66, 0x20, 0x61, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x64, 0x65, 0x6e, 0x6f, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x68, 0x65, 0x73, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x73, 0x70, 0x65, 0x63, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x2e, 0x67, 0x2e, 0x2c, 0x7b, 0x20, 0x5b, 0x22, 0x66, 0x6f, 0x6f, 0x22, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x2c, 0x20, 0x5b, 0x22, 0x62, 0x61, 0x72, 0x2e, 0x62, 0x61, 0x7a, 0x22, 0x2c, 0x20, 0x74, 0x72, 0x75, 0x65, 0x5d, 0x2c, 0x20, 0x5b, 0x22, 0x6d, 0x6f, 0x6f, 0x22, 0x2c, 0x20, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x5d, 0x20, 0x7d, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x22, 0x66, 0x6f, 0x6f, 0x2e, 0x28, 0x62, 0x61, 0x72, 0x2e, 0x62, 0x61, 0x7a, 0x29, 0x2e, 0x6d, 0x6f, 0x6f, 0x22, 0x2e, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x5f, 0x70, 0x61, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x69, 0x73, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4e, 0x61, 0x6d, 0x65, 0x50, 0x61, 0x72, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x6e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x65, 0x64, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x68, 0x61, 0x74, 0x65, 0x76, 0x65, 0x72, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x69, 0x7a, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x69, 0x74, 0x20, 0x61, 0x73, 0x20, 0x64, 0x75, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61, 0x72, 0x73, 0x69, 0x6e, 0x67, 0x2e, 0x20, 0x45, 0x78, 0x61, 0x63, 0x74, 0x6c, 0x79, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x20, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x5f, 0x69, 0x6e, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x20, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x38, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x3d, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x6e, 0x63, 0x61, 0x70, 0x73, 0x75, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x61, 0x0a, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x77, 0x61, 0x73, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x61, 0x20, 0x70, 0x69, 0x65, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x49, 0x44, 0x45, 0x73, 0x2c, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x65, 0x72, 0x73, 0x2c, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x69, 0x6d, 0x69, 0x6c, 0x61, 0x72, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x6f, 0x6c, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x73, 0x61, 0x79, 0x20, 0x77, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x3a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x6f, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x6f, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4c, 0x65, 0x74, 0x27, 0x73, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x20, 0x61, 0x74, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x6f, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x5e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5e, 0x5e, 0x20, 0x20, 0x20, 0x20, 0x20, 0x5e, 0x5e, 0x20, 0x20, 0x5e, 0x20, 0x20, 0x5e, 0x5e, 0x5e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x61, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x63, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x65, 0x20, 0x20, 0x66, 0x20, 0x20, 0x67, 0x68, 0x69, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x57, 0x65, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x5b, 0x61, 0x2c, 0x69, 0x29, 0x20, 0x20, 0x5b, 0x20, 0x34, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x30, 0x20, 0x5d, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x77, 0x68, 0x6f, 0x6c, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x5b, 0x61, 0x2c, 0x62, 0x29, 0x20, 0x20, 0x5b, 0x20, 0x34, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x34, 0x20, 0x5d, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x28, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x5b, 0x63, 0x2c, 0x64, 0x29, 0x20, 0x20, 0x5b, 0x20, 0x34, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x35, 0x20, 0x5d, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x28, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x5b, 0x65, 0x2c, 0x66, 0x29, 0x20, 0x20, 0x5b, 0x20, 0x34, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x31, 0x20, 0x5d, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x28, 0x66, 0x6f, 0x6f, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x5b, 0x67, 0x2c, 0x68, 0x29, 0x20, 0x20, 0x5b, 0x20, 0x34, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x30, 0x2c, 0x20, 0x33, 0x20, 0x5d, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x28, 0x31, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x73, 0x3a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2d, 0x20, 0x41, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x74, 0x73, 0x65, 0x6c, 0x66, 0x20, 0x28, 0x69, 0x2e, 0x65, 0x2e, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x79, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x70, 0x61, 0x72, 0x74, 0x69, 0x63, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x69, 0x74, 0x29, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x65, 0x76, 0x65, 0x72, 0x20, 0x61, 0x20, 0x73, 0x65, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x65, 0x6e, 0x63, 0x6c, 0x6f, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x73, 0x65, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x20, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6e, 0x74, 0x69, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x28, 0x70, 0x6f, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x29, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2d, 0x20, 0x4d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x68, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x73, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x67, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x73, 0x70, 0x72, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x20, 0x61, 0x63, 0x72, 0x6f, 0x73, 0x73, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6d, 0x6f, 0x73, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x62, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x22, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x61, 0x67, 0x61, 0x69, 0x6e, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x73, 0x63, 0x6f, 0x70, 0x65, 0x2c, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2d, 0x20, 0x41, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x73, 0x20, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x61, 0x20, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x20, 0x70, 0x61, 0x72, 0x65, 0x6e, 0x74, 0x27, 0x73, 0x20, 0x73, 0x70, 0x61, 0x6e, 0x2e, 0x20, 0x20, 0x46, 0x6f, 0x72, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x22, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x73, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x22, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x22, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x73, 0x20, 0x73, 0x68, 0x61, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2d, 0x20, 0x4a, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x61, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x73, 0x20, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x73, 0x20, 0x73, 0x70, 0x61, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x64, 0x65, 0x73, 0x63, 0x65, 0x6e, 0x64, 0x61, 0x6e, 0x74, 0x2e, 0x20, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x61, 0x20, 0x22, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x22, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x61, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x75, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6f, 0x6e, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x6c, 0x61, 0x70, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x2d, 0x20, 0x43, 0x6f, 0x64, 0x65, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x74, 0x72, 0x69, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x62, 0x61, 0x62, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x20, 0x64, 0x65, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x6e, 0x27, 0x74, 0x20, 0x75, 0x6e, 0x64, 0x65, 0x72, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x2c, 0x20, 0x61, 0x73, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x63, 0x6f, 0x75, 0x6c, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x74, 0x75, 0x72, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x70, 0x61, 0x72, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x77, 0x61, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x69, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x2e, 0x20, 0x20, 0x54, 0x68, 0x65, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x61, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x63, 0x63, 0x75, 0x72, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x70, 0x61, 0x74, 0x68, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x5b, 0x20, 0x34, 0x2c, 0x20, 0x33, 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x37, 0x2c, 0x20, 0x31, 0x20, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x28, 0x33, 0x29, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x34, 0x2c, 0x20, 0x33, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x28, 0x37, 0x29, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x32, 0x2c, 0x20, 0x37, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x28, 0x29, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x31, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x46, 0x69, 0x6c, 0x65, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x68, 0x61, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x34, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x68, 0x61, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x32, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x68, 0x61, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x31, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x75, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x67, 0x69, 0x76, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x20, 0x49, 0x66, 0x20, 0x77, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x5b, 0x20, 0x34, 0x2c, 0x20, 0x33, 0x2c, 0x20, 0x32, 0x2c, 0x20, 0x37, 0x20, 0x5d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x77, 0x68, 0x6f, 0x6c, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x28, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x72, 0x6d, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x65, 0x6d, 0x69, 0x63, 0x6f, 0x6c, 0x6f, 0x6e, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x31, 0x20, 0x5b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x68, 0x61, 0x73, 0x20, 0x65, 0x78, 0x61, 0x63, 0x74, 0x6c, 0x79, 0x20, 0x74, 0x68, 0x72, 0x65, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x66, 0x6f, 0x75, 0x72, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x3a, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x2c, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x28, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2c, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x77, 0x69, 0x73, 0x65, 0x20, 0x61, 0x73, 0x73, 0x75, 0x6d, 0x65, 0x64, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x73, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x29, 0x2c, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x66, 0x66, 0x69, 0x63, 0x69, 0x65, 0x6e, 0x63, 0x79, 0x2e, 0x20, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x7a, 0x65, 0x72, 0x6f, 0x2d, 0x62, 0x61, 0x73, 0x65, 0x64, 0x20, 0x2d, 0x2d, 0x20, 0x74, 0x79, 0x70, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x77, 0x61, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x64, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x31, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x3d, 0x20, 0x32, 0x20, 0x5b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x79, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x66, 0x74, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x73, 0x65, 0x72, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x74, 0x69, 0x76, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6e, 0x6f, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x74, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 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, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6b, 0x65, 0x65, 0x70, 0x20, 0x70, 0x61, 0x72, 0x61, 0x67, 0x72, 0x61, 0x70, 0x68, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x28, 0x62, 0x75, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x29, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x20, 0x45, 0x61, 0x63, 0x68, 0x20, 0x70, 0x61, 0x72, 0x61, 0x67, 0x72, 0x61, 0x70, 0x68, 0x2c, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4f, 0x6e, 0x6c, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x3b, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x73, 0x20, 0x28, 0x65, 0x2e, 0x67, 0x2e, 0x20, 0x2f, 0x2f, 0x29, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x74, 0x72, 0x69, 0x70, 0x70, 0x65, 0x64, 0x20, 0x6f, 0x75, 0x74, 0x2e, 0x20, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2c, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x69, 0x74, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x6e, 0x20, 0x61, 0x73, 0x74, 0x65, 0x72, 0x69, 0x73, 0x6b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x70, 0x70, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x68, 0x65, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x65, 0x77, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x3a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x66, 0x6f, 0x6f, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x66, 0x6f, 0x6f, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x61, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x62, 0x61, 0x72, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x62, 0x61, 0x7a, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x61, 0x7a, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x61, 0x7a, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x6f, 0x6f, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6e, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x6f, 0x6f, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x20, 0x6d, 0x6f, 0x6f, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x72, 0x67, 0x65, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x20, 0x6d, 0x6f, 0x6f, 0x20, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x72, 0x67, 0x65, 0x20, 0x62, 0x65, 0x63, 0x61, 0x75, 0x73, 0x65, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x62, 0x6c, 0x61, 0x6e, 0x6b, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x73, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x74, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x63, 0x6f, 0x72, 0x67, 0x65, 0x20, 0x70, 0x61, 0x72, 0x61, 0x67, 0x72, 0x61, 0x70, 0x68, 0x20, 0x32, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x72, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2a, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x74, 0x6f, 0x20, 0x63, 0x6f, 0x72, 0x67, 0x65, 0x2e, 0x20, 0x20, 0x4c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x73, 0x74, 0x65, 0x72, 0x69, 0x73, 0x6b, 0x73, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x64, 0x2e, 0x20, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2a, 0x20, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x67, 0x72, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x20, 0x2a, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x67, 0x72, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x64, 0x65, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x65, 0x61, 0x64, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 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, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x74, 0x73, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x20, 0x41, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x6e, 0x20, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x73, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x65, 0x78, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x41, 0x6e, 0x6e, 0x6f, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x2e, 0x20, 0x54, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x61, 0x73, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x61, 0x74, 0x68, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x3d, 0x20, 0x31, 0x20, 0x5b, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x5d, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x49, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x64, 0x65, 0x6e, 0x74, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x70, 0x61, 0x73, 0x74, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x72, 0x65, 0x6c, 0x65, 0x76, 0x61, 0x6e, 0x74, 0x20, 0x62, 0x79, 0x74, 0x65, 0x20, 0x28, 0x73, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x65, 0x78, 0x74, 0x20, 0x3d, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x2d, 0x20, 0x62, 0x65, 0x67, 0x69, 0x6e, 0x29, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a,
+ },
+ "google/protobuf/duration.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x2c, 0x20, 0x66, 0x69, 0x78, 0x65, 0x64, 0x2d, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x20, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x61, 0x74, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x63, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x63, 0x6f, 0x6e, 0x63, 0x65, 0x70, 0x74, 0x73, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x22, 0x64, 0x61, 0x79, 0x22, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x72, 0x20, 0x22, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x22, 0x2e, 0x20, 0x49, 0x74, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x69, 0x66, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x77, 0x6f, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x74, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x61, 0x64, 0x64, 0x65, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x73, 0x75, 0x62, 0x74, 0x72, 0x61, 0x63, 0x74, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x61, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x20, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x70, 0x70, 0x72, 0x6f, 0x78, 0x69, 0x6d, 0x61, 0x74, 0x65, 0x6c, 0x79, 0x20, 0x2b, 0x2d, 0x31, 0x30, 0x2c, 0x30, 0x30, 0x30, 0x20, 0x79, 0x65, 0x61, 0x72, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x31, 0x3a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x74, 0x77, 0x6f, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x73, 0x65, 0x75, 0x64, 0x6f, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x2e, 0x2e, 0x2e, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x2e, 0x2e, 0x2e, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x2e, 0x2e, 0x2e, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x65, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x65, 0x6e, 0x64, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x2d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x3c, 0x20, 0x30, 0x20, 0x26, 0x26, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x3e, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x2b, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x2d, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x3e, 0x20, 0x30, 0x20, 0x26, 0x26, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x3c, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x2d, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x2b, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x32, 0x3a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x2b, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x73, 0x65, 0x75, 0x64, 0x6f, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x20, 0x3d, 0x20, 0x2e, 0x2e, 0x2e, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x2e, 0x2e, 0x2e, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x65, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x2e, 0x2e, 0x2e, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x2b, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x73, 0x74, 0x61, 0x72, 0x74, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x2b, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x65, 0x6e, 0x64, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x3c, 0x20, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x2d, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x2b, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x20, 0x65, 0x6c, 0x73, 0x65, 0x20, 0x69, 0x66, 0x20, 0x28, 0x65, 0x6e, 0x64, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x3e, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x29, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2e, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x2b, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x65, 0x6e, 0x64, 0x2e, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x2d, 0x3d, 0x20, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x33, 0x3a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x20, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x64, 0x20, 0x3d, 0x20, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x74, 0x69, 0x6d, 0x65, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x28, 0x64, 0x61, 0x79, 0x73, 0x3d, 0x33, 0x2c, 0x20, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x3d, 0x31, 0x30, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x28, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x46, 0x72, 0x6f, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x64, 0x65, 0x6c, 0x74, 0x61, 0x28, 0x74, 0x64, 0x29, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x61, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x61, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2c, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x20, 0x22, 0x73, 0x22, 0x20, 0x28, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x29, 0x20, 0x61, 0x6e, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x70, 0x72, 0x65, 0x63, 0x65, 0x64, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x61, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x33, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x30, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x61, 0x73, 0x20, 0x22, 0x33, 0x73, 0x22, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x33, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x31, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x61, 0x73, 0x20, 0x22, 0x33, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x73, 0x22, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x33, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x31, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x61, 0x73, 0x20, 0x22, 0x33, 0x2e, 0x30, 0x30, 0x30, 0x30, 0x30, 0x31, 0x73, 0x22, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x61, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x20, 0x4d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x2d, 0x33, 0x31, 0x35, 0x2c, 0x35, 0x37, 0x36, 0x2c, 0x30, 0x30, 0x30, 0x2c, 0x30, 0x30, 0x30, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x20, 0x2b, 0x33, 0x31, 0x35, 0x2c, 0x35, 0x37, 0x36, 0x2c, 0x30, 0x30, 0x30, 0x2c, 0x30, 0x30, 0x30, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x3a, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x20, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x3a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x36, 0x30, 0x20, 0x73, 0x65, 0x63, 0x2f, 0x6d, 0x69, 0x6e, 0x20, 0x2a, 0x20, 0x36, 0x30, 0x20, 0x6d, 0x69, 0x6e, 0x2f, 0x68, 0x72, 0x20, 0x2a, 0x20, 0x32, 0x34, 0x20, 0x68, 0x72, 0x2f, 0x64, 0x61, 0x79, 0x20, 0x2a, 0x20, 0x33, 0x36, 0x35, 0x2e, 0x32, 0x35, 0x20, 0x64, 0x61, 0x79, 0x73, 0x2f, 0x79, 0x65, 0x61, 0x72, 0x20, 0x2a, 0x20, 0x31, 0x30, 0x30, 0x30, 0x30, 0x20, 0x79, 0x65, 0x61, 0x72, 0x73, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x69, 0x67, 0x6e, 0x65, 0x64, 0x20, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x61, 0x74, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x70, 0x61, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x20, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6c, 0x65, 0x73, 0x73, 0x20, 0x74, 0x68, 0x61, 0x6e, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x61, 0x72, 0x65, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x61, 0x20, 0x30, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x60, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x60, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x76, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x60, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x60, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x66, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x72, 0x65, 0x2c, 0x20, 0x61, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x7a, 0x65, 0x72, 0x6f, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x60, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x73, 0x69, 0x67, 0x6e, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x60, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x20, 0x4d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x2d, 0x39, 0x39, 0x39, 0x2c, 0x39, 0x39, 0x39, 0x2c, 0x39, 0x39, 0x39, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x20, 0x2b, 0x39, 0x39, 0x39, 0x2c, 0x39, 0x39, 0x39, 0x2c, 0x39, 0x39, 0x39, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x7d, 0x0a,
+ },
+ "google/protobuf/empty.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x69, 0x63, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x79, 0x6f, 0x75, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x72, 0x65, 0x2d, 0x75, 0x73, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x75, 0x70, 0x6c, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x79, 0x6f, 0x75, 0x72, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, 0x20, 0x41, 0x20, 0x74, 0x79, 0x70, 0x69, 0x63, 0x61, 0x6c, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x74, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x50, 0x49, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x46, 0x6f, 0x6f, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x72, 0x70, 0x63, 0x20, 0x42, 0x61, 0x72, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x29, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x73, 0x20, 0x28, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x20, 0x7b, 0x7d, 0x0a,
+ },
+ "google/protobuf/field_mask.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x6d, 0x61, 0x73, 0x6b, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x60, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x65, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x79, 0x6d, 0x62, 0x6f, 0x6c, 0x69, 0x63, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x2c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x3a, 0x20, 0x22, 0x66, 0x2e, 0x61, 0x22, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x3a, 0x20, 0x22, 0x66, 0x2e, 0x62, 0x2e, 0x64, 0x22, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x48, 0x65, 0x72, 0x65, 0x20, 0x60, 0x66, 0x60, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x72, 0x6f, 0x6f, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x60, 0x61, 0x60, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x60, 0x62, 0x60, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x60, 0x66, 0x60, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x60, 0x64, 0x60, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x66, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x60, 0x66, 0x2e, 0x62, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x20, 0x61, 0x20, 0x73, 0x75, 0x62, 0x73, 0x65, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x20, 0x67, 0x65, 0x74, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x72, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x6e, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x61, 0x6c, 0x73, 0x6f, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x61, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x28, 0x73, 0x65, 0x65, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x29, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x4d, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x50, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x68, 0x65, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x6a, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x6f, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x75, 0x62, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x50, 0x49, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x6f, 0x73, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x76, 0x69, 0x6f, 0x75, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x61, 0x73, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x3a, 0x20, 0x32, 0x32, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x20, 0x3a, 0x20, 0x31, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x78, 0x20, 0x3a, 0x20, 0x32, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x79, 0x20, 0x3a, 0x20, 0x31, 0x33, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7a, 0x3a, 0x20, 0x38, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x78, 0x2c, 0x79, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x7a, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x74, 0x65, 0x78, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x29, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x61, 0x20, 0x3a, 0x20, 0x32, 0x32, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x20, 0x3a, 0x20, 0x31, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x20, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x0a, 0x2f, 0x2f, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x61, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x67, 0x65, 0x74, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x28, 0x61, 0x73, 0x20, 0x69, 0x66, 0x20, 0x61, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x61, 0x64, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x29, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6e, 0x65, 0x63, 0x65, 0x73, 0x73, 0x61, 0x72, 0x69, 0x6c, 0x79, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x70, 0x2d, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x49, 0x6e, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x52, 0x45, 0x53, 0x54, 0x20, 0x67, 0x65, 0x74, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6c, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2c, 0x20, 0x62, 0x75, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x52, 0x45, 0x53, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x20, 0x49, 0x6e, 0x20, 0x63, 0x61, 0x73, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x52, 0x45, 0x53, 0x54, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x2e, 0x20, 0x57, 0x68, 0x65, 0x72, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x6c, 0x79, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x69, 0x74, 0x73, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x50, 0x49, 0x2e, 0x20, 0x20, 0x49, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x63, 0x61, 0x73, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x41, 0x50, 0x49, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x4d, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x4f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x69, 0x6e, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x73, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x72, 0x65, 0x20, 0x67, 0x6f, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x73, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6c, 0x65, 0x61, 0x76, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x73, 0x20, 0x75, 0x6e, 0x74, 0x6f, 0x75, 0x63, 0x68, 0x65, 0x64, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x69, 0x73, 0x20, 0x70, 0x61, 0x73, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x6f, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x50, 0x49, 0x20, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6c, 0x6c, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x63, 0x6f, 0x76, 0x65, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x61, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x0a, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x20, 0x61, 0x70, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x60, 0x70, 0x61, 0x74, 0x68, 0x73, 0x60, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x61, 0x20, 0x73, 0x75, 0x62, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x73, 0x74, 0x20, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x61, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x6e, 0x65, 0x77, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x6d, 0x65, 0x72, 0x67, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x78, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x75, 0x62, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x67, 0x69, 0x76, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x3a, 0x20, 0x31, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x78, 0x3a, 0x20, 0x32, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x3a, 0x20, 0x5b, 0x31, 0x5d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x6e, 0x64, 0x20, 0x61, 0x6e, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x3a, 0x20, 0x31, 0x30, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x3a, 0x20, 0x5b, 0x32, 0x5d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x69, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x69, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x3a, 0x20, 0x5b, 0x22, 0x66, 0x2e, 0x62, 0x22, 0x2c, 0x20, 0x22, 0x66, 0x2e, 0x63, 0x22, 0x5d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x66, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x62, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x64, 0x3a, 0x20, 0x31, 0x30, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x78, 0x3a, 0x20, 0x32, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x63, 0x3a, 0x20, 0x5b, 0x31, 0x2c, 0x20, 0x32, 0x5d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x6e, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x76, 0x65, 0x72, 0x72, 0x69, 0x64, 0x65, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x20, 0x66, 0x6f, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x73, 0x65, 0x74, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x27, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x48, 0x65, 0x6e, 0x63, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x73, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x61, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x73, 0x65, 0x74, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x64, 0x6f, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x20, 0x61, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x61, 0x73, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x66, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x6e, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x70, 0x70, 0x6c, 0x69, 0x65, 0x73, 0x20, 0x74, 0x6f, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x28, 0x61, 0x73, 0x20, 0x69, 0x66, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6c, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x68, 0x61, 0x73, 0x20, 0x62, 0x65, 0x65, 0x6e, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x29, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x20, 0x65, 0x76, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x20, 0x74, 0x68, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x64, 0x6f, 0x65, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x6b, 0x6e, 0x6f, 0x77, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x68, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x72, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x66, 0x69, 0x6c, 0x6c, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x74, 0x6f, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x77, 0x69, 0x6c, 0x6c, 0x20, 0x62, 0x65, 0x20, 0x72, 0x65, 0x73, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x65, 0x69, 0x72, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x75, 0x6e, 0x77, 0x61, 0x6e, 0x74, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2c, 0x20, 0x61, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x20, 0x61, 0x20, 0x63, 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x79, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x2c, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x69, 0x66, 0x20, 0x6e, 0x6f, 0x74, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x67, 0x65, 0x74, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x6f, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x2e, 0x20, 0x49, 0x6e, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x63, 0x61, 0x73, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x65, 0x66, 0x66, 0x65, 0x63, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x69, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x62, 0x65, 0x20, 0x68, 0x6f, 0x6e, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x41, 0x50, 0x49, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x23, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x52, 0x45, 0x53, 0x54, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x70, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x75, 0x73, 0x65, 0x73, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x62, 0x65, 0x20, 0x73, 0x65, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x50, 0x41, 0x54, 0x43, 0x48, 0x20, 0x69, 0x6e, 0x73, 0x74, 0x65, 0x61, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x50, 0x55, 0x54, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x61, 0x74, 0x69, 0x73, 0x66, 0x79, 0x20, 0x48, 0x54, 0x54, 0x50, 0x20, 0x73, 0x65, 0x6d, 0x61, 0x6e, 0x74, 0x69, 0x63, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x50, 0x55, 0x54, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x20, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x73, 0x29, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x45, 0x6e, 0x63, 0x6f, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x4d, 0x61, 0x73, 0x6b, 0x73, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x2c, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x70, 0x61, 0x72, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x2e, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x65, 0x61, 0x63, 0x68, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x61, 0x72, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x2f, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x6c, 0x6f, 0x77, 0x65, 0x72, 0x2d, 0x63, 0x61, 0x6d, 0x65, 0x6c, 0x20, 0x6e, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x6e, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x64, 0x65, 0x63, 0x6c, 0x61, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x55, 0x73, 0x65, 0x72, 0x20, 0x75, 0x73, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x50, 0x68, 0x6f, 0x74, 0x6f, 0x20, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x55, 0x73, 0x65, 0x72, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x50, 0x72, 0x6f, 0x66, 0x69, 0x6c, 0x65, 0x60, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x6c, 0x6f, 0x6f, 0x6b, 0x20, 0x61, 0x73, 0x20, 0x73, 0x75, 0x63, 0x68, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x3a, 0x20, 0x22, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x3a, 0x20, 0x22, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x22, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x61, 0x6d, 0x65, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x62, 0x65, 0x6c, 0x6f, 0x77, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x3a, 0x20, 0x22, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x2c, 0x70, 0x68, 0x6f, 0x74, 0x6f, 0x22, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x4d, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x73, 0x20, 0x74, 0x72, 0x65, 0x61, 0x74, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x20, 0x6a, 0x75, 0x73, 0x74, 0x20, 0x61, 0x73, 0x20, 0x72, 0x65, 0x67, 0x75, 0x6c, 0x61, 0x72, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x20, 0x43, 0x6f, 0x6e, 0x73, 0x69, 0x64, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x53, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x53, 0x75, 0x62, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x39, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x3a, 0x20, 0x22, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x72, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x7b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x3a, 0x20, 0x22, 0x73, 0x75, 0x62, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x7d, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x74, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x28, 0x22, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x22, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x63, 0x61, 0x73, 0x65, 0x29, 0x20, 0x63, 0x61, 0x6e, 0x6e, 0x6f, 0x74, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x23, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x4d, 0x61, 0x73, 0x6b, 0x20, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x69, 0x6d, 0x70, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x41, 0x50, 0x49, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x68, 0x61, 0x73, 0x20, 0x61, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x76, 0x65, 0x72, 0x69, 0x66, 0x79, 0x20, 0x74, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x61, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x49, 0x4e, 0x56, 0x41, 0x4c, 0x49, 0x44, 0x5f, 0x41, 0x52, 0x47, 0x55, 0x4d, 0x45, 0x4e, 0x54, 0x60, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x20, 0x69, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x70, 0x61, 0x74, 0x68, 0x20, 0x69, 0x73, 0x20, 0x75, 0x6e, 0x6d, 0x61, 0x70, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4d, 0x61, 0x73, 0x6b, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x65, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6d, 0x61, 0x73, 0x6b, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x61, 0x74, 0x68, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a,
+ },
+ "google/protobuf/source_context.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x60, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x69, 0x6e, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x62, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x0a, 0x2f, 0x2f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2c, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x69, 0x74, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x61, 0x74, 0x68, 0x2d, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x73, 0x73, 0x6f, 0x63, 0x69, 0x61, 0x74, 0x65, 0x64, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x2e, 0x20, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x20, 0x60, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a,
+ },
+ "google/protobuf/struct.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x60, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x6d, 0x61, 0x70, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x20, 0x49, 0x6e, 0x20, 0x73, 0x6f, 0x6d, 0x65, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x2c, 0x20, 0x60, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x60, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x69, 0x67, 0x68, 0x74, 0x20, 0x62, 0x65, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x20, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x20, 0x6c, 0x69, 0x6b, 0x65, 0x20, 0x4a, 0x53, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x72, 0x65, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x67, 0x65, 0x74, 0x68, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x20, 0x73, 0x75, 0x70, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x55, 0x6e, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x65, 0x64, 0x20, 0x6d, 0x61, 0x70, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x6d, 0x61, 0x70, 0x3c, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x3e, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x2c, 0x20, 0x61, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2c, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2c, 0x20, 0x61, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x2c, 0x20, 0x61, 0x20, 0x72, 0x65, 0x63, 0x75, 0x72, 0x73, 0x69, 0x76, 0x65, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x0a, 0x2f, 0x2f, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x20, 0x41, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x72, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x78, 0x70, 0x65, 0x63, 0x74, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x73, 0x65, 0x74, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x73, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x73, 0x2e, 0x20, 0x41, 0x62, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x76, 0x61, 0x72, 0x69, 0x61, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x65, 0x61, 0x6e, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x75, 0x72, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x53, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x60, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x74, 0x6f, 0x6e, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x75, 0x6c, 0x6c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x75, 0x6e, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x60, 0x6e, 0x75, 0x6c, 0x6c, 0x60, 0x2e, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x4e, 0x75, 0x6c, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x75, 0x6c, 0x6c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x4e, 0x55, 0x4c, 0x4c, 0x5f, 0x56, 0x41, 0x4c, 0x55, 0x45, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x60, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x61, 0x72, 0x6f, 0x75, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x61, 0x72, 0x72, 0x61, 0x79, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x64, 0x79, 0x6e, 0x61, 0x6d, 0x69, 0x63, 0x61, 0x6c, 0x6c, 0x79, 0x20, 0x74, 0x79, 0x70, 0x65, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a,
+ },
+ "google/protobuf/timestamp.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x61, 0x20, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x6e, 0x79, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x7a, 0x6f, 0x6e, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x2c, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x20, 0x61, 0x74, 0x20, 0x55, 0x54, 0x43, 0x20, 0x6d, 0x69, 0x64, 0x6e, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6f, 0x6e, 0x0a, 0x2f, 0x2f, 0x20, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x79, 0x20, 0x31, 0x2c, 0x20, 0x31, 0x39, 0x37, 0x30, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x6c, 0x65, 0x70, 0x74, 0x69, 0x63, 0x20, 0x47, 0x72, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x63, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x73, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x47, 0x72, 0x65, 0x67, 0x6f, 0x72, 0x69, 0x61, 0x6e, 0x20, 0x63, 0x61, 0x6c, 0x65, 0x6e, 0x64, 0x61, 0x72, 0x20, 0x62, 0x61, 0x63, 0x6b, 0x77, 0x61, 0x72, 0x64, 0x73, 0x20, 0x74, 0x6f, 0x20, 0x79, 0x65, 0x61, 0x72, 0x20, 0x6f, 0x6e, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x6d, 0x69, 0x6e, 0x75, 0x74, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x36, 0x30, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x2e, 0x20, 0x4c, 0x65, 0x61, 0x70, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x22, 0x73, 0x6d, 0x65, 0x61, 0x72, 0x65, 0x64, 0x22, 0x20, 0x73, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x6e, 0x6f, 0x20, 0x6c, 0x65, 0x61, 0x70, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x70, 0x72, 0x65, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x61, 0x20, 0x5b, 0x32, 0x34, 0x2d, 0x68, 0x6f, 0x75, 0x72, 0x20, 0x6c, 0x69, 0x6e, 0x65, 0x61, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x6d, 0x65, 0x61, 0x72, 0x5d, 0x28, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x73, 0x6d, 0x65, 0x61, 0x72, 0x29, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x69, 0x73, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x20, 0x74, 0x6f, 0x20, 0x39, 0x39, 0x39, 0x39, 0x2d, 0x31, 0x32, 0x2d, 0x33, 0x31, 0x54, 0x32, 0x33, 0x3a, 0x35, 0x39, 0x3a, 0x35, 0x39, 0x2e, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x39, 0x5a, 0x2e, 0x20, 0x42, 0x79, 0x0a, 0x2f, 0x2f, 0x20, 0x72, 0x65, 0x73, 0x74, 0x72, 0x69, 0x63, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x72, 0x61, 0x6e, 0x67, 0x65, 0x2c, 0x20, 0x77, 0x65, 0x20, 0x65, 0x6e, 0x73, 0x75, 0x72, 0x65, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x77, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x5b, 0x52, 0x46, 0x43, 0x0a, 0x2f, 0x2f, 0x20, 0x33, 0x33, 0x33, 0x39, 0x5d, 0x28, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x65, 0x74, 0x66, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x72, 0x66, 0x63, 0x2f, 0x72, 0x66, 0x63, 0x33, 0x33, 0x33, 0x39, 0x2e, 0x74, 0x78, 0x74, 0x29, 0x20, 0x64, 0x61, 0x74, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x73, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x31, 0x3a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x50, 0x4f, 0x53, 0x49, 0x58, 0x20, 0x60, 0x74, 0x69, 0x6d, 0x65, 0x28, 0x29, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x28, 0x74, 0x69, 0x6d, 0x65, 0x28, 0x4e, 0x55, 0x4c, 0x4c, 0x29, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x28, 0x30, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x32, 0x3a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x50, 0x4f, 0x53, 0x49, 0x58, 0x20, 0x60, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x66, 0x64, 0x61, 0x79, 0x28, 0x29, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x76, 0x61, 0x6c, 0x20, 0x74, 0x76, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x67, 0x65, 0x74, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x66, 0x64, 0x61, 0x79, 0x28, 0x26, 0x74, 0x76, 0x2c, 0x20, 0x4e, 0x55, 0x4c, 0x4c, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x28, 0x74, 0x76, 0x2e, 0x74, 0x76, 0x5f, 0x73, 0x65, 0x63, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x28, 0x74, 0x76, 0x2e, 0x74, 0x76, 0x5f, 0x75, 0x73, 0x65, 0x63, 0x20, 0x2a, 0x20, 0x31, 0x30, 0x30, 0x30, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x33, 0x3a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x57, 0x69, 0x6e, 0x33, 0x32, 0x20, 0x60, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x41, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x28, 0x29, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x46, 0x49, 0x4c, 0x45, 0x54, 0x49, 0x4d, 0x45, 0x20, 0x66, 0x74, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x47, 0x65, 0x74, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x54, 0x69, 0x6d, 0x65, 0x41, 0x73, 0x46, 0x69, 0x6c, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x28, 0x26, 0x66, 0x74, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x20, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x28, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x29, 0x66, 0x74, 0x2e, 0x64, 0x77, 0x48, 0x69, 0x67, 0x68, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x29, 0x20, 0x3c, 0x3c, 0x20, 0x33, 0x32, 0x29, 0x20, 0x7c, 0x20, 0x66, 0x74, 0x2e, 0x64, 0x77, 0x4c, 0x6f, 0x77, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x20, 0x74, 0x69, 0x63, 0x6b, 0x20, 0x69, 0x73, 0x20, 0x31, 0x30, 0x30, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2e, 0x20, 0x57, 0x69, 0x6e, 0x64, 0x6f, 0x77, 0x73, 0x20, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x20, 0x31, 0x36, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x31, 0x31, 0x36, 0x34, 0x34, 0x34, 0x37, 0x33, 0x36, 0x30, 0x30, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x62, 0x65, 0x66, 0x6f, 0x72, 0x65, 0x20, 0x55, 0x6e, 0x69, 0x78, 0x20, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x20, 0x31, 0x39, 0x37, 0x30, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x73, 0x65, 0x74, 0x5f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x28, 0x28, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x29, 0x20, 0x28, 0x28, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x20, 0x2f, 0x20, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x29, 0x20, 0x2d, 0x20, 0x31, 0x31, 0x36, 0x34, 0x34, 0x34, 0x37, 0x33, 0x36, 0x30, 0x30, 0x4c, 0x4c, 0x29, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x73, 0x65, 0x74, 0x5f, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x28, 0x28, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x29, 0x20, 0x28, 0x28, 0x74, 0x69, 0x63, 0x6b, 0x73, 0x20, 0x25, 0x20, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x31, 0x30, 0x30, 0x29, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x34, 0x3a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x20, 0x60, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x28, 0x29, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x6c, 0x6f, 0x6e, 0x67, 0x20, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x20, 0x3d, 0x20, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x2e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x4d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x28, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x3d, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x6e, 0x65, 0x77, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x28, 0x29, 0x2e, 0x73, 0x65, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x28, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x20, 0x2f, 0x20, 0x31, 0x30, 0x30, 0x30, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x28, 0x28, 0x69, 0x6e, 0x74, 0x29, 0x20, 0x28, 0x28, 0x6d, 0x69, 0x6c, 0x6c, 0x69, 0x73, 0x20, 0x25, 0x20, 0x31, 0x30, 0x30, 0x30, 0x29, 0x20, 0x2a, 0x20, 0x31, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x29, 0x29, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x28, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x35, 0x3a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x20, 0x60, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x2e, 0x6e, 0x6f, 0x77, 0x28, 0x29, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x6e, 0x6f, 0x77, 0x20, 0x3d, 0x20, 0x49, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x2e, 0x6e, 0x6f, 0x77, 0x28, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x3d, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x6e, 0x65, 0x77, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x65, 0x72, 0x28, 0x29, 0x2e, 0x73, 0x65, 0x74, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x28, 0x6e, 0x6f, 0x77, 0x2e, 0x67, 0x65, 0x74, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x53, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x28, 0x29, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2e, 0x73, 0x65, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x73, 0x28, 0x6e, 0x6f, 0x77, 0x2e, 0x67, 0x65, 0x74, 0x4e, 0x61, 0x6e, 0x6f, 0x28, 0x29, 0x29, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x28, 0x29, 0x3b, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x20, 0x36, 0x3a, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x75, 0x74, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x3d, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x28, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x28, 0x29, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x23, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x69, 0x73, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x61, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x5b, 0x52, 0x46, 0x43, 0x20, 0x33, 0x33, 0x33, 0x39, 0x5d, 0x28, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x69, 0x65, 0x74, 0x66, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x72, 0x66, 0x63, 0x2f, 0x72, 0x66, 0x63, 0x33, 0x33, 0x33, 0x39, 0x2e, 0x74, 0x78, 0x74, 0x29, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x20, 0x54, 0x68, 0x61, 0x74, 0x20, 0x69, 0x73, 0x2c, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x69, 0x73, 0x20, 0x22, 0x7b, 0x79, 0x65, 0x61, 0x72, 0x7d, 0x2d, 0x7b, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x7d, 0x2d, 0x7b, 0x64, 0x61, 0x79, 0x7d, 0x54, 0x7b, 0x68, 0x6f, 0x75, 0x72, 0x7d, 0x3a, 0x7b, 0x6d, 0x69, 0x6e, 0x7d, 0x3a, 0x7b, 0x73, 0x65, 0x63, 0x7d, 0x5b, 0x2e, 0x7b, 0x66, 0x72, 0x61, 0x63, 0x5f, 0x73, 0x65, 0x63, 0x7d, 0x5d, 0x5a, 0x22, 0x0a, 0x2f, 0x2f, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x7b, 0x79, 0x65, 0x61, 0x72, 0x7d, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x65, 0x64, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x66, 0x6f, 0x75, 0x72, 0x20, 0x64, 0x69, 0x67, 0x69, 0x74, 0x73, 0x20, 0x77, 0x68, 0x69, 0x6c, 0x65, 0x20, 0x7b, 0x6d, 0x6f, 0x6e, 0x74, 0x68, 0x7d, 0x2c, 0x20, 0x7b, 0x64, 0x61, 0x79, 0x7d, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x7b, 0x68, 0x6f, 0x75, 0x72, 0x7d, 0x2c, 0x20, 0x7b, 0x6d, 0x69, 0x6e, 0x7d, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x7b, 0x73, 0x65, 0x63, 0x7d, 0x20, 0x61, 0x72, 0x65, 0x20, 0x7a, 0x65, 0x72, 0x6f, 0x2d, 0x70, 0x61, 0x64, 0x64, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x77, 0x6f, 0x20, 0x64, 0x69, 0x67, 0x69, 0x74, 0x73, 0x20, 0x65, 0x61, 0x63, 0x68, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x67, 0x6f, 0x20, 0x75, 0x70, 0x20, 0x74, 0x6f, 0x20, 0x39, 0x20, 0x64, 0x69, 0x67, 0x69, 0x74, 0x73, 0x20, 0x28, 0x69, 0x2e, 0x65, 0x2e, 0x20, 0x75, 0x70, 0x20, 0x74, 0x6f, 0x20, 0x31, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x29, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x72, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x22, 0x5a, 0x22, 0x20, 0x73, 0x75, 0x66, 0x66, 0x69, 0x78, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x20, 0x28, 0x22, 0x55, 0x54, 0x43, 0x22, 0x29, 0x3b, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x73, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x2e, 0x20, 0x41, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x69, 0x7a, 0x65, 0x72, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x61, 0x6c, 0x77, 0x61, 0x79, 0x73, 0x20, 0x75, 0x73, 0x65, 0x20, 0x55, 0x54, 0x43, 0x20, 0x28, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x5a, 0x22, 0x29, 0x20, 0x77, 0x68, 0x65, 0x6e, 0x20, 0x70, 0x72, 0x69, 0x6e, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x70, 0x61, 0x72, 0x73, 0x65, 0x72, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x20, 0x62, 0x6f, 0x74, 0x68, 0x20, 0x55, 0x54, 0x43, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x7a, 0x6f, 0x6e, 0x65, 0x73, 0x20, 0x28, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x63, 0x61, 0x74, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, 0x61, 0x6e, 0x20, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x29, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x22, 0x32, 0x30, 0x31, 0x37, 0x2d, 0x30, 0x31, 0x2d, 0x31, 0x35, 0x54, 0x30, 0x31, 0x3a, 0x33, 0x30, 0x3a, 0x31, 0x35, 0x2e, 0x30, 0x31, 0x5a, 0x22, 0x20, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x73, 0x20, 0x31, 0x35, 0x2e, 0x30, 0x31, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x70, 0x61, 0x73, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x30, 0x31, 0x3a, 0x33, 0x30, 0x20, 0x55, 0x54, 0x43, 0x20, 0x6f, 0x6e, 0x20, 0x4a, 0x61, 0x6e, 0x75, 0x61, 0x72, 0x79, 0x20, 0x31, 0x35, 0x2c, 0x20, 0x32, 0x30, 0x31, 0x37, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x49, 0x6e, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2c, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x20, 0x61, 0x20, 0x44, 0x61, 0x74, 0x65, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x5b, 0x74, 0x6f, 0x49, 0x53, 0x4f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x28, 0x29, 0x5d, 0x28, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x2e, 0x6d, 0x6f, 0x7a, 0x69, 0x6c, 0x6c, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x65, 0x6e, 0x2d, 0x55, 0x53, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2f, 0x57, 0x65, 0x62, 0x2f, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x2f, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2f, 0x47, 0x6c, 0x6f, 0x62, 0x61, 0x6c, 0x5f, 0x4f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x73, 0x2f, 0x44, 0x61, 0x74, 0x65, 0x2f, 0x74, 0x6f, 0x49, 0x53, 0x4f, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x29, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x20, 0x49, 0x6e, 0x20, 0x50, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x20, 0x73, 0x74, 0x61, 0x6e, 0x64, 0x61, 0x72, 0x64, 0x20, 0x60, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x64, 0x61, 0x74, 0x65, 0x74, 0x69, 0x6d, 0x65, 0x60, 0x20, 0x6f, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x65, 0x64, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x6f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x0a, 0x2f, 0x2f, 0x20, 0x5b, 0x60, 0x73, 0x74, 0x72, 0x66, 0x74, 0x69, 0x6d, 0x65, 0x60, 0x5d, 0x28, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x6f, 0x63, 0x73, 0x2e, 0x70, 0x79, 0x74, 0x68, 0x6f, 0x6e, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x32, 0x2f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x23, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x73, 0x74, 0x72, 0x66, 0x74, 0x69, 0x6d, 0x65, 0x29, 0x20, 0x77, 0x69, 0x74, 0x68, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x20, 0x27, 0x25, 0x59, 0x2d, 0x25, 0x6d, 0x2d, 0x25, 0x64, 0x54, 0x25, 0x48, 0x3a, 0x25, 0x4d, 0x3a, 0x25, 0x53, 0x2e, 0x25, 0x66, 0x5a, 0x27, 0x2e, 0x20, 0x4c, 0x69, 0x6b, 0x65, 0x77, 0x69, 0x73, 0x65, 0x2c, 0x20, 0x69, 0x6e, 0x20, 0x4a, 0x61, 0x76, 0x61, 0x2c, 0x20, 0x6f, 0x6e, 0x65, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x75, 0x73, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x4a, 0x6f, 0x64, 0x61, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x27, 0x73, 0x20, 0x5b, 0x60, 0x49, 0x53, 0x4f, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x28, 0x29, 0x60, 0x5d, 0x28, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x3a, 0x2f, 0x2f, 0x77, 0x77, 0x77, 0x2e, 0x6a, 0x6f, 0x64, 0x61, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x6a, 0x6f, 0x64, 0x61, 0x2d, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x64, 0x6f, 0x63, 0x73, 0x2f, 0x6f, 0x72, 0x67, 0x2f, 0x6a, 0x6f, 0x64, 0x61, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x2f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2f, 0x49, 0x53, 0x4f, 0x44, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x68, 0x74, 0x6d, 0x6c, 0x23, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x25, 0x32, 0x44, 0x25, 0x32, 0x44, 0x0a, 0x2f, 0x2f, 0x20, 0x29, 0x20, 0x74, 0x6f, 0x20, 0x6f, 0x62, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x63, 0x61, 0x70, 0x61, 0x62, 0x6c, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x73, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x55, 0x54, 0x43, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x20, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x20, 0x55, 0x6e, 0x69, 0x78, 0x20, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x31, 0x39, 0x37, 0x30, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x2e, 0x20, 0x4d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x30, 0x30, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x2d, 0x30, 0x31, 0x54, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x3a, 0x30, 0x30, 0x5a, 0x20, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x39, 0x39, 0x39, 0x39, 0x2d, 0x31, 0x32, 0x2d, 0x33, 0x31, 0x54, 0x32, 0x33, 0x3a, 0x35, 0x39, 0x3a, 0x35, 0x39, 0x5a, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x4e, 0x6f, 0x6e, 0x2d, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x61, 0x74, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x20, 0x4e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x66, 0x72, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x73, 0x74, 0x69, 0x6c, 0x6c, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x6e, 0x6f, 0x6e, 0x2d, 0x6e, 0x65, 0x67, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x20, 0x66, 0x6f, 0x72, 0x77, 0x61, 0x72, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x69, 0x6d, 0x65, 0x2e, 0x20, 0x4d, 0x75, 0x73, 0x74, 0x20, 0x62, 0x65, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x20, 0x30, 0x20, 0x74, 0x6f, 0x20, 0x39, 0x39, 0x39, 0x2c, 0x39, 0x39, 0x39, 0x2c, 0x39, 0x39, 0x39, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x73, 0x69, 0x76, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x6e, 0x61, 0x6e, 0x6f, 0x73, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x7d, 0x0a,
+ },
+ "google/protobuf/type.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x20, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x54, 0x79, 0x70, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x54, 0x79, 0x70, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x20, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x61, 0x70, 0x70, 0x65, 0x61, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x6e, 0x20, 0x60, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x60, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x0a, 0x20, 0x20, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x73, 0x69, 0x6e, 0x67, 0x6c, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x42, 0x61, 0x73, 0x69, 0x63, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x4f, 0x55, 0x42, 0x4c, 0x45, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x4c, 0x4f, 0x41, 0x54, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x4f, 0x4f, 0x4c, 0x20, 0x3d, 0x20, 0x38, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x54, 0x52, 0x49, 0x4e, 0x47, 0x20, 0x3d, 0x20, 0x39, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x2e, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x2c, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x52, 0x4f, 0x55, 0x50, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x20, 0x3d, 0x20, 0x31, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x59, 0x54, 0x45, 0x53, 0x20, 0x3d, 0x20, 0x31, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x31, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x45, 0x4e, 0x55, 0x4d, 0x20, 0x3d, 0x20, 0x31, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x33, 0x32, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x31, 0x35, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x73, 0x66, 0x69, 0x78, 0x65, 0x64, 0x36, 0x34, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x46, 0x49, 0x58, 0x45, 0x44, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x31, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x73, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x33, 0x32, 0x20, 0x3d, 0x20, 0x31, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x73, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x53, 0x49, 0x4e, 0x54, 0x36, 0x34, 0x20, 0x3d, 0x20, 0x31, 0x38, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x57, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x61, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x69, 0x73, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x2c, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x2c, 0x20, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x2e, 0x0a, 0x20, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x43, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x75, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x20, 0x63, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x41, 0x52, 0x44, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x41, 0x52, 0x44, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x4f, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x41, 0x4c, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x41, 0x52, 0x44, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x51, 0x55, 0x49, 0x52, 0x45, 0x44, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x43, 0x41, 0x52, 0x44, 0x49, 0x4e, 0x41, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x52, 0x45, 0x50, 0x45, 0x41, 0x54, 0x45, 0x44, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x7d, 0x0a, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x4b, 0x69, 0x6e, 0x64, 0x20, 0x6b, 0x69, 0x6e, 0x64, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x63, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x43, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x63, 0x61, 0x72, 0x64, 0x69, 0x6e, 0x61, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x55, 0x52, 0x4c, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x65, 0x2c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x20, 0x45, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x3a, 0x20, 0x60, 0x22, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x22, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x79, 0x70, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x20, 0x3d, 0x20, 0x36, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x60, 0x54, 0x79, 0x70, 0x65, 0x2e, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x73, 0x60, 0x2c, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x72, 0x73, 0x74, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x68, 0x61, 0x73, 0x20, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x31, 0x3b, 0x20, 0x7a, 0x65, 0x72, 0x6f, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x69, 0x73, 0x20, 0x6e, 0x6f, 0x74, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x20, 0x3d, 0x20, 0x37, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x57, 0x68, 0x65, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x6f, 0x20, 0x75, 0x73, 0x65, 0x20, 0x61, 0x6c, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x74, 0x69, 0x76, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x77, 0x69, 0x72, 0x65, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x20, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x3d, 0x20, 0x38, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x39, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2e, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x6f, 0x6e, 0x6c, 0x79, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x2e, 0x0a, 0x20, 0x20, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x20, 0x3d, 0x20, 0x34, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x2e, 0x0a, 0x20, 0x20, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x35, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x45, 0x6e, 0x75, 0x6d, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x3d, 0x20, 0x33, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x62, 0x65, 0x20, 0x61, 0x74, 0x74, 0x61, 0x63, 0x68, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x61, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2c, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x65, 0x74, 0x63, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x73, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x20, 0x62, 0x75, 0x69, 0x6c, 0x74, 0x2d, 0x69, 0x6e, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x28, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x29, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x69, 0x73, 0x20, 0x74, 0x68, 0x65, 0x20, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x20, 0x60, 0x22, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x22, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x75, 0x6c, 0x6c, 0x79, 0x2d, 0x71, 0x75, 0x61, 0x6c, 0x69, 0x66, 0x69, 0x65, 0x64, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x2e, 0x20, 0x46, 0x6f, 0x72, 0x20, 0x65, 0x78, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x60, 0x22, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x22, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x27, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x61, 0x6e, 0x20, 0x41, 0x6e, 0x79, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x20, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x2c, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x63, 0x6f, 0x72, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x20, 0x69, 0x6e, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x2e, 0x20, 0x49, 0x66, 0x20, 0x74, 0x68, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x69, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x65, 0x6e, 0x75, 0x6d, 0x2c, 0x20, 0x69, 0x74, 0x20, 0x73, 0x68, 0x6f, 0x75, 0x6c, 0x64, 0x20, 0x62, 0x65, 0x20, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x61, 0x73, 0x20, 0x61, 0x6e, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x75, 0x73, 0x69, 0x6e, 0x67, 0x20, 0x74, 0x68, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x41, 0x6e, 0x79, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x32, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x69, 0x6e, 0x20, 0x77, 0x68, 0x69, 0x63, 0x68, 0x20, 0x61, 0x20, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x69, 0x73, 0x20, 0x64, 0x65, 0x66, 0x69, 0x6e, 0x65, 0x64, 0x2e, 0x0a, 0x65, 0x6e, 0x75, 0x6d, 0x20, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x60, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x32, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x53, 0x59, 0x4e, 0x54, 0x41, 0x58, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x32, 0x20, 0x3d, 0x20, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x60, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x60, 0x2e, 0x0a, 0x20, 0x20, 0x53, 0x59, 0x4e, 0x54, 0x41, 0x58, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x33, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a,
+ },
+ "google/protobuf/wrappers.proto": {
+ 0x2f, 0x2f, 0x20, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x20, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x20, 0x2d, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x27, 0x73, 0x20, 0x64, 0x61, 0x74, 0x61, 0x20, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x63, 0x68, 0x61, 0x6e, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x43, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x32, 0x30, 0x30, 0x38, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x20, 0x41, 0x6c, 0x6c, 0x20, 0x72, 0x69, 0x67, 0x68, 0x74, 0x73, 0x20, 0x72, 0x65, 0x73, 0x65, 0x72, 0x76, 0x65, 0x64, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x64, 0x65, 0x76, 0x65, 0x6c, 0x6f, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2d, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x73, 0x2f, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x75, 0x73, 0x65, 0x20, 0x69, 0x6e, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x2c, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x6f, 0x72, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x6f, 0x64, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2c, 0x20, 0x61, 0x72, 0x65, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x74, 0x74, 0x65, 0x64, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x74, 0x68, 0x61, 0x74, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x72, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x6d, 0x65, 0x74, 0x3a, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x20, 0x63, 0x6f, 0x64, 0x65, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x74, 0x61, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x0a, 0x2f, 0x2f, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x52, 0x65, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x20, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x6d, 0x75, 0x73, 0x74, 0x20, 0x72, 0x65, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x6f, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x70, 0x79, 0x72, 0x69, 0x67, 0x68, 0x74, 0x20, 0x6e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x2c, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x6c, 0x69, 0x73, 0x74, 0x20, 0x6f, 0x66, 0x20, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x74, 0x68, 0x65, 0x20, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x69, 0x6e, 0x67, 0x20, 0x64, 0x69, 0x73, 0x63, 0x6c, 0x61, 0x69, 0x6d, 0x65, 0x72, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x61, 0x6e, 0x64, 0x2f, 0x6f, 0x72, 0x20, 0x6f, 0x74, 0x68, 0x65, 0x72, 0x20, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x73, 0x20, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x64, 0x65, 0x64, 0x20, 0x77, 0x69, 0x74, 0x68, 0x20, 0x74, 0x68, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x20, 0x20, 0x20, 0x20, 0x2a, 0x20, 0x4e, 0x65, 0x69, 0x74, 0x68, 0x65, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x20, 0x49, 0x6e, 0x63, 0x2e, 0x20, 0x6e, 0x6f, 0x72, 0x20, 0x74, 0x68, 0x65, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x69, 0x74, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x20, 0x6d, 0x61, 0x79, 0x20, 0x62, 0x65, 0x20, 0x75, 0x73, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x65, 0x6e, 0x64, 0x6f, 0x72, 0x73, 0x65, 0x20, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x6f, 0x6d, 0x6f, 0x74, 0x65, 0x20, 0x70, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x74, 0x73, 0x20, 0x64, 0x65, 0x72, 0x69, 0x76, 0x65, 0x64, 0x20, 0x66, 0x72, 0x6f, 0x6d, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x69, 0x73, 0x20, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x6f, 0x75, 0x74, 0x20, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x63, 0x20, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x20, 0x77, 0x72, 0x69, 0x74, 0x74, 0x65, 0x6e, 0x20, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x20, 0x49, 0x53, 0x20, 0x50, 0x52, 0x4f, 0x56, 0x49, 0x44, 0x45, 0x44, 0x20, 0x42, 0x59, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x20, 0x48, 0x4f, 0x4c, 0x44, 0x45, 0x52, 0x53, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x0a, 0x2f, 0x2f, 0x20, 0x22, 0x41, 0x53, 0x20, 0x49, 0x53, 0x22, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x45, 0x58, 0x50, 0x52, 0x45, 0x53, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x49, 0x4d, 0x50, 0x4c, 0x49, 0x45, 0x44, 0x20, 0x57, 0x41, 0x52, 0x52, 0x41, 0x4e, 0x54, 0x49, 0x45, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x4d, 0x45, 0x52, 0x43, 0x48, 0x41, 0x4e, 0x54, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x46, 0x49, 0x54, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x46, 0x4f, 0x52, 0x0a, 0x2f, 0x2f, 0x20, 0x41, 0x20, 0x50, 0x41, 0x52, 0x54, 0x49, 0x43, 0x55, 0x4c, 0x41, 0x52, 0x20, 0x50, 0x55, 0x52, 0x50, 0x4f, 0x53, 0x45, 0x20, 0x41, 0x52, 0x45, 0x20, 0x44, 0x49, 0x53, 0x43, 0x4c, 0x41, 0x49, 0x4d, 0x45, 0x44, 0x2e, 0x20, 0x49, 0x4e, 0x20, 0x4e, 0x4f, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x20, 0x53, 0x48, 0x41, 0x4c, 0x4c, 0x20, 0x54, 0x48, 0x45, 0x20, 0x43, 0x4f, 0x50, 0x59, 0x52, 0x49, 0x47, 0x48, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x49, 0x42, 0x55, 0x54, 0x4f, 0x52, 0x53, 0x20, 0x42, 0x45, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x4c, 0x45, 0x20, 0x46, 0x4f, 0x52, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x44, 0x49, 0x52, 0x45, 0x43, 0x54, 0x2c, 0x20, 0x49, 0x4e, 0x43, 0x49, 0x44, 0x45, 0x4e, 0x54, 0x41, 0x4c, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x53, 0x50, 0x45, 0x43, 0x49, 0x41, 0x4c, 0x2c, 0x20, 0x45, 0x58, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x52, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x43, 0x4f, 0x4e, 0x53, 0x45, 0x51, 0x55, 0x45, 0x4e, 0x54, 0x49, 0x41, 0x4c, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x53, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x2c, 0x20, 0x42, 0x55, 0x54, 0x20, 0x4e, 0x4f, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x20, 0x54, 0x4f, 0x2c, 0x20, 0x50, 0x52, 0x4f, 0x43, 0x55, 0x52, 0x45, 0x4d, 0x45, 0x4e, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x42, 0x53, 0x54, 0x49, 0x54, 0x55, 0x54, 0x45, 0x20, 0x47, 0x4f, 0x4f, 0x44, 0x53, 0x20, 0x4f, 0x52, 0x20, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x3b, 0x20, 0x4c, 0x4f, 0x53, 0x53, 0x20, 0x4f, 0x46, 0x20, 0x55, 0x53, 0x45, 0x2c, 0x0a, 0x2f, 0x2f, 0x20, 0x44, 0x41, 0x54, 0x41, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x50, 0x52, 0x4f, 0x46, 0x49, 0x54, 0x53, 0x3b, 0x20, 0x4f, 0x52, 0x20, 0x42, 0x55, 0x53, 0x49, 0x4e, 0x45, 0x53, 0x53, 0x20, 0x49, 0x4e, 0x54, 0x45, 0x52, 0x52, 0x55, 0x50, 0x54, 0x49, 0x4f, 0x4e, 0x29, 0x20, 0x48, 0x4f, 0x57, 0x45, 0x56, 0x45, 0x52, 0x20, 0x43, 0x41, 0x55, 0x53, 0x45, 0x44, 0x20, 0x41, 0x4e, 0x44, 0x20, 0x4f, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x48, 0x45, 0x4f, 0x52, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x57, 0x48, 0x45, 0x54, 0x48, 0x45, 0x52, 0x20, 0x49, 0x4e, 0x20, 0x43, 0x4f, 0x4e, 0x54, 0x52, 0x41, 0x43, 0x54, 0x2c, 0x20, 0x53, 0x54, 0x52, 0x49, 0x43, 0x54, 0x20, 0x4c, 0x49, 0x41, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x2c, 0x20, 0x4f, 0x52, 0x20, 0x54, 0x4f, 0x52, 0x54, 0x0a, 0x2f, 0x2f, 0x20, 0x28, 0x49, 0x4e, 0x43, 0x4c, 0x55, 0x44, 0x49, 0x4e, 0x47, 0x20, 0x4e, 0x45, 0x47, 0x4c, 0x49, 0x47, 0x45, 0x4e, 0x43, 0x45, 0x20, 0x4f, 0x52, 0x20, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x57, 0x49, 0x53, 0x45, 0x29, 0x20, 0x41, 0x52, 0x49, 0x53, 0x49, 0x4e, 0x47, 0x20, 0x49, 0x4e, 0x20, 0x41, 0x4e, 0x59, 0x20, 0x57, 0x41, 0x59, 0x20, 0x4f, 0x55, 0x54, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x55, 0x53, 0x45, 0x0a, 0x2f, 0x2f, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x49, 0x53, 0x20, 0x53, 0x4f, 0x46, 0x54, 0x57, 0x41, 0x52, 0x45, 0x2c, 0x20, 0x45, 0x56, 0x45, 0x4e, 0x20, 0x49, 0x46, 0x20, 0x41, 0x44, 0x56, 0x49, 0x53, 0x45, 0x44, 0x20, 0x4f, 0x46, 0x20, 0x54, 0x48, 0x45, 0x20, 0x50, 0x4f, 0x53, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x20, 0x4f, 0x46, 0x20, 0x53, 0x55, 0x43, 0x48, 0x20, 0x44, 0x41, 0x4d, 0x41, 0x47, 0x45, 0x2e, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x20, 0x28, 0x6e, 0x6f, 0x6e, 0x2d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x29, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x20, 0x54, 0x68, 0x65, 0x73, 0x65, 0x20, 0x74, 0x79, 0x70, 0x65, 0x73, 0x20, 0x61, 0x72, 0x65, 0x20, 0x75, 0x73, 0x65, 0x66, 0x75, 0x6c, 0x0a, 0x2f, 0x2f, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x65, 0x6d, 0x62, 0x65, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x20, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x73, 0x20, 0x69, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x60, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x60, 0x20, 0x74, 0x79, 0x70, 0x65, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x70, 0x6c, 0x61, 0x63, 0x65, 0x73, 0x0a, 0x2f, 0x2f, 0x20, 0x77, 0x68, 0x65, 0x72, 0x65, 0x20, 0x77, 0x65, 0x20, 0x6e, 0x65, 0x65, 0x64, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x69, 0x73, 0x74, 0x69, 0x6e, 0x67, 0x75, 0x69, 0x73, 0x68, 0x20, 0x62, 0x65, 0x74, 0x77, 0x65, 0x65, 0x6e, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x70, 0x72, 0x69, 0x6d, 0x69, 0x74, 0x69, 0x76, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x79, 0x70, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x69, 0x74, 0x73, 0x20, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x73, 0x65, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x6e, 0x6f, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x66, 0x75, 0x6c, 0x20, 0x75, 0x73, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x65, 0x64, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x61, 0x73, 0x20, 0x74, 0x68, 0x65, 0x79, 0x20, 0x6c, 0x61, 0x63, 0x6b, 0x0a, 0x2f, 0x2f, 0x20, 0x74, 0x68, 0x65, 0x20, 0x61, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x20, 0x74, 0x6f, 0x20, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x20, 0x6f, 0x6e, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x20, 0x65, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x2e, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x73, 0x65, 0x20, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x20, 0x68, 0x61, 0x76, 0x65, 0x20, 0x6e, 0x6f, 0x20, 0x6d, 0x65, 0x61, 0x6e, 0x69, 0x6e, 0x67, 0x66, 0x75, 0x6c, 0x20, 0x75, 0x73, 0x65, 0x20, 0x77, 0x69, 0x74, 0x68, 0x69, 0x6e, 0x20, 0x61, 0x20, 0x6d, 0x61, 0x70, 0x20, 0x6f, 0x72, 0x20, 0x61, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x73, 0x69, 0x6e, 0x63, 0x65, 0x0a, 0x2f, 0x2f, 0x20, 0x69, 0x6e, 0x64, 0x69, 0x76, 0x69, 0x64, 0x75, 0x61, 0x6c, 0x20, 0x65, 0x6e, 0x74, 0x72, 0x69, 0x65, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x6d, 0x61, 0x70, 0x20, 0x6f, 0x72, 0x20, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x20, 0x6f, 0x66, 0x20, 0x61, 0x20, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x20, 0x63, 0x61, 0x6e, 0x20, 0x61, 0x6c, 0x72, 0x65, 0x61, 0x64, 0x79, 0x20, 0x64, 0x65, 0x74, 0x65, 0x63, 0x74, 0x20, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x0a, 0x0a, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 0x22, 0x3b, 0x0a, 0x0a, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x3b, 0x0a, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x73, 0x68, 0x61, 0x72, 0x70, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x63, 0x63, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x61, 0x72, 0x65, 0x6e, 0x61, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x67, 0x6f, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 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, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x70, 0x62, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x6e, 0x61, 0x6d, 0x65, 0x20, 0x3d, 0x20, 0x22, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6a, 0x61, 0x76, 0x61, 0x5f, 0x6d, 0x75, 0x6c, 0x74, 0x69, 0x70, 0x6c, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x20, 0x3d, 0x20, 0x74, 0x72, 0x75, 0x65, 0x3b, 0x0a, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x6f, 0x62, 0x6a, 0x63, 0x5f, 0x63, 0x6c, 0x61, 0x73, 0x73, 0x5f, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x20, 0x3d, 0x20, 0x22, 0x47, 0x50, 0x42, 0x22, 0x3b, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x44, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x64, 0x6f, 0x75, 0x62, 0x6c, 0x65, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x46, 0x6c, 0x6f, 0x61, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x55, 0x49, 0x6e, 0x74, 0x36, 0x34, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x36, 0x34, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x55, 0x49, 0x6e, 0x74, 0x33, 0x32, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x75, 0x69, 0x6e, 0x74, 0x33, 0x32, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x62, 0x6f, 0x6f, 0x6c, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x60, 0x74, 0x72, 0x75, 0x65, 0x60, 0x20, 0x61, 0x6e, 0x64, 0x20, 0x60, 0x66, 0x61, 0x6c, 0x73, 0x65, 0x60, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x62, 0x6f, 0x6f, 0x6c, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x2f, 0x2f, 0x20, 0x57, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x20, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x62, 0x79, 0x74, 0x65, 0x73, 0x60, 0x2e, 0x0a, 0x2f, 0x2f, 0x0a, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x72, 0x65, 0x70, 0x72, 0x65, 0x73, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x60, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x60, 0x20, 0x69, 0x73, 0x20, 0x4a, 0x53, 0x4f, 0x4e, 0x20, 0x73, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x2e, 0x0a, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x20, 0x42, 0x79, 0x74, 0x65, 0x73, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x2f, 0x2f, 0x20, 0x54, 0x68, 0x65, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x2e, 0x0a, 0x20, 0x20, 0x62, 0x79, 0x74, 0x65, 0x73, 0x20, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x20, 0x3d, 0x20, 0x31, 0x3b, 0x0a, 0x7d, 0x0a,
+ },
+ }
+
+ messageNameToFilePath = map[string]string{
+ "google.protobuf.Any": "google/protobuf/any.proto",
+ "google.protobuf.Api": "google/protobuf/api.proto",
+ "google.protobuf.BoolValue": "google/protobuf/wrappers.proto",
+ "google.protobuf.BytesValue": "google/protobuf/wrappers.proto",
+ "google.protobuf.DescriptorProto": "google/protobuf/descriptor.proto",
+ "google.protobuf.DescriptorProto.ExtensionRange": "google/protobuf/descriptor.proto",
+ "google.protobuf.DescriptorProto.ReservedRange": "google/protobuf/descriptor.proto",
+ "google.protobuf.DoubleValue": "google/protobuf/wrappers.proto",
+ "google.protobuf.Duration": "google/protobuf/duration.proto",
+ "google.protobuf.Empty": "google/protobuf/empty.proto",
+ "google.protobuf.Enum": "google/protobuf/type.proto",
+ "google.protobuf.EnumDescriptorProto": "google/protobuf/descriptor.proto",
+ "google.protobuf.EnumDescriptorProto.EnumReservedRange": "google/protobuf/descriptor.proto",
+ "google.protobuf.EnumOptions": "google/protobuf/descriptor.proto",
+ "google.protobuf.EnumValue": "google/protobuf/type.proto",
+ "google.protobuf.EnumValueDescriptorProto": "google/protobuf/descriptor.proto",
+ "google.protobuf.EnumValueOptions": "google/protobuf/descriptor.proto",
+ "google.protobuf.ExtensionRangeOptions": "google/protobuf/descriptor.proto",
+ "google.protobuf.Field": "google/protobuf/type.proto",
+ "google.protobuf.FieldDescriptorProto": "google/protobuf/descriptor.proto",
+ "google.protobuf.FieldMask": "google/protobuf/field_mask.proto",
+ "google.protobuf.FieldOptions": "google/protobuf/descriptor.proto",
+ "google.protobuf.FileDescriptorProto": "google/protobuf/descriptor.proto",
+ "google.protobuf.FileDescriptorSet": "google/protobuf/descriptor.proto",
+ "google.protobuf.FileOptions": "google/protobuf/descriptor.proto",
+ "google.protobuf.FloatValue": "google/protobuf/wrappers.proto",
+ "google.protobuf.GeneratedCodeInfo": "google/protobuf/descriptor.proto",
+ "google.protobuf.GeneratedCodeInfo.Annotation": "google/protobuf/descriptor.proto",
+ "google.protobuf.Int32Value": "google/protobuf/wrappers.proto",
+ "google.protobuf.Int64Value": "google/protobuf/wrappers.proto",
+ "google.protobuf.ListValue": "google/protobuf/struct.proto",
+ "google.protobuf.MessageOptions": "google/protobuf/descriptor.proto",
+ "google.protobuf.Method": "google/protobuf/api.proto",
+ "google.protobuf.MethodDescriptorProto": "google/protobuf/descriptor.proto",
+ "google.protobuf.MethodOptions": "google/protobuf/descriptor.proto",
+ "google.protobuf.Mixin": "google/protobuf/api.proto",
+ "google.protobuf.OneofDescriptorProto": "google/protobuf/descriptor.proto",
+ "google.protobuf.OneofOptions": "google/protobuf/descriptor.proto",
+ "google.protobuf.Option": "google/protobuf/type.proto",
+ "google.protobuf.ServiceDescriptorProto": "google/protobuf/descriptor.proto",
+ "google.protobuf.ServiceOptions": "google/protobuf/descriptor.proto",
+ "google.protobuf.SourceCodeInfo": "google/protobuf/descriptor.proto",
+ "google.protobuf.SourceCodeInfo.Location": "google/protobuf/descriptor.proto",
+ "google.protobuf.SourceContext": "google/protobuf/source_context.proto",
+ "google.protobuf.StringValue": "google/protobuf/wrappers.proto",
+ "google.protobuf.Struct": "google/protobuf/struct.proto",
+ "google.protobuf.Struct.FieldsEntry": "google/protobuf/struct.proto",
+ "google.protobuf.Timestamp": "google/protobuf/timestamp.proto",
+ "google.protobuf.Type": "google/protobuf/type.proto",
+ "google.protobuf.UInt32Value": "google/protobuf/wrappers.proto",
+ "google.protobuf.UInt64Value": "google/protobuf/wrappers.proto",
+ "google.protobuf.UninterpretedOption": "google/protobuf/descriptor.proto",
+ "google.protobuf.UninterpretedOption.NamePart": "google/protobuf/descriptor.proto",
+ "google.protobuf.Value": "google/protobuf/struct.proto",
+ "google.protobuf.compiler.CodeGeneratorRequest": "google/protobuf/compiler/plugin.proto",
+ "google.protobuf.compiler.CodeGeneratorResponse": "google/protobuf/compiler/plugin.proto",
+ "google.protobuf.compiler.CodeGeneratorResponse.File": "google/protobuf/compiler/plugin.proto",
+ "google.protobuf.compiler.Version": "google/protobuf/compiler/plugin.proto",
+ }
+
+ enumNameToFilePath = map[string]string{
+ "google.protobuf.Field.Cardinality": "google/protobuf/type.proto",
+ "google.protobuf.Field.Kind": "google/protobuf/type.proto",
+ "google.protobuf.FieldDescriptorProto.Label": "google/protobuf/descriptor.proto",
+ "google.protobuf.FieldDescriptorProto.Type": "google/protobuf/descriptor.proto",
+ "google.protobuf.FieldOptions.CType": "google/protobuf/descriptor.proto",
+ "google.protobuf.FieldOptions.JSType": "google/protobuf/descriptor.proto",
+ "google.protobuf.FileOptions.OptimizeMode": "google/protobuf/descriptor.proto",
+ "google.protobuf.MethodOptions.IdempotencyLevel": "google/protobuf/descriptor.proto",
+ "google.protobuf.NullValue": "google/protobuf/struct.proto",
+ "google.protobuf.Syntax": "google/protobuf/type.proto",
+ "google.protobuf.compiler.CodeGeneratorResponse.Feature": "google/protobuf/compiler/plugin.proto",
+ }
+)
+
+func init() {
+ readBucket, err := storagemem.NewReadBucket(pathToData)
+ if err != nil {
+ panic(err.Error())
+ }
+ ReadBucket = readBucket
+}
+
+// Exists returns true if the given path exists in the static data.
+//
+// The path is normalized within this function.
+func Exists(path string) bool {
+ _, ok := pathToData[normalpath.Normalize(path)]
+ return ok
+}
+
+// MessageFilePath gets the file path for the given message, if the message exists.
+func MessageFilePath(messageName string) (string, bool) {
+ filePath, ok := messageNameToFilePath[messageName]
+ return filePath, ok
+}
+
+// EnumFilePath gets the file path for the given enum, if the enum exists.
+func EnumFilePath(enumName string) (string, bool) {
+ filePath, ok := enumNameToFilePath[enumName]
+ return filePath, ok
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/data/datawkt/usage.gen.go b/vendor/github.com/bufbuild/buf/private/gen/data/datawkt/usage.gen.go
new file mode 100644
index 000000000..5e0590663
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/data/datawkt/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package datawkt
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/admin.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/admin.connect.go
new file mode 100644
index 000000000..b946db169
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/admin.connect.go
@@ -0,0 +1,178 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/admin.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // AdminServiceName is the fully-qualified name of the AdminService service.
+ AdminServiceName = "buf.alpha.registry.v1alpha1.AdminService"
+)
+
+// AdminServiceClient is a client for the buf.alpha.registry.v1alpha1.AdminService service.
+type AdminServiceClient interface {
+ // ForceDeleteUser forces to delete a user. Resources and organizations that are
+ // solely owned by the user will also be deleted.
+ ForceDeleteUser(context.Context, *connect_go.Request[v1alpha1.ForceDeleteUserRequest]) (*connect_go.Response[v1alpha1.ForceDeleteUserResponse], error)
+ // Update a user's verification status.
+ UpdateUserVerificationStatus(context.Context, *connect_go.Request[v1alpha1.UpdateUserVerificationStatusRequest]) (*connect_go.Response[v1alpha1.UpdateUserVerificationStatusResponse], error)
+ // Update a organization's verification.
+ UpdateOrganizationVerificationStatus(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationVerificationStatusRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationVerificationStatusResponse], error)
+ // Create a new machine user on the server.
+ CreateMachineUser(context.Context, *connect_go.Request[v1alpha1.CreateMachineUserRequest]) (*connect_go.Response[v1alpha1.CreateMachineUserResponse], error)
+}
+
+// NewAdminServiceClient constructs a client for the buf.alpha.registry.v1alpha1.AdminService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewAdminServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) AdminServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &adminServiceClient{
+ forceDeleteUser: connect_go.NewClient[v1alpha1.ForceDeleteUserRequest, v1alpha1.ForceDeleteUserResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AdminService/ForceDeleteUser",
+ opts...,
+ ),
+ updateUserVerificationStatus: connect_go.NewClient[v1alpha1.UpdateUserVerificationStatusRequest, v1alpha1.UpdateUserVerificationStatusResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AdminService/UpdateUserVerificationStatus",
+ opts...,
+ ),
+ updateOrganizationVerificationStatus: connect_go.NewClient[v1alpha1.UpdateOrganizationVerificationStatusRequest, v1alpha1.UpdateOrganizationVerificationStatusResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AdminService/UpdateOrganizationVerificationStatus",
+ opts...,
+ ),
+ createMachineUser: connect_go.NewClient[v1alpha1.CreateMachineUserRequest, v1alpha1.CreateMachineUserResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AdminService/CreateMachineUser",
+ opts...,
+ ),
+ }
+}
+
+// adminServiceClient implements AdminServiceClient.
+type adminServiceClient struct {
+ forceDeleteUser *connect_go.Client[v1alpha1.ForceDeleteUserRequest, v1alpha1.ForceDeleteUserResponse]
+ updateUserVerificationStatus *connect_go.Client[v1alpha1.UpdateUserVerificationStatusRequest, v1alpha1.UpdateUserVerificationStatusResponse]
+ updateOrganizationVerificationStatus *connect_go.Client[v1alpha1.UpdateOrganizationVerificationStatusRequest, v1alpha1.UpdateOrganizationVerificationStatusResponse]
+ createMachineUser *connect_go.Client[v1alpha1.CreateMachineUserRequest, v1alpha1.CreateMachineUserResponse]
+}
+
+// ForceDeleteUser calls buf.alpha.registry.v1alpha1.AdminService.ForceDeleteUser.
+func (c *adminServiceClient) ForceDeleteUser(ctx context.Context, req *connect_go.Request[v1alpha1.ForceDeleteUserRequest]) (*connect_go.Response[v1alpha1.ForceDeleteUserResponse], error) {
+ return c.forceDeleteUser.CallUnary(ctx, req)
+}
+
+// UpdateUserVerificationStatus calls
+// buf.alpha.registry.v1alpha1.AdminService.UpdateUserVerificationStatus.
+func (c *adminServiceClient) UpdateUserVerificationStatus(ctx context.Context, req *connect_go.Request[v1alpha1.UpdateUserVerificationStatusRequest]) (*connect_go.Response[v1alpha1.UpdateUserVerificationStatusResponse], error) {
+ return c.updateUserVerificationStatus.CallUnary(ctx, req)
+}
+
+// UpdateOrganizationVerificationStatus calls
+// buf.alpha.registry.v1alpha1.AdminService.UpdateOrganizationVerificationStatus.
+func (c *adminServiceClient) UpdateOrganizationVerificationStatus(ctx context.Context, req *connect_go.Request[v1alpha1.UpdateOrganizationVerificationStatusRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationVerificationStatusResponse], error) {
+ return c.updateOrganizationVerificationStatus.CallUnary(ctx, req)
+}
+
+// CreateMachineUser calls buf.alpha.registry.v1alpha1.AdminService.CreateMachineUser.
+func (c *adminServiceClient) CreateMachineUser(ctx context.Context, req *connect_go.Request[v1alpha1.CreateMachineUserRequest]) (*connect_go.Response[v1alpha1.CreateMachineUserResponse], error) {
+ return c.createMachineUser.CallUnary(ctx, req)
+}
+
+// AdminServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.AdminService service.
+type AdminServiceHandler interface {
+ // ForceDeleteUser forces to delete a user. Resources and organizations that are
+ // solely owned by the user will also be deleted.
+ ForceDeleteUser(context.Context, *connect_go.Request[v1alpha1.ForceDeleteUserRequest]) (*connect_go.Response[v1alpha1.ForceDeleteUserResponse], error)
+ // Update a user's verification status.
+ UpdateUserVerificationStatus(context.Context, *connect_go.Request[v1alpha1.UpdateUserVerificationStatusRequest]) (*connect_go.Response[v1alpha1.UpdateUserVerificationStatusResponse], error)
+ // Update a organization's verification.
+ UpdateOrganizationVerificationStatus(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationVerificationStatusRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationVerificationStatusResponse], error)
+ // Create a new machine user on the server.
+ CreateMachineUser(context.Context, *connect_go.Request[v1alpha1.CreateMachineUserRequest]) (*connect_go.Response[v1alpha1.CreateMachineUserResponse], error)
+}
+
+// NewAdminServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewAdminServiceHandler(svc AdminServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.AdminService/ForceDeleteUser", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AdminService/ForceDeleteUser",
+ svc.ForceDeleteUser,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AdminService/UpdateUserVerificationStatus", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AdminService/UpdateUserVerificationStatus",
+ svc.UpdateUserVerificationStatus,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AdminService/UpdateOrganizationVerificationStatus", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AdminService/UpdateOrganizationVerificationStatus",
+ svc.UpdateOrganizationVerificationStatus,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AdminService/CreateMachineUser", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AdminService/CreateMachineUser",
+ svc.CreateMachineUser,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.AdminService/", mux
+}
+
+// UnimplementedAdminServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedAdminServiceHandler struct{}
+
+func (UnimplementedAdminServiceHandler) ForceDeleteUser(context.Context, *connect_go.Request[v1alpha1.ForceDeleteUserRequest]) (*connect_go.Response[v1alpha1.ForceDeleteUserResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AdminService.ForceDeleteUser is not implemented"))
+}
+
+func (UnimplementedAdminServiceHandler) UpdateUserVerificationStatus(context.Context, *connect_go.Request[v1alpha1.UpdateUserVerificationStatusRequest]) (*connect_go.Response[v1alpha1.UpdateUserVerificationStatusResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AdminService.UpdateUserVerificationStatus is not implemented"))
+}
+
+func (UnimplementedAdminServiceHandler) UpdateOrganizationVerificationStatus(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationVerificationStatusRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationVerificationStatusResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AdminService.UpdateOrganizationVerificationStatus is not implemented"))
+}
+
+func (UnimplementedAdminServiceHandler) CreateMachineUser(context.Context, *connect_go.Request[v1alpha1.CreateMachineUserRequest]) (*connect_go.Response[v1alpha1.CreateMachineUserResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AdminService.CreateMachineUser is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/authn.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/authn.connect.go
new file mode 100644
index 000000000..340ea842d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/authn.connect.go
@@ -0,0 +1,134 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/authn.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // AuthnServiceName is the fully-qualified name of the AuthnService service.
+ AuthnServiceName = "buf.alpha.registry.v1alpha1.AuthnService"
+)
+
+// AuthnServiceClient is a client for the buf.alpha.registry.v1alpha1.AuthnService service.
+type AuthnServiceClient interface {
+ // GetCurrentUser gets information associated with the current user.
+ //
+ // The user's ID is retrieved from the request's authentication header.
+ GetCurrentUser(context.Context, *connect_go.Request[v1alpha1.GetCurrentUserRequest]) (*connect_go.Response[v1alpha1.GetCurrentUserResponse], error)
+ // GetCurrentUserSubject gets the currently logged in users subject.
+ //
+ // The user's ID is retrieved from the request's authentication header.
+ GetCurrentUserSubject(context.Context, *connect_go.Request[v1alpha1.GetCurrentUserSubjectRequest]) (*connect_go.Response[v1alpha1.GetCurrentUserSubjectResponse], error)
+}
+
+// NewAuthnServiceClient constructs a client for the buf.alpha.registry.v1alpha1.AuthnService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewAuthnServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) AuthnServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &authnServiceClient{
+ getCurrentUser: connect_go.NewClient[v1alpha1.GetCurrentUserRequest, v1alpha1.GetCurrentUserResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthnService/GetCurrentUser",
+ opts...,
+ ),
+ getCurrentUserSubject: connect_go.NewClient[v1alpha1.GetCurrentUserSubjectRequest, v1alpha1.GetCurrentUserSubjectResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthnService/GetCurrentUserSubject",
+ opts...,
+ ),
+ }
+}
+
+// authnServiceClient implements AuthnServiceClient.
+type authnServiceClient struct {
+ getCurrentUser *connect_go.Client[v1alpha1.GetCurrentUserRequest, v1alpha1.GetCurrentUserResponse]
+ getCurrentUserSubject *connect_go.Client[v1alpha1.GetCurrentUserSubjectRequest, v1alpha1.GetCurrentUserSubjectResponse]
+}
+
+// GetCurrentUser calls buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUser.
+func (c *authnServiceClient) GetCurrentUser(ctx context.Context, req *connect_go.Request[v1alpha1.GetCurrentUserRequest]) (*connect_go.Response[v1alpha1.GetCurrentUserResponse], error) {
+ return c.getCurrentUser.CallUnary(ctx, req)
+}
+
+// GetCurrentUserSubject calls buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUserSubject.
+func (c *authnServiceClient) GetCurrentUserSubject(ctx context.Context, req *connect_go.Request[v1alpha1.GetCurrentUserSubjectRequest]) (*connect_go.Response[v1alpha1.GetCurrentUserSubjectResponse], error) {
+ return c.getCurrentUserSubject.CallUnary(ctx, req)
+}
+
+// AuthnServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.AuthnService service.
+type AuthnServiceHandler interface {
+ // GetCurrentUser gets information associated with the current user.
+ //
+ // The user's ID is retrieved from the request's authentication header.
+ GetCurrentUser(context.Context, *connect_go.Request[v1alpha1.GetCurrentUserRequest]) (*connect_go.Response[v1alpha1.GetCurrentUserResponse], error)
+ // GetCurrentUserSubject gets the currently logged in users subject.
+ //
+ // The user's ID is retrieved from the request's authentication header.
+ GetCurrentUserSubject(context.Context, *connect_go.Request[v1alpha1.GetCurrentUserSubjectRequest]) (*connect_go.Response[v1alpha1.GetCurrentUserSubjectResponse], error)
+}
+
+// NewAuthnServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewAuthnServiceHandler(svc AuthnServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthnService/GetCurrentUser", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthnService/GetCurrentUser",
+ svc.GetCurrentUser,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthnService/GetCurrentUserSubject", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthnService/GetCurrentUserSubject",
+ svc.GetCurrentUserSubject,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.AuthnService/", mux
+}
+
+// UnimplementedAuthnServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedAuthnServiceHandler struct{}
+
+func (UnimplementedAuthnServiceHandler) GetCurrentUser(context.Context, *connect_go.Request[v1alpha1.GetCurrentUserRequest]) (*connect_go.Response[v1alpha1.GetCurrentUserResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUser is not implemented"))
+}
+
+func (UnimplementedAuthnServiceHandler) GetCurrentUserSubject(context.Context, *connect_go.Request[v1alpha1.GetCurrentUserSubjectRequest]) (*connect_go.Response[v1alpha1.GetCurrentUserSubjectResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUserSubject is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/authz.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/authz.connect.go
new file mode 100644
index 000000000..ca37c7d98
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/authz.connect.go
@@ -0,0 +1,730 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/authz.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // AuthzServiceName is the fully-qualified name of the AuthzService service.
+ AuthzServiceName = "buf.alpha.registry.v1alpha1.AuthzService"
+)
+
+// AuthzServiceClient is a client for the buf.alpha.registry.v1alpha1.AuthzService service.
+type AuthzServiceClient interface {
+ // UserCanCreateOrganizationRepository returns whether the user is authorized
+ // to create repositories in an organization.
+ UserCanCreateOrganizationRepository(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationRepositoryResponse], error)
+ // UserCanSeeRepositorySettings returns whether the user is authorized
+ // to see repository settings.
+ UserCanSeeRepositorySettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeRepositorySettingsResponse], error)
+ // UserCanSeeOrganizationSettings returns whether the user is authorized
+ // to see organization settings.
+ UserCanSeeOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeOrganizationSettingsResponse], error)
+ // UserCanReadPlugin returns whether the user has read access to the specified plugin.
+ //
+ // Deprecated: do not use.
+ UserCanReadPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanReadPluginRequest]) (*connect_go.Response[v1alpha1.UserCanReadPluginResponse], error)
+ // UserCanCreatePluginVersion returns whether the user is authorized
+ // to create a plugin version under the specified plugin.
+ //
+ // Deprecated: do not use.
+ UserCanCreatePluginVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreatePluginVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreatePluginVersionResponse], error)
+ // UserCanCreateTemplateVersion returns whether the user is authorized
+ // to create a template version under the specified template.
+ //
+ // Deprecated: do not use.
+ UserCanCreateTemplateVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreateTemplateVersionResponse], error)
+ // UserCanCreateOrganizationPlugin returns whether the user is authorized to create
+ // a plugin in an organization.
+ //
+ // Deprecated: do not use.
+ UserCanCreateOrganizationPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationPluginRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationPluginResponse], error)
+ // UserCanCreateOrganizationPlugin returns whether the user is authorized to create
+ // a template in an organization.
+ //
+ // Deprecated: do not use.
+ UserCanCreateOrganizationTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationTemplateResponse], error)
+ // UserCanSeePluginSettings returns whether the user is authorized
+ // to see plugin settings.
+ //
+ // Deprecated: do not use.
+ UserCanSeePluginSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeePluginSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeePluginSettingsResponse], error)
+ // UserCanSeeTemplateSettings returns whether the user is authorized
+ // to see template settings.
+ //
+ // Deprecated: do not use.
+ UserCanSeeTemplateSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeTemplateSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeTemplateSettingsResponse], error)
+ // UserCanAddOrganizationMember returns whether the user is authorized to add
+ // any members to the organization and the list of roles they can add.
+ UserCanAddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanAddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanAddOrganizationMemberResponse], error)
+ // UserCanUpdateOrganizationMember returns whether the user is authorized to update
+ // any members' membership information in the organization and the list of roles they can update.
+ UserCanUpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanUpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanUpdateOrganizationMemberResponse], error)
+ // UserCanRemoveOrganizationMember returns whether the user is authorized to remove
+ // any members from the organization and the list of roles they can remove.
+ UserCanRemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanRemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanRemoveOrganizationMemberResponse], error)
+ // UserCanDeleteOrganization returns whether the user is authorized
+ // to delete an organization.
+ UserCanDeleteOrganization(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteOrganizationResponse], error)
+ // UserCanDeleteRepository returns whether the user is authorized
+ // to delete a repository.
+ UserCanDeleteRepository(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteRepositoryResponse], error)
+ // UserCanDeleteTemplate returns whether the user is authorized
+ // to delete a template.
+ //
+ // Deprecated: do not use.
+ UserCanDeleteTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteTemplateResponse], error)
+ // UserCanDeletePlugin returns whether the user is authorized
+ // to delete a plugin.
+ //
+ // Deprecated: do not use.
+ UserCanDeletePlugin(context.Context, *connect_go.Request[v1alpha1.UserCanDeletePluginRequest]) (*connect_go.Response[v1alpha1.UserCanDeletePluginResponse], error)
+ // UserCanDeleteUser returns whether the user is authorized
+ // to delete a user.
+ UserCanDeleteUser(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteUserRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteUserResponse], error)
+ // UserCanSeeServerAdminPanel returns whether the user is authorized
+ // to see server admin panel.
+ UserCanSeeServerAdminPanel(context.Context, *connect_go.Request[v1alpha1.UserCanSeeServerAdminPanelRequest]) (*connect_go.Response[v1alpha1.UserCanSeeServerAdminPanelResponse], error)
+ // UserCanManageRepositoryContributors returns whether the user is authorized to manage
+ // any contributors to the repository and the list of roles they can manage.
+ UserCanManageRepositoryContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManageRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageRepositoryContributorsResponse], error)
+ // UserCanManagePluginContributors returns whether the user is authorized to manage
+ // any contributors to the plugin and the list of roles they can manage.
+ //
+ // Deprecated: do not use.
+ UserCanManagePluginContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManagePluginContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManagePluginContributorsResponse], error)
+ // UserCanManageTemplateContributors returns whether the user is authorized to manage
+ // any contributors to the template and the list of roles they can manage.
+ //
+ // Deprecated: do not use.
+ UserCanManageTemplateContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManageTemplateContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageTemplateContributorsResponse], error)
+}
+
+// NewAuthzServiceClient constructs a client for the buf.alpha.registry.v1alpha1.AuthzService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewAuthzServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) AuthzServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &authzServiceClient{
+ userCanCreateOrganizationRepository: connect_go.NewClient[v1alpha1.UserCanCreateOrganizationRepositoryRequest, v1alpha1.UserCanCreateOrganizationRepositoryResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateOrganizationRepository",
+ opts...,
+ ),
+ userCanSeeRepositorySettings: connect_go.NewClient[v1alpha1.UserCanSeeRepositorySettingsRequest, v1alpha1.UserCanSeeRepositorySettingsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeRepositorySettings",
+ opts...,
+ ),
+ userCanSeeOrganizationSettings: connect_go.NewClient[v1alpha1.UserCanSeeOrganizationSettingsRequest, v1alpha1.UserCanSeeOrganizationSettingsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeOrganizationSettings",
+ opts...,
+ ),
+ userCanReadPlugin: connect_go.NewClient[v1alpha1.UserCanReadPluginRequest, v1alpha1.UserCanReadPluginResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanReadPlugin",
+ opts...,
+ ),
+ userCanCreatePluginVersion: connect_go.NewClient[v1alpha1.UserCanCreatePluginVersionRequest, v1alpha1.UserCanCreatePluginVersionResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreatePluginVersion",
+ opts...,
+ ),
+ userCanCreateTemplateVersion: connect_go.NewClient[v1alpha1.UserCanCreateTemplateVersionRequest, v1alpha1.UserCanCreateTemplateVersionResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateTemplateVersion",
+ opts...,
+ ),
+ userCanCreateOrganizationPlugin: connect_go.NewClient[v1alpha1.UserCanCreateOrganizationPluginRequest, v1alpha1.UserCanCreateOrganizationPluginResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateOrganizationPlugin",
+ opts...,
+ ),
+ userCanCreateOrganizationTemplate: connect_go.NewClient[v1alpha1.UserCanCreateOrganizationTemplateRequest, v1alpha1.UserCanCreateOrganizationTemplateResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateOrganizationTemplate",
+ opts...,
+ ),
+ userCanSeePluginSettings: connect_go.NewClient[v1alpha1.UserCanSeePluginSettingsRequest, v1alpha1.UserCanSeePluginSettingsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeePluginSettings",
+ opts...,
+ ),
+ userCanSeeTemplateSettings: connect_go.NewClient[v1alpha1.UserCanSeeTemplateSettingsRequest, v1alpha1.UserCanSeeTemplateSettingsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeTemplateSettings",
+ opts...,
+ ),
+ userCanAddOrganizationMember: connect_go.NewClient[v1alpha1.UserCanAddOrganizationMemberRequest, v1alpha1.UserCanAddOrganizationMemberResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanAddOrganizationMember",
+ opts...,
+ ),
+ userCanUpdateOrganizationMember: connect_go.NewClient[v1alpha1.UserCanUpdateOrganizationMemberRequest, v1alpha1.UserCanUpdateOrganizationMemberResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanUpdateOrganizationMember",
+ opts...,
+ ),
+ userCanRemoveOrganizationMember: connect_go.NewClient[v1alpha1.UserCanRemoveOrganizationMemberRequest, v1alpha1.UserCanRemoveOrganizationMemberResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanRemoveOrganizationMember",
+ opts...,
+ ),
+ userCanDeleteOrganization: connect_go.NewClient[v1alpha1.UserCanDeleteOrganizationRequest, v1alpha1.UserCanDeleteOrganizationResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteOrganization",
+ opts...,
+ ),
+ userCanDeleteRepository: connect_go.NewClient[v1alpha1.UserCanDeleteRepositoryRequest, v1alpha1.UserCanDeleteRepositoryResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteRepository",
+ opts...,
+ ),
+ userCanDeleteTemplate: connect_go.NewClient[v1alpha1.UserCanDeleteTemplateRequest, v1alpha1.UserCanDeleteTemplateResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteTemplate",
+ opts...,
+ ),
+ userCanDeletePlugin: connect_go.NewClient[v1alpha1.UserCanDeletePluginRequest, v1alpha1.UserCanDeletePluginResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeletePlugin",
+ opts...,
+ ),
+ userCanDeleteUser: connect_go.NewClient[v1alpha1.UserCanDeleteUserRequest, v1alpha1.UserCanDeleteUserResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteUser",
+ opts...,
+ ),
+ userCanSeeServerAdminPanel: connect_go.NewClient[v1alpha1.UserCanSeeServerAdminPanelRequest, v1alpha1.UserCanSeeServerAdminPanelResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeServerAdminPanel",
+ opts...,
+ ),
+ userCanManageRepositoryContributors: connect_go.NewClient[v1alpha1.UserCanManageRepositoryContributorsRequest, v1alpha1.UserCanManageRepositoryContributorsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanManageRepositoryContributors",
+ opts...,
+ ),
+ userCanManagePluginContributors: connect_go.NewClient[v1alpha1.UserCanManagePluginContributorsRequest, v1alpha1.UserCanManagePluginContributorsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanManagePluginContributors",
+ opts...,
+ ),
+ userCanManageTemplateContributors: connect_go.NewClient[v1alpha1.UserCanManageTemplateContributorsRequest, v1alpha1.UserCanManageTemplateContributorsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.AuthzService/UserCanManageTemplateContributors",
+ opts...,
+ ),
+ }
+}
+
+// authzServiceClient implements AuthzServiceClient.
+type authzServiceClient struct {
+ userCanCreateOrganizationRepository *connect_go.Client[v1alpha1.UserCanCreateOrganizationRepositoryRequest, v1alpha1.UserCanCreateOrganizationRepositoryResponse]
+ userCanSeeRepositorySettings *connect_go.Client[v1alpha1.UserCanSeeRepositorySettingsRequest, v1alpha1.UserCanSeeRepositorySettingsResponse]
+ userCanSeeOrganizationSettings *connect_go.Client[v1alpha1.UserCanSeeOrganizationSettingsRequest, v1alpha1.UserCanSeeOrganizationSettingsResponse]
+ userCanReadPlugin *connect_go.Client[v1alpha1.UserCanReadPluginRequest, v1alpha1.UserCanReadPluginResponse]
+ userCanCreatePluginVersion *connect_go.Client[v1alpha1.UserCanCreatePluginVersionRequest, v1alpha1.UserCanCreatePluginVersionResponse]
+ userCanCreateTemplateVersion *connect_go.Client[v1alpha1.UserCanCreateTemplateVersionRequest, v1alpha1.UserCanCreateTemplateVersionResponse]
+ userCanCreateOrganizationPlugin *connect_go.Client[v1alpha1.UserCanCreateOrganizationPluginRequest, v1alpha1.UserCanCreateOrganizationPluginResponse]
+ userCanCreateOrganizationTemplate *connect_go.Client[v1alpha1.UserCanCreateOrganizationTemplateRequest, v1alpha1.UserCanCreateOrganizationTemplateResponse]
+ userCanSeePluginSettings *connect_go.Client[v1alpha1.UserCanSeePluginSettingsRequest, v1alpha1.UserCanSeePluginSettingsResponse]
+ userCanSeeTemplateSettings *connect_go.Client[v1alpha1.UserCanSeeTemplateSettingsRequest, v1alpha1.UserCanSeeTemplateSettingsResponse]
+ userCanAddOrganizationMember *connect_go.Client[v1alpha1.UserCanAddOrganizationMemberRequest, v1alpha1.UserCanAddOrganizationMemberResponse]
+ userCanUpdateOrganizationMember *connect_go.Client[v1alpha1.UserCanUpdateOrganizationMemberRequest, v1alpha1.UserCanUpdateOrganizationMemberResponse]
+ userCanRemoveOrganizationMember *connect_go.Client[v1alpha1.UserCanRemoveOrganizationMemberRequest, v1alpha1.UserCanRemoveOrganizationMemberResponse]
+ userCanDeleteOrganization *connect_go.Client[v1alpha1.UserCanDeleteOrganizationRequest, v1alpha1.UserCanDeleteOrganizationResponse]
+ userCanDeleteRepository *connect_go.Client[v1alpha1.UserCanDeleteRepositoryRequest, v1alpha1.UserCanDeleteRepositoryResponse]
+ userCanDeleteTemplate *connect_go.Client[v1alpha1.UserCanDeleteTemplateRequest, v1alpha1.UserCanDeleteTemplateResponse]
+ userCanDeletePlugin *connect_go.Client[v1alpha1.UserCanDeletePluginRequest, v1alpha1.UserCanDeletePluginResponse]
+ userCanDeleteUser *connect_go.Client[v1alpha1.UserCanDeleteUserRequest, v1alpha1.UserCanDeleteUserResponse]
+ userCanSeeServerAdminPanel *connect_go.Client[v1alpha1.UserCanSeeServerAdminPanelRequest, v1alpha1.UserCanSeeServerAdminPanelResponse]
+ userCanManageRepositoryContributors *connect_go.Client[v1alpha1.UserCanManageRepositoryContributorsRequest, v1alpha1.UserCanManageRepositoryContributorsResponse]
+ userCanManagePluginContributors *connect_go.Client[v1alpha1.UserCanManagePluginContributorsRequest, v1alpha1.UserCanManagePluginContributorsResponse]
+ userCanManageTemplateContributors *connect_go.Client[v1alpha1.UserCanManageTemplateContributorsRequest, v1alpha1.UserCanManageTemplateContributorsResponse]
+}
+
+// UserCanCreateOrganizationRepository calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationRepository.
+func (c *authzServiceClient) UserCanCreateOrganizationRepository(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanCreateOrganizationRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationRepositoryResponse], error) {
+ return c.userCanCreateOrganizationRepository.CallUnary(ctx, req)
+}
+
+// UserCanSeeRepositorySettings calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeRepositorySettings.
+func (c *authzServiceClient) UserCanSeeRepositorySettings(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanSeeRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeRepositorySettingsResponse], error) {
+ return c.userCanSeeRepositorySettings.CallUnary(ctx, req)
+}
+
+// UserCanSeeOrganizationSettings calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeOrganizationSettings.
+func (c *authzServiceClient) UserCanSeeOrganizationSettings(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanSeeOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeOrganizationSettingsResponse], error) {
+ return c.userCanSeeOrganizationSettings.CallUnary(ctx, req)
+}
+
+// UserCanReadPlugin calls buf.alpha.registry.v1alpha1.AuthzService.UserCanReadPlugin.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanReadPlugin(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanReadPluginRequest]) (*connect_go.Response[v1alpha1.UserCanReadPluginResponse], error) {
+ return c.userCanReadPlugin.CallUnary(ctx, req)
+}
+
+// UserCanCreatePluginVersion calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanCreatePluginVersion.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanCreatePluginVersion(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanCreatePluginVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreatePluginVersionResponse], error) {
+ return c.userCanCreatePluginVersion.CallUnary(ctx, req)
+}
+
+// UserCanCreateTemplateVersion calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateTemplateVersion.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanCreateTemplateVersion(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanCreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreateTemplateVersionResponse], error) {
+ return c.userCanCreateTemplateVersion.CallUnary(ctx, req)
+}
+
+// UserCanCreateOrganizationPlugin calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationPlugin.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanCreateOrganizationPlugin(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanCreateOrganizationPluginRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationPluginResponse], error) {
+ return c.userCanCreateOrganizationPlugin.CallUnary(ctx, req)
+}
+
+// UserCanCreateOrganizationTemplate calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationTemplate.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanCreateOrganizationTemplate(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanCreateOrganizationTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationTemplateResponse], error) {
+ return c.userCanCreateOrganizationTemplate.CallUnary(ctx, req)
+}
+
+// UserCanSeePluginSettings calls buf.alpha.registry.v1alpha1.AuthzService.UserCanSeePluginSettings.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanSeePluginSettings(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanSeePluginSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeePluginSettingsResponse], error) {
+ return c.userCanSeePluginSettings.CallUnary(ctx, req)
+}
+
+// UserCanSeeTemplateSettings calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeTemplateSettings.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanSeeTemplateSettings(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanSeeTemplateSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeTemplateSettingsResponse], error) {
+ return c.userCanSeeTemplateSettings.CallUnary(ctx, req)
+}
+
+// UserCanAddOrganizationMember calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanAddOrganizationMember.
+func (c *authzServiceClient) UserCanAddOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanAddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanAddOrganizationMemberResponse], error) {
+ return c.userCanAddOrganizationMember.CallUnary(ctx, req)
+}
+
+// UserCanUpdateOrganizationMember calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanUpdateOrganizationMember.
+func (c *authzServiceClient) UserCanUpdateOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanUpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanUpdateOrganizationMemberResponse], error) {
+ return c.userCanUpdateOrganizationMember.CallUnary(ctx, req)
+}
+
+// UserCanRemoveOrganizationMember calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanRemoveOrganizationMember.
+func (c *authzServiceClient) UserCanRemoveOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanRemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanRemoveOrganizationMemberResponse], error) {
+ return c.userCanRemoveOrganizationMember.CallUnary(ctx, req)
+}
+
+// UserCanDeleteOrganization calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteOrganization.
+func (c *authzServiceClient) UserCanDeleteOrganization(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanDeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteOrganizationResponse], error) {
+ return c.userCanDeleteOrganization.CallUnary(ctx, req)
+}
+
+// UserCanDeleteRepository calls buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteRepository.
+func (c *authzServiceClient) UserCanDeleteRepository(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanDeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteRepositoryResponse], error) {
+ return c.userCanDeleteRepository.CallUnary(ctx, req)
+}
+
+// UserCanDeleteTemplate calls buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteTemplate.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanDeleteTemplate(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanDeleteTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteTemplateResponse], error) {
+ return c.userCanDeleteTemplate.CallUnary(ctx, req)
+}
+
+// UserCanDeletePlugin calls buf.alpha.registry.v1alpha1.AuthzService.UserCanDeletePlugin.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanDeletePlugin(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanDeletePluginRequest]) (*connect_go.Response[v1alpha1.UserCanDeletePluginResponse], error) {
+ return c.userCanDeletePlugin.CallUnary(ctx, req)
+}
+
+// UserCanDeleteUser calls buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteUser.
+func (c *authzServiceClient) UserCanDeleteUser(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanDeleteUserRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteUserResponse], error) {
+ return c.userCanDeleteUser.CallUnary(ctx, req)
+}
+
+// UserCanSeeServerAdminPanel calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeServerAdminPanel.
+func (c *authzServiceClient) UserCanSeeServerAdminPanel(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanSeeServerAdminPanelRequest]) (*connect_go.Response[v1alpha1.UserCanSeeServerAdminPanelResponse], error) {
+ return c.userCanSeeServerAdminPanel.CallUnary(ctx, req)
+}
+
+// UserCanManageRepositoryContributors calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanManageRepositoryContributors.
+func (c *authzServiceClient) UserCanManageRepositoryContributors(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanManageRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageRepositoryContributorsResponse], error) {
+ return c.userCanManageRepositoryContributors.CallUnary(ctx, req)
+}
+
+// UserCanManagePluginContributors calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanManagePluginContributors.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanManagePluginContributors(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanManagePluginContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManagePluginContributorsResponse], error) {
+ return c.userCanManagePluginContributors.CallUnary(ctx, req)
+}
+
+// UserCanManageTemplateContributors calls
+// buf.alpha.registry.v1alpha1.AuthzService.UserCanManageTemplateContributors.
+//
+// Deprecated: do not use.
+func (c *authzServiceClient) UserCanManageTemplateContributors(ctx context.Context, req *connect_go.Request[v1alpha1.UserCanManageTemplateContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageTemplateContributorsResponse], error) {
+ return c.userCanManageTemplateContributors.CallUnary(ctx, req)
+}
+
+// AuthzServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.AuthzService service.
+type AuthzServiceHandler interface {
+ // UserCanCreateOrganizationRepository returns whether the user is authorized
+ // to create repositories in an organization.
+ UserCanCreateOrganizationRepository(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationRepositoryResponse], error)
+ // UserCanSeeRepositorySettings returns whether the user is authorized
+ // to see repository settings.
+ UserCanSeeRepositorySettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeRepositorySettingsResponse], error)
+ // UserCanSeeOrganizationSettings returns whether the user is authorized
+ // to see organization settings.
+ UserCanSeeOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeOrganizationSettingsResponse], error)
+ // UserCanReadPlugin returns whether the user has read access to the specified plugin.
+ //
+ // Deprecated: do not use.
+ UserCanReadPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanReadPluginRequest]) (*connect_go.Response[v1alpha1.UserCanReadPluginResponse], error)
+ // UserCanCreatePluginVersion returns whether the user is authorized
+ // to create a plugin version under the specified plugin.
+ //
+ // Deprecated: do not use.
+ UserCanCreatePluginVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreatePluginVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreatePluginVersionResponse], error)
+ // UserCanCreateTemplateVersion returns whether the user is authorized
+ // to create a template version under the specified template.
+ //
+ // Deprecated: do not use.
+ UserCanCreateTemplateVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreateTemplateVersionResponse], error)
+ // UserCanCreateOrganizationPlugin returns whether the user is authorized to create
+ // a plugin in an organization.
+ //
+ // Deprecated: do not use.
+ UserCanCreateOrganizationPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationPluginRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationPluginResponse], error)
+ // UserCanCreateOrganizationPlugin returns whether the user is authorized to create
+ // a template in an organization.
+ //
+ // Deprecated: do not use.
+ UserCanCreateOrganizationTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationTemplateResponse], error)
+ // UserCanSeePluginSettings returns whether the user is authorized
+ // to see plugin settings.
+ //
+ // Deprecated: do not use.
+ UserCanSeePluginSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeePluginSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeePluginSettingsResponse], error)
+ // UserCanSeeTemplateSettings returns whether the user is authorized
+ // to see template settings.
+ //
+ // Deprecated: do not use.
+ UserCanSeeTemplateSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeTemplateSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeTemplateSettingsResponse], error)
+ // UserCanAddOrganizationMember returns whether the user is authorized to add
+ // any members to the organization and the list of roles they can add.
+ UserCanAddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanAddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanAddOrganizationMemberResponse], error)
+ // UserCanUpdateOrganizationMember returns whether the user is authorized to update
+ // any members' membership information in the organization and the list of roles they can update.
+ UserCanUpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanUpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanUpdateOrganizationMemberResponse], error)
+ // UserCanRemoveOrganizationMember returns whether the user is authorized to remove
+ // any members from the organization and the list of roles they can remove.
+ UserCanRemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanRemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanRemoveOrganizationMemberResponse], error)
+ // UserCanDeleteOrganization returns whether the user is authorized
+ // to delete an organization.
+ UserCanDeleteOrganization(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteOrganizationResponse], error)
+ // UserCanDeleteRepository returns whether the user is authorized
+ // to delete a repository.
+ UserCanDeleteRepository(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteRepositoryResponse], error)
+ // UserCanDeleteTemplate returns whether the user is authorized
+ // to delete a template.
+ //
+ // Deprecated: do not use.
+ UserCanDeleteTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteTemplateResponse], error)
+ // UserCanDeletePlugin returns whether the user is authorized
+ // to delete a plugin.
+ //
+ // Deprecated: do not use.
+ UserCanDeletePlugin(context.Context, *connect_go.Request[v1alpha1.UserCanDeletePluginRequest]) (*connect_go.Response[v1alpha1.UserCanDeletePluginResponse], error)
+ // UserCanDeleteUser returns whether the user is authorized
+ // to delete a user.
+ UserCanDeleteUser(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteUserRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteUserResponse], error)
+ // UserCanSeeServerAdminPanel returns whether the user is authorized
+ // to see server admin panel.
+ UserCanSeeServerAdminPanel(context.Context, *connect_go.Request[v1alpha1.UserCanSeeServerAdminPanelRequest]) (*connect_go.Response[v1alpha1.UserCanSeeServerAdminPanelResponse], error)
+ // UserCanManageRepositoryContributors returns whether the user is authorized to manage
+ // any contributors to the repository and the list of roles they can manage.
+ UserCanManageRepositoryContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManageRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageRepositoryContributorsResponse], error)
+ // UserCanManagePluginContributors returns whether the user is authorized to manage
+ // any contributors to the plugin and the list of roles they can manage.
+ //
+ // Deprecated: do not use.
+ UserCanManagePluginContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManagePluginContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManagePluginContributorsResponse], error)
+ // UserCanManageTemplateContributors returns whether the user is authorized to manage
+ // any contributors to the template and the list of roles they can manage.
+ //
+ // Deprecated: do not use.
+ UserCanManageTemplateContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManageTemplateContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageTemplateContributorsResponse], error)
+}
+
+// NewAuthzServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewAuthzServiceHandler(svc AuthzServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateOrganizationRepository", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateOrganizationRepository",
+ svc.UserCanCreateOrganizationRepository,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeRepositorySettings", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeRepositorySettings",
+ svc.UserCanSeeRepositorySettings,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeOrganizationSettings", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeOrganizationSettings",
+ svc.UserCanSeeOrganizationSettings,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanReadPlugin", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanReadPlugin",
+ svc.UserCanReadPlugin,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreatePluginVersion", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreatePluginVersion",
+ svc.UserCanCreatePluginVersion,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateTemplateVersion", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateTemplateVersion",
+ svc.UserCanCreateTemplateVersion,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateOrganizationPlugin", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateOrganizationPlugin",
+ svc.UserCanCreateOrganizationPlugin,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateOrganizationTemplate", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanCreateOrganizationTemplate",
+ svc.UserCanCreateOrganizationTemplate,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeePluginSettings", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeePluginSettings",
+ svc.UserCanSeePluginSettings,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeTemplateSettings", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeTemplateSettings",
+ svc.UserCanSeeTemplateSettings,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanAddOrganizationMember", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanAddOrganizationMember",
+ svc.UserCanAddOrganizationMember,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanUpdateOrganizationMember", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanUpdateOrganizationMember",
+ svc.UserCanUpdateOrganizationMember,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanRemoveOrganizationMember", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanRemoveOrganizationMember",
+ svc.UserCanRemoveOrganizationMember,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteOrganization", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteOrganization",
+ svc.UserCanDeleteOrganization,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteRepository", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteRepository",
+ svc.UserCanDeleteRepository,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteTemplate", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteTemplate",
+ svc.UserCanDeleteTemplate,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeletePlugin", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeletePlugin",
+ svc.UserCanDeletePlugin,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteUser", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanDeleteUser",
+ svc.UserCanDeleteUser,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeServerAdminPanel", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanSeeServerAdminPanel",
+ svc.UserCanSeeServerAdminPanel,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanManageRepositoryContributors", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanManageRepositoryContributors",
+ svc.UserCanManageRepositoryContributors,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanManagePluginContributors", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanManagePluginContributors",
+ svc.UserCanManagePluginContributors,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.AuthzService/UserCanManageTemplateContributors", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.AuthzService/UserCanManageTemplateContributors",
+ svc.UserCanManageTemplateContributors,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.AuthzService/", mux
+}
+
+// UnimplementedAuthzServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedAuthzServiceHandler struct{}
+
+func (UnimplementedAuthzServiceHandler) UserCanCreateOrganizationRepository(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationRepositoryResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationRepository is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanSeeRepositorySettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeRepositorySettingsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeRepositorySettings is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanSeeOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeOrganizationSettingsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeOrganizationSettings is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanReadPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanReadPluginRequest]) (*connect_go.Response[v1alpha1.UserCanReadPluginResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanReadPlugin is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanCreatePluginVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreatePluginVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreatePluginVersionResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanCreatePluginVersion is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanCreateTemplateVersion(context.Context, *connect_go.Request[v1alpha1.UserCanCreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.UserCanCreateTemplateVersionResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateTemplateVersion is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanCreateOrganizationPlugin(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationPluginRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationPluginResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationPlugin is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanCreateOrganizationTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanCreateOrganizationTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanCreateOrganizationTemplateResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationTemplate is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanSeePluginSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeePluginSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeePluginSettingsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanSeePluginSettings is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanSeeTemplateSettings(context.Context, *connect_go.Request[v1alpha1.UserCanSeeTemplateSettingsRequest]) (*connect_go.Response[v1alpha1.UserCanSeeTemplateSettingsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeTemplateSettings is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanAddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanAddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanAddOrganizationMemberResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanAddOrganizationMember is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanUpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanUpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanUpdateOrganizationMemberResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanUpdateOrganizationMember is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanRemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UserCanRemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UserCanRemoveOrganizationMemberResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanRemoveOrganizationMember is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanDeleteOrganization(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteOrganizationResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteOrganization is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanDeleteRepository(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteRepositoryResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteRepository is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanDeleteTemplate(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteTemplateRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteTemplateResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteTemplate is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanDeletePlugin(context.Context, *connect_go.Request[v1alpha1.UserCanDeletePluginRequest]) (*connect_go.Response[v1alpha1.UserCanDeletePluginResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanDeletePlugin is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanDeleteUser(context.Context, *connect_go.Request[v1alpha1.UserCanDeleteUserRequest]) (*connect_go.Response[v1alpha1.UserCanDeleteUserResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteUser is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanSeeServerAdminPanel(context.Context, *connect_go.Request[v1alpha1.UserCanSeeServerAdminPanelRequest]) (*connect_go.Response[v1alpha1.UserCanSeeServerAdminPanelResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeServerAdminPanel is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanManageRepositoryContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManageRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageRepositoryContributorsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanManageRepositoryContributors is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanManagePluginContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManagePluginContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManagePluginContributorsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanManagePluginContributors is not implemented"))
+}
+
+func (UnimplementedAuthzServiceHandler) UserCanManageTemplateContributors(context.Context, *connect_go.Request[v1alpha1.UserCanManageTemplateContributorsRequest]) (*connect_go.Response[v1alpha1.UserCanManageTemplateContributorsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.AuthzService.UserCanManageTemplateContributors is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/convert.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/convert.connect.go
new file mode 100644
index 000000000..8d983c509
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/convert.connect.go
@@ -0,0 +1,105 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/convert.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // ConvertServiceName is the fully-qualified name of the ConvertService service.
+ ConvertServiceName = "buf.alpha.registry.v1alpha1.ConvertService"
+)
+
+// ConvertServiceClient is a client for the buf.alpha.registry.v1alpha1.ConvertService service.
+type ConvertServiceClient interface {
+ // Convert converts a serialized message according to
+ // the provided type name using an image.
+ Convert(context.Context, *connect_go.Request[v1alpha1.ConvertRequest]) (*connect_go.Response[v1alpha1.ConvertResponse], error)
+}
+
+// NewConvertServiceClient constructs a client for the buf.alpha.registry.v1alpha1.ConvertService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewConvertServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ConvertServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &convertServiceClient{
+ convert: connect_go.NewClient[v1alpha1.ConvertRequest, v1alpha1.ConvertResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.ConvertService/Convert",
+ opts...,
+ ),
+ }
+}
+
+// convertServiceClient implements ConvertServiceClient.
+type convertServiceClient struct {
+ convert *connect_go.Client[v1alpha1.ConvertRequest, v1alpha1.ConvertResponse]
+}
+
+// Convert calls buf.alpha.registry.v1alpha1.ConvertService.Convert.
+func (c *convertServiceClient) Convert(ctx context.Context, req *connect_go.Request[v1alpha1.ConvertRequest]) (*connect_go.Response[v1alpha1.ConvertResponse], error) {
+ return c.convert.CallUnary(ctx, req)
+}
+
+// ConvertServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.ConvertService
+// service.
+type ConvertServiceHandler interface {
+ // Convert converts a serialized message according to
+ // the provided type name using an image.
+ Convert(context.Context, *connect_go.Request[v1alpha1.ConvertRequest]) (*connect_go.Response[v1alpha1.ConvertResponse], error)
+}
+
+// NewConvertServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewConvertServiceHandler(svc ConvertServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.ConvertService/Convert", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.ConvertService/Convert",
+ svc.Convert,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.ConvertService/", mux
+}
+
+// UnimplementedConvertServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedConvertServiceHandler struct{}
+
+func (UnimplementedConvertServiceHandler) Convert(context.Context, *connect_go.Request[v1alpha1.ConvertRequest]) (*connect_go.Response[v1alpha1.ConvertResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.ConvertService.Convert is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/display.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/display.connect.go
new file mode 100644
index 000000000..261735fc4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/display.connect.go
@@ -0,0 +1,423 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/display.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // DisplayServiceName is the fully-qualified name of the DisplayService service.
+ DisplayServiceName = "buf.alpha.registry.v1alpha1.DisplayService"
+)
+
+// DisplayServiceClient is a client for the buf.alpha.registry.v1alpha1.DisplayService service.
+type DisplayServiceClient interface {
+ // DisplayOrganizationElements returns which organization elements should be displayed to the user.
+ DisplayOrganizationElements(context.Context, *connect_go.Request[v1alpha1.DisplayOrganizationElementsRequest]) (*connect_go.Response[v1alpha1.DisplayOrganizationElementsResponse], error)
+ // DisplayRepositoryElements returns which repository elements should be displayed to the user.
+ DisplayRepositoryElements(context.Context, *connect_go.Request[v1alpha1.DisplayRepositoryElementsRequest]) (*connect_go.Response[v1alpha1.DisplayRepositoryElementsResponse], error)
+ // DisplayPluginElements returns which plugin elements should be displayed to the user.
+ //
+ // Deprecated: do not use.
+ DisplayPluginElements(context.Context, *connect_go.Request[v1alpha1.DisplayPluginElementsRequest]) (*connect_go.Response[v1alpha1.DisplayPluginElementsResponse], error)
+ // DisplayTemplateElements returns which template elements should be displayed to the user.
+ //
+ // Deprecated: do not use.
+ DisplayTemplateElements(context.Context, *connect_go.Request[v1alpha1.DisplayTemplateElementsRequest]) (*connect_go.Response[v1alpha1.DisplayTemplateElementsResponse], error)
+ // DisplayUserElements returns which user elements should be displayed to the user.
+ DisplayUserElements(context.Context, *connect_go.Request[v1alpha1.DisplayUserElementsRequest]) (*connect_go.Response[v1alpha1.DisplayUserElementsResponse], error)
+ // DisplayServerElements returns which server elements should be displayed to the user.
+ DisplayServerElements(context.Context, *connect_go.Request[v1alpha1.DisplayServerElementsRequest]) (*connect_go.Response[v1alpha1.DisplayServerElementsResponse], error)
+ // ListManageableRepositoryRoles returns which roles should be displayed
+ // to the user when they are managing contributors on the repository.
+ ListManageableRepositoryRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableRepositoryRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableRepositoryRolesResponse], error)
+ // ListManageableUserRepositoryRoles returns which roles should be displayed
+ // to the user when they are managing a specific contributor on the repository.
+ ListManageableUserRepositoryRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableUserRepositoryRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserRepositoryRolesResponse], error)
+ // ListManageablePluginRoles returns which roles should be displayed
+ // to the user when they are managing contributors on the plugin.
+ //
+ // Deprecated: do not use.
+ ListManageablePluginRoles(context.Context, *connect_go.Request[v1alpha1.ListManageablePluginRolesRequest]) (*connect_go.Response[v1alpha1.ListManageablePluginRolesResponse], error)
+ // ListManageableUserPluginRoles returns which roles should be displayed
+ // to the user when they are managing a specific contributor on the plugin.
+ //
+ // Deprecated: do not use.
+ ListManageableUserPluginRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableUserPluginRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserPluginRolesResponse], error)
+ // ListManageableTemplateRoles returns which roles should be displayed
+ // to the user when they are managing contributors on the template.
+ //
+ // Deprecated: do not use.
+ ListManageableTemplateRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableTemplateRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableTemplateRolesResponse], error)
+ // ListManageableUserTemplateRoles returns which roles should be displayed
+ // to the user when they are managing a specific contributor on the template.
+ //
+ // Deprecated: do not use.
+ ListManageableUserTemplateRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableUserTemplateRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserTemplateRolesResponse], error)
+}
+
+// NewDisplayServiceClient constructs a client for the buf.alpha.registry.v1alpha1.DisplayService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewDisplayServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) DisplayServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &displayServiceClient{
+ displayOrganizationElements: connect_go.NewClient[v1alpha1.DisplayOrganizationElementsRequest, v1alpha1.DisplayOrganizationElementsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/DisplayOrganizationElements",
+ opts...,
+ ),
+ displayRepositoryElements: connect_go.NewClient[v1alpha1.DisplayRepositoryElementsRequest, v1alpha1.DisplayRepositoryElementsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/DisplayRepositoryElements",
+ opts...,
+ ),
+ displayPluginElements: connect_go.NewClient[v1alpha1.DisplayPluginElementsRequest, v1alpha1.DisplayPluginElementsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/DisplayPluginElements",
+ opts...,
+ ),
+ displayTemplateElements: connect_go.NewClient[v1alpha1.DisplayTemplateElementsRequest, v1alpha1.DisplayTemplateElementsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/DisplayTemplateElements",
+ opts...,
+ ),
+ displayUserElements: connect_go.NewClient[v1alpha1.DisplayUserElementsRequest, v1alpha1.DisplayUserElementsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/DisplayUserElements",
+ opts...,
+ ),
+ displayServerElements: connect_go.NewClient[v1alpha1.DisplayServerElementsRequest, v1alpha1.DisplayServerElementsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/DisplayServerElements",
+ opts...,
+ ),
+ listManageableRepositoryRoles: connect_go.NewClient[v1alpha1.ListManageableRepositoryRolesRequest, v1alpha1.ListManageableRepositoryRolesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/ListManageableRepositoryRoles",
+ opts...,
+ ),
+ listManageableUserRepositoryRoles: connect_go.NewClient[v1alpha1.ListManageableUserRepositoryRolesRequest, v1alpha1.ListManageableUserRepositoryRolesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/ListManageableUserRepositoryRoles",
+ opts...,
+ ),
+ listManageablePluginRoles: connect_go.NewClient[v1alpha1.ListManageablePluginRolesRequest, v1alpha1.ListManageablePluginRolesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/ListManageablePluginRoles",
+ opts...,
+ ),
+ listManageableUserPluginRoles: connect_go.NewClient[v1alpha1.ListManageableUserPluginRolesRequest, v1alpha1.ListManageableUserPluginRolesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/ListManageableUserPluginRoles",
+ opts...,
+ ),
+ listManageableTemplateRoles: connect_go.NewClient[v1alpha1.ListManageableTemplateRolesRequest, v1alpha1.ListManageableTemplateRolesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/ListManageableTemplateRoles",
+ opts...,
+ ),
+ listManageableUserTemplateRoles: connect_go.NewClient[v1alpha1.ListManageableUserTemplateRolesRequest, v1alpha1.ListManageableUserTemplateRolesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DisplayService/ListManageableUserTemplateRoles",
+ opts...,
+ ),
+ }
+}
+
+// displayServiceClient implements DisplayServiceClient.
+type displayServiceClient struct {
+ displayOrganizationElements *connect_go.Client[v1alpha1.DisplayOrganizationElementsRequest, v1alpha1.DisplayOrganizationElementsResponse]
+ displayRepositoryElements *connect_go.Client[v1alpha1.DisplayRepositoryElementsRequest, v1alpha1.DisplayRepositoryElementsResponse]
+ displayPluginElements *connect_go.Client[v1alpha1.DisplayPluginElementsRequest, v1alpha1.DisplayPluginElementsResponse]
+ displayTemplateElements *connect_go.Client[v1alpha1.DisplayTemplateElementsRequest, v1alpha1.DisplayTemplateElementsResponse]
+ displayUserElements *connect_go.Client[v1alpha1.DisplayUserElementsRequest, v1alpha1.DisplayUserElementsResponse]
+ displayServerElements *connect_go.Client[v1alpha1.DisplayServerElementsRequest, v1alpha1.DisplayServerElementsResponse]
+ listManageableRepositoryRoles *connect_go.Client[v1alpha1.ListManageableRepositoryRolesRequest, v1alpha1.ListManageableRepositoryRolesResponse]
+ listManageableUserRepositoryRoles *connect_go.Client[v1alpha1.ListManageableUserRepositoryRolesRequest, v1alpha1.ListManageableUserRepositoryRolesResponse]
+ listManageablePluginRoles *connect_go.Client[v1alpha1.ListManageablePluginRolesRequest, v1alpha1.ListManageablePluginRolesResponse]
+ listManageableUserPluginRoles *connect_go.Client[v1alpha1.ListManageableUserPluginRolesRequest, v1alpha1.ListManageableUserPluginRolesResponse]
+ listManageableTemplateRoles *connect_go.Client[v1alpha1.ListManageableTemplateRolesRequest, v1alpha1.ListManageableTemplateRolesResponse]
+ listManageableUserTemplateRoles *connect_go.Client[v1alpha1.ListManageableUserTemplateRolesRequest, v1alpha1.ListManageableUserTemplateRolesResponse]
+}
+
+// DisplayOrganizationElements calls
+// buf.alpha.registry.v1alpha1.DisplayService.DisplayOrganizationElements.
+func (c *displayServiceClient) DisplayOrganizationElements(ctx context.Context, req *connect_go.Request[v1alpha1.DisplayOrganizationElementsRequest]) (*connect_go.Response[v1alpha1.DisplayOrganizationElementsResponse], error) {
+ return c.displayOrganizationElements.CallUnary(ctx, req)
+}
+
+// DisplayRepositoryElements calls
+// buf.alpha.registry.v1alpha1.DisplayService.DisplayRepositoryElements.
+func (c *displayServiceClient) DisplayRepositoryElements(ctx context.Context, req *connect_go.Request[v1alpha1.DisplayRepositoryElementsRequest]) (*connect_go.Response[v1alpha1.DisplayRepositoryElementsResponse], error) {
+ return c.displayRepositoryElements.CallUnary(ctx, req)
+}
+
+// DisplayPluginElements calls buf.alpha.registry.v1alpha1.DisplayService.DisplayPluginElements.
+//
+// Deprecated: do not use.
+func (c *displayServiceClient) DisplayPluginElements(ctx context.Context, req *connect_go.Request[v1alpha1.DisplayPluginElementsRequest]) (*connect_go.Response[v1alpha1.DisplayPluginElementsResponse], error) {
+ return c.displayPluginElements.CallUnary(ctx, req)
+}
+
+// DisplayTemplateElements calls buf.alpha.registry.v1alpha1.DisplayService.DisplayTemplateElements.
+//
+// Deprecated: do not use.
+func (c *displayServiceClient) DisplayTemplateElements(ctx context.Context, req *connect_go.Request[v1alpha1.DisplayTemplateElementsRequest]) (*connect_go.Response[v1alpha1.DisplayTemplateElementsResponse], error) {
+ return c.displayTemplateElements.CallUnary(ctx, req)
+}
+
+// DisplayUserElements calls buf.alpha.registry.v1alpha1.DisplayService.DisplayUserElements.
+func (c *displayServiceClient) DisplayUserElements(ctx context.Context, req *connect_go.Request[v1alpha1.DisplayUserElementsRequest]) (*connect_go.Response[v1alpha1.DisplayUserElementsResponse], error) {
+ return c.displayUserElements.CallUnary(ctx, req)
+}
+
+// DisplayServerElements calls buf.alpha.registry.v1alpha1.DisplayService.DisplayServerElements.
+func (c *displayServiceClient) DisplayServerElements(ctx context.Context, req *connect_go.Request[v1alpha1.DisplayServerElementsRequest]) (*connect_go.Response[v1alpha1.DisplayServerElementsResponse], error) {
+ return c.displayServerElements.CallUnary(ctx, req)
+}
+
+// ListManageableRepositoryRoles calls
+// buf.alpha.registry.v1alpha1.DisplayService.ListManageableRepositoryRoles.
+func (c *displayServiceClient) ListManageableRepositoryRoles(ctx context.Context, req *connect_go.Request[v1alpha1.ListManageableRepositoryRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableRepositoryRolesResponse], error) {
+ return c.listManageableRepositoryRoles.CallUnary(ctx, req)
+}
+
+// ListManageableUserRepositoryRoles calls
+// buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserRepositoryRoles.
+func (c *displayServiceClient) ListManageableUserRepositoryRoles(ctx context.Context, req *connect_go.Request[v1alpha1.ListManageableUserRepositoryRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserRepositoryRolesResponse], error) {
+ return c.listManageableUserRepositoryRoles.CallUnary(ctx, req)
+}
+
+// ListManageablePluginRoles calls
+// buf.alpha.registry.v1alpha1.DisplayService.ListManageablePluginRoles.
+//
+// Deprecated: do not use.
+func (c *displayServiceClient) ListManageablePluginRoles(ctx context.Context, req *connect_go.Request[v1alpha1.ListManageablePluginRolesRequest]) (*connect_go.Response[v1alpha1.ListManageablePluginRolesResponse], error) {
+ return c.listManageablePluginRoles.CallUnary(ctx, req)
+}
+
+// ListManageableUserPluginRoles calls
+// buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserPluginRoles.
+//
+// Deprecated: do not use.
+func (c *displayServiceClient) ListManageableUserPluginRoles(ctx context.Context, req *connect_go.Request[v1alpha1.ListManageableUserPluginRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserPluginRolesResponse], error) {
+ return c.listManageableUserPluginRoles.CallUnary(ctx, req)
+}
+
+// ListManageableTemplateRoles calls
+// buf.alpha.registry.v1alpha1.DisplayService.ListManageableTemplateRoles.
+//
+// Deprecated: do not use.
+func (c *displayServiceClient) ListManageableTemplateRoles(ctx context.Context, req *connect_go.Request[v1alpha1.ListManageableTemplateRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableTemplateRolesResponse], error) {
+ return c.listManageableTemplateRoles.CallUnary(ctx, req)
+}
+
+// ListManageableUserTemplateRoles calls
+// buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserTemplateRoles.
+//
+// Deprecated: do not use.
+func (c *displayServiceClient) ListManageableUserTemplateRoles(ctx context.Context, req *connect_go.Request[v1alpha1.ListManageableUserTemplateRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserTemplateRolesResponse], error) {
+ return c.listManageableUserTemplateRoles.CallUnary(ctx, req)
+}
+
+// DisplayServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.DisplayService
+// service.
+type DisplayServiceHandler interface {
+ // DisplayOrganizationElements returns which organization elements should be displayed to the user.
+ DisplayOrganizationElements(context.Context, *connect_go.Request[v1alpha1.DisplayOrganizationElementsRequest]) (*connect_go.Response[v1alpha1.DisplayOrganizationElementsResponse], error)
+ // DisplayRepositoryElements returns which repository elements should be displayed to the user.
+ DisplayRepositoryElements(context.Context, *connect_go.Request[v1alpha1.DisplayRepositoryElementsRequest]) (*connect_go.Response[v1alpha1.DisplayRepositoryElementsResponse], error)
+ // DisplayPluginElements returns which plugin elements should be displayed to the user.
+ //
+ // Deprecated: do not use.
+ DisplayPluginElements(context.Context, *connect_go.Request[v1alpha1.DisplayPluginElementsRequest]) (*connect_go.Response[v1alpha1.DisplayPluginElementsResponse], error)
+ // DisplayTemplateElements returns which template elements should be displayed to the user.
+ //
+ // Deprecated: do not use.
+ DisplayTemplateElements(context.Context, *connect_go.Request[v1alpha1.DisplayTemplateElementsRequest]) (*connect_go.Response[v1alpha1.DisplayTemplateElementsResponse], error)
+ // DisplayUserElements returns which user elements should be displayed to the user.
+ DisplayUserElements(context.Context, *connect_go.Request[v1alpha1.DisplayUserElementsRequest]) (*connect_go.Response[v1alpha1.DisplayUserElementsResponse], error)
+ // DisplayServerElements returns which server elements should be displayed to the user.
+ DisplayServerElements(context.Context, *connect_go.Request[v1alpha1.DisplayServerElementsRequest]) (*connect_go.Response[v1alpha1.DisplayServerElementsResponse], error)
+ // ListManageableRepositoryRoles returns which roles should be displayed
+ // to the user when they are managing contributors on the repository.
+ ListManageableRepositoryRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableRepositoryRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableRepositoryRolesResponse], error)
+ // ListManageableUserRepositoryRoles returns which roles should be displayed
+ // to the user when they are managing a specific contributor on the repository.
+ ListManageableUserRepositoryRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableUserRepositoryRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserRepositoryRolesResponse], error)
+ // ListManageablePluginRoles returns which roles should be displayed
+ // to the user when they are managing contributors on the plugin.
+ //
+ // Deprecated: do not use.
+ ListManageablePluginRoles(context.Context, *connect_go.Request[v1alpha1.ListManageablePluginRolesRequest]) (*connect_go.Response[v1alpha1.ListManageablePluginRolesResponse], error)
+ // ListManageableUserPluginRoles returns which roles should be displayed
+ // to the user when they are managing a specific contributor on the plugin.
+ //
+ // Deprecated: do not use.
+ ListManageableUserPluginRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableUserPluginRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserPluginRolesResponse], error)
+ // ListManageableTemplateRoles returns which roles should be displayed
+ // to the user when they are managing contributors on the template.
+ //
+ // Deprecated: do not use.
+ ListManageableTemplateRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableTemplateRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableTemplateRolesResponse], error)
+ // ListManageableUserTemplateRoles returns which roles should be displayed
+ // to the user when they are managing a specific contributor on the template.
+ //
+ // Deprecated: do not use.
+ ListManageableUserTemplateRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableUserTemplateRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserTemplateRolesResponse], error)
+}
+
+// NewDisplayServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewDisplayServiceHandler(svc DisplayServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/DisplayOrganizationElements", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/DisplayOrganizationElements",
+ svc.DisplayOrganizationElements,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/DisplayRepositoryElements", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/DisplayRepositoryElements",
+ svc.DisplayRepositoryElements,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/DisplayPluginElements", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/DisplayPluginElements",
+ svc.DisplayPluginElements,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/DisplayTemplateElements", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/DisplayTemplateElements",
+ svc.DisplayTemplateElements,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/DisplayUserElements", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/DisplayUserElements",
+ svc.DisplayUserElements,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/DisplayServerElements", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/DisplayServerElements",
+ svc.DisplayServerElements,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/ListManageableRepositoryRoles", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/ListManageableRepositoryRoles",
+ svc.ListManageableRepositoryRoles,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/ListManageableUserRepositoryRoles", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/ListManageableUserRepositoryRoles",
+ svc.ListManageableUserRepositoryRoles,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/ListManageablePluginRoles", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/ListManageablePluginRoles",
+ svc.ListManageablePluginRoles,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/ListManageableUserPluginRoles", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/ListManageableUserPluginRoles",
+ svc.ListManageableUserPluginRoles,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/ListManageableTemplateRoles", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/ListManageableTemplateRoles",
+ svc.ListManageableTemplateRoles,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DisplayService/ListManageableUserTemplateRoles", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DisplayService/ListManageableUserTemplateRoles",
+ svc.ListManageableUserTemplateRoles,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.DisplayService/", mux
+}
+
+// UnimplementedDisplayServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedDisplayServiceHandler struct{}
+
+func (UnimplementedDisplayServiceHandler) DisplayOrganizationElements(context.Context, *connect_go.Request[v1alpha1.DisplayOrganizationElementsRequest]) (*connect_go.Response[v1alpha1.DisplayOrganizationElementsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.DisplayOrganizationElements is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) DisplayRepositoryElements(context.Context, *connect_go.Request[v1alpha1.DisplayRepositoryElementsRequest]) (*connect_go.Response[v1alpha1.DisplayRepositoryElementsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.DisplayRepositoryElements is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) DisplayPluginElements(context.Context, *connect_go.Request[v1alpha1.DisplayPluginElementsRequest]) (*connect_go.Response[v1alpha1.DisplayPluginElementsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.DisplayPluginElements is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) DisplayTemplateElements(context.Context, *connect_go.Request[v1alpha1.DisplayTemplateElementsRequest]) (*connect_go.Response[v1alpha1.DisplayTemplateElementsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.DisplayTemplateElements is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) DisplayUserElements(context.Context, *connect_go.Request[v1alpha1.DisplayUserElementsRequest]) (*connect_go.Response[v1alpha1.DisplayUserElementsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.DisplayUserElements is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) DisplayServerElements(context.Context, *connect_go.Request[v1alpha1.DisplayServerElementsRequest]) (*connect_go.Response[v1alpha1.DisplayServerElementsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.DisplayServerElements is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) ListManageableRepositoryRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableRepositoryRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableRepositoryRolesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.ListManageableRepositoryRoles is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) ListManageableUserRepositoryRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableUserRepositoryRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserRepositoryRolesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserRepositoryRoles is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) ListManageablePluginRoles(context.Context, *connect_go.Request[v1alpha1.ListManageablePluginRolesRequest]) (*connect_go.Response[v1alpha1.ListManageablePluginRolesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.ListManageablePluginRoles is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) ListManageableUserPluginRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableUserPluginRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserPluginRolesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserPluginRoles is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) ListManageableTemplateRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableTemplateRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableTemplateRolesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.ListManageableTemplateRoles is not implemented"))
+}
+
+func (UnimplementedDisplayServiceHandler) ListManageableUserTemplateRoles(context.Context, *connect_go.Request[v1alpha1.ListManageableUserTemplateRolesRequest]) (*connect_go.Response[v1alpha1.ListManageableUserTemplateRolesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserTemplateRoles is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/doc.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/doc.connect.go
new file mode 100644
index 000000000..73bf365e2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/doc.connect.go
@@ -0,0 +1,214 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/doc.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // DocServiceName is the fully-qualified name of the DocService service.
+ DocServiceName = "buf.alpha.registry.v1alpha1.DocService"
+)
+
+// DocServiceClient is a client for the buf.alpha.registry.v1alpha1.DocService service.
+type DocServiceClient interface {
+ // GetSourceDirectoryInfo retrieves the directory and file structure for the
+ // given owner, repository and reference.
+ //
+ // The purpose of this is to get a representation of the file tree for a given
+ // module to enable exploring the module by navigating through its contents.
+ GetSourceDirectoryInfo(context.Context, *connect_go.Request[v1alpha1.GetSourceDirectoryInfoRequest]) (*connect_go.Response[v1alpha1.GetSourceDirectoryInfoResponse], error)
+ // GetSourceFile retrieves the source contents for the given owner, repository,
+ // reference, and path.
+ GetSourceFile(context.Context, *connect_go.Request[v1alpha1.GetSourceFileRequest]) (*connect_go.Response[v1alpha1.GetSourceFileResponse], error)
+ // GetModulePackages retrieves the list of packages for the module based on the given
+ // owner, repository, and reference.
+ GetModulePackages(context.Context, *connect_go.Request[v1alpha1.GetModulePackagesRequest]) (*connect_go.Response[v1alpha1.GetModulePackagesResponse], error)
+ // GetModuleDocumentation retrieves the documentations including buf.md and LICENSE files
+ // for module based on the given owner, repository, and reference.
+ GetModuleDocumentation(context.Context, *connect_go.Request[v1alpha1.GetModuleDocumentationRequest]) (*connect_go.Response[v1alpha1.GetModuleDocumentationResponse], error)
+ // GetPackageDocumentation retrieves a a slice of documentation structures
+ // for the given owner, repository, reference, and package name.
+ GetPackageDocumentation(context.Context, *connect_go.Request[v1alpha1.GetPackageDocumentationRequest]) (*connect_go.Response[v1alpha1.GetPackageDocumentationResponse], error)
+}
+
+// NewDocServiceClient constructs a client for the buf.alpha.registry.v1alpha1.DocService service.
+// By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped
+// responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
+// connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewDocServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) DocServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &docServiceClient{
+ getSourceDirectoryInfo: connect_go.NewClient[v1alpha1.GetSourceDirectoryInfoRequest, v1alpha1.GetSourceDirectoryInfoResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DocService/GetSourceDirectoryInfo",
+ opts...,
+ ),
+ getSourceFile: connect_go.NewClient[v1alpha1.GetSourceFileRequest, v1alpha1.GetSourceFileResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DocService/GetSourceFile",
+ opts...,
+ ),
+ getModulePackages: connect_go.NewClient[v1alpha1.GetModulePackagesRequest, v1alpha1.GetModulePackagesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DocService/GetModulePackages",
+ opts...,
+ ),
+ getModuleDocumentation: connect_go.NewClient[v1alpha1.GetModuleDocumentationRequest, v1alpha1.GetModuleDocumentationResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DocService/GetModuleDocumentation",
+ opts...,
+ ),
+ getPackageDocumentation: connect_go.NewClient[v1alpha1.GetPackageDocumentationRequest, v1alpha1.GetPackageDocumentationResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DocService/GetPackageDocumentation",
+ opts...,
+ ),
+ }
+}
+
+// docServiceClient implements DocServiceClient.
+type docServiceClient struct {
+ getSourceDirectoryInfo *connect_go.Client[v1alpha1.GetSourceDirectoryInfoRequest, v1alpha1.GetSourceDirectoryInfoResponse]
+ getSourceFile *connect_go.Client[v1alpha1.GetSourceFileRequest, v1alpha1.GetSourceFileResponse]
+ getModulePackages *connect_go.Client[v1alpha1.GetModulePackagesRequest, v1alpha1.GetModulePackagesResponse]
+ getModuleDocumentation *connect_go.Client[v1alpha1.GetModuleDocumentationRequest, v1alpha1.GetModuleDocumentationResponse]
+ getPackageDocumentation *connect_go.Client[v1alpha1.GetPackageDocumentationRequest, v1alpha1.GetPackageDocumentationResponse]
+}
+
+// GetSourceDirectoryInfo calls buf.alpha.registry.v1alpha1.DocService.GetSourceDirectoryInfo.
+func (c *docServiceClient) GetSourceDirectoryInfo(ctx context.Context, req *connect_go.Request[v1alpha1.GetSourceDirectoryInfoRequest]) (*connect_go.Response[v1alpha1.GetSourceDirectoryInfoResponse], error) {
+ return c.getSourceDirectoryInfo.CallUnary(ctx, req)
+}
+
+// GetSourceFile calls buf.alpha.registry.v1alpha1.DocService.GetSourceFile.
+func (c *docServiceClient) GetSourceFile(ctx context.Context, req *connect_go.Request[v1alpha1.GetSourceFileRequest]) (*connect_go.Response[v1alpha1.GetSourceFileResponse], error) {
+ return c.getSourceFile.CallUnary(ctx, req)
+}
+
+// GetModulePackages calls buf.alpha.registry.v1alpha1.DocService.GetModulePackages.
+func (c *docServiceClient) GetModulePackages(ctx context.Context, req *connect_go.Request[v1alpha1.GetModulePackagesRequest]) (*connect_go.Response[v1alpha1.GetModulePackagesResponse], error) {
+ return c.getModulePackages.CallUnary(ctx, req)
+}
+
+// GetModuleDocumentation calls buf.alpha.registry.v1alpha1.DocService.GetModuleDocumentation.
+func (c *docServiceClient) GetModuleDocumentation(ctx context.Context, req *connect_go.Request[v1alpha1.GetModuleDocumentationRequest]) (*connect_go.Response[v1alpha1.GetModuleDocumentationResponse], error) {
+ return c.getModuleDocumentation.CallUnary(ctx, req)
+}
+
+// GetPackageDocumentation calls buf.alpha.registry.v1alpha1.DocService.GetPackageDocumentation.
+func (c *docServiceClient) GetPackageDocumentation(ctx context.Context, req *connect_go.Request[v1alpha1.GetPackageDocumentationRequest]) (*connect_go.Response[v1alpha1.GetPackageDocumentationResponse], error) {
+ return c.getPackageDocumentation.CallUnary(ctx, req)
+}
+
+// DocServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.DocService service.
+type DocServiceHandler interface {
+ // GetSourceDirectoryInfo retrieves the directory and file structure for the
+ // given owner, repository and reference.
+ //
+ // The purpose of this is to get a representation of the file tree for a given
+ // module to enable exploring the module by navigating through its contents.
+ GetSourceDirectoryInfo(context.Context, *connect_go.Request[v1alpha1.GetSourceDirectoryInfoRequest]) (*connect_go.Response[v1alpha1.GetSourceDirectoryInfoResponse], error)
+ // GetSourceFile retrieves the source contents for the given owner, repository,
+ // reference, and path.
+ GetSourceFile(context.Context, *connect_go.Request[v1alpha1.GetSourceFileRequest]) (*connect_go.Response[v1alpha1.GetSourceFileResponse], error)
+ // GetModulePackages retrieves the list of packages for the module based on the given
+ // owner, repository, and reference.
+ GetModulePackages(context.Context, *connect_go.Request[v1alpha1.GetModulePackagesRequest]) (*connect_go.Response[v1alpha1.GetModulePackagesResponse], error)
+ // GetModuleDocumentation retrieves the documentations including buf.md and LICENSE files
+ // for module based on the given owner, repository, and reference.
+ GetModuleDocumentation(context.Context, *connect_go.Request[v1alpha1.GetModuleDocumentationRequest]) (*connect_go.Response[v1alpha1.GetModuleDocumentationResponse], error)
+ // GetPackageDocumentation retrieves a a slice of documentation structures
+ // for the given owner, repository, reference, and package name.
+ GetPackageDocumentation(context.Context, *connect_go.Request[v1alpha1.GetPackageDocumentationRequest]) (*connect_go.Response[v1alpha1.GetPackageDocumentationResponse], error)
+}
+
+// NewDocServiceHandler builds an HTTP handler from the service implementation. It returns the path
+// on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewDocServiceHandler(svc DocServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.DocService/GetSourceDirectoryInfo", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DocService/GetSourceDirectoryInfo",
+ svc.GetSourceDirectoryInfo,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DocService/GetSourceFile", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DocService/GetSourceFile",
+ svc.GetSourceFile,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DocService/GetModulePackages", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DocService/GetModulePackages",
+ svc.GetModulePackages,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DocService/GetModuleDocumentation", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DocService/GetModuleDocumentation",
+ svc.GetModuleDocumentation,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.DocService/GetPackageDocumentation", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DocService/GetPackageDocumentation",
+ svc.GetPackageDocumentation,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.DocService/", mux
+}
+
+// UnimplementedDocServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedDocServiceHandler struct{}
+
+func (UnimplementedDocServiceHandler) GetSourceDirectoryInfo(context.Context, *connect_go.Request[v1alpha1.GetSourceDirectoryInfoRequest]) (*connect_go.Response[v1alpha1.GetSourceDirectoryInfoResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DocService.GetSourceDirectoryInfo is not implemented"))
+}
+
+func (UnimplementedDocServiceHandler) GetSourceFile(context.Context, *connect_go.Request[v1alpha1.GetSourceFileRequest]) (*connect_go.Response[v1alpha1.GetSourceFileResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DocService.GetSourceFile is not implemented"))
+}
+
+func (UnimplementedDocServiceHandler) GetModulePackages(context.Context, *connect_go.Request[v1alpha1.GetModulePackagesRequest]) (*connect_go.Response[v1alpha1.GetModulePackagesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DocService.GetModulePackages is not implemented"))
+}
+
+func (UnimplementedDocServiceHandler) GetModuleDocumentation(context.Context, *connect_go.Request[v1alpha1.GetModuleDocumentationRequest]) (*connect_go.Response[v1alpha1.GetModuleDocumentationResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DocService.GetModuleDocumentation is not implemented"))
+}
+
+func (UnimplementedDocServiceHandler) GetPackageDocumentation(context.Context, *connect_go.Request[v1alpha1.GetPackageDocumentationRequest]) (*connect_go.Response[v1alpha1.GetPackageDocumentationResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DocService.GetPackageDocumentation is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/download.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/download.connect.go
new file mode 100644
index 000000000..1d6607dba
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/download.connect.go
@@ -0,0 +1,103 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/download.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // DownloadServiceName is the fully-qualified name of the DownloadService service.
+ DownloadServiceName = "buf.alpha.registry.v1alpha1.DownloadService"
+)
+
+// DownloadServiceClient is a client for the buf.alpha.registry.v1alpha1.DownloadService service.
+type DownloadServiceClient interface {
+ // Download downloads.
+ Download(context.Context, *connect_go.Request[v1alpha1.DownloadRequest]) (*connect_go.Response[v1alpha1.DownloadResponse], error)
+}
+
+// NewDownloadServiceClient constructs a client for the buf.alpha.registry.v1alpha1.DownloadService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewDownloadServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) DownloadServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &downloadServiceClient{
+ download: connect_go.NewClient[v1alpha1.DownloadRequest, v1alpha1.DownloadResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.DownloadService/Download",
+ opts...,
+ ),
+ }
+}
+
+// downloadServiceClient implements DownloadServiceClient.
+type downloadServiceClient struct {
+ download *connect_go.Client[v1alpha1.DownloadRequest, v1alpha1.DownloadResponse]
+}
+
+// Download calls buf.alpha.registry.v1alpha1.DownloadService.Download.
+func (c *downloadServiceClient) Download(ctx context.Context, req *connect_go.Request[v1alpha1.DownloadRequest]) (*connect_go.Response[v1alpha1.DownloadResponse], error) {
+ return c.download.CallUnary(ctx, req)
+}
+
+// DownloadServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.DownloadService
+// service.
+type DownloadServiceHandler interface {
+ // Download downloads.
+ Download(context.Context, *connect_go.Request[v1alpha1.DownloadRequest]) (*connect_go.Response[v1alpha1.DownloadResponse], error)
+}
+
+// NewDownloadServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewDownloadServiceHandler(svc DownloadServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.DownloadService/Download", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.DownloadService/Download",
+ svc.Download,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.DownloadService/", mux
+}
+
+// UnimplementedDownloadServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedDownloadServiceHandler struct{}
+
+func (UnimplementedDownloadServiceHandler) Download(context.Context, *connect_go.Request[v1alpha1.DownloadRequest]) (*connect_go.Response[v1alpha1.DownloadResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.DownloadService.Download is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/generate.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/generate.connect.go
new file mode 100644
index 000000000..2d6ec7806
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/generate.connect.go
@@ -0,0 +1,133 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// buf/alpha/registry/v1alpha1/generate.proto is a deprecated file.
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // GenerateServiceName is the fully-qualified name of the GenerateService service.
+ GenerateServiceName = "buf.alpha.registry.v1alpha1.GenerateService"
+)
+
+// GenerateServiceClient is a client for the buf.alpha.registry.v1alpha1.GenerateService service.
+type GenerateServiceClient interface {
+ // GeneratePlugins generates an array of files given the provided
+ // module reference and plugin version and option tuples. No attempt
+ // is made at merging insertion points.
+ GeneratePlugins(context.Context, *connect_go.Request[v1alpha1.GeneratePluginsRequest]) (*connect_go.Response[v1alpha1.GeneratePluginsResponse], error)
+ // GenerateTemplate generates an array of files given the provided
+ // module reference and template version.
+ GenerateTemplate(context.Context, *connect_go.Request[v1alpha1.GenerateTemplateRequest]) (*connect_go.Response[v1alpha1.GenerateTemplateResponse], error)
+}
+
+// NewGenerateServiceClient constructs a client for the buf.alpha.registry.v1alpha1.GenerateService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewGenerateServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) GenerateServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &generateServiceClient{
+ generatePlugins: connect_go.NewClient[v1alpha1.GeneratePluginsRequest, v1alpha1.GeneratePluginsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.GenerateService/GeneratePlugins",
+ opts...,
+ ),
+ generateTemplate: connect_go.NewClient[v1alpha1.GenerateTemplateRequest, v1alpha1.GenerateTemplateResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.GenerateService/GenerateTemplate",
+ opts...,
+ ),
+ }
+}
+
+// generateServiceClient implements GenerateServiceClient.
+type generateServiceClient struct {
+ generatePlugins *connect_go.Client[v1alpha1.GeneratePluginsRequest, v1alpha1.GeneratePluginsResponse]
+ generateTemplate *connect_go.Client[v1alpha1.GenerateTemplateRequest, v1alpha1.GenerateTemplateResponse]
+}
+
+// GeneratePlugins calls buf.alpha.registry.v1alpha1.GenerateService.GeneratePlugins.
+func (c *generateServiceClient) GeneratePlugins(ctx context.Context, req *connect_go.Request[v1alpha1.GeneratePluginsRequest]) (*connect_go.Response[v1alpha1.GeneratePluginsResponse], error) {
+ return c.generatePlugins.CallUnary(ctx, req)
+}
+
+// GenerateTemplate calls buf.alpha.registry.v1alpha1.GenerateService.GenerateTemplate.
+func (c *generateServiceClient) GenerateTemplate(ctx context.Context, req *connect_go.Request[v1alpha1.GenerateTemplateRequest]) (*connect_go.Response[v1alpha1.GenerateTemplateResponse], error) {
+ return c.generateTemplate.CallUnary(ctx, req)
+}
+
+// GenerateServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.GenerateService
+// service.
+type GenerateServiceHandler interface {
+ // GeneratePlugins generates an array of files given the provided
+ // module reference and plugin version and option tuples. No attempt
+ // is made at merging insertion points.
+ GeneratePlugins(context.Context, *connect_go.Request[v1alpha1.GeneratePluginsRequest]) (*connect_go.Response[v1alpha1.GeneratePluginsResponse], error)
+ // GenerateTemplate generates an array of files given the provided
+ // module reference and template version.
+ GenerateTemplate(context.Context, *connect_go.Request[v1alpha1.GenerateTemplateRequest]) (*connect_go.Response[v1alpha1.GenerateTemplateResponse], error)
+}
+
+// NewGenerateServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewGenerateServiceHandler(svc GenerateServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.GenerateService/GeneratePlugins", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.GenerateService/GeneratePlugins",
+ svc.GeneratePlugins,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.GenerateService/GenerateTemplate", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.GenerateService/GenerateTemplate",
+ svc.GenerateTemplate,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.GenerateService/", mux
+}
+
+// UnimplementedGenerateServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedGenerateServiceHandler struct{}
+
+func (UnimplementedGenerateServiceHandler) GeneratePlugins(context.Context, *connect_go.Request[v1alpha1.GeneratePluginsRequest]) (*connect_go.Response[v1alpha1.GeneratePluginsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.GenerateService.GeneratePlugins is not implemented"))
+}
+
+func (UnimplementedGenerateServiceHandler) GenerateTemplate(context.Context, *connect_go.Request[v1alpha1.GenerateTemplateRequest]) (*connect_go.Response[v1alpha1.GenerateTemplateResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.GenerateService.GenerateTemplate is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/github.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/github.connect.go
new file mode 100644
index 000000000..d57595ffb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/github.connect.go
@@ -0,0 +1,103 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/github.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // GithubServiceName is the fully-qualified name of the GithubService service.
+ GithubServiceName = "buf.alpha.registry.v1alpha1.GithubService"
+)
+
+// GithubServiceClient is a client for the buf.alpha.registry.v1alpha1.GithubService service.
+type GithubServiceClient interface {
+ // GetGithubAppConfig returns a Github Application Configuration.
+ GetGithubAppConfig(context.Context, *connect_go.Request[v1alpha1.GetGithubAppConfigRequest]) (*connect_go.Response[v1alpha1.GetGithubAppConfigResponse], error)
+}
+
+// NewGithubServiceClient constructs a client for the buf.alpha.registry.v1alpha1.GithubService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewGithubServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) GithubServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &githubServiceClient{
+ getGithubAppConfig: connect_go.NewClient[v1alpha1.GetGithubAppConfigRequest, v1alpha1.GetGithubAppConfigResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.GithubService/GetGithubAppConfig",
+ opts...,
+ ),
+ }
+}
+
+// githubServiceClient implements GithubServiceClient.
+type githubServiceClient struct {
+ getGithubAppConfig *connect_go.Client[v1alpha1.GetGithubAppConfigRequest, v1alpha1.GetGithubAppConfigResponse]
+}
+
+// GetGithubAppConfig calls buf.alpha.registry.v1alpha1.GithubService.GetGithubAppConfig.
+func (c *githubServiceClient) GetGithubAppConfig(ctx context.Context, req *connect_go.Request[v1alpha1.GetGithubAppConfigRequest]) (*connect_go.Response[v1alpha1.GetGithubAppConfigResponse], error) {
+ return c.getGithubAppConfig.CallUnary(ctx, req)
+}
+
+// GithubServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.GithubService
+// service.
+type GithubServiceHandler interface {
+ // GetGithubAppConfig returns a Github Application Configuration.
+ GetGithubAppConfig(context.Context, *connect_go.Request[v1alpha1.GetGithubAppConfigRequest]) (*connect_go.Response[v1alpha1.GetGithubAppConfigResponse], error)
+}
+
+// NewGithubServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewGithubServiceHandler(svc GithubServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.GithubService/GetGithubAppConfig", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.GithubService/GetGithubAppConfig",
+ svc.GetGithubAppConfig,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.GithubService/", mux
+}
+
+// UnimplementedGithubServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedGithubServiceHandler struct{}
+
+func (UnimplementedGithubServiceHandler) GetGithubAppConfig(context.Context, *connect_go.Request[v1alpha1.GetGithubAppConfigRequest]) (*connect_go.Response[v1alpha1.GetGithubAppConfigResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.GithubService.GetGithubAppConfig is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/image.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/image.connect.go
new file mode 100644
index 000000000..f106a3495
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/image.connect.go
@@ -0,0 +1,104 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/image.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // ImageServiceName is the fully-qualified name of the ImageService service.
+ ImageServiceName = "buf.alpha.registry.v1alpha1.ImageService"
+)
+
+// ImageServiceClient is a client for the buf.alpha.registry.v1alpha1.ImageService service.
+type ImageServiceClient interface {
+ // GetImage serves a compiled image for the local module. It automatically
+ // downloads dependencies if necessary.
+ GetImage(context.Context, *connect_go.Request[v1alpha1.GetImageRequest]) (*connect_go.Response[v1alpha1.GetImageResponse], error)
+}
+
+// NewImageServiceClient constructs a client for the buf.alpha.registry.v1alpha1.ImageService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewImageServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ImageServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &imageServiceClient{
+ getImage: connect_go.NewClient[v1alpha1.GetImageRequest, v1alpha1.GetImageResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.ImageService/GetImage",
+ opts...,
+ ),
+ }
+}
+
+// imageServiceClient implements ImageServiceClient.
+type imageServiceClient struct {
+ getImage *connect_go.Client[v1alpha1.GetImageRequest, v1alpha1.GetImageResponse]
+}
+
+// GetImage calls buf.alpha.registry.v1alpha1.ImageService.GetImage.
+func (c *imageServiceClient) GetImage(ctx context.Context, req *connect_go.Request[v1alpha1.GetImageRequest]) (*connect_go.Response[v1alpha1.GetImageResponse], error) {
+ return c.getImage.CallUnary(ctx, req)
+}
+
+// ImageServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.ImageService service.
+type ImageServiceHandler interface {
+ // GetImage serves a compiled image for the local module. It automatically
+ // downloads dependencies if necessary.
+ GetImage(context.Context, *connect_go.Request[v1alpha1.GetImageRequest]) (*connect_go.Response[v1alpha1.GetImageResponse], error)
+}
+
+// NewImageServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewImageServiceHandler(svc ImageServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.ImageService/GetImage", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.ImageService/GetImage",
+ svc.GetImage,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.ImageService/", mux
+}
+
+// UnimplementedImageServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedImageServiceHandler struct{}
+
+func (UnimplementedImageServiceHandler) GetImage(context.Context, *connect_go.Request[v1alpha1.GetImageRequest]) (*connect_go.Response[v1alpha1.GetImageResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.ImageService.GetImage is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/jsonschema.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/jsonschema.connect.go
new file mode 100644
index 000000000..6ab009116
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/jsonschema.connect.go
@@ -0,0 +1,107 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/jsonschema.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // JSONSchemaServiceName is the fully-qualified name of the JSONSchemaService service.
+ JSONSchemaServiceName = "buf.alpha.registry.v1alpha1.JSONSchemaService"
+)
+
+// JSONSchemaServiceClient is a client for the buf.alpha.registry.v1alpha1.JSONSchemaService
+// service.
+type JSONSchemaServiceClient interface {
+ // GetJSONSchema allows users to get an (approximate) json schema for a
+ // protobuf type.
+ GetJSONSchema(context.Context, *connect_go.Request[v1alpha1.GetJSONSchemaRequest]) (*connect_go.Response[v1alpha1.GetJSONSchemaResponse], error)
+}
+
+// NewJSONSchemaServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.JSONSchemaService service. By default, it uses the Connect protocol
+// with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To
+// use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb()
+// options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewJSONSchemaServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) JSONSchemaServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &jSONSchemaServiceClient{
+ getJSONSchema: connect_go.NewClient[v1alpha1.GetJSONSchemaRequest, v1alpha1.GetJSONSchemaResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.JSONSchemaService/GetJSONSchema",
+ opts...,
+ ),
+ }
+}
+
+// jSONSchemaServiceClient implements JSONSchemaServiceClient.
+type jSONSchemaServiceClient struct {
+ getJSONSchema *connect_go.Client[v1alpha1.GetJSONSchemaRequest, v1alpha1.GetJSONSchemaResponse]
+}
+
+// GetJSONSchema calls buf.alpha.registry.v1alpha1.JSONSchemaService.GetJSONSchema.
+func (c *jSONSchemaServiceClient) GetJSONSchema(ctx context.Context, req *connect_go.Request[v1alpha1.GetJSONSchemaRequest]) (*connect_go.Response[v1alpha1.GetJSONSchemaResponse], error) {
+ return c.getJSONSchema.CallUnary(ctx, req)
+}
+
+// JSONSchemaServiceHandler is an implementation of the
+// buf.alpha.registry.v1alpha1.JSONSchemaService service.
+type JSONSchemaServiceHandler interface {
+ // GetJSONSchema allows users to get an (approximate) json schema for a
+ // protobuf type.
+ GetJSONSchema(context.Context, *connect_go.Request[v1alpha1.GetJSONSchemaRequest]) (*connect_go.Response[v1alpha1.GetJSONSchemaResponse], error)
+}
+
+// NewJSONSchemaServiceHandler builds an HTTP handler from the service implementation. It returns
+// the path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewJSONSchemaServiceHandler(svc JSONSchemaServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.JSONSchemaService/GetJSONSchema", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.JSONSchemaService/GetJSONSchema",
+ svc.GetJSONSchema,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.JSONSchemaService/", mux
+}
+
+// UnimplementedJSONSchemaServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedJSONSchemaServiceHandler struct{}
+
+func (UnimplementedJSONSchemaServiceHandler) GetJSONSchema(context.Context, *connect_go.Request[v1alpha1.GetJSONSchemaRequest]) (*connect_go.Response[v1alpha1.GetJSONSchemaResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.JSONSchemaService.GetJSONSchema is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/organization.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/organization.connect.go
new file mode 100644
index 000000000..9df9893ba
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/organization.connect.go
@@ -0,0 +1,402 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/organization.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // OrganizationServiceName is the fully-qualified name of the OrganizationService service.
+ OrganizationServiceName = "buf.alpha.registry.v1alpha1.OrganizationService"
+)
+
+// OrganizationServiceClient is a client for the buf.alpha.registry.v1alpha1.OrganizationService
+// service.
+type OrganizationServiceClient interface {
+ // GetOrganization gets a organization by ID.
+ GetOrganization(context.Context, *connect_go.Request[v1alpha1.GetOrganizationRequest]) (*connect_go.Response[v1alpha1.GetOrganizationResponse], error)
+ // GetOrganizationByName gets a organization by name.
+ GetOrganizationByName(context.Context, *connect_go.Request[v1alpha1.GetOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.GetOrganizationByNameResponse], error)
+ // ListOrganizations lists all organizations.
+ ListOrganizations(context.Context, *connect_go.Request[v1alpha1.ListOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationsResponse], error)
+ // ListUserOrganizations lists all organizations a user is member of.
+ ListUserOrganizations(context.Context, *connect_go.Request[v1alpha1.ListUserOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListUserOrganizationsResponse], error)
+ // CreateOrganization creates a new organization.
+ CreateOrganization(context.Context, *connect_go.Request[v1alpha1.CreateOrganizationRequest]) (*connect_go.Response[v1alpha1.CreateOrganizationResponse], error)
+ // DeleteOrganization deletes a organization.
+ DeleteOrganization(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationResponse], error)
+ // DeleteOrganizationByName deletes a organization by name.
+ DeleteOrganizationByName(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationByNameResponse], error)
+ // AddOrganizationMember add a role to an user in the organization.
+ AddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.AddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.AddOrganizationMemberResponse], error)
+ // UpdateOrganizationMember update the user's membership information in the organization.
+ UpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationMemberResponse], error)
+ // RemoveOrganizationMember remove the role of an user in the organization.
+ RemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.RemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationMemberResponse], error)
+ // SetOrganizationMember sets the role of a user in the organization.
+ SetOrganizationMember(context.Context, *connect_go.Request[v1alpha1.SetOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.SetOrganizationMemberResponse], error)
+ // GetOrganizationSettings gets the settings of an organization, including organization base roles.
+ GetOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.GetOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.GetOrganizationSettingsResponse], error)
+ // UpdateOrganizationSettings update the organization settings including base roles.
+ UpdateOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationSettingsResponse], error)
+}
+
+// NewOrganizationServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.OrganizationService service. By default, it uses the Connect protocol
+// with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To
+// use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb()
+// options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewOrganizationServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) OrganizationServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &organizationServiceClient{
+ getOrganization: connect_go.NewClient[v1alpha1.GetOrganizationRequest, v1alpha1.GetOrganizationResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/GetOrganization",
+ opts...,
+ ),
+ getOrganizationByName: connect_go.NewClient[v1alpha1.GetOrganizationByNameRequest, v1alpha1.GetOrganizationByNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/GetOrganizationByName",
+ opts...,
+ ),
+ listOrganizations: connect_go.NewClient[v1alpha1.ListOrganizationsRequest, v1alpha1.ListOrganizationsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/ListOrganizations",
+ opts...,
+ ),
+ listUserOrganizations: connect_go.NewClient[v1alpha1.ListUserOrganizationsRequest, v1alpha1.ListUserOrganizationsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/ListUserOrganizations",
+ opts...,
+ ),
+ createOrganization: connect_go.NewClient[v1alpha1.CreateOrganizationRequest, v1alpha1.CreateOrganizationResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/CreateOrganization",
+ opts...,
+ ),
+ deleteOrganization: connect_go.NewClient[v1alpha1.DeleteOrganizationRequest, v1alpha1.DeleteOrganizationResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/DeleteOrganization",
+ opts...,
+ ),
+ deleteOrganizationByName: connect_go.NewClient[v1alpha1.DeleteOrganizationByNameRequest, v1alpha1.DeleteOrganizationByNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/DeleteOrganizationByName",
+ opts...,
+ ),
+ addOrganizationMember: connect_go.NewClient[v1alpha1.AddOrganizationMemberRequest, v1alpha1.AddOrganizationMemberResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/AddOrganizationMember",
+ opts...,
+ ),
+ updateOrganizationMember: connect_go.NewClient[v1alpha1.UpdateOrganizationMemberRequest, v1alpha1.UpdateOrganizationMemberResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/UpdateOrganizationMember",
+ opts...,
+ ),
+ removeOrganizationMember: connect_go.NewClient[v1alpha1.RemoveOrganizationMemberRequest, v1alpha1.RemoveOrganizationMemberResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/RemoveOrganizationMember",
+ opts...,
+ ),
+ setOrganizationMember: connect_go.NewClient[v1alpha1.SetOrganizationMemberRequest, v1alpha1.SetOrganizationMemberResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/SetOrganizationMember",
+ opts...,
+ ),
+ getOrganizationSettings: connect_go.NewClient[v1alpha1.GetOrganizationSettingsRequest, v1alpha1.GetOrganizationSettingsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/GetOrganizationSettings",
+ opts...,
+ ),
+ updateOrganizationSettings: connect_go.NewClient[v1alpha1.UpdateOrganizationSettingsRequest, v1alpha1.UpdateOrganizationSettingsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OrganizationService/UpdateOrganizationSettings",
+ opts...,
+ ),
+ }
+}
+
+// organizationServiceClient implements OrganizationServiceClient.
+type organizationServiceClient struct {
+ getOrganization *connect_go.Client[v1alpha1.GetOrganizationRequest, v1alpha1.GetOrganizationResponse]
+ getOrganizationByName *connect_go.Client[v1alpha1.GetOrganizationByNameRequest, v1alpha1.GetOrganizationByNameResponse]
+ listOrganizations *connect_go.Client[v1alpha1.ListOrganizationsRequest, v1alpha1.ListOrganizationsResponse]
+ listUserOrganizations *connect_go.Client[v1alpha1.ListUserOrganizationsRequest, v1alpha1.ListUserOrganizationsResponse]
+ createOrganization *connect_go.Client[v1alpha1.CreateOrganizationRequest, v1alpha1.CreateOrganizationResponse]
+ deleteOrganization *connect_go.Client[v1alpha1.DeleteOrganizationRequest, v1alpha1.DeleteOrganizationResponse]
+ deleteOrganizationByName *connect_go.Client[v1alpha1.DeleteOrganizationByNameRequest, v1alpha1.DeleteOrganizationByNameResponse]
+ addOrganizationMember *connect_go.Client[v1alpha1.AddOrganizationMemberRequest, v1alpha1.AddOrganizationMemberResponse]
+ updateOrganizationMember *connect_go.Client[v1alpha1.UpdateOrganizationMemberRequest, v1alpha1.UpdateOrganizationMemberResponse]
+ removeOrganizationMember *connect_go.Client[v1alpha1.RemoveOrganizationMemberRequest, v1alpha1.RemoveOrganizationMemberResponse]
+ setOrganizationMember *connect_go.Client[v1alpha1.SetOrganizationMemberRequest, v1alpha1.SetOrganizationMemberResponse]
+ getOrganizationSettings *connect_go.Client[v1alpha1.GetOrganizationSettingsRequest, v1alpha1.GetOrganizationSettingsResponse]
+ updateOrganizationSettings *connect_go.Client[v1alpha1.UpdateOrganizationSettingsRequest, v1alpha1.UpdateOrganizationSettingsResponse]
+}
+
+// GetOrganization calls buf.alpha.registry.v1alpha1.OrganizationService.GetOrganization.
+func (c *organizationServiceClient) GetOrganization(ctx context.Context, req *connect_go.Request[v1alpha1.GetOrganizationRequest]) (*connect_go.Response[v1alpha1.GetOrganizationResponse], error) {
+ return c.getOrganization.CallUnary(ctx, req)
+}
+
+// GetOrganizationByName calls
+// buf.alpha.registry.v1alpha1.OrganizationService.GetOrganizationByName.
+func (c *organizationServiceClient) GetOrganizationByName(ctx context.Context, req *connect_go.Request[v1alpha1.GetOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.GetOrganizationByNameResponse], error) {
+ return c.getOrganizationByName.CallUnary(ctx, req)
+}
+
+// ListOrganizations calls buf.alpha.registry.v1alpha1.OrganizationService.ListOrganizations.
+func (c *organizationServiceClient) ListOrganizations(ctx context.Context, req *connect_go.Request[v1alpha1.ListOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationsResponse], error) {
+ return c.listOrganizations.CallUnary(ctx, req)
+}
+
+// ListUserOrganizations calls
+// buf.alpha.registry.v1alpha1.OrganizationService.ListUserOrganizations.
+func (c *organizationServiceClient) ListUserOrganizations(ctx context.Context, req *connect_go.Request[v1alpha1.ListUserOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListUserOrganizationsResponse], error) {
+ return c.listUserOrganizations.CallUnary(ctx, req)
+}
+
+// CreateOrganization calls buf.alpha.registry.v1alpha1.OrganizationService.CreateOrganization.
+func (c *organizationServiceClient) CreateOrganization(ctx context.Context, req *connect_go.Request[v1alpha1.CreateOrganizationRequest]) (*connect_go.Response[v1alpha1.CreateOrganizationResponse], error) {
+ return c.createOrganization.CallUnary(ctx, req)
+}
+
+// DeleteOrganization calls buf.alpha.registry.v1alpha1.OrganizationService.DeleteOrganization.
+func (c *organizationServiceClient) DeleteOrganization(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationResponse], error) {
+ return c.deleteOrganization.CallUnary(ctx, req)
+}
+
+// DeleteOrganizationByName calls
+// buf.alpha.registry.v1alpha1.OrganizationService.DeleteOrganizationByName.
+func (c *organizationServiceClient) DeleteOrganizationByName(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationByNameResponse], error) {
+ return c.deleteOrganizationByName.CallUnary(ctx, req)
+}
+
+// AddOrganizationMember calls
+// buf.alpha.registry.v1alpha1.OrganizationService.AddOrganizationMember.
+func (c *organizationServiceClient) AddOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.AddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.AddOrganizationMemberResponse], error) {
+ return c.addOrganizationMember.CallUnary(ctx, req)
+}
+
+// UpdateOrganizationMember calls
+// buf.alpha.registry.v1alpha1.OrganizationService.UpdateOrganizationMember.
+func (c *organizationServiceClient) UpdateOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.UpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationMemberResponse], error) {
+ return c.updateOrganizationMember.CallUnary(ctx, req)
+}
+
+// RemoveOrganizationMember calls
+// buf.alpha.registry.v1alpha1.OrganizationService.RemoveOrganizationMember.
+func (c *organizationServiceClient) RemoveOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.RemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationMemberResponse], error) {
+ return c.removeOrganizationMember.CallUnary(ctx, req)
+}
+
+// SetOrganizationMember calls
+// buf.alpha.registry.v1alpha1.OrganizationService.SetOrganizationMember.
+func (c *organizationServiceClient) SetOrganizationMember(ctx context.Context, req *connect_go.Request[v1alpha1.SetOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.SetOrganizationMemberResponse], error) {
+ return c.setOrganizationMember.CallUnary(ctx, req)
+}
+
+// GetOrganizationSettings calls
+// buf.alpha.registry.v1alpha1.OrganizationService.GetOrganizationSettings.
+func (c *organizationServiceClient) GetOrganizationSettings(ctx context.Context, req *connect_go.Request[v1alpha1.GetOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.GetOrganizationSettingsResponse], error) {
+ return c.getOrganizationSettings.CallUnary(ctx, req)
+}
+
+// UpdateOrganizationSettings calls
+// buf.alpha.registry.v1alpha1.OrganizationService.UpdateOrganizationSettings.
+func (c *organizationServiceClient) UpdateOrganizationSettings(ctx context.Context, req *connect_go.Request[v1alpha1.UpdateOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationSettingsResponse], error) {
+ return c.updateOrganizationSettings.CallUnary(ctx, req)
+}
+
+// OrganizationServiceHandler is an implementation of the
+// buf.alpha.registry.v1alpha1.OrganizationService service.
+type OrganizationServiceHandler interface {
+ // GetOrganization gets a organization by ID.
+ GetOrganization(context.Context, *connect_go.Request[v1alpha1.GetOrganizationRequest]) (*connect_go.Response[v1alpha1.GetOrganizationResponse], error)
+ // GetOrganizationByName gets a organization by name.
+ GetOrganizationByName(context.Context, *connect_go.Request[v1alpha1.GetOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.GetOrganizationByNameResponse], error)
+ // ListOrganizations lists all organizations.
+ ListOrganizations(context.Context, *connect_go.Request[v1alpha1.ListOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationsResponse], error)
+ // ListUserOrganizations lists all organizations a user is member of.
+ ListUserOrganizations(context.Context, *connect_go.Request[v1alpha1.ListUserOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListUserOrganizationsResponse], error)
+ // CreateOrganization creates a new organization.
+ CreateOrganization(context.Context, *connect_go.Request[v1alpha1.CreateOrganizationRequest]) (*connect_go.Response[v1alpha1.CreateOrganizationResponse], error)
+ // DeleteOrganization deletes a organization.
+ DeleteOrganization(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationResponse], error)
+ // DeleteOrganizationByName deletes a organization by name.
+ DeleteOrganizationByName(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationByNameResponse], error)
+ // AddOrganizationMember add a role to an user in the organization.
+ AddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.AddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.AddOrganizationMemberResponse], error)
+ // UpdateOrganizationMember update the user's membership information in the organization.
+ UpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationMemberResponse], error)
+ // RemoveOrganizationMember remove the role of an user in the organization.
+ RemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.RemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationMemberResponse], error)
+ // SetOrganizationMember sets the role of a user in the organization.
+ SetOrganizationMember(context.Context, *connect_go.Request[v1alpha1.SetOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.SetOrganizationMemberResponse], error)
+ // GetOrganizationSettings gets the settings of an organization, including organization base roles.
+ GetOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.GetOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.GetOrganizationSettingsResponse], error)
+ // UpdateOrganizationSettings update the organization settings including base roles.
+ UpdateOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationSettingsResponse], error)
+}
+
+// NewOrganizationServiceHandler builds an HTTP handler from the service implementation. It returns
+// the path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewOrganizationServiceHandler(svc OrganizationServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/GetOrganization", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/GetOrganization",
+ svc.GetOrganization,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/GetOrganizationByName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/GetOrganizationByName",
+ svc.GetOrganizationByName,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/ListOrganizations", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/ListOrganizations",
+ svc.ListOrganizations,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/ListUserOrganizations", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/ListUserOrganizations",
+ svc.ListUserOrganizations,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/CreateOrganization", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/CreateOrganization",
+ svc.CreateOrganization,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/DeleteOrganization", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/DeleteOrganization",
+ svc.DeleteOrganization,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/DeleteOrganizationByName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/DeleteOrganizationByName",
+ svc.DeleteOrganizationByName,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/AddOrganizationMember", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/AddOrganizationMember",
+ svc.AddOrganizationMember,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/UpdateOrganizationMember", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/UpdateOrganizationMember",
+ svc.UpdateOrganizationMember,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/RemoveOrganizationMember", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/RemoveOrganizationMember",
+ svc.RemoveOrganizationMember,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/SetOrganizationMember", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/SetOrganizationMember",
+ svc.SetOrganizationMember,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/GetOrganizationSettings", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/GetOrganizationSettings",
+ svc.GetOrganizationSettings,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.OrganizationService/UpdateOrganizationSettings", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OrganizationService/UpdateOrganizationSettings",
+ svc.UpdateOrganizationSettings,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.OrganizationService/", mux
+}
+
+// UnimplementedOrganizationServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedOrganizationServiceHandler struct{}
+
+func (UnimplementedOrganizationServiceHandler) GetOrganization(context.Context, *connect_go.Request[v1alpha1.GetOrganizationRequest]) (*connect_go.Response[v1alpha1.GetOrganizationResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.GetOrganization is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) GetOrganizationByName(context.Context, *connect_go.Request[v1alpha1.GetOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.GetOrganizationByNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.GetOrganizationByName is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) ListOrganizations(context.Context, *connect_go.Request[v1alpha1.ListOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.ListOrganizations is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) ListUserOrganizations(context.Context, *connect_go.Request[v1alpha1.ListUserOrganizationsRequest]) (*connect_go.Response[v1alpha1.ListUserOrganizationsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.ListUserOrganizations is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) CreateOrganization(context.Context, *connect_go.Request[v1alpha1.CreateOrganizationRequest]) (*connect_go.Response[v1alpha1.CreateOrganizationResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.CreateOrganization is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) DeleteOrganization(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.DeleteOrganization is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) DeleteOrganizationByName(context.Context, *connect_go.Request[v1alpha1.DeleteOrganizationByNameRequest]) (*connect_go.Response[v1alpha1.DeleteOrganizationByNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.DeleteOrganizationByName is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) AddOrganizationMember(context.Context, *connect_go.Request[v1alpha1.AddOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.AddOrganizationMemberResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.AddOrganizationMember is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) UpdateOrganizationMember(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationMemberResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.UpdateOrganizationMember is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) RemoveOrganizationMember(context.Context, *connect_go.Request[v1alpha1.RemoveOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.RemoveOrganizationMemberResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.RemoveOrganizationMember is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) SetOrganizationMember(context.Context, *connect_go.Request[v1alpha1.SetOrganizationMemberRequest]) (*connect_go.Response[v1alpha1.SetOrganizationMemberResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.SetOrganizationMember is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) GetOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.GetOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.GetOrganizationSettingsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.GetOrganizationSettings is not implemented"))
+}
+
+func (UnimplementedOrganizationServiceHandler) UpdateOrganizationSettings(context.Context, *connect_go.Request[v1alpha1.UpdateOrganizationSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateOrganizationSettingsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OrganizationService.UpdateOrganizationSettings is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/owner.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/owner.connect.go
new file mode 100644
index 000000000..05dd28f19
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/owner.connect.go
@@ -0,0 +1,104 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/owner.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // OwnerServiceName is the fully-qualified name of the OwnerService service.
+ OwnerServiceName = "buf.alpha.registry.v1alpha1.OwnerService"
+)
+
+// OwnerServiceClient is a client for the buf.alpha.registry.v1alpha1.OwnerService service.
+type OwnerServiceClient interface {
+ // GetOwnerByName takes an owner name and returns the owner as
+ // either a user or organization.
+ GetOwnerByName(context.Context, *connect_go.Request[v1alpha1.GetOwnerByNameRequest]) (*connect_go.Response[v1alpha1.GetOwnerByNameResponse], error)
+}
+
+// NewOwnerServiceClient constructs a client for the buf.alpha.registry.v1alpha1.OwnerService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewOwnerServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) OwnerServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &ownerServiceClient{
+ getOwnerByName: connect_go.NewClient[v1alpha1.GetOwnerByNameRequest, v1alpha1.GetOwnerByNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.OwnerService/GetOwnerByName",
+ opts...,
+ ),
+ }
+}
+
+// ownerServiceClient implements OwnerServiceClient.
+type ownerServiceClient struct {
+ getOwnerByName *connect_go.Client[v1alpha1.GetOwnerByNameRequest, v1alpha1.GetOwnerByNameResponse]
+}
+
+// GetOwnerByName calls buf.alpha.registry.v1alpha1.OwnerService.GetOwnerByName.
+func (c *ownerServiceClient) GetOwnerByName(ctx context.Context, req *connect_go.Request[v1alpha1.GetOwnerByNameRequest]) (*connect_go.Response[v1alpha1.GetOwnerByNameResponse], error) {
+ return c.getOwnerByName.CallUnary(ctx, req)
+}
+
+// OwnerServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.OwnerService service.
+type OwnerServiceHandler interface {
+ // GetOwnerByName takes an owner name and returns the owner as
+ // either a user or organization.
+ GetOwnerByName(context.Context, *connect_go.Request[v1alpha1.GetOwnerByNameRequest]) (*connect_go.Response[v1alpha1.GetOwnerByNameResponse], error)
+}
+
+// NewOwnerServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewOwnerServiceHandler(svc OwnerServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.OwnerService/GetOwnerByName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.OwnerService/GetOwnerByName",
+ svc.GetOwnerByName,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.OwnerService/", mux
+}
+
+// UnimplementedOwnerServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedOwnerServiceHandler struct{}
+
+func (UnimplementedOwnerServiceHandler) GetOwnerByName(context.Context, *connect_go.Request[v1alpha1.GetOwnerByNameRequest]) (*connect_go.Response[v1alpha1.GetOwnerByNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.OwnerService.GetOwnerByName is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/plugin.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/plugin.connect.go
new file mode 100644
index 000000000..5a1fb06f9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/plugin.connect.go
@@ -0,0 +1,728 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// buf/alpha/registry/v1alpha1/plugin.proto is a deprecated file.
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // PluginServiceName is the fully-qualified name of the PluginService service.
+ PluginServiceName = "buf.alpha.registry.v1alpha1.PluginService"
+)
+
+// PluginServiceClient is a client for the buf.alpha.registry.v1alpha1.PluginService service.
+type PluginServiceClient interface {
+ // ListPlugins returns all the plugins available to the user. This includes
+ // public plugins, those uploaded to organizations the user is part of,
+ // and any plugins uploaded directly by the user.
+ ListPlugins(context.Context, *connect_go.Request[v1alpha1.ListPluginsRequest]) (*connect_go.Response[v1alpha1.ListPluginsResponse], error)
+ // ListUserPlugins lists all plugins belonging to a user.
+ ListUserPlugins(context.Context, *connect_go.Request[v1alpha1.ListUserPluginsRequest]) (*connect_go.Response[v1alpha1.ListUserPluginsResponse], error)
+ // ListOrganizationPlugins lists all plugins for an organization.
+ ListOrganizationPlugins(context.Context, *connect_go.Request[v1alpha1.ListOrganizationPluginsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationPluginsResponse], error)
+ // GetPluginVersion returns the plugin version, if found.
+ GetPluginVersion(context.Context, *connect_go.Request[v1alpha1.GetPluginVersionRequest]) (*connect_go.Response[v1alpha1.GetPluginVersionResponse], error)
+ // ListPluginVersions lists all the versions available for the specified plugin.
+ ListPluginVersions(context.Context, *connect_go.Request[v1alpha1.ListPluginVersionsRequest]) (*connect_go.Response[v1alpha1.ListPluginVersionsResponse], error)
+ // CreatePlugin creates a new plugin.
+ CreatePlugin(context.Context, *connect_go.Request[v1alpha1.CreatePluginRequest]) (*connect_go.Response[v1alpha1.CreatePluginResponse], error)
+ // GetPlugin returns the plugin, if found.
+ GetPlugin(context.Context, *connect_go.Request[v1alpha1.GetPluginRequest]) (*connect_go.Response[v1alpha1.GetPluginResponse], error)
+ // DeletePlugin deletes the plugin, if it exists. Note that deleting
+ // a plugin may cause breaking changes for templates using that plugin,
+ // and should be done with extreme care.
+ DeletePlugin(context.Context, *connect_go.Request[v1alpha1.DeletePluginRequest]) (*connect_go.Response[v1alpha1.DeletePluginResponse], error)
+ // SetPluginContributor sets the role of a user in the plugin.
+ SetPluginContributor(context.Context, *connect_go.Request[v1alpha1.SetPluginContributorRequest]) (*connect_go.Response[v1alpha1.SetPluginContributorResponse], error)
+ // ListPluginContributors returns the list of contributors that has an explicit role against the plugin.
+ // This does not include users who have implicit roles against the plugin, unless they have also been
+ // assigned a role explicitly.
+ ListPluginContributors(context.Context, *connect_go.Request[v1alpha1.ListPluginContributorsRequest]) (*connect_go.Response[v1alpha1.ListPluginContributorsResponse], error)
+ // DeprecatePlugin deprecates the plugin, if found.
+ DeprecatePlugin(context.Context, *connect_go.Request[v1alpha1.DeprecatePluginRequest]) (*connect_go.Response[v1alpha1.DeprecatePluginResponse], error)
+ // UndeprecatePlugin makes the plugin not deprecated and removes any deprecation_message.
+ UndeprecatePlugin(context.Context, *connect_go.Request[v1alpha1.UndeprecatePluginRequest]) (*connect_go.Response[v1alpha1.UndeprecatePluginResponse], error)
+ // GetTemplate returns the template, if found.
+ GetTemplate(context.Context, *connect_go.Request[v1alpha1.GetTemplateRequest]) (*connect_go.Response[v1alpha1.GetTemplateResponse], error)
+ // ListTemplates returns all the templates available to the user. This includes
+ // public templates, those owned by organizations the user is part of,
+ // and any created directly by the user.
+ ListTemplates(context.Context, *connect_go.Request[v1alpha1.ListTemplatesRequest]) (*connect_go.Response[v1alpha1.ListTemplatesResponse], error)
+ // ListTemplatesUserCanAccess is like ListTemplates, but does not return
+ // public templates.
+ ListTemplatesUserCanAccess(context.Context, *connect_go.Request[v1alpha1.ListTemplatesUserCanAccessRequest]) (*connect_go.Response[v1alpha1.ListTemplatesUserCanAccessResponse], error)
+ // ListUserPlugins lists all templates belonging to a user.
+ ListUserTemplates(context.Context, *connect_go.Request[v1alpha1.ListUserTemplatesRequest]) (*connect_go.Response[v1alpha1.ListUserTemplatesResponse], error)
+ // ListOrganizationTemplates lists all templates for an organization.
+ ListOrganizationTemplates(context.Context, *connect_go.Request[v1alpha1.ListOrganizationTemplatesRequest]) (*connect_go.Response[v1alpha1.ListOrganizationTemplatesResponse], error)
+ // GetTemplateVersion returns the template version, if found.
+ GetTemplateVersion(context.Context, *connect_go.Request[v1alpha1.GetTemplateVersionRequest]) (*connect_go.Response[v1alpha1.GetTemplateVersionResponse], error)
+ // ListTemplateVersions lists all the template versions available for the specified template.
+ ListTemplateVersions(context.Context, *connect_go.Request[v1alpha1.ListTemplateVersionsRequest]) (*connect_go.Response[v1alpha1.ListTemplateVersionsResponse], error)
+ // CreateTemplate creates a new template.
+ CreateTemplate(context.Context, *connect_go.Request[v1alpha1.CreateTemplateRequest]) (*connect_go.Response[v1alpha1.CreateTemplateResponse], error)
+ // DeleteTemplate deletes the template, if it exists.
+ DeleteTemplate(context.Context, *connect_go.Request[v1alpha1.DeleteTemplateRequest]) (*connect_go.Response[v1alpha1.DeleteTemplateResponse], error)
+ // CreateTemplateVersion creates a new template version.
+ CreateTemplateVersion(context.Context, *connect_go.Request[v1alpha1.CreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.CreateTemplateVersionResponse], error)
+ // SetTemplateContributor sets the role of a user in the template.
+ SetTemplateContributor(context.Context, *connect_go.Request[v1alpha1.SetTemplateContributorRequest]) (*connect_go.Response[v1alpha1.SetTemplateContributorResponse], error)
+ // ListTemplateContributors returns the list of contributors that has an explicit role against the template.
+ // This does not include users who have implicit roles against the template, unless they have also been
+ // assigned a role explicitly.
+ ListTemplateContributors(context.Context, *connect_go.Request[v1alpha1.ListTemplateContributorsRequest]) (*connect_go.Response[v1alpha1.ListTemplateContributorsResponse], error)
+ // DeprecateTemplate deprecates the template, if found.
+ DeprecateTemplate(context.Context, *connect_go.Request[v1alpha1.DeprecateTemplateRequest]) (*connect_go.Response[v1alpha1.DeprecateTemplateResponse], error)
+ // UndeprecateTemplate makes the template not deprecated and removes any deprecation_message.
+ UndeprecateTemplate(context.Context, *connect_go.Request[v1alpha1.UndeprecateTemplateRequest]) (*connect_go.Response[v1alpha1.UndeprecateTemplateResponse], error)
+}
+
+// NewPluginServiceClient constructs a client for the buf.alpha.registry.v1alpha1.PluginService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewPluginServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) PluginServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &pluginServiceClient{
+ listPlugins: connect_go.NewClient[v1alpha1.ListPluginsRequest, v1alpha1.ListPluginsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListPlugins",
+ opts...,
+ ),
+ listUserPlugins: connect_go.NewClient[v1alpha1.ListUserPluginsRequest, v1alpha1.ListUserPluginsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListUserPlugins",
+ opts...,
+ ),
+ listOrganizationPlugins: connect_go.NewClient[v1alpha1.ListOrganizationPluginsRequest, v1alpha1.ListOrganizationPluginsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListOrganizationPlugins",
+ opts...,
+ ),
+ getPluginVersion: connect_go.NewClient[v1alpha1.GetPluginVersionRequest, v1alpha1.GetPluginVersionResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/GetPluginVersion",
+ opts...,
+ ),
+ listPluginVersions: connect_go.NewClient[v1alpha1.ListPluginVersionsRequest, v1alpha1.ListPluginVersionsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListPluginVersions",
+ opts...,
+ ),
+ createPlugin: connect_go.NewClient[v1alpha1.CreatePluginRequest, v1alpha1.CreatePluginResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/CreatePlugin",
+ opts...,
+ ),
+ getPlugin: connect_go.NewClient[v1alpha1.GetPluginRequest, v1alpha1.GetPluginResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/GetPlugin",
+ opts...,
+ ),
+ deletePlugin: connect_go.NewClient[v1alpha1.DeletePluginRequest, v1alpha1.DeletePluginResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/DeletePlugin",
+ opts...,
+ ),
+ setPluginContributor: connect_go.NewClient[v1alpha1.SetPluginContributorRequest, v1alpha1.SetPluginContributorResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/SetPluginContributor",
+ opts...,
+ ),
+ listPluginContributors: connect_go.NewClient[v1alpha1.ListPluginContributorsRequest, v1alpha1.ListPluginContributorsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListPluginContributors",
+ opts...,
+ ),
+ deprecatePlugin: connect_go.NewClient[v1alpha1.DeprecatePluginRequest, v1alpha1.DeprecatePluginResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/DeprecatePlugin",
+ opts...,
+ ),
+ undeprecatePlugin: connect_go.NewClient[v1alpha1.UndeprecatePluginRequest, v1alpha1.UndeprecatePluginResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/UndeprecatePlugin",
+ opts...,
+ ),
+ getTemplate: connect_go.NewClient[v1alpha1.GetTemplateRequest, v1alpha1.GetTemplateResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/GetTemplate",
+ opts...,
+ ),
+ listTemplates: connect_go.NewClient[v1alpha1.ListTemplatesRequest, v1alpha1.ListTemplatesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListTemplates",
+ opts...,
+ ),
+ listTemplatesUserCanAccess: connect_go.NewClient[v1alpha1.ListTemplatesUserCanAccessRequest, v1alpha1.ListTemplatesUserCanAccessResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListTemplatesUserCanAccess",
+ opts...,
+ ),
+ listUserTemplates: connect_go.NewClient[v1alpha1.ListUserTemplatesRequest, v1alpha1.ListUserTemplatesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListUserTemplates",
+ opts...,
+ ),
+ listOrganizationTemplates: connect_go.NewClient[v1alpha1.ListOrganizationTemplatesRequest, v1alpha1.ListOrganizationTemplatesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListOrganizationTemplates",
+ opts...,
+ ),
+ getTemplateVersion: connect_go.NewClient[v1alpha1.GetTemplateVersionRequest, v1alpha1.GetTemplateVersionResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/GetTemplateVersion",
+ opts...,
+ ),
+ listTemplateVersions: connect_go.NewClient[v1alpha1.ListTemplateVersionsRequest, v1alpha1.ListTemplateVersionsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListTemplateVersions",
+ opts...,
+ ),
+ createTemplate: connect_go.NewClient[v1alpha1.CreateTemplateRequest, v1alpha1.CreateTemplateResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/CreateTemplate",
+ opts...,
+ ),
+ deleteTemplate: connect_go.NewClient[v1alpha1.DeleteTemplateRequest, v1alpha1.DeleteTemplateResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/DeleteTemplate",
+ opts...,
+ ),
+ createTemplateVersion: connect_go.NewClient[v1alpha1.CreateTemplateVersionRequest, v1alpha1.CreateTemplateVersionResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/CreateTemplateVersion",
+ opts...,
+ ),
+ setTemplateContributor: connect_go.NewClient[v1alpha1.SetTemplateContributorRequest, v1alpha1.SetTemplateContributorResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/SetTemplateContributor",
+ opts...,
+ ),
+ listTemplateContributors: connect_go.NewClient[v1alpha1.ListTemplateContributorsRequest, v1alpha1.ListTemplateContributorsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/ListTemplateContributors",
+ opts...,
+ ),
+ deprecateTemplate: connect_go.NewClient[v1alpha1.DeprecateTemplateRequest, v1alpha1.DeprecateTemplateResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/DeprecateTemplate",
+ opts...,
+ ),
+ undeprecateTemplate: connect_go.NewClient[v1alpha1.UndeprecateTemplateRequest, v1alpha1.UndeprecateTemplateResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginService/UndeprecateTemplate",
+ opts...,
+ ),
+ }
+}
+
+// pluginServiceClient implements PluginServiceClient.
+type pluginServiceClient struct {
+ listPlugins *connect_go.Client[v1alpha1.ListPluginsRequest, v1alpha1.ListPluginsResponse]
+ listUserPlugins *connect_go.Client[v1alpha1.ListUserPluginsRequest, v1alpha1.ListUserPluginsResponse]
+ listOrganizationPlugins *connect_go.Client[v1alpha1.ListOrganizationPluginsRequest, v1alpha1.ListOrganizationPluginsResponse]
+ getPluginVersion *connect_go.Client[v1alpha1.GetPluginVersionRequest, v1alpha1.GetPluginVersionResponse]
+ listPluginVersions *connect_go.Client[v1alpha1.ListPluginVersionsRequest, v1alpha1.ListPluginVersionsResponse]
+ createPlugin *connect_go.Client[v1alpha1.CreatePluginRequest, v1alpha1.CreatePluginResponse]
+ getPlugin *connect_go.Client[v1alpha1.GetPluginRequest, v1alpha1.GetPluginResponse]
+ deletePlugin *connect_go.Client[v1alpha1.DeletePluginRequest, v1alpha1.DeletePluginResponse]
+ setPluginContributor *connect_go.Client[v1alpha1.SetPluginContributorRequest, v1alpha1.SetPluginContributorResponse]
+ listPluginContributors *connect_go.Client[v1alpha1.ListPluginContributorsRequest, v1alpha1.ListPluginContributorsResponse]
+ deprecatePlugin *connect_go.Client[v1alpha1.DeprecatePluginRequest, v1alpha1.DeprecatePluginResponse]
+ undeprecatePlugin *connect_go.Client[v1alpha1.UndeprecatePluginRequest, v1alpha1.UndeprecatePluginResponse]
+ getTemplate *connect_go.Client[v1alpha1.GetTemplateRequest, v1alpha1.GetTemplateResponse]
+ listTemplates *connect_go.Client[v1alpha1.ListTemplatesRequest, v1alpha1.ListTemplatesResponse]
+ listTemplatesUserCanAccess *connect_go.Client[v1alpha1.ListTemplatesUserCanAccessRequest, v1alpha1.ListTemplatesUserCanAccessResponse]
+ listUserTemplates *connect_go.Client[v1alpha1.ListUserTemplatesRequest, v1alpha1.ListUserTemplatesResponse]
+ listOrganizationTemplates *connect_go.Client[v1alpha1.ListOrganizationTemplatesRequest, v1alpha1.ListOrganizationTemplatesResponse]
+ getTemplateVersion *connect_go.Client[v1alpha1.GetTemplateVersionRequest, v1alpha1.GetTemplateVersionResponse]
+ listTemplateVersions *connect_go.Client[v1alpha1.ListTemplateVersionsRequest, v1alpha1.ListTemplateVersionsResponse]
+ createTemplate *connect_go.Client[v1alpha1.CreateTemplateRequest, v1alpha1.CreateTemplateResponse]
+ deleteTemplate *connect_go.Client[v1alpha1.DeleteTemplateRequest, v1alpha1.DeleteTemplateResponse]
+ createTemplateVersion *connect_go.Client[v1alpha1.CreateTemplateVersionRequest, v1alpha1.CreateTemplateVersionResponse]
+ setTemplateContributor *connect_go.Client[v1alpha1.SetTemplateContributorRequest, v1alpha1.SetTemplateContributorResponse]
+ listTemplateContributors *connect_go.Client[v1alpha1.ListTemplateContributorsRequest, v1alpha1.ListTemplateContributorsResponse]
+ deprecateTemplate *connect_go.Client[v1alpha1.DeprecateTemplateRequest, v1alpha1.DeprecateTemplateResponse]
+ undeprecateTemplate *connect_go.Client[v1alpha1.UndeprecateTemplateRequest, v1alpha1.UndeprecateTemplateResponse]
+}
+
+// ListPlugins calls buf.alpha.registry.v1alpha1.PluginService.ListPlugins.
+func (c *pluginServiceClient) ListPlugins(ctx context.Context, req *connect_go.Request[v1alpha1.ListPluginsRequest]) (*connect_go.Response[v1alpha1.ListPluginsResponse], error) {
+ return c.listPlugins.CallUnary(ctx, req)
+}
+
+// ListUserPlugins calls buf.alpha.registry.v1alpha1.PluginService.ListUserPlugins.
+func (c *pluginServiceClient) ListUserPlugins(ctx context.Context, req *connect_go.Request[v1alpha1.ListUserPluginsRequest]) (*connect_go.Response[v1alpha1.ListUserPluginsResponse], error) {
+ return c.listUserPlugins.CallUnary(ctx, req)
+}
+
+// ListOrganizationPlugins calls buf.alpha.registry.v1alpha1.PluginService.ListOrganizationPlugins.
+func (c *pluginServiceClient) ListOrganizationPlugins(ctx context.Context, req *connect_go.Request[v1alpha1.ListOrganizationPluginsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationPluginsResponse], error) {
+ return c.listOrganizationPlugins.CallUnary(ctx, req)
+}
+
+// GetPluginVersion calls buf.alpha.registry.v1alpha1.PluginService.GetPluginVersion.
+func (c *pluginServiceClient) GetPluginVersion(ctx context.Context, req *connect_go.Request[v1alpha1.GetPluginVersionRequest]) (*connect_go.Response[v1alpha1.GetPluginVersionResponse], error) {
+ return c.getPluginVersion.CallUnary(ctx, req)
+}
+
+// ListPluginVersions calls buf.alpha.registry.v1alpha1.PluginService.ListPluginVersions.
+func (c *pluginServiceClient) ListPluginVersions(ctx context.Context, req *connect_go.Request[v1alpha1.ListPluginVersionsRequest]) (*connect_go.Response[v1alpha1.ListPluginVersionsResponse], error) {
+ return c.listPluginVersions.CallUnary(ctx, req)
+}
+
+// CreatePlugin calls buf.alpha.registry.v1alpha1.PluginService.CreatePlugin.
+func (c *pluginServiceClient) CreatePlugin(ctx context.Context, req *connect_go.Request[v1alpha1.CreatePluginRequest]) (*connect_go.Response[v1alpha1.CreatePluginResponse], error) {
+ return c.createPlugin.CallUnary(ctx, req)
+}
+
+// GetPlugin calls buf.alpha.registry.v1alpha1.PluginService.GetPlugin.
+func (c *pluginServiceClient) GetPlugin(ctx context.Context, req *connect_go.Request[v1alpha1.GetPluginRequest]) (*connect_go.Response[v1alpha1.GetPluginResponse], error) {
+ return c.getPlugin.CallUnary(ctx, req)
+}
+
+// DeletePlugin calls buf.alpha.registry.v1alpha1.PluginService.DeletePlugin.
+func (c *pluginServiceClient) DeletePlugin(ctx context.Context, req *connect_go.Request[v1alpha1.DeletePluginRequest]) (*connect_go.Response[v1alpha1.DeletePluginResponse], error) {
+ return c.deletePlugin.CallUnary(ctx, req)
+}
+
+// SetPluginContributor calls buf.alpha.registry.v1alpha1.PluginService.SetPluginContributor.
+func (c *pluginServiceClient) SetPluginContributor(ctx context.Context, req *connect_go.Request[v1alpha1.SetPluginContributorRequest]) (*connect_go.Response[v1alpha1.SetPluginContributorResponse], error) {
+ return c.setPluginContributor.CallUnary(ctx, req)
+}
+
+// ListPluginContributors calls buf.alpha.registry.v1alpha1.PluginService.ListPluginContributors.
+func (c *pluginServiceClient) ListPluginContributors(ctx context.Context, req *connect_go.Request[v1alpha1.ListPluginContributorsRequest]) (*connect_go.Response[v1alpha1.ListPluginContributorsResponse], error) {
+ return c.listPluginContributors.CallUnary(ctx, req)
+}
+
+// DeprecatePlugin calls buf.alpha.registry.v1alpha1.PluginService.DeprecatePlugin.
+func (c *pluginServiceClient) DeprecatePlugin(ctx context.Context, req *connect_go.Request[v1alpha1.DeprecatePluginRequest]) (*connect_go.Response[v1alpha1.DeprecatePluginResponse], error) {
+ return c.deprecatePlugin.CallUnary(ctx, req)
+}
+
+// UndeprecatePlugin calls buf.alpha.registry.v1alpha1.PluginService.UndeprecatePlugin.
+func (c *pluginServiceClient) UndeprecatePlugin(ctx context.Context, req *connect_go.Request[v1alpha1.UndeprecatePluginRequest]) (*connect_go.Response[v1alpha1.UndeprecatePluginResponse], error) {
+ return c.undeprecatePlugin.CallUnary(ctx, req)
+}
+
+// GetTemplate calls buf.alpha.registry.v1alpha1.PluginService.GetTemplate.
+func (c *pluginServiceClient) GetTemplate(ctx context.Context, req *connect_go.Request[v1alpha1.GetTemplateRequest]) (*connect_go.Response[v1alpha1.GetTemplateResponse], error) {
+ return c.getTemplate.CallUnary(ctx, req)
+}
+
+// ListTemplates calls buf.alpha.registry.v1alpha1.PluginService.ListTemplates.
+func (c *pluginServiceClient) ListTemplates(ctx context.Context, req *connect_go.Request[v1alpha1.ListTemplatesRequest]) (*connect_go.Response[v1alpha1.ListTemplatesResponse], error) {
+ return c.listTemplates.CallUnary(ctx, req)
+}
+
+// ListTemplatesUserCanAccess calls
+// buf.alpha.registry.v1alpha1.PluginService.ListTemplatesUserCanAccess.
+func (c *pluginServiceClient) ListTemplatesUserCanAccess(ctx context.Context, req *connect_go.Request[v1alpha1.ListTemplatesUserCanAccessRequest]) (*connect_go.Response[v1alpha1.ListTemplatesUserCanAccessResponse], error) {
+ return c.listTemplatesUserCanAccess.CallUnary(ctx, req)
+}
+
+// ListUserTemplates calls buf.alpha.registry.v1alpha1.PluginService.ListUserTemplates.
+func (c *pluginServiceClient) ListUserTemplates(ctx context.Context, req *connect_go.Request[v1alpha1.ListUserTemplatesRequest]) (*connect_go.Response[v1alpha1.ListUserTemplatesResponse], error) {
+ return c.listUserTemplates.CallUnary(ctx, req)
+}
+
+// ListOrganizationTemplates calls
+// buf.alpha.registry.v1alpha1.PluginService.ListOrganizationTemplates.
+func (c *pluginServiceClient) ListOrganizationTemplates(ctx context.Context, req *connect_go.Request[v1alpha1.ListOrganizationTemplatesRequest]) (*connect_go.Response[v1alpha1.ListOrganizationTemplatesResponse], error) {
+ return c.listOrganizationTemplates.CallUnary(ctx, req)
+}
+
+// GetTemplateVersion calls buf.alpha.registry.v1alpha1.PluginService.GetTemplateVersion.
+func (c *pluginServiceClient) GetTemplateVersion(ctx context.Context, req *connect_go.Request[v1alpha1.GetTemplateVersionRequest]) (*connect_go.Response[v1alpha1.GetTemplateVersionResponse], error) {
+ return c.getTemplateVersion.CallUnary(ctx, req)
+}
+
+// ListTemplateVersions calls buf.alpha.registry.v1alpha1.PluginService.ListTemplateVersions.
+func (c *pluginServiceClient) ListTemplateVersions(ctx context.Context, req *connect_go.Request[v1alpha1.ListTemplateVersionsRequest]) (*connect_go.Response[v1alpha1.ListTemplateVersionsResponse], error) {
+ return c.listTemplateVersions.CallUnary(ctx, req)
+}
+
+// CreateTemplate calls buf.alpha.registry.v1alpha1.PluginService.CreateTemplate.
+func (c *pluginServiceClient) CreateTemplate(ctx context.Context, req *connect_go.Request[v1alpha1.CreateTemplateRequest]) (*connect_go.Response[v1alpha1.CreateTemplateResponse], error) {
+ return c.createTemplate.CallUnary(ctx, req)
+}
+
+// DeleteTemplate calls buf.alpha.registry.v1alpha1.PluginService.DeleteTemplate.
+func (c *pluginServiceClient) DeleteTemplate(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteTemplateRequest]) (*connect_go.Response[v1alpha1.DeleteTemplateResponse], error) {
+ return c.deleteTemplate.CallUnary(ctx, req)
+}
+
+// CreateTemplateVersion calls buf.alpha.registry.v1alpha1.PluginService.CreateTemplateVersion.
+func (c *pluginServiceClient) CreateTemplateVersion(ctx context.Context, req *connect_go.Request[v1alpha1.CreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.CreateTemplateVersionResponse], error) {
+ return c.createTemplateVersion.CallUnary(ctx, req)
+}
+
+// SetTemplateContributor calls buf.alpha.registry.v1alpha1.PluginService.SetTemplateContributor.
+func (c *pluginServiceClient) SetTemplateContributor(ctx context.Context, req *connect_go.Request[v1alpha1.SetTemplateContributorRequest]) (*connect_go.Response[v1alpha1.SetTemplateContributorResponse], error) {
+ return c.setTemplateContributor.CallUnary(ctx, req)
+}
+
+// ListTemplateContributors calls
+// buf.alpha.registry.v1alpha1.PluginService.ListTemplateContributors.
+func (c *pluginServiceClient) ListTemplateContributors(ctx context.Context, req *connect_go.Request[v1alpha1.ListTemplateContributorsRequest]) (*connect_go.Response[v1alpha1.ListTemplateContributorsResponse], error) {
+ return c.listTemplateContributors.CallUnary(ctx, req)
+}
+
+// DeprecateTemplate calls buf.alpha.registry.v1alpha1.PluginService.DeprecateTemplate.
+func (c *pluginServiceClient) DeprecateTemplate(ctx context.Context, req *connect_go.Request[v1alpha1.DeprecateTemplateRequest]) (*connect_go.Response[v1alpha1.DeprecateTemplateResponse], error) {
+ return c.deprecateTemplate.CallUnary(ctx, req)
+}
+
+// UndeprecateTemplate calls buf.alpha.registry.v1alpha1.PluginService.UndeprecateTemplate.
+func (c *pluginServiceClient) UndeprecateTemplate(ctx context.Context, req *connect_go.Request[v1alpha1.UndeprecateTemplateRequest]) (*connect_go.Response[v1alpha1.UndeprecateTemplateResponse], error) {
+ return c.undeprecateTemplate.CallUnary(ctx, req)
+}
+
+// PluginServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.PluginService
+// service.
+type PluginServiceHandler interface {
+ // ListPlugins returns all the plugins available to the user. This includes
+ // public plugins, those uploaded to organizations the user is part of,
+ // and any plugins uploaded directly by the user.
+ ListPlugins(context.Context, *connect_go.Request[v1alpha1.ListPluginsRequest]) (*connect_go.Response[v1alpha1.ListPluginsResponse], error)
+ // ListUserPlugins lists all plugins belonging to a user.
+ ListUserPlugins(context.Context, *connect_go.Request[v1alpha1.ListUserPluginsRequest]) (*connect_go.Response[v1alpha1.ListUserPluginsResponse], error)
+ // ListOrganizationPlugins lists all plugins for an organization.
+ ListOrganizationPlugins(context.Context, *connect_go.Request[v1alpha1.ListOrganizationPluginsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationPluginsResponse], error)
+ // GetPluginVersion returns the plugin version, if found.
+ GetPluginVersion(context.Context, *connect_go.Request[v1alpha1.GetPluginVersionRequest]) (*connect_go.Response[v1alpha1.GetPluginVersionResponse], error)
+ // ListPluginVersions lists all the versions available for the specified plugin.
+ ListPluginVersions(context.Context, *connect_go.Request[v1alpha1.ListPluginVersionsRequest]) (*connect_go.Response[v1alpha1.ListPluginVersionsResponse], error)
+ // CreatePlugin creates a new plugin.
+ CreatePlugin(context.Context, *connect_go.Request[v1alpha1.CreatePluginRequest]) (*connect_go.Response[v1alpha1.CreatePluginResponse], error)
+ // GetPlugin returns the plugin, if found.
+ GetPlugin(context.Context, *connect_go.Request[v1alpha1.GetPluginRequest]) (*connect_go.Response[v1alpha1.GetPluginResponse], error)
+ // DeletePlugin deletes the plugin, if it exists. Note that deleting
+ // a plugin may cause breaking changes for templates using that plugin,
+ // and should be done with extreme care.
+ DeletePlugin(context.Context, *connect_go.Request[v1alpha1.DeletePluginRequest]) (*connect_go.Response[v1alpha1.DeletePluginResponse], error)
+ // SetPluginContributor sets the role of a user in the plugin.
+ SetPluginContributor(context.Context, *connect_go.Request[v1alpha1.SetPluginContributorRequest]) (*connect_go.Response[v1alpha1.SetPluginContributorResponse], error)
+ // ListPluginContributors returns the list of contributors that has an explicit role against the plugin.
+ // This does not include users who have implicit roles against the plugin, unless they have also been
+ // assigned a role explicitly.
+ ListPluginContributors(context.Context, *connect_go.Request[v1alpha1.ListPluginContributorsRequest]) (*connect_go.Response[v1alpha1.ListPluginContributorsResponse], error)
+ // DeprecatePlugin deprecates the plugin, if found.
+ DeprecatePlugin(context.Context, *connect_go.Request[v1alpha1.DeprecatePluginRequest]) (*connect_go.Response[v1alpha1.DeprecatePluginResponse], error)
+ // UndeprecatePlugin makes the plugin not deprecated and removes any deprecation_message.
+ UndeprecatePlugin(context.Context, *connect_go.Request[v1alpha1.UndeprecatePluginRequest]) (*connect_go.Response[v1alpha1.UndeprecatePluginResponse], error)
+ // GetTemplate returns the template, if found.
+ GetTemplate(context.Context, *connect_go.Request[v1alpha1.GetTemplateRequest]) (*connect_go.Response[v1alpha1.GetTemplateResponse], error)
+ // ListTemplates returns all the templates available to the user. This includes
+ // public templates, those owned by organizations the user is part of,
+ // and any created directly by the user.
+ ListTemplates(context.Context, *connect_go.Request[v1alpha1.ListTemplatesRequest]) (*connect_go.Response[v1alpha1.ListTemplatesResponse], error)
+ // ListTemplatesUserCanAccess is like ListTemplates, but does not return
+ // public templates.
+ ListTemplatesUserCanAccess(context.Context, *connect_go.Request[v1alpha1.ListTemplatesUserCanAccessRequest]) (*connect_go.Response[v1alpha1.ListTemplatesUserCanAccessResponse], error)
+ // ListUserPlugins lists all templates belonging to a user.
+ ListUserTemplates(context.Context, *connect_go.Request[v1alpha1.ListUserTemplatesRequest]) (*connect_go.Response[v1alpha1.ListUserTemplatesResponse], error)
+ // ListOrganizationTemplates lists all templates for an organization.
+ ListOrganizationTemplates(context.Context, *connect_go.Request[v1alpha1.ListOrganizationTemplatesRequest]) (*connect_go.Response[v1alpha1.ListOrganizationTemplatesResponse], error)
+ // GetTemplateVersion returns the template version, if found.
+ GetTemplateVersion(context.Context, *connect_go.Request[v1alpha1.GetTemplateVersionRequest]) (*connect_go.Response[v1alpha1.GetTemplateVersionResponse], error)
+ // ListTemplateVersions lists all the template versions available for the specified template.
+ ListTemplateVersions(context.Context, *connect_go.Request[v1alpha1.ListTemplateVersionsRequest]) (*connect_go.Response[v1alpha1.ListTemplateVersionsResponse], error)
+ // CreateTemplate creates a new template.
+ CreateTemplate(context.Context, *connect_go.Request[v1alpha1.CreateTemplateRequest]) (*connect_go.Response[v1alpha1.CreateTemplateResponse], error)
+ // DeleteTemplate deletes the template, if it exists.
+ DeleteTemplate(context.Context, *connect_go.Request[v1alpha1.DeleteTemplateRequest]) (*connect_go.Response[v1alpha1.DeleteTemplateResponse], error)
+ // CreateTemplateVersion creates a new template version.
+ CreateTemplateVersion(context.Context, *connect_go.Request[v1alpha1.CreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.CreateTemplateVersionResponse], error)
+ // SetTemplateContributor sets the role of a user in the template.
+ SetTemplateContributor(context.Context, *connect_go.Request[v1alpha1.SetTemplateContributorRequest]) (*connect_go.Response[v1alpha1.SetTemplateContributorResponse], error)
+ // ListTemplateContributors returns the list of contributors that has an explicit role against the template.
+ // This does not include users who have implicit roles against the template, unless they have also been
+ // assigned a role explicitly.
+ ListTemplateContributors(context.Context, *connect_go.Request[v1alpha1.ListTemplateContributorsRequest]) (*connect_go.Response[v1alpha1.ListTemplateContributorsResponse], error)
+ // DeprecateTemplate deprecates the template, if found.
+ DeprecateTemplate(context.Context, *connect_go.Request[v1alpha1.DeprecateTemplateRequest]) (*connect_go.Response[v1alpha1.DeprecateTemplateResponse], error)
+ // UndeprecateTemplate makes the template not deprecated and removes any deprecation_message.
+ UndeprecateTemplate(context.Context, *connect_go.Request[v1alpha1.UndeprecateTemplateRequest]) (*connect_go.Response[v1alpha1.UndeprecateTemplateResponse], error)
+}
+
+// NewPluginServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewPluginServiceHandler(svc PluginServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListPlugins", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListPlugins",
+ svc.ListPlugins,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListUserPlugins", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListUserPlugins",
+ svc.ListUserPlugins,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListOrganizationPlugins", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListOrganizationPlugins",
+ svc.ListOrganizationPlugins,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/GetPluginVersion", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/GetPluginVersion",
+ svc.GetPluginVersion,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListPluginVersions", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListPluginVersions",
+ svc.ListPluginVersions,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/CreatePlugin", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/CreatePlugin",
+ svc.CreatePlugin,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/GetPlugin", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/GetPlugin",
+ svc.GetPlugin,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/DeletePlugin", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/DeletePlugin",
+ svc.DeletePlugin,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/SetPluginContributor", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/SetPluginContributor",
+ svc.SetPluginContributor,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListPluginContributors", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListPluginContributors",
+ svc.ListPluginContributors,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/DeprecatePlugin", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/DeprecatePlugin",
+ svc.DeprecatePlugin,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/UndeprecatePlugin", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/UndeprecatePlugin",
+ svc.UndeprecatePlugin,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/GetTemplate", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/GetTemplate",
+ svc.GetTemplate,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListTemplates", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListTemplates",
+ svc.ListTemplates,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListTemplatesUserCanAccess", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListTemplatesUserCanAccess",
+ svc.ListTemplatesUserCanAccess,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListUserTemplates", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListUserTemplates",
+ svc.ListUserTemplates,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListOrganizationTemplates", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListOrganizationTemplates",
+ svc.ListOrganizationTemplates,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/GetTemplateVersion", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/GetTemplateVersion",
+ svc.GetTemplateVersion,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListTemplateVersions", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListTemplateVersions",
+ svc.ListTemplateVersions,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/CreateTemplate", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/CreateTemplate",
+ svc.CreateTemplate,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/DeleteTemplate", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/DeleteTemplate",
+ svc.DeleteTemplate,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/CreateTemplateVersion", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/CreateTemplateVersion",
+ svc.CreateTemplateVersion,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/SetTemplateContributor", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/SetTemplateContributor",
+ svc.SetTemplateContributor,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/ListTemplateContributors", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/ListTemplateContributors",
+ svc.ListTemplateContributors,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/DeprecateTemplate", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/DeprecateTemplate",
+ svc.DeprecateTemplate,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginService/UndeprecateTemplate", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginService/UndeprecateTemplate",
+ svc.UndeprecateTemplate,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.PluginService/", mux
+}
+
+// UnimplementedPluginServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedPluginServiceHandler struct{}
+
+func (UnimplementedPluginServiceHandler) ListPlugins(context.Context, *connect_go.Request[v1alpha1.ListPluginsRequest]) (*connect_go.Response[v1alpha1.ListPluginsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListPlugins is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) ListUserPlugins(context.Context, *connect_go.Request[v1alpha1.ListUserPluginsRequest]) (*connect_go.Response[v1alpha1.ListUserPluginsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListUserPlugins is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) ListOrganizationPlugins(context.Context, *connect_go.Request[v1alpha1.ListOrganizationPluginsRequest]) (*connect_go.Response[v1alpha1.ListOrganizationPluginsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListOrganizationPlugins is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) GetPluginVersion(context.Context, *connect_go.Request[v1alpha1.GetPluginVersionRequest]) (*connect_go.Response[v1alpha1.GetPluginVersionResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.GetPluginVersion is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) ListPluginVersions(context.Context, *connect_go.Request[v1alpha1.ListPluginVersionsRequest]) (*connect_go.Response[v1alpha1.ListPluginVersionsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListPluginVersions is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) CreatePlugin(context.Context, *connect_go.Request[v1alpha1.CreatePluginRequest]) (*connect_go.Response[v1alpha1.CreatePluginResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.CreatePlugin is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) GetPlugin(context.Context, *connect_go.Request[v1alpha1.GetPluginRequest]) (*connect_go.Response[v1alpha1.GetPluginResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.GetPlugin is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) DeletePlugin(context.Context, *connect_go.Request[v1alpha1.DeletePluginRequest]) (*connect_go.Response[v1alpha1.DeletePluginResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.DeletePlugin is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) SetPluginContributor(context.Context, *connect_go.Request[v1alpha1.SetPluginContributorRequest]) (*connect_go.Response[v1alpha1.SetPluginContributorResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.SetPluginContributor is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) ListPluginContributors(context.Context, *connect_go.Request[v1alpha1.ListPluginContributorsRequest]) (*connect_go.Response[v1alpha1.ListPluginContributorsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListPluginContributors is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) DeprecatePlugin(context.Context, *connect_go.Request[v1alpha1.DeprecatePluginRequest]) (*connect_go.Response[v1alpha1.DeprecatePluginResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.DeprecatePlugin is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) UndeprecatePlugin(context.Context, *connect_go.Request[v1alpha1.UndeprecatePluginRequest]) (*connect_go.Response[v1alpha1.UndeprecatePluginResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.UndeprecatePlugin is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) GetTemplate(context.Context, *connect_go.Request[v1alpha1.GetTemplateRequest]) (*connect_go.Response[v1alpha1.GetTemplateResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.GetTemplate is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) ListTemplates(context.Context, *connect_go.Request[v1alpha1.ListTemplatesRequest]) (*connect_go.Response[v1alpha1.ListTemplatesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListTemplates is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) ListTemplatesUserCanAccess(context.Context, *connect_go.Request[v1alpha1.ListTemplatesUserCanAccessRequest]) (*connect_go.Response[v1alpha1.ListTemplatesUserCanAccessResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListTemplatesUserCanAccess is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) ListUserTemplates(context.Context, *connect_go.Request[v1alpha1.ListUserTemplatesRequest]) (*connect_go.Response[v1alpha1.ListUserTemplatesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListUserTemplates is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) ListOrganizationTemplates(context.Context, *connect_go.Request[v1alpha1.ListOrganizationTemplatesRequest]) (*connect_go.Response[v1alpha1.ListOrganizationTemplatesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListOrganizationTemplates is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) GetTemplateVersion(context.Context, *connect_go.Request[v1alpha1.GetTemplateVersionRequest]) (*connect_go.Response[v1alpha1.GetTemplateVersionResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.GetTemplateVersion is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) ListTemplateVersions(context.Context, *connect_go.Request[v1alpha1.ListTemplateVersionsRequest]) (*connect_go.Response[v1alpha1.ListTemplateVersionsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListTemplateVersions is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) CreateTemplate(context.Context, *connect_go.Request[v1alpha1.CreateTemplateRequest]) (*connect_go.Response[v1alpha1.CreateTemplateResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.CreateTemplate is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) DeleteTemplate(context.Context, *connect_go.Request[v1alpha1.DeleteTemplateRequest]) (*connect_go.Response[v1alpha1.DeleteTemplateResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.DeleteTemplate is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) CreateTemplateVersion(context.Context, *connect_go.Request[v1alpha1.CreateTemplateVersionRequest]) (*connect_go.Response[v1alpha1.CreateTemplateVersionResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.CreateTemplateVersion is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) SetTemplateContributor(context.Context, *connect_go.Request[v1alpha1.SetTemplateContributorRequest]) (*connect_go.Response[v1alpha1.SetTemplateContributorResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.SetTemplateContributor is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) ListTemplateContributors(context.Context, *connect_go.Request[v1alpha1.ListTemplateContributorsRequest]) (*connect_go.Response[v1alpha1.ListTemplateContributorsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.ListTemplateContributors is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) DeprecateTemplate(context.Context, *connect_go.Request[v1alpha1.DeprecateTemplateRequest]) (*connect_go.Response[v1alpha1.DeprecateTemplateResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.DeprecateTemplate is not implemented"))
+}
+
+func (UnimplementedPluginServiceHandler) UndeprecateTemplate(context.Context, *connect_go.Request[v1alpha1.UndeprecateTemplateRequest]) (*connect_go.Response[v1alpha1.UndeprecateTemplateResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginService.UndeprecateTemplate is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/plugin_curation.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/plugin_curation.connect.go
new file mode 100644
index 000000000..9df2f11d5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/plugin_curation.connect.go
@@ -0,0 +1,221 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/plugin_curation.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // PluginCurationServiceName is the fully-qualified name of the PluginCurationService service.
+ PluginCurationServiceName = "buf.alpha.registry.v1alpha1.PluginCurationService"
+ // CodeGenerationServiceName is the fully-qualified name of the CodeGenerationService service.
+ CodeGenerationServiceName = "buf.alpha.registry.v1alpha1.CodeGenerationService"
+)
+
+// PluginCurationServiceClient is a client for the buf.alpha.registry.v1alpha1.PluginCurationService
+// service.
+type PluginCurationServiceClient interface {
+ // ListCuratedPlugins returns all the curated plugins available.
+ ListCuratedPlugins(context.Context, *connect_go.Request[v1alpha1.ListCuratedPluginsRequest]) (*connect_go.Response[v1alpha1.ListCuratedPluginsResponse], error)
+ // CreateCuratedPlugin creates a new curated plugin.
+ CreateCuratedPlugin(context.Context, *connect_go.Request[v1alpha1.CreateCuratedPluginRequest]) (*connect_go.Response[v1alpha1.CreateCuratedPluginResponse], error)
+ // GetLatestCuratedPlugin returns the latest version of a plugin matching given parameters.
+ GetLatestCuratedPlugin(context.Context, *connect_go.Request[v1alpha1.GetLatestCuratedPluginRequest]) (*connect_go.Response[v1alpha1.GetLatestCuratedPluginResponse], error)
+}
+
+// NewPluginCurationServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.PluginCurationService service. By default, it uses the Connect
+// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed
+// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
+// connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewPluginCurationServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) PluginCurationServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &pluginCurationServiceClient{
+ listCuratedPlugins: connect_go.NewClient[v1alpha1.ListCuratedPluginsRequest, v1alpha1.ListCuratedPluginsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginCurationService/ListCuratedPlugins",
+ opts...,
+ ),
+ createCuratedPlugin: connect_go.NewClient[v1alpha1.CreateCuratedPluginRequest, v1alpha1.CreateCuratedPluginResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginCurationService/CreateCuratedPlugin",
+ opts...,
+ ),
+ getLatestCuratedPlugin: connect_go.NewClient[v1alpha1.GetLatestCuratedPluginRequest, v1alpha1.GetLatestCuratedPluginResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PluginCurationService/GetLatestCuratedPlugin",
+ opts...,
+ ),
+ }
+}
+
+// pluginCurationServiceClient implements PluginCurationServiceClient.
+type pluginCurationServiceClient struct {
+ listCuratedPlugins *connect_go.Client[v1alpha1.ListCuratedPluginsRequest, v1alpha1.ListCuratedPluginsResponse]
+ createCuratedPlugin *connect_go.Client[v1alpha1.CreateCuratedPluginRequest, v1alpha1.CreateCuratedPluginResponse]
+ getLatestCuratedPlugin *connect_go.Client[v1alpha1.GetLatestCuratedPluginRequest, v1alpha1.GetLatestCuratedPluginResponse]
+}
+
+// ListCuratedPlugins calls buf.alpha.registry.v1alpha1.PluginCurationService.ListCuratedPlugins.
+func (c *pluginCurationServiceClient) ListCuratedPlugins(ctx context.Context, req *connect_go.Request[v1alpha1.ListCuratedPluginsRequest]) (*connect_go.Response[v1alpha1.ListCuratedPluginsResponse], error) {
+ return c.listCuratedPlugins.CallUnary(ctx, req)
+}
+
+// CreateCuratedPlugin calls buf.alpha.registry.v1alpha1.PluginCurationService.CreateCuratedPlugin.
+func (c *pluginCurationServiceClient) CreateCuratedPlugin(ctx context.Context, req *connect_go.Request[v1alpha1.CreateCuratedPluginRequest]) (*connect_go.Response[v1alpha1.CreateCuratedPluginResponse], error) {
+ return c.createCuratedPlugin.CallUnary(ctx, req)
+}
+
+// GetLatestCuratedPlugin calls
+// buf.alpha.registry.v1alpha1.PluginCurationService.GetLatestCuratedPlugin.
+func (c *pluginCurationServiceClient) GetLatestCuratedPlugin(ctx context.Context, req *connect_go.Request[v1alpha1.GetLatestCuratedPluginRequest]) (*connect_go.Response[v1alpha1.GetLatestCuratedPluginResponse], error) {
+ return c.getLatestCuratedPlugin.CallUnary(ctx, req)
+}
+
+// PluginCurationServiceHandler is an implementation of the
+// buf.alpha.registry.v1alpha1.PluginCurationService service.
+type PluginCurationServiceHandler interface {
+ // ListCuratedPlugins returns all the curated plugins available.
+ ListCuratedPlugins(context.Context, *connect_go.Request[v1alpha1.ListCuratedPluginsRequest]) (*connect_go.Response[v1alpha1.ListCuratedPluginsResponse], error)
+ // CreateCuratedPlugin creates a new curated plugin.
+ CreateCuratedPlugin(context.Context, *connect_go.Request[v1alpha1.CreateCuratedPluginRequest]) (*connect_go.Response[v1alpha1.CreateCuratedPluginResponse], error)
+ // GetLatestCuratedPlugin returns the latest version of a plugin matching given parameters.
+ GetLatestCuratedPlugin(context.Context, *connect_go.Request[v1alpha1.GetLatestCuratedPluginRequest]) (*connect_go.Response[v1alpha1.GetLatestCuratedPluginResponse], error)
+}
+
+// NewPluginCurationServiceHandler builds an HTTP handler from the service implementation. It
+// returns the path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewPluginCurationServiceHandler(svc PluginCurationServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginCurationService/ListCuratedPlugins", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginCurationService/ListCuratedPlugins",
+ svc.ListCuratedPlugins,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginCurationService/CreateCuratedPlugin", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginCurationService/CreateCuratedPlugin",
+ svc.CreateCuratedPlugin,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.PluginCurationService/GetLatestCuratedPlugin", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PluginCurationService/GetLatestCuratedPlugin",
+ svc.GetLatestCuratedPlugin,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.PluginCurationService/", mux
+}
+
+// UnimplementedPluginCurationServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedPluginCurationServiceHandler struct{}
+
+func (UnimplementedPluginCurationServiceHandler) ListCuratedPlugins(context.Context, *connect_go.Request[v1alpha1.ListCuratedPluginsRequest]) (*connect_go.Response[v1alpha1.ListCuratedPluginsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginCurationService.ListCuratedPlugins is not implemented"))
+}
+
+func (UnimplementedPluginCurationServiceHandler) CreateCuratedPlugin(context.Context, *connect_go.Request[v1alpha1.CreateCuratedPluginRequest]) (*connect_go.Response[v1alpha1.CreateCuratedPluginResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginCurationService.CreateCuratedPlugin is not implemented"))
+}
+
+func (UnimplementedPluginCurationServiceHandler) GetLatestCuratedPlugin(context.Context, *connect_go.Request[v1alpha1.GetLatestCuratedPluginRequest]) (*connect_go.Response[v1alpha1.GetLatestCuratedPluginResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PluginCurationService.GetLatestCuratedPlugin is not implemented"))
+}
+
+// CodeGenerationServiceClient is a client for the buf.alpha.registry.v1alpha1.CodeGenerationService
+// service.
+type CodeGenerationServiceClient interface {
+ // GenerateCode generates code using the specified remote plugins.
+ GenerateCode(context.Context, *connect_go.Request[v1alpha1.GenerateCodeRequest]) (*connect_go.Response[v1alpha1.GenerateCodeResponse], error)
+}
+
+// NewCodeGenerationServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.CodeGenerationService service. By default, it uses the Connect
+// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed
+// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
+// connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewCodeGenerationServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) CodeGenerationServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &codeGenerationServiceClient{
+ generateCode: connect_go.NewClient[v1alpha1.GenerateCodeRequest, v1alpha1.GenerateCodeResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.CodeGenerationService/GenerateCode",
+ opts...,
+ ),
+ }
+}
+
+// codeGenerationServiceClient implements CodeGenerationServiceClient.
+type codeGenerationServiceClient struct {
+ generateCode *connect_go.Client[v1alpha1.GenerateCodeRequest, v1alpha1.GenerateCodeResponse]
+}
+
+// GenerateCode calls buf.alpha.registry.v1alpha1.CodeGenerationService.GenerateCode.
+func (c *codeGenerationServiceClient) GenerateCode(ctx context.Context, req *connect_go.Request[v1alpha1.GenerateCodeRequest]) (*connect_go.Response[v1alpha1.GenerateCodeResponse], error) {
+ return c.generateCode.CallUnary(ctx, req)
+}
+
+// CodeGenerationServiceHandler is an implementation of the
+// buf.alpha.registry.v1alpha1.CodeGenerationService service.
+type CodeGenerationServiceHandler interface {
+ // GenerateCode generates code using the specified remote plugins.
+ GenerateCode(context.Context, *connect_go.Request[v1alpha1.GenerateCodeRequest]) (*connect_go.Response[v1alpha1.GenerateCodeResponse], error)
+}
+
+// NewCodeGenerationServiceHandler builds an HTTP handler from the service implementation. It
+// returns the path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewCodeGenerationServiceHandler(svc CodeGenerationServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.CodeGenerationService/GenerateCode", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.CodeGenerationService/GenerateCode",
+ svc.GenerateCode,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.CodeGenerationService/", mux
+}
+
+// UnimplementedCodeGenerationServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedCodeGenerationServiceHandler struct{}
+
+func (UnimplementedCodeGenerationServiceHandler) GenerateCode(context.Context, *connect_go.Request[v1alpha1.GenerateCodeRequest]) (*connect_go.Response[v1alpha1.GenerateCodeResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.CodeGenerationService.GenerateCode is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/push.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/push.connect.go
new file mode 100644
index 000000000..25164c33e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/push.connect.go
@@ -0,0 +1,102 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/push.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // PushServiceName is the fully-qualified name of the PushService service.
+ PushServiceName = "buf.alpha.registry.v1alpha1.PushService"
+)
+
+// PushServiceClient is a client for the buf.alpha.registry.v1alpha1.PushService service.
+type PushServiceClient interface {
+ // Push pushes.
+ Push(context.Context, *connect_go.Request[v1alpha1.PushRequest]) (*connect_go.Response[v1alpha1.PushResponse], error)
+}
+
+// NewPushServiceClient constructs a client for the buf.alpha.registry.v1alpha1.PushService service.
+// By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped
+// responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
+// connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewPushServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) PushServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &pushServiceClient{
+ push: connect_go.NewClient[v1alpha1.PushRequest, v1alpha1.PushResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.PushService/Push",
+ opts...,
+ ),
+ }
+}
+
+// pushServiceClient implements PushServiceClient.
+type pushServiceClient struct {
+ push *connect_go.Client[v1alpha1.PushRequest, v1alpha1.PushResponse]
+}
+
+// Push calls buf.alpha.registry.v1alpha1.PushService.Push.
+func (c *pushServiceClient) Push(ctx context.Context, req *connect_go.Request[v1alpha1.PushRequest]) (*connect_go.Response[v1alpha1.PushResponse], error) {
+ return c.push.CallUnary(ctx, req)
+}
+
+// PushServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.PushService service.
+type PushServiceHandler interface {
+ // Push pushes.
+ Push(context.Context, *connect_go.Request[v1alpha1.PushRequest]) (*connect_go.Response[v1alpha1.PushResponse], error)
+}
+
+// NewPushServiceHandler builds an HTTP handler from the service implementation. It returns the path
+// on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewPushServiceHandler(svc PushServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.PushService/Push", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.PushService/Push",
+ svc.Push,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.PushService/", mux
+}
+
+// UnimplementedPushServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedPushServiceHandler struct{}
+
+func (UnimplementedPushServiceHandler) Push(context.Context, *connect_go.Request[v1alpha1.PushRequest]) (*connect_go.Response[v1alpha1.PushResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.PushService.Push is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/recommendation.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/recommendation.connect.go
new file mode 100644
index 000000000..b290228a1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/recommendation.connect.go
@@ -0,0 +1,187 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/recommendation.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // RecommendationServiceName is the fully-qualified name of the RecommendationService service.
+ RecommendationServiceName = "buf.alpha.registry.v1alpha1.RecommendationService"
+)
+
+// RecommendationServiceClient is a client for the buf.alpha.registry.v1alpha1.RecommendationService
+// service.
+type RecommendationServiceClient interface {
+ // RecommendedRepositories returns a list of recommended repositories.
+ RecommendedRepositories(context.Context, *connect_go.Request[v1alpha1.RecommendedRepositoriesRequest]) (*connect_go.Response[v1alpha1.RecommendedRepositoriesResponse], error)
+ // RecommendedTemplates returns a list of recommended templates.
+ //
+ // Deprecated: do not use.
+ RecommendedTemplates(context.Context, *connect_go.Request[v1alpha1.RecommendedTemplatesRequest]) (*connect_go.Response[v1alpha1.RecommendedTemplatesResponse], error)
+ // ListRecommendedResources returns a list of recommended resources.
+ ListRecommendedResources(context.Context, *connect_go.Request[v1alpha1.ListRecommendedResourcesRequest]) (*connect_go.Response[v1alpha1.ListRecommendedResourcesResponse], error)
+ // SetRecommendedResources set the list of recommendated resources in the server.
+ SetRecommendedResources(context.Context, *connect_go.Request[v1alpha1.SetRecommendedResourcesRequest]) (*connect_go.Response[v1alpha1.SetRecommendedResourcesResponse], error)
+}
+
+// NewRecommendationServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.RecommendationService service. By default, it uses the Connect
+// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed
+// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
+// connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewRecommendationServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) RecommendationServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &recommendationServiceClient{
+ recommendedRepositories: connect_go.NewClient[v1alpha1.RecommendedRepositoriesRequest, v1alpha1.RecommendedRepositoriesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RecommendationService/RecommendedRepositories",
+ opts...,
+ ),
+ recommendedTemplates: connect_go.NewClient[v1alpha1.RecommendedTemplatesRequest, v1alpha1.RecommendedTemplatesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RecommendationService/RecommendedTemplates",
+ opts...,
+ ),
+ listRecommendedResources: connect_go.NewClient[v1alpha1.ListRecommendedResourcesRequest, v1alpha1.ListRecommendedResourcesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RecommendationService/ListRecommendedResources",
+ opts...,
+ ),
+ setRecommendedResources: connect_go.NewClient[v1alpha1.SetRecommendedResourcesRequest, v1alpha1.SetRecommendedResourcesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RecommendationService/SetRecommendedResources",
+ opts...,
+ ),
+ }
+}
+
+// recommendationServiceClient implements RecommendationServiceClient.
+type recommendationServiceClient struct {
+ recommendedRepositories *connect_go.Client[v1alpha1.RecommendedRepositoriesRequest, v1alpha1.RecommendedRepositoriesResponse]
+ recommendedTemplates *connect_go.Client[v1alpha1.RecommendedTemplatesRequest, v1alpha1.RecommendedTemplatesResponse]
+ listRecommendedResources *connect_go.Client[v1alpha1.ListRecommendedResourcesRequest, v1alpha1.ListRecommendedResourcesResponse]
+ setRecommendedResources *connect_go.Client[v1alpha1.SetRecommendedResourcesRequest, v1alpha1.SetRecommendedResourcesResponse]
+}
+
+// RecommendedRepositories calls
+// buf.alpha.registry.v1alpha1.RecommendationService.RecommendedRepositories.
+func (c *recommendationServiceClient) RecommendedRepositories(ctx context.Context, req *connect_go.Request[v1alpha1.RecommendedRepositoriesRequest]) (*connect_go.Response[v1alpha1.RecommendedRepositoriesResponse], error) {
+ return c.recommendedRepositories.CallUnary(ctx, req)
+}
+
+// RecommendedTemplates calls
+// buf.alpha.registry.v1alpha1.RecommendationService.RecommendedTemplates.
+//
+// Deprecated: do not use.
+func (c *recommendationServiceClient) RecommendedTemplates(ctx context.Context, req *connect_go.Request[v1alpha1.RecommendedTemplatesRequest]) (*connect_go.Response[v1alpha1.RecommendedTemplatesResponse], error) {
+ return c.recommendedTemplates.CallUnary(ctx, req)
+}
+
+// ListRecommendedResources calls
+// buf.alpha.registry.v1alpha1.RecommendationService.ListRecommendedResources.
+func (c *recommendationServiceClient) ListRecommendedResources(ctx context.Context, req *connect_go.Request[v1alpha1.ListRecommendedResourcesRequest]) (*connect_go.Response[v1alpha1.ListRecommendedResourcesResponse], error) {
+ return c.listRecommendedResources.CallUnary(ctx, req)
+}
+
+// SetRecommendedResources calls
+// buf.alpha.registry.v1alpha1.RecommendationService.SetRecommendedResources.
+func (c *recommendationServiceClient) SetRecommendedResources(ctx context.Context, req *connect_go.Request[v1alpha1.SetRecommendedResourcesRequest]) (*connect_go.Response[v1alpha1.SetRecommendedResourcesResponse], error) {
+ return c.setRecommendedResources.CallUnary(ctx, req)
+}
+
+// RecommendationServiceHandler is an implementation of the
+// buf.alpha.registry.v1alpha1.RecommendationService service.
+type RecommendationServiceHandler interface {
+ // RecommendedRepositories returns a list of recommended repositories.
+ RecommendedRepositories(context.Context, *connect_go.Request[v1alpha1.RecommendedRepositoriesRequest]) (*connect_go.Response[v1alpha1.RecommendedRepositoriesResponse], error)
+ // RecommendedTemplates returns a list of recommended templates.
+ //
+ // Deprecated: do not use.
+ RecommendedTemplates(context.Context, *connect_go.Request[v1alpha1.RecommendedTemplatesRequest]) (*connect_go.Response[v1alpha1.RecommendedTemplatesResponse], error)
+ // ListRecommendedResources returns a list of recommended resources.
+ ListRecommendedResources(context.Context, *connect_go.Request[v1alpha1.ListRecommendedResourcesRequest]) (*connect_go.Response[v1alpha1.ListRecommendedResourcesResponse], error)
+ // SetRecommendedResources set the list of recommendated resources in the server.
+ SetRecommendedResources(context.Context, *connect_go.Request[v1alpha1.SetRecommendedResourcesRequest]) (*connect_go.Response[v1alpha1.SetRecommendedResourcesResponse], error)
+}
+
+// NewRecommendationServiceHandler builds an HTTP handler from the service implementation. It
+// returns the path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewRecommendationServiceHandler(svc RecommendationServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.RecommendationService/RecommendedRepositories", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RecommendationService/RecommendedRepositories",
+ svc.RecommendedRepositories,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RecommendationService/RecommendedTemplates", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RecommendationService/RecommendedTemplates",
+ svc.RecommendedTemplates,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RecommendationService/ListRecommendedResources", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RecommendationService/ListRecommendedResources",
+ svc.ListRecommendedResources,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RecommendationService/SetRecommendedResources", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RecommendationService/SetRecommendedResources",
+ svc.SetRecommendedResources,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.RecommendationService/", mux
+}
+
+// UnimplementedRecommendationServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedRecommendationServiceHandler struct{}
+
+func (UnimplementedRecommendationServiceHandler) RecommendedRepositories(context.Context, *connect_go.Request[v1alpha1.RecommendedRepositoriesRequest]) (*connect_go.Response[v1alpha1.RecommendedRepositoriesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RecommendationService.RecommendedRepositories is not implemented"))
+}
+
+func (UnimplementedRecommendationServiceHandler) RecommendedTemplates(context.Context, *connect_go.Request[v1alpha1.RecommendedTemplatesRequest]) (*connect_go.Response[v1alpha1.RecommendedTemplatesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RecommendationService.RecommendedTemplates is not implemented"))
+}
+
+func (UnimplementedRecommendationServiceHandler) ListRecommendedResources(context.Context, *connect_go.Request[v1alpha1.ListRecommendedResourcesRequest]) (*connect_go.Response[v1alpha1.ListRecommendedResourcesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RecommendationService.ListRecommendedResources is not implemented"))
+}
+
+func (UnimplementedRecommendationServiceHandler) SetRecommendedResources(context.Context, *connect_go.Request[v1alpha1.SetRecommendedResourcesRequest]) (*connect_go.Response[v1alpha1.SetRecommendedResourcesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RecommendationService.SetRecommendedResources is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/reference.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/reference.connect.go
new file mode 100644
index 000000000..08437c874
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/reference.connect.go
@@ -0,0 +1,106 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/reference.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // ReferenceServiceName is the fully-qualified name of the ReferenceService service.
+ ReferenceServiceName = "buf.alpha.registry.v1alpha1.ReferenceService"
+)
+
+// ReferenceServiceClient is a client for the buf.alpha.registry.v1alpha1.ReferenceService service.
+type ReferenceServiceClient interface {
+ // GetReferenceByName takes a reference name and returns the
+ // reference either as 'main', a tag, or commit.
+ GetReferenceByName(context.Context, *connect_go.Request[v1alpha1.GetReferenceByNameRequest]) (*connect_go.Response[v1alpha1.GetReferenceByNameResponse], error)
+}
+
+// NewReferenceServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.ReferenceService service. By default, it uses the Connect protocol
+// with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To
+// use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb()
+// options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewReferenceServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ReferenceServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &referenceServiceClient{
+ getReferenceByName: connect_go.NewClient[v1alpha1.GetReferenceByNameRequest, v1alpha1.GetReferenceByNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.ReferenceService/GetReferenceByName",
+ opts...,
+ ),
+ }
+}
+
+// referenceServiceClient implements ReferenceServiceClient.
+type referenceServiceClient struct {
+ getReferenceByName *connect_go.Client[v1alpha1.GetReferenceByNameRequest, v1alpha1.GetReferenceByNameResponse]
+}
+
+// GetReferenceByName calls buf.alpha.registry.v1alpha1.ReferenceService.GetReferenceByName.
+func (c *referenceServiceClient) GetReferenceByName(ctx context.Context, req *connect_go.Request[v1alpha1.GetReferenceByNameRequest]) (*connect_go.Response[v1alpha1.GetReferenceByNameResponse], error) {
+ return c.getReferenceByName.CallUnary(ctx, req)
+}
+
+// ReferenceServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.ReferenceService
+// service.
+type ReferenceServiceHandler interface {
+ // GetReferenceByName takes a reference name and returns the
+ // reference either as 'main', a tag, or commit.
+ GetReferenceByName(context.Context, *connect_go.Request[v1alpha1.GetReferenceByNameRequest]) (*connect_go.Response[v1alpha1.GetReferenceByNameResponse], error)
+}
+
+// NewReferenceServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewReferenceServiceHandler(svc ReferenceServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.ReferenceService/GetReferenceByName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.ReferenceService/GetReferenceByName",
+ svc.GetReferenceByName,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.ReferenceService/", mux
+}
+
+// UnimplementedReferenceServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedReferenceServiceHandler struct{}
+
+func (UnimplementedReferenceServiceHandler) GetReferenceByName(context.Context, *connect_go.Request[v1alpha1.GetReferenceByNameRequest]) (*connect_go.Response[v1alpha1.GetReferenceByNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.ReferenceService.GetReferenceByName is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository.connect.go
new file mode 100644
index 000000000..3705bc47a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository.connect.go
@@ -0,0 +1,536 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/repository.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // RepositoryServiceName is the fully-qualified name of the RepositoryService service.
+ RepositoryServiceName = "buf.alpha.registry.v1alpha1.RepositoryService"
+)
+
+// RepositoryServiceClient is a client for the buf.alpha.registry.v1alpha1.RepositoryService
+// service.
+type RepositoryServiceClient interface {
+ // GetRepository gets a repository by ID.
+ GetRepository(context.Context, *connect_go.Request[v1alpha1.GetRepositoryRequest]) (*connect_go.Response[v1alpha1.GetRepositoryResponse], error)
+ // GetRepositoryByFullName gets a repository by full name.
+ GetRepositoryByFullName(context.Context, *connect_go.Request[v1alpha1.GetRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.GetRepositoryByFullNameResponse], error)
+ // ListRepositories lists all repositories.
+ ListRepositories(context.Context, *connect_go.Request[v1alpha1.ListRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListRepositoriesResponse], error)
+ // ListUserRepositories lists all repositories belonging to a user.
+ ListUserRepositories(context.Context, *connect_go.Request[v1alpha1.ListUserRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListUserRepositoriesResponse], error)
+ // ListRepositoriesUserCanAccess lists all repositories a user can access.
+ ListRepositoriesUserCanAccess(context.Context, *connect_go.Request[v1alpha1.ListRepositoriesUserCanAccessRequest]) (*connect_go.Response[v1alpha1.ListRepositoriesUserCanAccessResponse], error)
+ // ListOrganizationRepositories lists all repositories for an organization.
+ ListOrganizationRepositories(context.Context, *connect_go.Request[v1alpha1.ListOrganizationRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListOrganizationRepositoriesResponse], error)
+ // CreateRepositoryByFullName creates a new repository by full name.
+ CreateRepositoryByFullName(context.Context, *connect_go.Request[v1alpha1.CreateRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.CreateRepositoryByFullNameResponse], error)
+ // DeleteRepository deletes a repository.
+ DeleteRepository(context.Context, *connect_go.Request[v1alpha1.DeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryResponse], error)
+ // DeleteRepositoryByFullName deletes a repository by full name.
+ DeleteRepositoryByFullName(context.Context, *connect_go.Request[v1alpha1.DeleteRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryByFullNameResponse], error)
+ // DeprecateRepositoryByName deprecates the repository.
+ DeprecateRepositoryByName(context.Context, *connect_go.Request[v1alpha1.DeprecateRepositoryByNameRequest]) (*connect_go.Response[v1alpha1.DeprecateRepositoryByNameResponse], error)
+ // UndeprecateRepositoryByName makes the repository not deprecated and removes any deprecation_message.
+ UndeprecateRepositoryByName(context.Context, *connect_go.Request[v1alpha1.UndeprecateRepositoryByNameRequest]) (*connect_go.Response[v1alpha1.UndeprecateRepositoryByNameResponse], error)
+ // GetRepositoriesByFullName gets repositories by full name. Response order is unspecified.
+ // Errors if any of the repositories don't exist or the caller does not have access to any of the repositories.
+ GetRepositoriesByFullName(context.Context, *connect_go.Request[v1alpha1.GetRepositoriesByFullNameRequest]) (*connect_go.Response[v1alpha1.GetRepositoriesByFullNameResponse], error)
+ // SetRepositoryContributor sets the role of a user in the repository.
+ SetRepositoryContributor(context.Context, *connect_go.Request[v1alpha1.SetRepositoryContributorRequest]) (*connect_go.Response[v1alpha1.SetRepositoryContributorResponse], error)
+ // ListRepositoryContributors returns the list of contributors that has an explicit role against the repository.
+ // This does not include users who have implicit roles against the repository, unless they have also been
+ // assigned a role explicitly.
+ ListRepositoryContributors(context.Context, *connect_go.Request[v1alpha1.ListRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryContributorsResponse], error)
+ // GetRepositoryContributor returns the contributor information of a user in a repository.
+ GetRepositoryContributor(context.Context, *connect_go.Request[v1alpha1.GetRepositoryContributorRequest]) (*connect_go.Response[v1alpha1.GetRepositoryContributorResponse], error)
+ // GetRepositorySettings gets the settings of a repository.
+ GetRepositorySettings(context.Context, *connect_go.Request[v1alpha1.GetRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.GetRepositorySettingsResponse], error)
+ // UpdateRepositorySettingsByName updates the settings of a repository.
+ UpdateRepositorySettingsByName(context.Context, *connect_go.Request[v1alpha1.UpdateRepositorySettingsByNameRequest]) (*connect_go.Response[v1alpha1.UpdateRepositorySettingsByNameResponse], error)
+ // GetRepositoriesMetadata gets the metadata of the repositories in the request, the length of repositories in the
+ // request should match the length of the metadata in the response, and the order of repositories in the response
+ // should match the order of the metadata in the request.
+ GetRepositoriesMetadata(context.Context, *connect_go.Request[v1alpha1.GetRepositoriesMetadataRequest]) (*connect_go.Response[v1alpha1.GetRepositoriesMetadataResponse], error)
+}
+
+// NewRepositoryServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.RepositoryService service. By default, it uses the Connect protocol
+// with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To
+// use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb()
+// options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewRepositoryServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) RepositoryServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &repositoryServiceClient{
+ getRepository: connect_go.NewClient[v1alpha1.GetRepositoryRequest, v1alpha1.GetRepositoryResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/GetRepository",
+ opts...,
+ ),
+ getRepositoryByFullName: connect_go.NewClient[v1alpha1.GetRepositoryByFullNameRequest, v1alpha1.GetRepositoryByFullNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoryByFullName",
+ opts...,
+ ),
+ listRepositories: connect_go.NewClient[v1alpha1.ListRepositoriesRequest, v1alpha1.ListRepositoriesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/ListRepositories",
+ opts...,
+ ),
+ listUserRepositories: connect_go.NewClient[v1alpha1.ListUserRepositoriesRequest, v1alpha1.ListUserRepositoriesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/ListUserRepositories",
+ opts...,
+ ),
+ listRepositoriesUserCanAccess: connect_go.NewClient[v1alpha1.ListRepositoriesUserCanAccessRequest, v1alpha1.ListRepositoriesUserCanAccessResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/ListRepositoriesUserCanAccess",
+ opts...,
+ ),
+ listOrganizationRepositories: connect_go.NewClient[v1alpha1.ListOrganizationRepositoriesRequest, v1alpha1.ListOrganizationRepositoriesResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/ListOrganizationRepositories",
+ opts...,
+ ),
+ createRepositoryByFullName: connect_go.NewClient[v1alpha1.CreateRepositoryByFullNameRequest, v1alpha1.CreateRepositoryByFullNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/CreateRepositoryByFullName",
+ opts...,
+ ),
+ deleteRepository: connect_go.NewClient[v1alpha1.DeleteRepositoryRequest, v1alpha1.DeleteRepositoryResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/DeleteRepository",
+ opts...,
+ ),
+ deleteRepositoryByFullName: connect_go.NewClient[v1alpha1.DeleteRepositoryByFullNameRequest, v1alpha1.DeleteRepositoryByFullNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/DeleteRepositoryByFullName",
+ opts...,
+ ),
+ deprecateRepositoryByName: connect_go.NewClient[v1alpha1.DeprecateRepositoryByNameRequest, v1alpha1.DeprecateRepositoryByNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/DeprecateRepositoryByName",
+ opts...,
+ ),
+ undeprecateRepositoryByName: connect_go.NewClient[v1alpha1.UndeprecateRepositoryByNameRequest, v1alpha1.UndeprecateRepositoryByNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/UndeprecateRepositoryByName",
+ opts...,
+ ),
+ getRepositoriesByFullName: connect_go.NewClient[v1alpha1.GetRepositoriesByFullNameRequest, v1alpha1.GetRepositoriesByFullNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoriesByFullName",
+ opts...,
+ ),
+ setRepositoryContributor: connect_go.NewClient[v1alpha1.SetRepositoryContributorRequest, v1alpha1.SetRepositoryContributorResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/SetRepositoryContributor",
+ opts...,
+ ),
+ listRepositoryContributors: connect_go.NewClient[v1alpha1.ListRepositoryContributorsRequest, v1alpha1.ListRepositoryContributorsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/ListRepositoryContributors",
+ opts...,
+ ),
+ getRepositoryContributor: connect_go.NewClient[v1alpha1.GetRepositoryContributorRequest, v1alpha1.GetRepositoryContributorResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoryContributor",
+ opts...,
+ ),
+ getRepositorySettings: connect_go.NewClient[v1alpha1.GetRepositorySettingsRequest, v1alpha1.GetRepositorySettingsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositorySettings",
+ opts...,
+ ),
+ updateRepositorySettingsByName: connect_go.NewClient[v1alpha1.UpdateRepositorySettingsByNameRequest, v1alpha1.UpdateRepositorySettingsByNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/UpdateRepositorySettingsByName",
+ opts...,
+ ),
+ getRepositoriesMetadata: connect_go.NewClient[v1alpha1.GetRepositoriesMetadataRequest, v1alpha1.GetRepositoriesMetadataResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoriesMetadata",
+ opts...,
+ ),
+ }
+}
+
+// repositoryServiceClient implements RepositoryServiceClient.
+type repositoryServiceClient struct {
+ getRepository *connect_go.Client[v1alpha1.GetRepositoryRequest, v1alpha1.GetRepositoryResponse]
+ getRepositoryByFullName *connect_go.Client[v1alpha1.GetRepositoryByFullNameRequest, v1alpha1.GetRepositoryByFullNameResponse]
+ listRepositories *connect_go.Client[v1alpha1.ListRepositoriesRequest, v1alpha1.ListRepositoriesResponse]
+ listUserRepositories *connect_go.Client[v1alpha1.ListUserRepositoriesRequest, v1alpha1.ListUserRepositoriesResponse]
+ listRepositoriesUserCanAccess *connect_go.Client[v1alpha1.ListRepositoriesUserCanAccessRequest, v1alpha1.ListRepositoriesUserCanAccessResponse]
+ listOrganizationRepositories *connect_go.Client[v1alpha1.ListOrganizationRepositoriesRequest, v1alpha1.ListOrganizationRepositoriesResponse]
+ createRepositoryByFullName *connect_go.Client[v1alpha1.CreateRepositoryByFullNameRequest, v1alpha1.CreateRepositoryByFullNameResponse]
+ deleteRepository *connect_go.Client[v1alpha1.DeleteRepositoryRequest, v1alpha1.DeleteRepositoryResponse]
+ deleteRepositoryByFullName *connect_go.Client[v1alpha1.DeleteRepositoryByFullNameRequest, v1alpha1.DeleteRepositoryByFullNameResponse]
+ deprecateRepositoryByName *connect_go.Client[v1alpha1.DeprecateRepositoryByNameRequest, v1alpha1.DeprecateRepositoryByNameResponse]
+ undeprecateRepositoryByName *connect_go.Client[v1alpha1.UndeprecateRepositoryByNameRequest, v1alpha1.UndeprecateRepositoryByNameResponse]
+ getRepositoriesByFullName *connect_go.Client[v1alpha1.GetRepositoriesByFullNameRequest, v1alpha1.GetRepositoriesByFullNameResponse]
+ setRepositoryContributor *connect_go.Client[v1alpha1.SetRepositoryContributorRequest, v1alpha1.SetRepositoryContributorResponse]
+ listRepositoryContributors *connect_go.Client[v1alpha1.ListRepositoryContributorsRequest, v1alpha1.ListRepositoryContributorsResponse]
+ getRepositoryContributor *connect_go.Client[v1alpha1.GetRepositoryContributorRequest, v1alpha1.GetRepositoryContributorResponse]
+ getRepositorySettings *connect_go.Client[v1alpha1.GetRepositorySettingsRequest, v1alpha1.GetRepositorySettingsResponse]
+ updateRepositorySettingsByName *connect_go.Client[v1alpha1.UpdateRepositorySettingsByNameRequest, v1alpha1.UpdateRepositorySettingsByNameResponse]
+ getRepositoriesMetadata *connect_go.Client[v1alpha1.GetRepositoriesMetadataRequest, v1alpha1.GetRepositoriesMetadataResponse]
+}
+
+// GetRepository calls buf.alpha.registry.v1alpha1.RepositoryService.GetRepository.
+func (c *repositoryServiceClient) GetRepository(ctx context.Context, req *connect_go.Request[v1alpha1.GetRepositoryRequest]) (*connect_go.Response[v1alpha1.GetRepositoryResponse], error) {
+ return c.getRepository.CallUnary(ctx, req)
+}
+
+// GetRepositoryByFullName calls
+// buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoryByFullName.
+func (c *repositoryServiceClient) GetRepositoryByFullName(ctx context.Context, req *connect_go.Request[v1alpha1.GetRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.GetRepositoryByFullNameResponse], error) {
+ return c.getRepositoryByFullName.CallUnary(ctx, req)
+}
+
+// ListRepositories calls buf.alpha.registry.v1alpha1.RepositoryService.ListRepositories.
+func (c *repositoryServiceClient) ListRepositories(ctx context.Context, req *connect_go.Request[v1alpha1.ListRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListRepositoriesResponse], error) {
+ return c.listRepositories.CallUnary(ctx, req)
+}
+
+// ListUserRepositories calls buf.alpha.registry.v1alpha1.RepositoryService.ListUserRepositories.
+func (c *repositoryServiceClient) ListUserRepositories(ctx context.Context, req *connect_go.Request[v1alpha1.ListUserRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListUserRepositoriesResponse], error) {
+ return c.listUserRepositories.CallUnary(ctx, req)
+}
+
+// ListRepositoriesUserCanAccess calls
+// buf.alpha.registry.v1alpha1.RepositoryService.ListRepositoriesUserCanAccess.
+func (c *repositoryServiceClient) ListRepositoriesUserCanAccess(ctx context.Context, req *connect_go.Request[v1alpha1.ListRepositoriesUserCanAccessRequest]) (*connect_go.Response[v1alpha1.ListRepositoriesUserCanAccessResponse], error) {
+ return c.listRepositoriesUserCanAccess.CallUnary(ctx, req)
+}
+
+// ListOrganizationRepositories calls
+// buf.alpha.registry.v1alpha1.RepositoryService.ListOrganizationRepositories.
+func (c *repositoryServiceClient) ListOrganizationRepositories(ctx context.Context, req *connect_go.Request[v1alpha1.ListOrganizationRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListOrganizationRepositoriesResponse], error) {
+ return c.listOrganizationRepositories.CallUnary(ctx, req)
+}
+
+// CreateRepositoryByFullName calls
+// buf.alpha.registry.v1alpha1.RepositoryService.CreateRepositoryByFullName.
+func (c *repositoryServiceClient) CreateRepositoryByFullName(ctx context.Context, req *connect_go.Request[v1alpha1.CreateRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.CreateRepositoryByFullNameResponse], error) {
+ return c.createRepositoryByFullName.CallUnary(ctx, req)
+}
+
+// DeleteRepository calls buf.alpha.registry.v1alpha1.RepositoryService.DeleteRepository.
+func (c *repositoryServiceClient) DeleteRepository(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryResponse], error) {
+ return c.deleteRepository.CallUnary(ctx, req)
+}
+
+// DeleteRepositoryByFullName calls
+// buf.alpha.registry.v1alpha1.RepositoryService.DeleteRepositoryByFullName.
+func (c *repositoryServiceClient) DeleteRepositoryByFullName(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryByFullNameResponse], error) {
+ return c.deleteRepositoryByFullName.CallUnary(ctx, req)
+}
+
+// DeprecateRepositoryByName calls
+// buf.alpha.registry.v1alpha1.RepositoryService.DeprecateRepositoryByName.
+func (c *repositoryServiceClient) DeprecateRepositoryByName(ctx context.Context, req *connect_go.Request[v1alpha1.DeprecateRepositoryByNameRequest]) (*connect_go.Response[v1alpha1.DeprecateRepositoryByNameResponse], error) {
+ return c.deprecateRepositoryByName.CallUnary(ctx, req)
+}
+
+// UndeprecateRepositoryByName calls
+// buf.alpha.registry.v1alpha1.RepositoryService.UndeprecateRepositoryByName.
+func (c *repositoryServiceClient) UndeprecateRepositoryByName(ctx context.Context, req *connect_go.Request[v1alpha1.UndeprecateRepositoryByNameRequest]) (*connect_go.Response[v1alpha1.UndeprecateRepositoryByNameResponse], error) {
+ return c.undeprecateRepositoryByName.CallUnary(ctx, req)
+}
+
+// GetRepositoriesByFullName calls
+// buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoriesByFullName.
+func (c *repositoryServiceClient) GetRepositoriesByFullName(ctx context.Context, req *connect_go.Request[v1alpha1.GetRepositoriesByFullNameRequest]) (*connect_go.Response[v1alpha1.GetRepositoriesByFullNameResponse], error) {
+ return c.getRepositoriesByFullName.CallUnary(ctx, req)
+}
+
+// SetRepositoryContributor calls
+// buf.alpha.registry.v1alpha1.RepositoryService.SetRepositoryContributor.
+func (c *repositoryServiceClient) SetRepositoryContributor(ctx context.Context, req *connect_go.Request[v1alpha1.SetRepositoryContributorRequest]) (*connect_go.Response[v1alpha1.SetRepositoryContributorResponse], error) {
+ return c.setRepositoryContributor.CallUnary(ctx, req)
+}
+
+// ListRepositoryContributors calls
+// buf.alpha.registry.v1alpha1.RepositoryService.ListRepositoryContributors.
+func (c *repositoryServiceClient) ListRepositoryContributors(ctx context.Context, req *connect_go.Request[v1alpha1.ListRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryContributorsResponse], error) {
+ return c.listRepositoryContributors.CallUnary(ctx, req)
+}
+
+// GetRepositoryContributor calls
+// buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoryContributor.
+func (c *repositoryServiceClient) GetRepositoryContributor(ctx context.Context, req *connect_go.Request[v1alpha1.GetRepositoryContributorRequest]) (*connect_go.Response[v1alpha1.GetRepositoryContributorResponse], error) {
+ return c.getRepositoryContributor.CallUnary(ctx, req)
+}
+
+// GetRepositorySettings calls buf.alpha.registry.v1alpha1.RepositoryService.GetRepositorySettings.
+func (c *repositoryServiceClient) GetRepositorySettings(ctx context.Context, req *connect_go.Request[v1alpha1.GetRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.GetRepositorySettingsResponse], error) {
+ return c.getRepositorySettings.CallUnary(ctx, req)
+}
+
+// UpdateRepositorySettingsByName calls
+// buf.alpha.registry.v1alpha1.RepositoryService.UpdateRepositorySettingsByName.
+func (c *repositoryServiceClient) UpdateRepositorySettingsByName(ctx context.Context, req *connect_go.Request[v1alpha1.UpdateRepositorySettingsByNameRequest]) (*connect_go.Response[v1alpha1.UpdateRepositorySettingsByNameResponse], error) {
+ return c.updateRepositorySettingsByName.CallUnary(ctx, req)
+}
+
+// GetRepositoriesMetadata calls
+// buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoriesMetadata.
+func (c *repositoryServiceClient) GetRepositoriesMetadata(ctx context.Context, req *connect_go.Request[v1alpha1.GetRepositoriesMetadataRequest]) (*connect_go.Response[v1alpha1.GetRepositoriesMetadataResponse], error) {
+ return c.getRepositoriesMetadata.CallUnary(ctx, req)
+}
+
+// RepositoryServiceHandler is an implementation of the
+// buf.alpha.registry.v1alpha1.RepositoryService service.
+type RepositoryServiceHandler interface {
+ // GetRepository gets a repository by ID.
+ GetRepository(context.Context, *connect_go.Request[v1alpha1.GetRepositoryRequest]) (*connect_go.Response[v1alpha1.GetRepositoryResponse], error)
+ // GetRepositoryByFullName gets a repository by full name.
+ GetRepositoryByFullName(context.Context, *connect_go.Request[v1alpha1.GetRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.GetRepositoryByFullNameResponse], error)
+ // ListRepositories lists all repositories.
+ ListRepositories(context.Context, *connect_go.Request[v1alpha1.ListRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListRepositoriesResponse], error)
+ // ListUserRepositories lists all repositories belonging to a user.
+ ListUserRepositories(context.Context, *connect_go.Request[v1alpha1.ListUserRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListUserRepositoriesResponse], error)
+ // ListRepositoriesUserCanAccess lists all repositories a user can access.
+ ListRepositoriesUserCanAccess(context.Context, *connect_go.Request[v1alpha1.ListRepositoriesUserCanAccessRequest]) (*connect_go.Response[v1alpha1.ListRepositoriesUserCanAccessResponse], error)
+ // ListOrganizationRepositories lists all repositories for an organization.
+ ListOrganizationRepositories(context.Context, *connect_go.Request[v1alpha1.ListOrganizationRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListOrganizationRepositoriesResponse], error)
+ // CreateRepositoryByFullName creates a new repository by full name.
+ CreateRepositoryByFullName(context.Context, *connect_go.Request[v1alpha1.CreateRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.CreateRepositoryByFullNameResponse], error)
+ // DeleteRepository deletes a repository.
+ DeleteRepository(context.Context, *connect_go.Request[v1alpha1.DeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryResponse], error)
+ // DeleteRepositoryByFullName deletes a repository by full name.
+ DeleteRepositoryByFullName(context.Context, *connect_go.Request[v1alpha1.DeleteRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryByFullNameResponse], error)
+ // DeprecateRepositoryByName deprecates the repository.
+ DeprecateRepositoryByName(context.Context, *connect_go.Request[v1alpha1.DeprecateRepositoryByNameRequest]) (*connect_go.Response[v1alpha1.DeprecateRepositoryByNameResponse], error)
+ // UndeprecateRepositoryByName makes the repository not deprecated and removes any deprecation_message.
+ UndeprecateRepositoryByName(context.Context, *connect_go.Request[v1alpha1.UndeprecateRepositoryByNameRequest]) (*connect_go.Response[v1alpha1.UndeprecateRepositoryByNameResponse], error)
+ // GetRepositoriesByFullName gets repositories by full name. Response order is unspecified.
+ // Errors if any of the repositories don't exist or the caller does not have access to any of the repositories.
+ GetRepositoriesByFullName(context.Context, *connect_go.Request[v1alpha1.GetRepositoriesByFullNameRequest]) (*connect_go.Response[v1alpha1.GetRepositoriesByFullNameResponse], error)
+ // SetRepositoryContributor sets the role of a user in the repository.
+ SetRepositoryContributor(context.Context, *connect_go.Request[v1alpha1.SetRepositoryContributorRequest]) (*connect_go.Response[v1alpha1.SetRepositoryContributorResponse], error)
+ // ListRepositoryContributors returns the list of contributors that has an explicit role against the repository.
+ // This does not include users who have implicit roles against the repository, unless they have also been
+ // assigned a role explicitly.
+ ListRepositoryContributors(context.Context, *connect_go.Request[v1alpha1.ListRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryContributorsResponse], error)
+ // GetRepositoryContributor returns the contributor information of a user in a repository.
+ GetRepositoryContributor(context.Context, *connect_go.Request[v1alpha1.GetRepositoryContributorRequest]) (*connect_go.Response[v1alpha1.GetRepositoryContributorResponse], error)
+ // GetRepositorySettings gets the settings of a repository.
+ GetRepositorySettings(context.Context, *connect_go.Request[v1alpha1.GetRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.GetRepositorySettingsResponse], error)
+ // UpdateRepositorySettingsByName updates the settings of a repository.
+ UpdateRepositorySettingsByName(context.Context, *connect_go.Request[v1alpha1.UpdateRepositorySettingsByNameRequest]) (*connect_go.Response[v1alpha1.UpdateRepositorySettingsByNameResponse], error)
+ // GetRepositoriesMetadata gets the metadata of the repositories in the request, the length of repositories in the
+ // request should match the length of the metadata in the response, and the order of repositories in the response
+ // should match the order of the metadata in the request.
+ GetRepositoriesMetadata(context.Context, *connect_go.Request[v1alpha1.GetRepositoriesMetadataRequest]) (*connect_go.Response[v1alpha1.GetRepositoriesMetadataResponse], error)
+}
+
+// NewRepositoryServiceHandler builds an HTTP handler from the service implementation. It returns
+// the path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewRepositoryServiceHandler(svc RepositoryServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/GetRepository", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/GetRepository",
+ svc.GetRepository,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoryByFullName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoryByFullName",
+ svc.GetRepositoryByFullName,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/ListRepositories", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/ListRepositories",
+ svc.ListRepositories,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/ListUserRepositories", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/ListUserRepositories",
+ svc.ListUserRepositories,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/ListRepositoriesUserCanAccess", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/ListRepositoriesUserCanAccess",
+ svc.ListRepositoriesUserCanAccess,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/ListOrganizationRepositories", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/ListOrganizationRepositories",
+ svc.ListOrganizationRepositories,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/CreateRepositoryByFullName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/CreateRepositoryByFullName",
+ svc.CreateRepositoryByFullName,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/DeleteRepository", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/DeleteRepository",
+ svc.DeleteRepository,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/DeleteRepositoryByFullName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/DeleteRepositoryByFullName",
+ svc.DeleteRepositoryByFullName,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/DeprecateRepositoryByName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/DeprecateRepositoryByName",
+ svc.DeprecateRepositoryByName,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/UndeprecateRepositoryByName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/UndeprecateRepositoryByName",
+ svc.UndeprecateRepositoryByName,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoriesByFullName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoriesByFullName",
+ svc.GetRepositoriesByFullName,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/SetRepositoryContributor", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/SetRepositoryContributor",
+ svc.SetRepositoryContributor,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/ListRepositoryContributors", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/ListRepositoryContributors",
+ svc.ListRepositoryContributors,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoryContributor", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoryContributor",
+ svc.GetRepositoryContributor,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositorySettings", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositorySettings",
+ svc.GetRepositorySettings,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/UpdateRepositorySettingsByName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/UpdateRepositorySettingsByName",
+ svc.UpdateRepositorySettingsByName,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoriesMetadata", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryService/GetRepositoriesMetadata",
+ svc.GetRepositoriesMetadata,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.RepositoryService/", mux
+}
+
+// UnimplementedRepositoryServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedRepositoryServiceHandler struct{}
+
+func (UnimplementedRepositoryServiceHandler) GetRepository(context.Context, *connect_go.Request[v1alpha1.GetRepositoryRequest]) (*connect_go.Response[v1alpha1.GetRepositoryResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.GetRepository is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) GetRepositoryByFullName(context.Context, *connect_go.Request[v1alpha1.GetRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.GetRepositoryByFullNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoryByFullName is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) ListRepositories(context.Context, *connect_go.Request[v1alpha1.ListRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListRepositoriesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.ListRepositories is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) ListUserRepositories(context.Context, *connect_go.Request[v1alpha1.ListUserRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListUserRepositoriesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.ListUserRepositories is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) ListRepositoriesUserCanAccess(context.Context, *connect_go.Request[v1alpha1.ListRepositoriesUserCanAccessRequest]) (*connect_go.Response[v1alpha1.ListRepositoriesUserCanAccessResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.ListRepositoriesUserCanAccess is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) ListOrganizationRepositories(context.Context, *connect_go.Request[v1alpha1.ListOrganizationRepositoriesRequest]) (*connect_go.Response[v1alpha1.ListOrganizationRepositoriesResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.ListOrganizationRepositories is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) CreateRepositoryByFullName(context.Context, *connect_go.Request[v1alpha1.CreateRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.CreateRepositoryByFullNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.CreateRepositoryByFullName is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) DeleteRepository(context.Context, *connect_go.Request[v1alpha1.DeleteRepositoryRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.DeleteRepository is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) DeleteRepositoryByFullName(context.Context, *connect_go.Request[v1alpha1.DeleteRepositoryByFullNameRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryByFullNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.DeleteRepositoryByFullName is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) DeprecateRepositoryByName(context.Context, *connect_go.Request[v1alpha1.DeprecateRepositoryByNameRequest]) (*connect_go.Response[v1alpha1.DeprecateRepositoryByNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.DeprecateRepositoryByName is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) UndeprecateRepositoryByName(context.Context, *connect_go.Request[v1alpha1.UndeprecateRepositoryByNameRequest]) (*connect_go.Response[v1alpha1.UndeprecateRepositoryByNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.UndeprecateRepositoryByName is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) GetRepositoriesByFullName(context.Context, *connect_go.Request[v1alpha1.GetRepositoriesByFullNameRequest]) (*connect_go.Response[v1alpha1.GetRepositoriesByFullNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoriesByFullName is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) SetRepositoryContributor(context.Context, *connect_go.Request[v1alpha1.SetRepositoryContributorRequest]) (*connect_go.Response[v1alpha1.SetRepositoryContributorResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.SetRepositoryContributor is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) ListRepositoryContributors(context.Context, *connect_go.Request[v1alpha1.ListRepositoryContributorsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryContributorsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.ListRepositoryContributors is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) GetRepositoryContributor(context.Context, *connect_go.Request[v1alpha1.GetRepositoryContributorRequest]) (*connect_go.Response[v1alpha1.GetRepositoryContributorResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoryContributor is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) GetRepositorySettings(context.Context, *connect_go.Request[v1alpha1.GetRepositorySettingsRequest]) (*connect_go.Response[v1alpha1.GetRepositorySettingsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.GetRepositorySettings is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) UpdateRepositorySettingsByName(context.Context, *connect_go.Request[v1alpha1.UpdateRepositorySettingsByNameRequest]) (*connect_go.Response[v1alpha1.UpdateRepositorySettingsByNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.UpdateRepositorySettingsByName is not implemented"))
+}
+
+func (UnimplementedRepositoryServiceHandler) GetRepositoriesMetadata(context.Context, *connect_go.Request[v1alpha1.GetRepositoriesMetadataRequest]) (*connect_go.Response[v1alpha1.GetRepositoriesMetadataResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoriesMetadata is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository_commit.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository_commit.connect.go
new file mode 100644
index 000000000..e7b85f07c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository_commit.connect.go
@@ -0,0 +1,245 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/repository_commit.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // RepositoryCommitServiceName is the fully-qualified name of the RepositoryCommitService service.
+ RepositoryCommitServiceName = "buf.alpha.registry.v1alpha1.RepositoryCommitService"
+)
+
+// RepositoryCommitServiceClient is a client for the
+// buf.alpha.registry.v1alpha1.RepositoryCommitService service.
+type RepositoryCommitServiceClient interface {
+ // ListRepositoryCommitsByBranch lists the repository commits associated
+ // with a repository branch on a repository, ordered by their create time.
+ //
+ // Deprecated: do not use.
+ ListRepositoryCommitsByBranch(context.Context, *connect_go.Request[v1alpha1.ListRepositoryCommitsByBranchRequest]) (*connect_go.Response[v1alpha1.ListRepositoryCommitsByBranchResponse], error)
+ // ListRepositoryCommitsByReference returns repository commits up-to and including
+ // the provided reference.
+ ListRepositoryCommitsByReference(context.Context, *connect_go.Request[v1alpha1.ListRepositoryCommitsByReferenceRequest]) (*connect_go.Response[v1alpha1.ListRepositoryCommitsByReferenceResponse], error)
+ // GetRepositoryCommitByReference returns the repository commit matching
+ // the provided reference, if it exists.
+ GetRepositoryCommitByReference(context.Context, *connect_go.Request[v1alpha1.GetRepositoryCommitByReferenceRequest]) (*connect_go.Response[v1alpha1.GetRepositoryCommitByReferenceResponse], error)
+ // GetRepositoryCommitBySequenceId returns the repository commit matching
+ // the provided sequence ID and branch, if it exists.
+ GetRepositoryCommitBySequenceId(context.Context, *connect_go.Request[v1alpha1.GetRepositoryCommitBySequenceIdRequest]) (*connect_go.Response[v1alpha1.GetRepositoryCommitBySequenceIdResponse], error)
+ // ListRepositoryDraftCommits lists draft commits in a repository.
+ ListRepositoryDraftCommits(context.Context, *connect_go.Request[v1alpha1.ListRepositoryDraftCommitsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryDraftCommitsResponse], error)
+ // DeleteRepositoryDraftCommit deletes a draft.
+ DeleteRepositoryDraftCommit(context.Context, *connect_go.Request[v1alpha1.DeleteRepositoryDraftCommitRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryDraftCommitResponse], error)
+}
+
+// NewRepositoryCommitServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.RepositoryCommitService service. By default, it uses the Connect
+// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed
+// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
+// connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewRepositoryCommitServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) RepositoryCommitServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &repositoryCommitServiceClient{
+ listRepositoryCommitsByBranch: connect_go.NewClient[v1alpha1.ListRepositoryCommitsByBranchRequest, v1alpha1.ListRepositoryCommitsByBranchResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryCommitService/ListRepositoryCommitsByBranch",
+ opts...,
+ ),
+ listRepositoryCommitsByReference: connect_go.NewClient[v1alpha1.ListRepositoryCommitsByReferenceRequest, v1alpha1.ListRepositoryCommitsByReferenceResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryCommitService/ListRepositoryCommitsByReference",
+ opts...,
+ ),
+ getRepositoryCommitByReference: connect_go.NewClient[v1alpha1.GetRepositoryCommitByReferenceRequest, v1alpha1.GetRepositoryCommitByReferenceResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryCommitService/GetRepositoryCommitByReference",
+ opts...,
+ ),
+ getRepositoryCommitBySequenceId: connect_go.NewClient[v1alpha1.GetRepositoryCommitBySequenceIdRequest, v1alpha1.GetRepositoryCommitBySequenceIdResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryCommitService/GetRepositoryCommitBySequenceId",
+ opts...,
+ ),
+ listRepositoryDraftCommits: connect_go.NewClient[v1alpha1.ListRepositoryDraftCommitsRequest, v1alpha1.ListRepositoryDraftCommitsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryCommitService/ListRepositoryDraftCommits",
+ opts...,
+ ),
+ deleteRepositoryDraftCommit: connect_go.NewClient[v1alpha1.DeleteRepositoryDraftCommitRequest, v1alpha1.DeleteRepositoryDraftCommitResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryCommitService/DeleteRepositoryDraftCommit",
+ opts...,
+ ),
+ }
+}
+
+// repositoryCommitServiceClient implements RepositoryCommitServiceClient.
+type repositoryCommitServiceClient struct {
+ listRepositoryCommitsByBranch *connect_go.Client[v1alpha1.ListRepositoryCommitsByBranchRequest, v1alpha1.ListRepositoryCommitsByBranchResponse]
+ listRepositoryCommitsByReference *connect_go.Client[v1alpha1.ListRepositoryCommitsByReferenceRequest, v1alpha1.ListRepositoryCommitsByReferenceResponse]
+ getRepositoryCommitByReference *connect_go.Client[v1alpha1.GetRepositoryCommitByReferenceRequest, v1alpha1.GetRepositoryCommitByReferenceResponse]
+ getRepositoryCommitBySequenceId *connect_go.Client[v1alpha1.GetRepositoryCommitBySequenceIdRequest, v1alpha1.GetRepositoryCommitBySequenceIdResponse]
+ listRepositoryDraftCommits *connect_go.Client[v1alpha1.ListRepositoryDraftCommitsRequest, v1alpha1.ListRepositoryDraftCommitsResponse]
+ deleteRepositoryDraftCommit *connect_go.Client[v1alpha1.DeleteRepositoryDraftCommitRequest, v1alpha1.DeleteRepositoryDraftCommitResponse]
+}
+
+// ListRepositoryCommitsByBranch calls
+// buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryCommitsByBranch.
+//
+// Deprecated: do not use.
+func (c *repositoryCommitServiceClient) ListRepositoryCommitsByBranch(ctx context.Context, req *connect_go.Request[v1alpha1.ListRepositoryCommitsByBranchRequest]) (*connect_go.Response[v1alpha1.ListRepositoryCommitsByBranchResponse], error) {
+ return c.listRepositoryCommitsByBranch.CallUnary(ctx, req)
+}
+
+// ListRepositoryCommitsByReference calls
+// buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryCommitsByReference.
+func (c *repositoryCommitServiceClient) ListRepositoryCommitsByReference(ctx context.Context, req *connect_go.Request[v1alpha1.ListRepositoryCommitsByReferenceRequest]) (*connect_go.Response[v1alpha1.ListRepositoryCommitsByReferenceResponse], error) {
+ return c.listRepositoryCommitsByReference.CallUnary(ctx, req)
+}
+
+// GetRepositoryCommitByReference calls
+// buf.alpha.registry.v1alpha1.RepositoryCommitService.GetRepositoryCommitByReference.
+func (c *repositoryCommitServiceClient) GetRepositoryCommitByReference(ctx context.Context, req *connect_go.Request[v1alpha1.GetRepositoryCommitByReferenceRequest]) (*connect_go.Response[v1alpha1.GetRepositoryCommitByReferenceResponse], error) {
+ return c.getRepositoryCommitByReference.CallUnary(ctx, req)
+}
+
+// GetRepositoryCommitBySequenceId calls
+// buf.alpha.registry.v1alpha1.RepositoryCommitService.GetRepositoryCommitBySequenceId.
+func (c *repositoryCommitServiceClient) GetRepositoryCommitBySequenceId(ctx context.Context, req *connect_go.Request[v1alpha1.GetRepositoryCommitBySequenceIdRequest]) (*connect_go.Response[v1alpha1.GetRepositoryCommitBySequenceIdResponse], error) {
+ return c.getRepositoryCommitBySequenceId.CallUnary(ctx, req)
+}
+
+// ListRepositoryDraftCommits calls
+// buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryDraftCommits.
+func (c *repositoryCommitServiceClient) ListRepositoryDraftCommits(ctx context.Context, req *connect_go.Request[v1alpha1.ListRepositoryDraftCommitsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryDraftCommitsResponse], error) {
+ return c.listRepositoryDraftCommits.CallUnary(ctx, req)
+}
+
+// DeleteRepositoryDraftCommit calls
+// buf.alpha.registry.v1alpha1.RepositoryCommitService.DeleteRepositoryDraftCommit.
+func (c *repositoryCommitServiceClient) DeleteRepositoryDraftCommit(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteRepositoryDraftCommitRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryDraftCommitResponse], error) {
+ return c.deleteRepositoryDraftCommit.CallUnary(ctx, req)
+}
+
+// RepositoryCommitServiceHandler is an implementation of the
+// buf.alpha.registry.v1alpha1.RepositoryCommitService service.
+type RepositoryCommitServiceHandler interface {
+ // ListRepositoryCommitsByBranch lists the repository commits associated
+ // with a repository branch on a repository, ordered by their create time.
+ //
+ // Deprecated: do not use.
+ ListRepositoryCommitsByBranch(context.Context, *connect_go.Request[v1alpha1.ListRepositoryCommitsByBranchRequest]) (*connect_go.Response[v1alpha1.ListRepositoryCommitsByBranchResponse], error)
+ // ListRepositoryCommitsByReference returns repository commits up-to and including
+ // the provided reference.
+ ListRepositoryCommitsByReference(context.Context, *connect_go.Request[v1alpha1.ListRepositoryCommitsByReferenceRequest]) (*connect_go.Response[v1alpha1.ListRepositoryCommitsByReferenceResponse], error)
+ // GetRepositoryCommitByReference returns the repository commit matching
+ // the provided reference, if it exists.
+ GetRepositoryCommitByReference(context.Context, *connect_go.Request[v1alpha1.GetRepositoryCommitByReferenceRequest]) (*connect_go.Response[v1alpha1.GetRepositoryCommitByReferenceResponse], error)
+ // GetRepositoryCommitBySequenceId returns the repository commit matching
+ // the provided sequence ID and branch, if it exists.
+ GetRepositoryCommitBySequenceId(context.Context, *connect_go.Request[v1alpha1.GetRepositoryCommitBySequenceIdRequest]) (*connect_go.Response[v1alpha1.GetRepositoryCommitBySequenceIdResponse], error)
+ // ListRepositoryDraftCommits lists draft commits in a repository.
+ ListRepositoryDraftCommits(context.Context, *connect_go.Request[v1alpha1.ListRepositoryDraftCommitsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryDraftCommitsResponse], error)
+ // DeleteRepositoryDraftCommit deletes a draft.
+ DeleteRepositoryDraftCommit(context.Context, *connect_go.Request[v1alpha1.DeleteRepositoryDraftCommitRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryDraftCommitResponse], error)
+}
+
+// NewRepositoryCommitServiceHandler builds an HTTP handler from the service implementation. It
+// returns the path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewRepositoryCommitServiceHandler(svc RepositoryCommitServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryCommitService/ListRepositoryCommitsByBranch", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryCommitService/ListRepositoryCommitsByBranch",
+ svc.ListRepositoryCommitsByBranch,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryCommitService/ListRepositoryCommitsByReference", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryCommitService/ListRepositoryCommitsByReference",
+ svc.ListRepositoryCommitsByReference,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryCommitService/GetRepositoryCommitByReference", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryCommitService/GetRepositoryCommitByReference",
+ svc.GetRepositoryCommitByReference,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryCommitService/GetRepositoryCommitBySequenceId", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryCommitService/GetRepositoryCommitBySequenceId",
+ svc.GetRepositoryCommitBySequenceId,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryCommitService/ListRepositoryDraftCommits", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryCommitService/ListRepositoryDraftCommits",
+ svc.ListRepositoryDraftCommits,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryCommitService/DeleteRepositoryDraftCommit", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryCommitService/DeleteRepositoryDraftCommit",
+ svc.DeleteRepositoryDraftCommit,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.RepositoryCommitService/", mux
+}
+
+// UnimplementedRepositoryCommitServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedRepositoryCommitServiceHandler struct{}
+
+func (UnimplementedRepositoryCommitServiceHandler) ListRepositoryCommitsByBranch(context.Context, *connect_go.Request[v1alpha1.ListRepositoryCommitsByBranchRequest]) (*connect_go.Response[v1alpha1.ListRepositoryCommitsByBranchResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryCommitsByBranch is not implemented"))
+}
+
+func (UnimplementedRepositoryCommitServiceHandler) ListRepositoryCommitsByReference(context.Context, *connect_go.Request[v1alpha1.ListRepositoryCommitsByReferenceRequest]) (*connect_go.Response[v1alpha1.ListRepositoryCommitsByReferenceResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryCommitsByReference is not implemented"))
+}
+
+func (UnimplementedRepositoryCommitServiceHandler) GetRepositoryCommitByReference(context.Context, *connect_go.Request[v1alpha1.GetRepositoryCommitByReferenceRequest]) (*connect_go.Response[v1alpha1.GetRepositoryCommitByReferenceResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryCommitService.GetRepositoryCommitByReference is not implemented"))
+}
+
+func (UnimplementedRepositoryCommitServiceHandler) GetRepositoryCommitBySequenceId(context.Context, *connect_go.Request[v1alpha1.GetRepositoryCommitBySequenceIdRequest]) (*connect_go.Response[v1alpha1.GetRepositoryCommitBySequenceIdResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryCommitService.GetRepositoryCommitBySequenceId is not implemented"))
+}
+
+func (UnimplementedRepositoryCommitServiceHandler) ListRepositoryDraftCommits(context.Context, *connect_go.Request[v1alpha1.ListRepositoryDraftCommitsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryDraftCommitsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryDraftCommits is not implemented"))
+}
+
+func (UnimplementedRepositoryCommitServiceHandler) DeleteRepositoryDraftCommit(context.Context, *connect_go.Request[v1alpha1.DeleteRepositoryDraftCommitRequest]) (*connect_go.Response[v1alpha1.DeleteRepositoryDraftCommitResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryCommitService.DeleteRepositoryDraftCommit is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository_tag.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository_tag.connect.go
new file mode 100644
index 000000000..2504eb210
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/repository_tag.connect.go
@@ -0,0 +1,129 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/repository_tag.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // RepositoryTagServiceName is the fully-qualified name of the RepositoryTagService service.
+ RepositoryTagServiceName = "buf.alpha.registry.v1alpha1.RepositoryTagService"
+)
+
+// RepositoryTagServiceClient is a client for the buf.alpha.registry.v1alpha1.RepositoryTagService
+// service.
+type RepositoryTagServiceClient interface {
+ // CreateRepositoryTag creates a new repository tag.
+ CreateRepositoryTag(context.Context, *connect_go.Request[v1alpha1.CreateRepositoryTagRequest]) (*connect_go.Response[v1alpha1.CreateRepositoryTagResponse], error)
+ // ListRepositoryTags lists the repository tags associated with a Repository.
+ ListRepositoryTags(context.Context, *connect_go.Request[v1alpha1.ListRepositoryTagsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsResponse], error)
+}
+
+// NewRepositoryTagServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.RepositoryTagService service. By default, it uses the Connect
+// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed
+// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
+// connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewRepositoryTagServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) RepositoryTagServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &repositoryTagServiceClient{
+ createRepositoryTag: connect_go.NewClient[v1alpha1.CreateRepositoryTagRequest, v1alpha1.CreateRepositoryTagResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryTagService/CreateRepositoryTag",
+ opts...,
+ ),
+ listRepositoryTags: connect_go.NewClient[v1alpha1.ListRepositoryTagsRequest, v1alpha1.ListRepositoryTagsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.RepositoryTagService/ListRepositoryTags",
+ opts...,
+ ),
+ }
+}
+
+// repositoryTagServiceClient implements RepositoryTagServiceClient.
+type repositoryTagServiceClient struct {
+ createRepositoryTag *connect_go.Client[v1alpha1.CreateRepositoryTagRequest, v1alpha1.CreateRepositoryTagResponse]
+ listRepositoryTags *connect_go.Client[v1alpha1.ListRepositoryTagsRequest, v1alpha1.ListRepositoryTagsResponse]
+}
+
+// CreateRepositoryTag calls buf.alpha.registry.v1alpha1.RepositoryTagService.CreateRepositoryTag.
+func (c *repositoryTagServiceClient) CreateRepositoryTag(ctx context.Context, req *connect_go.Request[v1alpha1.CreateRepositoryTagRequest]) (*connect_go.Response[v1alpha1.CreateRepositoryTagResponse], error) {
+ return c.createRepositoryTag.CallUnary(ctx, req)
+}
+
+// ListRepositoryTags calls buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTags.
+func (c *repositoryTagServiceClient) ListRepositoryTags(ctx context.Context, req *connect_go.Request[v1alpha1.ListRepositoryTagsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsResponse], error) {
+ return c.listRepositoryTags.CallUnary(ctx, req)
+}
+
+// RepositoryTagServiceHandler is an implementation of the
+// buf.alpha.registry.v1alpha1.RepositoryTagService service.
+type RepositoryTagServiceHandler interface {
+ // CreateRepositoryTag creates a new repository tag.
+ CreateRepositoryTag(context.Context, *connect_go.Request[v1alpha1.CreateRepositoryTagRequest]) (*connect_go.Response[v1alpha1.CreateRepositoryTagResponse], error)
+ // ListRepositoryTags lists the repository tags associated with a Repository.
+ ListRepositoryTags(context.Context, *connect_go.Request[v1alpha1.ListRepositoryTagsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsResponse], error)
+}
+
+// NewRepositoryTagServiceHandler builds an HTTP handler from the service implementation. It returns
+// the path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewRepositoryTagServiceHandler(svc RepositoryTagServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryTagService/CreateRepositoryTag", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryTagService/CreateRepositoryTag",
+ svc.CreateRepositoryTag,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.RepositoryTagService/ListRepositoryTags", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.RepositoryTagService/ListRepositoryTags",
+ svc.ListRepositoryTags,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.RepositoryTagService/", mux
+}
+
+// UnimplementedRepositoryTagServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedRepositoryTagServiceHandler struct{}
+
+func (UnimplementedRepositoryTagServiceHandler) CreateRepositoryTag(context.Context, *connect_go.Request[v1alpha1.CreateRepositoryTagRequest]) (*connect_go.Response[v1alpha1.CreateRepositoryTagResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryTagService.CreateRepositoryTag is not implemented"))
+}
+
+func (UnimplementedRepositoryTagServiceHandler) ListRepositoryTags(context.Context, *connect_go.Request[v1alpha1.ListRepositoryTagsRequest]) (*connect_go.Response[v1alpha1.ListRepositoryTagsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTags is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/resolve.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/resolve.connect.go
new file mode 100644
index 000000000..c55438f57
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/resolve.connect.go
@@ -0,0 +1,204 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/resolve.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // ResolveServiceName is the fully-qualified name of the ResolveService service.
+ ResolveServiceName = "buf.alpha.registry.v1alpha1.ResolveService"
+ // LocalResolveServiceName is the fully-qualified name of the LocalResolveService service.
+ LocalResolveServiceName = "buf.alpha.registry.v1alpha1.LocalResolveService"
+)
+
+// ResolveServiceClient is a client for the buf.alpha.registry.v1alpha1.ResolveService service.
+type ResolveServiceClient interface {
+ // GetModulePins finds all the latest digests and respective dependencies of
+ // the provided module references and picks a set of distinct modules pins.
+ //
+ // Note that module references with commits should still be passed to this function
+ // to make sure this function can do dependency resolution.
+ //
+ // This function also deals with tiebreaking what ModulePin wins for the same repository.
+ GetModulePins(context.Context, *connect_go.Request[v1alpha1.GetModulePinsRequest]) (*connect_go.Response[v1alpha1.GetModulePinsResponse], error)
+}
+
+// NewResolveServiceClient constructs a client for the buf.alpha.registry.v1alpha1.ResolveService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewResolveServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ResolveServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &resolveServiceClient{
+ getModulePins: connect_go.NewClient[v1alpha1.GetModulePinsRequest, v1alpha1.GetModulePinsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.ResolveService/GetModulePins",
+ opts...,
+ ),
+ }
+}
+
+// resolveServiceClient implements ResolveServiceClient.
+type resolveServiceClient struct {
+ getModulePins *connect_go.Client[v1alpha1.GetModulePinsRequest, v1alpha1.GetModulePinsResponse]
+}
+
+// GetModulePins calls buf.alpha.registry.v1alpha1.ResolveService.GetModulePins.
+func (c *resolveServiceClient) GetModulePins(ctx context.Context, req *connect_go.Request[v1alpha1.GetModulePinsRequest]) (*connect_go.Response[v1alpha1.GetModulePinsResponse], error) {
+ return c.getModulePins.CallUnary(ctx, req)
+}
+
+// ResolveServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.ResolveService
+// service.
+type ResolveServiceHandler interface {
+ // GetModulePins finds all the latest digests and respective dependencies of
+ // the provided module references and picks a set of distinct modules pins.
+ //
+ // Note that module references with commits should still be passed to this function
+ // to make sure this function can do dependency resolution.
+ //
+ // This function also deals with tiebreaking what ModulePin wins for the same repository.
+ GetModulePins(context.Context, *connect_go.Request[v1alpha1.GetModulePinsRequest]) (*connect_go.Response[v1alpha1.GetModulePinsResponse], error)
+}
+
+// NewResolveServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewResolveServiceHandler(svc ResolveServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.ResolveService/GetModulePins", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.ResolveService/GetModulePins",
+ svc.GetModulePins,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.ResolveService/", mux
+}
+
+// UnimplementedResolveServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedResolveServiceHandler struct{}
+
+func (UnimplementedResolveServiceHandler) GetModulePins(context.Context, *connect_go.Request[v1alpha1.GetModulePinsRequest]) (*connect_go.Response[v1alpha1.GetModulePinsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.ResolveService.GetModulePins is not implemented"))
+}
+
+// LocalResolveServiceClient is a client for the buf.alpha.registry.v1alpha1.LocalResolveService
+// service.
+type LocalResolveServiceClient interface {
+ // GetLocalModulePins gets the latest pins for the specified local module references.
+ // It also includes all of the modules transitive dependencies for the specified references.
+ //
+ // We want this for two reasons:
+ //
+ // 1. It makes it easy to say "we know we're looking for owner/repo on this specific remote".
+ // While we could just do this in GetModulePins by being aware of what our remote is
+ // (something we probably still need to know, DNS problems aside, which are more
+ // theoretical), this helps.
+ // 2. Having a separate method makes us able to say "do not make decisions about what
+ // wins between competing pins for the same repo". This should only be done in
+ // GetModulePins, not in this function, i.e. only done at the top level.
+ GetLocalModulePins(context.Context, *connect_go.Request[v1alpha1.GetLocalModulePinsRequest]) (*connect_go.Response[v1alpha1.GetLocalModulePinsResponse], error)
+}
+
+// NewLocalResolveServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.LocalResolveService service. By default, it uses the Connect protocol
+// with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed requests. To
+// use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or connect.WithGRPCWeb()
+// options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewLocalResolveServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) LocalResolveServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &localResolveServiceClient{
+ getLocalModulePins: connect_go.NewClient[v1alpha1.GetLocalModulePinsRequest, v1alpha1.GetLocalModulePinsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.LocalResolveService/GetLocalModulePins",
+ opts...,
+ ),
+ }
+}
+
+// localResolveServiceClient implements LocalResolveServiceClient.
+type localResolveServiceClient struct {
+ getLocalModulePins *connect_go.Client[v1alpha1.GetLocalModulePinsRequest, v1alpha1.GetLocalModulePinsResponse]
+}
+
+// GetLocalModulePins calls buf.alpha.registry.v1alpha1.LocalResolveService.GetLocalModulePins.
+func (c *localResolveServiceClient) GetLocalModulePins(ctx context.Context, req *connect_go.Request[v1alpha1.GetLocalModulePinsRequest]) (*connect_go.Response[v1alpha1.GetLocalModulePinsResponse], error) {
+ return c.getLocalModulePins.CallUnary(ctx, req)
+}
+
+// LocalResolveServiceHandler is an implementation of the
+// buf.alpha.registry.v1alpha1.LocalResolveService service.
+type LocalResolveServiceHandler interface {
+ // GetLocalModulePins gets the latest pins for the specified local module references.
+ // It also includes all of the modules transitive dependencies for the specified references.
+ //
+ // We want this for two reasons:
+ //
+ // 1. It makes it easy to say "we know we're looking for owner/repo on this specific remote".
+ // While we could just do this in GetModulePins by being aware of what our remote is
+ // (something we probably still need to know, DNS problems aside, which are more
+ // theoretical), this helps.
+ // 2. Having a separate method makes us able to say "do not make decisions about what
+ // wins between competing pins for the same repo". This should only be done in
+ // GetModulePins, not in this function, i.e. only done at the top level.
+ GetLocalModulePins(context.Context, *connect_go.Request[v1alpha1.GetLocalModulePinsRequest]) (*connect_go.Response[v1alpha1.GetLocalModulePinsResponse], error)
+}
+
+// NewLocalResolveServiceHandler builds an HTTP handler from the service implementation. It returns
+// the path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewLocalResolveServiceHandler(svc LocalResolveServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.LocalResolveService/GetLocalModulePins", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.LocalResolveService/GetLocalModulePins",
+ svc.GetLocalModulePins,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.LocalResolveService/", mux
+}
+
+// UnimplementedLocalResolveServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedLocalResolveServiceHandler struct{}
+
+func (UnimplementedLocalResolveServiceHandler) GetLocalModulePins(context.Context, *connect_go.Request[v1alpha1.GetLocalModulePinsRequest]) (*connect_go.Response[v1alpha1.GetLocalModulePinsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.LocalResolveService.GetLocalModulePins is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/resource.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/resource.connect.go
new file mode 100644
index 000000000..9883b29f4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/resource.connect.go
@@ -0,0 +1,105 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/resource.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // ResourceServiceName is the fully-qualified name of the ResourceService service.
+ ResourceServiceName = "buf.alpha.registry.v1alpha1.ResourceService"
+)
+
+// ResourceServiceClient is a client for the buf.alpha.registry.v1alpha1.ResourceService service.
+type ResourceServiceClient interface {
+ // GetResourceByName takes a resource name and returns the
+ // resource either as a repository or a plugin.
+ GetResourceByName(context.Context, *connect_go.Request[v1alpha1.GetResourceByNameRequest]) (*connect_go.Response[v1alpha1.GetResourceByNameResponse], error)
+}
+
+// NewResourceServiceClient constructs a client for the buf.alpha.registry.v1alpha1.ResourceService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewResourceServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) ResourceServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &resourceServiceClient{
+ getResourceByName: connect_go.NewClient[v1alpha1.GetResourceByNameRequest, v1alpha1.GetResourceByNameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.ResourceService/GetResourceByName",
+ opts...,
+ ),
+ }
+}
+
+// resourceServiceClient implements ResourceServiceClient.
+type resourceServiceClient struct {
+ getResourceByName *connect_go.Client[v1alpha1.GetResourceByNameRequest, v1alpha1.GetResourceByNameResponse]
+}
+
+// GetResourceByName calls buf.alpha.registry.v1alpha1.ResourceService.GetResourceByName.
+func (c *resourceServiceClient) GetResourceByName(ctx context.Context, req *connect_go.Request[v1alpha1.GetResourceByNameRequest]) (*connect_go.Response[v1alpha1.GetResourceByNameResponse], error) {
+ return c.getResourceByName.CallUnary(ctx, req)
+}
+
+// ResourceServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.ResourceService
+// service.
+type ResourceServiceHandler interface {
+ // GetResourceByName takes a resource name and returns the
+ // resource either as a repository or a plugin.
+ GetResourceByName(context.Context, *connect_go.Request[v1alpha1.GetResourceByNameRequest]) (*connect_go.Response[v1alpha1.GetResourceByNameResponse], error)
+}
+
+// NewResourceServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewResourceServiceHandler(svc ResourceServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.ResourceService/GetResourceByName", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.ResourceService/GetResourceByName",
+ svc.GetResourceByName,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.ResourceService/", mux
+}
+
+// UnimplementedResourceServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedResourceServiceHandler struct{}
+
+func (UnimplementedResourceServiceHandler) GetResourceByName(context.Context, *connect_go.Request[v1alpha1.GetResourceByNameRequest]) (*connect_go.Response[v1alpha1.GetResourceByNameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.ResourceService.GetResourceByName is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/schema.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/schema.connect.go
new file mode 100644
index 000000000..c48495140
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/schema.connect.go
@@ -0,0 +1,131 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/schema.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // SchemaServiceName is the fully-qualified name of the SchemaService service.
+ SchemaServiceName = "buf.alpha.registry.v1alpha1.SchemaService"
+)
+
+// SchemaServiceClient is a client for the buf.alpha.registry.v1alpha1.SchemaService service.
+type SchemaServiceClient interface {
+ // GetSchema allows the caller to download a schema for one or more requested
+ // types, RPC services, or RPC methods.
+ GetSchema(context.Context, *connect_go.Request[v1alpha1.GetSchemaRequest]) (*connect_go.Response[v1alpha1.GetSchemaResponse], error)
+ // ConvertMessage allows the caller to convert a given message data blob from
+ // one format to another by referring to a type schema for the blob.
+ ConvertMessage(context.Context, *connect_go.Request[v1alpha1.ConvertMessageRequest]) (*connect_go.Response[v1alpha1.ConvertMessageResponse], error)
+}
+
+// NewSchemaServiceClient constructs a client for the buf.alpha.registry.v1alpha1.SchemaService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewSchemaServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) SchemaServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &schemaServiceClient{
+ getSchema: connect_go.NewClient[v1alpha1.GetSchemaRequest, v1alpha1.GetSchemaResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.SchemaService/GetSchema",
+ opts...,
+ ),
+ convertMessage: connect_go.NewClient[v1alpha1.ConvertMessageRequest, v1alpha1.ConvertMessageResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.SchemaService/ConvertMessage",
+ opts...,
+ ),
+ }
+}
+
+// schemaServiceClient implements SchemaServiceClient.
+type schemaServiceClient struct {
+ getSchema *connect_go.Client[v1alpha1.GetSchemaRequest, v1alpha1.GetSchemaResponse]
+ convertMessage *connect_go.Client[v1alpha1.ConvertMessageRequest, v1alpha1.ConvertMessageResponse]
+}
+
+// GetSchema calls buf.alpha.registry.v1alpha1.SchemaService.GetSchema.
+func (c *schemaServiceClient) GetSchema(ctx context.Context, req *connect_go.Request[v1alpha1.GetSchemaRequest]) (*connect_go.Response[v1alpha1.GetSchemaResponse], error) {
+ return c.getSchema.CallUnary(ctx, req)
+}
+
+// ConvertMessage calls buf.alpha.registry.v1alpha1.SchemaService.ConvertMessage.
+func (c *schemaServiceClient) ConvertMessage(ctx context.Context, req *connect_go.Request[v1alpha1.ConvertMessageRequest]) (*connect_go.Response[v1alpha1.ConvertMessageResponse], error) {
+ return c.convertMessage.CallUnary(ctx, req)
+}
+
+// SchemaServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.SchemaService
+// service.
+type SchemaServiceHandler interface {
+ // GetSchema allows the caller to download a schema for one or more requested
+ // types, RPC services, or RPC methods.
+ GetSchema(context.Context, *connect_go.Request[v1alpha1.GetSchemaRequest]) (*connect_go.Response[v1alpha1.GetSchemaResponse], error)
+ // ConvertMessage allows the caller to convert a given message data blob from
+ // one format to another by referring to a type schema for the blob.
+ ConvertMessage(context.Context, *connect_go.Request[v1alpha1.ConvertMessageRequest]) (*connect_go.Response[v1alpha1.ConvertMessageResponse], error)
+}
+
+// NewSchemaServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewSchemaServiceHandler(svc SchemaServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.SchemaService/GetSchema", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.SchemaService/GetSchema",
+ svc.GetSchema,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.SchemaService/ConvertMessage", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.SchemaService/ConvertMessage",
+ svc.ConvertMessage,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.SchemaService/", mux
+}
+
+// UnimplementedSchemaServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedSchemaServiceHandler struct{}
+
+func (UnimplementedSchemaServiceHandler) GetSchema(context.Context, *connect_go.Request[v1alpha1.GetSchemaRequest]) (*connect_go.Response[v1alpha1.GetSchemaResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.SchemaService.GetSchema is not implemented"))
+}
+
+func (UnimplementedSchemaServiceHandler) ConvertMessage(context.Context, *connect_go.Request[v1alpha1.ConvertMessageRequest]) (*connect_go.Response[v1alpha1.ConvertMessageResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.SchemaService.ConvertMessage is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/search.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/search.connect.go
new file mode 100644
index 000000000..be3bc9c88
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/search.connect.go
@@ -0,0 +1,151 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/search.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // SearchServiceName is the fully-qualified name of the SearchService service.
+ SearchServiceName = "buf.alpha.registry.v1alpha1.SearchService"
+)
+
+// SearchServiceClient is a client for the buf.alpha.registry.v1alpha1.SearchService service.
+type SearchServiceClient interface {
+ // Search searches the BSR.
+ Search(context.Context, *connect_go.Request[v1alpha1.SearchRequest]) (*connect_go.Response[v1alpha1.SearchResponse], error)
+ // SearchTag searches for tags in a repository
+ SearchTag(context.Context, *connect_go.Request[v1alpha1.SearchTagRequest]) (*connect_go.Response[v1alpha1.SearchTagResponse], error)
+ // SearchDraft searches for drafts in a repository
+ SearchDraft(context.Context, *connect_go.Request[v1alpha1.SearchDraftRequest]) (*connect_go.Response[v1alpha1.SearchDraftResponse], error)
+}
+
+// NewSearchServiceClient constructs a client for the buf.alpha.registry.v1alpha1.SearchService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewSearchServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) SearchServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &searchServiceClient{
+ search: connect_go.NewClient[v1alpha1.SearchRequest, v1alpha1.SearchResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.SearchService/Search",
+ opts...,
+ ),
+ searchTag: connect_go.NewClient[v1alpha1.SearchTagRequest, v1alpha1.SearchTagResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.SearchService/SearchTag",
+ opts...,
+ ),
+ searchDraft: connect_go.NewClient[v1alpha1.SearchDraftRequest, v1alpha1.SearchDraftResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.SearchService/SearchDraft",
+ opts...,
+ ),
+ }
+}
+
+// searchServiceClient implements SearchServiceClient.
+type searchServiceClient struct {
+ search *connect_go.Client[v1alpha1.SearchRequest, v1alpha1.SearchResponse]
+ searchTag *connect_go.Client[v1alpha1.SearchTagRequest, v1alpha1.SearchTagResponse]
+ searchDraft *connect_go.Client[v1alpha1.SearchDraftRequest, v1alpha1.SearchDraftResponse]
+}
+
+// Search calls buf.alpha.registry.v1alpha1.SearchService.Search.
+func (c *searchServiceClient) Search(ctx context.Context, req *connect_go.Request[v1alpha1.SearchRequest]) (*connect_go.Response[v1alpha1.SearchResponse], error) {
+ return c.search.CallUnary(ctx, req)
+}
+
+// SearchTag calls buf.alpha.registry.v1alpha1.SearchService.SearchTag.
+func (c *searchServiceClient) SearchTag(ctx context.Context, req *connect_go.Request[v1alpha1.SearchTagRequest]) (*connect_go.Response[v1alpha1.SearchTagResponse], error) {
+ return c.searchTag.CallUnary(ctx, req)
+}
+
+// SearchDraft calls buf.alpha.registry.v1alpha1.SearchService.SearchDraft.
+func (c *searchServiceClient) SearchDraft(ctx context.Context, req *connect_go.Request[v1alpha1.SearchDraftRequest]) (*connect_go.Response[v1alpha1.SearchDraftResponse], error) {
+ return c.searchDraft.CallUnary(ctx, req)
+}
+
+// SearchServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.SearchService
+// service.
+type SearchServiceHandler interface {
+ // Search searches the BSR.
+ Search(context.Context, *connect_go.Request[v1alpha1.SearchRequest]) (*connect_go.Response[v1alpha1.SearchResponse], error)
+ // SearchTag searches for tags in a repository
+ SearchTag(context.Context, *connect_go.Request[v1alpha1.SearchTagRequest]) (*connect_go.Response[v1alpha1.SearchTagResponse], error)
+ // SearchDraft searches for drafts in a repository
+ SearchDraft(context.Context, *connect_go.Request[v1alpha1.SearchDraftRequest]) (*connect_go.Response[v1alpha1.SearchDraftResponse], error)
+}
+
+// NewSearchServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewSearchServiceHandler(svc SearchServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.SearchService/Search", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.SearchService/Search",
+ svc.Search,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.SearchService/SearchTag", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.SearchService/SearchTag",
+ svc.SearchTag,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.SearchService/SearchDraft", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.SearchService/SearchDraft",
+ svc.SearchDraft,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.SearchService/", mux
+}
+
+// UnimplementedSearchServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedSearchServiceHandler struct{}
+
+func (UnimplementedSearchServiceHandler) Search(context.Context, *connect_go.Request[v1alpha1.SearchRequest]) (*connect_go.Response[v1alpha1.SearchResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.SearchService.Search is not implemented"))
+}
+
+func (UnimplementedSearchServiceHandler) SearchTag(context.Context, *connect_go.Request[v1alpha1.SearchTagRequest]) (*connect_go.Response[v1alpha1.SearchTagResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.SearchService.SearchTag is not implemented"))
+}
+
+func (UnimplementedSearchServiceHandler) SearchDraft(context.Context, *connect_go.Request[v1alpha1.SearchDraftRequest]) (*connect_go.Response[v1alpha1.SearchDraftResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.SearchService.SearchDraft is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/studio.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/studio.connect.go
new file mode 100644
index 000000000..f9efdf967
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/studio.connect.go
@@ -0,0 +1,127 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/studio.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // StudioServiceName is the fully-qualified name of the StudioService service.
+ StudioServiceName = "buf.alpha.registry.v1alpha1.StudioService"
+)
+
+// StudioServiceClient is a client for the buf.alpha.registry.v1alpha1.StudioService service.
+type StudioServiceClient interface {
+ // ListStudioAgentPresets returns a list of agent presets in the server.
+ ListStudioAgentPresets(context.Context, *connect_go.Request[v1alpha1.ListStudioAgentPresetsRequest]) (*connect_go.Response[v1alpha1.ListStudioAgentPresetsResponse], error)
+ // SetStudioAgentPresets sets the list of agent presets in the server.
+ SetStudioAgentPresets(context.Context, *connect_go.Request[v1alpha1.SetStudioAgentPresetsRequest]) (*connect_go.Response[v1alpha1.SetStudioAgentPresetsResponse], error)
+}
+
+// NewStudioServiceClient constructs a client for the buf.alpha.registry.v1alpha1.StudioService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewStudioServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) StudioServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &studioServiceClient{
+ listStudioAgentPresets: connect_go.NewClient[v1alpha1.ListStudioAgentPresetsRequest, v1alpha1.ListStudioAgentPresetsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.StudioService/ListStudioAgentPresets",
+ opts...,
+ ),
+ setStudioAgentPresets: connect_go.NewClient[v1alpha1.SetStudioAgentPresetsRequest, v1alpha1.SetStudioAgentPresetsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.StudioService/SetStudioAgentPresets",
+ opts...,
+ ),
+ }
+}
+
+// studioServiceClient implements StudioServiceClient.
+type studioServiceClient struct {
+ listStudioAgentPresets *connect_go.Client[v1alpha1.ListStudioAgentPresetsRequest, v1alpha1.ListStudioAgentPresetsResponse]
+ setStudioAgentPresets *connect_go.Client[v1alpha1.SetStudioAgentPresetsRequest, v1alpha1.SetStudioAgentPresetsResponse]
+}
+
+// ListStudioAgentPresets calls buf.alpha.registry.v1alpha1.StudioService.ListStudioAgentPresets.
+func (c *studioServiceClient) ListStudioAgentPresets(ctx context.Context, req *connect_go.Request[v1alpha1.ListStudioAgentPresetsRequest]) (*connect_go.Response[v1alpha1.ListStudioAgentPresetsResponse], error) {
+ return c.listStudioAgentPresets.CallUnary(ctx, req)
+}
+
+// SetStudioAgentPresets calls buf.alpha.registry.v1alpha1.StudioService.SetStudioAgentPresets.
+func (c *studioServiceClient) SetStudioAgentPresets(ctx context.Context, req *connect_go.Request[v1alpha1.SetStudioAgentPresetsRequest]) (*connect_go.Response[v1alpha1.SetStudioAgentPresetsResponse], error) {
+ return c.setStudioAgentPresets.CallUnary(ctx, req)
+}
+
+// StudioServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.StudioService
+// service.
+type StudioServiceHandler interface {
+ // ListStudioAgentPresets returns a list of agent presets in the server.
+ ListStudioAgentPresets(context.Context, *connect_go.Request[v1alpha1.ListStudioAgentPresetsRequest]) (*connect_go.Response[v1alpha1.ListStudioAgentPresetsResponse], error)
+ // SetStudioAgentPresets sets the list of agent presets in the server.
+ SetStudioAgentPresets(context.Context, *connect_go.Request[v1alpha1.SetStudioAgentPresetsRequest]) (*connect_go.Response[v1alpha1.SetStudioAgentPresetsResponse], error)
+}
+
+// NewStudioServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewStudioServiceHandler(svc StudioServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.StudioService/ListStudioAgentPresets", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.StudioService/ListStudioAgentPresets",
+ svc.ListStudioAgentPresets,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.StudioService/SetStudioAgentPresets", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.StudioService/SetStudioAgentPresets",
+ svc.SetStudioAgentPresets,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.StudioService/", mux
+}
+
+// UnimplementedStudioServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedStudioServiceHandler struct{}
+
+func (UnimplementedStudioServiceHandler) ListStudioAgentPresets(context.Context, *connect_go.Request[v1alpha1.ListStudioAgentPresetsRequest]) (*connect_go.Response[v1alpha1.ListStudioAgentPresetsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.StudioService.ListStudioAgentPresets is not implemented"))
+}
+
+func (UnimplementedStudioServiceHandler) SetStudioAgentPresets(context.Context, *connect_go.Request[v1alpha1.SetStudioAgentPresetsRequest]) (*connect_go.Response[v1alpha1.SetStudioAgentPresetsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.StudioService.SetStudioAgentPresets is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/studio_request.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/studio_request.connect.go
new file mode 100644
index 000000000..1a24d9c4f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/studio_request.connect.go
@@ -0,0 +1,181 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/studio_request.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // StudioRequestServiceName is the fully-qualified name of the StudioRequestService service.
+ StudioRequestServiceName = "buf.alpha.registry.v1alpha1.StudioRequestService"
+)
+
+// StudioRequestServiceClient is a client for the buf.alpha.registry.v1alpha1.StudioRequestService
+// service.
+type StudioRequestServiceClient interface {
+ // CreateStudioRequest registers a favorite Studio Requests to the caller's
+ // BSR profile.
+ CreateStudioRequest(context.Context, *connect_go.Request[v1alpha1.CreateStudioRequestRequest]) (*connect_go.Response[v1alpha1.CreateStudioRequestResponse], error)
+ // RenameStudioRequest renames an existing Studio Request.
+ RenameStudioRequest(context.Context, *connect_go.Request[v1alpha1.RenameStudioRequestRequest]) (*connect_go.Response[v1alpha1.RenameStudioRequestResponse], error)
+ // DeleteStudioRequest removes a favorite Studio Request from the caller's BSR
+ // profile.
+ DeleteStudioRequest(context.Context, *connect_go.Request[v1alpha1.DeleteStudioRequestRequest]) (*connect_go.Response[v1alpha1.DeleteStudioRequestResponse], error)
+ // ListStudioRequests shows the caller's favorited Studio Requests.
+ ListStudioRequests(context.Context, *connect_go.Request[v1alpha1.ListStudioRequestsRequest]) (*connect_go.Response[v1alpha1.ListStudioRequestsResponse], error)
+}
+
+// NewStudioRequestServiceClient constructs a client for the
+// buf.alpha.registry.v1alpha1.StudioRequestService service. By default, it uses the Connect
+// protocol with the binary Protobuf Codec, asks for gzipped responses, and sends uncompressed
+// requests. To use the gRPC or gRPC-Web protocols, supply the connect.WithGRPC() or
+// connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewStudioRequestServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) StudioRequestServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &studioRequestServiceClient{
+ createStudioRequest: connect_go.NewClient[v1alpha1.CreateStudioRequestRequest, v1alpha1.CreateStudioRequestResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.StudioRequestService/CreateStudioRequest",
+ opts...,
+ ),
+ renameStudioRequest: connect_go.NewClient[v1alpha1.RenameStudioRequestRequest, v1alpha1.RenameStudioRequestResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.StudioRequestService/RenameStudioRequest",
+ opts...,
+ ),
+ deleteStudioRequest: connect_go.NewClient[v1alpha1.DeleteStudioRequestRequest, v1alpha1.DeleteStudioRequestResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.StudioRequestService/DeleteStudioRequest",
+ opts...,
+ ),
+ listStudioRequests: connect_go.NewClient[v1alpha1.ListStudioRequestsRequest, v1alpha1.ListStudioRequestsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.StudioRequestService/ListStudioRequests",
+ opts...,
+ ),
+ }
+}
+
+// studioRequestServiceClient implements StudioRequestServiceClient.
+type studioRequestServiceClient struct {
+ createStudioRequest *connect_go.Client[v1alpha1.CreateStudioRequestRequest, v1alpha1.CreateStudioRequestResponse]
+ renameStudioRequest *connect_go.Client[v1alpha1.RenameStudioRequestRequest, v1alpha1.RenameStudioRequestResponse]
+ deleteStudioRequest *connect_go.Client[v1alpha1.DeleteStudioRequestRequest, v1alpha1.DeleteStudioRequestResponse]
+ listStudioRequests *connect_go.Client[v1alpha1.ListStudioRequestsRequest, v1alpha1.ListStudioRequestsResponse]
+}
+
+// CreateStudioRequest calls buf.alpha.registry.v1alpha1.StudioRequestService.CreateStudioRequest.
+func (c *studioRequestServiceClient) CreateStudioRequest(ctx context.Context, req *connect_go.Request[v1alpha1.CreateStudioRequestRequest]) (*connect_go.Response[v1alpha1.CreateStudioRequestResponse], error) {
+ return c.createStudioRequest.CallUnary(ctx, req)
+}
+
+// RenameStudioRequest calls buf.alpha.registry.v1alpha1.StudioRequestService.RenameStudioRequest.
+func (c *studioRequestServiceClient) RenameStudioRequest(ctx context.Context, req *connect_go.Request[v1alpha1.RenameStudioRequestRequest]) (*connect_go.Response[v1alpha1.RenameStudioRequestResponse], error) {
+ return c.renameStudioRequest.CallUnary(ctx, req)
+}
+
+// DeleteStudioRequest calls buf.alpha.registry.v1alpha1.StudioRequestService.DeleteStudioRequest.
+func (c *studioRequestServiceClient) DeleteStudioRequest(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteStudioRequestRequest]) (*connect_go.Response[v1alpha1.DeleteStudioRequestResponse], error) {
+ return c.deleteStudioRequest.CallUnary(ctx, req)
+}
+
+// ListStudioRequests calls buf.alpha.registry.v1alpha1.StudioRequestService.ListStudioRequests.
+func (c *studioRequestServiceClient) ListStudioRequests(ctx context.Context, req *connect_go.Request[v1alpha1.ListStudioRequestsRequest]) (*connect_go.Response[v1alpha1.ListStudioRequestsResponse], error) {
+ return c.listStudioRequests.CallUnary(ctx, req)
+}
+
+// StudioRequestServiceHandler is an implementation of the
+// buf.alpha.registry.v1alpha1.StudioRequestService service.
+type StudioRequestServiceHandler interface {
+ // CreateStudioRequest registers a favorite Studio Requests to the caller's
+ // BSR profile.
+ CreateStudioRequest(context.Context, *connect_go.Request[v1alpha1.CreateStudioRequestRequest]) (*connect_go.Response[v1alpha1.CreateStudioRequestResponse], error)
+ // RenameStudioRequest renames an existing Studio Request.
+ RenameStudioRequest(context.Context, *connect_go.Request[v1alpha1.RenameStudioRequestRequest]) (*connect_go.Response[v1alpha1.RenameStudioRequestResponse], error)
+ // DeleteStudioRequest removes a favorite Studio Request from the caller's BSR
+ // profile.
+ DeleteStudioRequest(context.Context, *connect_go.Request[v1alpha1.DeleteStudioRequestRequest]) (*connect_go.Response[v1alpha1.DeleteStudioRequestResponse], error)
+ // ListStudioRequests shows the caller's favorited Studio Requests.
+ ListStudioRequests(context.Context, *connect_go.Request[v1alpha1.ListStudioRequestsRequest]) (*connect_go.Response[v1alpha1.ListStudioRequestsResponse], error)
+}
+
+// NewStudioRequestServiceHandler builds an HTTP handler from the service implementation. It returns
+// the path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewStudioRequestServiceHandler(svc StudioRequestServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.StudioRequestService/CreateStudioRequest", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.StudioRequestService/CreateStudioRequest",
+ svc.CreateStudioRequest,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.StudioRequestService/RenameStudioRequest", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.StudioRequestService/RenameStudioRequest",
+ svc.RenameStudioRequest,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.StudioRequestService/DeleteStudioRequest", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.StudioRequestService/DeleteStudioRequest",
+ svc.DeleteStudioRequest,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.StudioRequestService/ListStudioRequests", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.StudioRequestService/ListStudioRequests",
+ svc.ListStudioRequests,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.StudioRequestService/", mux
+}
+
+// UnimplementedStudioRequestServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedStudioRequestServiceHandler struct{}
+
+func (UnimplementedStudioRequestServiceHandler) CreateStudioRequest(context.Context, *connect_go.Request[v1alpha1.CreateStudioRequestRequest]) (*connect_go.Response[v1alpha1.CreateStudioRequestResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.StudioRequestService.CreateStudioRequest is not implemented"))
+}
+
+func (UnimplementedStudioRequestServiceHandler) RenameStudioRequest(context.Context, *connect_go.Request[v1alpha1.RenameStudioRequestRequest]) (*connect_go.Response[v1alpha1.RenameStudioRequestResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.StudioRequestService.RenameStudioRequest is not implemented"))
+}
+
+func (UnimplementedStudioRequestServiceHandler) DeleteStudioRequest(context.Context, *connect_go.Request[v1alpha1.DeleteStudioRequestRequest]) (*connect_go.Response[v1alpha1.DeleteStudioRequestResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.StudioRequestService.DeleteStudioRequest is not implemented"))
+}
+
+func (UnimplementedStudioRequestServiceHandler) ListStudioRequests(context.Context, *connect_go.Request[v1alpha1.ListStudioRequestsRequest]) (*connect_go.Response[v1alpha1.ListStudioRequestsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.StudioRequestService.ListStudioRequests is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/token.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/token.connect.go
new file mode 100644
index 000000000..ac87b2400
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/token.connect.go
@@ -0,0 +1,186 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/token.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // TokenServiceName is the fully-qualified name of the TokenService service.
+ TokenServiceName = "buf.alpha.registry.v1alpha1.TokenService"
+)
+
+// TokenServiceClient is a client for the buf.alpha.registry.v1alpha1.TokenService service.
+type TokenServiceClient interface {
+ // CreateToken creates a new token suitable for machine-to-machine authentication.
+ CreateToken(context.Context, *connect_go.Request[v1alpha1.CreateTokenRequest]) (*connect_go.Response[v1alpha1.CreateTokenResponse], error)
+ // GetToken gets the specific token for the user
+ //
+ // This method requires authentication.
+ GetToken(context.Context, *connect_go.Request[v1alpha1.GetTokenRequest]) (*connect_go.Response[v1alpha1.GetTokenResponse], error)
+ // ListTokens lists the users active tokens
+ //
+ // This method requires authentication.
+ ListTokens(context.Context, *connect_go.Request[v1alpha1.ListTokensRequest]) (*connect_go.Response[v1alpha1.ListTokensResponse], error)
+ // DeleteToken deletes an existing token.
+ //
+ // This method requires authentication.
+ DeleteToken(context.Context, *connect_go.Request[v1alpha1.DeleteTokenRequest]) (*connect_go.Response[v1alpha1.DeleteTokenResponse], error)
+}
+
+// NewTokenServiceClient constructs a client for the buf.alpha.registry.v1alpha1.TokenService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewTokenServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) TokenServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &tokenServiceClient{
+ createToken: connect_go.NewClient[v1alpha1.CreateTokenRequest, v1alpha1.CreateTokenResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.TokenService/CreateToken",
+ opts...,
+ ),
+ getToken: connect_go.NewClient[v1alpha1.GetTokenRequest, v1alpha1.GetTokenResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.TokenService/GetToken",
+ opts...,
+ ),
+ listTokens: connect_go.NewClient[v1alpha1.ListTokensRequest, v1alpha1.ListTokensResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.TokenService/ListTokens",
+ opts...,
+ ),
+ deleteToken: connect_go.NewClient[v1alpha1.DeleteTokenRequest, v1alpha1.DeleteTokenResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.TokenService/DeleteToken",
+ opts...,
+ ),
+ }
+}
+
+// tokenServiceClient implements TokenServiceClient.
+type tokenServiceClient struct {
+ createToken *connect_go.Client[v1alpha1.CreateTokenRequest, v1alpha1.CreateTokenResponse]
+ getToken *connect_go.Client[v1alpha1.GetTokenRequest, v1alpha1.GetTokenResponse]
+ listTokens *connect_go.Client[v1alpha1.ListTokensRequest, v1alpha1.ListTokensResponse]
+ deleteToken *connect_go.Client[v1alpha1.DeleteTokenRequest, v1alpha1.DeleteTokenResponse]
+}
+
+// CreateToken calls buf.alpha.registry.v1alpha1.TokenService.CreateToken.
+func (c *tokenServiceClient) CreateToken(ctx context.Context, req *connect_go.Request[v1alpha1.CreateTokenRequest]) (*connect_go.Response[v1alpha1.CreateTokenResponse], error) {
+ return c.createToken.CallUnary(ctx, req)
+}
+
+// GetToken calls buf.alpha.registry.v1alpha1.TokenService.GetToken.
+func (c *tokenServiceClient) GetToken(ctx context.Context, req *connect_go.Request[v1alpha1.GetTokenRequest]) (*connect_go.Response[v1alpha1.GetTokenResponse], error) {
+ return c.getToken.CallUnary(ctx, req)
+}
+
+// ListTokens calls buf.alpha.registry.v1alpha1.TokenService.ListTokens.
+func (c *tokenServiceClient) ListTokens(ctx context.Context, req *connect_go.Request[v1alpha1.ListTokensRequest]) (*connect_go.Response[v1alpha1.ListTokensResponse], error) {
+ return c.listTokens.CallUnary(ctx, req)
+}
+
+// DeleteToken calls buf.alpha.registry.v1alpha1.TokenService.DeleteToken.
+func (c *tokenServiceClient) DeleteToken(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteTokenRequest]) (*connect_go.Response[v1alpha1.DeleteTokenResponse], error) {
+ return c.deleteToken.CallUnary(ctx, req)
+}
+
+// TokenServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.TokenService service.
+type TokenServiceHandler interface {
+ // CreateToken creates a new token suitable for machine-to-machine authentication.
+ CreateToken(context.Context, *connect_go.Request[v1alpha1.CreateTokenRequest]) (*connect_go.Response[v1alpha1.CreateTokenResponse], error)
+ // GetToken gets the specific token for the user
+ //
+ // This method requires authentication.
+ GetToken(context.Context, *connect_go.Request[v1alpha1.GetTokenRequest]) (*connect_go.Response[v1alpha1.GetTokenResponse], error)
+ // ListTokens lists the users active tokens
+ //
+ // This method requires authentication.
+ ListTokens(context.Context, *connect_go.Request[v1alpha1.ListTokensRequest]) (*connect_go.Response[v1alpha1.ListTokensResponse], error)
+ // DeleteToken deletes an existing token.
+ //
+ // This method requires authentication.
+ DeleteToken(context.Context, *connect_go.Request[v1alpha1.DeleteTokenRequest]) (*connect_go.Response[v1alpha1.DeleteTokenResponse], error)
+}
+
+// NewTokenServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewTokenServiceHandler(svc TokenServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.TokenService/CreateToken", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.TokenService/CreateToken",
+ svc.CreateToken,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.TokenService/GetToken", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.TokenService/GetToken",
+ svc.GetToken,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.TokenService/ListTokens", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.TokenService/ListTokens",
+ svc.ListTokens,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.TokenService/DeleteToken", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.TokenService/DeleteToken",
+ svc.DeleteToken,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.TokenService/", mux
+}
+
+// UnimplementedTokenServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedTokenServiceHandler struct{}
+
+func (UnimplementedTokenServiceHandler) CreateToken(context.Context, *connect_go.Request[v1alpha1.CreateTokenRequest]) (*connect_go.Response[v1alpha1.CreateTokenResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.TokenService.CreateToken is not implemented"))
+}
+
+func (UnimplementedTokenServiceHandler) GetToken(context.Context, *connect_go.Request[v1alpha1.GetTokenRequest]) (*connect_go.Response[v1alpha1.GetTokenResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.TokenService.GetToken is not implemented"))
+}
+
+func (UnimplementedTokenServiceHandler) ListTokens(context.Context, *connect_go.Request[v1alpha1.ListTokensRequest]) (*connect_go.Response[v1alpha1.ListTokensResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.TokenService.ListTokens is not implemented"))
+}
+
+func (UnimplementedTokenServiceHandler) DeleteToken(context.Context, *connect_go.Request[v1alpha1.DeleteTokenRequest]) (*connect_go.Response[v1alpha1.DeleteTokenResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.TokenService.DeleteToken is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/usage.gen.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/usage.gen.go
new file mode 100644
index 000000000..4ce1ae979
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package registryv1alpha1connect
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/user.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/user.connect.go
new file mode 100644
index 000000000..b361031d7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/user.connect.go
@@ -0,0 +1,320 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/user.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // UserServiceName is the fully-qualified name of the UserService service.
+ UserServiceName = "buf.alpha.registry.v1alpha1.UserService"
+)
+
+// UserServiceClient is a client for the buf.alpha.registry.v1alpha1.UserService service.
+type UserServiceClient interface {
+ // CreateUser creates a new user with the given username.
+ CreateUser(context.Context, *connect_go.Request[v1alpha1.CreateUserRequest]) (*connect_go.Response[v1alpha1.CreateUserResponse], error)
+ // GetUser gets a user by ID.
+ GetUser(context.Context, *connect_go.Request[v1alpha1.GetUserRequest]) (*connect_go.Response[v1alpha1.GetUserResponse], error)
+ // GetUserByUsername gets a user by username.
+ GetUserByUsername(context.Context, *connect_go.Request[v1alpha1.GetUserByUsernameRequest]) (*connect_go.Response[v1alpha1.GetUserByUsernameResponse], error)
+ // ListUsers lists all users.
+ ListUsers(context.Context, *connect_go.Request[v1alpha1.ListUsersRequest]) (*connect_go.Response[v1alpha1.ListUsersResponse], error)
+ // ListOrganizationUsers lists all users for an organization.
+ // TODO: #663 move this to organization service
+ ListOrganizationUsers(context.Context, *connect_go.Request[v1alpha1.ListOrganizationUsersRequest]) (*connect_go.Response[v1alpha1.ListOrganizationUsersResponse], error)
+ // DeleteUser deletes a user.
+ DeleteUser(context.Context, *connect_go.Request[v1alpha1.DeleteUserRequest]) (*connect_go.Response[v1alpha1.DeleteUserResponse], error)
+ // Deactivate user deactivates a user.
+ DeactivateUser(context.Context, *connect_go.Request[v1alpha1.DeactivateUserRequest]) (*connect_go.Response[v1alpha1.DeactivateUserResponse], error)
+ // UpdateUserServerRole update the role of an user in the server.
+ UpdateUserServerRole(context.Context, *connect_go.Request[v1alpha1.UpdateUserServerRoleRequest]) (*connect_go.Response[v1alpha1.UpdateUserServerRoleResponse], error)
+ // CountUsers returns the number of users in the server by the user state provided.
+ CountUsers(context.Context, *connect_go.Request[v1alpha1.CountUsersRequest]) (*connect_go.Response[v1alpha1.CountUsersResponse], error)
+ // UpdateUserSettings update the user settings including description.
+ UpdateUserSettings(context.Context, *connect_go.Request[v1alpha1.UpdateUserSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateUserSettingsResponse], error)
+}
+
+// NewUserServiceClient constructs a client for the buf.alpha.registry.v1alpha1.UserService service.
+// By default, it uses the Connect protocol with the binary Protobuf Codec, asks for gzipped
+// responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply the
+// connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewUserServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) UserServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &userServiceClient{
+ createUser: connect_go.NewClient[v1alpha1.CreateUserRequest, v1alpha1.CreateUserResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.UserService/CreateUser",
+ opts...,
+ ),
+ getUser: connect_go.NewClient[v1alpha1.GetUserRequest, v1alpha1.GetUserResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.UserService/GetUser",
+ opts...,
+ ),
+ getUserByUsername: connect_go.NewClient[v1alpha1.GetUserByUsernameRequest, v1alpha1.GetUserByUsernameResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.UserService/GetUserByUsername",
+ opts...,
+ ),
+ listUsers: connect_go.NewClient[v1alpha1.ListUsersRequest, v1alpha1.ListUsersResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.UserService/ListUsers",
+ opts...,
+ ),
+ listOrganizationUsers: connect_go.NewClient[v1alpha1.ListOrganizationUsersRequest, v1alpha1.ListOrganizationUsersResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.UserService/ListOrganizationUsers",
+ opts...,
+ ),
+ deleteUser: connect_go.NewClient[v1alpha1.DeleteUserRequest, v1alpha1.DeleteUserResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.UserService/DeleteUser",
+ opts...,
+ ),
+ deactivateUser: connect_go.NewClient[v1alpha1.DeactivateUserRequest, v1alpha1.DeactivateUserResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.UserService/DeactivateUser",
+ opts...,
+ ),
+ updateUserServerRole: connect_go.NewClient[v1alpha1.UpdateUserServerRoleRequest, v1alpha1.UpdateUserServerRoleResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.UserService/UpdateUserServerRole",
+ opts...,
+ ),
+ countUsers: connect_go.NewClient[v1alpha1.CountUsersRequest, v1alpha1.CountUsersResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.UserService/CountUsers",
+ opts...,
+ ),
+ updateUserSettings: connect_go.NewClient[v1alpha1.UpdateUserSettingsRequest, v1alpha1.UpdateUserSettingsResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.UserService/UpdateUserSettings",
+ opts...,
+ ),
+ }
+}
+
+// userServiceClient implements UserServiceClient.
+type userServiceClient struct {
+ createUser *connect_go.Client[v1alpha1.CreateUserRequest, v1alpha1.CreateUserResponse]
+ getUser *connect_go.Client[v1alpha1.GetUserRequest, v1alpha1.GetUserResponse]
+ getUserByUsername *connect_go.Client[v1alpha1.GetUserByUsernameRequest, v1alpha1.GetUserByUsernameResponse]
+ listUsers *connect_go.Client[v1alpha1.ListUsersRequest, v1alpha1.ListUsersResponse]
+ listOrganizationUsers *connect_go.Client[v1alpha1.ListOrganizationUsersRequest, v1alpha1.ListOrganizationUsersResponse]
+ deleteUser *connect_go.Client[v1alpha1.DeleteUserRequest, v1alpha1.DeleteUserResponse]
+ deactivateUser *connect_go.Client[v1alpha1.DeactivateUserRequest, v1alpha1.DeactivateUserResponse]
+ updateUserServerRole *connect_go.Client[v1alpha1.UpdateUserServerRoleRequest, v1alpha1.UpdateUserServerRoleResponse]
+ countUsers *connect_go.Client[v1alpha1.CountUsersRequest, v1alpha1.CountUsersResponse]
+ updateUserSettings *connect_go.Client[v1alpha1.UpdateUserSettingsRequest, v1alpha1.UpdateUserSettingsResponse]
+}
+
+// CreateUser calls buf.alpha.registry.v1alpha1.UserService.CreateUser.
+func (c *userServiceClient) CreateUser(ctx context.Context, req *connect_go.Request[v1alpha1.CreateUserRequest]) (*connect_go.Response[v1alpha1.CreateUserResponse], error) {
+ return c.createUser.CallUnary(ctx, req)
+}
+
+// GetUser calls buf.alpha.registry.v1alpha1.UserService.GetUser.
+func (c *userServiceClient) GetUser(ctx context.Context, req *connect_go.Request[v1alpha1.GetUserRequest]) (*connect_go.Response[v1alpha1.GetUserResponse], error) {
+ return c.getUser.CallUnary(ctx, req)
+}
+
+// GetUserByUsername calls buf.alpha.registry.v1alpha1.UserService.GetUserByUsername.
+func (c *userServiceClient) GetUserByUsername(ctx context.Context, req *connect_go.Request[v1alpha1.GetUserByUsernameRequest]) (*connect_go.Response[v1alpha1.GetUserByUsernameResponse], error) {
+ return c.getUserByUsername.CallUnary(ctx, req)
+}
+
+// ListUsers calls buf.alpha.registry.v1alpha1.UserService.ListUsers.
+func (c *userServiceClient) ListUsers(ctx context.Context, req *connect_go.Request[v1alpha1.ListUsersRequest]) (*connect_go.Response[v1alpha1.ListUsersResponse], error) {
+ return c.listUsers.CallUnary(ctx, req)
+}
+
+// ListOrganizationUsers calls buf.alpha.registry.v1alpha1.UserService.ListOrganizationUsers.
+func (c *userServiceClient) ListOrganizationUsers(ctx context.Context, req *connect_go.Request[v1alpha1.ListOrganizationUsersRequest]) (*connect_go.Response[v1alpha1.ListOrganizationUsersResponse], error) {
+ return c.listOrganizationUsers.CallUnary(ctx, req)
+}
+
+// DeleteUser calls buf.alpha.registry.v1alpha1.UserService.DeleteUser.
+func (c *userServiceClient) DeleteUser(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteUserRequest]) (*connect_go.Response[v1alpha1.DeleteUserResponse], error) {
+ return c.deleteUser.CallUnary(ctx, req)
+}
+
+// DeactivateUser calls buf.alpha.registry.v1alpha1.UserService.DeactivateUser.
+func (c *userServiceClient) DeactivateUser(ctx context.Context, req *connect_go.Request[v1alpha1.DeactivateUserRequest]) (*connect_go.Response[v1alpha1.DeactivateUserResponse], error) {
+ return c.deactivateUser.CallUnary(ctx, req)
+}
+
+// UpdateUserServerRole calls buf.alpha.registry.v1alpha1.UserService.UpdateUserServerRole.
+func (c *userServiceClient) UpdateUserServerRole(ctx context.Context, req *connect_go.Request[v1alpha1.UpdateUserServerRoleRequest]) (*connect_go.Response[v1alpha1.UpdateUserServerRoleResponse], error) {
+ return c.updateUserServerRole.CallUnary(ctx, req)
+}
+
+// CountUsers calls buf.alpha.registry.v1alpha1.UserService.CountUsers.
+func (c *userServiceClient) CountUsers(ctx context.Context, req *connect_go.Request[v1alpha1.CountUsersRequest]) (*connect_go.Response[v1alpha1.CountUsersResponse], error) {
+ return c.countUsers.CallUnary(ctx, req)
+}
+
+// UpdateUserSettings calls buf.alpha.registry.v1alpha1.UserService.UpdateUserSettings.
+func (c *userServiceClient) UpdateUserSettings(ctx context.Context, req *connect_go.Request[v1alpha1.UpdateUserSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateUserSettingsResponse], error) {
+ return c.updateUserSettings.CallUnary(ctx, req)
+}
+
+// UserServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.UserService service.
+type UserServiceHandler interface {
+ // CreateUser creates a new user with the given username.
+ CreateUser(context.Context, *connect_go.Request[v1alpha1.CreateUserRequest]) (*connect_go.Response[v1alpha1.CreateUserResponse], error)
+ // GetUser gets a user by ID.
+ GetUser(context.Context, *connect_go.Request[v1alpha1.GetUserRequest]) (*connect_go.Response[v1alpha1.GetUserResponse], error)
+ // GetUserByUsername gets a user by username.
+ GetUserByUsername(context.Context, *connect_go.Request[v1alpha1.GetUserByUsernameRequest]) (*connect_go.Response[v1alpha1.GetUserByUsernameResponse], error)
+ // ListUsers lists all users.
+ ListUsers(context.Context, *connect_go.Request[v1alpha1.ListUsersRequest]) (*connect_go.Response[v1alpha1.ListUsersResponse], error)
+ // ListOrganizationUsers lists all users for an organization.
+ // TODO: #663 move this to organization service
+ ListOrganizationUsers(context.Context, *connect_go.Request[v1alpha1.ListOrganizationUsersRequest]) (*connect_go.Response[v1alpha1.ListOrganizationUsersResponse], error)
+ // DeleteUser deletes a user.
+ DeleteUser(context.Context, *connect_go.Request[v1alpha1.DeleteUserRequest]) (*connect_go.Response[v1alpha1.DeleteUserResponse], error)
+ // Deactivate user deactivates a user.
+ DeactivateUser(context.Context, *connect_go.Request[v1alpha1.DeactivateUserRequest]) (*connect_go.Response[v1alpha1.DeactivateUserResponse], error)
+ // UpdateUserServerRole update the role of an user in the server.
+ UpdateUserServerRole(context.Context, *connect_go.Request[v1alpha1.UpdateUserServerRoleRequest]) (*connect_go.Response[v1alpha1.UpdateUserServerRoleResponse], error)
+ // CountUsers returns the number of users in the server by the user state provided.
+ CountUsers(context.Context, *connect_go.Request[v1alpha1.CountUsersRequest]) (*connect_go.Response[v1alpha1.CountUsersResponse], error)
+ // UpdateUserSettings update the user settings including description.
+ UpdateUserSettings(context.Context, *connect_go.Request[v1alpha1.UpdateUserSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateUserSettingsResponse], error)
+}
+
+// NewUserServiceHandler builds an HTTP handler from the service implementation. It returns the path
+// on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewUserServiceHandler(svc UserServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.UserService/CreateUser", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.UserService/CreateUser",
+ svc.CreateUser,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.UserService/GetUser", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.UserService/GetUser",
+ svc.GetUser,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.UserService/GetUserByUsername", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.UserService/GetUserByUsername",
+ svc.GetUserByUsername,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.UserService/ListUsers", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.UserService/ListUsers",
+ svc.ListUsers,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.UserService/ListOrganizationUsers", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.UserService/ListOrganizationUsers",
+ svc.ListOrganizationUsers,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.UserService/DeleteUser", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.UserService/DeleteUser",
+ svc.DeleteUser,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.UserService/DeactivateUser", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.UserService/DeactivateUser",
+ svc.DeactivateUser,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.UserService/UpdateUserServerRole", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.UserService/UpdateUserServerRole",
+ svc.UpdateUserServerRole,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.UserService/CountUsers", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.UserService/CountUsers",
+ svc.CountUsers,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.UserService/UpdateUserSettings", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.UserService/UpdateUserSettings",
+ svc.UpdateUserSettings,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.UserService/", mux
+}
+
+// UnimplementedUserServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedUserServiceHandler struct{}
+
+func (UnimplementedUserServiceHandler) CreateUser(context.Context, *connect_go.Request[v1alpha1.CreateUserRequest]) (*connect_go.Response[v1alpha1.CreateUserResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.UserService.CreateUser is not implemented"))
+}
+
+func (UnimplementedUserServiceHandler) GetUser(context.Context, *connect_go.Request[v1alpha1.GetUserRequest]) (*connect_go.Response[v1alpha1.GetUserResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.UserService.GetUser is not implemented"))
+}
+
+func (UnimplementedUserServiceHandler) GetUserByUsername(context.Context, *connect_go.Request[v1alpha1.GetUserByUsernameRequest]) (*connect_go.Response[v1alpha1.GetUserByUsernameResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.UserService.GetUserByUsername is not implemented"))
+}
+
+func (UnimplementedUserServiceHandler) ListUsers(context.Context, *connect_go.Request[v1alpha1.ListUsersRequest]) (*connect_go.Response[v1alpha1.ListUsersResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.UserService.ListUsers is not implemented"))
+}
+
+func (UnimplementedUserServiceHandler) ListOrganizationUsers(context.Context, *connect_go.Request[v1alpha1.ListOrganizationUsersRequest]) (*connect_go.Response[v1alpha1.ListOrganizationUsersResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.UserService.ListOrganizationUsers is not implemented"))
+}
+
+func (UnimplementedUserServiceHandler) DeleteUser(context.Context, *connect_go.Request[v1alpha1.DeleteUserRequest]) (*connect_go.Response[v1alpha1.DeleteUserResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.UserService.DeleteUser is not implemented"))
+}
+
+func (UnimplementedUserServiceHandler) DeactivateUser(context.Context, *connect_go.Request[v1alpha1.DeactivateUserRequest]) (*connect_go.Response[v1alpha1.DeactivateUserResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.UserService.DeactivateUser is not implemented"))
+}
+
+func (UnimplementedUserServiceHandler) UpdateUserServerRole(context.Context, *connect_go.Request[v1alpha1.UpdateUserServerRoleRequest]) (*connect_go.Response[v1alpha1.UpdateUserServerRoleResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.UserService.UpdateUserServerRole is not implemented"))
+}
+
+func (UnimplementedUserServiceHandler) CountUsers(context.Context, *connect_go.Request[v1alpha1.CountUsersRequest]) (*connect_go.Response[v1alpha1.CountUsersResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.UserService.CountUsers is not implemented"))
+}
+
+func (UnimplementedUserServiceHandler) UpdateUserSettings(context.Context, *connect_go.Request[v1alpha1.UpdateUserSettingsRequest]) (*connect_go.Response[v1alpha1.UpdateUserSettingsResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.UserService.UpdateUserSettings is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/webhook.connect.go b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/webhook.connect.go
new file mode 100644
index 000000000..14008ea4b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/connect/buf/alpha/registry/v1alpha1/registryv1alpha1connect/webhook.connect.go
@@ -0,0 +1,153 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-connect-go. DO NOT EDIT.
+//
+// Source: buf/alpha/registry/v1alpha1/webhook.proto
+
+package registryv1alpha1connect
+
+import (
+ context "context"
+ errors "errors"
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1"
+ connect_go "github.com/bufbuild/connect-go"
+ http "net/http"
+ strings "strings"
+)
+
+// This is a compile-time assertion to ensure that this generated file and the connect package are
+// compatible. If you get a compiler error that this constant is not defined, this code was
+// generated with a version of connect newer than the one compiled into your binary. You can fix the
+// problem by either regenerating this code with an older version of connect or updating the connect
+// version compiled into your binary.
+const _ = connect_go.IsAtLeastVersion0_1_0
+
+const (
+ // WebhookServiceName is the fully-qualified name of the WebhookService service.
+ WebhookServiceName = "buf.alpha.registry.v1alpha1.WebhookService"
+)
+
+// WebhookServiceClient is a client for the buf.alpha.registry.v1alpha1.WebhookService service.
+type WebhookServiceClient interface {
+ // Create a webhook, subscribes to a given repository event for a callback URL
+ // invocation.
+ CreateWebhook(context.Context, *connect_go.Request[v1alpha1.CreateWebhookRequest]) (*connect_go.Response[v1alpha1.CreateWebhookResponse], error)
+ // Delete a webhook removes the event subscription.
+ DeleteWebhook(context.Context, *connect_go.Request[v1alpha1.DeleteWebhookRequest]) (*connect_go.Response[v1alpha1.DeleteWebhookResponse], error)
+ // Lists the webhooks subscriptions for a given repository.
+ ListWebhooks(context.Context, *connect_go.Request[v1alpha1.ListWebhooksRequest]) (*connect_go.Response[v1alpha1.ListWebhooksResponse], error)
+}
+
+// NewWebhookServiceClient constructs a client for the buf.alpha.registry.v1alpha1.WebhookService
+// service. By default, it uses the Connect protocol with the binary Protobuf Codec, asks for
+// gzipped responses, and sends uncompressed requests. To use the gRPC or gRPC-Web protocols, supply
+// the connect.WithGRPC() or connect.WithGRPCWeb() options.
+//
+// The URL supplied here should be the base URL for the Connect or gRPC server (for example,
+// http://api.acme.com or https://acme.com/grpc).
+func NewWebhookServiceClient(httpClient connect_go.HTTPClient, baseURL string, opts ...connect_go.ClientOption) WebhookServiceClient {
+ baseURL = strings.TrimRight(baseURL, "/")
+ return &webhookServiceClient{
+ createWebhook: connect_go.NewClient[v1alpha1.CreateWebhookRequest, v1alpha1.CreateWebhookResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.WebhookService/CreateWebhook",
+ opts...,
+ ),
+ deleteWebhook: connect_go.NewClient[v1alpha1.DeleteWebhookRequest, v1alpha1.DeleteWebhookResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.WebhookService/DeleteWebhook",
+ opts...,
+ ),
+ listWebhooks: connect_go.NewClient[v1alpha1.ListWebhooksRequest, v1alpha1.ListWebhooksResponse](
+ httpClient,
+ baseURL+"/buf.alpha.registry.v1alpha1.WebhookService/ListWebhooks",
+ opts...,
+ ),
+ }
+}
+
+// webhookServiceClient implements WebhookServiceClient.
+type webhookServiceClient struct {
+ createWebhook *connect_go.Client[v1alpha1.CreateWebhookRequest, v1alpha1.CreateWebhookResponse]
+ deleteWebhook *connect_go.Client[v1alpha1.DeleteWebhookRequest, v1alpha1.DeleteWebhookResponse]
+ listWebhooks *connect_go.Client[v1alpha1.ListWebhooksRequest, v1alpha1.ListWebhooksResponse]
+}
+
+// CreateWebhook calls buf.alpha.registry.v1alpha1.WebhookService.CreateWebhook.
+func (c *webhookServiceClient) CreateWebhook(ctx context.Context, req *connect_go.Request[v1alpha1.CreateWebhookRequest]) (*connect_go.Response[v1alpha1.CreateWebhookResponse], error) {
+ return c.createWebhook.CallUnary(ctx, req)
+}
+
+// DeleteWebhook calls buf.alpha.registry.v1alpha1.WebhookService.DeleteWebhook.
+func (c *webhookServiceClient) DeleteWebhook(ctx context.Context, req *connect_go.Request[v1alpha1.DeleteWebhookRequest]) (*connect_go.Response[v1alpha1.DeleteWebhookResponse], error) {
+ return c.deleteWebhook.CallUnary(ctx, req)
+}
+
+// ListWebhooks calls buf.alpha.registry.v1alpha1.WebhookService.ListWebhooks.
+func (c *webhookServiceClient) ListWebhooks(ctx context.Context, req *connect_go.Request[v1alpha1.ListWebhooksRequest]) (*connect_go.Response[v1alpha1.ListWebhooksResponse], error) {
+ return c.listWebhooks.CallUnary(ctx, req)
+}
+
+// WebhookServiceHandler is an implementation of the buf.alpha.registry.v1alpha1.WebhookService
+// service.
+type WebhookServiceHandler interface {
+ // Create a webhook, subscribes to a given repository event for a callback URL
+ // invocation.
+ CreateWebhook(context.Context, *connect_go.Request[v1alpha1.CreateWebhookRequest]) (*connect_go.Response[v1alpha1.CreateWebhookResponse], error)
+ // Delete a webhook removes the event subscription.
+ DeleteWebhook(context.Context, *connect_go.Request[v1alpha1.DeleteWebhookRequest]) (*connect_go.Response[v1alpha1.DeleteWebhookResponse], error)
+ // Lists the webhooks subscriptions for a given repository.
+ ListWebhooks(context.Context, *connect_go.Request[v1alpha1.ListWebhooksRequest]) (*connect_go.Response[v1alpha1.ListWebhooksResponse], error)
+}
+
+// NewWebhookServiceHandler builds an HTTP handler from the service implementation. It returns the
+// path on which to mount the handler and the handler itself.
+//
+// By default, handlers support the Connect, gRPC, and gRPC-Web protocols with the binary Protobuf
+// and JSON codecs. They also support gzip compression.
+func NewWebhookServiceHandler(svc WebhookServiceHandler, opts ...connect_go.HandlerOption) (string, http.Handler) {
+ mux := http.NewServeMux()
+ mux.Handle("/buf.alpha.registry.v1alpha1.WebhookService/CreateWebhook", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.WebhookService/CreateWebhook",
+ svc.CreateWebhook,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.WebhookService/DeleteWebhook", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.WebhookService/DeleteWebhook",
+ svc.DeleteWebhook,
+ opts...,
+ ))
+ mux.Handle("/buf.alpha.registry.v1alpha1.WebhookService/ListWebhooks", connect_go.NewUnaryHandler(
+ "/buf.alpha.registry.v1alpha1.WebhookService/ListWebhooks",
+ svc.ListWebhooks,
+ opts...,
+ ))
+ return "/buf.alpha.registry.v1alpha1.WebhookService/", mux
+}
+
+// UnimplementedWebhookServiceHandler returns CodeUnimplemented from all methods.
+type UnimplementedWebhookServiceHandler struct{}
+
+func (UnimplementedWebhookServiceHandler) CreateWebhook(context.Context, *connect_go.Request[v1alpha1.CreateWebhookRequest]) (*connect_go.Response[v1alpha1.CreateWebhookResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.WebhookService.CreateWebhook is not implemented"))
+}
+
+func (UnimplementedWebhookServiceHandler) DeleteWebhook(context.Context, *connect_go.Request[v1alpha1.DeleteWebhookRequest]) (*connect_go.Response[v1alpha1.DeleteWebhookResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.WebhookService.DeleteWebhook is not implemented"))
+}
+
+func (UnimplementedWebhookServiceHandler) ListWebhooks(context.Context, *connect_go.Request[v1alpha1.ListWebhooksRequest]) (*connect_go.Response[v1alpha1.ListWebhooksResponse], error) {
+ return nil, connect_go.NewError(connect_go.CodeUnimplemented, errors.New("buf.alpha.registry.v1alpha1.WebhookService.ListWebhooks is not implemented"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/breaking/v1/config.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/breaking/v1/config.pb.go
new file mode 100644
index 000000000..a906c7a0c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/breaking/v1/config.pb.go
@@ -0,0 +1,319 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/breaking/v1/config.proto
+
+package breakingv1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Config represents the breaking change configuration for a module. The rule and category IDs are defined
+// by the version and apply across the config. The version is independent of the version of
+// the package. The package version refers to the config shape, the version encoded in the Config message
+// indicates which rule and category IDs should be used.
+//
+// The rule and category IDs are not encoded as enums in this package because we may want to support custom rule
+// and category IDs in the future. Callers will need to resolve the rule and category ID strings.
+type Config struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // version represents the version of the breaking change rule and category IDs that should be used with this config.
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
+ // use_ids lists the rule and/or category IDs that are included in the breaking change check.
+ UseIds []string `protobuf:"bytes,2,rep,name=use_ids,json=useIds,proto3" json:"use_ids,omitempty"`
+ // except_ids lists the rule and/or category IDs that are excluded from the breaking change check.
+ ExceptIds []string `protobuf:"bytes,3,rep,name=except_ids,json=exceptIds,proto3" json:"except_ids,omitempty"`
+ // ignore_paths lists the paths of directories and/or files that should be ignored by the breaking change check.
+ // All paths are relative to the root of the module.
+ IgnorePaths []string `protobuf:"bytes,4,rep,name=ignore_paths,json=ignorePaths,proto3" json:"ignore_paths,omitempty"`
+ // ignore_id_paths is a map of rule and/or category IDs to directory and/or file paths to exclude from the
+ // breaking change check. This corresponds with the ignore_only configuration key.
+ IgnoreIdPaths []*IDPaths `protobuf:"bytes,5,rep,name=ignore_id_paths,json=ignoreIdPaths,proto3" json:"ignore_id_paths,omitempty"`
+ // ignore_unstable_packages ignores packages with a last component that is one of the unstable forms recognised
+ // by the PACKAGE_VERSION_SUFFIX:
+ //
+ // v\d+test.*
+ // v\d+(alpha|beta)\d+
+ // v\d+p\d+(alpha|beta)\d+
+ IgnoreUnstablePackages bool `protobuf:"varint,6,opt,name=ignore_unstable_packages,json=ignoreUnstablePackages,proto3" json:"ignore_unstable_packages,omitempty"`
+}
+
+func (x *Config) Reset() {
+ *x = Config{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_breaking_v1_config_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Config) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Config) ProtoMessage() {}
+
+func (x *Config) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_breaking_v1_config_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 Config.ProtoReflect.Descriptor instead.
+func (*Config) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_breaking_v1_config_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Config) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *Config) GetUseIds() []string {
+ if x != nil {
+ return x.UseIds
+ }
+ return nil
+}
+
+func (x *Config) GetExceptIds() []string {
+ if x != nil {
+ return x.ExceptIds
+ }
+ return nil
+}
+
+func (x *Config) GetIgnorePaths() []string {
+ if x != nil {
+ return x.IgnorePaths
+ }
+ return nil
+}
+
+func (x *Config) GetIgnoreIdPaths() []*IDPaths {
+ if x != nil {
+ return x.IgnoreIdPaths
+ }
+ return nil
+}
+
+func (x *Config) GetIgnoreUnstablePackages() bool {
+ if x != nil {
+ return x.IgnoreUnstablePackages
+ }
+ return false
+}
+
+// IDPaths represents a rule or category ID and the file and/or directory paths that are ignored for the rule.
+type IDPaths struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"`
+}
+
+func (x *IDPaths) Reset() {
+ *x = IDPaths{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_breaking_v1_config_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IDPaths) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IDPaths) ProtoMessage() {}
+
+func (x *IDPaths) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_breaking_v1_config_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 IDPaths.ProtoReflect.Descriptor instead.
+func (*IDPaths) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_breaking_v1_config_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *IDPaths) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *IDPaths) GetPaths() []string {
+ if x != nil {
+ return x.Paths
+ }
+ return nil
+}
+
+var File_buf_alpha_breaking_v1_config_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_breaking_v1_config_proto_rawDesc = []byte{
+ 0x0a, 0x22, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62, 0x72, 0x65, 0x61,
+ 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x15, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x22, 0xff, 0x01, 0x0a, 0x06,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
+ 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x49, 0x64, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x63,
+ 0x65, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65,
+ 0x78, 0x63, 0x65, 0x70, 0x74, 0x49, 0x64, 0x73, 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f,
+ 0x72, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b,
+ 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, 0x46, 0x0a, 0x0f, 0x69,
+ 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x64, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x05,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x44, 0x50,
+ 0x61, 0x74, 0x68, 0x73, 0x52, 0x0d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x49, 0x64, 0x50, 0x61,
+ 0x74, 0x68, 0x73, 0x12, 0x38, 0x0a, 0x18, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x75, 0x6e,
+ 0x73, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x16, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x55, 0x6e, 0x73,
+ 0x74, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x22, 0x2f, 0x0a,
+ 0x07, 0x49, 0x44, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68,
+ 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x42, 0xee,
+ 0x01, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x4d, 0x67, 0x69, 0x74,
+ 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64,
+ 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x3b,
+ 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x76, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x42,
+ 0xaa, 0x02, 0x15, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x42, 0x72, 0x65,
+ 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x15, 0x42, 0x75, 0x66, 0x5c, 0x41,
+ 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31,
+ 0xe2, 0x02, 0x21, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x42, 0x72, 0x65,
+ 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x18, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x3a, 0x3a, 0x42, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x3a, 0x3a, 0x56, 0x31, 0x62,
+ 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_breaking_v1_config_proto_rawDescOnce sync.Once
+ file_buf_alpha_breaking_v1_config_proto_rawDescData = file_buf_alpha_breaking_v1_config_proto_rawDesc
+)
+
+func file_buf_alpha_breaking_v1_config_proto_rawDescGZIP() []byte {
+ file_buf_alpha_breaking_v1_config_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_breaking_v1_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_breaking_v1_config_proto_rawDescData)
+ })
+ return file_buf_alpha_breaking_v1_config_proto_rawDescData
+}
+
+var file_buf_alpha_breaking_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_buf_alpha_breaking_v1_config_proto_goTypes = []interface{}{
+ (*Config)(nil), // 0: buf.alpha.breaking.v1.Config
+ (*IDPaths)(nil), // 1: buf.alpha.breaking.v1.IDPaths
+}
+var file_buf_alpha_breaking_v1_config_proto_depIdxs = []int32{
+ 1, // 0: buf.alpha.breaking.v1.Config.ignore_id_paths:type_name -> buf.alpha.breaking.v1.IDPaths
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_breaking_v1_config_proto_init() }
+func file_buf_alpha_breaking_v1_config_proto_init() {
+ if File_buf_alpha_breaking_v1_config_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_breaking_v1_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Config); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_breaking_v1_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IDPaths); 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_buf_alpha_breaking_v1_config_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_buf_alpha_breaking_v1_config_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_breaking_v1_config_proto_depIdxs,
+ MessageInfos: file_buf_alpha_breaking_v1_config_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_breaking_v1_config_proto = out.File
+ file_buf_alpha_breaking_v1_config_proto_rawDesc = nil
+ file_buf_alpha_breaking_v1_config_proto_goTypes = nil
+ file_buf_alpha_breaking_v1_config_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/breaking/v1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/breaking/v1/usage.gen.go
new file mode 100644
index 000000000..068f9ea83
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/breaking/v1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package breakingv1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1/image.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1/image.pb.go
new file mode 100644
index 000000000..692a43747
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1/image.pb.go
@@ -0,0 +1,707 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/image/v1/image.proto
+
+package imagev1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Image is an extended FileDescriptorSet.
+//
+// See https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto
+type Image struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ File []*ImageFile `protobuf:"bytes,1,rep,name=file" json:"file,omitempty"`
+}
+
+func (x *Image) Reset() {
+ *x = Image{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_image_v1_image_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Image) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Image) ProtoMessage() {}
+
+func (x *Image) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_image_v1_image_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 Image.ProtoReflect.Descriptor instead.
+func (*Image) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_image_v1_image_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Image) GetFile() []*ImageFile {
+ if x != nil {
+ return x.File
+ }
+ return nil
+}
+
+// ImageFile is an extended FileDescriptorProto.
+//
+// Since FileDescriptorProto does not have extensions, we copy the fields from
+// FileDescriptorProto, and then add our own extensions via the buf_extension
+// field. This is compatible with a FileDescriptorProto.
+//
+// See https://github.com/protocolbuffers/protobuf/blob/master/src/google/protobuf/descriptor.proto
+type ImageFile struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name *string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ Package *string `protobuf:"bytes,2,opt,name=package" json:"package,omitempty"`
+ Dependency []string `protobuf:"bytes,3,rep,name=dependency" json:"dependency,omitempty"`
+ PublicDependency []int32 `protobuf:"varint,10,rep,name=public_dependency,json=publicDependency" json:"public_dependency,omitempty"`
+ WeakDependency []int32 `protobuf:"varint,11,rep,name=weak_dependency,json=weakDependency" json:"weak_dependency,omitempty"`
+ MessageType []*descriptorpb.DescriptorProto `protobuf:"bytes,4,rep,name=message_type,json=messageType" json:"message_type,omitempty"`
+ EnumType []*descriptorpb.EnumDescriptorProto `protobuf:"bytes,5,rep,name=enum_type,json=enumType" json:"enum_type,omitempty"`
+ Service []*descriptorpb.ServiceDescriptorProto `protobuf:"bytes,6,rep,name=service" json:"service,omitempty"`
+ Extension []*descriptorpb.FieldDescriptorProto `protobuf:"bytes,7,rep,name=extension" json:"extension,omitempty"`
+ Options *descriptorpb.FileOptions `protobuf:"bytes,8,opt,name=options" json:"options,omitempty"`
+ SourceCodeInfo *descriptorpb.SourceCodeInfo `protobuf:"bytes,9,opt,name=source_code_info,json=sourceCodeInfo" json:"source_code_info,omitempty"`
+ Syntax *string `protobuf:"bytes,12,opt,name=syntax" json:"syntax,omitempty"`
+ // buf_extension contains buf-specific extensions to FileDescriptorProtos.
+ //
+ // The prefixed name and high tag value is used to all but guarantee there
+ // will never be any conflict with Google's FileDescriptorProto definition.
+ // The definition of a FileDescriptorProto has not changed in years, so
+ // we're not too worried about a conflict here.
+ BufExtension *ImageFileExtension `protobuf:"bytes,8042,opt,name=buf_extension,json=bufExtension" json:"buf_extension,omitempty"`
+}
+
+func (x *ImageFile) Reset() {
+ *x = ImageFile{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_image_v1_image_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ImageFile) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ImageFile) ProtoMessage() {}
+
+func (x *ImageFile) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_image_v1_image_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 ImageFile.ProtoReflect.Descriptor instead.
+func (*ImageFile) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_image_v1_image_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ImageFile) GetName() string {
+ if x != nil && x.Name != nil {
+ return *x.Name
+ }
+ return ""
+}
+
+func (x *ImageFile) GetPackage() string {
+ if x != nil && x.Package != nil {
+ return *x.Package
+ }
+ return ""
+}
+
+func (x *ImageFile) GetDependency() []string {
+ if x != nil {
+ return x.Dependency
+ }
+ return nil
+}
+
+func (x *ImageFile) GetPublicDependency() []int32 {
+ if x != nil {
+ return x.PublicDependency
+ }
+ return nil
+}
+
+func (x *ImageFile) GetWeakDependency() []int32 {
+ if x != nil {
+ return x.WeakDependency
+ }
+ return nil
+}
+
+func (x *ImageFile) GetMessageType() []*descriptorpb.DescriptorProto {
+ if x != nil {
+ return x.MessageType
+ }
+ return nil
+}
+
+func (x *ImageFile) GetEnumType() []*descriptorpb.EnumDescriptorProto {
+ if x != nil {
+ return x.EnumType
+ }
+ return nil
+}
+
+func (x *ImageFile) GetService() []*descriptorpb.ServiceDescriptorProto {
+ if x != nil {
+ return x.Service
+ }
+ return nil
+}
+
+func (x *ImageFile) GetExtension() []*descriptorpb.FieldDescriptorProto {
+ if x != nil {
+ return x.Extension
+ }
+ return nil
+}
+
+func (x *ImageFile) GetOptions() *descriptorpb.FileOptions {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+func (x *ImageFile) GetSourceCodeInfo() *descriptorpb.SourceCodeInfo {
+ if x != nil {
+ return x.SourceCodeInfo
+ }
+ return nil
+}
+
+func (x *ImageFile) GetSyntax() string {
+ if x != nil && x.Syntax != nil {
+ return *x.Syntax
+ }
+ return ""
+}
+
+func (x *ImageFile) GetBufExtension() *ImageFileExtension {
+ if x != nil {
+ return x.BufExtension
+ }
+ return nil
+}
+
+// ImageFileExtension contains extensions to ImageFiles.
+//
+// The fields are not included directly on the ImageFile so that we can both
+// detect if extensions exist, which signifies this was created by buf and not
+// by protoc, and so that we can add fields in a freeform manner without
+// worrying about conflicts with FileDescriptorProto.
+type ImageFileExtension struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // is_import denotes whether this file is considered an "import".
+ //
+ // An import is a file which was not derived from the local source files.
+ // There are two cases where this could be true:
+ //
+ // 1. A Well-Known Type included from the compiler.
+ // 2. A file that was included from a Buf module dependency.
+ //
+ // We use "import" as this matches with the protoc concept of
+ // --include_imports, however import is a bit of an overloaded term.
+ //
+ // This will always be set.
+ IsImport *bool `protobuf:"varint,1,opt,name=is_import,json=isImport" json:"is_import,omitempty"`
+ // ModuleInfo contains information about the Buf module this file belongs to.
+ //
+ // This field is optional and will not be set if the module is not known.
+ ModuleInfo *ModuleInfo `protobuf:"bytes,2,opt,name=module_info,json=moduleInfo" json:"module_info,omitempty"`
+ // is_syntax_unspecified denotes whether the file did not have a syntax
+ // explicitly specified.
+ //
+ // Per the FileDescriptorProto spec, it would be fine in this case to just
+ // leave the syntax field unset to denote this and to set the syntax field
+ // to "proto2" if it is specified. However, protoc does not set the syntax
+ // field if it was "proto2", and plugins may (incorrectly) depend on this.
+ // We also want to maintain consistency with protoc as much as possible.
+ // So instead, we have this field which will denote whether syntax was not
+ // specified.
+ //
+ // This will always be set.
+ IsSyntaxUnspecified *bool `protobuf:"varint,3,opt,name=is_syntax_unspecified,json=isSyntaxUnspecified" json:"is_syntax_unspecified,omitempty"`
+ // unused_dependency are the indexes within the dependency field on
+ // FileDescriptorProto for those dependencies that are not used.
+ //
+ // This matches the shape of the public_dependency and weak_dependency
+ // fields.
+ UnusedDependency []int32 `protobuf:"varint,4,rep,name=unused_dependency,json=unusedDependency" json:"unused_dependency,omitempty"`
+}
+
+func (x *ImageFileExtension) Reset() {
+ *x = ImageFileExtension{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_image_v1_image_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ImageFileExtension) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ImageFileExtension) ProtoMessage() {}
+
+func (x *ImageFileExtension) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_image_v1_image_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 ImageFileExtension.ProtoReflect.Descriptor instead.
+func (*ImageFileExtension) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_image_v1_image_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ImageFileExtension) GetIsImport() bool {
+ if x != nil && x.IsImport != nil {
+ return *x.IsImport
+ }
+ return false
+}
+
+func (x *ImageFileExtension) GetModuleInfo() *ModuleInfo {
+ if x != nil {
+ return x.ModuleInfo
+ }
+ return nil
+}
+
+func (x *ImageFileExtension) GetIsSyntaxUnspecified() bool {
+ if x != nil && x.IsSyntaxUnspecified != nil {
+ return *x.IsSyntaxUnspecified
+ }
+ return false
+}
+
+func (x *ImageFileExtension) GetUnusedDependency() []int32 {
+ if x != nil {
+ return x.UnusedDependency
+ }
+ return nil
+}
+
+// ModuleInfo contains information about a Buf module that an ImageFile
+// belongs to.
+type ModuleInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // name is the name of the Buf module.
+ //
+ // This will always be set.
+ Name *ModuleName `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
+ // commit is the repository commit.
+ //
+ // This field is optional and will not be set if the commit is not known.
+ Commit *string `protobuf:"bytes,2,opt,name=commit" json:"commit,omitempty"`
+}
+
+func (x *ModuleInfo) Reset() {
+ *x = ModuleInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_image_v1_image_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ModuleInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModuleInfo) ProtoMessage() {}
+
+func (x *ModuleInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_image_v1_image_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 ModuleInfo.ProtoReflect.Descriptor instead.
+func (*ModuleInfo) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_image_v1_image_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ModuleInfo) GetName() *ModuleName {
+ if x != nil {
+ return x.Name
+ }
+ return nil
+}
+
+func (x *ModuleInfo) GetCommit() string {
+ if x != nil && x.Commit != nil {
+ return *x.Commit
+ }
+ return ""
+}
+
+// ModuleName is a module name.
+//
+// All fields will always be set.
+type ModuleName struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Remote *string `protobuf:"bytes,1,opt,name=remote" json:"remote,omitempty"`
+ Owner *string `protobuf:"bytes,2,opt,name=owner" json:"owner,omitempty"`
+ Repository *string `protobuf:"bytes,3,opt,name=repository" json:"repository,omitempty"`
+}
+
+func (x *ModuleName) Reset() {
+ *x = ModuleName{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_image_v1_image_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ModuleName) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModuleName) ProtoMessage() {}
+
+func (x *ModuleName) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_image_v1_image_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 ModuleName.ProtoReflect.Descriptor instead.
+func (*ModuleName) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_image_v1_image_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ModuleName) GetRemote() string {
+ if x != nil && x.Remote != nil {
+ return *x.Remote
+ }
+ return ""
+}
+
+func (x *ModuleName) GetOwner() string {
+ if x != nil && x.Owner != nil {
+ return *x.Owner
+ }
+ return ""
+}
+
+func (x *ModuleName) GetRepository() string {
+ if x != nil && x.Repository != nil {
+ return *x.Repository
+ }
+ return ""
+}
+
+var File_buf_alpha_image_v1_image_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_image_v1_image_proto_rawDesc = []byte{
+ 0x0a, 0x1e, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x69, 0x6d, 0x61, 0x67,
+ 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x12, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x69, 0x6d, 0x61, 0x67,
+ 0x65, 0x2e, 0x76, 0x31, 0x1a, 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, 0x22, 0x3a, 0x0a, 0x05, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12,
+ 0x31, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e,
+ 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x04, 0x66, 0x69,
+ 0x6c, 0x65, 0x22, 0xa8, 0x05, 0x0a, 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x69, 0x6c, 0x65,
+ 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,
+ 0x4c, 0x0a, 0x0d, 0x62, 0x75, 0x66, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x18, 0xea, 0x3e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61,
+ 0x67, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x52,
+ 0x0c, 0x62, 0x75, 0x66, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd3, 0x01,
+ 0x0a, 0x12, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e,
+ 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x69, 0x73, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x69, 0x73, 0x49, 0x6d, 0x70, 0x6f, 0x72,
+ 0x74, 0x12, 0x3f, 0x0a, 0x0b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75,
+ 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x6e,
+ 0x66, 0x6f, 0x12, 0x32, 0x0a, 0x15, 0x69, 0x73, 0x5f, 0x73, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x5f,
+ 0x75, 0x6e, 0x73, 0x70, 0x65, 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x13, 0x69, 0x73, 0x53, 0x79, 0x6e, 0x74, 0x61, 0x78, 0x55, 0x6e, 0x73, 0x70, 0x65,
+ 0x63, 0x69, 0x66, 0x69, 0x65, 0x64, 0x12, 0x2b, 0x0a, 0x11, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64,
+ 0x5f, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x03, 0x28,
+ 0x05, 0x52, 0x10, 0x75, 0x6e, 0x75, 0x73, 0x65, 0x64, 0x44, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65,
+ 0x6e, 0x63, 0x79, 0x22, 0x58, 0x0a, 0x0a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x49, 0x6e, 0x66,
+ 0x6f, 0x12, 0x32, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x69, 0x6d, 0x61, 0x67,
+ 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x5a, 0x0a,
+ 0x0a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72,
+ 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d,
+ 0x6f, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0xdd, 0x01, 0x0a, 0x16, 0x63, 0x6f,
+ 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x69, 0x6d, 0x61, 0x67,
+ 0x65, 0x2e, 0x76, 0x31, 0x42, 0x0a, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x48, 0x01, 0x50, 0x01, 0x5a, 0x47, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72,
+ 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
+ 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x69, 0x6d, 0x61,
+ 0x67, 0x65, 0x2f, 0x76, 0x31, 0x3b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x76, 0x31, 0xf8, 0x01, 0x01,
+ 0xa2, 0x02, 0x03, 0x42, 0x41, 0x49, 0xaa, 0x02, 0x12, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x12, 0x42, 0x75,
+ 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x5c, 0x56, 0x31,
+ 0xe2, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x49, 0x6d, 0x61,
+ 0x67, 0x65, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0xea, 0x02, 0x15, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a,
+ 0x49, 0x6d, 0x61, 0x67, 0x65, 0x3a, 0x3a, 0x56, 0x31,
+}
+
+var (
+ file_buf_alpha_image_v1_image_proto_rawDescOnce sync.Once
+ file_buf_alpha_image_v1_image_proto_rawDescData = file_buf_alpha_image_v1_image_proto_rawDesc
+)
+
+func file_buf_alpha_image_v1_image_proto_rawDescGZIP() []byte {
+ file_buf_alpha_image_v1_image_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_image_v1_image_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_image_v1_image_proto_rawDescData)
+ })
+ return file_buf_alpha_image_v1_image_proto_rawDescData
+}
+
+var file_buf_alpha_image_v1_image_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_buf_alpha_image_v1_image_proto_goTypes = []interface{}{
+ (*Image)(nil), // 0: buf.alpha.image.v1.Image
+ (*ImageFile)(nil), // 1: buf.alpha.image.v1.ImageFile
+ (*ImageFileExtension)(nil), // 2: buf.alpha.image.v1.ImageFileExtension
+ (*ModuleInfo)(nil), // 3: buf.alpha.image.v1.ModuleInfo
+ (*ModuleName)(nil), // 4: buf.alpha.image.v1.ModuleName
+ (*descriptorpb.DescriptorProto)(nil), // 5: google.protobuf.DescriptorProto
+ (*descriptorpb.EnumDescriptorProto)(nil), // 6: google.protobuf.EnumDescriptorProto
+ (*descriptorpb.ServiceDescriptorProto)(nil), // 7: google.protobuf.ServiceDescriptorProto
+ (*descriptorpb.FieldDescriptorProto)(nil), // 8: google.protobuf.FieldDescriptorProto
+ (*descriptorpb.FileOptions)(nil), // 9: google.protobuf.FileOptions
+ (*descriptorpb.SourceCodeInfo)(nil), // 10: google.protobuf.SourceCodeInfo
+}
+var file_buf_alpha_image_v1_image_proto_depIdxs = []int32{
+ 1, // 0: buf.alpha.image.v1.Image.file:type_name -> buf.alpha.image.v1.ImageFile
+ 5, // 1: buf.alpha.image.v1.ImageFile.message_type:type_name -> google.protobuf.DescriptorProto
+ 6, // 2: buf.alpha.image.v1.ImageFile.enum_type:type_name -> google.protobuf.EnumDescriptorProto
+ 7, // 3: buf.alpha.image.v1.ImageFile.service:type_name -> google.protobuf.ServiceDescriptorProto
+ 8, // 4: buf.alpha.image.v1.ImageFile.extension:type_name -> google.protobuf.FieldDescriptorProto
+ 9, // 5: buf.alpha.image.v1.ImageFile.options:type_name -> google.protobuf.FileOptions
+ 10, // 6: buf.alpha.image.v1.ImageFile.source_code_info:type_name -> google.protobuf.SourceCodeInfo
+ 2, // 7: buf.alpha.image.v1.ImageFile.buf_extension:type_name -> buf.alpha.image.v1.ImageFileExtension
+ 3, // 8: buf.alpha.image.v1.ImageFileExtension.module_info:type_name -> buf.alpha.image.v1.ModuleInfo
+ 4, // 9: buf.alpha.image.v1.ModuleInfo.name:type_name -> buf.alpha.image.v1.ModuleName
+ 10, // [10:10] is the sub-list for method output_type
+ 10, // [10:10] is the sub-list for method input_type
+ 10, // [10:10] is the sub-list for extension type_name
+ 10, // [10:10] is the sub-list for extension extendee
+ 0, // [0:10] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_image_v1_image_proto_init() }
+func file_buf_alpha_image_v1_image_proto_init() {
+ if File_buf_alpha_image_v1_image_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_image_v1_image_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Image); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_image_v1_image_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ImageFile); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_image_v1_image_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ImageFileExtension); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_image_v1_image_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ModuleInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_image_v1_image_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ModuleName); 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_buf_alpha_image_v1_image_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_buf_alpha_image_v1_image_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_image_v1_image_proto_depIdxs,
+ MessageInfos: file_buf_alpha_image_v1_image_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_image_v1_image_proto = out.File
+ file_buf_alpha_image_v1_image_proto_rawDesc = nil
+ file_buf_alpha_image_v1_image_proto_goTypes = nil
+ file_buf_alpha_image_v1_image_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1/usage.gen.go
new file mode 100644
index 000000000..f5459a628
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package imagev1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/lint/v1/config.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/lint/v1/config.pb.go
new file mode 100644
index 000000000..7600d617a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/lint/v1/config.pb.go
@@ -0,0 +1,380 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/lint/v1/config.proto
+
+package lintv1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Config represents the lint configuration for a module. The rule and category IDs are defined
+// by the version and apply across the config. The version is independent of the version of
+// the package. The package version refers to the config shape, the version encoded in the Config message
+// indicates which rule and category IDs should be used.
+//
+// The rule and category IDs are not encoded as enums in this package because we may want to support custom rule
+// and category IDs in the future. Callers will need to resolve the rule and category ID strings.
+type Config struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // version represents the version of the lint rule and category IDs that should be used with this config.
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
+ // use_ids lists the rule and/or category IDs that are included in the lint check.
+ UseIds []string `protobuf:"bytes,2,rep,name=use_ids,json=useIds,proto3" json:"use_ids,omitempty"`
+ // except_ids lists the rule and/or category IDs that are excluded from the lint check.
+ ExceptIds []string `protobuf:"bytes,3,rep,name=except_ids,json=exceptIds,proto3" json:"except_ids,omitempty"`
+ // ignore_paths lists the paths of directories and/or files that should be ignored by the lint check.
+ // All paths are relative to the root of the module.
+ IgnorePaths []string `protobuf:"bytes,4,rep,name=ignore_paths,json=ignorePaths,proto3" json:"ignore_paths,omitempty"`
+ // ignore_id_paths is a map of rule and/or category IDs to directory and/or file paths to exclude from the
+ // lint check. This corresponds with the ignore_only configuration key.
+ IgnoreIdPaths []*IDPaths `protobuf:"bytes,5,rep,name=ignore_id_paths,json=ignoreIdPaths,proto3" json:"ignore_id_paths,omitempty"`
+ // enum_zero_value_suffix controls the behavior of the ENUM_ZERO_VALUE lint rule ID. By default, this rule
+ // verifies that the zero value of all enums ends in _UNSPECIFIED. This config allows the user to override
+ // this value with the given string.
+ EnumZeroValueSuffix string `protobuf:"bytes,6,opt,name=enum_zero_value_suffix,json=enumZeroValueSuffix,proto3" json:"enum_zero_value_suffix,omitempty"`
+ // rpc_allow_same_request_response allows the same message type for both the request and response of an RPC.
+ RpcAllowSameRequestResponse bool `protobuf:"varint,7,opt,name=rpc_allow_same_request_response,json=rpcAllowSameRequestResponse,proto3" json:"rpc_allow_same_request_response,omitempty"`
+ // rpc_allow_google_protobuf_empty_requests allows the RPC requests to use the google.protobuf.Empty message.
+ RpcAllowGoogleProtobufEmptyRequests bool `protobuf:"varint,8,opt,name=rpc_allow_google_protobuf_empty_requests,json=rpcAllowGoogleProtobufEmptyRequests,proto3" json:"rpc_allow_google_protobuf_empty_requests,omitempty"`
+ // rpc_allow_google_protobuf_empty_responses allows the RPC responses to use the google.protobuf.Empty message.
+ RpcAllowGoogleProtobufEmptyResponses bool `protobuf:"varint,9,opt,name=rpc_allow_google_protobuf_empty_responses,json=rpcAllowGoogleProtobufEmptyResponses,proto3" json:"rpc_allow_google_protobuf_empty_responses,omitempty"`
+ // service_suffix applies to the SERVICE_SUFFIX rule ID. By default, the rule verifies that all service names
+ // end with the suffix Service. This allows users to override the value with the given string.
+ ServiceSuffix string `protobuf:"bytes,10,opt,name=service_suffix,json=serviceSuffix,proto3" json:"service_suffix,omitempty"`
+ // allow_comment_ignores turns on comment-driven ignores.
+ AllowCommentIgnores bool `protobuf:"varint,11,opt,name=allow_comment_ignores,json=allowCommentIgnores,proto3" json:"allow_comment_ignores,omitempty"`
+}
+
+func (x *Config) Reset() {
+ *x = Config{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_lint_v1_config_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Config) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Config) ProtoMessage() {}
+
+func (x *Config) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_lint_v1_config_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 Config.ProtoReflect.Descriptor instead.
+func (*Config) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_lint_v1_config_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Config) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *Config) GetUseIds() []string {
+ if x != nil {
+ return x.UseIds
+ }
+ return nil
+}
+
+func (x *Config) GetExceptIds() []string {
+ if x != nil {
+ return x.ExceptIds
+ }
+ return nil
+}
+
+func (x *Config) GetIgnorePaths() []string {
+ if x != nil {
+ return x.IgnorePaths
+ }
+ return nil
+}
+
+func (x *Config) GetIgnoreIdPaths() []*IDPaths {
+ if x != nil {
+ return x.IgnoreIdPaths
+ }
+ return nil
+}
+
+func (x *Config) GetEnumZeroValueSuffix() string {
+ if x != nil {
+ return x.EnumZeroValueSuffix
+ }
+ return ""
+}
+
+func (x *Config) GetRpcAllowSameRequestResponse() bool {
+ if x != nil {
+ return x.RpcAllowSameRequestResponse
+ }
+ return false
+}
+
+func (x *Config) GetRpcAllowGoogleProtobufEmptyRequests() bool {
+ if x != nil {
+ return x.RpcAllowGoogleProtobufEmptyRequests
+ }
+ return false
+}
+
+func (x *Config) GetRpcAllowGoogleProtobufEmptyResponses() bool {
+ if x != nil {
+ return x.RpcAllowGoogleProtobufEmptyResponses
+ }
+ return false
+}
+
+func (x *Config) GetServiceSuffix() string {
+ if x != nil {
+ return x.ServiceSuffix
+ }
+ return ""
+}
+
+func (x *Config) GetAllowCommentIgnores() bool {
+ if x != nil {
+ return x.AllowCommentIgnores
+ }
+ return false
+}
+
+// IDPaths represents a rule or category ID and the file and/or directory paths that are ignored for the rule.
+type IDPaths struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Paths []string `protobuf:"bytes,2,rep,name=paths,proto3" json:"paths,omitempty"`
+}
+
+func (x *IDPaths) Reset() {
+ *x = IDPaths{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_lint_v1_config_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *IDPaths) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*IDPaths) ProtoMessage() {}
+
+func (x *IDPaths) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_lint_v1_config_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 IDPaths.ProtoReflect.Descriptor instead.
+func (*IDPaths) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_lint_v1_config_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *IDPaths) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *IDPaths) GetPaths() []string {
+ if x != nil {
+ return x.Paths
+ }
+ return nil
+}
+
+var File_buf_alpha_lint_v1_config_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_lint_v1_config_proto_rawDesc = []byte{
+ 0x0a, 0x1e, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6c, 0x69, 0x6e, 0x74,
+ 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x11, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x6c, 0x69, 0x6e, 0x74,
+ 0x2e, 0x76, 0x31, 0x22, 0xc7, 0x04, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18,
+ 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x5f,
+ 0x69, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x49, 0x64,
+ 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x69, 0x64, 0x73, 0x18,
+ 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x65, 0x78, 0x63, 0x65, 0x70, 0x74, 0x49, 0x64, 0x73,
+ 0x12, 0x21, 0x0a, 0x0c, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73,
+ 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x50, 0x61,
+ 0x74, 0x68, 0x73, 0x12, 0x42, 0x0a, 0x0f, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x5f, 0x69, 0x64,
+ 0x5f, 0x70, 0x61, 0x74, 0x68, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x6c, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31,
+ 0x2e, 0x49, 0x44, 0x50, 0x61, 0x74, 0x68, 0x73, 0x52, 0x0d, 0x69, 0x67, 0x6e, 0x6f, 0x72, 0x65,
+ 0x49, 0x64, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, 0x33, 0x0a, 0x16, 0x65, 0x6e, 0x75, 0x6d, 0x5f,
+ 0x7a, 0x65, 0x72, 0x6f, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x73, 0x75, 0x66, 0x66, 0x69,
+ 0x78, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x65, 0x6e, 0x75, 0x6d, 0x5a, 0x65, 0x72,
+ 0x6f, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x44, 0x0a, 0x1f,
+ 0x72, 0x70, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x73, 0x61, 0x6d, 0x65, 0x5f, 0x72,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x1b, 0x72, 0x70, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x53,
+ 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x55, 0x0a, 0x28, 0x72, 0x70, 0x63, 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f,
+ 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f,
+ 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x08,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x23, 0x72, 0x70, 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x47, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x45, 0x6d, 0x70, 0x74,
+ 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x57, 0x0a, 0x29, 0x72, 0x70, 0x63,
+ 0x5f, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x5f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x5f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x5f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x5f, 0x72, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x24, 0x72, 0x70,
+ 0x63, 0x41, 0x6c, 0x6c, 0x6f, 0x77, 0x47, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x73, 0x12, 0x25, 0x0a, 0x0e, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x73, 0x75,
+ 0x66, 0x66, 0x69, 0x78, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x53, 0x75, 0x66, 0x66, 0x69, 0x78, 0x12, 0x32, 0x0a, 0x15, 0x61, 0x6c, 0x6c,
+ 0x6f, 0x77, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x5f, 0x69, 0x67, 0x6e, 0x6f, 0x72,
+ 0x65, 0x73, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x6c, 0x6c, 0x6f, 0x77, 0x43,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x49, 0x67, 0x6e, 0x6f, 0x72, 0x65, 0x73, 0x22, 0x2f, 0x0a,
+ 0x07, 0x49, 0x44, 0x50, 0x61, 0x74, 0x68, 0x73, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x61, 0x74, 0x68,
+ 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x70, 0x61, 0x74, 0x68, 0x73, 0x42, 0xd2,
+ 0x01, 0x0a, 0x15, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x6c, 0x69, 0x6e, 0x74, 0x2e, 0x76, 0x31, 0x42, 0x0b, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66,
+ 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f,
+ 0x6c, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x3b, 0x6c, 0x69, 0x6e, 0x74, 0x76, 0x31, 0xa2, 0x02,
+ 0x03, 0x42, 0x41, 0x4c, 0xaa, 0x02, 0x11, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x4c, 0x69, 0x6e, 0x74, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x11, 0x42, 0x75, 0x66, 0x5c, 0x41,
+ 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x4c, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1d, 0x42,
+ 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x4c, 0x69, 0x6e, 0x74, 0x5c, 0x56, 0x31,
+ 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x14, 0x42,
+ 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x4c, 0x69, 0x6e, 0x74, 0x3a,
+ 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_lint_v1_config_proto_rawDescOnce sync.Once
+ file_buf_alpha_lint_v1_config_proto_rawDescData = file_buf_alpha_lint_v1_config_proto_rawDesc
+)
+
+func file_buf_alpha_lint_v1_config_proto_rawDescGZIP() []byte {
+ file_buf_alpha_lint_v1_config_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_lint_v1_config_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_lint_v1_config_proto_rawDescData)
+ })
+ return file_buf_alpha_lint_v1_config_proto_rawDescData
+}
+
+var file_buf_alpha_lint_v1_config_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_buf_alpha_lint_v1_config_proto_goTypes = []interface{}{
+ (*Config)(nil), // 0: buf.alpha.lint.v1.Config
+ (*IDPaths)(nil), // 1: buf.alpha.lint.v1.IDPaths
+}
+var file_buf_alpha_lint_v1_config_proto_depIdxs = []int32{
+ 1, // 0: buf.alpha.lint.v1.Config.ignore_id_paths:type_name -> buf.alpha.lint.v1.IDPaths
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_lint_v1_config_proto_init() }
+func file_buf_alpha_lint_v1_config_proto_init() {
+ if File_buf_alpha_lint_v1_config_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_lint_v1_config_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Config); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_lint_v1_config_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*IDPaths); 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_buf_alpha_lint_v1_config_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_buf_alpha_lint_v1_config_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_lint_v1_config_proto_depIdxs,
+ MessageInfos: file_buf_alpha_lint_v1_config_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_lint_v1_config_proto = out.File
+ file_buf_alpha_lint_v1_config_proto_rawDesc = nil
+ file_buf_alpha_lint_v1_config_proto_goTypes = nil
+ file_buf_alpha_lint_v1_config_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/lint/v1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/lint/v1/usage.gen.go
new file mode 100644
index 000000000..4bc15da6a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/lint/v1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package lintv1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1/module.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1/module.pb.go
new file mode 100644
index 000000000..bb5fd8db8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1/module.pb.go
@@ -0,0 +1,552 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/module/v1alpha1/module.proto
+
+package modulev1alpha1
+
+import (
+ v1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/breaking/v1"
+ v11 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/lint/v1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Module is a module.
+type Module struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // files are the files that make up the set.
+ //
+ // Sorted by path.
+ // Path must be unique.
+ // Only the target files. No imports.
+ //
+ // Maximum total size of all content: 32MB.
+ Files []*ModuleFile `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
+ // dependencies are the dependencies.
+ Dependencies []*ModulePin `protobuf:"bytes,2,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
+ // documentation is the string representation of the contents of the `buf.md` file.
+ //
+ // string is used to enforce UTF-8 encoding or 7-bit ASCII text.
+ Documentation string `protobuf:"bytes,3,opt,name=documentation,proto3" json:"documentation,omitempty"`
+ // breaking_config is the breaking change detection configuration set for the module.
+ BreakingConfig *v1.Config `protobuf:"bytes,4,opt,name=breaking_config,json=breakingConfig,proto3" json:"breaking_config,omitempty"`
+ // lint_config is the lint configuration set for the module.
+ LintConfig *v11.Config `protobuf:"bytes,5,opt,name=lint_config,json=lintConfig,proto3" json:"lint_config,omitempty"`
+ // license is the string representation of the contents of the `LICENSE` file.
+ //
+ // string is used to enforce UTF-8 encoding or 7-bit ASCII text.
+ License string `protobuf:"bytes,6,opt,name=license,proto3" json:"license,omitempty"`
+}
+
+func (x *Module) Reset() {
+ *x = Module{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_module_v1alpha1_module_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Module) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Module) ProtoMessage() {}
+
+func (x *Module) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_module_v1alpha1_module_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 Module.ProtoReflect.Descriptor instead.
+func (*Module) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_module_v1alpha1_module_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Module) GetFiles() []*ModuleFile {
+ if x != nil {
+ return x.Files
+ }
+ return nil
+}
+
+func (x *Module) GetDependencies() []*ModulePin {
+ if x != nil {
+ return x.Dependencies
+ }
+ return nil
+}
+
+func (x *Module) GetDocumentation() string {
+ if x != nil {
+ return x.Documentation
+ }
+ return ""
+}
+
+func (x *Module) GetBreakingConfig() *v1.Config {
+ if x != nil {
+ return x.BreakingConfig
+ }
+ return nil
+}
+
+func (x *Module) GetLintConfig() *v11.Config {
+ if x != nil {
+ return x.LintConfig
+ }
+ return nil
+}
+
+func (x *Module) GetLicense() string {
+ if x != nil {
+ return x.License
+ }
+ return ""
+}
+
+// ModuleFile is a file within a FileSet.
+type ModuleFile struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // path is the relative path of the file.
+ // Path can only use '/' as the separator character, and includes no ".." components.
+ Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
+ // content is the content of the file.
+ Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
+}
+
+func (x *ModuleFile) Reset() {
+ *x = ModuleFile{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_module_v1alpha1_module_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ModuleFile) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModuleFile) ProtoMessage() {}
+
+func (x *ModuleFile) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_module_v1alpha1_module_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 ModuleFile.ProtoReflect.Descriptor instead.
+func (*ModuleFile) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_module_v1alpha1_module_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ModuleFile) GetPath() string {
+ if x != nil {
+ return x.Path
+ }
+ return ""
+}
+
+func (x *ModuleFile) GetContent() []byte {
+ if x != nil {
+ return x.Content
+ }
+ return nil
+}
+
+// ModuleReference is a module reference.
+type ModuleReference struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Remote string `protobuf:"bytes,1,opt,name=remote,proto3" json:"remote,omitempty"`
+ Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"`
+ // either tag, or commit
+ Reference string `protobuf:"bytes,4,opt,name=reference,proto3" json:"reference,omitempty"`
+}
+
+func (x *ModuleReference) Reset() {
+ *x = ModuleReference{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_module_v1alpha1_module_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ModuleReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModuleReference) ProtoMessage() {}
+
+func (x *ModuleReference) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_module_v1alpha1_module_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 ModuleReference.ProtoReflect.Descriptor instead.
+func (*ModuleReference) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_module_v1alpha1_module_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ModuleReference) GetRemote() string {
+ if x != nil {
+ return x.Remote
+ }
+ return ""
+}
+
+func (x *ModuleReference) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *ModuleReference) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *ModuleReference) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+// ModulePin is a module pin.
+type ModulePin struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Remote string `protobuf:"bytes,1,opt,name=remote,proto3" json:"remote,omitempty"`
+ Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"`
+ Branch string `protobuf:"bytes,4,opt,name=branch,proto3" json:"branch,omitempty"`
+ Commit string `protobuf:"bytes,5,opt,name=commit,proto3" json:"commit,omitempty"`
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+}
+
+func (x *ModulePin) Reset() {
+ *x = ModulePin{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_module_v1alpha1_module_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ModulePin) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModulePin) ProtoMessage() {}
+
+func (x *ModulePin) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_module_v1alpha1_module_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 ModulePin.ProtoReflect.Descriptor instead.
+func (*ModulePin) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_module_v1alpha1_module_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ModulePin) GetRemote() string {
+ if x != nil {
+ return x.Remote
+ }
+ return ""
+}
+
+func (x *ModulePin) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *ModulePin) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *ModulePin) GetBranch() string {
+ if x != nil {
+ return x.Branch
+ }
+ return ""
+}
+
+func (x *ModulePin) GetCommit() string {
+ if x != nil {
+ return x.Commit
+ }
+ return ""
+}
+
+func (x *ModulePin) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+var File_buf_alpha_module_v1alpha1_module_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_module_v1alpha1_module_proto_rawDesc = []byte{
+ 0x0a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x75,
+ 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x1a, 0x22, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x62,
+ 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2f, 0x6c, 0x69, 0x6e, 0x74, 0x2f, 0x76, 0x31, 0x2f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
+ 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd3, 0x02, 0x0a, 0x06, 0x4d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x12, 0x3b, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x6d,
+ 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d,
+ 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73,
+ 0x12, 0x48, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73,
+ 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x52, 0x0c, 0x64, 0x65,
+ 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6f,
+ 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x46, 0x0a, 0x0f, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x63, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69, 0x6e, 0x67, 0x2e, 0x76,
+ 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x62, 0x72, 0x65, 0x61, 0x6b, 0x69,
+ 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x3a, 0x0a, 0x0b, 0x6c, 0x69, 0x6e, 0x74,
+ 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x6c, 0x69, 0x6e, 0x74, 0x2e, 0x76,
+ 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0a, 0x6c, 0x69, 0x6e, 0x74, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x3a,
+ 0x0a, 0x0a, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04,
+ 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68,
+ 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x7d, 0x0a, 0x0f, 0x4d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x16, 0x0a,
+ 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72,
+ 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x72,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0xd4, 0x01, 0x0a, 0x09, 0x4d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x12,
+ 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+ 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x16, 0x0a,
+ 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f,
+ 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69,
+ 0x6d, 0x65, 0x4a, 0x04, 0x08, 0x06, 0x10, 0x07, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74,
+ 0x42, 0x8a, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
+ 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75,
+ 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61,
+ 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f,
+ 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
+ 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x4d, 0xaa, 0x02,
+ 0x19, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x19, 0x42, 0x75, 0x66,
+ 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x25, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70,
+ 0x68, 0x61, 0x5c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
+ 0x1c, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x4d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_module_v1alpha1_module_proto_rawDescOnce sync.Once
+ file_buf_alpha_module_v1alpha1_module_proto_rawDescData = file_buf_alpha_module_v1alpha1_module_proto_rawDesc
+)
+
+func file_buf_alpha_module_v1alpha1_module_proto_rawDescGZIP() []byte {
+ file_buf_alpha_module_v1alpha1_module_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_module_v1alpha1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_module_v1alpha1_module_proto_rawDescData)
+ })
+ return file_buf_alpha_module_v1alpha1_module_proto_rawDescData
+}
+
+var file_buf_alpha_module_v1alpha1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_buf_alpha_module_v1alpha1_module_proto_goTypes = []interface{}{
+ (*Module)(nil), // 0: buf.alpha.module.v1alpha1.Module
+ (*ModuleFile)(nil), // 1: buf.alpha.module.v1alpha1.ModuleFile
+ (*ModuleReference)(nil), // 2: buf.alpha.module.v1alpha1.ModuleReference
+ (*ModulePin)(nil), // 3: buf.alpha.module.v1alpha1.ModulePin
+ (*v1.Config)(nil), // 4: buf.alpha.breaking.v1.Config
+ (*v11.Config)(nil), // 5: buf.alpha.lint.v1.Config
+ (*timestamppb.Timestamp)(nil), // 6: google.protobuf.Timestamp
+}
+var file_buf_alpha_module_v1alpha1_module_proto_depIdxs = []int32{
+ 1, // 0: buf.alpha.module.v1alpha1.Module.files:type_name -> buf.alpha.module.v1alpha1.ModuleFile
+ 3, // 1: buf.alpha.module.v1alpha1.Module.dependencies:type_name -> buf.alpha.module.v1alpha1.ModulePin
+ 4, // 2: buf.alpha.module.v1alpha1.Module.breaking_config:type_name -> buf.alpha.breaking.v1.Config
+ 5, // 3: buf.alpha.module.v1alpha1.Module.lint_config:type_name -> buf.alpha.lint.v1.Config
+ 6, // 4: buf.alpha.module.v1alpha1.ModulePin.create_time:type_name -> google.protobuf.Timestamp
+ 5, // [5:5] is the sub-list for method output_type
+ 5, // [5:5] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_module_v1alpha1_module_proto_init() }
+func file_buf_alpha_module_v1alpha1_module_proto_init() {
+ if File_buf_alpha_module_v1alpha1_module_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_module_v1alpha1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Module); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_module_v1alpha1_module_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ModuleFile); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_module_v1alpha1_module_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ModuleReference); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_module_v1alpha1_module_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ModulePin); 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_buf_alpha_module_v1alpha1_module_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_buf_alpha_module_v1alpha1_module_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_module_v1alpha1_module_proto_depIdxs,
+ MessageInfos: file_buf_alpha_module_v1alpha1_module_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_module_v1alpha1_module_proto = out.File
+ file_buf_alpha_module_v1alpha1_module_proto_rawDesc = nil
+ file_buf_alpha_module_v1alpha1_module_proto_goTypes = nil
+ file_buf_alpha_module_v1alpha1_module_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1/usage.gen.go
new file mode 100644
index 000000000..ae00c47d9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package modulev1alpha1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/admin.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/admin.pb.go
new file mode 100644
index 000000000..98143f2f8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/admin.pb.go
@@ -0,0 +1,778 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/admin.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ForceDeleteUserRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+}
+
+func (x *ForceDeleteUserRequest) Reset() {
+ *x = ForceDeleteUserRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ForceDeleteUserRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ForceDeleteUserRequest) ProtoMessage() {}
+
+func (x *ForceDeleteUserRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_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 ForceDeleteUserRequest.ProtoReflect.Descriptor instead.
+func (*ForceDeleteUserRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_admin_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ForceDeleteUserRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+type ForceDeleteUserResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The deleted user.
+ User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+ // The deleted organizations.
+ Organizations []*Organization `protobuf:"bytes,2,rep,name=organizations,proto3" json:"organizations,omitempty"`
+ // The deleted repositories.
+ Repositories []*Repository `protobuf:"bytes,3,rep,name=repositories,proto3" json:"repositories,omitempty"`
+ // The deleted plugins.
+ //
+ // Deprecated: Do not use.
+ Plugins []*Plugin `protobuf:"bytes,4,rep,name=plugins,proto3" json:"plugins,omitempty"`
+ // The deleted templates.
+ //
+ // Deprecated: Do not use.
+ Templates []*Template `protobuf:"bytes,5,rep,name=templates,proto3" json:"templates,omitempty"`
+}
+
+func (x *ForceDeleteUserResponse) Reset() {
+ *x = ForceDeleteUserResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ForceDeleteUserResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ForceDeleteUserResponse) ProtoMessage() {}
+
+func (x *ForceDeleteUserResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_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 ForceDeleteUserResponse.ProtoReflect.Descriptor instead.
+func (*ForceDeleteUserResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_admin_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ForceDeleteUserResponse) GetUser() *User {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+func (x *ForceDeleteUserResponse) GetOrganizations() []*Organization {
+ if x != nil {
+ return x.Organizations
+ }
+ return nil
+}
+
+func (x *ForceDeleteUserResponse) GetRepositories() []*Repository {
+ if x != nil {
+ return x.Repositories
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+func (x *ForceDeleteUserResponse) GetPlugins() []*Plugin {
+ if x != nil {
+ return x.Plugins
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+func (x *ForceDeleteUserResponse) GetTemplates() []*Template {
+ if x != nil {
+ return x.Templates
+ }
+ return nil
+}
+
+type UpdateUserVerificationStatusRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ VerificationStatus VerificationStatus `protobuf:"varint,2,opt,name=verification_status,json=verificationStatus,proto3,enum=buf.alpha.registry.v1alpha1.VerificationStatus" json:"verification_status,omitempty"`
+}
+
+func (x *UpdateUserVerificationStatusRequest) Reset() {
+ *x = UpdateUserVerificationStatusRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateUserVerificationStatusRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateUserVerificationStatusRequest) ProtoMessage() {}
+
+func (x *UpdateUserVerificationStatusRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_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 UpdateUserVerificationStatusRequest.ProtoReflect.Descriptor instead.
+func (*UpdateUserVerificationStatusRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_admin_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *UpdateUserVerificationStatusRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *UpdateUserVerificationStatusRequest) GetVerificationStatus() VerificationStatus {
+ if x != nil {
+ return x.VerificationStatus
+ }
+ return VerificationStatus_VERIFICATION_STATUS_UNSPECIFIED
+}
+
+type UpdateUserVerificationStatusResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateUserVerificationStatusResponse) Reset() {
+ *x = UpdateUserVerificationStatusResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateUserVerificationStatusResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateUserVerificationStatusResponse) ProtoMessage() {}
+
+func (x *UpdateUserVerificationStatusResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_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 UpdateUserVerificationStatusResponse.ProtoReflect.Descriptor instead.
+func (*UpdateUserVerificationStatusResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_admin_proto_rawDescGZIP(), []int{3}
+}
+
+type UpdateOrganizationVerificationStatusRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+ VerificationStatus VerificationStatus `protobuf:"varint,2,opt,name=verification_status,json=verificationStatus,proto3,enum=buf.alpha.registry.v1alpha1.VerificationStatus" json:"verification_status,omitempty"`
+}
+
+func (x *UpdateOrganizationVerificationStatusRequest) Reset() {
+ *x = UpdateOrganizationVerificationStatusRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateOrganizationVerificationStatusRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateOrganizationVerificationStatusRequest) ProtoMessage() {}
+
+func (x *UpdateOrganizationVerificationStatusRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_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 UpdateOrganizationVerificationStatusRequest.ProtoReflect.Descriptor instead.
+func (*UpdateOrganizationVerificationStatusRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_admin_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *UpdateOrganizationVerificationStatusRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+func (x *UpdateOrganizationVerificationStatusRequest) GetVerificationStatus() VerificationStatus {
+ if x != nil {
+ return x.VerificationStatus
+ }
+ return VerificationStatus_VERIFICATION_STATUS_UNSPECIFIED
+}
+
+type UpdateOrganizationVerificationStatusResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateOrganizationVerificationStatusResponse) Reset() {
+ *x = UpdateOrganizationVerificationStatusResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateOrganizationVerificationStatusResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateOrganizationVerificationStatusResponse) ProtoMessage() {}
+
+func (x *UpdateOrganizationVerificationStatusResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_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 UpdateOrganizationVerificationStatusResponse.ProtoReflect.Descriptor instead.
+func (*UpdateOrganizationVerificationStatusResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_admin_proto_rawDescGZIP(), []int{5}
+}
+
+type CreateMachineUserRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
+}
+
+func (x *CreateMachineUserRequest) Reset() {
+ *x = CreateMachineUserRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateMachineUserRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateMachineUserRequest) ProtoMessage() {}
+
+func (x *CreateMachineUserRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_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 CreateMachineUserRequest.ProtoReflect.Descriptor instead.
+func (*CreateMachineUserRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_admin_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *CreateMachineUserRequest) GetUsername() string {
+ if x != nil {
+ return x.Username
+ }
+ return ""
+}
+
+type CreateMachineUserResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+}
+
+func (x *CreateMachineUserResponse) Reset() {
+ *x = CreateMachineUserResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateMachineUserResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateMachineUserResponse) ProtoMessage() {}
+
+func (x *CreateMachineUserResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_admin_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 CreateMachineUserResponse.ProtoReflect.Descriptor instead.
+func (*CreateMachineUserResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_admin_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *CreateMachineUserResponse) GetUser() *User {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_admin_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_admin_proto_rawDesc = []byte{
+ 0x0a, 0x27, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x64,
+ 0x6d, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x2e, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x2c, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26,
+ 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x31, 0x0a,
+ 0x16, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
+ 0x22, 0xfa, 0x02, 0x0a, 0x17, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04,
+ 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75,
+ 0x73, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x69, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65,
+ 0x73, 0x12, 0x41, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x02, 0x18, 0x01, 0x52, 0x07, 0x70, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x73, 0x12, 0x47, 0x0a, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x02,
+ 0x18, 0x01, 0x52, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x22, 0xa0, 0x01,
+ 0x0a, 0x23, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69,
+ 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x60,
+ 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x12, 0x76, 0x65,
+ 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x22, 0x26, 0x0a, 0x24, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65,
+ 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xb8, 0x01, 0x0a, 0x2b, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56,
+ 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61,
+ 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49,
+ 0x64, 0x12, 0x60, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x65, 0x72,
+ 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52,
+ 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61,
+ 0x74, 0x75, 0x73, 0x22, 0x2e, 0x0a, 0x2c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67,
+ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x36, 0x0a, 0x18, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63,
+ 0x68, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x19, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x32,
+ 0xf5, 0x04, 0x0a, 0x0c, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x12, 0x7c, 0x0a, 0x0f, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55,
+ 0x73, 0x65, 0x72, 0x12, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,
+ 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f, 0x72, 0x63, 0x65, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa3,
+ 0x01, 0x0a, 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72,
+ 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12,
+ 0x40, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xbb, 0x01, 0x0a, 0x24, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66,
+ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61,
+ 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65,
+ 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x49, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61,
+ 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63,
+ 0x68, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63,
+ 0x68, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x4d, 0x61, 0x63, 0x68, 0x69, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x97, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x64, 0x6d,
+ 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62,
+ 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66,
+ 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41,
+ 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70,
+ 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_admin_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_admin_proto_rawDescData = file_buf_alpha_registry_v1alpha1_admin_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_admin_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_admin_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_admin_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_admin_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_admin_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes = make([]protoimpl.MessageInfo, 8)
+var file_buf_alpha_registry_v1alpha1_admin_proto_goTypes = []interface{}{
+ (*ForceDeleteUserRequest)(nil), // 0: buf.alpha.registry.v1alpha1.ForceDeleteUserRequest
+ (*ForceDeleteUserResponse)(nil), // 1: buf.alpha.registry.v1alpha1.ForceDeleteUserResponse
+ (*UpdateUserVerificationStatusRequest)(nil), // 2: buf.alpha.registry.v1alpha1.UpdateUserVerificationStatusRequest
+ (*UpdateUserVerificationStatusResponse)(nil), // 3: buf.alpha.registry.v1alpha1.UpdateUserVerificationStatusResponse
+ (*UpdateOrganizationVerificationStatusRequest)(nil), // 4: buf.alpha.registry.v1alpha1.UpdateOrganizationVerificationStatusRequest
+ (*UpdateOrganizationVerificationStatusResponse)(nil), // 5: buf.alpha.registry.v1alpha1.UpdateOrganizationVerificationStatusResponse
+ (*CreateMachineUserRequest)(nil), // 6: buf.alpha.registry.v1alpha1.CreateMachineUserRequest
+ (*CreateMachineUserResponse)(nil), // 7: buf.alpha.registry.v1alpha1.CreateMachineUserResponse
+ (*User)(nil), // 8: buf.alpha.registry.v1alpha1.User
+ (*Organization)(nil), // 9: buf.alpha.registry.v1alpha1.Organization
+ (*Repository)(nil), // 10: buf.alpha.registry.v1alpha1.Repository
+ (*Plugin)(nil), // 11: buf.alpha.registry.v1alpha1.Plugin
+ (*Template)(nil), // 12: buf.alpha.registry.v1alpha1.Template
+ (VerificationStatus)(0), // 13: buf.alpha.registry.v1alpha1.VerificationStatus
+}
+var file_buf_alpha_registry_v1alpha1_admin_proto_depIdxs = []int32{
+ 8, // 0: buf.alpha.registry.v1alpha1.ForceDeleteUserResponse.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 9, // 1: buf.alpha.registry.v1alpha1.ForceDeleteUserResponse.organizations:type_name -> buf.alpha.registry.v1alpha1.Organization
+ 10, // 2: buf.alpha.registry.v1alpha1.ForceDeleteUserResponse.repositories:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 11, // 3: buf.alpha.registry.v1alpha1.ForceDeleteUserResponse.plugins:type_name -> buf.alpha.registry.v1alpha1.Plugin
+ 12, // 4: buf.alpha.registry.v1alpha1.ForceDeleteUserResponse.templates:type_name -> buf.alpha.registry.v1alpha1.Template
+ 13, // 5: buf.alpha.registry.v1alpha1.UpdateUserVerificationStatusRequest.verification_status:type_name -> buf.alpha.registry.v1alpha1.VerificationStatus
+ 13, // 6: buf.alpha.registry.v1alpha1.UpdateOrganizationVerificationStatusRequest.verification_status:type_name -> buf.alpha.registry.v1alpha1.VerificationStatus
+ 8, // 7: buf.alpha.registry.v1alpha1.CreateMachineUserResponse.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 0, // 8: buf.alpha.registry.v1alpha1.AdminService.ForceDeleteUser:input_type -> buf.alpha.registry.v1alpha1.ForceDeleteUserRequest
+ 2, // 9: buf.alpha.registry.v1alpha1.AdminService.UpdateUserVerificationStatus:input_type -> buf.alpha.registry.v1alpha1.UpdateUserVerificationStatusRequest
+ 4, // 10: buf.alpha.registry.v1alpha1.AdminService.UpdateOrganizationVerificationStatus:input_type -> buf.alpha.registry.v1alpha1.UpdateOrganizationVerificationStatusRequest
+ 6, // 11: buf.alpha.registry.v1alpha1.AdminService.CreateMachineUser:input_type -> buf.alpha.registry.v1alpha1.CreateMachineUserRequest
+ 1, // 12: buf.alpha.registry.v1alpha1.AdminService.ForceDeleteUser:output_type -> buf.alpha.registry.v1alpha1.ForceDeleteUserResponse
+ 3, // 13: buf.alpha.registry.v1alpha1.AdminService.UpdateUserVerificationStatus:output_type -> buf.alpha.registry.v1alpha1.UpdateUserVerificationStatusResponse
+ 5, // 14: buf.alpha.registry.v1alpha1.AdminService.UpdateOrganizationVerificationStatus:output_type -> buf.alpha.registry.v1alpha1.UpdateOrganizationVerificationStatusResponse
+ 7, // 15: buf.alpha.registry.v1alpha1.AdminService.CreateMachineUser:output_type -> buf.alpha.registry.v1alpha1.CreateMachineUserResponse
+ 12, // [12:16] is the sub-list for method output_type
+ 8, // [8:12] is the sub-list for method input_type
+ 8, // [8:8] is the sub-list for extension type_name
+ 8, // [8:8] is the sub-list for extension extendee
+ 0, // [0:8] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_admin_proto_init() }
+func file_buf_alpha_registry_v1alpha1_admin_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_admin_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_init()
+ file_buf_alpha_registry_v1alpha1_plugin_proto_init()
+ file_buf_alpha_registry_v1alpha1_repository_proto_init()
+ file_buf_alpha_registry_v1alpha1_user_proto_init()
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ForceDeleteUserRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ForceDeleteUserResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateUserVerificationStatusRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateUserVerificationStatusResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateOrganizationVerificationStatusRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateOrganizationVerificationStatusResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateMachineUserRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateMachineUserResponse); 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_buf_alpha_registry_v1alpha1_admin_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 8,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_admin_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_admin_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_admin_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_admin_proto = out.File
+ file_buf_alpha_registry_v1alpha1_admin_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_admin_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_admin_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/authn.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/authn.pb.go
new file mode 100644
index 000000000..eb2d73ae0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/authn.pb.go
@@ -0,0 +1,379 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/authn.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type GetCurrentUserRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *GetCurrentUserRequest) Reset() {
+ *x = GetCurrentUserRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetCurrentUserRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetCurrentUserRequest) ProtoMessage() {}
+
+func (x *GetCurrentUserRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authn_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 GetCurrentUserRequest.ProtoReflect.Descriptor instead.
+func (*GetCurrentUserRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authn_proto_rawDescGZIP(), []int{0}
+}
+
+type GetCurrentUserResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+}
+
+func (x *GetCurrentUserResponse) Reset() {
+ *x = GetCurrentUserResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetCurrentUserResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetCurrentUserResponse) ProtoMessage() {}
+
+func (x *GetCurrentUserResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authn_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 GetCurrentUserResponse.ProtoReflect.Descriptor instead.
+func (*GetCurrentUserResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authn_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetCurrentUserResponse) GetUser() *User {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+type GetCurrentUserSubjectRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *GetCurrentUserSubjectRequest) Reset() {
+ *x = GetCurrentUserSubjectRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetCurrentUserSubjectRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetCurrentUserSubjectRequest) ProtoMessage() {}
+
+func (x *GetCurrentUserSubjectRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authn_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 GetCurrentUserSubjectRequest.ProtoReflect.Descriptor instead.
+func (*GetCurrentUserSubjectRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authn_proto_rawDescGZIP(), []int{2}
+}
+
+type GetCurrentUserSubjectResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The user's subject for mapping to user in identity provider.
+ // Note: we do not want to make it part of the User response as
+ // it contains potentially sensitive information and the User
+ // response is shared with other users.
+ Subject string `protobuf:"bytes,1,opt,name=subject,proto3" json:"subject,omitempty"`
+}
+
+func (x *GetCurrentUserSubjectResponse) Reset() {
+ *x = GetCurrentUserSubjectResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetCurrentUserSubjectResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetCurrentUserSubjectResponse) ProtoMessage() {}
+
+func (x *GetCurrentUserSubjectResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authn_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 GetCurrentUserSubjectResponse.ProtoReflect.Descriptor instead.
+func (*GetCurrentUserSubjectResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authn_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *GetCurrentUserSubjectResponse) GetSubject() string {
+ if x != nil {
+ return x.Subject
+ }
+ return ""
+}
+
+var File_buf_alpha_registry_v1alpha1_authn_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_authn_proto_rawDesc = []byte{
+ 0x0a, 0x27, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x75,
+ 0x74, 0x68, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x17,
+ 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x4f, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x43, 0x75,
+ 0x72, 0x72, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x35, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x21, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73,
+ 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x1e, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x43,
+ 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x39, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x43,
+ 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x62,
+ 0x6a, 0x65, 0x63, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x75, 0x62, 0x6a,
+ 0x65, 0x63, 0x74, 0x32, 0x9a, 0x02, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x79, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65,
+ 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x12, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x55,
+ 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72,
+ 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x8e, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x55, 0x73,
+ 0x65, 0x72, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x12, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65,
+ 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x55, 0x73, 0x65,
+ 0x72, 0x53, 0x75, 0x62, 0x6a, 0x65, 0x63, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x42, 0x97, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62,
+ 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76,
+ 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f,
+ 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03,
+ 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2,
+ 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50,
+ 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a,
+ 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_authn_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_authn_proto_rawDescData = file_buf_alpha_registry_v1alpha1_authn_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_authn_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_authn_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_authn_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_authn_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_authn_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes = make([]protoimpl.MessageInfo, 4)
+var file_buf_alpha_registry_v1alpha1_authn_proto_goTypes = []interface{}{
+ (*GetCurrentUserRequest)(nil), // 0: buf.alpha.registry.v1alpha1.GetCurrentUserRequest
+ (*GetCurrentUserResponse)(nil), // 1: buf.alpha.registry.v1alpha1.GetCurrentUserResponse
+ (*GetCurrentUserSubjectRequest)(nil), // 2: buf.alpha.registry.v1alpha1.GetCurrentUserSubjectRequest
+ (*GetCurrentUserSubjectResponse)(nil), // 3: buf.alpha.registry.v1alpha1.GetCurrentUserSubjectResponse
+ (*User)(nil), // 4: buf.alpha.registry.v1alpha1.User
+}
+var file_buf_alpha_registry_v1alpha1_authn_proto_depIdxs = []int32{
+ 4, // 0: buf.alpha.registry.v1alpha1.GetCurrentUserResponse.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 0, // 1: buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUser:input_type -> buf.alpha.registry.v1alpha1.GetCurrentUserRequest
+ 2, // 2: buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUserSubject:input_type -> buf.alpha.registry.v1alpha1.GetCurrentUserSubjectRequest
+ 1, // 3: buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUser:output_type -> buf.alpha.registry.v1alpha1.GetCurrentUserResponse
+ 3, // 4: buf.alpha.registry.v1alpha1.AuthnService.GetCurrentUserSubject:output_type -> buf.alpha.registry.v1alpha1.GetCurrentUserSubjectResponse
+ 3, // [3:5] is the sub-list for method output_type
+ 1, // [1:3] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_authn_proto_init() }
+func file_buf_alpha_registry_v1alpha1_authn_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_authn_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetCurrentUserRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetCurrentUserResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetCurrentUserSubjectRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetCurrentUserSubjectResponse); 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_buf_alpha_registry_v1alpha1_authn_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 4,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_authn_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_authn_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_authn_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_authn_proto = out.File
+ file_buf_alpha_registry_v1alpha1_authn_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_authn_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_authn_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/authz.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/authz.pb.go
new file mode 100644
index 000000000..7cfc4d9c1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/authz.pb.go
@@ -0,0 +1,3361 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/authz.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type UserCanCreateOrganizationRepositoryRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to check
+ // whether the user is authorized.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+}
+
+func (x *UserCanCreateOrganizationRepositoryRequest) Reset() {
+ *x = UserCanCreateOrganizationRepositoryRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanCreateOrganizationRepositoryRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanCreateOrganizationRepositoryRequest) ProtoMessage() {}
+
+func (x *UserCanCreateOrganizationRepositoryRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanCreateOrganizationRepositoryRequest.ProtoReflect.Descriptor instead.
+func (*UserCanCreateOrganizationRepositoryRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *UserCanCreateOrganizationRepositoryRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+type UserCanCreateOrganizationRepositoryResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanCreateOrganizationRepositoryResponse) Reset() {
+ *x = UserCanCreateOrganizationRepositoryResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanCreateOrganizationRepositoryResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanCreateOrganizationRepositoryResponse) ProtoMessage() {}
+
+func (x *UserCanCreateOrganizationRepositoryResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanCreateOrganizationRepositoryResponse.ProtoReflect.Descriptor instead.
+func (*UserCanCreateOrganizationRepositoryResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *UserCanCreateOrganizationRepositoryResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+type UserCanSeeRepositorySettingsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository for which to check
+ // whether the user is authorized.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+}
+
+func (x *UserCanSeeRepositorySettingsRequest) Reset() {
+ *x = UserCanSeeRepositorySettingsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanSeeRepositorySettingsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanSeeRepositorySettingsRequest) ProtoMessage() {}
+
+func (x *UserCanSeeRepositorySettingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanSeeRepositorySettingsRequest.ProtoReflect.Descriptor instead.
+func (*UserCanSeeRepositorySettingsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *UserCanSeeRepositorySettingsRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+type UserCanSeeRepositorySettingsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanSeeRepositorySettingsResponse) Reset() {
+ *x = UserCanSeeRepositorySettingsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanSeeRepositorySettingsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanSeeRepositorySettingsResponse) ProtoMessage() {}
+
+func (x *UserCanSeeRepositorySettingsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanSeeRepositorySettingsResponse.ProtoReflect.Descriptor instead.
+func (*UserCanSeeRepositorySettingsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *UserCanSeeRepositorySettingsResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+type UserCanSeeOrganizationSettingsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to check
+ // whether the user is authorized.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+}
+
+func (x *UserCanSeeOrganizationSettingsRequest) Reset() {
+ *x = UserCanSeeOrganizationSettingsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanSeeOrganizationSettingsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanSeeOrganizationSettingsRequest) ProtoMessage() {}
+
+func (x *UserCanSeeOrganizationSettingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanSeeOrganizationSettingsRequest.ProtoReflect.Descriptor instead.
+func (*UserCanSeeOrganizationSettingsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *UserCanSeeOrganizationSettingsRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+type UserCanSeeOrganizationSettingsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanSeeOrganizationSettingsResponse) Reset() {
+ *x = UserCanSeeOrganizationSettingsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanSeeOrganizationSettingsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanSeeOrganizationSettingsResponse) ProtoMessage() {}
+
+func (x *UserCanSeeOrganizationSettingsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanSeeOrganizationSettingsResponse.ProtoReflect.Descriptor instead.
+func (*UserCanSeeOrganizationSettingsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *UserCanSeeOrganizationSettingsResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type UserCanReadPluginRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *UserCanReadPluginRequest) Reset() {
+ *x = UserCanReadPluginRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanReadPluginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanReadPluginRequest) ProtoMessage() {}
+
+func (x *UserCanReadPluginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanReadPluginRequest.ProtoReflect.Descriptor instead.
+func (*UserCanReadPluginRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *UserCanReadPluginRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *UserCanReadPluginRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanReadPluginResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanReadPluginResponse) Reset() {
+ *x = UserCanReadPluginResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanReadPluginResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanReadPluginResponse) ProtoMessage() {}
+
+func (x *UserCanReadPluginResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanReadPluginResponse.ProtoReflect.Descriptor instead.
+func (*UserCanReadPluginResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *UserCanReadPluginResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type UserCanCreatePluginVersionRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *UserCanCreatePluginVersionRequest) Reset() {
+ *x = UserCanCreatePluginVersionRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanCreatePluginVersionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanCreatePluginVersionRequest) ProtoMessage() {}
+
+func (x *UserCanCreatePluginVersionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanCreatePluginVersionRequest.ProtoReflect.Descriptor instead.
+func (*UserCanCreatePluginVersionRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *UserCanCreatePluginVersionRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *UserCanCreatePluginVersionRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanCreatePluginVersionResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanCreatePluginVersionResponse) Reset() {
+ *x = UserCanCreatePluginVersionResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanCreatePluginVersionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanCreatePluginVersionResponse) ProtoMessage() {}
+
+func (x *UserCanCreatePluginVersionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanCreatePluginVersionResponse.ProtoReflect.Descriptor instead.
+func (*UserCanCreatePluginVersionResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *UserCanCreatePluginVersionResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type UserCanCreateTemplateVersionRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the template.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the template.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *UserCanCreateTemplateVersionRequest) Reset() {
+ *x = UserCanCreateTemplateVersionRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanCreateTemplateVersionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanCreateTemplateVersionRequest) ProtoMessage() {}
+
+func (x *UserCanCreateTemplateVersionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanCreateTemplateVersionRequest.ProtoReflect.Descriptor instead.
+func (*UserCanCreateTemplateVersionRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *UserCanCreateTemplateVersionRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *UserCanCreateTemplateVersionRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanCreateTemplateVersionResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanCreateTemplateVersionResponse) Reset() {
+ *x = UserCanCreateTemplateVersionResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanCreateTemplateVersionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanCreateTemplateVersionResponse) ProtoMessage() {}
+
+func (x *UserCanCreateTemplateVersionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanCreateTemplateVersionResponse.ProtoReflect.Descriptor instead.
+func (*UserCanCreateTemplateVersionResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *UserCanCreateTemplateVersionResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type UserCanCreateOrganizationPluginRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to check
+ // whether the user is authorized.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+}
+
+func (x *UserCanCreateOrganizationPluginRequest) Reset() {
+ *x = UserCanCreateOrganizationPluginRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanCreateOrganizationPluginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanCreateOrganizationPluginRequest) ProtoMessage() {}
+
+func (x *UserCanCreateOrganizationPluginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanCreateOrganizationPluginRequest.ProtoReflect.Descriptor instead.
+func (*UserCanCreateOrganizationPluginRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *UserCanCreateOrganizationPluginRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanCreateOrganizationPluginResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanCreateOrganizationPluginResponse) Reset() {
+ *x = UserCanCreateOrganizationPluginResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanCreateOrganizationPluginResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanCreateOrganizationPluginResponse) ProtoMessage() {}
+
+func (x *UserCanCreateOrganizationPluginResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanCreateOrganizationPluginResponse.ProtoReflect.Descriptor instead.
+func (*UserCanCreateOrganizationPluginResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *UserCanCreateOrganizationPluginResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type UserCanCreateOrganizationTemplateRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to check
+ // whether the user is authorized.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+}
+
+func (x *UserCanCreateOrganizationTemplateRequest) Reset() {
+ *x = UserCanCreateOrganizationTemplateRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanCreateOrganizationTemplateRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanCreateOrganizationTemplateRequest) ProtoMessage() {}
+
+func (x *UserCanCreateOrganizationTemplateRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanCreateOrganizationTemplateRequest.ProtoReflect.Descriptor instead.
+func (*UserCanCreateOrganizationTemplateRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *UserCanCreateOrganizationTemplateRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanCreateOrganizationTemplateResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanCreateOrganizationTemplateResponse) Reset() {
+ *x = UserCanCreateOrganizationTemplateResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanCreateOrganizationTemplateResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanCreateOrganizationTemplateResponse) ProtoMessage() {}
+
+func (x *UserCanCreateOrganizationTemplateResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanCreateOrganizationTemplateResponse.ProtoReflect.Descriptor instead.
+func (*UserCanCreateOrganizationTemplateResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *UserCanCreateOrganizationTemplateResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type UserCanSeePluginSettingsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *UserCanSeePluginSettingsRequest) Reset() {
+ *x = UserCanSeePluginSettingsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanSeePluginSettingsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanSeePluginSettingsRequest) ProtoMessage() {}
+
+func (x *UserCanSeePluginSettingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanSeePluginSettingsRequest.ProtoReflect.Descriptor instead.
+func (*UserCanSeePluginSettingsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *UserCanSeePluginSettingsRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *UserCanSeePluginSettingsRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanSeePluginSettingsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanSeePluginSettingsResponse) Reset() {
+ *x = UserCanSeePluginSettingsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanSeePluginSettingsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanSeePluginSettingsResponse) ProtoMessage() {}
+
+func (x *UserCanSeePluginSettingsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanSeePluginSettingsResponse.ProtoReflect.Descriptor instead.
+func (*UserCanSeePluginSettingsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *UserCanSeePluginSettingsResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type UserCanSeeTemplateSettingsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the template.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the template.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *UserCanSeeTemplateSettingsRequest) Reset() {
+ *x = UserCanSeeTemplateSettingsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanSeeTemplateSettingsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanSeeTemplateSettingsRequest) ProtoMessage() {}
+
+func (x *UserCanSeeTemplateSettingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanSeeTemplateSettingsRequest.ProtoReflect.Descriptor instead.
+func (*UserCanSeeTemplateSettingsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *UserCanSeeTemplateSettingsRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *UserCanSeeTemplateSettingsRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanSeeTemplateSettingsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanSeeTemplateSettingsResponse) Reset() {
+ *x = UserCanSeeTemplateSettingsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanSeeTemplateSettingsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanSeeTemplateSettingsResponse) ProtoMessage() {}
+
+func (x *UserCanSeeTemplateSettingsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanSeeTemplateSettingsResponse.ProtoReflect.Descriptor instead.
+func (*UserCanSeeTemplateSettingsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *UserCanSeeTemplateSettingsResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+type UserCanAddOrganizationMemberRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to check
+ // whether the user is authorized.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+}
+
+func (x *UserCanAddOrganizationMemberRequest) Reset() {
+ *x = UserCanAddOrganizationMemberRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanAddOrganizationMemberRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanAddOrganizationMemberRequest) ProtoMessage() {}
+
+func (x *UserCanAddOrganizationMemberRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanAddOrganizationMemberRequest.ProtoReflect.Descriptor instead.
+func (*UserCanAddOrganizationMemberRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *UserCanAddOrganizationMemberRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+type UserCanAddOrganizationMemberResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that the user is authorized to add, empty list means the user is
+ // not authorized to add any members.
+ AuthorizedRoles []OrganizationRole `protobuf:"varint,1,rep,packed,name=authorized_roles,json=authorizedRoles,proto3,enum=buf.alpha.registry.v1alpha1.OrganizationRole" json:"authorized_roles,omitempty"`
+}
+
+func (x *UserCanAddOrganizationMemberResponse) Reset() {
+ *x = UserCanAddOrganizationMemberResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanAddOrganizationMemberResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanAddOrganizationMemberResponse) ProtoMessage() {}
+
+func (x *UserCanAddOrganizationMemberResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanAddOrganizationMemberResponse.ProtoReflect.Descriptor instead.
+func (*UserCanAddOrganizationMemberResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *UserCanAddOrganizationMemberResponse) GetAuthorizedRoles() []OrganizationRole {
+ if x != nil {
+ return x.AuthorizedRoles
+ }
+ return nil
+}
+
+type UserCanUpdateOrganizationMemberRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to check
+ // whether the user is authorized.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+}
+
+func (x *UserCanUpdateOrganizationMemberRequest) Reset() {
+ *x = UserCanUpdateOrganizationMemberRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanUpdateOrganizationMemberRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanUpdateOrganizationMemberRequest) ProtoMessage() {}
+
+func (x *UserCanUpdateOrganizationMemberRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanUpdateOrganizationMemberRequest.ProtoReflect.Descriptor instead.
+func (*UserCanUpdateOrganizationMemberRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *UserCanUpdateOrganizationMemberRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+type UserCanUpdateOrganizationMemberResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that the user is authorized to update (from and to), empty list means the user is
+ // not authorized to update any members' role.
+ AuthorizedRoles []OrganizationRole `protobuf:"varint,1,rep,packed,name=authorized_roles,json=authorizedRoles,proto3,enum=buf.alpha.registry.v1alpha1.OrganizationRole" json:"authorized_roles,omitempty"`
+}
+
+func (x *UserCanUpdateOrganizationMemberResponse) Reset() {
+ *x = UserCanUpdateOrganizationMemberResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanUpdateOrganizationMemberResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanUpdateOrganizationMemberResponse) ProtoMessage() {}
+
+func (x *UserCanUpdateOrganizationMemberResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanUpdateOrganizationMemberResponse.ProtoReflect.Descriptor instead.
+func (*UserCanUpdateOrganizationMemberResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *UserCanUpdateOrganizationMemberResponse) GetAuthorizedRoles() []OrganizationRole {
+ if x != nil {
+ return x.AuthorizedRoles
+ }
+ return nil
+}
+
+type UserCanRemoveOrganizationMemberRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to check
+ // whether the user is authorized.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+}
+
+func (x *UserCanRemoveOrganizationMemberRequest) Reset() {
+ *x = UserCanRemoveOrganizationMemberRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanRemoveOrganizationMemberRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanRemoveOrganizationMemberRequest) ProtoMessage() {}
+
+func (x *UserCanRemoveOrganizationMemberRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanRemoveOrganizationMemberRequest.ProtoReflect.Descriptor instead.
+func (*UserCanRemoveOrganizationMemberRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *UserCanRemoveOrganizationMemberRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+type UserCanRemoveOrganizationMemberResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that the user is authorized to remove, empty list means the user is
+ // not authorized to remove any members.
+ AuthorizedRoles []OrganizationRole `protobuf:"varint,1,rep,packed,name=authorized_roles,json=authorizedRoles,proto3,enum=buf.alpha.registry.v1alpha1.OrganizationRole" json:"authorized_roles,omitempty"`
+}
+
+func (x *UserCanRemoveOrganizationMemberResponse) Reset() {
+ *x = UserCanRemoveOrganizationMemberResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanRemoveOrganizationMemberResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanRemoveOrganizationMemberResponse) ProtoMessage() {}
+
+func (x *UserCanRemoveOrganizationMemberResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanRemoveOrganizationMemberResponse.ProtoReflect.Descriptor instead.
+func (*UserCanRemoveOrganizationMemberResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *UserCanRemoveOrganizationMemberResponse) GetAuthorizedRoles() []OrganizationRole {
+ if x != nil {
+ return x.AuthorizedRoles
+ }
+ return nil
+}
+
+type UserCanDeleteOrganizationRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to check
+ // whether the user is authorized.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+}
+
+func (x *UserCanDeleteOrganizationRequest) Reset() {
+ *x = UserCanDeleteOrganizationRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanDeleteOrganizationRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanDeleteOrganizationRequest) ProtoMessage() {}
+
+func (x *UserCanDeleteOrganizationRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanDeleteOrganizationRequest.ProtoReflect.Descriptor instead.
+func (*UserCanDeleteOrganizationRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *UserCanDeleteOrganizationRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+type UserCanDeleteOrganizationResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanDeleteOrganizationResponse) Reset() {
+ *x = UserCanDeleteOrganizationResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanDeleteOrganizationResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanDeleteOrganizationResponse) ProtoMessage() {}
+
+func (x *UserCanDeleteOrganizationResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanDeleteOrganizationResponse.ProtoReflect.Descriptor instead.
+func (*UserCanDeleteOrganizationResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *UserCanDeleteOrganizationResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+type UserCanDeleteRepositoryRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository for which to check
+ // whether the user is authorized.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+}
+
+func (x *UserCanDeleteRepositoryRequest) Reset() {
+ *x = UserCanDeleteRepositoryRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanDeleteRepositoryRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanDeleteRepositoryRequest) ProtoMessage() {}
+
+func (x *UserCanDeleteRepositoryRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanDeleteRepositoryRequest.ProtoReflect.Descriptor instead.
+func (*UserCanDeleteRepositoryRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *UserCanDeleteRepositoryRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+type UserCanDeleteRepositoryResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanDeleteRepositoryResponse) Reset() {
+ *x = UserCanDeleteRepositoryResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanDeleteRepositoryResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanDeleteRepositoryResponse) ProtoMessage() {}
+
+func (x *UserCanDeleteRepositoryResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanDeleteRepositoryResponse.ProtoReflect.Descriptor instead.
+func (*UserCanDeleteRepositoryResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{29}
+}
+
+func (x *UserCanDeleteRepositoryResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type UserCanDeleteTemplateRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the template for which to check
+ // whether the user is authorized.
+ TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
+}
+
+func (x *UserCanDeleteTemplateRequest) Reset() {
+ *x = UserCanDeleteTemplateRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanDeleteTemplateRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanDeleteTemplateRequest) ProtoMessage() {}
+
+func (x *UserCanDeleteTemplateRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanDeleteTemplateRequest.ProtoReflect.Descriptor instead.
+func (*UserCanDeleteTemplateRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *UserCanDeleteTemplateRequest) GetTemplateId() string {
+ if x != nil {
+ return x.TemplateId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanDeleteTemplateResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanDeleteTemplateResponse) Reset() {
+ *x = UserCanDeleteTemplateResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanDeleteTemplateResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanDeleteTemplateResponse) ProtoMessage() {}
+
+func (x *UserCanDeleteTemplateResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_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 UserCanDeleteTemplateResponse.ProtoReflect.Descriptor instead.
+func (*UserCanDeleteTemplateResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *UserCanDeleteTemplateResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type UserCanDeletePluginRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the plugin for which to check
+ // whether the user is authorized.
+ PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"`
+}
+
+func (x *UserCanDeletePluginRequest) Reset() {
+ *x = UserCanDeletePluginRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanDeletePluginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanDeletePluginRequest) ProtoMessage() {}
+
+func (x *UserCanDeletePluginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[32]
+ 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 UserCanDeletePluginRequest.ProtoReflect.Descriptor instead.
+func (*UserCanDeletePluginRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *UserCanDeletePluginRequest) GetPluginId() string {
+ if x != nil {
+ return x.PluginId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanDeletePluginResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanDeletePluginResponse) Reset() {
+ *x = UserCanDeletePluginResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanDeletePluginResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanDeletePluginResponse) ProtoMessage() {}
+
+func (x *UserCanDeletePluginResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[33]
+ 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 UserCanDeletePluginResponse.ProtoReflect.Descriptor instead.
+func (*UserCanDeletePluginResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *UserCanDeletePluginResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+type UserCanDeleteUserRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UserCanDeleteUserRequest) Reset() {
+ *x = UserCanDeleteUserRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanDeleteUserRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanDeleteUserRequest) ProtoMessage() {}
+
+func (x *UserCanDeleteUserRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[34]
+ 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 UserCanDeleteUserRequest.ProtoReflect.Descriptor instead.
+func (*UserCanDeleteUserRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{34}
+}
+
+type UserCanDeleteUserResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanDeleteUserResponse) Reset() {
+ *x = UserCanDeleteUserResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanDeleteUserResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanDeleteUserResponse) ProtoMessage() {}
+
+func (x *UserCanDeleteUserResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[35]
+ 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 UserCanDeleteUserResponse.ProtoReflect.Descriptor instead.
+func (*UserCanDeleteUserResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{35}
+}
+
+func (x *UserCanDeleteUserResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+type UserCanSeeServerAdminPanelRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UserCanSeeServerAdminPanelRequest) Reset() {
+ *x = UserCanSeeServerAdminPanelRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanSeeServerAdminPanelRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanSeeServerAdminPanelRequest) ProtoMessage() {}
+
+func (x *UserCanSeeServerAdminPanelRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[36]
+ 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 UserCanSeeServerAdminPanelRequest.ProtoReflect.Descriptor instead.
+func (*UserCanSeeServerAdminPanelRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{36}
+}
+
+type UserCanSeeServerAdminPanelResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Authorized bool `protobuf:"varint,1,opt,name=authorized,proto3" json:"authorized,omitempty"`
+}
+
+func (x *UserCanSeeServerAdminPanelResponse) Reset() {
+ *x = UserCanSeeServerAdminPanelResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanSeeServerAdminPanelResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanSeeServerAdminPanelResponse) ProtoMessage() {}
+
+func (x *UserCanSeeServerAdminPanelResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[37]
+ 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 UserCanSeeServerAdminPanelResponse.ProtoReflect.Descriptor instead.
+func (*UserCanSeeServerAdminPanelResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{37}
+}
+
+func (x *UserCanSeeServerAdminPanelResponse) GetAuthorized() bool {
+ if x != nil {
+ return x.Authorized
+ }
+ return false
+}
+
+type UserCanManageRepositoryContributorsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository for which to check
+ // whether the user is authorized.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+}
+
+func (x *UserCanManageRepositoryContributorsRequest) Reset() {
+ *x = UserCanManageRepositoryContributorsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanManageRepositoryContributorsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanManageRepositoryContributorsRequest) ProtoMessage() {}
+
+func (x *UserCanManageRepositoryContributorsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[38]
+ 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 UserCanManageRepositoryContributorsRequest.ProtoReflect.Descriptor instead.
+func (*UserCanManageRepositoryContributorsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{38}
+}
+
+func (x *UserCanManageRepositoryContributorsRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+type UserCanManageRepositoryContributorsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that the user is authorized to manage, empty list means the user is
+ // not authorized to manage any contributors.
+ AuthorizedRoles []RepositoryRole `protobuf:"varint,1,rep,packed,name=authorized_roles,json=authorizedRoles,proto3,enum=buf.alpha.registry.v1alpha1.RepositoryRole" json:"authorized_roles,omitempty"`
+}
+
+func (x *UserCanManageRepositoryContributorsResponse) Reset() {
+ *x = UserCanManageRepositoryContributorsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanManageRepositoryContributorsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanManageRepositoryContributorsResponse) ProtoMessage() {}
+
+func (x *UserCanManageRepositoryContributorsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[39]
+ 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 UserCanManageRepositoryContributorsResponse.ProtoReflect.Descriptor instead.
+func (*UserCanManageRepositoryContributorsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{39}
+}
+
+func (x *UserCanManageRepositoryContributorsResponse) GetAuthorizedRoles() []RepositoryRole {
+ if x != nil {
+ return x.AuthorizedRoles
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+type UserCanManagePluginContributorsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the plugin for which to check
+ // whether the user is authorized.
+ PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"`
+}
+
+func (x *UserCanManagePluginContributorsRequest) Reset() {
+ *x = UserCanManagePluginContributorsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanManagePluginContributorsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanManagePluginContributorsRequest) ProtoMessage() {}
+
+func (x *UserCanManagePluginContributorsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[40]
+ 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 UserCanManagePluginContributorsRequest.ProtoReflect.Descriptor instead.
+func (*UserCanManagePluginContributorsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{40}
+}
+
+func (x *UserCanManagePluginContributorsRequest) GetPluginId() string {
+ if x != nil {
+ return x.PluginId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanManagePluginContributorsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that the user is authorized to manage, empty list means the user is
+ // not authorized to manage any contributors.
+ AuthorizedRoles []PluginRole `protobuf:"varint,1,rep,packed,name=authorized_roles,json=authorizedRoles,proto3,enum=buf.alpha.registry.v1alpha1.PluginRole" json:"authorized_roles,omitempty"`
+}
+
+func (x *UserCanManagePluginContributorsResponse) Reset() {
+ *x = UserCanManagePluginContributorsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanManagePluginContributorsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanManagePluginContributorsResponse) ProtoMessage() {}
+
+func (x *UserCanManagePluginContributorsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[41]
+ 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 UserCanManagePluginContributorsResponse.ProtoReflect.Descriptor instead.
+func (*UserCanManagePluginContributorsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{41}
+}
+
+func (x *UserCanManagePluginContributorsResponse) GetAuthorizedRoles() []PluginRole {
+ if x != nil {
+ return x.AuthorizedRoles
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+type UserCanManageTemplateContributorsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the template for which to check
+ // whether the user is authorized.
+ TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
+}
+
+func (x *UserCanManageTemplateContributorsRequest) Reset() {
+ *x = UserCanManageTemplateContributorsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanManageTemplateContributorsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanManageTemplateContributorsRequest) ProtoMessage() {}
+
+func (x *UserCanManageTemplateContributorsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[42]
+ 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 UserCanManageTemplateContributorsRequest.ProtoReflect.Descriptor instead.
+func (*UserCanManageTemplateContributorsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{42}
+}
+
+func (x *UserCanManageTemplateContributorsRequest) GetTemplateId() string {
+ if x != nil {
+ return x.TemplateId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type UserCanManageTemplateContributorsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that the user is authorized to manage, empty list means the user is
+ // not authorized to manage any contributors.
+ AuthorizedRoles []TemplateRole `protobuf:"varint,1,rep,packed,name=authorized_roles,json=authorizedRoles,proto3,enum=buf.alpha.registry.v1alpha1.TemplateRole" json:"authorized_roles,omitempty"`
+}
+
+func (x *UserCanManageTemplateContributorsResponse) Reset() {
+ *x = UserCanManageTemplateContributorsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[43]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserCanManageTemplateContributorsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserCanManageTemplateContributorsResponse) ProtoMessage() {}
+
+func (x *UserCanManageTemplateContributorsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[43]
+ 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 UserCanManageTemplateContributorsResponse.ProtoReflect.Descriptor instead.
+func (*UserCanManageTemplateContributorsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP(), []int{43}
+}
+
+func (x *UserCanManageTemplateContributorsResponse) GetAuthorizedRoles() []TemplateRole {
+ if x != nil {
+ return x.AuthorizedRoles
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_authz_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_authz_proto_rawDesc = []byte{
+ 0x0a, 0x27, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x61, 0x75,
+ 0x74, 0x68, 0x7a, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x55,
+ 0x0a, 0x2a, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f,
+ 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x4d, 0x0a, 0x2b, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
+ 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
+ 0x69, 0x7a, 0x65, 0x64, 0x22, 0x4a, 0x0a, 0x23, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53,
+ 0x65, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64,
+ 0x22, 0x46, 0x0a, 0x24, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68,
+ 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75,
+ 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x50, 0x0a, 0x25, 0x55, 0x73, 0x65, 0x72,
+ 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61,
+ 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x48, 0x0a, 0x26, 0x55, 0x73,
+ 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
+ 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
+ 0x69, 0x7a, 0x65, 0x64, 0x22, 0x48, 0x0a, 0x18, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x52,
+ 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3f,
+ 0x0a, 0x19, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22,
+ 0x51, 0x0a, 0x21, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x02,
+ 0x18, 0x01, 0x22, 0x48, 0x0a, 0x22, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68,
+ 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75,
+ 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x53, 0x0a, 0x23,
+ 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x02, 0x18,
+ 0x01, 0x22, 0x4a, 0x0a, 0x24, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74,
+ 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x55, 0x0a,
+ 0x26, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64,
+ 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4d, 0x0a, 0x27, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x3a,
+ 0x02, 0x18, 0x01, 0x22, 0x57, 0x0a, 0x28, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69,
+ 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4f, 0x0a, 0x29,
+ 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67,
+ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74,
+ 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4f, 0x0a,
+ 0x1f, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x46,
+ 0x0a, 0x20, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
+ 0x65, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x51, 0x0a, 0x21, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61,
+ 0x6e, 0x53, 0x65, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f,
+ 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x48, 0x0a, 0x22, 0x55, 0x73, 0x65,
+ 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53,
+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x3a,
+ 0x02, 0x18, 0x01, 0x22, 0x4e, 0x0a, 0x23, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x41, 0x64,
+ 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d,
+ 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x49, 0x64, 0x22, 0x80, 0x01, 0x0a, 0x24, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x41,
+ 0x64, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65,
+ 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x10,
+ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65,
+ 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x51, 0x0a, 0x26, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61,
+ 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x27, 0x55, 0x73,
+ 0x65, 0x72, 0x43, 0x61, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58, 0x0a, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
+ 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32,
+ 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f,
+ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x22,
+ 0x51, 0x0a, 0x26, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65,
+ 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62,
+ 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67,
+ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x49, 0x64, 0x22, 0x83, 0x01, 0x0a, 0x27, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x52, 0x65,
+ 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x58,
+ 0x0a, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x6c,
+ 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69,
+ 0x7a, 0x65, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x4b, 0x0a, 0x20, 0x55, 0x73, 0x65, 0x72,
+ 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f,
+ 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x21, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75,
+ 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
+ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x45, 0x0a, 0x1e, 0x55, 0x73,
+ 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49,
+ 0x64, 0x22, 0x41, 0x0a, 0x1f, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
+ 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
+ 0x69, 0x7a, 0x65, 0x64, 0x22, 0x43, 0x0a, 0x1c, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x43, 0x0a, 0x1d, 0x55, 0x73, 0x65,
+ 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75,
+ 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a,
+ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x3d,
+ 0x0a, 0x1a, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09,
+ 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x08, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x41, 0x0a,
+ 0x1b, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a,
+ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x3a, 0x02, 0x18, 0x01,
+ 0x22, 0x1a, 0x0a, 0x18, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x3b, 0x0a, 0x19,
+ 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65,
+ 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74,
+ 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x22, 0x23, 0x0a, 0x21, 0x55, 0x73, 0x65,
+ 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x6d,
+ 0x69, 0x6e, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x44,
+ 0x0a, 0x22, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x53, 0x65, 0x72, 0x76,
+ 0x65, 0x72, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a,
+ 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
+ 0x69, 0x7a, 0x65, 0x64, 0x22, 0x51, 0x0a, 0x2a, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d,
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43,
+ 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x2b, 0x55, 0x73, 0x65, 0x72,
+ 0x43, 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f,
+ 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f,
+ 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x22,
+ 0x49, 0x0a, 0x26, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f,
+ 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x81, 0x01, 0x0a, 0x27, 0x55,
+ 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x52, 0x0a, 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72,
+ 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e,
+ 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x6f,
+ 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x4f,
+ 0x0a, 0x28, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x54,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22,
+ 0x85, 0x01, 0x0a, 0x29, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67,
+ 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62,
+ 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x54, 0x0a,
+ 0x10, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x5f, 0x72, 0x6f, 0x6c, 0x65,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f,
+ 0x6c, 0x65, 0x52, 0x0f, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, 0x65, 0x64, 0x52, 0x6f,
+ 0x6c, 0x65, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x32, 0xd3, 0x1c, 0x0a, 0x0c, 0x41, 0x75, 0x74, 0x68,
+ 0x7a, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0xb8, 0x01, 0x0a, 0x23, 0x55, 0x73, 0x65,
+ 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69,
+ 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x12, 0x47, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55,
+ 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61,
+ 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x48, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x1c, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53,
+ 0x65, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x73, 0x12, 0x40, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa9, 0x01, 0x0a, 0x1e, 0x55, 0x73,
+ 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x42, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43,
+ 0x61, 0x6e, 0x53, 0x65, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x43, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55,
+ 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x87, 0x01, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61,
+ 0x6e, 0x52, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x35, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61,
+ 0x6e, 0x52, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x52, 0x65, 0x61, 0x64, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12,
+ 0xa2, 0x01, 0x0a, 0x1a, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3e,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65,
+ 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65,
+ 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x03, 0x88, 0x02, 0x01, 0x12, 0xa8, 0x01, 0x0a, 0x1c, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x40, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12,
+ 0xb1, 0x01, 0x0a, 0x1f, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x12, 0x43, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x44, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03,
+ 0x88, 0x02, 0x01, 0x12, 0xb7, 0x01, 0x0a, 0x21, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x45, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x46, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55,
+ 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61,
+ 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x9c, 0x01,
+ 0x0a, 0x18, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3c, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e,
+ 0x53, 0x65, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65,
+ 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0xa2, 0x01, 0x0a,
+ 0x1a, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3e, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61,
+ 0x6e, 0x53, 0x65, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61,
+ 0x6e, 0x53, 0x65, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02,
+ 0x01, 0x12, 0xa3, 0x01, 0x0a, 0x1c, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x41, 0x64, 0x64,
+ 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62,
+ 0x65, 0x72, 0x12, 0x40, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x41, 0x64, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x41, 0x64, 0x64, 0x4f, 0x72, 0x67,
+ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xac, 0x01, 0x0a, 0x1f, 0x55, 0x73, 0x65, 0x72,
+ 0x43, 0x61, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x43, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61,
+ 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x44, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55,
+ 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61,
+ 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xac, 0x01, 0x0a, 0x1f, 0x55, 0x73, 0x65, 0x72, 0x43,
+ 0x61, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x43, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e,
+ 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x44, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73,
+ 0x65, 0x72, 0x43, 0x61, 0x6e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9a, 0x01, 0x0a, 0x19, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61,
+ 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x17, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x3b,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65,
+ 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61,
+ 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x93, 0x01, 0x0a, 0x15, 0x55, 0x73,
+ 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x12, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65,
+ 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12,
+ 0x8d, 0x01, 0x0a, 0x13, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55,
+ 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12,
+ 0x82, 0x01, 0x0a, 0x11, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43,
+ 0x61, 0x6e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x1a, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e,
+ 0x53, 0x65, 0x65, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x61,
+ 0x6e, 0x65, 0x6c, 0x12, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x53, 0x65, 0x72, 0x76,
+ 0x65, 0x72, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x53, 0x65, 0x65, 0x53, 0x65, 0x72, 0x76,
+ 0x65, 0x72, 0x41, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x6e, 0x65, 0x6c, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xb8, 0x01, 0x0a, 0x23, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e,
+ 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x47, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43,
+ 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x48, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67,
+ 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0xb1, 0x01, 0x0a, 0x1f, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67,
+ 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x6f, 0x72, 0x73, 0x12, 0x43, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x50,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x44, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d, 0x61,
+ 0x6e, 0x61, 0x67, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69,
+ 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03,
+ 0x88, 0x02, 0x01, 0x12, 0xb7, 0x01, 0x0a, 0x21, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d,
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x45, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d,
+ 0x61, 0x6e, 0x61, 0x67, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x46, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55,
+ 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x42, 0x97, 0x02,
+ 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x42, 0x0a, 0x41, 0x75, 0x74, 0x68, 0x7a, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
+ 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62,
+ 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
+ 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75,
+ 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52,
+ 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02,
+ 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42,
+ 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_authz_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_authz_proto_rawDescData = file_buf_alpha_registry_v1alpha1_authz_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_authz_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_authz_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_authz_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_authz_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_authz_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes = make([]protoimpl.MessageInfo, 44)
+var file_buf_alpha_registry_v1alpha1_authz_proto_goTypes = []interface{}{
+ (*UserCanCreateOrganizationRepositoryRequest)(nil), // 0: buf.alpha.registry.v1alpha1.UserCanCreateOrganizationRepositoryRequest
+ (*UserCanCreateOrganizationRepositoryResponse)(nil), // 1: buf.alpha.registry.v1alpha1.UserCanCreateOrganizationRepositoryResponse
+ (*UserCanSeeRepositorySettingsRequest)(nil), // 2: buf.alpha.registry.v1alpha1.UserCanSeeRepositorySettingsRequest
+ (*UserCanSeeRepositorySettingsResponse)(nil), // 3: buf.alpha.registry.v1alpha1.UserCanSeeRepositorySettingsResponse
+ (*UserCanSeeOrganizationSettingsRequest)(nil), // 4: buf.alpha.registry.v1alpha1.UserCanSeeOrganizationSettingsRequest
+ (*UserCanSeeOrganizationSettingsResponse)(nil), // 5: buf.alpha.registry.v1alpha1.UserCanSeeOrganizationSettingsResponse
+ (*UserCanReadPluginRequest)(nil), // 6: buf.alpha.registry.v1alpha1.UserCanReadPluginRequest
+ (*UserCanReadPluginResponse)(nil), // 7: buf.alpha.registry.v1alpha1.UserCanReadPluginResponse
+ (*UserCanCreatePluginVersionRequest)(nil), // 8: buf.alpha.registry.v1alpha1.UserCanCreatePluginVersionRequest
+ (*UserCanCreatePluginVersionResponse)(nil), // 9: buf.alpha.registry.v1alpha1.UserCanCreatePluginVersionResponse
+ (*UserCanCreateTemplateVersionRequest)(nil), // 10: buf.alpha.registry.v1alpha1.UserCanCreateTemplateVersionRequest
+ (*UserCanCreateTemplateVersionResponse)(nil), // 11: buf.alpha.registry.v1alpha1.UserCanCreateTemplateVersionResponse
+ (*UserCanCreateOrganizationPluginRequest)(nil), // 12: buf.alpha.registry.v1alpha1.UserCanCreateOrganizationPluginRequest
+ (*UserCanCreateOrganizationPluginResponse)(nil), // 13: buf.alpha.registry.v1alpha1.UserCanCreateOrganizationPluginResponse
+ (*UserCanCreateOrganizationTemplateRequest)(nil), // 14: buf.alpha.registry.v1alpha1.UserCanCreateOrganizationTemplateRequest
+ (*UserCanCreateOrganizationTemplateResponse)(nil), // 15: buf.alpha.registry.v1alpha1.UserCanCreateOrganizationTemplateResponse
+ (*UserCanSeePluginSettingsRequest)(nil), // 16: buf.alpha.registry.v1alpha1.UserCanSeePluginSettingsRequest
+ (*UserCanSeePluginSettingsResponse)(nil), // 17: buf.alpha.registry.v1alpha1.UserCanSeePluginSettingsResponse
+ (*UserCanSeeTemplateSettingsRequest)(nil), // 18: buf.alpha.registry.v1alpha1.UserCanSeeTemplateSettingsRequest
+ (*UserCanSeeTemplateSettingsResponse)(nil), // 19: buf.alpha.registry.v1alpha1.UserCanSeeTemplateSettingsResponse
+ (*UserCanAddOrganizationMemberRequest)(nil), // 20: buf.alpha.registry.v1alpha1.UserCanAddOrganizationMemberRequest
+ (*UserCanAddOrganizationMemberResponse)(nil), // 21: buf.alpha.registry.v1alpha1.UserCanAddOrganizationMemberResponse
+ (*UserCanUpdateOrganizationMemberRequest)(nil), // 22: buf.alpha.registry.v1alpha1.UserCanUpdateOrganizationMemberRequest
+ (*UserCanUpdateOrganizationMemberResponse)(nil), // 23: buf.alpha.registry.v1alpha1.UserCanUpdateOrganizationMemberResponse
+ (*UserCanRemoveOrganizationMemberRequest)(nil), // 24: buf.alpha.registry.v1alpha1.UserCanRemoveOrganizationMemberRequest
+ (*UserCanRemoveOrganizationMemberResponse)(nil), // 25: buf.alpha.registry.v1alpha1.UserCanRemoveOrganizationMemberResponse
+ (*UserCanDeleteOrganizationRequest)(nil), // 26: buf.alpha.registry.v1alpha1.UserCanDeleteOrganizationRequest
+ (*UserCanDeleteOrganizationResponse)(nil), // 27: buf.alpha.registry.v1alpha1.UserCanDeleteOrganizationResponse
+ (*UserCanDeleteRepositoryRequest)(nil), // 28: buf.alpha.registry.v1alpha1.UserCanDeleteRepositoryRequest
+ (*UserCanDeleteRepositoryResponse)(nil), // 29: buf.alpha.registry.v1alpha1.UserCanDeleteRepositoryResponse
+ (*UserCanDeleteTemplateRequest)(nil), // 30: buf.alpha.registry.v1alpha1.UserCanDeleteTemplateRequest
+ (*UserCanDeleteTemplateResponse)(nil), // 31: buf.alpha.registry.v1alpha1.UserCanDeleteTemplateResponse
+ (*UserCanDeletePluginRequest)(nil), // 32: buf.alpha.registry.v1alpha1.UserCanDeletePluginRequest
+ (*UserCanDeletePluginResponse)(nil), // 33: buf.alpha.registry.v1alpha1.UserCanDeletePluginResponse
+ (*UserCanDeleteUserRequest)(nil), // 34: buf.alpha.registry.v1alpha1.UserCanDeleteUserRequest
+ (*UserCanDeleteUserResponse)(nil), // 35: buf.alpha.registry.v1alpha1.UserCanDeleteUserResponse
+ (*UserCanSeeServerAdminPanelRequest)(nil), // 36: buf.alpha.registry.v1alpha1.UserCanSeeServerAdminPanelRequest
+ (*UserCanSeeServerAdminPanelResponse)(nil), // 37: buf.alpha.registry.v1alpha1.UserCanSeeServerAdminPanelResponse
+ (*UserCanManageRepositoryContributorsRequest)(nil), // 38: buf.alpha.registry.v1alpha1.UserCanManageRepositoryContributorsRequest
+ (*UserCanManageRepositoryContributorsResponse)(nil), // 39: buf.alpha.registry.v1alpha1.UserCanManageRepositoryContributorsResponse
+ (*UserCanManagePluginContributorsRequest)(nil), // 40: buf.alpha.registry.v1alpha1.UserCanManagePluginContributorsRequest
+ (*UserCanManagePluginContributorsResponse)(nil), // 41: buf.alpha.registry.v1alpha1.UserCanManagePluginContributorsResponse
+ (*UserCanManageTemplateContributorsRequest)(nil), // 42: buf.alpha.registry.v1alpha1.UserCanManageTemplateContributorsRequest
+ (*UserCanManageTemplateContributorsResponse)(nil), // 43: buf.alpha.registry.v1alpha1.UserCanManageTemplateContributorsResponse
+ (OrganizationRole)(0), // 44: buf.alpha.registry.v1alpha1.OrganizationRole
+ (RepositoryRole)(0), // 45: buf.alpha.registry.v1alpha1.RepositoryRole
+ (PluginRole)(0), // 46: buf.alpha.registry.v1alpha1.PluginRole
+ (TemplateRole)(0), // 47: buf.alpha.registry.v1alpha1.TemplateRole
+}
+var file_buf_alpha_registry_v1alpha1_authz_proto_depIdxs = []int32{
+ 44, // 0: buf.alpha.registry.v1alpha1.UserCanAddOrganizationMemberResponse.authorized_roles:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole
+ 44, // 1: buf.alpha.registry.v1alpha1.UserCanUpdateOrganizationMemberResponse.authorized_roles:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole
+ 44, // 2: buf.alpha.registry.v1alpha1.UserCanRemoveOrganizationMemberResponse.authorized_roles:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole
+ 45, // 3: buf.alpha.registry.v1alpha1.UserCanManageRepositoryContributorsResponse.authorized_roles:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole
+ 46, // 4: buf.alpha.registry.v1alpha1.UserCanManagePluginContributorsResponse.authorized_roles:type_name -> buf.alpha.registry.v1alpha1.PluginRole
+ 47, // 5: buf.alpha.registry.v1alpha1.UserCanManageTemplateContributorsResponse.authorized_roles:type_name -> buf.alpha.registry.v1alpha1.TemplateRole
+ 0, // 6: buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationRepository:input_type -> buf.alpha.registry.v1alpha1.UserCanCreateOrganizationRepositoryRequest
+ 2, // 7: buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeRepositorySettings:input_type -> buf.alpha.registry.v1alpha1.UserCanSeeRepositorySettingsRequest
+ 4, // 8: buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeOrganizationSettings:input_type -> buf.alpha.registry.v1alpha1.UserCanSeeOrganizationSettingsRequest
+ 6, // 9: buf.alpha.registry.v1alpha1.AuthzService.UserCanReadPlugin:input_type -> buf.alpha.registry.v1alpha1.UserCanReadPluginRequest
+ 8, // 10: buf.alpha.registry.v1alpha1.AuthzService.UserCanCreatePluginVersion:input_type -> buf.alpha.registry.v1alpha1.UserCanCreatePluginVersionRequest
+ 10, // 11: buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateTemplateVersion:input_type -> buf.alpha.registry.v1alpha1.UserCanCreateTemplateVersionRequest
+ 12, // 12: buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationPlugin:input_type -> buf.alpha.registry.v1alpha1.UserCanCreateOrganizationPluginRequest
+ 14, // 13: buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationTemplate:input_type -> buf.alpha.registry.v1alpha1.UserCanCreateOrganizationTemplateRequest
+ 16, // 14: buf.alpha.registry.v1alpha1.AuthzService.UserCanSeePluginSettings:input_type -> buf.alpha.registry.v1alpha1.UserCanSeePluginSettingsRequest
+ 18, // 15: buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeTemplateSettings:input_type -> buf.alpha.registry.v1alpha1.UserCanSeeTemplateSettingsRequest
+ 20, // 16: buf.alpha.registry.v1alpha1.AuthzService.UserCanAddOrganizationMember:input_type -> buf.alpha.registry.v1alpha1.UserCanAddOrganizationMemberRequest
+ 22, // 17: buf.alpha.registry.v1alpha1.AuthzService.UserCanUpdateOrganizationMember:input_type -> buf.alpha.registry.v1alpha1.UserCanUpdateOrganizationMemberRequest
+ 24, // 18: buf.alpha.registry.v1alpha1.AuthzService.UserCanRemoveOrganizationMember:input_type -> buf.alpha.registry.v1alpha1.UserCanRemoveOrganizationMemberRequest
+ 26, // 19: buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteOrganization:input_type -> buf.alpha.registry.v1alpha1.UserCanDeleteOrganizationRequest
+ 28, // 20: buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteRepository:input_type -> buf.alpha.registry.v1alpha1.UserCanDeleteRepositoryRequest
+ 30, // 21: buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteTemplate:input_type -> buf.alpha.registry.v1alpha1.UserCanDeleteTemplateRequest
+ 32, // 22: buf.alpha.registry.v1alpha1.AuthzService.UserCanDeletePlugin:input_type -> buf.alpha.registry.v1alpha1.UserCanDeletePluginRequest
+ 34, // 23: buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteUser:input_type -> buf.alpha.registry.v1alpha1.UserCanDeleteUserRequest
+ 36, // 24: buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeServerAdminPanel:input_type -> buf.alpha.registry.v1alpha1.UserCanSeeServerAdminPanelRequest
+ 38, // 25: buf.alpha.registry.v1alpha1.AuthzService.UserCanManageRepositoryContributors:input_type -> buf.alpha.registry.v1alpha1.UserCanManageRepositoryContributorsRequest
+ 40, // 26: buf.alpha.registry.v1alpha1.AuthzService.UserCanManagePluginContributors:input_type -> buf.alpha.registry.v1alpha1.UserCanManagePluginContributorsRequest
+ 42, // 27: buf.alpha.registry.v1alpha1.AuthzService.UserCanManageTemplateContributors:input_type -> buf.alpha.registry.v1alpha1.UserCanManageTemplateContributorsRequest
+ 1, // 28: buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationRepository:output_type -> buf.alpha.registry.v1alpha1.UserCanCreateOrganizationRepositoryResponse
+ 3, // 29: buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeRepositorySettings:output_type -> buf.alpha.registry.v1alpha1.UserCanSeeRepositorySettingsResponse
+ 5, // 30: buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeOrganizationSettings:output_type -> buf.alpha.registry.v1alpha1.UserCanSeeOrganizationSettingsResponse
+ 7, // 31: buf.alpha.registry.v1alpha1.AuthzService.UserCanReadPlugin:output_type -> buf.alpha.registry.v1alpha1.UserCanReadPluginResponse
+ 9, // 32: buf.alpha.registry.v1alpha1.AuthzService.UserCanCreatePluginVersion:output_type -> buf.alpha.registry.v1alpha1.UserCanCreatePluginVersionResponse
+ 11, // 33: buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateTemplateVersion:output_type -> buf.alpha.registry.v1alpha1.UserCanCreateTemplateVersionResponse
+ 13, // 34: buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationPlugin:output_type -> buf.alpha.registry.v1alpha1.UserCanCreateOrganizationPluginResponse
+ 15, // 35: buf.alpha.registry.v1alpha1.AuthzService.UserCanCreateOrganizationTemplate:output_type -> buf.alpha.registry.v1alpha1.UserCanCreateOrganizationTemplateResponse
+ 17, // 36: buf.alpha.registry.v1alpha1.AuthzService.UserCanSeePluginSettings:output_type -> buf.alpha.registry.v1alpha1.UserCanSeePluginSettingsResponse
+ 19, // 37: buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeTemplateSettings:output_type -> buf.alpha.registry.v1alpha1.UserCanSeeTemplateSettingsResponse
+ 21, // 38: buf.alpha.registry.v1alpha1.AuthzService.UserCanAddOrganizationMember:output_type -> buf.alpha.registry.v1alpha1.UserCanAddOrganizationMemberResponse
+ 23, // 39: buf.alpha.registry.v1alpha1.AuthzService.UserCanUpdateOrganizationMember:output_type -> buf.alpha.registry.v1alpha1.UserCanUpdateOrganizationMemberResponse
+ 25, // 40: buf.alpha.registry.v1alpha1.AuthzService.UserCanRemoveOrganizationMember:output_type -> buf.alpha.registry.v1alpha1.UserCanRemoveOrganizationMemberResponse
+ 27, // 41: buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteOrganization:output_type -> buf.alpha.registry.v1alpha1.UserCanDeleteOrganizationResponse
+ 29, // 42: buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteRepository:output_type -> buf.alpha.registry.v1alpha1.UserCanDeleteRepositoryResponse
+ 31, // 43: buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteTemplate:output_type -> buf.alpha.registry.v1alpha1.UserCanDeleteTemplateResponse
+ 33, // 44: buf.alpha.registry.v1alpha1.AuthzService.UserCanDeletePlugin:output_type -> buf.alpha.registry.v1alpha1.UserCanDeletePluginResponse
+ 35, // 45: buf.alpha.registry.v1alpha1.AuthzService.UserCanDeleteUser:output_type -> buf.alpha.registry.v1alpha1.UserCanDeleteUserResponse
+ 37, // 46: buf.alpha.registry.v1alpha1.AuthzService.UserCanSeeServerAdminPanel:output_type -> buf.alpha.registry.v1alpha1.UserCanSeeServerAdminPanelResponse
+ 39, // 47: buf.alpha.registry.v1alpha1.AuthzService.UserCanManageRepositoryContributors:output_type -> buf.alpha.registry.v1alpha1.UserCanManageRepositoryContributorsResponse
+ 41, // 48: buf.alpha.registry.v1alpha1.AuthzService.UserCanManagePluginContributors:output_type -> buf.alpha.registry.v1alpha1.UserCanManagePluginContributorsResponse
+ 43, // 49: buf.alpha.registry.v1alpha1.AuthzService.UserCanManageTemplateContributors:output_type -> buf.alpha.registry.v1alpha1.UserCanManageTemplateContributorsResponse
+ 28, // [28:50] is the sub-list for method output_type
+ 6, // [6:28] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_authz_proto_init() }
+func file_buf_alpha_registry_v1alpha1_authz_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_authz_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_role_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanCreateOrganizationRepositoryRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanCreateOrganizationRepositoryResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanSeeRepositorySettingsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanSeeRepositorySettingsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanSeeOrganizationSettingsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanSeeOrganizationSettingsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanReadPluginRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanReadPluginResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanCreatePluginVersionRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanCreatePluginVersionResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanCreateTemplateVersionRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanCreateTemplateVersionResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanCreateOrganizationPluginRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanCreateOrganizationPluginResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanCreateOrganizationTemplateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanCreateOrganizationTemplateResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanSeePluginSettingsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanSeePluginSettingsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanSeeTemplateSettingsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanSeeTemplateSettingsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanAddOrganizationMemberRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanAddOrganizationMemberResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanUpdateOrganizationMemberRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanUpdateOrganizationMemberResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanRemoveOrganizationMemberRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanRemoveOrganizationMemberResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanDeleteOrganizationRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanDeleteOrganizationResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanDeleteRepositoryRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanDeleteRepositoryResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanDeleteTemplateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanDeleteTemplateResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanDeletePluginRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanDeletePluginResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanDeleteUserRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanDeleteUserResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanSeeServerAdminPanelRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanSeeServerAdminPanelResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanManageRepositoryContributorsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanManageRepositoryContributorsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanManagePluginContributorsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanManagePluginContributorsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanManageTemplateContributorsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserCanManageTemplateContributorsResponse); 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_buf_alpha_registry_v1alpha1_authz_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 44,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_authz_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_authz_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_authz_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_authz_proto = out.File
+ file_buf_alpha_registry_v1alpha1_authz_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_authz_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_authz_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/convert.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/convert.pb.go
new file mode 100644
index 000000000..7b3bba1b8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/convert.pb.go
@@ -0,0 +1,368 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/convert.proto
+
+package registryv1alpha1
+
+import (
+ v1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// The supported formats for the serialized message conversion.
+type ConvertFormat int32
+
+const (
+ ConvertFormat_CONVERT_FORMAT_UNSPECIFIED ConvertFormat = 0
+ ConvertFormat_CONVERT_FORMAT_BIN ConvertFormat = 1
+ ConvertFormat_CONVERT_FORMAT_JSON ConvertFormat = 2
+)
+
+// Enum value maps for ConvertFormat.
+var (
+ ConvertFormat_name = map[int32]string{
+ 0: "CONVERT_FORMAT_UNSPECIFIED",
+ 1: "CONVERT_FORMAT_BIN",
+ 2: "CONVERT_FORMAT_JSON",
+ }
+ ConvertFormat_value = map[string]int32{
+ "CONVERT_FORMAT_UNSPECIFIED": 0,
+ "CONVERT_FORMAT_BIN": 1,
+ "CONVERT_FORMAT_JSON": 2,
+ }
+)
+
+func (x ConvertFormat) Enum() *ConvertFormat {
+ p := new(ConvertFormat)
+ *p = x
+ return p
+}
+
+func (x ConvertFormat) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ConvertFormat) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_convert_proto_enumTypes[0].Descriptor()
+}
+
+func (ConvertFormat) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_convert_proto_enumTypes[0]
+}
+
+func (x ConvertFormat) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ConvertFormat.Descriptor instead.
+func (ConvertFormat) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_convert_proto_rawDescGZIP(), []int{0}
+}
+
+type ConvertRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // type_name is the full type name of the serialized message (like acme.weather.v1.Units).
+ TypeName string `protobuf:"bytes,1,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+ // image is the image source that defines the serialized message.
+ Image *v1.Image `protobuf:"bytes,2,opt,name=image,proto3" json:"image,omitempty"`
+ // payload is the serialized Protobuf message.
+ Payload []byte `protobuf:"bytes,3,opt,name=payload,proto3" json:"payload,omitempty"`
+ // request_format is the format of the payload.
+ RequestFormat ConvertFormat `protobuf:"varint,4,opt,name=request_format,json=requestFormat,proto3,enum=buf.alpha.registry.v1alpha1.ConvertFormat" json:"request_format,omitempty"`
+ // response_format is the desired format of the output result.
+ ResponseFormat ConvertFormat `protobuf:"varint,5,opt,name=response_format,json=responseFormat,proto3,enum=buf.alpha.registry.v1alpha1.ConvertFormat" json:"response_format,omitempty"`
+}
+
+func (x *ConvertRequest) Reset() {
+ *x = ConvertRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_convert_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ConvertRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConvertRequest) ProtoMessage() {}
+
+func (x *ConvertRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_convert_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 ConvertRequest.ProtoReflect.Descriptor instead.
+func (*ConvertRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_convert_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *ConvertRequest) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+func (x *ConvertRequest) GetImage() *v1.Image {
+ if x != nil {
+ return x.Image
+ }
+ return nil
+}
+
+func (x *ConvertRequest) GetPayload() []byte {
+ if x != nil {
+ return x.Payload
+ }
+ return nil
+}
+
+func (x *ConvertRequest) GetRequestFormat() ConvertFormat {
+ if x != nil {
+ return x.RequestFormat
+ }
+ return ConvertFormat_CONVERT_FORMAT_UNSPECIFIED
+}
+
+func (x *ConvertRequest) GetResponseFormat() ConvertFormat {
+ if x != nil {
+ return x.ResponseFormat
+ }
+ return ConvertFormat_CONVERT_FORMAT_UNSPECIFIED
+}
+
+type ConvertResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // payload is the converted serialized message in one of the supported formats.
+ Payload []byte `protobuf:"bytes,1,opt,name=payload,proto3" json:"payload,omitempty"`
+}
+
+func (x *ConvertResponse) Reset() {
+ *x = ConvertResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_convert_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ConvertResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConvertResponse) ProtoMessage() {}
+
+func (x *ConvertResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_convert_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 ConvertResponse.ProtoReflect.Descriptor instead.
+func (*ConvertResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_convert_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ConvertResponse) GetPayload() []byte {
+ if x != nil {
+ return x.Payload
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_convert_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_convert_proto_rawDesc = []byte{
+ 0x0a, 0x29, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x63, 0x6f,
+ 0x6e, 0x76, 0x65, 0x72, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1e, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, 0x61,
+ 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa0, 0x02, 0x0a, 0x0e, 0x43, 0x6f, 0x6e,
+ 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x74,
+ 0x79, 0x70, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+ 0x74, 0x79, 0x70, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61,
+ 0x67, 0x65, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79,
+ 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c,
+ 0x6f, 0x61, 0x64, 0x12, 0x51, 0x0a, 0x0e, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x5f, 0x66,
+ 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2a, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
+ 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0d, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x53, 0x0a, 0x0f, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f,
+ 0x6e, 0x76, 0x65, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0e, 0x72, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x2b, 0x0a, 0x0f, 0x43,
+ 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18,
+ 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52,
+ 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x2a, 0x60, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x76,
+ 0x65, 0x72, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12, 0x1e, 0x0a, 0x1a, 0x43, 0x4f, 0x4e,
+ 0x56, 0x45, 0x52, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50,
+ 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x43, 0x4f, 0x4e,
+ 0x56, 0x45, 0x52, 0x54, 0x5f, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x42, 0x49, 0x4e, 0x10,
+ 0x01, 0x12, 0x17, 0x0a, 0x13, 0x43, 0x4f, 0x4e, 0x56, 0x45, 0x52, 0x54, 0x5f, 0x46, 0x4f, 0x52,
+ 0x4d, 0x41, 0x54, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x32, 0x76, 0x0a, 0x0e, 0x43, 0x6f,
+ 0x6e, 0x76, 0x65, 0x72, 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x64, 0x0a, 0x07,
+ 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x12, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x42, 0x99, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0c, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f,
+ 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c,
+ 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e,
+ 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_convert_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_convert_proto_rawDescData = file_buf_alpha_registry_v1alpha1_convert_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_convert_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_convert_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_convert_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_convert_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_convert_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_convert_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_buf_alpha_registry_v1alpha1_convert_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_buf_alpha_registry_v1alpha1_convert_proto_goTypes = []interface{}{
+ (ConvertFormat)(0), // 0: buf.alpha.registry.v1alpha1.ConvertFormat
+ (*ConvertRequest)(nil), // 1: buf.alpha.registry.v1alpha1.ConvertRequest
+ (*ConvertResponse)(nil), // 2: buf.alpha.registry.v1alpha1.ConvertResponse
+ (*v1.Image)(nil), // 3: buf.alpha.image.v1.Image
+}
+var file_buf_alpha_registry_v1alpha1_convert_proto_depIdxs = []int32{
+ 3, // 0: buf.alpha.registry.v1alpha1.ConvertRequest.image:type_name -> buf.alpha.image.v1.Image
+ 0, // 1: buf.alpha.registry.v1alpha1.ConvertRequest.request_format:type_name -> buf.alpha.registry.v1alpha1.ConvertFormat
+ 0, // 2: buf.alpha.registry.v1alpha1.ConvertRequest.response_format:type_name -> buf.alpha.registry.v1alpha1.ConvertFormat
+ 1, // 3: buf.alpha.registry.v1alpha1.ConvertService.Convert:input_type -> buf.alpha.registry.v1alpha1.ConvertRequest
+ 2, // 4: buf.alpha.registry.v1alpha1.ConvertService.Convert:output_type -> buf.alpha.registry.v1alpha1.ConvertResponse
+ 4, // [4:5] is the sub-list for method output_type
+ 3, // [3:4] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_convert_proto_init() }
+func file_buf_alpha_registry_v1alpha1_convert_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_convert_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_convert_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConvertRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_convert_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConvertResponse); 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_buf_alpha_registry_v1alpha1_convert_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_convert_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_convert_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_convert_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_convert_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_convert_proto = out.File
+ file_buf_alpha_registry_v1alpha1_convert_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_convert_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_convert_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/display.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/display.pb.go
new file mode 100644
index 000000000..d7a5d3903
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/display.pb.go
@@ -0,0 +1,2022 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/display.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type DisplayOrganizationElementsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to check
+ // which elements should be displayed.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+}
+
+func (x *DisplayOrganizationElementsRequest) Reset() {
+ *x = DisplayOrganizationElementsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayOrganizationElementsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayOrganizationElementsRequest) ProtoMessage() {}
+
+func (x *DisplayOrganizationElementsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayOrganizationElementsRequest.ProtoReflect.Descriptor instead.
+func (*DisplayOrganizationElementsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *DisplayOrganizationElementsRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+type DisplayOrganizationElementsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Display create organization repository element if true.
+ CreateRepository bool `protobuf:"varint,1,opt,name=create_repository,json=createRepository,proto3" json:"create_repository,omitempty"`
+ // Display create organization plugin element if true.
+ //
+ // Deprecated: Do not use.
+ CreatePlugin bool `protobuf:"varint,2,opt,name=create_plugin,json=createPlugin,proto3" json:"create_plugin,omitempty"`
+ // Display create organization template element if true.
+ //
+ // Deprecated: Do not use.
+ CreateTemplate bool `protobuf:"varint,3,opt,name=create_template,json=createTemplate,proto3" json:"create_template,omitempty"`
+ // Display organization settings element if true.
+ Settings bool `protobuf:"varint,4,opt,name=settings,proto3" json:"settings,omitempty"`
+ // Display update organization settings element if true.
+ UpdateSettings bool `protobuf:"varint,5,opt,name=update_settings,json=updateSettings,proto3" json:"update_settings,omitempty"`
+ // Display delete organization element if true.
+ Delete bool `protobuf:"varint,6,opt,name=delete,proto3" json:"delete,omitempty"`
+}
+
+func (x *DisplayOrganizationElementsResponse) Reset() {
+ *x = DisplayOrganizationElementsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayOrganizationElementsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayOrganizationElementsResponse) ProtoMessage() {}
+
+func (x *DisplayOrganizationElementsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayOrganizationElementsResponse.ProtoReflect.Descriptor instead.
+func (*DisplayOrganizationElementsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *DisplayOrganizationElementsResponse) GetCreateRepository() bool {
+ if x != nil {
+ return x.CreateRepository
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+func (x *DisplayOrganizationElementsResponse) GetCreatePlugin() bool {
+ if x != nil {
+ return x.CreatePlugin
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+func (x *DisplayOrganizationElementsResponse) GetCreateTemplate() bool {
+ if x != nil {
+ return x.CreateTemplate
+ }
+ return false
+}
+
+func (x *DisplayOrganizationElementsResponse) GetSettings() bool {
+ if x != nil {
+ return x.Settings
+ }
+ return false
+}
+
+func (x *DisplayOrganizationElementsResponse) GetUpdateSettings() bool {
+ if x != nil {
+ return x.UpdateSettings
+ }
+ return false
+}
+
+func (x *DisplayOrganizationElementsResponse) GetDelete() bool {
+ if x != nil {
+ return x.Delete
+ }
+ return false
+}
+
+type DisplayRepositoryElementsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository for which to check
+ // which elements should be displayed.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+}
+
+func (x *DisplayRepositoryElementsRequest) Reset() {
+ *x = DisplayRepositoryElementsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayRepositoryElementsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayRepositoryElementsRequest) ProtoMessage() {}
+
+func (x *DisplayRepositoryElementsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayRepositoryElementsRequest.ProtoReflect.Descriptor instead.
+func (*DisplayRepositoryElementsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DisplayRepositoryElementsRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+type DisplayRepositoryElementsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Display repository settings element if true.
+ Settings bool `protobuf:"varint,1,opt,name=settings,proto3" json:"settings,omitempty"`
+ // Display delete repository element if true.
+ Delete bool `protobuf:"varint,2,opt,name=delete,proto3" json:"delete,omitempty"`
+ // Display write repository element if true.
+ Write bool `protobuf:"varint,3,opt,name=write,proto3" json:"write,omitempty"`
+}
+
+func (x *DisplayRepositoryElementsResponse) Reset() {
+ *x = DisplayRepositoryElementsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayRepositoryElementsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayRepositoryElementsResponse) ProtoMessage() {}
+
+func (x *DisplayRepositoryElementsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayRepositoryElementsResponse.ProtoReflect.Descriptor instead.
+func (*DisplayRepositoryElementsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *DisplayRepositoryElementsResponse) GetSettings() bool {
+ if x != nil {
+ return x.Settings
+ }
+ return false
+}
+
+func (x *DisplayRepositoryElementsResponse) GetDelete() bool {
+ if x != nil {
+ return x.Delete
+ }
+ return false
+}
+
+func (x *DisplayRepositoryElementsResponse) GetWrite() bool {
+ if x != nil {
+ return x.Write
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type DisplayPluginElementsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the plugin for which to check
+ // which elements should be displayed.
+ PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"`
+}
+
+func (x *DisplayPluginElementsRequest) Reset() {
+ *x = DisplayPluginElementsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayPluginElementsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayPluginElementsRequest) ProtoMessage() {}
+
+func (x *DisplayPluginElementsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayPluginElementsRequest.ProtoReflect.Descriptor instead.
+func (*DisplayPluginElementsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *DisplayPluginElementsRequest) GetPluginId() string {
+ if x != nil {
+ return x.PluginId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type DisplayPluginElementsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Display create plugin version element if true.
+ CreateVersion bool `protobuf:"varint,1,opt,name=create_version,json=createVersion,proto3" json:"create_version,omitempty"`
+ // Display plugin settings element if true.
+ Settings bool `protobuf:"varint,2,opt,name=settings,proto3" json:"settings,omitempty"`
+ // Display delete plugin element if true.
+ Delete bool `protobuf:"varint,3,opt,name=delete,proto3" json:"delete,omitempty"`
+}
+
+func (x *DisplayPluginElementsResponse) Reset() {
+ *x = DisplayPluginElementsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayPluginElementsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayPluginElementsResponse) ProtoMessage() {}
+
+func (x *DisplayPluginElementsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayPluginElementsResponse.ProtoReflect.Descriptor instead.
+func (*DisplayPluginElementsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *DisplayPluginElementsResponse) GetCreateVersion() bool {
+ if x != nil {
+ return x.CreateVersion
+ }
+ return false
+}
+
+func (x *DisplayPluginElementsResponse) GetSettings() bool {
+ if x != nil {
+ return x.Settings
+ }
+ return false
+}
+
+func (x *DisplayPluginElementsResponse) GetDelete() bool {
+ if x != nil {
+ return x.Delete
+ }
+ return false
+}
+
+// Deprecated: Do not use.
+type DisplayTemplateElementsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the template for which to check
+ // which elements should be displayed.
+ TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
+}
+
+func (x *DisplayTemplateElementsRequest) Reset() {
+ *x = DisplayTemplateElementsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayTemplateElementsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayTemplateElementsRequest) ProtoMessage() {}
+
+func (x *DisplayTemplateElementsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayTemplateElementsRequest.ProtoReflect.Descriptor instead.
+func (*DisplayTemplateElementsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *DisplayTemplateElementsRequest) GetTemplateId() string {
+ if x != nil {
+ return x.TemplateId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type DisplayTemplateElementsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Display create template version element if true.
+ CreateVersion bool `protobuf:"varint,1,opt,name=create_version,json=createVersion,proto3" json:"create_version,omitempty"`
+ // Display template settings element if true.
+ Settings bool `protobuf:"varint,2,opt,name=settings,proto3" json:"settings,omitempty"`
+ // Display delete template element if true.
+ Delete bool `protobuf:"varint,3,opt,name=delete,proto3" json:"delete,omitempty"`
+}
+
+func (x *DisplayTemplateElementsResponse) Reset() {
+ *x = DisplayTemplateElementsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayTemplateElementsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayTemplateElementsResponse) ProtoMessage() {}
+
+func (x *DisplayTemplateElementsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayTemplateElementsResponse.ProtoReflect.Descriptor instead.
+func (*DisplayTemplateElementsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *DisplayTemplateElementsResponse) GetCreateVersion() bool {
+ if x != nil {
+ return x.CreateVersion
+ }
+ return false
+}
+
+func (x *DisplayTemplateElementsResponse) GetSettings() bool {
+ if x != nil {
+ return x.Settings
+ }
+ return false
+}
+
+func (x *DisplayTemplateElementsResponse) GetDelete() bool {
+ if x != nil {
+ return x.Delete
+ }
+ return false
+}
+
+type DisplayUserElementsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DisplayUserElementsRequest) Reset() {
+ *x = DisplayUserElementsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayUserElementsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayUserElementsRequest) ProtoMessage() {}
+
+func (x *DisplayUserElementsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayUserElementsRequest.ProtoReflect.Descriptor instead.
+func (*DisplayUserElementsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{8}
+}
+
+type DisplayUserElementsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Display delete user element if true.
+ Delete bool `protobuf:"varint,1,opt,name=delete,proto3" json:"delete,omitempty"`
+}
+
+func (x *DisplayUserElementsResponse) Reset() {
+ *x = DisplayUserElementsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayUserElementsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayUserElementsResponse) ProtoMessage() {}
+
+func (x *DisplayUserElementsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayUserElementsResponse.ProtoReflect.Descriptor instead.
+func (*DisplayUserElementsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *DisplayUserElementsResponse) GetDelete() bool {
+ if x != nil {
+ return x.Delete
+ }
+ return false
+}
+
+type DisplayServerElementsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DisplayServerElementsRequest) Reset() {
+ *x = DisplayServerElementsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayServerElementsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayServerElementsRequest) ProtoMessage() {}
+
+func (x *DisplayServerElementsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayServerElementsRequest.ProtoReflect.Descriptor instead.
+func (*DisplayServerElementsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{10}
+}
+
+type DisplayServerElementsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Display server admin panel element if true.
+ AdminPanel bool `protobuf:"varint,1,opt,name=admin_panel,json=adminPanel,proto3" json:"admin_panel,omitempty"`
+}
+
+func (x *DisplayServerElementsResponse) Reset() {
+ *x = DisplayServerElementsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DisplayServerElementsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DisplayServerElementsResponse) ProtoMessage() {}
+
+func (x *DisplayServerElementsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 DisplayServerElementsResponse.ProtoReflect.Descriptor instead.
+func (*DisplayServerElementsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *DisplayServerElementsResponse) GetAdminPanel() bool {
+ if x != nil {
+ return x.AdminPanel
+ }
+ return false
+}
+
+type ListManageableRepositoryRolesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository for which to check
+ // which roles should be displayed as manageable.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+}
+
+func (x *ListManageableRepositoryRolesRequest) Reset() {
+ *x = ListManageableRepositoryRolesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageableRepositoryRolesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageableRepositoryRolesRequest) ProtoMessage() {}
+
+func (x *ListManageableRepositoryRolesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageableRepositoryRolesRequest.ProtoReflect.Descriptor instead.
+func (*ListManageableRepositoryRolesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *ListManageableRepositoryRolesRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+type ListManageableRepositoryRolesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that should be displayed
+ // to the user as manageable.
+ Roles []RepositoryRole `protobuf:"varint,1,rep,packed,name=roles,proto3,enum=buf.alpha.registry.v1alpha1.RepositoryRole" json:"roles,omitempty"`
+}
+
+func (x *ListManageableRepositoryRolesResponse) Reset() {
+ *x = ListManageableRepositoryRolesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageableRepositoryRolesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageableRepositoryRolesResponse) ProtoMessage() {}
+
+func (x *ListManageableRepositoryRolesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageableRepositoryRolesResponse.ProtoReflect.Descriptor instead.
+func (*ListManageableRepositoryRolesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *ListManageableRepositoryRolesResponse) GetRoles() []RepositoryRole {
+ if x != nil {
+ return x.Roles
+ }
+ return nil
+}
+
+type ListManageableUserRepositoryRolesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository for which to check
+ // which roles should be displayed as manageable.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+ // The ID of the target user for which to check
+ // which roles are manageable.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+}
+
+func (x *ListManageableUserRepositoryRolesRequest) Reset() {
+ *x = ListManageableUserRepositoryRolesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageableUserRepositoryRolesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageableUserRepositoryRolesRequest) ProtoMessage() {}
+
+func (x *ListManageableUserRepositoryRolesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageableUserRepositoryRolesRequest.ProtoReflect.Descriptor instead.
+func (*ListManageableUserRepositoryRolesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *ListManageableUserRepositoryRolesRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+func (x *ListManageableUserRepositoryRolesRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+type ListManageableUserRepositoryRolesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that should be displayed
+ // to the user as manageable.
+ Roles []RepositoryRole `protobuf:"varint,1,rep,packed,name=roles,proto3,enum=buf.alpha.registry.v1alpha1.RepositoryRole" json:"roles,omitempty"`
+}
+
+func (x *ListManageableUserRepositoryRolesResponse) Reset() {
+ *x = ListManageableUserRepositoryRolesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageableUserRepositoryRolesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageableUserRepositoryRolesResponse) ProtoMessage() {}
+
+func (x *ListManageableUserRepositoryRolesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageableUserRepositoryRolesResponse.ProtoReflect.Descriptor instead.
+func (*ListManageableUserRepositoryRolesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *ListManageableUserRepositoryRolesResponse) GetRoles() []RepositoryRole {
+ if x != nil {
+ return x.Roles
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+type ListManageablePluginRolesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the plugin for which to check
+ // which roles should be displayed as manageable.
+ PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"`
+}
+
+func (x *ListManageablePluginRolesRequest) Reset() {
+ *x = ListManageablePluginRolesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageablePluginRolesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageablePluginRolesRequest) ProtoMessage() {}
+
+func (x *ListManageablePluginRolesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageablePluginRolesRequest.ProtoReflect.Descriptor instead.
+func (*ListManageablePluginRolesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *ListManageablePluginRolesRequest) GetPluginId() string {
+ if x != nil {
+ return x.PluginId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type ListManageablePluginRolesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that should be displayed
+ // to the user as manageable.
+ Roles []PluginRole `protobuf:"varint,1,rep,packed,name=roles,proto3,enum=buf.alpha.registry.v1alpha1.PluginRole" json:"roles,omitempty"`
+}
+
+func (x *ListManageablePluginRolesResponse) Reset() {
+ *x = ListManageablePluginRolesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageablePluginRolesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageablePluginRolesResponse) ProtoMessage() {}
+
+func (x *ListManageablePluginRolesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageablePluginRolesResponse.ProtoReflect.Descriptor instead.
+func (*ListManageablePluginRolesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *ListManageablePluginRolesResponse) GetRoles() []PluginRole {
+ if x != nil {
+ return x.Roles
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+type ListManageableUserPluginRolesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the plugin for which to check
+ // which roles should be displayed as manageable.
+ PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"`
+ // The ID of the target user for which to check
+ // which roles are manageable.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+}
+
+func (x *ListManageableUserPluginRolesRequest) Reset() {
+ *x = ListManageableUserPluginRolesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageableUserPluginRolesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageableUserPluginRolesRequest) ProtoMessage() {}
+
+func (x *ListManageableUserPluginRolesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageableUserPluginRolesRequest.ProtoReflect.Descriptor instead.
+func (*ListManageableUserPluginRolesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *ListManageableUserPluginRolesRequest) GetPluginId() string {
+ if x != nil {
+ return x.PluginId
+ }
+ return ""
+}
+
+func (x *ListManageableUserPluginRolesRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type ListManageableUserPluginRolesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that should be displayed
+ // to the user as manageable.
+ Roles []PluginRole `protobuf:"varint,1,rep,packed,name=roles,proto3,enum=buf.alpha.registry.v1alpha1.PluginRole" json:"roles,omitempty"`
+}
+
+func (x *ListManageableUserPluginRolesResponse) Reset() {
+ *x = ListManageableUserPluginRolesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageableUserPluginRolesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageableUserPluginRolesResponse) ProtoMessage() {}
+
+func (x *ListManageableUserPluginRolesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageableUserPluginRolesResponse.ProtoReflect.Descriptor instead.
+func (*ListManageableUserPluginRolesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *ListManageableUserPluginRolesResponse) GetRoles() []PluginRole {
+ if x != nil {
+ return x.Roles
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+type ListManageableTemplateRolesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the template for which to check
+ // which roles should be displayed as manageable.
+ TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
+}
+
+func (x *ListManageableTemplateRolesRequest) Reset() {
+ *x = ListManageableTemplateRolesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageableTemplateRolesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageableTemplateRolesRequest) ProtoMessage() {}
+
+func (x *ListManageableTemplateRolesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageableTemplateRolesRequest.ProtoReflect.Descriptor instead.
+func (*ListManageableTemplateRolesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *ListManageableTemplateRolesRequest) GetTemplateId() string {
+ if x != nil {
+ return x.TemplateId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type ListManageableTemplateRolesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that should be displayed
+ // to the user as manageable.
+ Roles []TemplateRole `protobuf:"varint,1,rep,packed,name=roles,proto3,enum=buf.alpha.registry.v1alpha1.TemplateRole" json:"roles,omitempty"`
+}
+
+func (x *ListManageableTemplateRolesResponse) Reset() {
+ *x = ListManageableTemplateRolesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageableTemplateRolesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageableTemplateRolesResponse) ProtoMessage() {}
+
+func (x *ListManageableTemplateRolesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageableTemplateRolesResponse.ProtoReflect.Descriptor instead.
+func (*ListManageableTemplateRolesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *ListManageableTemplateRolesResponse) GetRoles() []TemplateRole {
+ if x != nil {
+ return x.Roles
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+type ListManageableUserTemplateRolesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the template for which to check
+ // which roles should be displayed as manageable.
+ TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
+ // The ID of the target user for which to check
+ // which roles are manageable.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+}
+
+func (x *ListManageableUserTemplateRolesRequest) Reset() {
+ *x = ListManageableUserTemplateRolesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageableUserTemplateRolesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageableUserTemplateRolesRequest) ProtoMessage() {}
+
+func (x *ListManageableUserTemplateRolesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageableUserTemplateRolesRequest.ProtoReflect.Descriptor instead.
+func (*ListManageableUserTemplateRolesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *ListManageableUserTemplateRolesRequest) GetTemplateId() string {
+ if x != nil {
+ return x.TemplateId
+ }
+ return ""
+}
+
+func (x *ListManageableUserTemplateRolesRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type ListManageableUserTemplateRolesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of roles that should be displayed
+ // to the user as manageable.
+ Roles []TemplateRole `protobuf:"varint,1,rep,packed,name=roles,proto3,enum=buf.alpha.registry.v1alpha1.TemplateRole" json:"roles,omitempty"`
+}
+
+func (x *ListManageableUserTemplateRolesResponse) Reset() {
+ *x = ListManageableUserTemplateRolesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListManageableUserTemplateRolesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListManageableUserTemplateRolesResponse) ProtoMessage() {}
+
+func (x *ListManageableUserTemplateRolesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_display_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 ListManageableUserTemplateRolesResponse.ProtoReflect.Descriptor instead.
+func (*ListManageableUserTemplateRolesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *ListManageableUserTemplateRolesResponse) GetRoles() []TemplateRole {
+ if x != nil {
+ return x.Roles
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_display_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_display_proto_rawDesc = []byte{
+ 0x0a, 0x29, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x69,
+ 0x73, 0x70, 0x6c, 0x61, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x4d, 0x0a, 0x22, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69,
+ 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22,
+ 0x85, 0x02, 0x0a, 0x23, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x63, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x5f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x10, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x12, 0x27, 0x0a, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x70,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52,
+ 0x0c, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x2b, 0x0a,
+ 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65,
+ 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65,
+ 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x5f, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x0e, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12,
+ 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22, 0x47, 0x0a, 0x20, 0x44, 0x69, 0x73, 0x70, 0x6c,
+ 0x61, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6c, 0x65, 0x6d,
+ 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64,
+ 0x22, 0x6d, 0x0a, 0x21, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
+ 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
+ 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x77, 0x72, 0x69,
+ 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x77, 0x72, 0x69, 0x74, 0x65, 0x22,
+ 0x3f, 0x0a, 0x1c, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01,
+ 0x22, 0x7e, 0x0a, 0x1d, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x02, 0x18, 0x01,
+ 0x22, 0x45, 0x0a, 0x1e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+ 0x65, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x80, 0x01, 0x0a, 0x1f, 0x44, 0x69, 0x73, 0x70,
+ 0x6c, 0x61, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x63,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0d, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16,
+ 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06,
+ 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x69,
+ 0x73, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x35, 0x0a, 0x1b, 0x44, 0x69, 0x73, 0x70,
+ 0x6c, 0x61, 0x79, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x22,
+ 0x1e, 0x0a, 0x1c, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
+ 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22,
+ 0x40, 0x0a, 0x1d, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
+ 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x1f, 0x0a, 0x0b, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x5f, 0x70, 0x61, 0x6e, 0x65, 0x6c, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x61, 0x64, 0x6d, 0x69, 0x6e, 0x50, 0x61, 0x6e, 0x65,
+ 0x6c, 0x22, 0x4b, 0x0a, 0x24, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61,
+ 0x62, 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c,
+ 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22, 0x6a,
+ 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52,
+ 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x68, 0x0a, 0x28, 0x4c, 0x69,
+ 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75,
+ 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73,
+ 0x65, 0x72, 0x49, 0x64, 0x22, 0x6e, 0x0a, 0x29, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x41, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e,
+ 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72,
+ 0x6f, 0x6c, 0x65, 0x73, 0x22, 0x43, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x66, 0x0a, 0x21, 0x4c, 0x69, 0x73,
+ 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d,
+ 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x27, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x3a, 0x02, 0x18,
+ 0x01, 0x22, 0x60, 0x0a, 0x24, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61,
+ 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c,
+ 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69,
+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x3a,
+ 0x02, 0x18, 0x01, 0x22, 0x6a, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67,
+ 0x65, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
+ 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x05,
+ 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22,
+ 0x49, 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c,
+ 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+ 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x6a, 0x0a, 0x23, 0x4c, 0x69,
+ 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e,
+ 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c,
+ 0x65, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x66, 0x0a, 0x26, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61,
+ 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49,
+ 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x6e,
+ 0x0a, 0x27, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65,
+ 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x72, 0x6f, 0x6c,
+ 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52,
+ 0x6f, 0x6c, 0x65, 0x52, 0x05, 0x72, 0x6f, 0x6c, 0x65, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x32, 0xa8,
+ 0x0f, 0x0a, 0x0e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
+ 0x65, 0x12, 0xa0, 0x01, 0x0a, 0x1b, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x72, 0x67,
+ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74,
+ 0x73, 0x12, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x40, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9a, 0x01, 0x0a, 0x19, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e,
+ 0x74, 0x73, 0x12, 0x3d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x93, 0x01, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x39, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61,
+ 0x79, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x99, 0x01, 0x0a, 0x17, 0x44, 0x69, 0x73, 0x70,
+ 0x6c, 0x61, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65,
+ 0x6e, 0x74, 0x73, 0x12, 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+ 0x65, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44,
+ 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x45, 0x6c,
+ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03,
+ 0x88, 0x02, 0x01, 0x12, 0x88, 0x01, 0x0a, 0x13, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x55,
+ 0x73, 0x65, 0x72, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x37, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61,
+ 0x79, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x55, 0x73, 0x65, 0x72, 0x45, 0x6c,
+ 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8e,
+ 0x01, 0x0a, 0x15, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
+ 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x12, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x53, 0x65,
+ 0x72, 0x76, 0x65, 0x72, 0x45, 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45,
+ 0x6c, 0x65, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0xa6, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62,
+ 0x6c, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65,
+ 0x73, 0x12, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c,
+ 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xb2, 0x01, 0x0a, 0x21, 0x4c, 0x69, 0x73,
+ 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x45,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x46, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62,
+ 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9f, 0x01,
+ 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61,
+ 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f,
+ 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e,
+ 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c,
+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12,
+ 0xab, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62,
+ 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65,
+ 0x73, 0x12, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73,
+ 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c,
+ 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0xa5, 0x01,
+ 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65,
+ 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x3f, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x40,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0xb1, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61,
+ 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x12, 0x43, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4d, 0x61, 0x6e, 0x61,
+ 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x44,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x4d, 0x61, 0x6e, 0x61, 0x67, 0x65, 0x61, 0x62, 0x6c, 0x65, 0x55, 0x73, 0x65, 0x72, 0x54,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x42, 0x99, 0x02, 0x0a, 0x1f, 0x63, 0x6f,
+ 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0c, 0x44,
+ 0x69, 0x73, 0x70, 0x6c, 0x61, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69,
+ 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67,
+ 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02,
+ 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42,
+ 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66,
+ 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c,
+ 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_display_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_display_proto_rawDescData = file_buf_alpha_registry_v1alpha1_display_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_display_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_display_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_display_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_display_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_display_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_display_proto_msgTypes = make([]protoimpl.MessageInfo, 24)
+var file_buf_alpha_registry_v1alpha1_display_proto_goTypes = []interface{}{
+ (*DisplayOrganizationElementsRequest)(nil), // 0: buf.alpha.registry.v1alpha1.DisplayOrganizationElementsRequest
+ (*DisplayOrganizationElementsResponse)(nil), // 1: buf.alpha.registry.v1alpha1.DisplayOrganizationElementsResponse
+ (*DisplayRepositoryElementsRequest)(nil), // 2: buf.alpha.registry.v1alpha1.DisplayRepositoryElementsRequest
+ (*DisplayRepositoryElementsResponse)(nil), // 3: buf.alpha.registry.v1alpha1.DisplayRepositoryElementsResponse
+ (*DisplayPluginElementsRequest)(nil), // 4: buf.alpha.registry.v1alpha1.DisplayPluginElementsRequest
+ (*DisplayPluginElementsResponse)(nil), // 5: buf.alpha.registry.v1alpha1.DisplayPluginElementsResponse
+ (*DisplayTemplateElementsRequest)(nil), // 6: buf.alpha.registry.v1alpha1.DisplayTemplateElementsRequest
+ (*DisplayTemplateElementsResponse)(nil), // 7: buf.alpha.registry.v1alpha1.DisplayTemplateElementsResponse
+ (*DisplayUserElementsRequest)(nil), // 8: buf.alpha.registry.v1alpha1.DisplayUserElementsRequest
+ (*DisplayUserElementsResponse)(nil), // 9: buf.alpha.registry.v1alpha1.DisplayUserElementsResponse
+ (*DisplayServerElementsRequest)(nil), // 10: buf.alpha.registry.v1alpha1.DisplayServerElementsRequest
+ (*DisplayServerElementsResponse)(nil), // 11: buf.alpha.registry.v1alpha1.DisplayServerElementsResponse
+ (*ListManageableRepositoryRolesRequest)(nil), // 12: buf.alpha.registry.v1alpha1.ListManageableRepositoryRolesRequest
+ (*ListManageableRepositoryRolesResponse)(nil), // 13: buf.alpha.registry.v1alpha1.ListManageableRepositoryRolesResponse
+ (*ListManageableUserRepositoryRolesRequest)(nil), // 14: buf.alpha.registry.v1alpha1.ListManageableUserRepositoryRolesRequest
+ (*ListManageableUserRepositoryRolesResponse)(nil), // 15: buf.alpha.registry.v1alpha1.ListManageableUserRepositoryRolesResponse
+ (*ListManageablePluginRolesRequest)(nil), // 16: buf.alpha.registry.v1alpha1.ListManageablePluginRolesRequest
+ (*ListManageablePluginRolesResponse)(nil), // 17: buf.alpha.registry.v1alpha1.ListManageablePluginRolesResponse
+ (*ListManageableUserPluginRolesRequest)(nil), // 18: buf.alpha.registry.v1alpha1.ListManageableUserPluginRolesRequest
+ (*ListManageableUserPluginRolesResponse)(nil), // 19: buf.alpha.registry.v1alpha1.ListManageableUserPluginRolesResponse
+ (*ListManageableTemplateRolesRequest)(nil), // 20: buf.alpha.registry.v1alpha1.ListManageableTemplateRolesRequest
+ (*ListManageableTemplateRolesResponse)(nil), // 21: buf.alpha.registry.v1alpha1.ListManageableTemplateRolesResponse
+ (*ListManageableUserTemplateRolesRequest)(nil), // 22: buf.alpha.registry.v1alpha1.ListManageableUserTemplateRolesRequest
+ (*ListManageableUserTemplateRolesResponse)(nil), // 23: buf.alpha.registry.v1alpha1.ListManageableUserTemplateRolesResponse
+ (RepositoryRole)(0), // 24: buf.alpha.registry.v1alpha1.RepositoryRole
+ (PluginRole)(0), // 25: buf.alpha.registry.v1alpha1.PluginRole
+ (TemplateRole)(0), // 26: buf.alpha.registry.v1alpha1.TemplateRole
+}
+var file_buf_alpha_registry_v1alpha1_display_proto_depIdxs = []int32{
+ 24, // 0: buf.alpha.registry.v1alpha1.ListManageableRepositoryRolesResponse.roles:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole
+ 24, // 1: buf.alpha.registry.v1alpha1.ListManageableUserRepositoryRolesResponse.roles:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole
+ 25, // 2: buf.alpha.registry.v1alpha1.ListManageablePluginRolesResponse.roles:type_name -> buf.alpha.registry.v1alpha1.PluginRole
+ 25, // 3: buf.alpha.registry.v1alpha1.ListManageableUserPluginRolesResponse.roles:type_name -> buf.alpha.registry.v1alpha1.PluginRole
+ 26, // 4: buf.alpha.registry.v1alpha1.ListManageableTemplateRolesResponse.roles:type_name -> buf.alpha.registry.v1alpha1.TemplateRole
+ 26, // 5: buf.alpha.registry.v1alpha1.ListManageableUserTemplateRolesResponse.roles:type_name -> buf.alpha.registry.v1alpha1.TemplateRole
+ 0, // 6: buf.alpha.registry.v1alpha1.DisplayService.DisplayOrganizationElements:input_type -> buf.alpha.registry.v1alpha1.DisplayOrganizationElementsRequest
+ 2, // 7: buf.alpha.registry.v1alpha1.DisplayService.DisplayRepositoryElements:input_type -> buf.alpha.registry.v1alpha1.DisplayRepositoryElementsRequest
+ 4, // 8: buf.alpha.registry.v1alpha1.DisplayService.DisplayPluginElements:input_type -> buf.alpha.registry.v1alpha1.DisplayPluginElementsRequest
+ 6, // 9: buf.alpha.registry.v1alpha1.DisplayService.DisplayTemplateElements:input_type -> buf.alpha.registry.v1alpha1.DisplayTemplateElementsRequest
+ 8, // 10: buf.alpha.registry.v1alpha1.DisplayService.DisplayUserElements:input_type -> buf.alpha.registry.v1alpha1.DisplayUserElementsRequest
+ 10, // 11: buf.alpha.registry.v1alpha1.DisplayService.DisplayServerElements:input_type -> buf.alpha.registry.v1alpha1.DisplayServerElementsRequest
+ 12, // 12: buf.alpha.registry.v1alpha1.DisplayService.ListManageableRepositoryRoles:input_type -> buf.alpha.registry.v1alpha1.ListManageableRepositoryRolesRequest
+ 14, // 13: buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserRepositoryRoles:input_type -> buf.alpha.registry.v1alpha1.ListManageableUserRepositoryRolesRequest
+ 16, // 14: buf.alpha.registry.v1alpha1.DisplayService.ListManageablePluginRoles:input_type -> buf.alpha.registry.v1alpha1.ListManageablePluginRolesRequest
+ 18, // 15: buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserPluginRoles:input_type -> buf.alpha.registry.v1alpha1.ListManageableUserPluginRolesRequest
+ 20, // 16: buf.alpha.registry.v1alpha1.DisplayService.ListManageableTemplateRoles:input_type -> buf.alpha.registry.v1alpha1.ListManageableTemplateRolesRequest
+ 22, // 17: buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserTemplateRoles:input_type -> buf.alpha.registry.v1alpha1.ListManageableUserTemplateRolesRequest
+ 1, // 18: buf.alpha.registry.v1alpha1.DisplayService.DisplayOrganizationElements:output_type -> buf.alpha.registry.v1alpha1.DisplayOrganizationElementsResponse
+ 3, // 19: buf.alpha.registry.v1alpha1.DisplayService.DisplayRepositoryElements:output_type -> buf.alpha.registry.v1alpha1.DisplayRepositoryElementsResponse
+ 5, // 20: buf.alpha.registry.v1alpha1.DisplayService.DisplayPluginElements:output_type -> buf.alpha.registry.v1alpha1.DisplayPluginElementsResponse
+ 7, // 21: buf.alpha.registry.v1alpha1.DisplayService.DisplayTemplateElements:output_type -> buf.alpha.registry.v1alpha1.DisplayTemplateElementsResponse
+ 9, // 22: buf.alpha.registry.v1alpha1.DisplayService.DisplayUserElements:output_type -> buf.alpha.registry.v1alpha1.DisplayUserElementsResponse
+ 11, // 23: buf.alpha.registry.v1alpha1.DisplayService.DisplayServerElements:output_type -> buf.alpha.registry.v1alpha1.DisplayServerElementsResponse
+ 13, // 24: buf.alpha.registry.v1alpha1.DisplayService.ListManageableRepositoryRoles:output_type -> buf.alpha.registry.v1alpha1.ListManageableRepositoryRolesResponse
+ 15, // 25: buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserRepositoryRoles:output_type -> buf.alpha.registry.v1alpha1.ListManageableUserRepositoryRolesResponse
+ 17, // 26: buf.alpha.registry.v1alpha1.DisplayService.ListManageablePluginRoles:output_type -> buf.alpha.registry.v1alpha1.ListManageablePluginRolesResponse
+ 19, // 27: buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserPluginRoles:output_type -> buf.alpha.registry.v1alpha1.ListManageableUserPluginRolesResponse
+ 21, // 28: buf.alpha.registry.v1alpha1.DisplayService.ListManageableTemplateRoles:output_type -> buf.alpha.registry.v1alpha1.ListManageableTemplateRolesResponse
+ 23, // 29: buf.alpha.registry.v1alpha1.DisplayService.ListManageableUserTemplateRoles:output_type -> buf.alpha.registry.v1alpha1.ListManageableUserTemplateRolesResponse
+ 18, // [18:30] is the sub-list for method output_type
+ 6, // [6:18] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_display_proto_init() }
+func file_buf_alpha_registry_v1alpha1_display_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_display_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_role_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayOrganizationElementsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayOrganizationElementsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayRepositoryElementsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayRepositoryElementsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayPluginElementsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayPluginElementsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayTemplateElementsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayTemplateElementsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayUserElementsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayUserElementsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayServerElementsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DisplayServerElementsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageableRepositoryRolesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageableRepositoryRolesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageableUserRepositoryRolesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageableUserRepositoryRolesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageablePluginRolesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageablePluginRolesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageableUserPluginRolesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageableUserPluginRolesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageableTemplateRolesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageableTemplateRolesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageableUserTemplateRolesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_display_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListManageableUserTemplateRolesResponse); 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_buf_alpha_registry_v1alpha1_display_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 24,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_display_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_display_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_display_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_display_proto = out.File
+ file_buf_alpha_registry_v1alpha1_display_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_display_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_display_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/doc.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/doc.pb.go
new file mode 100644
index 000000000..959def9be
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/doc.pb.go
@@ -0,0 +1,3452 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/doc.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// GetSourceDirectoryInfoRequest takes an owner, repository, and reference.
+type GetSourceDirectoryInfoRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+}
+
+func (x *GetSourceDirectoryInfoRequest) Reset() {
+ *x = GetSourceDirectoryInfoRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetSourceDirectoryInfoRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSourceDirectoryInfoRequest) ProtoMessage() {}
+
+func (x *GetSourceDirectoryInfoRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 GetSourceDirectoryInfoRequest.ProtoReflect.Descriptor instead.
+func (*GetSourceDirectoryInfoRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GetSourceDirectoryInfoRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetSourceDirectoryInfoRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *GetSourceDirectoryInfoRequest) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+// GetSourceDirectoryInfoResponse returns the root FileInfo for the requested module.
+type GetSourceDirectoryInfoResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Root *FileInfo `protobuf:"bytes,1,opt,name=root,proto3" json:"root,omitempty"`
+}
+
+func (x *GetSourceDirectoryInfoResponse) Reset() {
+ *x = GetSourceDirectoryInfoResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetSourceDirectoryInfoResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSourceDirectoryInfoResponse) ProtoMessage() {}
+
+func (x *GetSourceDirectoryInfoResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 GetSourceDirectoryInfoResponse.ProtoReflect.Descriptor instead.
+func (*GetSourceDirectoryInfoResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetSourceDirectoryInfoResponse) GetRoot() *FileInfo {
+ if x != nil {
+ return x.Root
+ }
+ return nil
+}
+
+// FileInfo is a nested structure that contains the file path, whether or not it's a directory,
+// and if so, the FileInfo children of that directory.
+type FileInfo struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // the normalized path of the directory, relative to the root of the module.
+ Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
+ IsDir bool `protobuf:"varint,2,opt,name=is_dir,json=isDir,proto3" json:"is_dir,omitempty"`
+ Children []*FileInfo `protobuf:"bytes,3,rep,name=children,proto3" json:"children,omitempty"`
+}
+
+func (x *FileInfo) Reset() {
+ *x = FileInfo{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FileInfo) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileInfo) ProtoMessage() {}
+
+func (x *FileInfo) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 FileInfo.ProtoReflect.Descriptor instead.
+func (*FileInfo) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *FileInfo) GetPath() string {
+ if x != nil {
+ return x.Path
+ }
+ return ""
+}
+
+func (x *FileInfo) GetIsDir() bool {
+ if x != nil {
+ return x.IsDir
+ }
+ return false
+}
+
+func (x *FileInfo) GetChildren() []*FileInfo {
+ if x != nil {
+ return x.Children
+ }
+ return nil
+}
+
+// GetSourceFileRequest takes an owner, repository, reference, and normalized path.
+type GetSourceFileRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+ // the normalized path to the requested file, relative to the root of the module.
+ Path string `protobuf:"bytes,4,opt,name=path,proto3" json:"path,omitempty"`
+}
+
+func (x *GetSourceFileRequest) Reset() {
+ *x = GetSourceFileRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetSourceFileRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSourceFileRequest) ProtoMessage() {}
+
+func (x *GetSourceFileRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 GetSourceFileRequest.ProtoReflect.Descriptor instead.
+func (*GetSourceFileRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *GetSourceFileRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetSourceFileRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *GetSourceFileRequest) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+func (x *GetSourceFileRequest) GetPath() string {
+ if x != nil {
+ return x.Path
+ }
+ return ""
+}
+
+// GetSourceFileResponse returns the source code contents of the requested file.
+type GetSourceFileResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // content is the content of the file.
+ Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
+}
+
+func (x *GetSourceFileResponse) Reset() {
+ *x = GetSourceFileResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetSourceFileResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSourceFileResponse) ProtoMessage() {}
+
+func (x *GetSourceFileResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 GetSourceFileResponse.ProtoReflect.Descriptor instead.
+func (*GetSourceFileResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *GetSourceFileResponse) GetContent() []byte {
+ if x != nil {
+ return x.Content
+ }
+ return nil
+}
+
+// GetModulePackagesRequest takes an owner, repository, and reference.
+type GetModulePackagesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+}
+
+func (x *GetModulePackagesRequest) Reset() {
+ *x = GetModulePackagesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetModulePackagesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetModulePackagesRequest) ProtoMessage() {}
+
+func (x *GetModulePackagesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 GetModulePackagesRequest.ProtoReflect.Descriptor instead.
+func (*GetModulePackagesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *GetModulePackagesRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetModulePackagesRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *GetModulePackagesRequest) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+// GetModulePackagesResponse returns the list of ModulePackages for the requested module.
+type GetModulePackagesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ ModulePackages []*ModulePackage `protobuf:"bytes,2,rep,name=module_packages,json=modulePackages,proto3" json:"module_packages,omitempty"`
+}
+
+func (x *GetModulePackagesResponse) Reset() {
+ *x = GetModulePackagesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetModulePackagesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetModulePackagesResponse) ProtoMessage() {}
+
+func (x *GetModulePackagesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 GetModulePackagesResponse.ProtoReflect.Descriptor instead.
+func (*GetModulePackagesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *GetModulePackagesResponse) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *GetModulePackagesResponse) GetModulePackages() []*ModulePackage {
+ if x != nil {
+ return x.ModulePackages
+ }
+ return nil
+}
+
+// ModulePackage provides the details about a module's associated package.
+type ModulePackage struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+}
+
+func (x *ModulePackage) Reset() {
+ *x = ModulePackage{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ModulePackage) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModulePackage) ProtoMessage() {}
+
+func (x *ModulePackage) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 ModulePackage.ProtoReflect.Descriptor instead.
+func (*ModulePackage) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *ModulePackage) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ModulePackage) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+// GetModuleDocumentationRequest takes an owner, repository, and reference.
+type GetModuleDocumentationRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+}
+
+func (x *GetModuleDocumentationRequest) Reset() {
+ *x = GetModuleDocumentationRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetModuleDocumentationRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetModuleDocumentationRequest) ProtoMessage() {}
+
+func (x *GetModuleDocumentationRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 GetModuleDocumentationRequest.ProtoReflect.Descriptor instead.
+func (*GetModuleDocumentationRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *GetModuleDocumentationRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetModuleDocumentationRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *GetModuleDocumentationRequest) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+// GetModuleDocumentationResponse returns the ModuleDocumentation for the requested module.
+type GetModuleDocumentationResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ModuleDocumentation *ModuleDocumentation `protobuf:"bytes,1,opt,name=module_documentation,json=moduleDocumentation,proto3" json:"module_documentation,omitempty"`
+}
+
+func (x *GetModuleDocumentationResponse) Reset() {
+ *x = GetModuleDocumentationResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetModuleDocumentationResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetModuleDocumentationResponse) ProtoMessage() {}
+
+func (x *GetModuleDocumentationResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 GetModuleDocumentationResponse.ProtoReflect.Descriptor instead.
+func (*GetModuleDocumentationResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *GetModuleDocumentationResponse) GetModuleDocumentation() *ModuleDocumentation {
+ if x != nil {
+ return x.ModuleDocumentation
+ }
+ return nil
+}
+
+// ModuleDocumentation provides the name of the module and associated documentations.
+type ModuleDocumentation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // This is the string representation of the contents of the buf.md file for module-level documentation.
+ //
+ // The buf.md file is a part of the module.
+ // string is used to enforce UTF-8 encoding or 7-bit ASCII text.
+ Documentation string `protobuf:"bytes,3,opt,name=documentation,proto3" json:"documentation,omitempty"`
+ // This is the string representation of the contents of the LICENSE file for module-level license.
+ //
+ // The LICENSE file is a part of the module.
+ // string is used to enforce UTF-8 encoding or 7-bit ASCII text.
+ License string `protobuf:"bytes,4,opt,name=license,proto3" json:"license,omitempty"`
+}
+
+func (x *ModuleDocumentation) Reset() {
+ *x = ModuleDocumentation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ModuleDocumentation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ModuleDocumentation) ProtoMessage() {}
+
+func (x *ModuleDocumentation) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 ModuleDocumentation.ProtoReflect.Descriptor instead.
+func (*ModuleDocumentation) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *ModuleDocumentation) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ModuleDocumentation) GetDocumentation() string {
+ if x != nil {
+ return x.Documentation
+ }
+ return ""
+}
+
+func (x *ModuleDocumentation) GetLicense() string {
+ if x != nil {
+ return x.License
+ }
+ return ""
+}
+
+// GetPackageDocumentationRequest takes an owner, repository, reference, and package name.
+type GetPackageDocumentationRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+ // this is the fully qualified package name.
+ PackageName string `protobuf:"bytes,4,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"`
+}
+
+func (x *GetPackageDocumentationRequest) Reset() {
+ *x = GetPackageDocumentationRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetPackageDocumentationRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetPackageDocumentationRequest) ProtoMessage() {}
+
+func (x *GetPackageDocumentationRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 GetPackageDocumentationRequest.ProtoReflect.Descriptor instead.
+func (*GetPackageDocumentationRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *GetPackageDocumentationRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetPackageDocumentationRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *GetPackageDocumentationRequest) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+func (x *GetPackageDocumentationRequest) GetPackageName() string {
+ if x != nil {
+ return x.PackageName
+ }
+ return ""
+}
+
+// GetPackageDocumentationReponse returns the documentation for the requested package.
+type GetPackageDocumentationResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PackageDocumentation *PackageDocumentation `protobuf:"bytes,1,opt,name=package_documentation,json=packageDocumentation,proto3" json:"package_documentation,omitempty"`
+}
+
+func (x *GetPackageDocumentationResponse) Reset() {
+ *x = GetPackageDocumentationResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetPackageDocumentationResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetPackageDocumentationResponse) ProtoMessage() {}
+
+func (x *GetPackageDocumentationResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 GetPackageDocumentationResponse.ProtoReflect.Descriptor instead.
+func (*GetPackageDocumentationResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *GetPackageDocumentationResponse) GetPackageDocumentation() *PackageDocumentation {
+ if x != nil {
+ return x.PackageDocumentation
+ }
+ return nil
+}
+
+// PackageDocumentation provides the name, description, and top level types defined in the package.
+type PackageDocumentation struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // description contains the package-level comment documentation.
+ // There is currently no convention for this.
+ //
+ // This is derived from the leading comments at the top level of the package.
+ // Paragraph newlines (double new lines) are respected, however single newlines are not.
+ // Note that any leading and trailing `//` or spaces within a `/* */` block will be stripped.
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ // services contains all the services defined in the package in alphabetical order.
+ Services []*Service `protobuf:"bytes,3,rep,name=services,proto3" json:"services,omitempty"`
+ // enums contains all the enums defined in the package in alphabetical order.
+ Enums []*Enum `protobuf:"bytes,4,rep,name=enums,proto3" json:"enums,omitempty"`
+ // messages contains all the messages defined in the package in alphabetical order.
+ Messages []*Message `protobuf:"bytes,5,rep,name=messages,proto3" json:"messages,omitempty"`
+ // extensions contains all the file level extensions in the package in alphabetical order.
+ FileExtensions []*FileExtension `protobuf:"bytes,6,rep,name=file_extensions,json=fileExtensions,proto3" json:"file_extensions,omitempty"`
+}
+
+func (x *PackageDocumentation) Reset() {
+ *x = PackageDocumentation{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PackageDocumentation) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PackageDocumentation) ProtoMessage() {}
+
+func (x *PackageDocumentation) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 PackageDocumentation.ProtoReflect.Descriptor instead.
+func (*PackageDocumentation) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *PackageDocumentation) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *PackageDocumentation) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *PackageDocumentation) GetServices() []*Service {
+ if x != nil {
+ return x.Services
+ }
+ return nil
+}
+
+func (x *PackageDocumentation) GetEnums() []*Enum {
+ if x != nil {
+ return x.Enums
+ }
+ return nil
+}
+
+func (x *PackageDocumentation) GetMessages() []*Message {
+ if x != nil {
+ return x.Messages
+ }
+ return nil
+}
+
+func (x *PackageDocumentation) GetFileExtensions() []*FileExtension {
+ if x != nil {
+ return x.FileExtensions
+ }
+ return nil
+}
+
+// Location provides the location information for the source code.
+//
+// This does not provide the leading or trailing comments as these will
+// be parsed into descriptions or dropped respectively.
+type Location struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ StartLine int32 `protobuf:"varint,1,opt,name=start_line,json=startLine,proto3" json:"start_line,omitempty"`
+ StartColumn int32 `protobuf:"varint,2,opt,name=start_column,json=startColumn,proto3" json:"start_column,omitempty"`
+ EndLine int32 `protobuf:"varint,3,opt,name=end_line,json=endLine,proto3" json:"end_line,omitempty"`
+ EndColumn int32 `protobuf:"varint,4,opt,name=end_column,json=endColumn,proto3" json:"end_column,omitempty"`
+}
+
+func (x *Location) Reset() {
+ *x = Location{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Location) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Location) ProtoMessage() {}
+
+func (x *Location) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 Location.ProtoReflect.Descriptor instead.
+func (*Location) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *Location) GetStartLine() int32 {
+ if x != nil {
+ return x.StartLine
+ }
+ return 0
+}
+
+func (x *Location) GetStartColumn() int32 {
+ if x != nil {
+ return x.StartColumn
+ }
+ return 0
+}
+
+func (x *Location) GetEndLine() int32 {
+ if x != nil {
+ return x.EndLine
+ }
+ return 0
+}
+
+func (x *Location) GetEndColumn() int32 {
+ if x != nil {
+ return x.EndColumn
+ }
+ return 0
+}
+
+// Service provides information for the documentation for a given service type in a file.
+type Service struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // nested_name includes the nested types for a given type definition.
+ NestedName string `protobuf:"bytes,2,opt,name=nested_name,json=nestedName,proto3" json:"nested_name,omitempty"`
+ // full_name includes the package name and nested types for a given type definition.
+ FullName string `protobuf:"bytes,3,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
+ // description is derived from the leading comments of a given service.
+ //
+ // Paragraph newlines (double new lines) are respected, however single newlines are not.
+ // Note that any leading and trailing `//` or spaces within a `/* */` block will be stripped.
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+ // file_path is the normalized path of the file containing the service.
+ // This is used for navigating to the source code for the service.
+ FilePath string `protobuf:"bytes,5,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
+ Location *Location `protobuf:"bytes,6,opt,name=location,proto3" json:"location,omitempty"`
+ Methods []*Method `protobuf:"bytes,7,rep,name=methods,proto3" json:"methods,omitempty"`
+ ServiceOptions *ServiceOptions `protobuf:"bytes,8,opt,name=service_options,json=serviceOptions,proto3" json:"service_options,omitempty"`
+ // implicitly_deprecated is true if its enclosing file is deprecated.
+ ImplicitlyDeprecated bool `protobuf:"varint,9,opt,name=implicitly_deprecated,json=implicitlyDeprecated,proto3" json:"implicitly_deprecated,omitempty"`
+}
+
+func (x *Service) Reset() {
+ *x = Service{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Service) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Service) ProtoMessage() {}
+
+func (x *Service) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 Service.ProtoReflect.Descriptor instead.
+func (*Service) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *Service) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Service) GetNestedName() string {
+ if x != nil {
+ return x.NestedName
+ }
+ return ""
+}
+
+func (x *Service) GetFullName() string {
+ if x != nil {
+ return x.FullName
+ }
+ return ""
+}
+
+func (x *Service) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Service) GetFilePath() string {
+ if x != nil {
+ return x.FilePath
+ }
+ return ""
+}
+
+func (x *Service) GetLocation() *Location {
+ if x != nil {
+ return x.Location
+ }
+ return nil
+}
+
+func (x *Service) GetMethods() []*Method {
+ if x != nil {
+ return x.Methods
+ }
+ return nil
+}
+
+func (x *Service) GetServiceOptions() *ServiceOptions {
+ if x != nil {
+ return x.ServiceOptions
+ }
+ return nil
+}
+
+func (x *Service) GetImplicitlyDeprecated() bool {
+ if x != nil {
+ return x.ImplicitlyDeprecated
+ }
+ return false
+}
+
+// ServiceOptions provides information for the documentation of options for a given service.
+type ServiceOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Deprecated bool `protobuf:"varint,1,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+}
+
+func (x *ServiceOptions) Reset() {
+ *x = ServiceOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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_buf_alpha_registry_v1alpha1_doc_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_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *ServiceOptions) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+// Method provides information for the documentation for a method of a given service.
+type Method struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // description is derived from the leading comments of a given method.
+ //
+ // Paragraph newlines (double new lines) are respected, however single newlines are not.
+ // Note that any leading and trailing `//` or spaces within a `/* */` block will be stripped.
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ Request *MethodRequestResponse `protobuf:"bytes,3,opt,name=request,proto3" json:"request,omitempty"`
+ Response *MethodRequestResponse `protobuf:"bytes,4,opt,name=response,proto3" json:"response,omitempty"`
+ MethodOptions *MethodOptions `protobuf:"bytes,5,opt,name=method_options,json=methodOptions,proto3" json:"method_options,omitempty"`
+ // implicitly_deprecated is true if its enclosing file or parent element is deprecated.
+ ImplicitlyDeprecated bool `protobuf:"varint,6,opt,name=implicitly_deprecated,json=implicitlyDeprecated,proto3" json:"implicitly_deprecated,omitempty"`
+}
+
+func (x *Method) Reset() {
+ *x = Method{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Method) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Method) ProtoMessage() {}
+
+func (x *Method) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 Method.ProtoReflect.Descriptor instead.
+func (*Method) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *Method) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Method) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Method) GetRequest() *MethodRequestResponse {
+ if x != nil {
+ return x.Request
+ }
+ return nil
+}
+
+func (x *Method) GetResponse() *MethodRequestResponse {
+ if x != nil {
+ return x.Response
+ }
+ return nil
+}
+
+func (x *Method) GetMethodOptions() *MethodOptions {
+ if x != nil {
+ return x.MethodOptions
+ }
+ return nil
+}
+
+func (x *Method) GetImplicitlyDeprecated() bool {
+ if x != nil {
+ return x.ImplicitlyDeprecated
+ }
+ return false
+}
+
+// MethodOptions provides information for the documentation of options for a method.
+type MethodOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Deprecated bool `protobuf:"varint,1,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ // idempotency_level holds a value of the enumeration `google.protobuf.MethodOptions.IdempotencyLevel.
+ IdempotencyLevel int32 `protobuf:"varint,2,opt,name=idempotency_level,json=idempotencyLevel,proto3" json:"idempotency_level,omitempty"`
+}
+
+func (x *MethodOptions) Reset() {
+ *x = MethodOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[18]
+ 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_buf_alpha_registry_v1alpha1_doc_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 MethodOptions.ProtoReflect.Descriptor instead.
+func (*MethodOptions) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *MethodOptions) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+func (x *MethodOptions) GetIdempotencyLevel() int32 {
+ if x != nil {
+ return x.IdempotencyLevel
+ }
+ return 0
+}
+
+// MethodRequestResponse provides information for the documentation of a Method request or response message.
+type MethodRequestResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // nested_type is the nested name of the message of the request or response. This includes nested definitions.
+ NestedType string `protobuf:"bytes,1,opt,name=nested_type,json=nestedType,proto3" json:"nested_type,omitempty"`
+ // full_type is the fully qualified name of the message of the request or response. This includes package and nested definitions.
+ FullType string `protobuf:"bytes,2,opt,name=full_type,json=fullType,proto3" json:"full_type,omitempty"`
+ // boolean flag for whether the streaming label is set on an method request or response.
+ Streaming bool `protobuf:"varint,3,opt,name=streaming,proto3" json:"streaming,omitempty"`
+ Message *Message `protobuf:"bytes,4,opt,name=message,proto3" json:"message,omitempty"`
+ // import_module_ref is included if the request or response is an imported type.
+ // It contains all the metadata for the import.
+ ImportModuleRef *ImportModuleRef `protobuf:"bytes,5,opt,name=import_module_ref,json=importModuleRef,proto3" json:"import_module_ref,omitempty"`
+}
+
+func (x *MethodRequestResponse) Reset() {
+ *x = MethodRequestResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MethodRequestResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MethodRequestResponse) ProtoMessage() {}
+
+func (x *MethodRequestResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 MethodRequestResponse.ProtoReflect.Descriptor instead.
+func (*MethodRequestResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *MethodRequestResponse) GetNestedType() string {
+ if x != nil {
+ return x.NestedType
+ }
+ return ""
+}
+
+func (x *MethodRequestResponse) GetFullType() string {
+ if x != nil {
+ return x.FullType
+ }
+ return ""
+}
+
+func (x *MethodRequestResponse) GetStreaming() bool {
+ if x != nil {
+ return x.Streaming
+ }
+ return false
+}
+
+func (x *MethodRequestResponse) GetMessage() *Message {
+ if x != nil {
+ return x.Message
+ }
+ return nil
+}
+
+func (x *MethodRequestResponse) GetImportModuleRef() *ImportModuleRef {
+ if x != nil {
+ return x.ImportModuleRef
+ }
+ return nil
+}
+
+// Enum provides information for the documentation of an enum.
+type Enum struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // nested_name includes the nested types for a given type definition.
+ NestedName string `protobuf:"bytes,2,opt,name=nested_name,json=nestedName,proto3" json:"nested_name,omitempty"`
+ // full_name includes the package name and nested types for a given type definition.
+ FullName string `protobuf:"bytes,3,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
+ // description is derived from the leading comments of a given Enum.
+ //
+ // Paragraph newlines (double new lines) are respected, however single newlines are not.
+ // Note that any leading and trailing `//` or spaces within a `/* */` block will be stripped.
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+ // file_path is the normalized path of the file containing the enum.
+ FilePath string `protobuf:"bytes,5,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
+ Location *Location `protobuf:"bytes,6,opt,name=location,proto3" json:"location,omitempty"`
+ Values []*EnumValue `protobuf:"bytes,7,rep,name=values,proto3" json:"values,omitempty"`
+ EnumOptions *EnumOptions `protobuf:"bytes,8,opt,name=enum_options,json=enumOptions,proto3" json:"enum_options,omitempty"`
+ // implicitly_deprecated is true if its enclosing file or parent element is deprecated.
+ ImplicitlyDeprecated bool `protobuf:"varint,9,opt,name=implicitly_deprecated,json=implicitlyDeprecated,proto3" json:"implicitly_deprecated,omitempty"`
+}
+
+func (x *Enum) Reset() {
+ *x = Enum{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Enum) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Enum) ProtoMessage() {}
+
+func (x *Enum) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 Enum.ProtoReflect.Descriptor instead.
+func (*Enum) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *Enum) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Enum) GetNestedName() string {
+ if x != nil {
+ return x.NestedName
+ }
+ return ""
+}
+
+func (x *Enum) GetFullName() string {
+ if x != nil {
+ return x.FullName
+ }
+ return ""
+}
+
+func (x *Enum) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Enum) GetFilePath() string {
+ if x != nil {
+ return x.FilePath
+ }
+ return ""
+}
+
+func (x *Enum) GetLocation() *Location {
+ if x != nil {
+ return x.Location
+ }
+ return nil
+}
+
+func (x *Enum) GetValues() []*EnumValue {
+ if x != nil {
+ return x.Values
+ }
+ return nil
+}
+
+func (x *Enum) GetEnumOptions() *EnumOptions {
+ if x != nil {
+ return x.EnumOptions
+ }
+ return nil
+}
+
+func (x *Enum) GetImplicitlyDeprecated() bool {
+ if x != nil {
+ return x.ImplicitlyDeprecated
+ }
+ return false
+}
+
+// EnumOptions provides information for the documentation of options for an enum.
+type EnumOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Deprecated bool `protobuf:"varint,1,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ AllowAlias bool `protobuf:"varint,2,opt,name=allow_alias,json=allowAlias,proto3" json:"allow_alias,omitempty"`
+}
+
+func (x *EnumOptions) Reset() {
+ *x = EnumOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[21]
+ 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_buf_alpha_registry_v1alpha1_doc_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 EnumOptions.ProtoReflect.Descriptor instead.
+func (*EnumOptions) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *EnumOptions) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+func (x *EnumOptions) GetAllowAlias() bool {
+ if x != nil {
+ return x.AllowAlias
+ }
+ return false
+}
+
+// EnumValue provides information for the documentation of an enum value.
+type EnumValue struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Number int32 `protobuf:"varint,2,opt,name=number,proto3" json:"number,omitempty"`
+ // description is derived from the leading comments of a given enum value.
+ //
+ // Paragraph newlines (double new lines) are respected, however single newlines are not.
+ // Note that any leading and trailing `//` or spaces within a `/* */` block will be stripped.
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+ EnumValueOptions *EnumValueOptions `protobuf:"bytes,4,opt,name=enum_value_options,json=enumValueOptions,proto3" json:"enum_value_options,omitempty"`
+}
+
+func (x *EnumValue) Reset() {
+ *x = EnumValue{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *EnumValue) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EnumValue) ProtoMessage() {}
+
+func (x *EnumValue) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 EnumValue.ProtoReflect.Descriptor instead.
+func (*EnumValue) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *EnumValue) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *EnumValue) GetNumber() int32 {
+ if x != nil {
+ return x.Number
+ }
+ return 0
+}
+
+func (x *EnumValue) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *EnumValue) GetEnumValueOptions() *EnumValueOptions {
+ if x != nil {
+ return x.EnumValueOptions
+ }
+ return nil
+}
+
+// EnumValueOptions provides information for the documentation of options for an enum value.
+type EnumValueOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Deprecated bool `protobuf:"varint,1,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+}
+
+func (x *EnumValueOptions) Reset() {
+ *x = EnumValueOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[23]
+ 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_buf_alpha_registry_v1alpha1_doc_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 EnumValueOptions.ProtoReflect.Descriptor instead.
+func (*EnumValueOptions) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *EnumValueOptions) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+// ImportRef provides the import metadata if a type is imported.
+type ImportModuleRef struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Remote string `protobuf:"bytes,1,opt,name=remote,proto3" json:"remote,omitempty"`
+ Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,3,opt,name=repository,proto3" json:"repository,omitempty"`
+ // the commit is based on the module commit of the imported type provided
+ // by the image.
+ Commit string `protobuf:"bytes,4,opt,name=commit,proto3" json:"commit,omitempty"`
+ PackageName string `protobuf:"bytes,5,opt,name=package_name,json=packageName,proto3" json:"package_name,omitempty"`
+}
+
+func (x *ImportModuleRef) Reset() {
+ *x = ImportModuleRef{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ImportModuleRef) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ImportModuleRef) ProtoMessage() {}
+
+func (x *ImportModuleRef) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 ImportModuleRef.ProtoReflect.Descriptor instead.
+func (*ImportModuleRef) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *ImportModuleRef) GetRemote() string {
+ if x != nil {
+ return x.Remote
+ }
+ return ""
+}
+
+func (x *ImportModuleRef) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *ImportModuleRef) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *ImportModuleRef) GetCommit() string {
+ if x != nil {
+ return x.Commit
+ }
+ return ""
+}
+
+func (x *ImportModuleRef) GetPackageName() string {
+ if x != nil {
+ return x.PackageName
+ }
+ return ""
+}
+
+// Message provides information for the documentation of a protobuf message.
+type Message struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // nested_name includes the nested types for a given type definition.
+ NestedName string `protobuf:"bytes,2,opt,name=nested_name,json=nestedName,proto3" json:"nested_name,omitempty"`
+ // full_name includes the package name and nested types for a given type definition.
+ FullName string `protobuf:"bytes,3,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
+ // description is derived from the leading comments of a given message.
+ //
+ // Paragraph newlines (double new lines) are respected, however single newlines are not.
+ // Note that any leading and trailing `//` or spaces within a `/* */` block will be stripped.
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+ // file_path is the normalized path of the file containing the message.
+ FilePath string `protobuf:"bytes,5,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
+ IsMapEntry bool `protobuf:"varint,6,opt,name=is_map_entry,json=isMapEntry,proto3" json:"is_map_entry,omitempty"`
+ Fields []*MessageField `protobuf:"bytes,7,rep,name=fields,proto3" json:"fields,omitempty"`
+ Location *Location `protobuf:"bytes,8,opt,name=location,proto3" json:"location,omitempty"`
+ MessageExtensions []*Field `protobuf:"bytes,9,rep,name=message_extensions,json=messageExtensions,proto3" json:"message_extensions,omitempty"`
+ MessageOptions *MessageOptions `protobuf:"bytes,10,opt,name=message_options,json=messageOptions,proto3" json:"message_options,omitempty"`
+ // implicitly_deprecated is true if its enclosing file or parent element is deprecated.
+ ImplicitlyDeprecated bool `protobuf:"varint,11,opt,name=implicitly_deprecated,json=implicitlyDeprecated,proto3" json:"implicitly_deprecated,omitempty"`
+}
+
+func (x *Message) Reset() {
+ *x = Message{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Message) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message) ProtoMessage() {}
+
+func (x *Message) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 Message.ProtoReflect.Descriptor instead.
+func (*Message) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *Message) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Message) GetNestedName() string {
+ if x != nil {
+ return x.NestedName
+ }
+ return ""
+}
+
+func (x *Message) GetFullName() string {
+ if x != nil {
+ return x.FullName
+ }
+ return ""
+}
+
+func (x *Message) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Message) GetFilePath() string {
+ if x != nil {
+ return x.FilePath
+ }
+ return ""
+}
+
+func (x *Message) GetIsMapEntry() bool {
+ if x != nil {
+ return x.IsMapEntry
+ }
+ return false
+}
+
+func (x *Message) GetFields() []*MessageField {
+ if x != nil {
+ return x.Fields
+ }
+ return nil
+}
+
+func (x *Message) GetLocation() *Location {
+ if x != nil {
+ return x.Location
+ }
+ return nil
+}
+
+func (x *Message) GetMessageExtensions() []*Field {
+ if x != nil {
+ return x.MessageExtensions
+ }
+ return nil
+}
+
+func (x *Message) GetMessageOptions() *MessageOptions {
+ if x != nil {
+ return x.MessageOptions
+ }
+ return nil
+}
+
+func (x *Message) GetImplicitlyDeprecated() bool {
+ if x != nil {
+ return x.ImplicitlyDeprecated
+ }
+ return false
+}
+
+// MessageField can be either a single field or a oneof set of fields.
+type MessageField struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to MessageField:
+ //
+ // *MessageField_Field
+ // *MessageField_Oneof
+ MessageField isMessageField_MessageField `protobuf_oneof:"message_field"`
+}
+
+func (x *MessageField) Reset() {
+ *x = MessageField{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MessageField) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageField) ProtoMessage() {}
+
+func (x *MessageField) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 MessageField.ProtoReflect.Descriptor instead.
+func (*MessageField) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{26}
+}
+
+func (m *MessageField) GetMessageField() isMessageField_MessageField {
+ if m != nil {
+ return m.MessageField
+ }
+ return nil
+}
+
+func (x *MessageField) GetField() *Field {
+ if x, ok := x.GetMessageField().(*MessageField_Field); ok {
+ return x.Field
+ }
+ return nil
+}
+
+func (x *MessageField) GetOneof() *Oneof {
+ if x, ok := x.GetMessageField().(*MessageField_Oneof); ok {
+ return x.Oneof
+ }
+ return nil
+}
+
+type isMessageField_MessageField interface {
+ isMessageField_MessageField()
+}
+
+type MessageField_Field struct {
+ Field *Field `protobuf:"bytes,1,opt,name=field,proto3,oneof"`
+}
+
+type MessageField_Oneof struct {
+ Oneof *Oneof `protobuf:"bytes,2,opt,name=oneof,proto3,oneof"`
+}
+
+func (*MessageField_Field) isMessageField_MessageField() {}
+
+func (*MessageField_Oneof) isMessageField_MessageField() {}
+
+// MessageOptions provides information for the documentation of options for a message.
+type MessageOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Deprecated bool `protobuf:"varint,1,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+}
+
+func (x *MessageOptions) Reset() {
+ *x = MessageOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[27]
+ 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_buf_alpha_registry_v1alpha1_doc_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 MessageOptions.ProtoReflect.Descriptor instead.
+func (*MessageOptions) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *MessageOptions) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+// Oneof represents a oneof set of fields.
+type Oneof struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ Fields []*Field `protobuf:"bytes,2,rep,name=fields,proto3" json:"fields,omitempty"`
+}
+
+func (x *Oneof) Reset() {
+ *x = Oneof{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Oneof) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Oneof) ProtoMessage() {}
+
+func (x *Oneof) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 Oneof.ProtoReflect.Descriptor instead.
+func (*Oneof) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *Oneof) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Oneof) GetFields() []*Field {
+ if x != nil {
+ return x.Fields
+ }
+ return nil
+}
+
+// Field provides information for the documentation of a message field.
+type Field struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // description is derived from the leading comments of a given message field.
+ //
+ // Paragraph newlines (double new lines) are respected, however single newlines are not.
+ // Note that any leading and trailing `//` or spaces within a `/* */` block will be stripped.
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ Label string `protobuf:"bytes,3,opt,name=label,proto3" json:"label,omitempty"`
+ // string representation of the nested name of the field type, which includes nested definitions.
+ NestedType string `protobuf:"bytes,4,opt,name=nested_type,json=nestedType,proto3" json:"nested_type,omitempty"`
+ // string representation of the full name of the field type, which includes package name
+ // and nested definitions.
+ FullType string `protobuf:"bytes,5,opt,name=full_type,json=fullType,proto3" json:"full_type,omitempty"`
+ Tag uint32 `protobuf:"varint,6,opt,name=tag,proto3" json:"tag,omitempty"`
+ // MapEntry is present if the field is a map type.
+ MapEntry *MapEntry `protobuf:"bytes,7,opt,name=map_entry,json=mapEntry,proto3" json:"map_entry,omitempty"`
+ // import_module_ref is included if the field is an imported type.
+ // It contains all the metadata for the import.
+ ImportModuleRef *ImportModuleRef `protobuf:"bytes,8,opt,name=import_module_ref,json=importModuleRef,proto3" json:"import_module_ref,omitempty"`
+ // Extendee is the name of the type that is being extended if the field is an extension.
+ // This is an empty string for fields that are not extenions.
+ Extendee string `protobuf:"bytes,9,opt,name=extendee,proto3" json:"extendee,omitempty"`
+ FieldOptions *FieldOptions `protobuf:"bytes,10,opt,name=field_options,json=fieldOptions,proto3" json:"field_options,omitempty"`
+}
+
+func (x *Field) Reset() {
+ *x = Field{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Field) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Field) ProtoMessage() {}
+
+func (x *Field) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 Field.ProtoReflect.Descriptor instead.
+func (*Field) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{29}
+}
+
+func (x *Field) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Field) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Field) GetLabel() string {
+ if x != nil {
+ return x.Label
+ }
+ return ""
+}
+
+func (x *Field) GetNestedType() string {
+ if x != nil {
+ return x.NestedType
+ }
+ return ""
+}
+
+func (x *Field) GetFullType() string {
+ if x != nil {
+ return x.FullType
+ }
+ return ""
+}
+
+func (x *Field) GetTag() uint32 {
+ if x != nil {
+ return x.Tag
+ }
+ return 0
+}
+
+func (x *Field) GetMapEntry() *MapEntry {
+ if x != nil {
+ return x.MapEntry
+ }
+ return nil
+}
+
+func (x *Field) GetImportModuleRef() *ImportModuleRef {
+ if x != nil {
+ return x.ImportModuleRef
+ }
+ return nil
+}
+
+func (x *Field) GetExtendee() string {
+ if x != nil {
+ return x.Extendee
+ }
+ return ""
+}
+
+func (x *Field) GetFieldOptions() *FieldOptions {
+ if x != nil {
+ return x.FieldOptions
+ }
+ return nil
+}
+
+// FieldOptions provides information for the documentation of options for a field.
+type FieldOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Deprecated bool `protobuf:"varint,1,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ Packed *bool `protobuf:"varint,2,opt,name=packed,proto3,oneof" json:"packed,omitempty"`
+ // ctype holds a value of the enumeration `google.protobuf.FieldOptions.CType.
+ Ctype int32 `protobuf:"varint,3,opt,name=ctype,proto3" json:"ctype,omitempty"`
+ // jstype holds a value of the enumeration `google.protobuf.FieldOptions.JSType.
+ Jstype int32 `protobuf:"varint,4,opt,name=jstype,proto3" json:"jstype,omitempty"`
+}
+
+func (x *FieldOptions) Reset() {
+ *x = FieldOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[30]
+ 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_buf_alpha_registry_v1alpha1_doc_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 FieldOptions.ProtoReflect.Descriptor instead.
+func (*FieldOptions) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *FieldOptions) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+func (x *FieldOptions) GetPacked() bool {
+ if x != nil && x.Packed != nil {
+ return *x.Packed
+ }
+ return false
+}
+
+func (x *FieldOptions) GetCtype() int32 {
+ if x != nil {
+ return x.Ctype
+ }
+ return 0
+}
+
+func (x *FieldOptions) GetJstype() int32 {
+ if x != nil {
+ return x.Jstype
+ }
+ return 0
+}
+
+// MapEntry provides the key and value types for the MapEntry type for a map field.
+type MapEntry struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // string representation of the full name of the type for the map key. keys can only be
+ // scalar types: https://developers.google.com/protocol-buffers/docs/overview#maps
+ KeyFullType string `protobuf:"bytes,1,opt,name=key_full_type,json=keyFullType,proto3" json:"key_full_type,omitempty"`
+ // string representation of the nested name of the type for the map value.
+ ValueNestedType string `protobuf:"bytes,2,opt,name=value_nested_type,json=valueNestedType,proto3" json:"value_nested_type,omitempty"`
+ // string representation of the full name of the type for the map value.
+ ValueFullType string `protobuf:"bytes,3,opt,name=value_full_type,json=valueFullType,proto3" json:"value_full_type,omitempty"`
+ // if the value is an imported type, this is the import module ref
+ ValueImportModuleRef *ImportModuleRef `protobuf:"bytes,4,opt,name=value_import_module_ref,json=valueImportModuleRef,proto3" json:"value_import_module_ref,omitempty"`
+}
+
+func (x *MapEntry) Reset() {
+ *x = MapEntry{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *MapEntry) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MapEntry) ProtoMessage() {}
+
+func (x *MapEntry) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_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 MapEntry.ProtoReflect.Descriptor instead.
+func (*MapEntry) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *MapEntry) GetKeyFullType() string {
+ if x != nil {
+ return x.KeyFullType
+ }
+ return ""
+}
+
+func (x *MapEntry) GetValueNestedType() string {
+ if x != nil {
+ return x.ValueNestedType
+ }
+ return ""
+}
+
+func (x *MapEntry) GetValueFullType() string {
+ if x != nil {
+ return x.ValueFullType
+ }
+ return ""
+}
+
+func (x *MapEntry) GetValueImportModuleRef() *ImportModuleRef {
+ if x != nil {
+ return x.ValueImportModuleRef
+ }
+ return nil
+}
+
+// FileExtension provides the information for the documentation of a file extension.
+type FileExtension struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // extension_type is the string representation of the type being extended.
+ ExtensionType string `protobuf:"bytes,1,opt,name=extension_type,json=extensionType,proto3" json:"extension_type,omitempty"`
+ // description is derived from the leading comments of a given message field.
+ //
+ // Paragraph newlines (double new lines) are respected, however single newlines are not.
+ // Note that any leading and trailing `//` or spaces within a `/* */` block will be stripped.
+ Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
+ // file_path is the normalized path of the file containing the message.
+ FilePath string `protobuf:"bytes,3,opt,name=file_path,json=filePath,proto3" json:"file_path,omitempty"`
+ Location *Location `protobuf:"bytes,4,opt,name=location,proto3" json:"location,omitempty"`
+ // fields are all the fields that are associated with the extension.
+ Fields []*Field `protobuf:"bytes,5,rep,name=fields,proto3" json:"fields,omitempty"`
+ // implicitly_deprecated is true if its enclosing file or parent element is deprecated.
+ ImplicitlyDeprecated bool `protobuf:"varint,6,opt,name=implicitly_deprecated,json=implicitlyDeprecated,proto3" json:"implicitly_deprecated,omitempty"`
+}
+
+func (x *FileExtension) Reset() {
+ *x = FileExtension{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *FileExtension) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FileExtension) ProtoMessage() {}
+
+func (x *FileExtension) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[32]
+ 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 FileExtension.ProtoReflect.Descriptor instead.
+func (*FileExtension) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *FileExtension) GetExtensionType() string {
+ if x != nil {
+ return x.ExtensionType
+ }
+ return ""
+}
+
+func (x *FileExtension) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *FileExtension) GetFilePath() string {
+ if x != nil {
+ return x.FilePath
+ }
+ return ""
+}
+
+func (x *FileExtension) GetLocation() *Location {
+ if x != nil {
+ return x.Location
+ }
+ return nil
+}
+
+func (x *FileExtension) GetFields() []*Field {
+ if x != nil {
+ return x.Fields
+ }
+ return nil
+}
+
+func (x *FileExtension) GetImplicitlyDeprecated() bool {
+ if x != nil {
+ return x.ImplicitlyDeprecated
+ }
+ return false
+}
+
+var File_buf_alpha_registry_v1alpha1_doc_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_doc_proto_rawDesc = []byte{
+ 0x0a, 0x25, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x6f,
+ 0x63, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x22, 0x73, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x72,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x5b, 0x0a, 0x1e, 0x47, 0x65, 0x74,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x49,
+ 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x04, 0x72,
+ 0x6f, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f,
+ 0x52, 0x04, 0x72, 0x6f, 0x6f, 0x74, 0x22, 0x78, 0x0a, 0x08, 0x46, 0x69, 0x6c, 0x65, 0x49, 0x6e,
+ 0x66, 0x6f, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x15, 0x0a, 0x06, 0x69, 0x73, 0x5f, 0x64, 0x69, 0x72,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x69, 0x73, 0x44, 0x69, 0x72, 0x12, 0x41, 0x0a,
+ 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69,
+ 0x6c, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x08, 0x63, 0x68, 0x69, 0x6c, 0x64, 0x72, 0x65, 0x6e,
+ 0x22, 0x7e, 0x0a, 0x14, 0x47, 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e,
+ 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c,
+ 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04,
+ 0x70, 0x61, 0x74, 0x68, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68,
+ 0x22, 0x31, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e,
+ 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74,
+ 0x65, 0x6e, 0x74, 0x22, 0x6e, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
+ 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+ 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
+ 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,
+ 0x6e, 0x63, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f,
+ 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x52, 0x0e, 0x6d, 0x6f, 0x64, 0x75,
+ 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x22, 0x45, 0x0a, 0x0d, 0x4d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x22, 0x73, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x44, 0x6f,
+ 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65,
+ 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66,
+ 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x85, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x63, 0x0a, 0x14, 0x6d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x44, 0x6f, 0x63, 0x75,
+ 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x13, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x69,
+ 0x0a, 0x13, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0d, 0x64, 0x6f, 0x63,
+ 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0d, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x18, 0x0a, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x22, 0x97, 0x01, 0x0a, 0x1e, 0x47, 0x65,
+ 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
+ 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
+ 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e,
+ 0x61, 0x6d, 0x65, 0x22, 0x89, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61,
+ 0x67, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x66, 0x0a, 0x15, 0x70, 0x61, 0x63, 0x6b, 0x61,
+ 0x67, 0x65, 0x5f, 0x64, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x6f, 0x63, 0x75,
+ 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x14, 0x70, 0x61, 0x63, 0x6b, 0x61,
+ 0x67, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22,
+ 0xde, 0x02, 0x0a, 0x14, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d,
+ 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x40,
+ 0x0a, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x24, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53,
+ 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x52, 0x08, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x73,
+ 0x12, 0x37, 0x0a, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x21, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x6e,
+ 0x75, 0x6d, 0x52, 0x05, 0x65, 0x6e, 0x75, 0x6d, 0x73, 0x12, 0x40, 0x0a, 0x08, 0x6d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x52, 0x08, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x53, 0x0a, 0x0f, 0x66,
+ 0x69, 0x6c, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x06,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e,
+ 0x52, 0x0e, 0x66, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x22, 0x86, 0x01, 0x0a, 0x08, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x21, 0x0a, 0x0c,
+ 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x05, 0x52, 0x0b, 0x73, 0x74, 0x61, 0x72, 0x74, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x12,
+ 0x19, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x6c, 0x69, 0x6e, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x05, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x4c, 0x69, 0x6e, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x6e,
+ 0x64, 0x5f, 0x63, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52, 0x09,
+ 0x65, 0x6e, 0x64, 0x43, 0x6f, 0x6c, 0x75, 0x6d, 0x6e, 0x22, 0xa7, 0x03, 0x0a, 0x07, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x73,
+ 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+ 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75,
+ 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66,
+ 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c,
+ 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69,
+ 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68, 0x12, 0x41, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3d, 0x0a, 0x07, 0x6d, 0x65, 0x74,
+ 0x68, 0x6f, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52,
+ 0x07, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x73, 0x12, 0x54, 0x0a, 0x0f, 0x73, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0e,
+ 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33,
+ 0x0a, 0x15, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x5f, 0x64, 0x65, 0x70,
+ 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69,
+ 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
+ 0x74, 0x65, 0x64, 0x22, 0x30, 0x0a, 0x0e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
+ 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65,
+ 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0xe4, 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64,
+ 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72,
+ 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x4c, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x07, 0x72, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x5f, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f,
+ 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0d, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x15, 0x69, 0x6d, 0x70, 0x6c, 0x69,
+ 0x63, 0x69, 0x74, 0x6c, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74,
+ 0x6c, 0x79, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0x5c, 0x0a, 0x0d,
+ 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2b, 0x0a,
+ 0x11, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x5f, 0x6c, 0x65, 0x76,
+ 0x65, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x10, 0x69, 0x64, 0x65, 0x6d, 0x70, 0x6f,
+ 0x74, 0x65, 0x6e, 0x63, 0x79, 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x22, 0x8d, 0x02, 0x0a, 0x15, 0x4d,
+ 0x65, 0x74, 0x68, 0x6f, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65,
+ 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x79,
+ 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x54, 0x79,
+ 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6d, 0x69, 0x6e, 0x67,
+ 0x12, 0x3e, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x12, 0x58, 0x0a, 0x11, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74,
+ 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x0f, 0x69, 0x6d, 0x70, 0x6f, 0x72,
+ 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x22, 0x9c, 0x03, 0x0a, 0x04, 0x45,
+ 0x6e, 0x75, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65,
+ 0x64, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65,
+ 0x73, 0x74, 0x65, 0x64, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c,
+ 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c,
+ 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f,
+ 0x70, 0x61, 0x74, 0x68, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65,
+ 0x50, 0x61, 0x74, 0x68, 0x12, 0x41, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c,
+ 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3e, 0x0a, 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x52,
+ 0x06, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x73, 0x12, 0x4b, 0x0a, 0x0c, 0x65, 0x6e, 0x75, 0x6d, 0x5f,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x28, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x45, 0x6e, 0x75, 0x6d,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, 0x65, 0x6e, 0x75, 0x6d, 0x4f, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x33, 0x0a, 0x15, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74,
+ 0x6c, 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x09, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x14, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x44,
+ 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0x4e, 0x0a, 0x0b, 0x45, 0x6e, 0x75,
+ 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72,
+ 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65,
+ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 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, 0x22, 0xb6, 0x01, 0x0a, 0x09, 0x45, 0x6e,
+ 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 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, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5b, 0x0a, 0x12, 0x65, 0x6e, 0x75, 0x6d, 0x5f, 0x76, 0x61,
+ 0x6c, 0x75, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x52, 0x10, 0x65, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x22, 0x32, 0x0a, 0x10, 0x45, 0x6e, 0x75, 0x6d, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x4f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63,
+ 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72,
+ 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0x9a, 0x01, 0x0a, 0x0f, 0x49, 0x6d, 0x70, 0x6f, 0x72,
+ 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65,
+ 0x6d, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x6f,
+ 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d,
+ 0x69, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
+ 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x4e,
+ 0x61, 0x6d, 0x65, 0x22, 0xa0, 0x04, 0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d,
+ 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f, 0x70, 0x61, 0x74, 0x68,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65, 0x50, 0x61, 0x74, 0x68,
+ 0x12, 0x20, 0x0a, 0x0c, 0x69, 0x73, 0x5f, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x69, 0x73, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x12, 0x41, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x07, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x73, 0x12, 0x41, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08,
+ 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x12, 0x6d, 0x65, 0x73, 0x73,
+ 0x61, 0x67, 0x65, 0x5f, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x09,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x11, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x54, 0x0a, 0x0f, 0x6d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x52, 0x0e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x12, 0x33, 0x0a, 0x15, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x5f,
+ 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x14, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x44, 0x65, 0x70, 0x72,
+ 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x22, 0x97, 0x01, 0x0a, 0x0c, 0x4d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x3a, 0x0a, 0x05, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x48, 0x00, 0x52, 0x05, 0x66, 0x69,
+ 0x65, 0x6c, 0x64, 0x12, 0x3a, 0x0a, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x48, 0x00, 0x52, 0x05, 0x6f, 0x6e, 0x65, 0x6f, 0x66, 0x42,
+ 0x0f, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x5f, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x22, 0x30, 0x0a, 0x0e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
+ 0x65, 0x64, 0x22, 0x57, 0x0a, 0x05, 0x4f, 0x6e, 0x65, 0x6f, 0x66, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x3a, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x22, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69,
+ 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64, 0x73, 0x22, 0xad, 0x03, 0x0a, 0x05,
+ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6c,
+ 0x61, 0x62, 0x65, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6c, 0x61, 0x62, 0x65,
+ 0x6c, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79,
+ 0x70, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12,
+ 0x10, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x03, 0x74, 0x61,
+ 0x67, 0x12, 0x42, 0x0a, 0x09, 0x6d, 0x61, 0x70, 0x5f, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x18, 0x07,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x08, 0x6d, 0x61, 0x70,
+ 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x58, 0x0a, 0x11, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f,
+ 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x66, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49,
+ 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x0f,
+ 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x12,
+ 0x1a, 0x0a, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x08, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x64, 0x65, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0c, 0x66,
+ 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x84, 0x01, 0x0a, 0x0c,
+ 0x46, 0x69, 0x65, 0x6c, 0x64, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x1e, 0x0a, 0x0a,
+ 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x1b, 0x0a, 0x06,
+ 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06,
+ 0x70, 0x61, 0x63, 0x6b, 0x65, 0x64, 0x88, 0x01, 0x01, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x74, 0x79,
+ 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x05, 0x63, 0x74, 0x79, 0x70, 0x65, 0x12,
+ 0x16, 0x0a, 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x05, 0x52,
+ 0x06, 0x6a, 0x73, 0x74, 0x79, 0x70, 0x65, 0x42, 0x09, 0x0a, 0x07, 0x5f, 0x70, 0x61, 0x63, 0x6b,
+ 0x65, 0x64, 0x22, 0xe7, 0x01, 0x0a, 0x08, 0x4d, 0x61, 0x70, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12,
+ 0x22, 0x0a, 0x0d, 0x6b, 0x65, 0x79, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6b, 0x65, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x54,
+ 0x79, 0x70, 0x65, 0x12, 0x2a, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x6e, 0x65, 0x73,
+ 0x74, 0x65, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x4e, 0x65, 0x73, 0x74, 0x65, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12,
+ 0x26, 0x0a, 0x0f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x5f, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x74, 0x79,
+ 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x46,
+ 0x75, 0x6c, 0x6c, 0x54, 0x79, 0x70, 0x65, 0x12, 0x63, 0x0a, 0x17, 0x76, 0x61, 0x6c, 0x75, 0x65,
+ 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x72,
+ 0x65, 0x66, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x52, 0x14, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x49, 0x6d, 0x70,
+ 0x6f, 0x72, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x22, 0xa9, 0x02, 0x0a,
+ 0x0d, 0x46, 0x69, 0x6c, 0x65, 0x45, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x25,
+ 0x0a, 0x0e, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f,
+ 0x6e, 0x54, 0x79, 0x70, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63,
+ 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x69, 0x6c, 0x65, 0x5f,
+ 0x70, 0x61, 0x74, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x69, 0x6c, 0x65,
+ 0x50, 0x61, 0x74, 0x68, 0x12, 0x41, 0x0a, 0x08, 0x6c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x6c,
+ 0x6f, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x0a, 0x06, 0x66, 0x69, 0x65, 0x6c, 0x64,
+ 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x65, 0x6c, 0x64, 0x52, 0x06, 0x66, 0x69, 0x65,
+ 0x6c, 0x64, 0x73, 0x12, 0x33, 0x0a, 0x15, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c,
+ 0x79, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x14, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x6c, 0x79, 0x44, 0x65,
+ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x32, 0xc8, 0x05, 0x0a, 0x0a, 0x44, 0x6f, 0x63,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x53,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x6e,
+ 0x66, 0x6f, 0x12, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74,
+ 0x6f, 0x72, 0x79, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74,
+ 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x49,
+ 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x0d, 0x47,
+ 0x65, 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x31, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65,
+ 0x74, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47,
+ 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x16, 0x47, 0x65, 0x74,
+ 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d,
+ 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65,
+ 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a,
+ 0x17, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d,
+ 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67,
+ 0x65, 0x44, 0x6f, 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65, 0x44, 0x6f,
+ 0x63, 0x75, 0x6d, 0x65, 0x6e, 0x74, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x42, 0x95, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x08, 0x44, 0x6f, 0x63, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69,
+ 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
+ 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02,
+ 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47,
+ 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66,
+ 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_doc_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_doc_proto_rawDescData = file_buf_alpha_registry_v1alpha1_doc_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_doc_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_doc_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_doc_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_doc_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_doc_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
+var file_buf_alpha_registry_v1alpha1_doc_proto_goTypes = []interface{}{
+ (*GetSourceDirectoryInfoRequest)(nil), // 0: buf.alpha.registry.v1alpha1.GetSourceDirectoryInfoRequest
+ (*GetSourceDirectoryInfoResponse)(nil), // 1: buf.alpha.registry.v1alpha1.GetSourceDirectoryInfoResponse
+ (*FileInfo)(nil), // 2: buf.alpha.registry.v1alpha1.FileInfo
+ (*GetSourceFileRequest)(nil), // 3: buf.alpha.registry.v1alpha1.GetSourceFileRequest
+ (*GetSourceFileResponse)(nil), // 4: buf.alpha.registry.v1alpha1.GetSourceFileResponse
+ (*GetModulePackagesRequest)(nil), // 5: buf.alpha.registry.v1alpha1.GetModulePackagesRequest
+ (*GetModulePackagesResponse)(nil), // 6: buf.alpha.registry.v1alpha1.GetModulePackagesResponse
+ (*ModulePackage)(nil), // 7: buf.alpha.registry.v1alpha1.ModulePackage
+ (*GetModuleDocumentationRequest)(nil), // 8: buf.alpha.registry.v1alpha1.GetModuleDocumentationRequest
+ (*GetModuleDocumentationResponse)(nil), // 9: buf.alpha.registry.v1alpha1.GetModuleDocumentationResponse
+ (*ModuleDocumentation)(nil), // 10: buf.alpha.registry.v1alpha1.ModuleDocumentation
+ (*GetPackageDocumentationRequest)(nil), // 11: buf.alpha.registry.v1alpha1.GetPackageDocumentationRequest
+ (*GetPackageDocumentationResponse)(nil), // 12: buf.alpha.registry.v1alpha1.GetPackageDocumentationResponse
+ (*PackageDocumentation)(nil), // 13: buf.alpha.registry.v1alpha1.PackageDocumentation
+ (*Location)(nil), // 14: buf.alpha.registry.v1alpha1.Location
+ (*Service)(nil), // 15: buf.alpha.registry.v1alpha1.Service
+ (*ServiceOptions)(nil), // 16: buf.alpha.registry.v1alpha1.ServiceOptions
+ (*Method)(nil), // 17: buf.alpha.registry.v1alpha1.Method
+ (*MethodOptions)(nil), // 18: buf.alpha.registry.v1alpha1.MethodOptions
+ (*MethodRequestResponse)(nil), // 19: buf.alpha.registry.v1alpha1.MethodRequestResponse
+ (*Enum)(nil), // 20: buf.alpha.registry.v1alpha1.Enum
+ (*EnumOptions)(nil), // 21: buf.alpha.registry.v1alpha1.EnumOptions
+ (*EnumValue)(nil), // 22: buf.alpha.registry.v1alpha1.EnumValue
+ (*EnumValueOptions)(nil), // 23: buf.alpha.registry.v1alpha1.EnumValueOptions
+ (*ImportModuleRef)(nil), // 24: buf.alpha.registry.v1alpha1.ImportModuleRef
+ (*Message)(nil), // 25: buf.alpha.registry.v1alpha1.Message
+ (*MessageField)(nil), // 26: buf.alpha.registry.v1alpha1.MessageField
+ (*MessageOptions)(nil), // 27: buf.alpha.registry.v1alpha1.MessageOptions
+ (*Oneof)(nil), // 28: buf.alpha.registry.v1alpha1.Oneof
+ (*Field)(nil), // 29: buf.alpha.registry.v1alpha1.Field
+ (*FieldOptions)(nil), // 30: buf.alpha.registry.v1alpha1.FieldOptions
+ (*MapEntry)(nil), // 31: buf.alpha.registry.v1alpha1.MapEntry
+ (*FileExtension)(nil), // 32: buf.alpha.registry.v1alpha1.FileExtension
+}
+var file_buf_alpha_registry_v1alpha1_doc_proto_depIdxs = []int32{
+ 2, // 0: buf.alpha.registry.v1alpha1.GetSourceDirectoryInfoResponse.root:type_name -> buf.alpha.registry.v1alpha1.FileInfo
+ 2, // 1: buf.alpha.registry.v1alpha1.FileInfo.children:type_name -> buf.alpha.registry.v1alpha1.FileInfo
+ 7, // 2: buf.alpha.registry.v1alpha1.GetModulePackagesResponse.module_packages:type_name -> buf.alpha.registry.v1alpha1.ModulePackage
+ 10, // 3: buf.alpha.registry.v1alpha1.GetModuleDocumentationResponse.module_documentation:type_name -> buf.alpha.registry.v1alpha1.ModuleDocumentation
+ 13, // 4: buf.alpha.registry.v1alpha1.GetPackageDocumentationResponse.package_documentation:type_name -> buf.alpha.registry.v1alpha1.PackageDocumentation
+ 15, // 5: buf.alpha.registry.v1alpha1.PackageDocumentation.services:type_name -> buf.alpha.registry.v1alpha1.Service
+ 20, // 6: buf.alpha.registry.v1alpha1.PackageDocumentation.enums:type_name -> buf.alpha.registry.v1alpha1.Enum
+ 25, // 7: buf.alpha.registry.v1alpha1.PackageDocumentation.messages:type_name -> buf.alpha.registry.v1alpha1.Message
+ 32, // 8: buf.alpha.registry.v1alpha1.PackageDocumentation.file_extensions:type_name -> buf.alpha.registry.v1alpha1.FileExtension
+ 14, // 9: buf.alpha.registry.v1alpha1.Service.location:type_name -> buf.alpha.registry.v1alpha1.Location
+ 17, // 10: buf.alpha.registry.v1alpha1.Service.methods:type_name -> buf.alpha.registry.v1alpha1.Method
+ 16, // 11: buf.alpha.registry.v1alpha1.Service.service_options:type_name -> buf.alpha.registry.v1alpha1.ServiceOptions
+ 19, // 12: buf.alpha.registry.v1alpha1.Method.request:type_name -> buf.alpha.registry.v1alpha1.MethodRequestResponse
+ 19, // 13: buf.alpha.registry.v1alpha1.Method.response:type_name -> buf.alpha.registry.v1alpha1.MethodRequestResponse
+ 18, // 14: buf.alpha.registry.v1alpha1.Method.method_options:type_name -> buf.alpha.registry.v1alpha1.MethodOptions
+ 25, // 15: buf.alpha.registry.v1alpha1.MethodRequestResponse.message:type_name -> buf.alpha.registry.v1alpha1.Message
+ 24, // 16: buf.alpha.registry.v1alpha1.MethodRequestResponse.import_module_ref:type_name -> buf.alpha.registry.v1alpha1.ImportModuleRef
+ 14, // 17: buf.alpha.registry.v1alpha1.Enum.location:type_name -> buf.alpha.registry.v1alpha1.Location
+ 22, // 18: buf.alpha.registry.v1alpha1.Enum.values:type_name -> buf.alpha.registry.v1alpha1.EnumValue
+ 21, // 19: buf.alpha.registry.v1alpha1.Enum.enum_options:type_name -> buf.alpha.registry.v1alpha1.EnumOptions
+ 23, // 20: buf.alpha.registry.v1alpha1.EnumValue.enum_value_options:type_name -> buf.alpha.registry.v1alpha1.EnumValueOptions
+ 26, // 21: buf.alpha.registry.v1alpha1.Message.fields:type_name -> buf.alpha.registry.v1alpha1.MessageField
+ 14, // 22: buf.alpha.registry.v1alpha1.Message.location:type_name -> buf.alpha.registry.v1alpha1.Location
+ 29, // 23: buf.alpha.registry.v1alpha1.Message.message_extensions:type_name -> buf.alpha.registry.v1alpha1.Field
+ 27, // 24: buf.alpha.registry.v1alpha1.Message.message_options:type_name -> buf.alpha.registry.v1alpha1.MessageOptions
+ 29, // 25: buf.alpha.registry.v1alpha1.MessageField.field:type_name -> buf.alpha.registry.v1alpha1.Field
+ 28, // 26: buf.alpha.registry.v1alpha1.MessageField.oneof:type_name -> buf.alpha.registry.v1alpha1.Oneof
+ 29, // 27: buf.alpha.registry.v1alpha1.Oneof.fields:type_name -> buf.alpha.registry.v1alpha1.Field
+ 31, // 28: buf.alpha.registry.v1alpha1.Field.map_entry:type_name -> buf.alpha.registry.v1alpha1.MapEntry
+ 24, // 29: buf.alpha.registry.v1alpha1.Field.import_module_ref:type_name -> buf.alpha.registry.v1alpha1.ImportModuleRef
+ 30, // 30: buf.alpha.registry.v1alpha1.Field.field_options:type_name -> buf.alpha.registry.v1alpha1.FieldOptions
+ 24, // 31: buf.alpha.registry.v1alpha1.MapEntry.value_import_module_ref:type_name -> buf.alpha.registry.v1alpha1.ImportModuleRef
+ 14, // 32: buf.alpha.registry.v1alpha1.FileExtension.location:type_name -> buf.alpha.registry.v1alpha1.Location
+ 29, // 33: buf.alpha.registry.v1alpha1.FileExtension.fields:type_name -> buf.alpha.registry.v1alpha1.Field
+ 0, // 34: buf.alpha.registry.v1alpha1.DocService.GetSourceDirectoryInfo:input_type -> buf.alpha.registry.v1alpha1.GetSourceDirectoryInfoRequest
+ 3, // 35: buf.alpha.registry.v1alpha1.DocService.GetSourceFile:input_type -> buf.alpha.registry.v1alpha1.GetSourceFileRequest
+ 5, // 36: buf.alpha.registry.v1alpha1.DocService.GetModulePackages:input_type -> buf.alpha.registry.v1alpha1.GetModulePackagesRequest
+ 8, // 37: buf.alpha.registry.v1alpha1.DocService.GetModuleDocumentation:input_type -> buf.alpha.registry.v1alpha1.GetModuleDocumentationRequest
+ 11, // 38: buf.alpha.registry.v1alpha1.DocService.GetPackageDocumentation:input_type -> buf.alpha.registry.v1alpha1.GetPackageDocumentationRequest
+ 1, // 39: buf.alpha.registry.v1alpha1.DocService.GetSourceDirectoryInfo:output_type -> buf.alpha.registry.v1alpha1.GetSourceDirectoryInfoResponse
+ 4, // 40: buf.alpha.registry.v1alpha1.DocService.GetSourceFile:output_type -> buf.alpha.registry.v1alpha1.GetSourceFileResponse
+ 6, // 41: buf.alpha.registry.v1alpha1.DocService.GetModulePackages:output_type -> buf.alpha.registry.v1alpha1.GetModulePackagesResponse
+ 9, // 42: buf.alpha.registry.v1alpha1.DocService.GetModuleDocumentation:output_type -> buf.alpha.registry.v1alpha1.GetModuleDocumentationResponse
+ 12, // 43: buf.alpha.registry.v1alpha1.DocService.GetPackageDocumentation:output_type -> buf.alpha.registry.v1alpha1.GetPackageDocumentationResponse
+ 39, // [39:44] is the sub-list for method output_type
+ 34, // [34:39] is the sub-list for method input_type
+ 34, // [34:34] is the sub-list for extension type_name
+ 34, // [34:34] is the sub-list for extension extendee
+ 0, // [0:34] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_doc_proto_init() }
+func file_buf_alpha_registry_v1alpha1_doc_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_doc_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetSourceDirectoryInfoRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetSourceDirectoryInfoResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FileInfo); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetSourceFileRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetSourceFileResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetModulePackagesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetModulePackagesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ModulePackage); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetModuleDocumentationRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetModuleDocumentationResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ModuleDocumentation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetPackageDocumentationRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetPackageDocumentationResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PackageDocumentation); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Location); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Service); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_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
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Method); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[18].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
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MethodRequestResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Enum); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[21].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
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*EnumValue); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[23].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
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ImportModuleRef); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Message); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MessageField); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[27].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
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Oneof); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Field); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[30].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
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*MapEntry); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*FileExtension); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[26].OneofWrappers = []interface{}{
+ (*MessageField_Field)(nil),
+ (*MessageField_Oneof)(nil),
+ }
+ file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes[30].OneofWrappers = []interface{}{}
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_doc_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 33,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_doc_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_doc_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_doc_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_doc_proto = out.File
+ file_buf_alpha_registry_v1alpha1_doc_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_doc_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_doc_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/download.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/download.pb.go
new file mode 100644
index 000000000..13b6aa04d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/download.pb.go
@@ -0,0 +1,276 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/download.proto
+
+package registryv1alpha1
+
+import (
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type DownloadRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+}
+
+func (x *DownloadRequest) Reset() {
+ *x = DownloadRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_download_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DownloadRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DownloadRequest) ProtoMessage() {}
+
+func (x *DownloadRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_download_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 DownloadRequest.ProtoReflect.Descriptor instead.
+func (*DownloadRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_download_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *DownloadRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *DownloadRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *DownloadRequest) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+type DownloadResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Module *v1alpha1.Module `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"`
+}
+
+func (x *DownloadResponse) Reset() {
+ *x = DownloadResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_download_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DownloadResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DownloadResponse) ProtoMessage() {}
+
+func (x *DownloadResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_download_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 DownloadResponse.ProtoReflect.Descriptor instead.
+func (*DownloadResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_download_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *DownloadResponse) GetModule() *v1alpha1.Module {
+ if x != nil {
+ return x.Module
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_download_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_download_proto_rawDesc = []byte{
+ 0x0a, 0x2a, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x64, 0x6f,
+ 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0x65, 0x0a, 0x0f, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65,
+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x4d, 0x0a, 0x10, 0x44, 0x6f, 0x77, 0x6e,
+ 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06,
+ 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52,
+ 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x32, 0x7a, 0x0a, 0x0f, 0x44, 0x6f, 0x77, 0x6e, 0x6c,
+ 0x6f, 0x61, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67, 0x0a, 0x08, 0x44, 0x6f,
+ 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x42, 0x9a, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0d, 0x44, 0x6f, 0x77, 0x6e, 0x6c, 0x6f, 0x61,
+ 0x64, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75,
+ 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e,
+ 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
+ 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_download_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_download_proto_rawDescData = file_buf_alpha_registry_v1alpha1_download_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_download_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_download_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_download_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_download_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_download_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_download_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_buf_alpha_registry_v1alpha1_download_proto_goTypes = []interface{}{
+ (*DownloadRequest)(nil), // 0: buf.alpha.registry.v1alpha1.DownloadRequest
+ (*DownloadResponse)(nil), // 1: buf.alpha.registry.v1alpha1.DownloadResponse
+ (*v1alpha1.Module)(nil), // 2: buf.alpha.module.v1alpha1.Module
+}
+var file_buf_alpha_registry_v1alpha1_download_proto_depIdxs = []int32{
+ 2, // 0: buf.alpha.registry.v1alpha1.DownloadResponse.module:type_name -> buf.alpha.module.v1alpha1.Module
+ 0, // 1: buf.alpha.registry.v1alpha1.DownloadService.Download:input_type -> buf.alpha.registry.v1alpha1.DownloadRequest
+ 1, // 2: buf.alpha.registry.v1alpha1.DownloadService.Download:output_type -> buf.alpha.registry.v1alpha1.DownloadResponse
+ 2, // [2:3] is the sub-list for method output_type
+ 1, // [1:2] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_download_proto_init() }
+func file_buf_alpha_registry_v1alpha1_download_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_download_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_download_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DownloadRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_download_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DownloadResponse); 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_buf_alpha_registry_v1alpha1_download_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_download_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_download_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_download_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_download_proto = out.File
+ file_buf_alpha_registry_v1alpha1_download_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_download_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_download_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/generate.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/generate.pb.go
new file mode 100644
index 000000000..c49b88141
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/generate.pb.go
@@ -0,0 +1,822 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// buf/alpha/registry/v1alpha1/generate.proto is a deprecated file.
+
+package registryv1alpha1
+
+import (
+ v1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ pluginpb "google.golang.org/protobuf/types/pluginpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// File defines a file with a path and some content.
+type File struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // path is the relative path of the file.
+ // Path can only use '/' as the separator character, and includes no ".." components.
+ Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"`
+ // content is the content of the file.
+ Content []byte `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
+}
+
+func (x *File) Reset() {
+ *x = File{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *File) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*File) ProtoMessage() {}
+
+func (x *File) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_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 File.ProtoReflect.Descriptor instead.
+func (*File) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_generate_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *File) GetPath() string {
+ if x != nil {
+ return x.Path
+ }
+ return ""
+}
+
+func (x *File) GetContent() []byte {
+ if x != nil {
+ return x.Content
+ }
+ return nil
+}
+
+// RuntimeLibrary describes a pinned runtime library dependency of the generated code.
+type RuntimeLibrary struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the runtime library dependency. The format should match the
+ // format used for dependencies in the dependency management tooling of the
+ // associated language ecosystem. This is set by the user using Dockerfile Labels.
+ // For example, for the plugin "protoc-gen-go", this might be "google.golang.org/protobuf".
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The version of the runtime library dependency associated with the generated
+ // code. The format should match the format used for dependency versions in the
+ // dependency management tooling of the associated language ecosystem.
+ // This is set by the user using Dockerfile Labels.
+ // For example, for the plugin "protoc-gen-go", this might be "v1.26.0".
+ Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
+}
+
+func (x *RuntimeLibrary) Reset() {
+ *x = RuntimeLibrary{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RuntimeLibrary) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RuntimeLibrary) ProtoMessage() {}
+
+func (x *RuntimeLibrary) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_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 RuntimeLibrary.ProtoReflect.Descriptor instead.
+func (*RuntimeLibrary) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_generate_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RuntimeLibrary) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *RuntimeLibrary) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+type PluginReference struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin which identifies the
+ // plugins to use with this generation.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin which identifies the
+ // plugins to use with this generation.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The plugin version to use with this generation.
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ // The parameters to pass to the plugin. These will
+ // be merged into a single, comma-separated string.
+ Parameters []string `protobuf:"bytes,4,rep,name=parameters,proto3" json:"parameters,omitempty"`
+}
+
+func (x *PluginReference) Reset() {
+ *x = PluginReference{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PluginReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PluginReference) ProtoMessage() {}
+
+func (x *PluginReference) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_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 PluginReference.ProtoReflect.Descriptor instead.
+func (*PluginReference) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_generate_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *PluginReference) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *PluginReference) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *PluginReference) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *PluginReference) GetParameters() []string {
+ if x != nil {
+ return x.Parameters
+ }
+ return nil
+}
+
+type GeneratePluginsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The image to run plugins against to generate the desired file outputs.
+ //
+ // All image files that are not imports and not well-known types will be generated.
+ // If you want to filter what files are generated, modify the image.
+ // If you want to include imports, set include_imports.
+ Image *v1.Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
+ // The array of plugins to use.
+ Plugins []*PluginReference `protobuf:"bytes,2,rep,name=plugins,proto3" json:"plugins,omitempty"`
+ // Include imports from the Image in generation.
+ IncludeImports bool `protobuf:"varint,3,opt,name=include_imports,json=includeImports,proto3" json:"include_imports,omitempty"`
+ // Include Well-Known Types from the Image in generation.
+ //
+ // include_imports must be set if include_well_known_types is set.
+ IncludeWellKnownTypes bool `protobuf:"varint,4,opt,name=include_well_known_types,json=includeWellKnownTypes,proto3" json:"include_well_known_types,omitempty"`
+}
+
+func (x *GeneratePluginsRequest) Reset() {
+ *x = GeneratePluginsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GeneratePluginsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GeneratePluginsRequest) ProtoMessage() {}
+
+func (x *GeneratePluginsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_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 GeneratePluginsRequest.ProtoReflect.Descriptor instead.
+func (*GeneratePluginsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_generate_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *GeneratePluginsRequest) GetImage() *v1.Image {
+ if x != nil {
+ return x.Image
+ }
+ return nil
+}
+
+func (x *GeneratePluginsRequest) GetPlugins() []*PluginReference {
+ if x != nil {
+ return x.Plugins
+ }
+ return nil
+}
+
+func (x *GeneratePluginsRequest) GetIncludeImports() bool {
+ if x != nil {
+ return x.IncludeImports
+ }
+ return false
+}
+
+func (x *GeneratePluginsRequest) GetIncludeWellKnownTypes() bool {
+ if x != nil {
+ return x.IncludeWellKnownTypes
+ }
+ return false
+}
+
+type GeneratePluginsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Contains all the responses from the generated plugins. The order
+ // is defined by the order of the plugins in the request.
+ Responses []*pluginpb.CodeGeneratorResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
+ // An optional array defining runtime libraries that the generated code
+ // requires to run, as specified by the plugin author. This may contain
+ // duplicate entries as the generation can be the result of multiple plugins,
+ // each of which declares its own runtime library dependencies. The libraries
+ // returned are lexicographically ordered by their name, but not deduplicated.
+ // How to handle duplicate libraries is left to the user.
+ RuntimeLibraries []*RuntimeLibrary `protobuf:"bytes,2,rep,name=runtime_libraries,json=runtimeLibraries,proto3" json:"runtime_libraries,omitempty"`
+}
+
+func (x *GeneratePluginsResponse) Reset() {
+ *x = GeneratePluginsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GeneratePluginsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GeneratePluginsResponse) ProtoMessage() {}
+
+func (x *GeneratePluginsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_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 GeneratePluginsResponse.ProtoReflect.Descriptor instead.
+func (*GeneratePluginsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_generate_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *GeneratePluginsResponse) GetResponses() []*pluginpb.CodeGeneratorResponse {
+ if x != nil {
+ return x.Responses
+ }
+ return nil
+}
+
+func (x *GeneratePluginsResponse) GetRuntimeLibraries() []*RuntimeLibrary {
+ if x != nil {
+ return x.RuntimeLibraries
+ }
+ return nil
+}
+
+type GenerateTemplateRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The image to run plugins against to generate the desired file outputs.
+ //
+ // All image files that are not imports and not well-known types will be generated.
+ // If you want to filter what files are generated, modify the image.
+ // If you want to include imports, set include_imports.
+ Image *v1.Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
+ // The owner of the template which identifies the
+ // plugins to use with this generation.
+ TemplateOwner string `protobuf:"bytes,2,opt,name=template_owner,json=templateOwner,proto3" json:"template_owner,omitempty"`
+ // The name of the template which identifies the
+ // plugins to use with this generation.
+ TemplateName string `protobuf:"bytes,3,opt,name=template_name,json=templateName,proto3" json:"template_name,omitempty"`
+ // The template version to use to determine the
+ // plugin versions in the template.
+ TemplateVersion string `protobuf:"bytes,4,opt,name=template_version,json=templateVersion,proto3" json:"template_version,omitempty"`
+ // Include imports from the Image in generation.
+ IncludeImports bool `protobuf:"varint,5,opt,name=include_imports,json=includeImports,proto3" json:"include_imports,omitempty"`
+ // Include Well-Known Types from the Image in generation.
+ //
+ // include_imports must be set if include_well_known_types is set.
+ IncludeWellKnownTypes bool `protobuf:"varint,6,opt,name=include_well_known_types,json=includeWellKnownTypes,proto3" json:"include_well_known_types,omitempty"`
+}
+
+func (x *GenerateTemplateRequest) Reset() {
+ *x = GenerateTemplateRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GenerateTemplateRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GenerateTemplateRequest) ProtoMessage() {}
+
+func (x *GenerateTemplateRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_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 GenerateTemplateRequest.ProtoReflect.Descriptor instead.
+func (*GenerateTemplateRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_generate_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *GenerateTemplateRequest) GetImage() *v1.Image {
+ if x != nil {
+ return x.Image
+ }
+ return nil
+}
+
+func (x *GenerateTemplateRequest) GetTemplateOwner() string {
+ if x != nil {
+ return x.TemplateOwner
+ }
+ return ""
+}
+
+func (x *GenerateTemplateRequest) GetTemplateName() string {
+ if x != nil {
+ return x.TemplateName
+ }
+ return ""
+}
+
+func (x *GenerateTemplateRequest) GetTemplateVersion() string {
+ if x != nil {
+ return x.TemplateVersion
+ }
+ return ""
+}
+
+func (x *GenerateTemplateRequest) GetIncludeImports() bool {
+ if x != nil {
+ return x.IncludeImports
+ }
+ return false
+}
+
+func (x *GenerateTemplateRequest) GetIncludeWellKnownTypes() bool {
+ if x != nil {
+ return x.IncludeWellKnownTypes
+ }
+ return false
+}
+
+type GenerateTemplateResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // files contains all the files output by the generation,
+ // in lexicographical order.
+ Files []*File `protobuf:"bytes,1,rep,name=files,proto3" json:"files,omitempty"`
+ // An optional array defining runtime libraries that the generated code
+ // requires to run. This may contain duplicate entries as the generation
+ // can be the result of multiple plugins, each of which declares its own
+ // runtime library dependencies.
+ RuntimeLibraries []*RuntimeLibrary `protobuf:"bytes,2,rep,name=runtime_libraries,json=runtimeLibraries,proto3" json:"runtime_libraries,omitempty"`
+}
+
+func (x *GenerateTemplateResponse) Reset() {
+ *x = GenerateTemplateResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GenerateTemplateResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GenerateTemplateResponse) ProtoMessage() {}
+
+func (x *GenerateTemplateResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_generate_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 GenerateTemplateResponse.ProtoReflect.Descriptor instead.
+func (*GenerateTemplateResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_generate_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *GenerateTemplateResponse) GetFiles() []*File {
+ if x != nil {
+ return x.Files
+ }
+ return nil
+}
+
+func (x *GenerateTemplateResponse) GetRuntimeLibraries() []*RuntimeLibrary {
+ if x != nil {
+ return x.RuntimeLibraries
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_generate_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_generate_proto_rawDesc = []byte{
+ 0x0a, 0x2a, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1e, 0x62, 0x75, 0x66, 0x2f, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d,
+ 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x69,
+ 0x6c, 0x65, 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x34, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x18, 0x0a, 0x07,
+ 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x63,
+ 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x22, 0x3e, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d,
+ 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07,
+ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x75, 0x0a, 0x0f, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28,
+ 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x73, 0x22, 0xf3, 0x01,
+ 0x0a, 0x16, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61,
+ 0x67, 0x65, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x46, 0x0a, 0x07, 0x70, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x70,
+ 0x6f, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c,
+ 0x75, 0x64, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x6e,
+ 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e,
+ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x6e,
+ 0x63, 0x6c, 0x75, 0x64, 0x65, 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79,
+ 0x70, 0x65, 0x73, 0x22, 0xc2, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x4d, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6f,
+ 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x58,
+ 0x0a, 0x11, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72,
+ 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c,
+ 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c,
+ 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0xa3, 0x02, 0x0a, 0x17, 0x47, 0x65, 0x6e,
+ 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05,
+ 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+ 0x65, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d,
+ 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d,
+ 0x65, 0x12, 0x29, 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x74, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x0a, 0x0f,
+ 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x49, 0x6d,
+ 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
+ 0x5f, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
+ 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0xad,
+ 0x01, 0x0a, 0x18, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x05, 0x66,
+ 0x69, 0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x05, 0x66,
+ 0x69, 0x6c, 0x65, 0x73, 0x12, 0x58, 0x0a, 0x11, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f,
+ 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75,
+ 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x10, 0x72, 0x75,
+ 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x32, 0x90,
+ 0x02, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69,
+ 0x63, 0x65, 0x12, 0x7c, 0x0a, 0x0f, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x7f, 0x0a, 0x10, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x12, 0x34, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x42, 0x9d, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0d, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f,
+ 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0xb8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66,
+ 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41,
+ 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70,
+ 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_generate_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_generate_proto_rawDescData = file_buf_alpha_registry_v1alpha1_generate_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_generate_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_generate_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_generate_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_generate_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_generate_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_buf_alpha_registry_v1alpha1_generate_proto_goTypes = []interface{}{
+ (*File)(nil), // 0: buf.alpha.registry.v1alpha1.File
+ (*RuntimeLibrary)(nil), // 1: buf.alpha.registry.v1alpha1.RuntimeLibrary
+ (*PluginReference)(nil), // 2: buf.alpha.registry.v1alpha1.PluginReference
+ (*GeneratePluginsRequest)(nil), // 3: buf.alpha.registry.v1alpha1.GeneratePluginsRequest
+ (*GeneratePluginsResponse)(nil), // 4: buf.alpha.registry.v1alpha1.GeneratePluginsResponse
+ (*GenerateTemplateRequest)(nil), // 5: buf.alpha.registry.v1alpha1.GenerateTemplateRequest
+ (*GenerateTemplateResponse)(nil), // 6: buf.alpha.registry.v1alpha1.GenerateTemplateResponse
+ (*v1.Image)(nil), // 7: buf.alpha.image.v1.Image
+ (*pluginpb.CodeGeneratorResponse)(nil), // 8: google.protobuf.compiler.CodeGeneratorResponse
+}
+var file_buf_alpha_registry_v1alpha1_generate_proto_depIdxs = []int32{
+ 7, // 0: buf.alpha.registry.v1alpha1.GeneratePluginsRequest.image:type_name -> buf.alpha.image.v1.Image
+ 2, // 1: buf.alpha.registry.v1alpha1.GeneratePluginsRequest.plugins:type_name -> buf.alpha.registry.v1alpha1.PluginReference
+ 8, // 2: buf.alpha.registry.v1alpha1.GeneratePluginsResponse.responses:type_name -> google.protobuf.compiler.CodeGeneratorResponse
+ 1, // 3: buf.alpha.registry.v1alpha1.GeneratePluginsResponse.runtime_libraries:type_name -> buf.alpha.registry.v1alpha1.RuntimeLibrary
+ 7, // 4: buf.alpha.registry.v1alpha1.GenerateTemplateRequest.image:type_name -> buf.alpha.image.v1.Image
+ 0, // 5: buf.alpha.registry.v1alpha1.GenerateTemplateResponse.files:type_name -> buf.alpha.registry.v1alpha1.File
+ 1, // 6: buf.alpha.registry.v1alpha1.GenerateTemplateResponse.runtime_libraries:type_name -> buf.alpha.registry.v1alpha1.RuntimeLibrary
+ 3, // 7: buf.alpha.registry.v1alpha1.GenerateService.GeneratePlugins:input_type -> buf.alpha.registry.v1alpha1.GeneratePluginsRequest
+ 5, // 8: buf.alpha.registry.v1alpha1.GenerateService.GenerateTemplate:input_type -> buf.alpha.registry.v1alpha1.GenerateTemplateRequest
+ 4, // 9: buf.alpha.registry.v1alpha1.GenerateService.GeneratePlugins:output_type -> buf.alpha.registry.v1alpha1.GeneratePluginsResponse
+ 6, // 10: buf.alpha.registry.v1alpha1.GenerateService.GenerateTemplate:output_type -> buf.alpha.registry.v1alpha1.GenerateTemplateResponse
+ 9, // [9:11] is the sub-list for method output_type
+ 7, // [7:9] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_generate_proto_init() }
+func file_buf_alpha_registry_v1alpha1_generate_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_generate_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*File); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RuntimeLibrary); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PluginReference); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GeneratePluginsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GeneratePluginsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GenerateTemplateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GenerateTemplateResponse); 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_buf_alpha_registry_v1alpha1_generate_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_generate_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_generate_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_generate_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_generate_proto = out.File
+ file_buf_alpha_registry_v1alpha1_generate_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_generate_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_generate_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/github.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/github.pb.go
new file mode 100644
index 000000000..23edd09a9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/github.pb.go
@@ -0,0 +1,308 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/github.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type GithubAppConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ AppId string `protobuf:"bytes,1,opt,name=app_id,json=appId,proto3" json:"app_id,omitempty"`
+}
+
+func (x *GithubAppConfig) Reset() {
+ *x = GithubAppConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_github_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GithubAppConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GithubAppConfig) ProtoMessage() {}
+
+func (x *GithubAppConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_github_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 GithubAppConfig.ProtoReflect.Descriptor instead.
+func (*GithubAppConfig) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_github_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GithubAppConfig) GetAppId() string {
+ if x != nil {
+ return x.AppId
+ }
+ return ""
+}
+
+type GetGithubAppConfigRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *GetGithubAppConfigRequest) Reset() {
+ *x = GetGithubAppConfigRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_github_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetGithubAppConfigRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetGithubAppConfigRequest) ProtoMessage() {}
+
+func (x *GetGithubAppConfigRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_github_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 GetGithubAppConfigRequest.ProtoReflect.Descriptor instead.
+func (*GetGithubAppConfigRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_github_proto_rawDescGZIP(), []int{1}
+}
+
+type GetGithubAppConfigResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ AppConfig *GithubAppConfig `protobuf:"bytes,1,opt,name=app_config,json=appConfig,proto3" json:"app_config,omitempty"`
+}
+
+func (x *GetGithubAppConfigResponse) Reset() {
+ *x = GetGithubAppConfigResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_github_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetGithubAppConfigResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetGithubAppConfigResponse) ProtoMessage() {}
+
+func (x *GetGithubAppConfigResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_github_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 GetGithubAppConfigResponse.ProtoReflect.Descriptor instead.
+func (*GetGithubAppConfigResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_github_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *GetGithubAppConfigResponse) GetAppConfig() *GithubAppConfig {
+ if x != nil {
+ return x.AppConfig
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_github_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_github_proto_rawDesc = []byte{
+ 0x0a, 0x28, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x28, 0x0a, 0x0f, 0x47, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x15, 0x0a, 0x06, 0x61, 0x70,
+ 0x70, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x49,
+ 0x64, 0x22, 0x1b, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x41, 0x70,
+ 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x69,
+ 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x41, 0x70, 0x70, 0x43, 0x6f,
+ 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0a,
+ 0x61, 0x70, 0x70, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x09,
+ 0x61, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x32, 0x97, 0x01, 0x0a, 0x0d, 0x47, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x12,
+ 0x47, 0x65, 0x74, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66,
+ 0x69, 0x67, 0x12, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x47, 0x65, 0x74, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x47, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x41, 0x70, 0x70, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x42, 0x98, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x47, 0x69, 0x74, 0x68, 0x75, 0x62, 0x50,
+ 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63,
+ 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f,
+ 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c,
+ 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e,
+ 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_github_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_github_proto_rawDescData = file_buf_alpha_registry_v1alpha1_github_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_github_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_github_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_github_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_github_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_github_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_github_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_buf_alpha_registry_v1alpha1_github_proto_goTypes = []interface{}{
+ (*GithubAppConfig)(nil), // 0: buf.alpha.registry.v1alpha1.GithubAppConfig
+ (*GetGithubAppConfigRequest)(nil), // 1: buf.alpha.registry.v1alpha1.GetGithubAppConfigRequest
+ (*GetGithubAppConfigResponse)(nil), // 2: buf.alpha.registry.v1alpha1.GetGithubAppConfigResponse
+}
+var file_buf_alpha_registry_v1alpha1_github_proto_depIdxs = []int32{
+ 0, // 0: buf.alpha.registry.v1alpha1.GetGithubAppConfigResponse.app_config:type_name -> buf.alpha.registry.v1alpha1.GithubAppConfig
+ 1, // 1: buf.alpha.registry.v1alpha1.GithubService.GetGithubAppConfig:input_type -> buf.alpha.registry.v1alpha1.GetGithubAppConfigRequest
+ 2, // 2: buf.alpha.registry.v1alpha1.GithubService.GetGithubAppConfig:output_type -> buf.alpha.registry.v1alpha1.GetGithubAppConfigResponse
+ 2, // [2:3] is the sub-list for method output_type
+ 1, // [1:2] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_github_proto_init() }
+func file_buf_alpha_registry_v1alpha1_github_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_github_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_github_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GithubAppConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_github_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetGithubAppConfigRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_github_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetGithubAppConfigResponse); 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_buf_alpha_registry_v1alpha1_github_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_github_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_github_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_github_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_github_proto = out.File
+ file_buf_alpha_registry_v1alpha1_github_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_github_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_github_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/image.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/image.pb.go
new file mode 100644
index 000000000..e31249fff
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/image.pb.go
@@ -0,0 +1,404 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/image.proto
+
+package registryv1alpha1
+
+import (
+ v1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// ImageMask is used in GetImageRequest to specify which parts of an image
+// should be masked in responses.
+type ImageMask int32
+
+const (
+ ImageMask_IMAGE_MASK_UNSPECIFIED ImageMask = 0
+ // IMAGE_MASK_MESSAGES refers to ImageFile's `google.protobuf.DescriptorProto
+ // message_type` field.
+ ImageMask_IMAGE_MASK_MESSAGES ImageMask = 1
+ // IMAGE_MASK_ENUMS refers to ImageFile's `google.protobuf.EnumDescriptorProto
+ // enum_type` field.
+ ImageMask_IMAGE_MASK_ENUMS ImageMask = 2
+ // IMAGE_MASK_SERVICES refers to ImageFile's
+ // `google.protobuf.ServiceDescriptorProto service` field.
+ ImageMask_IMAGE_MASK_SERVICES ImageMask = 3
+)
+
+// Enum value maps for ImageMask.
+var (
+ ImageMask_name = map[int32]string{
+ 0: "IMAGE_MASK_UNSPECIFIED",
+ 1: "IMAGE_MASK_MESSAGES",
+ 2: "IMAGE_MASK_ENUMS",
+ 3: "IMAGE_MASK_SERVICES",
+ }
+ ImageMask_value = map[string]int32{
+ "IMAGE_MASK_UNSPECIFIED": 0,
+ "IMAGE_MASK_MESSAGES": 1,
+ "IMAGE_MASK_ENUMS": 2,
+ "IMAGE_MASK_SERVICES": 3,
+ }
+)
+
+func (x ImageMask) Enum() *ImageMask {
+ p := new(ImageMask)
+ *p = x
+ return p
+}
+
+func (x ImageMask) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ImageMask) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_image_proto_enumTypes[0].Descriptor()
+}
+
+func (ImageMask) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_image_proto_enumTypes[0]
+}
+
+func (x ImageMask) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ImageMask.Descriptor instead.
+func (ImageMask) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_image_proto_rawDescGZIP(), []int{0}
+}
+
+type GetImageRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+ // Exclude files from imported buf modules in this image.
+ ExcludeImports bool `protobuf:"varint,4,opt,name=exclude_imports,json=excludeImports,proto3" json:"exclude_imports,omitempty"`
+ // Exclude source_code_info fields from each ImageFile.
+ ExcludeSourceInfo bool `protobuf:"varint,5,opt,name=exclude_source_info,json=excludeSourceInfo,proto3" json:"exclude_source_info,omitempty"`
+ // When specified the returned image will only contain the necessary files and
+ // descriptors in those files to describe these types. Accepts messages, enums
+ // and services. All types must be defined in the buf module, types in
+ // dependencies are not accepted.
+ //
+ // At this time specifying `types` requires `exclude_source_info` to be set to
+ // true.
+ Types []string `protobuf:"bytes,6,rep,name=types,proto3" json:"types,omitempty"`
+ // When not empty, the returned image's files will only include
+ // *DescriptorProto fields for the elements specified here. The masks are
+ // applied without regard for dependencies between types. For example, if
+ // `IMAGE_MASK_MESSAGES` is specified without `IMAGE_MASK_ENUMS` the resulting
+ // image will NOT contain enum definitions even if they are referenced from
+ // message fields.
+ IncludeMask []ImageMask `protobuf:"varint,7,rep,packed,name=include_mask,json=includeMask,proto3,enum=buf.alpha.registry.v1alpha1.ImageMask" json:"include_mask,omitempty"`
+}
+
+func (x *GetImageRequest) Reset() {
+ *x = GetImageRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_image_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetImageRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetImageRequest) ProtoMessage() {}
+
+func (x *GetImageRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_image_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 GetImageRequest.ProtoReflect.Descriptor instead.
+func (*GetImageRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_image_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GetImageRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetImageRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *GetImageRequest) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+func (x *GetImageRequest) GetExcludeImports() bool {
+ if x != nil {
+ return x.ExcludeImports
+ }
+ return false
+}
+
+func (x *GetImageRequest) GetExcludeSourceInfo() bool {
+ if x != nil {
+ return x.ExcludeSourceInfo
+ }
+ return false
+}
+
+func (x *GetImageRequest) GetTypes() []string {
+ if x != nil {
+ return x.Types
+ }
+ return nil
+}
+
+func (x *GetImageRequest) GetIncludeMask() []ImageMask {
+ if x != nil {
+ return x.IncludeMask
+ }
+ return nil
+}
+
+type GetImageResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Image *v1.Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
+}
+
+func (x *GetImageResponse) Reset() {
+ *x = GetImageResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_image_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetImageResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetImageResponse) ProtoMessage() {}
+
+func (x *GetImageResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_image_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 GetImageResponse.ProtoReflect.Descriptor instead.
+func (*GetImageResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_image_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetImageResponse) GetImage() *v1.Image {
+ if x != nil {
+ return x.Image
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_image_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_image_proto_rawDesc = []byte{
+ 0x0a, 0x27, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6d,
+ 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1e, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9f, 0x02, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x49, 0x6d,
+ 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77,
+ 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,
+ 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x27,
+ 0x0a, 0x0f, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74,
+ 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65,
+ 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x2e, 0x0a, 0x13, 0x65, 0x78, 0x63, 0x6c, 0x75,
+ 0x64, 0x65, 0x5f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x69, 0x6e, 0x66, 0x6f, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x53, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73,
+ 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x12, 0x49, 0x0a,
+ 0x0c, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6d, 0x61, 0x73, 0x6b, 0x18, 0x07, 0x20,
+ 0x03, 0x28, 0x0e, 0x32, 0x26, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x52, 0x0b, 0x69, 0x6e, 0x63,
+ 0x6c, 0x75, 0x64, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x22, 0x43, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x49,
+ 0x6d, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2f, 0x0a, 0x05,
+ 0x69, 0x6d, 0x61, 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31,
+ 0x2e, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2a, 0x6f, 0x0a,
+ 0x09, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x4d, 0x61, 0x73, 0x6b, 0x12, 0x1a, 0x0a, 0x16, 0x49, 0x4d,
+ 0x41, 0x47, 0x45, 0x5f, 0x4d, 0x41, 0x53, 0x4b, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49,
+ 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f,
+ 0x4d, 0x41, 0x53, 0x4b, 0x5f, 0x4d, 0x45, 0x53, 0x53, 0x41, 0x47, 0x45, 0x53, 0x10, 0x01, 0x12,
+ 0x14, 0x0a, 0x10, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x4d, 0x41, 0x53, 0x4b, 0x5f, 0x45, 0x4e,
+ 0x55, 0x4d, 0x53, 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x5f, 0x4d,
+ 0x41, 0x53, 0x4b, 0x5f, 0x53, 0x45, 0x52, 0x56, 0x49, 0x43, 0x45, 0x53, 0x10, 0x03, 0x32, 0x77,
+ 0x0a, 0x0c, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x67,
+ 0x0a, 0x08, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x2c, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x97, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x49, 0x6d, 0x61,
+ 0x67, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62,
+ 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66,
+ 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41,
+ 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70,
+ 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_image_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_image_proto_rawDescData = file_buf_alpha_registry_v1alpha1_image_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_image_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_image_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_image_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_image_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_image_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_image_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_buf_alpha_registry_v1alpha1_image_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_buf_alpha_registry_v1alpha1_image_proto_goTypes = []interface{}{
+ (ImageMask)(0), // 0: buf.alpha.registry.v1alpha1.ImageMask
+ (*GetImageRequest)(nil), // 1: buf.alpha.registry.v1alpha1.GetImageRequest
+ (*GetImageResponse)(nil), // 2: buf.alpha.registry.v1alpha1.GetImageResponse
+ (*v1.Image)(nil), // 3: buf.alpha.image.v1.Image
+}
+var file_buf_alpha_registry_v1alpha1_image_proto_depIdxs = []int32{
+ 0, // 0: buf.alpha.registry.v1alpha1.GetImageRequest.include_mask:type_name -> buf.alpha.registry.v1alpha1.ImageMask
+ 3, // 1: buf.alpha.registry.v1alpha1.GetImageResponse.image:type_name -> buf.alpha.image.v1.Image
+ 1, // 2: buf.alpha.registry.v1alpha1.ImageService.GetImage:input_type -> buf.alpha.registry.v1alpha1.GetImageRequest
+ 2, // 3: buf.alpha.registry.v1alpha1.ImageService.GetImage:output_type -> buf.alpha.registry.v1alpha1.GetImageResponse
+ 3, // [3:4] is the sub-list for method output_type
+ 2, // [2:3] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_image_proto_init() }
+func file_buf_alpha_registry_v1alpha1_image_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_image_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_image_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetImageRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_image_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetImageResponse); 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_buf_alpha_registry_v1alpha1_image_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_image_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_image_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_image_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_image_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_image_proto = out.File
+ file_buf_alpha_registry_v1alpha1_image_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_image_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_image_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/jsonschema.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/jsonschema.pb.go
new file mode 100644
index 000000000..4e3cebb9d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/jsonschema.pb.go
@@ -0,0 +1,288 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/jsonschema.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type GetJSONSchemaRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+ // A fully qualified name of the type to generate a JSONSchema for, e.g.
+ // "pkg.foo.Bar". The type needs to resolve in the referenced module or any of
+ // its dependencies. Currently only messages types are supported.
+ TypeName string `protobuf:"bytes,4,opt,name=type_name,json=typeName,proto3" json:"type_name,omitempty"`
+}
+
+func (x *GetJSONSchemaRequest) Reset() {
+ *x = GetJSONSchemaRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_jsonschema_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetJSONSchemaRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetJSONSchemaRequest) ProtoMessage() {}
+
+func (x *GetJSONSchemaRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_jsonschema_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 GetJSONSchemaRequest.ProtoReflect.Descriptor instead.
+func (*GetJSONSchemaRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GetJSONSchemaRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetJSONSchemaRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *GetJSONSchemaRequest) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+func (x *GetJSONSchemaRequest) GetTypeName() string {
+ if x != nil {
+ return x.TypeName
+ }
+ return ""
+}
+
+type GetJSONSchemaResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A json schema representing what the json encoded payload for type_name
+ // should conform to. This schema is an approximation to be used by editors
+ // for validation and autocompletion, not a lossless representation of the
+ // type's descriptor.
+ JsonSchema []byte `protobuf:"bytes,1,opt,name=json_schema,json=jsonSchema,proto3" json:"json_schema,omitempty"`
+}
+
+func (x *GetJSONSchemaResponse) Reset() {
+ *x = GetJSONSchemaResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_jsonschema_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetJSONSchemaResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetJSONSchemaResponse) ProtoMessage() {}
+
+func (x *GetJSONSchemaResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_jsonschema_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 GetJSONSchemaResponse.ProtoReflect.Descriptor instead.
+func (*GetJSONSchemaResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetJSONSchemaResponse) GetJsonSchema() []byte {
+ if x != nil {
+ return x.JsonSchema
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_jsonschema_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDesc = []byte{
+ 0x0a, 0x2c, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6a, 0x73,
+ 0x6f, 0x6e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x87, 0x01, 0x0a, 0x14,
+ 0x47, 0x65, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65,
+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x74, 0x79, 0x70, 0x65,
+ 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x74, 0x79, 0x70,
+ 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x38, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4a, 0x53, 0x4f, 0x4e,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f,
+ 0x0a, 0x0b, 0x6a, 0x73, 0x6f, 0x6e, 0x5f, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6a, 0x73, 0x6f, 0x6e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x32,
+ 0x8b, 0x01, 0x0a, 0x11, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x65,
+ 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4a, 0x53, 0x4f, 0x4e,
+ 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x53, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4a, 0x53, 0x4f, 0x4e, 0x53,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x9c, 0x02,
+ 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x42, 0x0f, 0x4a, 0x73, 0x6f, 0x6e, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x50, 0x72, 0x6f,
+ 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d,
+ 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72,
+ 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
+ 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2,
+ 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c,
+ 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c,
+ 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75,
+ 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDescData = file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_jsonschema_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_buf_alpha_registry_v1alpha1_jsonschema_proto_goTypes = []interface{}{
+ (*GetJSONSchemaRequest)(nil), // 0: buf.alpha.registry.v1alpha1.GetJSONSchemaRequest
+ (*GetJSONSchemaResponse)(nil), // 1: buf.alpha.registry.v1alpha1.GetJSONSchemaResponse
+}
+var file_buf_alpha_registry_v1alpha1_jsonschema_proto_depIdxs = []int32{
+ 0, // 0: buf.alpha.registry.v1alpha1.JSONSchemaService.GetJSONSchema:input_type -> buf.alpha.registry.v1alpha1.GetJSONSchemaRequest
+ 1, // 1: buf.alpha.registry.v1alpha1.JSONSchemaService.GetJSONSchema:output_type -> buf.alpha.registry.v1alpha1.GetJSONSchemaResponse
+ 1, // [1:2] is the sub-list for method output_type
+ 0, // [0:1] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_jsonschema_proto_init() }
+func file_buf_alpha_registry_v1alpha1_jsonschema_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_jsonschema_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_jsonschema_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetJSONSchemaRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_jsonschema_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetJSONSchemaResponse); 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_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_jsonschema_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_jsonschema_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_jsonschema_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_jsonschema_proto = out.File
+ file_buf_alpha_registry_v1alpha1_jsonschema_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_jsonschema_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_jsonschema_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/module.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/module.pb.go
new file mode 100644
index 000000000..4080d0341
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/module.pb.go
@@ -0,0 +1,322 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/module.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// LocalModuleReference is a local module reference.
+//
+// It does not include a remote.
+type LocalModuleReference struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ // either branch or commit
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+}
+
+func (x *LocalModuleReference) Reset() {
+ *x = LocalModuleReference{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_module_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LocalModuleReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LocalModuleReference) ProtoMessage() {}
+
+func (x *LocalModuleReference) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_module_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 LocalModuleReference.ProtoReflect.Descriptor instead.
+func (*LocalModuleReference) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_module_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *LocalModuleReference) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *LocalModuleReference) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *LocalModuleReference) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+// LocalModulePin is a local module pin.
+//
+// It does not include a remote.
+type LocalModulePin struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ Branch string `protobuf:"bytes,3,opt,name=branch,proto3" json:"branch,omitempty"`
+ Commit string `protobuf:"bytes,4,opt,name=commit,proto3" json:"commit,omitempty"`
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ DraftName string `protobuf:"bytes,8,opt,name=draft_name,json=draftName,proto3" json:"draft_name,omitempty"`
+}
+
+func (x *LocalModulePin) Reset() {
+ *x = LocalModulePin{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_module_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LocalModulePin) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LocalModulePin) ProtoMessage() {}
+
+func (x *LocalModulePin) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_module_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 LocalModulePin.ProtoReflect.Descriptor instead.
+func (*LocalModulePin) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_module_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *LocalModulePin) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *LocalModulePin) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *LocalModulePin) GetBranch() string {
+ if x != nil {
+ return x.Branch
+ }
+ return ""
+}
+
+func (x *LocalModulePin) GetCommit() string {
+ if x != nil {
+ return x.Commit
+ }
+ return ""
+}
+
+func (x *LocalModulePin) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *LocalModulePin) GetDraftName() string {
+ if x != nil {
+ return x.DraftName
+ }
+ return ""
+}
+
+var File_buf_alpha_registry_v1alpha1_module_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_module_proto_rawDesc = []byte{
+ 0x0a, 0x28, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
+ 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x6a, 0x0a, 0x14, 0x4c, 0x6f, 0x63, 0x61,
+ 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
+ 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,
+ 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72,
+ 0x65, 0x6e, 0x63, 0x65, 0x22, 0xe0, 0x01, 0x0a, 0x0e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x16, 0x0a,
+ 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x62,
+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x16, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x3b, 0x0a,
+ 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x72,
+ 0x61, 0x66, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x64, 0x72, 0x61, 0x66, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x4a, 0x04, 0x08, 0x05, 0x10, 0x06, 0x52,
+ 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x42, 0x98, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x4d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f,
+ 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75,
+ 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c,
+ 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a,
+ 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_module_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_module_proto_rawDescData = file_buf_alpha_registry_v1alpha1_module_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_module_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_module_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_module_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_module_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_module_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_module_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_buf_alpha_registry_v1alpha1_module_proto_goTypes = []interface{}{
+ (*LocalModuleReference)(nil), // 0: buf.alpha.registry.v1alpha1.LocalModuleReference
+ (*LocalModulePin)(nil), // 1: buf.alpha.registry.v1alpha1.LocalModulePin
+ (*timestamppb.Timestamp)(nil), // 2: google.protobuf.Timestamp
+}
+var file_buf_alpha_registry_v1alpha1_module_proto_depIdxs = []int32{
+ 2, // 0: buf.alpha.registry.v1alpha1.LocalModulePin.create_time:type_name -> google.protobuf.Timestamp
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_module_proto_init() }
+func file_buf_alpha_registry_v1alpha1_module_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_module_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_module_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocalModuleReference); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_module_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocalModulePin); 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_buf_alpha_registry_v1alpha1_module_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_module_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_module_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_module_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_module_proto = out.File
+ file_buf_alpha_registry_v1alpha1_module_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_module_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_module_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/organization.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/organization.pb.go
new file mode 100644
index 000000000..0e2211c31
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/organization.pb.go
@@ -0,0 +1,2407 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/organization.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Organization struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // primary key, unique, immutable
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // immutable
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // mutable
+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
+ // unique, mutable
+ Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
+ // description is the user configurable description of the organization.
+ Description string `protobuf:"bytes,5,opt,name=description,proto3" json:"description,omitempty"`
+ // url is the user configurable URL in the description of the organization,
+ // always included the scheme and will not have a #fragment suffix.
+ Url string `protobuf:"bytes,6,opt,name=url,proto3" json:"url,omitempty"`
+ // verification status of the organization, configurable by server admin.
+ VerificationStatus VerificationStatus `protobuf:"varint,7,opt,name=verification_status,json=verificationStatus,proto3,enum=buf.alpha.registry.v1alpha1.VerificationStatus" json:"verification_status,omitempty"`
+}
+
+func (x *Organization) Reset() {
+ *x = Organization{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Organization) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Organization) ProtoMessage() {}
+
+func (x *Organization) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 Organization.ProtoReflect.Descriptor instead.
+func (*Organization) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Organization) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *Organization) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *Organization) GetUpdateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdateTime
+ }
+ return nil
+}
+
+func (x *Organization) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Organization) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Organization) GetUrl() string {
+ if x != nil {
+ return x.Url
+ }
+ return ""
+}
+
+func (x *Organization) GetVerificationStatus() VerificationStatus {
+ if x != nil {
+ return x.VerificationStatus
+ }
+ return VerificationStatus_VERIFICATION_STATUS_UNSPECIFIED
+}
+
+// OrganizationMembership is a nested structure that contains
+// the organization and user membership information on that organization.
+type OrganizationMembership struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Organization *Organization `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty"`
+ OrganizationRole OrganizationRole `protobuf:"varint,2,opt,name=organization_role,json=organizationRole,proto3,enum=buf.alpha.registry.v1alpha1.OrganizationRole" json:"organization_role,omitempty"`
+}
+
+func (x *OrganizationMembership) Reset() {
+ *x = OrganizationMembership{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OrganizationMembership) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OrganizationMembership) ProtoMessage() {}
+
+func (x *OrganizationMembership) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 OrganizationMembership.ProtoReflect.Descriptor instead.
+func (*OrganizationMembership) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *OrganizationMembership) GetOrganization() *Organization {
+ if x != nil {
+ return x.Organization
+ }
+ return nil
+}
+
+func (x *OrganizationMembership) GetOrganizationRole() OrganizationRole {
+ if x != nil {
+ return x.OrganizationRole
+ }
+ return OrganizationRole_ORGANIZATION_ROLE_UNSPECIFIED
+}
+
+type GetOrganizationRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *GetOrganizationRequest) Reset() {
+ *x = GetOrganizationRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetOrganizationRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetOrganizationRequest) ProtoMessage() {}
+
+func (x *GetOrganizationRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 GetOrganizationRequest.ProtoReflect.Descriptor instead.
+func (*GetOrganizationRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *GetOrganizationRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+type GetOrganizationResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Organization *Organization `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty"`
+}
+
+func (x *GetOrganizationResponse) Reset() {
+ *x = GetOrganizationResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetOrganizationResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetOrganizationResponse) ProtoMessage() {}
+
+func (x *GetOrganizationResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 GetOrganizationResponse.ProtoReflect.Descriptor instead.
+func (*GetOrganizationResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *GetOrganizationResponse) GetOrganization() *Organization {
+ if x != nil {
+ return x.Organization
+ }
+ return nil
+}
+
+type GetOrganizationByNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetOrganizationByNameRequest) Reset() {
+ *x = GetOrganizationByNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetOrganizationByNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetOrganizationByNameRequest) ProtoMessage() {}
+
+func (x *GetOrganizationByNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 GetOrganizationByNameRequest.ProtoReflect.Descriptor instead.
+func (*GetOrganizationByNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *GetOrganizationByNameRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GetOrganizationByNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Organization *Organization `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty"`
+}
+
+func (x *GetOrganizationByNameResponse) Reset() {
+ *x = GetOrganizationByNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetOrganizationByNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetOrganizationByNameResponse) ProtoMessage() {}
+
+func (x *GetOrganizationByNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 GetOrganizationByNameResponse.ProtoReflect.Descriptor instead.
+func (*GetOrganizationByNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *GetOrganizationByNameResponse) GetOrganization() *Organization {
+ if x != nil {
+ return x.Organization
+ }
+ return nil
+}
+
+type ListOrganizationsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListOrganizationsRequest) Reset() {
+ *x = ListOrganizationsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOrganizationsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOrganizationsRequest) ProtoMessage() {}
+
+func (x *ListOrganizationsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 ListOrganizationsRequest.ProtoReflect.Descriptor instead.
+func (*ListOrganizationsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *ListOrganizationsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListOrganizationsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListOrganizationsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListOrganizationsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Organizations []*Organization `protobuf:"bytes,1,rep,name=organizations,proto3" json:"organizations,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListOrganizationsResponse) Reset() {
+ *x = ListOrganizationsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOrganizationsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOrganizationsResponse) ProtoMessage() {}
+
+func (x *ListOrganizationsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 ListOrganizationsResponse.ProtoReflect.Descriptor instead.
+func (*ListOrganizationsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *ListOrganizationsResponse) GetOrganizations() []*Organization {
+ if x != nil {
+ return x.Organizations
+ }
+ return nil
+}
+
+func (x *ListOrganizationsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListUserOrganizationsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the user whose organizations should be listed.
+ UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListUserOrganizationsRequest) Reset() {
+ *x = ListUserOrganizationsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListUserOrganizationsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListUserOrganizationsRequest) ProtoMessage() {}
+
+func (x *ListUserOrganizationsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 ListUserOrganizationsRequest.ProtoReflect.Descriptor instead.
+func (*ListUserOrganizationsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *ListUserOrganizationsRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *ListUserOrganizationsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListUserOrganizationsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListUserOrganizationsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListUserOrganizationsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Organizations []*OrganizationMembership `protobuf:"bytes,1,rep,name=organizations,proto3" json:"organizations,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListUserOrganizationsResponse) Reset() {
+ *x = ListUserOrganizationsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListUserOrganizationsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListUserOrganizationsResponse) ProtoMessage() {}
+
+func (x *ListUserOrganizationsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 ListUserOrganizationsResponse.ProtoReflect.Descriptor instead.
+func (*ListUserOrganizationsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *ListUserOrganizationsResponse) GetOrganizations() []*OrganizationMembership {
+ if x != nil {
+ return x.Organizations
+ }
+ return nil
+}
+
+func (x *ListUserOrganizationsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type CreateOrganizationRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Must be unique across organizations.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *CreateOrganizationRequest) Reset() {
+ *x = CreateOrganizationRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateOrganizationRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateOrganizationRequest) ProtoMessage() {}
+
+func (x *CreateOrganizationRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 CreateOrganizationRequest.ProtoReflect.Descriptor instead.
+func (*CreateOrganizationRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *CreateOrganizationRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type CreateOrganizationResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Organization *Organization `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty"`
+}
+
+func (x *CreateOrganizationResponse) Reset() {
+ *x = CreateOrganizationResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateOrganizationResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateOrganizationResponse) ProtoMessage() {}
+
+func (x *CreateOrganizationResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 CreateOrganizationResponse.ProtoReflect.Descriptor instead.
+func (*CreateOrganizationResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *CreateOrganizationResponse) GetOrganization() *Organization {
+ if x != nil {
+ return x.Organization
+ }
+ return nil
+}
+
+type DeleteOrganizationRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *DeleteOrganizationRequest) Reset() {
+ *x = DeleteOrganizationRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteOrganizationRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteOrganizationRequest) ProtoMessage() {}
+
+func (x *DeleteOrganizationRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 DeleteOrganizationRequest.ProtoReflect.Descriptor instead.
+func (*DeleteOrganizationRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *DeleteOrganizationRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+type DeleteOrganizationResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteOrganizationResponse) Reset() {
+ *x = DeleteOrganizationResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteOrganizationResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteOrganizationResponse) ProtoMessage() {}
+
+func (x *DeleteOrganizationResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 DeleteOrganizationResponse.ProtoReflect.Descriptor instead.
+func (*DeleteOrganizationResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{13}
+}
+
+type DeleteOrganizationByNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *DeleteOrganizationByNameRequest) Reset() {
+ *x = DeleteOrganizationByNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteOrganizationByNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteOrganizationByNameRequest) ProtoMessage() {}
+
+func (x *DeleteOrganizationByNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 DeleteOrganizationByNameRequest.ProtoReflect.Descriptor instead.
+func (*DeleteOrganizationByNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *DeleteOrganizationByNameRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type DeleteOrganizationByNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteOrganizationByNameResponse) Reset() {
+ *x = DeleteOrganizationByNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteOrganizationByNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteOrganizationByNameResponse) ProtoMessage() {}
+
+func (x *DeleteOrganizationByNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 DeleteOrganizationByNameResponse.ProtoReflect.Descriptor instead.
+func (*DeleteOrganizationByNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{15}
+}
+
+type AddOrganizationMemberRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which the user will be added to.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+ // The ID of the user for which to be added to the organization.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ // The new role of the user in the organization.
+ OrganizationRole OrganizationRole `protobuf:"varint,3,opt,name=organization_role,json=organizationRole,proto3,enum=buf.alpha.registry.v1alpha1.OrganizationRole" json:"organization_role,omitempty"`
+}
+
+func (x *AddOrganizationMemberRequest) Reset() {
+ *x = AddOrganizationMemberRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AddOrganizationMemberRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddOrganizationMemberRequest) ProtoMessage() {}
+
+func (x *AddOrganizationMemberRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 AddOrganizationMemberRequest.ProtoReflect.Descriptor instead.
+func (*AddOrganizationMemberRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *AddOrganizationMemberRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+func (x *AddOrganizationMemberRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *AddOrganizationMemberRequest) GetOrganizationRole() OrganizationRole {
+ if x != nil {
+ return x.OrganizationRole
+ }
+ return OrganizationRole_ORGANIZATION_ROLE_UNSPECIFIED
+}
+
+type AddOrganizationMemberResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *AddOrganizationMemberResponse) Reset() {
+ *x = AddOrganizationMemberResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *AddOrganizationMemberResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*AddOrganizationMemberResponse) ProtoMessage() {}
+
+func (x *AddOrganizationMemberResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 AddOrganizationMemberResponse.ProtoReflect.Descriptor instead.
+func (*AddOrganizationMemberResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{17}
+}
+
+type UpdateOrganizationMemberRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which the member belongs to.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+ // The ID of the user for which to be updated the role.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ // The new role of the user in the organization.
+ OrganizationRole OrganizationRole `protobuf:"varint,3,opt,name=organization_role,json=organizationRole,proto3,enum=buf.alpha.registry.v1alpha1.OrganizationRole" json:"organization_role,omitempty"`
+}
+
+func (x *UpdateOrganizationMemberRequest) Reset() {
+ *x = UpdateOrganizationMemberRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateOrganizationMemberRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateOrganizationMemberRequest) ProtoMessage() {}
+
+func (x *UpdateOrganizationMemberRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 UpdateOrganizationMemberRequest.ProtoReflect.Descriptor instead.
+func (*UpdateOrganizationMemberRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *UpdateOrganizationMemberRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+func (x *UpdateOrganizationMemberRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *UpdateOrganizationMemberRequest) GetOrganizationRole() OrganizationRole {
+ if x != nil {
+ return x.OrganizationRole
+ }
+ return OrganizationRole_ORGANIZATION_ROLE_UNSPECIFIED
+}
+
+type UpdateOrganizationMemberResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateOrganizationMemberResponse) Reset() {
+ *x = UpdateOrganizationMemberResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateOrganizationMemberResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateOrganizationMemberResponse) ProtoMessage() {}
+
+func (x *UpdateOrganizationMemberResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 UpdateOrganizationMemberResponse.ProtoReflect.Descriptor instead.
+func (*UpdateOrganizationMemberResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{19}
+}
+
+type RemoveOrganizationMemberRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which the member belongs to.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+ // The ID of the user for which to be removed the role.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+}
+
+func (x *RemoveOrganizationMemberRequest) Reset() {
+ *x = RemoveOrganizationMemberRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveOrganizationMemberRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveOrganizationMemberRequest) ProtoMessage() {}
+
+func (x *RemoveOrganizationMemberRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 RemoveOrganizationMemberRequest.ProtoReflect.Descriptor instead.
+func (*RemoveOrganizationMemberRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *RemoveOrganizationMemberRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+func (x *RemoveOrganizationMemberRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+type RemoveOrganizationMemberResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *RemoveOrganizationMemberResponse) Reset() {
+ *x = RemoveOrganizationMemberResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RemoveOrganizationMemberResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RemoveOrganizationMemberResponse) ProtoMessage() {}
+
+func (x *RemoveOrganizationMemberResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 RemoveOrganizationMemberResponse.ProtoReflect.Descriptor instead.
+func (*RemoveOrganizationMemberResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{21}
+}
+
+type SetOrganizationMemberRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which the user's role will be set.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+ // The ID of the user whose role will be set.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ // The role to assign to the user.
+ // Setting UNSPECIFIED means removing the user's role.
+ OrganizationRole OrganizationRole `protobuf:"varint,3,opt,name=organization_role,json=organizationRole,proto3,enum=buf.alpha.registry.v1alpha1.OrganizationRole" json:"organization_role,omitempty"`
+}
+
+func (x *SetOrganizationMemberRequest) Reset() {
+ *x = SetOrganizationMemberRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetOrganizationMemberRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetOrganizationMemberRequest) ProtoMessage() {}
+
+func (x *SetOrganizationMemberRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 SetOrganizationMemberRequest.ProtoReflect.Descriptor instead.
+func (*SetOrganizationMemberRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *SetOrganizationMemberRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+func (x *SetOrganizationMemberRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *SetOrganizationMemberRequest) GetOrganizationRole() OrganizationRole {
+ if x != nil {
+ return x.OrganizationRole
+ }
+ return OrganizationRole_ORGANIZATION_ROLE_UNSPECIFIED
+}
+
+type SetOrganizationMemberResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *SetOrganizationMemberResponse) Reset() {
+ *x = SetOrganizationMemberResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetOrganizationMemberResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetOrganizationMemberResponse) ProtoMessage() {}
+
+func (x *SetOrganizationMemberResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 SetOrganizationMemberResponse.ProtoReflect.Descriptor instead.
+func (*SetOrganizationMemberResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{23}
+}
+
+type GetOrganizationSettingsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to get the settings.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+}
+
+func (x *GetOrganizationSettingsRequest) Reset() {
+ *x = GetOrganizationSettingsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetOrganizationSettingsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetOrganizationSettingsRequest) ProtoMessage() {}
+
+func (x *GetOrganizationSettingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 GetOrganizationSettingsRequest.ProtoReflect.Descriptor instead.
+func (*GetOrganizationSettingsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *GetOrganizationSettingsRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+type GetOrganizationSettingsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RepositoryBaseRole RepositoryRole `protobuf:"varint,1,opt,name=repository_base_role,json=repositoryBaseRole,proto3,enum=buf.alpha.registry.v1alpha1.RepositoryRole" json:"repository_base_role,omitempty"`
+ // Deprecated: Do not use.
+ PluginBaseRole PluginRole `protobuf:"varint,2,opt,name=plugin_base_role,json=pluginBaseRole,proto3,enum=buf.alpha.registry.v1alpha1.PluginRole" json:"plugin_base_role,omitempty"`
+ // Deprecated: Do not use.
+ TemplateBaseRole TemplateRole `protobuf:"varint,3,opt,name=template_base_role,json=templateBaseRole,proto3,enum=buf.alpha.registry.v1alpha1.TemplateRole" json:"template_base_role,omitempty"`
+ // The number of members in the organization.
+ MembersCount uint32 `protobuf:"varint,4,opt,name=members_count,json=membersCount,proto3" json:"members_count,omitempty"`
+}
+
+func (x *GetOrganizationSettingsResponse) Reset() {
+ *x = GetOrganizationSettingsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetOrganizationSettingsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetOrganizationSettingsResponse) ProtoMessage() {}
+
+func (x *GetOrganizationSettingsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 GetOrganizationSettingsResponse.ProtoReflect.Descriptor instead.
+func (*GetOrganizationSettingsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *GetOrganizationSettingsResponse) GetRepositoryBaseRole() RepositoryRole {
+ if x != nil {
+ return x.RepositoryBaseRole
+ }
+ return RepositoryRole_REPOSITORY_ROLE_UNSPECIFIED
+}
+
+// Deprecated: Do not use.
+func (x *GetOrganizationSettingsResponse) GetPluginBaseRole() PluginRole {
+ if x != nil {
+ return x.PluginBaseRole
+ }
+ return PluginRole_PLUGIN_ROLE_UNSPECIFIED
+}
+
+// Deprecated: Do not use.
+func (x *GetOrganizationSettingsResponse) GetTemplateBaseRole() TemplateRole {
+ if x != nil {
+ return x.TemplateBaseRole
+ }
+ return TemplateRole_TEMPLATE_ROLE_UNSPECIFIED
+}
+
+func (x *GetOrganizationSettingsResponse) GetMembersCount() uint32 {
+ if x != nil {
+ return x.MembersCount
+ }
+ return 0
+}
+
+type UpdateOrganizationSettingsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization for which to update the base roles.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+ // optional, no update to this base role will be made if this is unspecified.
+ RepositoryBaseRole RepositoryRole `protobuf:"varint,2,opt,name=repository_base_role,json=repositoryBaseRole,proto3,enum=buf.alpha.registry.v1alpha1.RepositoryRole" json:"repository_base_role,omitempty"`
+ // optional, no update to this base role will be made if this is unspecified.
+ //
+ // Deprecated: Do not use.
+ PluginBaseRole PluginRole `protobuf:"varint,3,opt,name=plugin_base_role,json=pluginBaseRole,proto3,enum=buf.alpha.registry.v1alpha1.PluginRole" json:"plugin_base_role,omitempty"`
+ // optional, no update to this base role will be made if this is unspecified.
+ //
+ // Deprecated: Do not use.
+ TemplateBaseRole TemplateRole `protobuf:"varint,4,opt,name=template_base_role,json=templateBaseRole,proto3,enum=buf.alpha.registry.v1alpha1.TemplateRole" json:"template_base_role,omitempty"`
+ // optional, update to description will only be made when this is present
+ Description *string `protobuf:"bytes,5,opt,name=description,proto3,oneof" json:"description,omitempty"`
+ // optional, update to url will only be made when this is present
+ Url *string `protobuf:"bytes,6,opt,name=url,proto3,oneof" json:"url,omitempty"`
+}
+
+func (x *UpdateOrganizationSettingsRequest) Reset() {
+ *x = UpdateOrganizationSettingsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateOrganizationSettingsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateOrganizationSettingsRequest) ProtoMessage() {}
+
+func (x *UpdateOrganizationSettingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 UpdateOrganizationSettingsRequest.ProtoReflect.Descriptor instead.
+func (*UpdateOrganizationSettingsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *UpdateOrganizationSettingsRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+func (x *UpdateOrganizationSettingsRequest) GetRepositoryBaseRole() RepositoryRole {
+ if x != nil {
+ return x.RepositoryBaseRole
+ }
+ return RepositoryRole_REPOSITORY_ROLE_UNSPECIFIED
+}
+
+// Deprecated: Do not use.
+func (x *UpdateOrganizationSettingsRequest) GetPluginBaseRole() PluginRole {
+ if x != nil {
+ return x.PluginBaseRole
+ }
+ return PluginRole_PLUGIN_ROLE_UNSPECIFIED
+}
+
+// Deprecated: Do not use.
+func (x *UpdateOrganizationSettingsRequest) GetTemplateBaseRole() TemplateRole {
+ if x != nil {
+ return x.TemplateBaseRole
+ }
+ return TemplateRole_TEMPLATE_ROLE_UNSPECIFIED
+}
+
+func (x *UpdateOrganizationSettingsRequest) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *UpdateOrganizationSettingsRequest) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+type UpdateOrganizationSettingsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateOrganizationSettingsResponse) Reset() {
+ *x = UpdateOrganizationSettingsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateOrganizationSettingsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateOrganizationSettingsResponse) ProtoMessage() {}
+
+func (x *UpdateOrganizationSettingsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_organization_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 UpdateOrganizationSettingsResponse.ProtoReflect.Descriptor instead.
+func (*UpdateOrganizationSettingsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP(), []int{27}
+}
+
+var File_buf_alpha_registry_v1alpha1_organization_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_organization_proto_rawDesc = []byte{
+ 0x0a, 0x2e, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x26, 0x62,
+ 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f,
+ 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc2, 0x02,
+ 0x0a, 0x0c, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e,
+ 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b,
+ 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
+ 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b,
+ 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10,
+ 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c,
+ 0x12, 0x60, 0x0a, 0x13, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69,
+ 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x12,
+ 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x22, 0xc3, 0x01, 0x0a, 0x16, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x12, 0x4d, 0x0a,
+ 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c,
+ 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x5a, 0x0a, 0x11,
+ 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x6c,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x28, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
+ 0x69, 0x64, 0x22, 0x68, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a,
+ 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c,
+ 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x32, 0x0a, 0x1c,
+ 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42,
+ 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x22, 0x6e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x4d, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x22, 0x70, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70,
+ 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65,
+ 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72,
+ 0x73, 0x65, 0x22, 0x94, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x4f, 0x0a, 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74,
+ 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8d, 0x01, 0x0a, 0x1c, 0x4c, 0x69,
+ 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73,
+ 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
+ 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
+ 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0xa2, 0x01, 0x0a, 0x1d, 0x4c, 0x69,
+ 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x0d, 0x6f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d,
+ 0x62, 0x65, 0x72, 0x73, 0x68, 0x69, 0x70, 0x52, 0x0d, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2f,
+ 0x0a, 0x19, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22,
+ 0x6b, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4d, 0x0a,
+ 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0c,
+ 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x2b, 0x0a, 0x19,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1c, 0x0a, 0x1a, 0x44, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x35, 0x0a, 0x1f, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e,
+ 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x22,
+ 0x0a, 0x20, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x1c, 0x41, 0x64, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69,
+ 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07,
+ 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
+ 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52,
+ 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c,
+ 0x65, 0x22, 0x1f, 0x0a, 0x1d, 0x41, 0x64, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x22, 0xbf, 0x01, 0x0a, 0x1f, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67,
+ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69,
+ 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12,
+ 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61,
+ 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f,
+ 0x6c, 0x65, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x22, 0x0a, 0x20, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x63, 0x0a, 0x1f, 0x52, 0x65, 0x6d, 0x6f,
+ 0x76, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65,
+ 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x22, 0x0a,
+ 0x20, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0xbc, 0x01, 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67,
+ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75,
+ 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73,
+ 0x65, 0x72, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x10,
+ 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65,
+ 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x49, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0xd9, 0x02, 0x0a,
+ 0x1f, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x5d, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x62,
+ 0x61, 0x73, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x12, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12,
+ 0x55, 0x0a, 0x10, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x72,
+ 0x6f, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f,
+ 0x6c, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x61,
+ 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x5b, 0x0a, 0x12, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x02, 0x18,
+ 0x01, 0x52, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x42, 0x61, 0x73, 0x65, 0x52,
+ 0x6f, 0x6c, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x5f, 0x63,
+ 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0c, 0x6d, 0x65, 0x6d, 0x62,
+ 0x65, 0x72, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0xb5, 0x03, 0x0a, 0x21, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53,
+ 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27,
+ 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x5d, 0x0a, 0x14, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f,
+ 0x6c, 0x65, 0x52, 0x12, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x61,
+ 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x0e, 0x70,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x5b, 0x0a,
+ 0x12, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x72,
+ 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x52, 0x6f, 0x6c, 0x65, 0x42, 0x02, 0x18, 0x01, 0x52, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x42, 0x61, 0x73, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65,
+ 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x48,
+ 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01,
+ 0x01, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01,
+ 0x52, 0x03, 0x75, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x75, 0x72, 0x6c,
+ 0x22, 0x24, 0x0a, 0x22, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69,
+ 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf1, 0x0e, 0x0a, 0x13, 0x4f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x7c,
+ 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8e, 0x01, 0x0a,
+ 0x15, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42,
+ 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01,
+ 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x12, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67,
+ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x39, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55,
+ 0x73, 0x65, 0x72, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x12,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65,
+ 0x12, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42,
+ 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8e, 0x01,
+ 0x0a, 0x15, 0x41, 0x64, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x41, 0x64, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x41, 0x64, 0x64, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x97,
+ 0x01, 0x0a, 0x18, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3c, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62,
+ 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x18, 0x52, 0x65, 0x6d,
+ 0x6f, 0x76, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
+ 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69,
+ 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x52, 0x65, 0x6d, 0x6f, 0x76, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69,
+ 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x39, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x6d, 0x62, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12,
+ 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65,
+ 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74,
+ 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
+ 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x1a, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
+ 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
+ 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x9e, 0x02, 0x0a, 0x1f, 0x63,
+ 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x11,
+ 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69,
+ 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
+ 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02,
+ 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47,
+ 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66,
+ 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_organization_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_organization_proto_rawDescData = file_buf_alpha_registry_v1alpha1_organization_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_organization_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_organization_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_organization_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_organization_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_organization_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes = make([]protoimpl.MessageInfo, 28)
+var file_buf_alpha_registry_v1alpha1_organization_proto_goTypes = []interface{}{
+ (*Organization)(nil), // 0: buf.alpha.registry.v1alpha1.Organization
+ (*OrganizationMembership)(nil), // 1: buf.alpha.registry.v1alpha1.OrganizationMembership
+ (*GetOrganizationRequest)(nil), // 2: buf.alpha.registry.v1alpha1.GetOrganizationRequest
+ (*GetOrganizationResponse)(nil), // 3: buf.alpha.registry.v1alpha1.GetOrganizationResponse
+ (*GetOrganizationByNameRequest)(nil), // 4: buf.alpha.registry.v1alpha1.GetOrganizationByNameRequest
+ (*GetOrganizationByNameResponse)(nil), // 5: buf.alpha.registry.v1alpha1.GetOrganizationByNameResponse
+ (*ListOrganizationsRequest)(nil), // 6: buf.alpha.registry.v1alpha1.ListOrganizationsRequest
+ (*ListOrganizationsResponse)(nil), // 7: buf.alpha.registry.v1alpha1.ListOrganizationsResponse
+ (*ListUserOrganizationsRequest)(nil), // 8: buf.alpha.registry.v1alpha1.ListUserOrganizationsRequest
+ (*ListUserOrganizationsResponse)(nil), // 9: buf.alpha.registry.v1alpha1.ListUserOrganizationsResponse
+ (*CreateOrganizationRequest)(nil), // 10: buf.alpha.registry.v1alpha1.CreateOrganizationRequest
+ (*CreateOrganizationResponse)(nil), // 11: buf.alpha.registry.v1alpha1.CreateOrganizationResponse
+ (*DeleteOrganizationRequest)(nil), // 12: buf.alpha.registry.v1alpha1.DeleteOrganizationRequest
+ (*DeleteOrganizationResponse)(nil), // 13: buf.alpha.registry.v1alpha1.DeleteOrganizationResponse
+ (*DeleteOrganizationByNameRequest)(nil), // 14: buf.alpha.registry.v1alpha1.DeleteOrganizationByNameRequest
+ (*DeleteOrganizationByNameResponse)(nil), // 15: buf.alpha.registry.v1alpha1.DeleteOrganizationByNameResponse
+ (*AddOrganizationMemberRequest)(nil), // 16: buf.alpha.registry.v1alpha1.AddOrganizationMemberRequest
+ (*AddOrganizationMemberResponse)(nil), // 17: buf.alpha.registry.v1alpha1.AddOrganizationMemberResponse
+ (*UpdateOrganizationMemberRequest)(nil), // 18: buf.alpha.registry.v1alpha1.UpdateOrganizationMemberRequest
+ (*UpdateOrganizationMemberResponse)(nil), // 19: buf.alpha.registry.v1alpha1.UpdateOrganizationMemberResponse
+ (*RemoveOrganizationMemberRequest)(nil), // 20: buf.alpha.registry.v1alpha1.RemoveOrganizationMemberRequest
+ (*RemoveOrganizationMemberResponse)(nil), // 21: buf.alpha.registry.v1alpha1.RemoveOrganizationMemberResponse
+ (*SetOrganizationMemberRequest)(nil), // 22: buf.alpha.registry.v1alpha1.SetOrganizationMemberRequest
+ (*SetOrganizationMemberResponse)(nil), // 23: buf.alpha.registry.v1alpha1.SetOrganizationMemberResponse
+ (*GetOrganizationSettingsRequest)(nil), // 24: buf.alpha.registry.v1alpha1.GetOrganizationSettingsRequest
+ (*GetOrganizationSettingsResponse)(nil), // 25: buf.alpha.registry.v1alpha1.GetOrganizationSettingsResponse
+ (*UpdateOrganizationSettingsRequest)(nil), // 26: buf.alpha.registry.v1alpha1.UpdateOrganizationSettingsRequest
+ (*UpdateOrganizationSettingsResponse)(nil), // 27: buf.alpha.registry.v1alpha1.UpdateOrganizationSettingsResponse
+ (*timestamppb.Timestamp)(nil), // 28: google.protobuf.Timestamp
+ (VerificationStatus)(0), // 29: buf.alpha.registry.v1alpha1.VerificationStatus
+ (OrganizationRole)(0), // 30: buf.alpha.registry.v1alpha1.OrganizationRole
+ (RepositoryRole)(0), // 31: buf.alpha.registry.v1alpha1.RepositoryRole
+ (PluginRole)(0), // 32: buf.alpha.registry.v1alpha1.PluginRole
+ (TemplateRole)(0), // 33: buf.alpha.registry.v1alpha1.TemplateRole
+}
+var file_buf_alpha_registry_v1alpha1_organization_proto_depIdxs = []int32{
+ 28, // 0: buf.alpha.registry.v1alpha1.Organization.create_time:type_name -> google.protobuf.Timestamp
+ 28, // 1: buf.alpha.registry.v1alpha1.Organization.update_time:type_name -> google.protobuf.Timestamp
+ 29, // 2: buf.alpha.registry.v1alpha1.Organization.verification_status:type_name -> buf.alpha.registry.v1alpha1.VerificationStatus
+ 0, // 3: buf.alpha.registry.v1alpha1.OrganizationMembership.organization:type_name -> buf.alpha.registry.v1alpha1.Organization
+ 30, // 4: buf.alpha.registry.v1alpha1.OrganizationMembership.organization_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole
+ 0, // 5: buf.alpha.registry.v1alpha1.GetOrganizationResponse.organization:type_name -> buf.alpha.registry.v1alpha1.Organization
+ 0, // 6: buf.alpha.registry.v1alpha1.GetOrganizationByNameResponse.organization:type_name -> buf.alpha.registry.v1alpha1.Organization
+ 0, // 7: buf.alpha.registry.v1alpha1.ListOrganizationsResponse.organizations:type_name -> buf.alpha.registry.v1alpha1.Organization
+ 1, // 8: buf.alpha.registry.v1alpha1.ListUserOrganizationsResponse.organizations:type_name -> buf.alpha.registry.v1alpha1.OrganizationMembership
+ 0, // 9: buf.alpha.registry.v1alpha1.CreateOrganizationResponse.organization:type_name -> buf.alpha.registry.v1alpha1.Organization
+ 30, // 10: buf.alpha.registry.v1alpha1.AddOrganizationMemberRequest.organization_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole
+ 30, // 11: buf.alpha.registry.v1alpha1.UpdateOrganizationMemberRequest.organization_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole
+ 30, // 12: buf.alpha.registry.v1alpha1.SetOrganizationMemberRequest.organization_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole
+ 31, // 13: buf.alpha.registry.v1alpha1.GetOrganizationSettingsResponse.repository_base_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole
+ 32, // 14: buf.alpha.registry.v1alpha1.GetOrganizationSettingsResponse.plugin_base_role:type_name -> buf.alpha.registry.v1alpha1.PluginRole
+ 33, // 15: buf.alpha.registry.v1alpha1.GetOrganizationSettingsResponse.template_base_role:type_name -> buf.alpha.registry.v1alpha1.TemplateRole
+ 31, // 16: buf.alpha.registry.v1alpha1.UpdateOrganizationSettingsRequest.repository_base_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole
+ 32, // 17: buf.alpha.registry.v1alpha1.UpdateOrganizationSettingsRequest.plugin_base_role:type_name -> buf.alpha.registry.v1alpha1.PluginRole
+ 33, // 18: buf.alpha.registry.v1alpha1.UpdateOrganizationSettingsRequest.template_base_role:type_name -> buf.alpha.registry.v1alpha1.TemplateRole
+ 2, // 19: buf.alpha.registry.v1alpha1.OrganizationService.GetOrganization:input_type -> buf.alpha.registry.v1alpha1.GetOrganizationRequest
+ 4, // 20: buf.alpha.registry.v1alpha1.OrganizationService.GetOrganizationByName:input_type -> buf.alpha.registry.v1alpha1.GetOrganizationByNameRequest
+ 6, // 21: buf.alpha.registry.v1alpha1.OrganizationService.ListOrganizations:input_type -> buf.alpha.registry.v1alpha1.ListOrganizationsRequest
+ 8, // 22: buf.alpha.registry.v1alpha1.OrganizationService.ListUserOrganizations:input_type -> buf.alpha.registry.v1alpha1.ListUserOrganizationsRequest
+ 10, // 23: buf.alpha.registry.v1alpha1.OrganizationService.CreateOrganization:input_type -> buf.alpha.registry.v1alpha1.CreateOrganizationRequest
+ 12, // 24: buf.alpha.registry.v1alpha1.OrganizationService.DeleteOrganization:input_type -> buf.alpha.registry.v1alpha1.DeleteOrganizationRequest
+ 14, // 25: buf.alpha.registry.v1alpha1.OrganizationService.DeleteOrganizationByName:input_type -> buf.alpha.registry.v1alpha1.DeleteOrganizationByNameRequest
+ 16, // 26: buf.alpha.registry.v1alpha1.OrganizationService.AddOrganizationMember:input_type -> buf.alpha.registry.v1alpha1.AddOrganizationMemberRequest
+ 18, // 27: buf.alpha.registry.v1alpha1.OrganizationService.UpdateOrganizationMember:input_type -> buf.alpha.registry.v1alpha1.UpdateOrganizationMemberRequest
+ 20, // 28: buf.alpha.registry.v1alpha1.OrganizationService.RemoveOrganizationMember:input_type -> buf.alpha.registry.v1alpha1.RemoveOrganizationMemberRequest
+ 22, // 29: buf.alpha.registry.v1alpha1.OrganizationService.SetOrganizationMember:input_type -> buf.alpha.registry.v1alpha1.SetOrganizationMemberRequest
+ 24, // 30: buf.alpha.registry.v1alpha1.OrganizationService.GetOrganizationSettings:input_type -> buf.alpha.registry.v1alpha1.GetOrganizationSettingsRequest
+ 26, // 31: buf.alpha.registry.v1alpha1.OrganizationService.UpdateOrganizationSettings:input_type -> buf.alpha.registry.v1alpha1.UpdateOrganizationSettingsRequest
+ 3, // 32: buf.alpha.registry.v1alpha1.OrganizationService.GetOrganization:output_type -> buf.alpha.registry.v1alpha1.GetOrganizationResponse
+ 5, // 33: buf.alpha.registry.v1alpha1.OrganizationService.GetOrganizationByName:output_type -> buf.alpha.registry.v1alpha1.GetOrganizationByNameResponse
+ 7, // 34: buf.alpha.registry.v1alpha1.OrganizationService.ListOrganizations:output_type -> buf.alpha.registry.v1alpha1.ListOrganizationsResponse
+ 9, // 35: buf.alpha.registry.v1alpha1.OrganizationService.ListUserOrganizations:output_type -> buf.alpha.registry.v1alpha1.ListUserOrganizationsResponse
+ 11, // 36: buf.alpha.registry.v1alpha1.OrganizationService.CreateOrganization:output_type -> buf.alpha.registry.v1alpha1.CreateOrganizationResponse
+ 13, // 37: buf.alpha.registry.v1alpha1.OrganizationService.DeleteOrganization:output_type -> buf.alpha.registry.v1alpha1.DeleteOrganizationResponse
+ 15, // 38: buf.alpha.registry.v1alpha1.OrganizationService.DeleteOrganizationByName:output_type -> buf.alpha.registry.v1alpha1.DeleteOrganizationByNameResponse
+ 17, // 39: buf.alpha.registry.v1alpha1.OrganizationService.AddOrganizationMember:output_type -> buf.alpha.registry.v1alpha1.AddOrganizationMemberResponse
+ 19, // 40: buf.alpha.registry.v1alpha1.OrganizationService.UpdateOrganizationMember:output_type -> buf.alpha.registry.v1alpha1.UpdateOrganizationMemberResponse
+ 21, // 41: buf.alpha.registry.v1alpha1.OrganizationService.RemoveOrganizationMember:output_type -> buf.alpha.registry.v1alpha1.RemoveOrganizationMemberResponse
+ 23, // 42: buf.alpha.registry.v1alpha1.OrganizationService.SetOrganizationMember:output_type -> buf.alpha.registry.v1alpha1.SetOrganizationMemberResponse
+ 25, // 43: buf.alpha.registry.v1alpha1.OrganizationService.GetOrganizationSettings:output_type -> buf.alpha.registry.v1alpha1.GetOrganizationSettingsResponse
+ 27, // 44: buf.alpha.registry.v1alpha1.OrganizationService.UpdateOrganizationSettings:output_type -> buf.alpha.registry.v1alpha1.UpdateOrganizationSettingsResponse
+ 32, // [32:45] is the sub-list for method output_type
+ 19, // [19:32] is the sub-list for method input_type
+ 19, // [19:19] is the sub-list for extension type_name
+ 19, // [19:19] is the sub-list for extension extendee
+ 0, // [0:19] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_organization_proto_init() }
+func file_buf_alpha_registry_v1alpha1_organization_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_organization_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_role_proto_init()
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Organization); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OrganizationMembership); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetOrganizationRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetOrganizationResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetOrganizationByNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetOrganizationByNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOrganizationsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOrganizationsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListUserOrganizationsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListUserOrganizationsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateOrganizationRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateOrganizationResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteOrganizationRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteOrganizationResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteOrganizationByNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteOrganizationByNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AddOrganizationMemberRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*AddOrganizationMemberResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateOrganizationMemberRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateOrganizationMemberResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveOrganizationMemberRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RemoveOrganizationMemberResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetOrganizationMemberRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetOrganizationMemberResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetOrganizationSettingsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetOrganizationSettingsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateOrganizationSettingsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateOrganizationSettingsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes[26].OneofWrappers = []interface{}{}
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_organization_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 28,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_organization_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_organization_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_organization_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_organization_proto = out.File
+ file_buf_alpha_registry_v1alpha1_organization_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_organization_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_organization_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/owner.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/owner.pb.go
new file mode 100644
index 000000000..11e2f04e0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/owner.pb.go
@@ -0,0 +1,375 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/owner.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Owner struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Owner:
+ //
+ // *Owner_User
+ // *Owner_Organization
+ Owner isOwner_Owner `protobuf_oneof:"owner"`
+}
+
+func (x *Owner) Reset() {
+ *x = Owner{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_owner_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Owner) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Owner) ProtoMessage() {}
+
+func (x *Owner) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_owner_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 Owner.ProtoReflect.Descriptor instead.
+func (*Owner) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_owner_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *Owner) GetOwner() isOwner_Owner {
+ if m != nil {
+ return m.Owner
+ }
+ return nil
+}
+
+func (x *Owner) GetUser() *User {
+ if x, ok := x.GetOwner().(*Owner_User); ok {
+ return x.User
+ }
+ return nil
+}
+
+func (x *Owner) GetOrganization() *Organization {
+ if x, ok := x.GetOwner().(*Owner_Organization); ok {
+ return x.Organization
+ }
+ return nil
+}
+
+type isOwner_Owner interface {
+ isOwner_Owner()
+}
+
+type Owner_User struct {
+ // The requested owner is a `User`.
+ User *User `protobuf:"bytes,1,opt,name=user,proto3,oneof"`
+}
+
+type Owner_Organization struct {
+ // The requested owner is a `Organization`.
+ Organization *Organization `protobuf:"bytes,2,opt,name=organization,proto3,oneof"`
+}
+
+func (*Owner_User) isOwner_Owner() {}
+
+func (*Owner_Organization) isOwner_Owner() {}
+
+type GetOwnerByNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name of the requested owner.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetOwnerByNameRequest) Reset() {
+ *x = GetOwnerByNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_owner_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetOwnerByNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetOwnerByNameRequest) ProtoMessage() {}
+
+func (x *GetOwnerByNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_owner_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 GetOwnerByNameRequest.ProtoReflect.Descriptor instead.
+func (*GetOwnerByNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_owner_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetOwnerByNameRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GetOwnerByNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner *Owner `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+}
+
+func (x *GetOwnerByNameResponse) Reset() {
+ *x = GetOwnerByNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_owner_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetOwnerByNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetOwnerByNameResponse) ProtoMessage() {}
+
+func (x *GetOwnerByNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_owner_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 GetOwnerByNameResponse.ProtoReflect.Descriptor instead.
+func (*GetOwnerByNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_owner_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *GetOwnerByNameResponse) GetOwner() *Owner {
+ if x != nil {
+ return x.Owner
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_owner_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_owner_proto_rawDesc = []byte{
+ 0x0a, 0x27, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x77,
+ 0x6e, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x2e, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x9a,
+ 0x01, 0x0a, 0x05, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x48, 0x00, 0x52, 0x04, 0x75, 0x73, 0x65,
+ 0x72, 0x12, 0x4f, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x2b, 0x0a, 0x15, 0x47,
+ 0x65, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x16, 0x47, 0x65, 0x74, 0x4f,
+ 0x77, 0x6e, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x38, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x32, 0x89, 0x01, 0x0a,
+ 0x0c, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x79, 0x0a,
+ 0x0e, 0x47, 0x65, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65,
+ 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x97, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0a, 0x4f, 0x77,
+ 0x6e, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f,
+ 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75,
+ 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c,
+ 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a,
+ 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_owner_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_owner_proto_rawDescData = file_buf_alpha_registry_v1alpha1_owner_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_owner_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_owner_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_owner_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_owner_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_owner_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_owner_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_buf_alpha_registry_v1alpha1_owner_proto_goTypes = []interface{}{
+ (*Owner)(nil), // 0: buf.alpha.registry.v1alpha1.Owner
+ (*GetOwnerByNameRequest)(nil), // 1: buf.alpha.registry.v1alpha1.GetOwnerByNameRequest
+ (*GetOwnerByNameResponse)(nil), // 2: buf.alpha.registry.v1alpha1.GetOwnerByNameResponse
+ (*User)(nil), // 3: buf.alpha.registry.v1alpha1.User
+ (*Organization)(nil), // 4: buf.alpha.registry.v1alpha1.Organization
+}
+var file_buf_alpha_registry_v1alpha1_owner_proto_depIdxs = []int32{
+ 3, // 0: buf.alpha.registry.v1alpha1.Owner.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 4, // 1: buf.alpha.registry.v1alpha1.Owner.organization:type_name -> buf.alpha.registry.v1alpha1.Organization
+ 0, // 2: buf.alpha.registry.v1alpha1.GetOwnerByNameResponse.owner:type_name -> buf.alpha.registry.v1alpha1.Owner
+ 1, // 3: buf.alpha.registry.v1alpha1.OwnerService.GetOwnerByName:input_type -> buf.alpha.registry.v1alpha1.GetOwnerByNameRequest
+ 2, // 4: buf.alpha.registry.v1alpha1.OwnerService.GetOwnerByName:output_type -> buf.alpha.registry.v1alpha1.GetOwnerByNameResponse
+ 4, // [4:5] is the sub-list for method output_type
+ 3, // [3:4] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_owner_proto_init() }
+func file_buf_alpha_registry_v1alpha1_owner_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_owner_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_organization_proto_init()
+ file_buf_alpha_registry_v1alpha1_user_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_owner_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Owner); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_owner_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetOwnerByNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_owner_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetOwnerByNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_owner_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*Owner_User)(nil),
+ (*Owner_Organization)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_owner_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_owner_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_owner_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_owner_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_owner_proto = out.File
+ file_buf_alpha_registry_v1alpha1_owner_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_owner_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_owner_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin.pb.go
new file mode 100644
index 000000000..59daf4737
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin.pb.go
@@ -0,0 +1,5520 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// buf/alpha/registry/v1alpha1/plugin.proto is a deprecated file.
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// PluginVisibility defines the visibility options available
+// for Plugins and Templates.
+type PluginVisibility int32
+
+const (
+ PluginVisibility_PLUGIN_VISIBILITY_UNSPECIFIED PluginVisibility = 0
+ PluginVisibility_PLUGIN_VISIBILITY_PUBLIC PluginVisibility = 1
+ PluginVisibility_PLUGIN_VISIBILITY_PRIVATE PluginVisibility = 2
+)
+
+// Enum value maps for PluginVisibility.
+var (
+ PluginVisibility_name = map[int32]string{
+ 0: "PLUGIN_VISIBILITY_UNSPECIFIED",
+ 1: "PLUGIN_VISIBILITY_PUBLIC",
+ 2: "PLUGIN_VISIBILITY_PRIVATE",
+ }
+ PluginVisibility_value = map[string]int32{
+ "PLUGIN_VISIBILITY_UNSPECIFIED": 0,
+ "PLUGIN_VISIBILITY_PUBLIC": 1,
+ "PLUGIN_VISIBILITY_PRIVATE": 2,
+ }
+)
+
+func (x PluginVisibility) Enum() *PluginVisibility {
+ p := new(PluginVisibility)
+ *p = x
+ return p
+}
+
+func (x PluginVisibility) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PluginVisibility) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_enumTypes[0].Descriptor()
+}
+
+func (PluginVisibility) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_plugin_proto_enumTypes[0]
+}
+
+func (x PluginVisibility) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use PluginVisibility.Descriptor instead.
+func (PluginVisibility) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{0}
+}
+
+// Plugin represents a protoc plugin, such as protoc-gen-go.
+type Plugin struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the plugin, which uniquely identifies the plugin.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // The name of the plugin, i.e. "protoc-gen-go".
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the owner of the plugin. Either a username or
+ // organization name.
+ Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The visibility of the plugin.
+ Visibility PluginVisibility `protobuf:"varint,4,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.PluginVisibility" json:"visibility,omitempty"`
+ // deprecated means this plugin is deprecated.
+ Deprecated bool `protobuf:"varint,5,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ // deprecation_message is the message shown if the plugin is deprecated.
+ DeprecationMessage string `protobuf:"bytes,6,opt,name=deprecation_message,json=deprecationMessage,proto3" json:"deprecation_message,omitempty"`
+ // The creation time of the plugin.
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // The last update time of the plugin object.
+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
+}
+
+func (x *Plugin) Reset() {
+ *x = Plugin{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Plugin) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Plugin) ProtoMessage() {}
+
+func (x *Plugin) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 Plugin.ProtoReflect.Descriptor instead.
+func (*Plugin) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Plugin) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *Plugin) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Plugin) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *Plugin) GetVisibility() PluginVisibility {
+ if x != nil {
+ return x.Visibility
+ }
+ return PluginVisibility_PLUGIN_VISIBILITY_UNSPECIFIED
+}
+
+func (x *Plugin) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+func (x *Plugin) GetDeprecationMessage() string {
+ if x != nil {
+ return x.DeprecationMessage
+ }
+ return ""
+}
+
+func (x *Plugin) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *Plugin) GetUpdateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdateTime
+ }
+ return nil
+}
+
+// PluginVersion represents a specific build of a plugin,
+// such as protoc-gen-go v1.4.0.
+type PluginVersion struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the plugin version, which uniquely identifies the plugin version.
+ // Mostly used for pagination.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // The name of the version, i.e. "v1.4.0".
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the plugin to which this version relates.
+ PluginName string `protobuf:"bytes,3,opt,name=plugin_name,json=pluginName,proto3" json:"plugin_name,omitempty"`
+ // The owner of the plugin to which this version relates.
+ PluginOwner string `protobuf:"bytes,4,opt,name=plugin_owner,json=pluginOwner,proto3" json:"plugin_owner,omitempty"`
+ // The full container image digest associated with this plugin version including
+ // the algorithm.
+ // Ref: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests
+ ContainerImageDigest string `protobuf:"bytes,5,opt,name=container_image_digest,json=containerImageDigest,proto3" json:"container_image_digest,omitempty"`
+ // Optionally define the runtime libraries.
+ RuntimeLibraries []*RuntimeLibrary `protobuf:"bytes,6,rep,name=runtime_libraries,json=runtimeLibraries,proto3" json:"runtime_libraries,omitempty"`
+}
+
+func (x *PluginVersion) Reset() {
+ *x = PluginVersion{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PluginVersion) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PluginVersion) ProtoMessage() {}
+
+func (x *PluginVersion) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 PluginVersion.ProtoReflect.Descriptor instead.
+func (*PluginVersion) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *PluginVersion) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *PluginVersion) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *PluginVersion) GetPluginName() string {
+ if x != nil {
+ return x.PluginName
+ }
+ return ""
+}
+
+func (x *PluginVersion) GetPluginOwner() string {
+ if x != nil {
+ return x.PluginOwner
+ }
+ return ""
+}
+
+func (x *PluginVersion) GetContainerImageDigest() string {
+ if x != nil {
+ return x.ContainerImageDigest
+ }
+ return ""
+}
+
+func (x *PluginVersion) GetRuntimeLibraries() []*RuntimeLibrary {
+ if x != nil {
+ return x.RuntimeLibraries
+ }
+ return nil
+}
+
+// Template defines a set of plugins that should be used together
+// i.e. "go-grpc" would include protoc-gen-go and protoc-gen-go-grpc.
+type Template struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the template, which uniquely identifies the template.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // The name of the template, i.e. "grpc-go".
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the owner of the template. Either a
+ // username or organization name.
+ Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
+ // Must not contain duplicate plugins. Order of plugin configs
+ // dictates insertion point order. Note that we're
+ // intentionally putting most of the plugin configuration
+ // in the template, so that template versions are
+ // less likely to cause breakages for users.
+ PluginConfigs []*PluginConfig `protobuf:"bytes,4,rep,name=plugin_configs,json=pluginConfigs,proto3" json:"plugin_configs,omitempty"`
+ // The visibility of the template.
+ Visibility PluginVisibility `protobuf:"varint,5,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.PluginVisibility" json:"visibility,omitempty"`
+ // deprecated means this template is deprecated.
+ Deprecated bool `protobuf:"varint,8,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ // deprecation_message is the message shown if the template is deprecated.
+ DeprecationMessage string `protobuf:"bytes,9,opt,name=deprecation_message,json=deprecationMessage,proto3" json:"deprecation_message,omitempty"`
+ // The creation time of the template.
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,10,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // The last update time of the template object.
+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,11,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
+}
+
+func (x *Template) Reset() {
+ *x = Template{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Template) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Template) ProtoMessage() {}
+
+func (x *Template) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 Template.ProtoReflect.Descriptor instead.
+func (*Template) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *Template) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *Template) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *Template) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *Template) GetPluginConfigs() []*PluginConfig {
+ if x != nil {
+ return x.PluginConfigs
+ }
+ return nil
+}
+
+func (x *Template) GetVisibility() PluginVisibility {
+ if x != nil {
+ return x.Visibility
+ }
+ return PluginVisibility_PLUGIN_VISIBILITY_UNSPECIFIED
+}
+
+func (x *Template) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+func (x *Template) GetDeprecationMessage() string {
+ if x != nil {
+ return x.DeprecationMessage
+ }
+ return ""
+}
+
+func (x *Template) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *Template) GetUpdateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdateTime
+ }
+ return nil
+}
+
+// PluginConfig defines a runtime configuration for a plugin.
+type PluginConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin to which this config relates.
+ PluginOwner string `protobuf:"bytes,1,opt,name=plugin_owner,json=pluginOwner,proto3" json:"plugin_owner,omitempty"`
+ // The name of the plugin to which this config relates.
+ PluginName string `protobuf:"bytes,2,opt,name=plugin_name,json=pluginName,proto3" json:"plugin_name,omitempty"`
+ // Parameters that should be provided to the plugin. These are
+ // joined with a "," before being provided to the plugin at runtime.
+ Parameters []string `protobuf:"bytes,3,rep,name=parameters,proto3" json:"parameters,omitempty"`
+ // True if the source plugin is inaccessible by the user.
+ Inaccessible bool `protobuf:"varint,5,opt,name=inaccessible,proto3" json:"inaccessible,omitempty"`
+}
+
+func (x *PluginConfig) Reset() {
+ *x = PluginConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PluginConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PluginConfig) ProtoMessage() {}
+
+func (x *PluginConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 PluginConfig.ProtoReflect.Descriptor instead.
+func (*PluginConfig) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *PluginConfig) GetPluginOwner() string {
+ if x != nil {
+ return x.PluginOwner
+ }
+ return ""
+}
+
+func (x *PluginConfig) GetPluginName() string {
+ if x != nil {
+ return x.PluginName
+ }
+ return ""
+}
+
+func (x *PluginConfig) GetParameters() []string {
+ if x != nil {
+ return x.Parameters
+ }
+ return nil
+}
+
+func (x *PluginConfig) GetInaccessible() bool {
+ if x != nil {
+ return x.Inaccessible
+ }
+ return false
+}
+
+// TemplateVersion defines a template at a
+// specific set of versions for the contained plugins.
+type TemplateVersion struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the template version, which uniquely identifies the template version.
+ // Mostly used for pagination.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // The name of the template version, i.e. "v1".
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The owner of the template to which this version relates.
+ TemplateOwner string `protobuf:"bytes,3,opt,name=template_owner,json=templateOwner,proto3" json:"template_owner,omitempty"`
+ // The name of the template to which this version relates.
+ TemplateName string `protobuf:"bytes,4,opt,name=template_name,json=templateName,proto3" json:"template_name,omitempty"`
+ // A map from plugin owner and name to version for the plugins
+ // defined in the template. Every plugin in the template
+ // must have a corresponding version in this array.
+ PluginVersions []*PluginVersionMapping `protobuf:"bytes,5,rep,name=plugin_versions,json=pluginVersions,proto3" json:"plugin_versions,omitempty"`
+}
+
+func (x *TemplateVersion) Reset() {
+ *x = TemplateVersion{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TemplateVersion) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TemplateVersion) ProtoMessage() {}
+
+func (x *TemplateVersion) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 TemplateVersion.ProtoReflect.Descriptor instead.
+func (*TemplateVersion) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *TemplateVersion) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *TemplateVersion) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *TemplateVersion) GetTemplateOwner() string {
+ if x != nil {
+ return x.TemplateOwner
+ }
+ return ""
+}
+
+func (x *TemplateVersion) GetTemplateName() string {
+ if x != nil {
+ return x.TemplateName
+ }
+ return ""
+}
+
+func (x *TemplateVersion) GetPluginVersions() []*PluginVersionMapping {
+ if x != nil {
+ return x.PluginVersions
+ }
+ return nil
+}
+
+// PluginVersionMapping maps a plugin_id to a version.
+type PluginVersionMapping struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin to which this mapping relates.
+ PluginOwner string `protobuf:"bytes,1,opt,name=plugin_owner,json=pluginOwner,proto3" json:"plugin_owner,omitempty"`
+ // The name of the plugin to which this mapping relates.
+ PluginName string `protobuf:"bytes,2,opt,name=plugin_name,json=pluginName,proto3" json:"plugin_name,omitempty"`
+ // The version of the plugin to use, i.e. "v1.4.0".
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ // True if the source plugin is inaccessible by the user.
+ Inaccessible bool `protobuf:"varint,5,opt,name=inaccessible,proto3" json:"inaccessible,omitempty"`
+}
+
+func (x *PluginVersionMapping) Reset() {
+ *x = PluginVersionMapping{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PluginVersionMapping) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PluginVersionMapping) ProtoMessage() {}
+
+func (x *PluginVersionMapping) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 PluginVersionMapping.ProtoReflect.Descriptor instead.
+func (*PluginVersionMapping) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *PluginVersionMapping) GetPluginOwner() string {
+ if x != nil {
+ return x.PluginOwner
+ }
+ return ""
+}
+
+func (x *PluginVersionMapping) GetPluginName() string {
+ if x != nil {
+ return x.PluginName
+ }
+ return ""
+}
+
+func (x *PluginVersionMapping) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *PluginVersionMapping) GetInaccessible() bool {
+ if x != nil {
+ return x.Inaccessible
+ }
+ return false
+}
+
+type PluginContributor struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+ // The ID of the plugin which the role belongs to.
+ PluginId string `protobuf:"bytes,2,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"`
+ // The role that the user has been explicitly assigned against the plugin.
+ ExplicitRole PluginRole `protobuf:"varint,3,opt,name=explicit_role,json=explicitRole,proto3,enum=buf.alpha.registry.v1alpha1.PluginRole" json:"explicit_role,omitempty"`
+ // Optionally defines the role that the user has implicitly against the plugin through the owning organization.
+ // If the plugin does not belong to an organization or the user is not part of the owning organization, this is unset.
+ ImplicitRole PluginRole `protobuf:"varint,4,opt,name=implicit_role,json=implicitRole,proto3,enum=buf.alpha.registry.v1alpha1.PluginRole" json:"implicit_role,omitempty"`
+}
+
+func (x *PluginContributor) Reset() {
+ *x = PluginContributor{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PluginContributor) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PluginContributor) ProtoMessage() {}
+
+func (x *PluginContributor) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 PluginContributor.ProtoReflect.Descriptor instead.
+func (*PluginContributor) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *PluginContributor) GetUser() *User {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+func (x *PluginContributor) GetPluginId() string {
+ if x != nil {
+ return x.PluginId
+ }
+ return ""
+}
+
+func (x *PluginContributor) GetExplicitRole() PluginRole {
+ if x != nil {
+ return x.ExplicitRole
+ }
+ return PluginRole_PLUGIN_ROLE_UNSPECIFIED
+}
+
+func (x *PluginContributor) GetImplicitRole() PluginRole {
+ if x != nil {
+ return x.ImplicitRole
+ }
+ return PluginRole_PLUGIN_ROLE_UNSPECIFIED
+}
+
+type TemplateContributor struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+ // The ID of the template which the role belongs to.
+ TemplateId string `protobuf:"bytes,2,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
+ // The role that the user has been explicitly assigned against the template.
+ ExplicitRole TemplateRole `protobuf:"varint,3,opt,name=explicit_role,json=explicitRole,proto3,enum=buf.alpha.registry.v1alpha1.TemplateRole" json:"explicit_role,omitempty"`
+ // Optionally defines the role that the user has implicitly against the template through the owning organization.
+ // If the template does not belong to an organization or the user is not part of the owning organization, this is unset.
+ ImplicitRole TemplateRole `protobuf:"varint,4,opt,name=implicit_role,json=implicitRole,proto3,enum=buf.alpha.registry.v1alpha1.TemplateRole" json:"implicit_role,omitempty"`
+}
+
+func (x *TemplateContributor) Reset() {
+ *x = TemplateContributor{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TemplateContributor) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TemplateContributor) ProtoMessage() {}
+
+func (x *TemplateContributor) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 TemplateContributor.ProtoReflect.Descriptor instead.
+func (*TemplateContributor) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *TemplateContributor) GetUser() *User {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+func (x *TemplateContributor) GetTemplateId() string {
+ if x != nil {
+ return x.TemplateId
+ }
+ return ""
+}
+
+func (x *TemplateContributor) GetExplicitRole() TemplateRole {
+ if x != nil {
+ return x.ExplicitRole
+ }
+ return TemplateRole_TEMPLATE_ROLE_UNSPECIFIED
+}
+
+func (x *TemplateContributor) GetImplicitRole() TemplateRole {
+ if x != nil {
+ return x.ImplicitRole
+ }
+ return TemplateRole_TEMPLATE_ROLE_UNSPECIFIED
+}
+
+type ListPluginsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListPluginsRequest) Reset() {
+ *x = ListPluginsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListPluginsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListPluginsRequest) ProtoMessage() {}
+
+func (x *ListPluginsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 ListPluginsRequest.ProtoReflect.Descriptor instead.
+func (*ListPluginsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *ListPluginsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListPluginsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListPluginsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListPluginsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Plugins []*Plugin `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListPluginsResponse) Reset() {
+ *x = ListPluginsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListPluginsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListPluginsResponse) ProtoMessage() {}
+
+func (x *ListPluginsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 ListPluginsResponse.ProtoReflect.Descriptor instead.
+func (*ListPluginsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *ListPluginsResponse) GetPlugins() []*Plugin {
+ if x != nil {
+ return x.Plugins
+ }
+ return nil
+}
+
+func (x *ListPluginsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListUserPluginsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner to list plugins for.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListUserPluginsRequest) Reset() {
+ *x = ListUserPluginsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListUserPluginsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListUserPluginsRequest) ProtoMessage() {}
+
+func (x *ListUserPluginsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 ListUserPluginsRequest.ProtoReflect.Descriptor instead.
+func (*ListUserPluginsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *ListUserPluginsRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *ListUserPluginsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListUserPluginsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListUserPluginsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListUserPluginsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Plugins []*Plugin `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListUserPluginsResponse) Reset() {
+ *x = ListUserPluginsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListUserPluginsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListUserPluginsResponse) ProtoMessage() {}
+
+func (x *ListUserPluginsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 ListUserPluginsResponse.ProtoReflect.Descriptor instead.
+func (*ListUserPluginsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *ListUserPluginsResponse) GetPlugins() []*Plugin {
+ if x != nil {
+ return x.Plugins
+ }
+ return nil
+}
+
+func (x *ListUserPluginsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListOrganizationPluginsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The organization to list plugins for.
+ Organization string `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListOrganizationPluginsRequest) Reset() {
+ *x = ListOrganizationPluginsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOrganizationPluginsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOrganizationPluginsRequest) ProtoMessage() {}
+
+func (x *ListOrganizationPluginsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 ListOrganizationPluginsRequest.ProtoReflect.Descriptor instead.
+func (*ListOrganizationPluginsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *ListOrganizationPluginsRequest) GetOrganization() string {
+ if x != nil {
+ return x.Organization
+ }
+ return ""
+}
+
+func (x *ListOrganizationPluginsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListOrganizationPluginsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListOrganizationPluginsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListOrganizationPluginsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Plugins []*Plugin `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListOrganizationPluginsResponse) Reset() {
+ *x = ListOrganizationPluginsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOrganizationPluginsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOrganizationPluginsResponse) ProtoMessage() {}
+
+func (x *ListOrganizationPluginsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 ListOrganizationPluginsResponse.ProtoReflect.Descriptor instead.
+func (*ListOrganizationPluginsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *ListOrganizationPluginsResponse) GetPlugins() []*Plugin {
+ if x != nil {
+ return x.Plugins
+ }
+ return nil
+}
+
+func (x *ListOrganizationPluginsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type GetPluginVersionRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin the version belongs to.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin the version belongs to.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the version.
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+}
+
+func (x *GetPluginVersionRequest) Reset() {
+ *x = GetPluginVersionRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetPluginVersionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetPluginVersionRequest) ProtoMessage() {}
+
+func (x *GetPluginVersionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 GetPluginVersionRequest.ProtoReflect.Descriptor instead.
+func (*GetPluginVersionRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *GetPluginVersionRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetPluginVersionRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *GetPluginVersionRequest) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+type GetPluginVersionResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PluginVersion *PluginVersion `protobuf:"bytes,1,opt,name=plugin_version,json=pluginVersion,proto3" json:"plugin_version,omitempty"`
+}
+
+func (x *GetPluginVersionResponse) Reset() {
+ *x = GetPluginVersionResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetPluginVersionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetPluginVersionResponse) ProtoMessage() {}
+
+func (x *GetPluginVersionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 GetPluginVersionResponse.ProtoReflect.Descriptor instead.
+func (*GetPluginVersionResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *GetPluginVersionResponse) GetPluginVersion() *PluginVersion {
+ if x != nil {
+ return x.PluginVersion
+ }
+ return nil
+}
+
+type ListPluginVersionsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin to list versions for.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin to list versions for.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The number of items to return.
+ PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,5,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListPluginVersionsRequest) Reset() {
+ *x = ListPluginVersionsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListPluginVersionsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListPluginVersionsRequest) ProtoMessage() {}
+
+func (x *ListPluginVersionsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 ListPluginVersionsRequest.ProtoReflect.Descriptor instead.
+func (*ListPluginVersionsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *ListPluginVersionsRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *ListPluginVersionsRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ListPluginVersionsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListPluginVersionsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListPluginVersionsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListPluginVersionsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PluginVersions []*PluginVersion `protobuf:"bytes,1,rep,name=plugin_versions,json=pluginVersions,proto3" json:"plugin_versions,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListPluginVersionsResponse) Reset() {
+ *x = ListPluginVersionsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListPluginVersionsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListPluginVersionsResponse) ProtoMessage() {}
+
+func (x *ListPluginVersionsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 ListPluginVersionsResponse.ProtoReflect.Descriptor instead.
+func (*ListPluginVersionsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *ListPluginVersionsResponse) GetPluginVersions() []*PluginVersion {
+ if x != nil {
+ return x.PluginVersions
+ }
+ return nil
+}
+
+func (x *ListPluginVersionsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type CreatePluginRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin. This must be either the name
+ // of the authenticated user or an organization the user is
+ // authorized to create plugins in.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin, i.e. "protoc-gen-go".
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // Whether the created plugin should be available to any user
+ // or only those authorized through organization membership
+ // or being the creator.
+ Visibility PluginVisibility `protobuf:"varint,3,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.PluginVisibility" json:"visibility,omitempty"`
+}
+
+func (x *CreatePluginRequest) Reset() {
+ *x = CreatePluginRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreatePluginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreatePluginRequest) ProtoMessage() {}
+
+func (x *CreatePluginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 CreatePluginRequest.ProtoReflect.Descriptor instead.
+func (*CreatePluginRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *CreatePluginRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *CreatePluginRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CreatePluginRequest) GetVisibility() PluginVisibility {
+ if x != nil {
+ return x.Visibility
+ }
+ return PluginVisibility_PLUGIN_VISIBILITY_UNSPECIFIED
+}
+
+type CreatePluginResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The created plugin.
+ Plugin *Plugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
+}
+
+func (x *CreatePluginResponse) Reset() {
+ *x = CreatePluginResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreatePluginResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreatePluginResponse) ProtoMessage() {}
+
+func (x *CreatePluginResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 CreatePluginResponse.ProtoReflect.Descriptor instead.
+func (*CreatePluginResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *CreatePluginResponse) GetPlugin() *Plugin {
+ if x != nil {
+ return x.Plugin
+ }
+ return nil
+}
+
+type GetPluginRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetPluginRequest) Reset() {
+ *x = GetPluginRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetPluginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetPluginRequest) ProtoMessage() {}
+
+func (x *GetPluginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 GetPluginRequest.ProtoReflect.Descriptor instead.
+func (*GetPluginRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *GetPluginRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetPluginRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GetPluginResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Plugin *Plugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
+}
+
+func (x *GetPluginResponse) Reset() {
+ *x = GetPluginResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetPluginResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetPluginResponse) ProtoMessage() {}
+
+func (x *GetPluginResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 GetPluginResponse.ProtoReflect.Descriptor instead.
+func (*GetPluginResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *GetPluginResponse) GetPlugin() *Plugin {
+ if x != nil {
+ return x.Plugin
+ }
+ return nil
+}
+
+type DeletePluginRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin to delete.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin to delete.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *DeletePluginRequest) Reset() {
+ *x = DeletePluginRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeletePluginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeletePluginRequest) ProtoMessage() {}
+
+func (x *DeletePluginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 DeletePluginRequest.ProtoReflect.Descriptor instead.
+func (*DeletePluginRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *DeletePluginRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *DeletePluginRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type DeletePluginResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeletePluginResponse) Reset() {
+ *x = DeletePluginResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeletePluginResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeletePluginResponse) ProtoMessage() {}
+
+func (x *DeletePluginResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 DeletePluginResponse.ProtoReflect.Descriptor instead.
+func (*DeletePluginResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{23}
+}
+
+type SetPluginContributorRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the plugin for which the user's role will be set.
+ PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"`
+ // The ID of the user whose role will be set.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ // The role to assign to the user.
+ // Setting UNSPECIFIED means removing the user's role.
+ PluginRole PluginRole `protobuf:"varint,3,opt,name=plugin_role,json=pluginRole,proto3,enum=buf.alpha.registry.v1alpha1.PluginRole" json:"plugin_role,omitempty"`
+}
+
+func (x *SetPluginContributorRequest) Reset() {
+ *x = SetPluginContributorRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetPluginContributorRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetPluginContributorRequest) ProtoMessage() {}
+
+func (x *SetPluginContributorRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 SetPluginContributorRequest.ProtoReflect.Descriptor instead.
+func (*SetPluginContributorRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *SetPluginContributorRequest) GetPluginId() string {
+ if x != nil {
+ return x.PluginId
+ }
+ return ""
+}
+
+func (x *SetPluginContributorRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *SetPluginContributorRequest) GetPluginRole() PluginRole {
+ if x != nil {
+ return x.PluginRole
+ }
+ return PluginRole_PLUGIN_ROLE_UNSPECIFIED
+}
+
+type SetPluginContributorResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *SetPluginContributorResponse) Reset() {
+ *x = SetPluginContributorResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetPluginContributorResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetPluginContributorResponse) ProtoMessage() {}
+
+func (x *SetPluginContributorResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 SetPluginContributorResponse.ProtoReflect.Descriptor instead.
+func (*SetPluginContributorResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{25}
+}
+
+type ListPluginContributorsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PluginId string `protobuf:"bytes,1,opt,name=plugin_id,json=pluginId,proto3" json:"plugin_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListPluginContributorsRequest) Reset() {
+ *x = ListPluginContributorsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListPluginContributorsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListPluginContributorsRequest) ProtoMessage() {}
+
+func (x *ListPluginContributorsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 ListPluginContributorsRequest.ProtoReflect.Descriptor instead.
+func (*ListPluginContributorsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *ListPluginContributorsRequest) GetPluginId() string {
+ if x != nil {
+ return x.PluginId
+ }
+ return ""
+}
+
+func (x *ListPluginContributorsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListPluginContributorsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListPluginContributorsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListPluginContributorsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Users []*PluginContributor `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListPluginContributorsResponse) Reset() {
+ *x = ListPluginContributorsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListPluginContributorsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListPluginContributorsResponse) ProtoMessage() {}
+
+func (x *ListPluginContributorsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 ListPluginContributorsResponse.ProtoReflect.Descriptor instead.
+func (*ListPluginContributorsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *ListPluginContributorsResponse) GetUsers() []*PluginContributor {
+ if x != nil {
+ return x.Users
+ }
+ return nil
+}
+
+func (x *ListPluginContributorsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type DeprecatePluginRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // A message shown along with the deprecation warning for this plugin.
+ Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
+}
+
+func (x *DeprecatePluginRequest) Reset() {
+ *x = DeprecatePluginRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeprecatePluginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeprecatePluginRequest) ProtoMessage() {}
+
+func (x *DeprecatePluginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 DeprecatePluginRequest.ProtoReflect.Descriptor instead.
+func (*DeprecatePluginRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *DeprecatePluginRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *DeprecatePluginRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DeprecatePluginRequest) GetMessage() string {
+ if x != nil {
+ return x.Message
+ }
+ return ""
+}
+
+type DeprecatePluginResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeprecatePluginResponse) Reset() {
+ *x = DeprecatePluginResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeprecatePluginResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeprecatePluginResponse) ProtoMessage() {}
+
+func (x *DeprecatePluginResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 DeprecatePluginResponse.ProtoReflect.Descriptor instead.
+func (*DeprecatePluginResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{29}
+}
+
+type UndeprecatePluginRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *UndeprecatePluginRequest) Reset() {
+ *x = UndeprecatePluginRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UndeprecatePluginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UndeprecatePluginRequest) ProtoMessage() {}
+
+func (x *UndeprecatePluginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 UndeprecatePluginRequest.ProtoReflect.Descriptor instead.
+func (*UndeprecatePluginRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *UndeprecatePluginRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *UndeprecatePluginRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type UndeprecatePluginResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UndeprecatePluginResponse) Reset() {
+ *x = UndeprecatePluginResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UndeprecatePluginResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UndeprecatePluginResponse) ProtoMessage() {}
+
+func (x *UndeprecatePluginResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_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 UndeprecatePluginResponse.ProtoReflect.Descriptor instead.
+func (*UndeprecatePluginResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{31}
+}
+
+type GetTemplateRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the template.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the template.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetTemplateRequest) Reset() {
+ *x = GetTemplateRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetTemplateRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetTemplateRequest) ProtoMessage() {}
+
+func (x *GetTemplateRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[32]
+ 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 GetTemplateRequest.ProtoReflect.Descriptor instead.
+func (*GetTemplateRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *GetTemplateRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetTemplateRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GetTemplateResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Template *Template `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"`
+}
+
+func (x *GetTemplateResponse) Reset() {
+ *x = GetTemplateResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetTemplateResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetTemplateResponse) ProtoMessage() {}
+
+func (x *GetTemplateResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[33]
+ 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 GetTemplateResponse.ProtoReflect.Descriptor instead.
+func (*GetTemplateResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *GetTemplateResponse) GetTemplate() *Template {
+ if x != nil {
+ return x.Template
+ }
+ return nil
+}
+
+type ListTemplatesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListTemplatesRequest) Reset() {
+ *x = ListTemplatesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListTemplatesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListTemplatesRequest) ProtoMessage() {}
+
+func (x *ListTemplatesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[34]
+ 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 ListTemplatesRequest.ProtoReflect.Descriptor instead.
+func (*ListTemplatesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{34}
+}
+
+func (x *ListTemplatesRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListTemplatesRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListTemplatesRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListTemplatesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Templates []*Template `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListTemplatesResponse) Reset() {
+ *x = ListTemplatesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListTemplatesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListTemplatesResponse) ProtoMessage() {}
+
+func (x *ListTemplatesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[35]
+ 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 ListTemplatesResponse.ProtoReflect.Descriptor instead.
+func (*ListTemplatesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{35}
+}
+
+func (x *ListTemplatesResponse) GetTemplates() []*Template {
+ if x != nil {
+ return x.Templates
+ }
+ return nil
+}
+
+func (x *ListTemplatesResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListTemplatesUserCanAccessRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListTemplatesUserCanAccessRequest) Reset() {
+ *x = ListTemplatesUserCanAccessRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListTemplatesUserCanAccessRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListTemplatesUserCanAccessRequest) ProtoMessage() {}
+
+func (x *ListTemplatesUserCanAccessRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[36]
+ 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 ListTemplatesUserCanAccessRequest.ProtoReflect.Descriptor instead.
+func (*ListTemplatesUserCanAccessRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{36}
+}
+
+func (x *ListTemplatesUserCanAccessRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListTemplatesUserCanAccessRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListTemplatesUserCanAccessRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListTemplatesUserCanAccessResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Templates []*Template `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListTemplatesUserCanAccessResponse) Reset() {
+ *x = ListTemplatesUserCanAccessResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListTemplatesUserCanAccessResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListTemplatesUserCanAccessResponse) ProtoMessage() {}
+
+func (x *ListTemplatesUserCanAccessResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[37]
+ 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 ListTemplatesUserCanAccessResponse.ProtoReflect.Descriptor instead.
+func (*ListTemplatesUserCanAccessResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{37}
+}
+
+func (x *ListTemplatesUserCanAccessResponse) GetTemplates() []*Template {
+ if x != nil {
+ return x.Templates
+ }
+ return nil
+}
+
+func (x *ListTemplatesUserCanAccessResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListUserTemplatesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the templates to list for.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListUserTemplatesRequest) Reset() {
+ *x = ListUserTemplatesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListUserTemplatesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListUserTemplatesRequest) ProtoMessage() {}
+
+func (x *ListUserTemplatesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[38]
+ 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 ListUserTemplatesRequest.ProtoReflect.Descriptor instead.
+func (*ListUserTemplatesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{38}
+}
+
+func (x *ListUserTemplatesRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *ListUserTemplatesRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListUserTemplatesRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListUserTemplatesRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListUserTemplatesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Templates []*Template `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListUserTemplatesResponse) Reset() {
+ *x = ListUserTemplatesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListUserTemplatesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListUserTemplatesResponse) ProtoMessage() {}
+
+func (x *ListUserTemplatesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[39]
+ 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 ListUserTemplatesResponse.ProtoReflect.Descriptor instead.
+func (*ListUserTemplatesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{39}
+}
+
+func (x *ListUserTemplatesResponse) GetTemplates() []*Template {
+ if x != nil {
+ return x.Templates
+ }
+ return nil
+}
+
+func (x *ListUserTemplatesResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type GetTemplateVersionRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the template the version belongs to.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the template the version belongs to.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the version.
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+}
+
+func (x *GetTemplateVersionRequest) Reset() {
+ *x = GetTemplateVersionRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[40]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetTemplateVersionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetTemplateVersionRequest) ProtoMessage() {}
+
+func (x *GetTemplateVersionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[40]
+ 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 GetTemplateVersionRequest.ProtoReflect.Descriptor instead.
+func (*GetTemplateVersionRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{40}
+}
+
+func (x *GetTemplateVersionRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetTemplateVersionRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *GetTemplateVersionRequest) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+type GetTemplateVersionResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TemplateVersion *TemplateVersion `protobuf:"bytes,1,opt,name=template_version,json=templateVersion,proto3" json:"template_version,omitempty"`
+}
+
+func (x *GetTemplateVersionResponse) Reset() {
+ *x = GetTemplateVersionResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[41]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetTemplateVersionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetTemplateVersionResponse) ProtoMessage() {}
+
+func (x *GetTemplateVersionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[41]
+ 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 GetTemplateVersionResponse.ProtoReflect.Descriptor instead.
+func (*GetTemplateVersionResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{41}
+}
+
+func (x *GetTemplateVersionResponse) GetTemplateVersion() *TemplateVersion {
+ if x != nil {
+ return x.TemplateVersion
+ }
+ return nil
+}
+
+type ListOrganizationTemplatesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The organization of the templates to list for.
+ Organization string `protobuf:"bytes,1,opt,name=organization,proto3" json:"organization,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListOrganizationTemplatesRequest) Reset() {
+ *x = ListOrganizationTemplatesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[42]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOrganizationTemplatesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOrganizationTemplatesRequest) ProtoMessage() {}
+
+func (x *ListOrganizationTemplatesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[42]
+ 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 ListOrganizationTemplatesRequest.ProtoReflect.Descriptor instead.
+func (*ListOrganizationTemplatesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{42}
+}
+
+func (x *ListOrganizationTemplatesRequest) GetOrganization() string {
+ if x != nil {
+ return x.Organization
+ }
+ return ""
+}
+
+func (x *ListOrganizationTemplatesRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListOrganizationTemplatesRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListOrganizationTemplatesRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListOrganizationTemplatesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Templates []*Template `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListOrganizationTemplatesResponse) Reset() {
+ *x = ListOrganizationTemplatesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[43]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOrganizationTemplatesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOrganizationTemplatesResponse) ProtoMessage() {}
+
+func (x *ListOrganizationTemplatesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[43]
+ 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 ListOrganizationTemplatesResponse.ProtoReflect.Descriptor instead.
+func (*ListOrganizationTemplatesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{43}
+}
+
+func (x *ListOrganizationTemplatesResponse) GetTemplates() []*Template {
+ if x != nil {
+ return x.Templates
+ }
+ return nil
+}
+
+func (x *ListOrganizationTemplatesResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListTemplateVersionsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the template to list versions for.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the template to list versions for.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The number of items to return.
+ PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,5,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListTemplateVersionsRequest) Reset() {
+ *x = ListTemplateVersionsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[44]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListTemplateVersionsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListTemplateVersionsRequest) ProtoMessage() {}
+
+func (x *ListTemplateVersionsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[44]
+ 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 ListTemplateVersionsRequest.ProtoReflect.Descriptor instead.
+func (*ListTemplateVersionsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{44}
+}
+
+func (x *ListTemplateVersionsRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *ListTemplateVersionsRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *ListTemplateVersionsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListTemplateVersionsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListTemplateVersionsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListTemplateVersionsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TemplateVersions []*TemplateVersion `protobuf:"bytes,1,rep,name=template_versions,json=templateVersions,proto3" json:"template_versions,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListTemplateVersionsResponse) Reset() {
+ *x = ListTemplateVersionsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[45]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListTemplateVersionsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListTemplateVersionsResponse) ProtoMessage() {}
+
+func (x *ListTemplateVersionsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[45]
+ 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 ListTemplateVersionsResponse.ProtoReflect.Descriptor instead.
+func (*ListTemplateVersionsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{45}
+}
+
+func (x *ListTemplateVersionsResponse) GetTemplateVersions() []*TemplateVersion {
+ if x != nil {
+ return x.TemplateVersions
+ }
+ return nil
+}
+
+func (x *ListTemplateVersionsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type CreateTemplateRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the template. This will be either a username
+ // or organization name.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the template version, i.e. "grpc-go".
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // Whether the created template should be available to any user
+ // or only those authorized through organization membership
+ // or being the creator.
+ Visibility PluginVisibility `protobuf:"varint,3,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.PluginVisibility" json:"visibility,omitempty"`
+ // The plugins and associated runtime configuration that make
+ // up this template.
+ PluginConfigs []*PluginConfig `protobuf:"bytes,4,rep,name=plugin_configs,json=pluginConfigs,proto3" json:"plugin_configs,omitempty"`
+}
+
+func (x *CreateTemplateRequest) Reset() {
+ *x = CreateTemplateRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[46]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateTemplateRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateTemplateRequest) ProtoMessage() {}
+
+func (x *CreateTemplateRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[46]
+ 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 CreateTemplateRequest.ProtoReflect.Descriptor instead.
+func (*CreateTemplateRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{46}
+}
+
+func (x *CreateTemplateRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *CreateTemplateRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CreateTemplateRequest) GetVisibility() PluginVisibility {
+ if x != nil {
+ return x.Visibility
+ }
+ return PluginVisibility_PLUGIN_VISIBILITY_UNSPECIFIED
+}
+
+func (x *CreateTemplateRequest) GetPluginConfigs() []*PluginConfig {
+ if x != nil {
+ return x.PluginConfigs
+ }
+ return nil
+}
+
+type CreateTemplateResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The created template.
+ Template *Template `protobuf:"bytes,1,opt,name=template,proto3" json:"template,omitempty"`
+}
+
+func (x *CreateTemplateResponse) Reset() {
+ *x = CreateTemplateResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[47]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateTemplateResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateTemplateResponse) ProtoMessage() {}
+
+func (x *CreateTemplateResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[47]
+ 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 CreateTemplateResponse.ProtoReflect.Descriptor instead.
+func (*CreateTemplateResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{47}
+}
+
+func (x *CreateTemplateResponse) GetTemplate() *Template {
+ if x != nil {
+ return x.Template
+ }
+ return nil
+}
+
+type DeleteTemplateRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the template to delete.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the template to delete.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *DeleteTemplateRequest) Reset() {
+ *x = DeleteTemplateRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[48]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteTemplateRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteTemplateRequest) ProtoMessage() {}
+
+func (x *DeleteTemplateRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[48]
+ 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 DeleteTemplateRequest.ProtoReflect.Descriptor instead.
+func (*DeleteTemplateRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{48}
+}
+
+func (x *DeleteTemplateRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *DeleteTemplateRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type DeleteTemplateResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteTemplateResponse) Reset() {
+ *x = DeleteTemplateResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[49]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteTemplateResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteTemplateResponse) ProtoMessage() {}
+
+func (x *DeleteTemplateResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[49]
+ 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 DeleteTemplateResponse.ProtoReflect.Descriptor instead.
+func (*DeleteTemplateResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{49}
+}
+
+type CreateTemplateVersionRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the template version, i.e. "v1".
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The owner of the template.
+ TemplateOwner string `protobuf:"bytes,2,opt,name=template_owner,json=templateOwner,proto3" json:"template_owner,omitempty"`
+ // The name of the template.
+ TemplateName string `protobuf:"bytes,3,opt,name=template_name,json=templateName,proto3" json:"template_name,omitempty"`
+ // A map from plugin owner and name to version for the plugins
+ // defined in the template. Every plugin in the template
+ // must have a corresponding version in this array.
+ PluginVersions []*PluginVersionMapping `protobuf:"bytes,4,rep,name=plugin_versions,json=pluginVersions,proto3" json:"plugin_versions,omitempty"`
+}
+
+func (x *CreateTemplateVersionRequest) Reset() {
+ *x = CreateTemplateVersionRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[50]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateTemplateVersionRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateTemplateVersionRequest) ProtoMessage() {}
+
+func (x *CreateTemplateVersionRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[50]
+ 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 CreateTemplateVersionRequest.ProtoReflect.Descriptor instead.
+func (*CreateTemplateVersionRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{50}
+}
+
+func (x *CreateTemplateVersionRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CreateTemplateVersionRequest) GetTemplateOwner() string {
+ if x != nil {
+ return x.TemplateOwner
+ }
+ return ""
+}
+
+func (x *CreateTemplateVersionRequest) GetTemplateName() string {
+ if x != nil {
+ return x.TemplateName
+ }
+ return ""
+}
+
+func (x *CreateTemplateVersionRequest) GetPluginVersions() []*PluginVersionMapping {
+ if x != nil {
+ return x.PluginVersions
+ }
+ return nil
+}
+
+type CreateTemplateVersionResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The created template version.
+ TemplateVersion *TemplateVersion `protobuf:"bytes,1,opt,name=template_version,json=templateVersion,proto3" json:"template_version,omitempty"`
+}
+
+func (x *CreateTemplateVersionResponse) Reset() {
+ *x = CreateTemplateVersionResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[51]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateTemplateVersionResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateTemplateVersionResponse) ProtoMessage() {}
+
+func (x *CreateTemplateVersionResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[51]
+ 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 CreateTemplateVersionResponse.ProtoReflect.Descriptor instead.
+func (*CreateTemplateVersionResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{51}
+}
+
+func (x *CreateTemplateVersionResponse) GetTemplateVersion() *TemplateVersion {
+ if x != nil {
+ return x.TemplateVersion
+ }
+ return nil
+}
+
+type SetTemplateContributorRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the template for which the user's role will be set.
+ TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
+ // The ID of the user whose role will be set.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ // The role to assign to the user.
+ // Setting UNSPECIFIED means removing the user's role.
+ TemplateRole TemplateRole `protobuf:"varint,3,opt,name=template_role,json=templateRole,proto3,enum=buf.alpha.registry.v1alpha1.TemplateRole" json:"template_role,omitempty"`
+}
+
+func (x *SetTemplateContributorRequest) Reset() {
+ *x = SetTemplateContributorRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[52]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetTemplateContributorRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetTemplateContributorRequest) ProtoMessage() {}
+
+func (x *SetTemplateContributorRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[52]
+ 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 SetTemplateContributorRequest.ProtoReflect.Descriptor instead.
+func (*SetTemplateContributorRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{52}
+}
+
+func (x *SetTemplateContributorRequest) GetTemplateId() string {
+ if x != nil {
+ return x.TemplateId
+ }
+ return ""
+}
+
+func (x *SetTemplateContributorRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *SetTemplateContributorRequest) GetTemplateRole() TemplateRole {
+ if x != nil {
+ return x.TemplateRole
+ }
+ return TemplateRole_TEMPLATE_ROLE_UNSPECIFIED
+}
+
+type SetTemplateContributorResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *SetTemplateContributorResponse) Reset() {
+ *x = SetTemplateContributorResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[53]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetTemplateContributorResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetTemplateContributorResponse) ProtoMessage() {}
+
+func (x *SetTemplateContributorResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[53]
+ 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 SetTemplateContributorResponse.ProtoReflect.Descriptor instead.
+func (*SetTemplateContributorResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{53}
+}
+
+type ListTemplateContributorsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TemplateId string `protobuf:"bytes,1,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListTemplateContributorsRequest) Reset() {
+ *x = ListTemplateContributorsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[54]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListTemplateContributorsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListTemplateContributorsRequest) ProtoMessage() {}
+
+func (x *ListTemplateContributorsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[54]
+ 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 ListTemplateContributorsRequest.ProtoReflect.Descriptor instead.
+func (*ListTemplateContributorsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{54}
+}
+
+func (x *ListTemplateContributorsRequest) GetTemplateId() string {
+ if x != nil {
+ return x.TemplateId
+ }
+ return ""
+}
+
+func (x *ListTemplateContributorsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListTemplateContributorsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListTemplateContributorsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListTemplateContributorsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Users []*TemplateContributor `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListTemplateContributorsResponse) Reset() {
+ *x = ListTemplateContributorsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[55]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListTemplateContributorsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListTemplateContributorsResponse) ProtoMessage() {}
+
+func (x *ListTemplateContributorsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[55]
+ 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 ListTemplateContributorsResponse.ProtoReflect.Descriptor instead.
+func (*ListTemplateContributorsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{55}
+}
+
+func (x *ListTemplateContributorsResponse) GetUsers() []*TemplateContributor {
+ if x != nil {
+ return x.Users
+ }
+ return nil
+}
+
+func (x *ListTemplateContributorsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type DeprecateTemplateRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the template.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the template.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // A message shown along with the deprecation warning for this template.
+ Message string `protobuf:"bytes,3,opt,name=message,proto3" json:"message,omitempty"`
+}
+
+func (x *DeprecateTemplateRequest) Reset() {
+ *x = DeprecateTemplateRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[56]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeprecateTemplateRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeprecateTemplateRequest) ProtoMessage() {}
+
+func (x *DeprecateTemplateRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[56]
+ 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 DeprecateTemplateRequest.ProtoReflect.Descriptor instead.
+func (*DeprecateTemplateRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{56}
+}
+
+func (x *DeprecateTemplateRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *DeprecateTemplateRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *DeprecateTemplateRequest) GetMessage() string {
+ if x != nil {
+ return x.Message
+ }
+ return ""
+}
+
+type DeprecateTemplateResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeprecateTemplateResponse) Reset() {
+ *x = DeprecateTemplateResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[57]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeprecateTemplateResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeprecateTemplateResponse) ProtoMessage() {}
+
+func (x *DeprecateTemplateResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[57]
+ 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 DeprecateTemplateResponse.ProtoReflect.Descriptor instead.
+func (*DeprecateTemplateResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{57}
+}
+
+type UndeprecateTemplateRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the template.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the template.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *UndeprecateTemplateRequest) Reset() {
+ *x = UndeprecateTemplateRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[58]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UndeprecateTemplateRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UndeprecateTemplateRequest) ProtoMessage() {}
+
+func (x *UndeprecateTemplateRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[58]
+ 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 UndeprecateTemplateRequest.ProtoReflect.Descriptor instead.
+func (*UndeprecateTemplateRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{58}
+}
+
+func (x *UndeprecateTemplateRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *UndeprecateTemplateRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type UndeprecateTemplateResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UndeprecateTemplateResponse) Reset() {
+ *x = UndeprecateTemplateResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[59]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UndeprecateTemplateResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UndeprecateTemplateResponse) ProtoMessage() {}
+
+func (x *UndeprecateTemplateResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[59]
+ 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 UndeprecateTemplateResponse.ProtoReflect.Descriptor instead.
+func (*UndeprecateTemplateResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP(), []int{59}
+}
+
+var File_buf_alpha_registry_v1alpha1_plugin_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_plugin_proto_rawDesc = []byte{
+ 0x0a, 0x28, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x2a, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2f, 0x67, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x62, 0x75, 0x66,
+ 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xdc, 0x02, 0x0a, 0x06, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12,
+ 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0a, 0x76, 0x69, 0x73,
+ 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69,
+ 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72,
+ 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65,
+ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72,
+ 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54,
+ 0x69, 0x6d, 0x65, 0x22, 0x87, 0x02, 0x0a, 0x0d, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a,
+ 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x34, 0x0a,
+ 0x16, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65,
+ 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63,
+ 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x69, 0x67,
+ 0x65, 0x73, 0x74, 0x12, 0x58, 0x0a, 0x11, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c,
+ 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x75, 0x6e,
+ 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x10, 0x72, 0x75, 0x6e,
+ 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x22, 0xb0, 0x03,
+ 0x0a, 0x08, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14,
+ 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f,
+ 0x77, 0x6e, 0x65, 0x72, 0x12, 0x50, 0x0a, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x12, 0x4d, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x79, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56,
+ 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
+ 0x74, 0x65, 0x64, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65,
+ 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x12, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f,
+ 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69,
+ 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
+ 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
+ 0x6d, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
+ 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
+ 0x22, 0xa5, 0x01, 0x0a, 0x0c, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f,
+ 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74,
+ 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x61, 0x6d,
+ 0x65, 0x74, 0x65, 0x72, 0x73, 0x12, 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x61, 0x63, 0x63, 0x65, 0x73,
+ 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x61,
+ 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x52,
+ 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x22, 0xdd, 0x01, 0x0a, 0x0f, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
+ 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5a, 0x0a, 0x0f,
+ 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xa7, 0x01, 0x0a, 0x14, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e,
+ 0x67, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x4f,
+ 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+ 0x22, 0x0a, 0x0c, 0x69, 0x6e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69, 0x62, 0x6c, 0x65, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0c, 0x69, 0x6e, 0x61, 0x63, 0x63, 0x65, 0x73, 0x73, 0x69,
+ 0x62, 0x6c, 0x65, 0x4a, 0x04, 0x08, 0x04, 0x10, 0x05, 0x52, 0x07, 0x64, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x64, 0x22, 0x83, 0x02, 0x0a, 0x11, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12,
+ 0x1b, 0x0a, 0x09, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x08, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x4c, 0x0a, 0x0d,
+ 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0c, 0x65, 0x78,
+ 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x4c, 0x0a, 0x0d, 0x69, 0x6d,
+ 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28,
+ 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0c, 0x69, 0x6d, 0x70, 0x6c,
+ 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x8d, 0x02, 0x0a, 0x13, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
+ 0x12, 0x35, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65,
+ 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x4e, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x6c,
+ 0x69, 0x63, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6c,
+ 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x4e, 0x0a, 0x0d, 0x69, 0x6d, 0x70, 0x6c,
+ 0x69, 0x63, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0c, 0x69, 0x6d, 0x70, 0x6c,
+ 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x6a, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b,
+ 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65,
+ 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76,
+ 0x65, 0x72, 0x73, 0x65, 0x22, 0x7c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x70,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65,
+ 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x22, 0x84, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a,
+ 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77,
+ 0x6e, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
+ 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x17, 0x4c, 0x69,
+ 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e,
+ 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9a, 0x01, 0x0a,
+ 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x22, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
+ 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x1f, 0x4c, 0x69,
+ 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3d, 0x0a,
+ 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x23,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f,
+ 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x5d, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+ 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x22, 0x6d, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x51, 0x0a, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x52, 0x0d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x22, 0x9b, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70,
+ 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f,
+ 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67,
+ 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73,
+ 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65,
+ 0x22, 0x99, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x53, 0x0a, 0x0f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e,
+ 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x8e, 0x01, 0x0a,
+ 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x4d,
+ 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
+ 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x53, 0x0a,
+ 0x14, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x22, 0x3c, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x22, 0x50, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x22, 0x3f, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x22, 0x16, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9d, 0x01, 0x0a, 0x1b,
+ 0x53, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62,
+ 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+ 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72,
+ 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49,
+ 0x64, 0x12, 0x48, 0x0a, 0x0b, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x72, 0x6f, 0x6c, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52,
+ 0x0a, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x1e, 0x0a, 0x1c, 0x53,
+ 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75,
+ 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x92, 0x01, 0x0a, 0x1d,
+ 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69,
+ 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a,
+ 0x09, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x08, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70,
+ 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f,
+ 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67,
+ 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73,
+ 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65,
+ 0x22, 0x8e, 0x01, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x6f, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78,
+ 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x22, 0x5c, 0x0a, 0x16, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f,
+ 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x22,
+ 0x19, 0x0a, 0x17, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x44, 0x0a, 0x18, 0x55, 0x6e,
+ 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x22, 0x1b, 0x0a, 0x19, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x50,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x3e, 0x0a,
+ 0x12, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x58, 0x0a,
+ 0x13, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x74,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22, 0x6c, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x54,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72,
+ 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65,
+ 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x43, 0x0a, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e,
+ 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x79, 0x0a, 0x21,
+ 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x55, 0x73, 0x65,
+ 0x72, 0x43, 0x61, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d,
+ 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a,
+ 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07,
+ 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x91, 0x01, 0x0a, 0x22, 0x4c, 0x69, 0x73, 0x74,
+ 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e,
+ 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43,
+ 0x0a, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65,
+ 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65,
+ 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x86, 0x01, 0x0a, 0x18,
+ 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1b,
+ 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65,
+ 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76,
+ 0x65, 0x72, 0x73, 0x65, 0x22, 0x88, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65,
+ 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x43, 0x0a, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x09, 0x74, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22,
+ 0x5f, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
+ 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e,
+ 0x22, 0x75, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57,
+ 0x0a, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x0f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x9c, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74,
+ 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x22, 0x0a, 0x0c,
+ 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07,
+ 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72,
+ 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x21, 0x4c, 0x69, 0x73, 0x74, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x09,
+ 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74,
+ 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9d, 0x01, 0x0a, 0x1b, 0x4c, 0x69,
+ 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
+ 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0xa1, 0x01, 0x0a, 0x1c, 0x4c, 0x69,
+ 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x59, 0x0a, 0x11, 0x74, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x52, 0x10, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
+ 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xe2, 0x01,
+ 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x4d, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79,
+ 0x12, 0x50, 0x0a, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x52, 0x0d, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x73, 0x22, 0x5b, 0x0a, 0x16, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08,
+ 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x22,
+ 0x41, 0x0a, 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+ 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0xda, 0x01, 0x0a,
+ 0x1c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x25, 0x0a, 0x0e, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6f, 0x77,
+ 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x5a, 0x0a,
+ 0x0f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x18, 0x04, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x4d, 0x61, 0x70, 0x70, 0x69, 0x6e, 0x67, 0x52, 0x0e, 0x70, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x78, 0x0a, 0x1d, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x57, 0x0a, 0x10, 0x74, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x52, 0x0f, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x22, 0xa9, 0x01, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+ 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69,
+ 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12,
+ 0x4e, 0x0a, 0x0d, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x72, 0x6f, 0x6c, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c,
+ 0x65, 0x52, 0x0c, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c, 0x65, 0x22,
+ 0x20, 0x0a, 0x1e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f,
+ 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x98, 0x01, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+ 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73,
+ 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
+ 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x92, 0x01, 0x0a,
+ 0x20, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x46, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x6f, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78,
+ 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x22, 0x5e, 0x0a, 0x18, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x54, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a,
+ 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77,
+ 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x22, 0x1b, 0x0a, 0x19, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x54, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x46,
+ 0x0a, 0x1a, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05,
+ 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a, 0x1b, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72,
+ 0x65, 0x63, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x72, 0x0a, 0x10, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56,
+ 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x21, 0x0a, 0x1d, 0x50, 0x4c, 0x55,
+ 0x47, 0x49, 0x4e, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x55,
+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1c, 0x0a, 0x18,
+ 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54,
+ 0x59, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x1d, 0x0a, 0x19, 0x50, 0x4c,
+ 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f,
+ 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x02, 0x32, 0xa1, 0x1b, 0x0a, 0x0d, 0x50, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x70, 0x0a, 0x0b, 0x4c,
+ 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x2f, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a,
+ 0x0f, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73,
+ 0x12, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c,
+ 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x17,
+ 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69,
+ 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x36, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0c, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x30, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x6a, 0x0a, 0x09, 0x47, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x2d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x73, 0x0a, 0x0c,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x30, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c,
+ 0x65, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x14, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x38, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x91, 0x01, 0x0a, 0x16, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x6f,
+ 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3a, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43,
+ 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x7c, 0x0a, 0x0f, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63,
+ 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x82, 0x01, 0x0a, 0x11, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
+ 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
+ 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x64,
+ 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x0b, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x2f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74,
+ 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x9d, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+ 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12,
+ 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69,
+ 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x43,
+ 0x61, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69,
+ 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x43,
+ 0x61, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x82, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x12, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x55, 0x73, 0x65, 0x72, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9a, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x73, 0x12, 0x3d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x47, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x14, 0x4c,
+ 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x73, 0x12, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x0e, 0x43, 0x72, 0x65, 0x61,
+ 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x0e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8e,
+ 0x01, 0x0a, 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74,
+ 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x91, 0x01, 0x0a, 0x16, 0x53, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43,
+ 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x3a, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73,
+ 0x12, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c,
+ 0x69, 0x73, 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62,
+ 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x82, 0x01,
+ 0x0a, 0x11, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x12, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
+ 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x13, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
+ 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x37, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65,
+ 0x63, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x9b, 0x02,
+ 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x42, 0x0b, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01,
+ 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66,
+ 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74,
+ 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62,
+ 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xb8, 0x01, 0x01, 0xa2, 0x02,
+ 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47,
+ 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66,
+ 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescData = file_buf_alpha_registry_v1alpha1_plugin_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_plugin_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_plugin_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes = make([]protoimpl.MessageInfo, 60)
+var file_buf_alpha_registry_v1alpha1_plugin_proto_goTypes = []interface{}{
+ (PluginVisibility)(0), // 0: buf.alpha.registry.v1alpha1.PluginVisibility
+ (*Plugin)(nil), // 1: buf.alpha.registry.v1alpha1.Plugin
+ (*PluginVersion)(nil), // 2: buf.alpha.registry.v1alpha1.PluginVersion
+ (*Template)(nil), // 3: buf.alpha.registry.v1alpha1.Template
+ (*PluginConfig)(nil), // 4: buf.alpha.registry.v1alpha1.PluginConfig
+ (*TemplateVersion)(nil), // 5: buf.alpha.registry.v1alpha1.TemplateVersion
+ (*PluginVersionMapping)(nil), // 6: buf.alpha.registry.v1alpha1.PluginVersionMapping
+ (*PluginContributor)(nil), // 7: buf.alpha.registry.v1alpha1.PluginContributor
+ (*TemplateContributor)(nil), // 8: buf.alpha.registry.v1alpha1.TemplateContributor
+ (*ListPluginsRequest)(nil), // 9: buf.alpha.registry.v1alpha1.ListPluginsRequest
+ (*ListPluginsResponse)(nil), // 10: buf.alpha.registry.v1alpha1.ListPluginsResponse
+ (*ListUserPluginsRequest)(nil), // 11: buf.alpha.registry.v1alpha1.ListUserPluginsRequest
+ (*ListUserPluginsResponse)(nil), // 12: buf.alpha.registry.v1alpha1.ListUserPluginsResponse
+ (*ListOrganizationPluginsRequest)(nil), // 13: buf.alpha.registry.v1alpha1.ListOrganizationPluginsRequest
+ (*ListOrganizationPluginsResponse)(nil), // 14: buf.alpha.registry.v1alpha1.ListOrganizationPluginsResponse
+ (*GetPluginVersionRequest)(nil), // 15: buf.alpha.registry.v1alpha1.GetPluginVersionRequest
+ (*GetPluginVersionResponse)(nil), // 16: buf.alpha.registry.v1alpha1.GetPluginVersionResponse
+ (*ListPluginVersionsRequest)(nil), // 17: buf.alpha.registry.v1alpha1.ListPluginVersionsRequest
+ (*ListPluginVersionsResponse)(nil), // 18: buf.alpha.registry.v1alpha1.ListPluginVersionsResponse
+ (*CreatePluginRequest)(nil), // 19: buf.alpha.registry.v1alpha1.CreatePluginRequest
+ (*CreatePluginResponse)(nil), // 20: buf.alpha.registry.v1alpha1.CreatePluginResponse
+ (*GetPluginRequest)(nil), // 21: buf.alpha.registry.v1alpha1.GetPluginRequest
+ (*GetPluginResponse)(nil), // 22: buf.alpha.registry.v1alpha1.GetPluginResponse
+ (*DeletePluginRequest)(nil), // 23: buf.alpha.registry.v1alpha1.DeletePluginRequest
+ (*DeletePluginResponse)(nil), // 24: buf.alpha.registry.v1alpha1.DeletePluginResponse
+ (*SetPluginContributorRequest)(nil), // 25: buf.alpha.registry.v1alpha1.SetPluginContributorRequest
+ (*SetPluginContributorResponse)(nil), // 26: buf.alpha.registry.v1alpha1.SetPluginContributorResponse
+ (*ListPluginContributorsRequest)(nil), // 27: buf.alpha.registry.v1alpha1.ListPluginContributorsRequest
+ (*ListPluginContributorsResponse)(nil), // 28: buf.alpha.registry.v1alpha1.ListPluginContributorsResponse
+ (*DeprecatePluginRequest)(nil), // 29: buf.alpha.registry.v1alpha1.DeprecatePluginRequest
+ (*DeprecatePluginResponse)(nil), // 30: buf.alpha.registry.v1alpha1.DeprecatePluginResponse
+ (*UndeprecatePluginRequest)(nil), // 31: buf.alpha.registry.v1alpha1.UndeprecatePluginRequest
+ (*UndeprecatePluginResponse)(nil), // 32: buf.alpha.registry.v1alpha1.UndeprecatePluginResponse
+ (*GetTemplateRequest)(nil), // 33: buf.alpha.registry.v1alpha1.GetTemplateRequest
+ (*GetTemplateResponse)(nil), // 34: buf.alpha.registry.v1alpha1.GetTemplateResponse
+ (*ListTemplatesRequest)(nil), // 35: buf.alpha.registry.v1alpha1.ListTemplatesRequest
+ (*ListTemplatesResponse)(nil), // 36: buf.alpha.registry.v1alpha1.ListTemplatesResponse
+ (*ListTemplatesUserCanAccessRequest)(nil), // 37: buf.alpha.registry.v1alpha1.ListTemplatesUserCanAccessRequest
+ (*ListTemplatesUserCanAccessResponse)(nil), // 38: buf.alpha.registry.v1alpha1.ListTemplatesUserCanAccessResponse
+ (*ListUserTemplatesRequest)(nil), // 39: buf.alpha.registry.v1alpha1.ListUserTemplatesRequest
+ (*ListUserTemplatesResponse)(nil), // 40: buf.alpha.registry.v1alpha1.ListUserTemplatesResponse
+ (*GetTemplateVersionRequest)(nil), // 41: buf.alpha.registry.v1alpha1.GetTemplateVersionRequest
+ (*GetTemplateVersionResponse)(nil), // 42: buf.alpha.registry.v1alpha1.GetTemplateVersionResponse
+ (*ListOrganizationTemplatesRequest)(nil), // 43: buf.alpha.registry.v1alpha1.ListOrganizationTemplatesRequest
+ (*ListOrganizationTemplatesResponse)(nil), // 44: buf.alpha.registry.v1alpha1.ListOrganizationTemplatesResponse
+ (*ListTemplateVersionsRequest)(nil), // 45: buf.alpha.registry.v1alpha1.ListTemplateVersionsRequest
+ (*ListTemplateVersionsResponse)(nil), // 46: buf.alpha.registry.v1alpha1.ListTemplateVersionsResponse
+ (*CreateTemplateRequest)(nil), // 47: buf.alpha.registry.v1alpha1.CreateTemplateRequest
+ (*CreateTemplateResponse)(nil), // 48: buf.alpha.registry.v1alpha1.CreateTemplateResponse
+ (*DeleteTemplateRequest)(nil), // 49: buf.alpha.registry.v1alpha1.DeleteTemplateRequest
+ (*DeleteTemplateResponse)(nil), // 50: buf.alpha.registry.v1alpha1.DeleteTemplateResponse
+ (*CreateTemplateVersionRequest)(nil), // 51: buf.alpha.registry.v1alpha1.CreateTemplateVersionRequest
+ (*CreateTemplateVersionResponse)(nil), // 52: buf.alpha.registry.v1alpha1.CreateTemplateVersionResponse
+ (*SetTemplateContributorRequest)(nil), // 53: buf.alpha.registry.v1alpha1.SetTemplateContributorRequest
+ (*SetTemplateContributorResponse)(nil), // 54: buf.alpha.registry.v1alpha1.SetTemplateContributorResponse
+ (*ListTemplateContributorsRequest)(nil), // 55: buf.alpha.registry.v1alpha1.ListTemplateContributorsRequest
+ (*ListTemplateContributorsResponse)(nil), // 56: buf.alpha.registry.v1alpha1.ListTemplateContributorsResponse
+ (*DeprecateTemplateRequest)(nil), // 57: buf.alpha.registry.v1alpha1.DeprecateTemplateRequest
+ (*DeprecateTemplateResponse)(nil), // 58: buf.alpha.registry.v1alpha1.DeprecateTemplateResponse
+ (*UndeprecateTemplateRequest)(nil), // 59: buf.alpha.registry.v1alpha1.UndeprecateTemplateRequest
+ (*UndeprecateTemplateResponse)(nil), // 60: buf.alpha.registry.v1alpha1.UndeprecateTemplateResponse
+ (*timestamppb.Timestamp)(nil), // 61: google.protobuf.Timestamp
+ (*RuntimeLibrary)(nil), // 62: buf.alpha.registry.v1alpha1.RuntimeLibrary
+ (*User)(nil), // 63: buf.alpha.registry.v1alpha1.User
+ (PluginRole)(0), // 64: buf.alpha.registry.v1alpha1.PluginRole
+ (TemplateRole)(0), // 65: buf.alpha.registry.v1alpha1.TemplateRole
+}
+var file_buf_alpha_registry_v1alpha1_plugin_proto_depIdxs = []int32{
+ 0, // 0: buf.alpha.registry.v1alpha1.Plugin.visibility:type_name -> buf.alpha.registry.v1alpha1.PluginVisibility
+ 61, // 1: buf.alpha.registry.v1alpha1.Plugin.create_time:type_name -> google.protobuf.Timestamp
+ 61, // 2: buf.alpha.registry.v1alpha1.Plugin.update_time:type_name -> google.protobuf.Timestamp
+ 62, // 3: buf.alpha.registry.v1alpha1.PluginVersion.runtime_libraries:type_name -> buf.alpha.registry.v1alpha1.RuntimeLibrary
+ 4, // 4: buf.alpha.registry.v1alpha1.Template.plugin_configs:type_name -> buf.alpha.registry.v1alpha1.PluginConfig
+ 0, // 5: buf.alpha.registry.v1alpha1.Template.visibility:type_name -> buf.alpha.registry.v1alpha1.PluginVisibility
+ 61, // 6: buf.alpha.registry.v1alpha1.Template.create_time:type_name -> google.protobuf.Timestamp
+ 61, // 7: buf.alpha.registry.v1alpha1.Template.update_time:type_name -> google.protobuf.Timestamp
+ 6, // 8: buf.alpha.registry.v1alpha1.TemplateVersion.plugin_versions:type_name -> buf.alpha.registry.v1alpha1.PluginVersionMapping
+ 63, // 9: buf.alpha.registry.v1alpha1.PluginContributor.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 64, // 10: buf.alpha.registry.v1alpha1.PluginContributor.explicit_role:type_name -> buf.alpha.registry.v1alpha1.PluginRole
+ 64, // 11: buf.alpha.registry.v1alpha1.PluginContributor.implicit_role:type_name -> buf.alpha.registry.v1alpha1.PluginRole
+ 63, // 12: buf.alpha.registry.v1alpha1.TemplateContributor.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 65, // 13: buf.alpha.registry.v1alpha1.TemplateContributor.explicit_role:type_name -> buf.alpha.registry.v1alpha1.TemplateRole
+ 65, // 14: buf.alpha.registry.v1alpha1.TemplateContributor.implicit_role:type_name -> buf.alpha.registry.v1alpha1.TemplateRole
+ 1, // 15: buf.alpha.registry.v1alpha1.ListPluginsResponse.plugins:type_name -> buf.alpha.registry.v1alpha1.Plugin
+ 1, // 16: buf.alpha.registry.v1alpha1.ListUserPluginsResponse.plugins:type_name -> buf.alpha.registry.v1alpha1.Plugin
+ 1, // 17: buf.alpha.registry.v1alpha1.ListOrganizationPluginsResponse.plugins:type_name -> buf.alpha.registry.v1alpha1.Plugin
+ 2, // 18: buf.alpha.registry.v1alpha1.GetPluginVersionResponse.plugin_version:type_name -> buf.alpha.registry.v1alpha1.PluginVersion
+ 2, // 19: buf.alpha.registry.v1alpha1.ListPluginVersionsResponse.plugin_versions:type_name -> buf.alpha.registry.v1alpha1.PluginVersion
+ 0, // 20: buf.alpha.registry.v1alpha1.CreatePluginRequest.visibility:type_name -> buf.alpha.registry.v1alpha1.PluginVisibility
+ 1, // 21: buf.alpha.registry.v1alpha1.CreatePluginResponse.plugin:type_name -> buf.alpha.registry.v1alpha1.Plugin
+ 1, // 22: buf.alpha.registry.v1alpha1.GetPluginResponse.plugin:type_name -> buf.alpha.registry.v1alpha1.Plugin
+ 64, // 23: buf.alpha.registry.v1alpha1.SetPluginContributorRequest.plugin_role:type_name -> buf.alpha.registry.v1alpha1.PluginRole
+ 7, // 24: buf.alpha.registry.v1alpha1.ListPluginContributorsResponse.users:type_name -> buf.alpha.registry.v1alpha1.PluginContributor
+ 3, // 25: buf.alpha.registry.v1alpha1.GetTemplateResponse.template:type_name -> buf.alpha.registry.v1alpha1.Template
+ 3, // 26: buf.alpha.registry.v1alpha1.ListTemplatesResponse.templates:type_name -> buf.alpha.registry.v1alpha1.Template
+ 3, // 27: buf.alpha.registry.v1alpha1.ListTemplatesUserCanAccessResponse.templates:type_name -> buf.alpha.registry.v1alpha1.Template
+ 3, // 28: buf.alpha.registry.v1alpha1.ListUserTemplatesResponse.templates:type_name -> buf.alpha.registry.v1alpha1.Template
+ 5, // 29: buf.alpha.registry.v1alpha1.GetTemplateVersionResponse.template_version:type_name -> buf.alpha.registry.v1alpha1.TemplateVersion
+ 3, // 30: buf.alpha.registry.v1alpha1.ListOrganizationTemplatesResponse.templates:type_name -> buf.alpha.registry.v1alpha1.Template
+ 5, // 31: buf.alpha.registry.v1alpha1.ListTemplateVersionsResponse.template_versions:type_name -> buf.alpha.registry.v1alpha1.TemplateVersion
+ 0, // 32: buf.alpha.registry.v1alpha1.CreateTemplateRequest.visibility:type_name -> buf.alpha.registry.v1alpha1.PluginVisibility
+ 4, // 33: buf.alpha.registry.v1alpha1.CreateTemplateRequest.plugin_configs:type_name -> buf.alpha.registry.v1alpha1.PluginConfig
+ 3, // 34: buf.alpha.registry.v1alpha1.CreateTemplateResponse.template:type_name -> buf.alpha.registry.v1alpha1.Template
+ 6, // 35: buf.alpha.registry.v1alpha1.CreateTemplateVersionRequest.plugin_versions:type_name -> buf.alpha.registry.v1alpha1.PluginVersionMapping
+ 5, // 36: buf.alpha.registry.v1alpha1.CreateTemplateVersionResponse.template_version:type_name -> buf.alpha.registry.v1alpha1.TemplateVersion
+ 65, // 37: buf.alpha.registry.v1alpha1.SetTemplateContributorRequest.template_role:type_name -> buf.alpha.registry.v1alpha1.TemplateRole
+ 8, // 38: buf.alpha.registry.v1alpha1.ListTemplateContributorsResponse.users:type_name -> buf.alpha.registry.v1alpha1.TemplateContributor
+ 9, // 39: buf.alpha.registry.v1alpha1.PluginService.ListPlugins:input_type -> buf.alpha.registry.v1alpha1.ListPluginsRequest
+ 11, // 40: buf.alpha.registry.v1alpha1.PluginService.ListUserPlugins:input_type -> buf.alpha.registry.v1alpha1.ListUserPluginsRequest
+ 13, // 41: buf.alpha.registry.v1alpha1.PluginService.ListOrganizationPlugins:input_type -> buf.alpha.registry.v1alpha1.ListOrganizationPluginsRequest
+ 15, // 42: buf.alpha.registry.v1alpha1.PluginService.GetPluginVersion:input_type -> buf.alpha.registry.v1alpha1.GetPluginVersionRequest
+ 17, // 43: buf.alpha.registry.v1alpha1.PluginService.ListPluginVersions:input_type -> buf.alpha.registry.v1alpha1.ListPluginVersionsRequest
+ 19, // 44: buf.alpha.registry.v1alpha1.PluginService.CreatePlugin:input_type -> buf.alpha.registry.v1alpha1.CreatePluginRequest
+ 21, // 45: buf.alpha.registry.v1alpha1.PluginService.GetPlugin:input_type -> buf.alpha.registry.v1alpha1.GetPluginRequest
+ 23, // 46: buf.alpha.registry.v1alpha1.PluginService.DeletePlugin:input_type -> buf.alpha.registry.v1alpha1.DeletePluginRequest
+ 25, // 47: buf.alpha.registry.v1alpha1.PluginService.SetPluginContributor:input_type -> buf.alpha.registry.v1alpha1.SetPluginContributorRequest
+ 27, // 48: buf.alpha.registry.v1alpha1.PluginService.ListPluginContributors:input_type -> buf.alpha.registry.v1alpha1.ListPluginContributorsRequest
+ 29, // 49: buf.alpha.registry.v1alpha1.PluginService.DeprecatePlugin:input_type -> buf.alpha.registry.v1alpha1.DeprecatePluginRequest
+ 31, // 50: buf.alpha.registry.v1alpha1.PluginService.UndeprecatePlugin:input_type -> buf.alpha.registry.v1alpha1.UndeprecatePluginRequest
+ 33, // 51: buf.alpha.registry.v1alpha1.PluginService.GetTemplate:input_type -> buf.alpha.registry.v1alpha1.GetTemplateRequest
+ 35, // 52: buf.alpha.registry.v1alpha1.PluginService.ListTemplates:input_type -> buf.alpha.registry.v1alpha1.ListTemplatesRequest
+ 37, // 53: buf.alpha.registry.v1alpha1.PluginService.ListTemplatesUserCanAccess:input_type -> buf.alpha.registry.v1alpha1.ListTemplatesUserCanAccessRequest
+ 39, // 54: buf.alpha.registry.v1alpha1.PluginService.ListUserTemplates:input_type -> buf.alpha.registry.v1alpha1.ListUserTemplatesRequest
+ 43, // 55: buf.alpha.registry.v1alpha1.PluginService.ListOrganizationTemplates:input_type -> buf.alpha.registry.v1alpha1.ListOrganizationTemplatesRequest
+ 41, // 56: buf.alpha.registry.v1alpha1.PluginService.GetTemplateVersion:input_type -> buf.alpha.registry.v1alpha1.GetTemplateVersionRequest
+ 45, // 57: buf.alpha.registry.v1alpha1.PluginService.ListTemplateVersions:input_type -> buf.alpha.registry.v1alpha1.ListTemplateVersionsRequest
+ 47, // 58: buf.alpha.registry.v1alpha1.PluginService.CreateTemplate:input_type -> buf.alpha.registry.v1alpha1.CreateTemplateRequest
+ 49, // 59: buf.alpha.registry.v1alpha1.PluginService.DeleteTemplate:input_type -> buf.alpha.registry.v1alpha1.DeleteTemplateRequest
+ 51, // 60: buf.alpha.registry.v1alpha1.PluginService.CreateTemplateVersion:input_type -> buf.alpha.registry.v1alpha1.CreateTemplateVersionRequest
+ 53, // 61: buf.alpha.registry.v1alpha1.PluginService.SetTemplateContributor:input_type -> buf.alpha.registry.v1alpha1.SetTemplateContributorRequest
+ 55, // 62: buf.alpha.registry.v1alpha1.PluginService.ListTemplateContributors:input_type -> buf.alpha.registry.v1alpha1.ListTemplateContributorsRequest
+ 57, // 63: buf.alpha.registry.v1alpha1.PluginService.DeprecateTemplate:input_type -> buf.alpha.registry.v1alpha1.DeprecateTemplateRequest
+ 59, // 64: buf.alpha.registry.v1alpha1.PluginService.UndeprecateTemplate:input_type -> buf.alpha.registry.v1alpha1.UndeprecateTemplateRequest
+ 10, // 65: buf.alpha.registry.v1alpha1.PluginService.ListPlugins:output_type -> buf.alpha.registry.v1alpha1.ListPluginsResponse
+ 12, // 66: buf.alpha.registry.v1alpha1.PluginService.ListUserPlugins:output_type -> buf.alpha.registry.v1alpha1.ListUserPluginsResponse
+ 14, // 67: buf.alpha.registry.v1alpha1.PluginService.ListOrganizationPlugins:output_type -> buf.alpha.registry.v1alpha1.ListOrganizationPluginsResponse
+ 16, // 68: buf.alpha.registry.v1alpha1.PluginService.GetPluginVersion:output_type -> buf.alpha.registry.v1alpha1.GetPluginVersionResponse
+ 18, // 69: buf.alpha.registry.v1alpha1.PluginService.ListPluginVersions:output_type -> buf.alpha.registry.v1alpha1.ListPluginVersionsResponse
+ 20, // 70: buf.alpha.registry.v1alpha1.PluginService.CreatePlugin:output_type -> buf.alpha.registry.v1alpha1.CreatePluginResponse
+ 22, // 71: buf.alpha.registry.v1alpha1.PluginService.GetPlugin:output_type -> buf.alpha.registry.v1alpha1.GetPluginResponse
+ 24, // 72: buf.alpha.registry.v1alpha1.PluginService.DeletePlugin:output_type -> buf.alpha.registry.v1alpha1.DeletePluginResponse
+ 26, // 73: buf.alpha.registry.v1alpha1.PluginService.SetPluginContributor:output_type -> buf.alpha.registry.v1alpha1.SetPluginContributorResponse
+ 28, // 74: buf.alpha.registry.v1alpha1.PluginService.ListPluginContributors:output_type -> buf.alpha.registry.v1alpha1.ListPluginContributorsResponse
+ 30, // 75: buf.alpha.registry.v1alpha1.PluginService.DeprecatePlugin:output_type -> buf.alpha.registry.v1alpha1.DeprecatePluginResponse
+ 32, // 76: buf.alpha.registry.v1alpha1.PluginService.UndeprecatePlugin:output_type -> buf.alpha.registry.v1alpha1.UndeprecatePluginResponse
+ 34, // 77: buf.alpha.registry.v1alpha1.PluginService.GetTemplate:output_type -> buf.alpha.registry.v1alpha1.GetTemplateResponse
+ 36, // 78: buf.alpha.registry.v1alpha1.PluginService.ListTemplates:output_type -> buf.alpha.registry.v1alpha1.ListTemplatesResponse
+ 38, // 79: buf.alpha.registry.v1alpha1.PluginService.ListTemplatesUserCanAccess:output_type -> buf.alpha.registry.v1alpha1.ListTemplatesUserCanAccessResponse
+ 40, // 80: buf.alpha.registry.v1alpha1.PluginService.ListUserTemplates:output_type -> buf.alpha.registry.v1alpha1.ListUserTemplatesResponse
+ 44, // 81: buf.alpha.registry.v1alpha1.PluginService.ListOrganizationTemplates:output_type -> buf.alpha.registry.v1alpha1.ListOrganizationTemplatesResponse
+ 42, // 82: buf.alpha.registry.v1alpha1.PluginService.GetTemplateVersion:output_type -> buf.alpha.registry.v1alpha1.GetTemplateVersionResponse
+ 46, // 83: buf.alpha.registry.v1alpha1.PluginService.ListTemplateVersions:output_type -> buf.alpha.registry.v1alpha1.ListTemplateVersionsResponse
+ 48, // 84: buf.alpha.registry.v1alpha1.PluginService.CreateTemplate:output_type -> buf.alpha.registry.v1alpha1.CreateTemplateResponse
+ 50, // 85: buf.alpha.registry.v1alpha1.PluginService.DeleteTemplate:output_type -> buf.alpha.registry.v1alpha1.DeleteTemplateResponse
+ 52, // 86: buf.alpha.registry.v1alpha1.PluginService.CreateTemplateVersion:output_type -> buf.alpha.registry.v1alpha1.CreateTemplateVersionResponse
+ 54, // 87: buf.alpha.registry.v1alpha1.PluginService.SetTemplateContributor:output_type -> buf.alpha.registry.v1alpha1.SetTemplateContributorResponse
+ 56, // 88: buf.alpha.registry.v1alpha1.PluginService.ListTemplateContributors:output_type -> buf.alpha.registry.v1alpha1.ListTemplateContributorsResponse
+ 58, // 89: buf.alpha.registry.v1alpha1.PluginService.DeprecateTemplate:output_type -> buf.alpha.registry.v1alpha1.DeprecateTemplateResponse
+ 60, // 90: buf.alpha.registry.v1alpha1.PluginService.UndeprecateTemplate:output_type -> buf.alpha.registry.v1alpha1.UndeprecateTemplateResponse
+ 65, // [65:91] is the sub-list for method output_type
+ 39, // [39:65] is the sub-list for method input_type
+ 39, // [39:39] is the sub-list for extension type_name
+ 39, // [39:39] is the sub-list for extension extendee
+ 0, // [0:39] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_plugin_proto_init() }
+func file_buf_alpha_registry_v1alpha1_plugin_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_plugin_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_generate_proto_init()
+ file_buf_alpha_registry_v1alpha1_role_proto_init()
+ file_buf_alpha_registry_v1alpha1_user_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Plugin); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PluginVersion); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Template); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PluginConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TemplateVersion); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PluginVersionMapping); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PluginContributor); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TemplateContributor); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListPluginsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListPluginsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListUserPluginsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListUserPluginsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOrganizationPluginsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOrganizationPluginsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetPluginVersionRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetPluginVersionResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListPluginVersionsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListPluginVersionsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreatePluginRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreatePluginResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetPluginRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetPluginResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeletePluginRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeletePluginResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetPluginContributorRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetPluginContributorResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListPluginContributorsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListPluginContributorsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeprecatePluginRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeprecatePluginResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UndeprecatePluginRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UndeprecatePluginResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetTemplateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetTemplateResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListTemplatesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListTemplatesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListTemplatesUserCanAccessRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListTemplatesUserCanAccessResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListUserTemplatesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListUserTemplatesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetTemplateVersionRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetTemplateVersionResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOrganizationTemplatesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[43].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOrganizationTemplatesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[44].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListTemplateVersionsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListTemplateVersionsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[46].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateTemplateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[47].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateTemplateResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[48].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteTemplateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[49].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteTemplateResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[50].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateTemplateVersionRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[51].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateTemplateVersionResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[52].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetTemplateContributorRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[53].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetTemplateContributorResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[54].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListTemplateContributorsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[55].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListTemplateContributorsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[56].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeprecateTemplateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[57].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeprecateTemplateResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[58].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UndeprecateTemplateRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes[59].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UndeprecateTemplateResponse); 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_buf_alpha_registry_v1alpha1_plugin_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 60,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_plugin_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_plugin_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_plugin_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_plugin_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_plugin_proto = out.File
+ file_buf_alpha_registry_v1alpha1_plugin_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_plugin_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_plugin_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go
new file mode 100644
index 000000000..1f6f215f4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/plugin_curation.pb.go
@@ -0,0 +1,2255 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/plugin_curation.proto
+
+package registryv1alpha1
+
+import (
+ v1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/image/v1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ pluginpb "google.golang.org/protobuf/types/pluginpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// The supported plugin registries for curated plugins.
+type PluginRegistryType int32
+
+const (
+ PluginRegistryType_PLUGIN_REGISTRY_TYPE_UNSPECIFIED PluginRegistryType = 0
+ PluginRegistryType_PLUGIN_REGISTRY_TYPE_GO PluginRegistryType = 1
+ PluginRegistryType_PLUGIN_REGISTRY_TYPE_NPM PluginRegistryType = 2
+)
+
+// Enum value maps for PluginRegistryType.
+var (
+ PluginRegistryType_name = map[int32]string{
+ 0: "PLUGIN_REGISTRY_TYPE_UNSPECIFIED",
+ 1: "PLUGIN_REGISTRY_TYPE_GO",
+ 2: "PLUGIN_REGISTRY_TYPE_NPM",
+ }
+ PluginRegistryType_value = map[string]int32{
+ "PLUGIN_REGISTRY_TYPE_UNSPECIFIED": 0,
+ "PLUGIN_REGISTRY_TYPE_GO": 1,
+ "PLUGIN_REGISTRY_TYPE_NPM": 2,
+ }
+)
+
+func (x PluginRegistryType) Enum() *PluginRegistryType {
+ p := new(PluginRegistryType)
+ *p = x
+ return p
+}
+
+func (x PluginRegistryType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PluginRegistryType) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_enumTypes[0].Descriptor()
+}
+
+func (PluginRegistryType) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_enumTypes[0]
+}
+
+func (x PluginRegistryType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use PluginRegistryType.Descriptor instead.
+func (PluginRegistryType) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{0}
+}
+
+// PluginLanguage is used to specify the output languages a plugin supports.
+type PluginLanguage int32
+
+const (
+ PluginLanguage_PLUGIN_LANGUAGE_UNSPECIFIED PluginLanguage = 0
+ PluginLanguage_PLUGIN_LANGUAGE_GO PluginLanguage = 1
+ PluginLanguage_PLUGIN_LANGUAGE_JAVASCRIPT PluginLanguage = 2
+ PluginLanguage_PLUGIN_LANGUAGE_TYPESCRIPT PluginLanguage = 3
+ PluginLanguage_PLUGIN_LANGUAGE_SWIFT PluginLanguage = 4
+ PluginLanguage_PLUGIN_LANGUAGE_CPP PluginLanguage = 5
+ PluginLanguage_PLUGIN_LANGUAGE_JAVA PluginLanguage = 6
+ PluginLanguage_PLUGIN_LANGUAGE_DART PluginLanguage = 7
+ PluginLanguage_PLUGIN_LANGUAGE_RUST PluginLanguage = 8
+ PluginLanguage_PLUGIN_LANGUAGE_PYTHON PluginLanguage = 9
+ PluginLanguage_PLUGIN_LANGUAGE_RUBY PluginLanguage = 10
+ PluginLanguage_PLUGIN_LANGUAGE_KOTLIN PluginLanguage = 11
+ PluginLanguage_PLUGIN_LANGUAGE_OBJECTIVE_C PluginLanguage = 12
+ PluginLanguage_PLUGIN_LANGUAGE_PHP PluginLanguage = 13
+ PluginLanguage_PLUGIN_LANGUAGE_CSHARP PluginLanguage = 14
+)
+
+// Enum value maps for PluginLanguage.
+var (
+ PluginLanguage_name = map[int32]string{
+ 0: "PLUGIN_LANGUAGE_UNSPECIFIED",
+ 1: "PLUGIN_LANGUAGE_GO",
+ 2: "PLUGIN_LANGUAGE_JAVASCRIPT",
+ 3: "PLUGIN_LANGUAGE_TYPESCRIPT",
+ 4: "PLUGIN_LANGUAGE_SWIFT",
+ 5: "PLUGIN_LANGUAGE_CPP",
+ 6: "PLUGIN_LANGUAGE_JAVA",
+ 7: "PLUGIN_LANGUAGE_DART",
+ 8: "PLUGIN_LANGUAGE_RUST",
+ 9: "PLUGIN_LANGUAGE_PYTHON",
+ 10: "PLUGIN_LANGUAGE_RUBY",
+ 11: "PLUGIN_LANGUAGE_KOTLIN",
+ 12: "PLUGIN_LANGUAGE_OBJECTIVE_C",
+ 13: "PLUGIN_LANGUAGE_PHP",
+ 14: "PLUGIN_LANGUAGE_CSHARP",
+ }
+ PluginLanguage_value = map[string]int32{
+ "PLUGIN_LANGUAGE_UNSPECIFIED": 0,
+ "PLUGIN_LANGUAGE_GO": 1,
+ "PLUGIN_LANGUAGE_JAVASCRIPT": 2,
+ "PLUGIN_LANGUAGE_TYPESCRIPT": 3,
+ "PLUGIN_LANGUAGE_SWIFT": 4,
+ "PLUGIN_LANGUAGE_CPP": 5,
+ "PLUGIN_LANGUAGE_JAVA": 6,
+ "PLUGIN_LANGUAGE_DART": 7,
+ "PLUGIN_LANGUAGE_RUST": 8,
+ "PLUGIN_LANGUAGE_PYTHON": 9,
+ "PLUGIN_LANGUAGE_RUBY": 10,
+ "PLUGIN_LANGUAGE_KOTLIN": 11,
+ "PLUGIN_LANGUAGE_OBJECTIVE_C": 12,
+ "PLUGIN_LANGUAGE_PHP": 13,
+ "PLUGIN_LANGUAGE_CSHARP": 14,
+ }
+)
+
+func (x PluginLanguage) Enum() *PluginLanguage {
+ p := new(PluginLanguage)
+ *p = x
+ return p
+}
+
+func (x PluginLanguage) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PluginLanguage) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_enumTypes[1].Descriptor()
+}
+
+func (PluginLanguage) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_enumTypes[1]
+}
+
+func (x PluginLanguage) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use PluginLanguage.Descriptor instead.
+func (PluginLanguage) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{1}
+}
+
+// NPMImportStyle is used to specify the import style the plugin supports.
+type NPMImportStyle int32
+
+const (
+ NPMImportStyle_NPM_IMPORT_STYLE_UNSPECIFIED NPMImportStyle = 0
+ NPMImportStyle_NPM_IMPORT_STYLE_MODULE NPMImportStyle = 1
+ NPMImportStyle_NPM_IMPORT_STYLE_COMMONJS NPMImportStyle = 2
+)
+
+// Enum value maps for NPMImportStyle.
+var (
+ NPMImportStyle_name = map[int32]string{
+ 0: "NPM_IMPORT_STYLE_UNSPECIFIED",
+ 1: "NPM_IMPORT_STYLE_MODULE",
+ 2: "NPM_IMPORT_STYLE_COMMONJS",
+ }
+ NPMImportStyle_value = map[string]int32{
+ "NPM_IMPORT_STYLE_UNSPECIFIED": 0,
+ "NPM_IMPORT_STYLE_MODULE": 1,
+ "NPM_IMPORT_STYLE_COMMONJS": 2,
+ }
+)
+
+func (x NPMImportStyle) Enum() *NPMImportStyle {
+ p := new(NPMImportStyle)
+ *p = x
+ return p
+}
+
+func (x NPMImportStyle) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (NPMImportStyle) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_enumTypes[2].Descriptor()
+}
+
+func (NPMImportStyle) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_enumTypes[2]
+}
+
+func (x NPMImportStyle) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use NPMImportStyle.Descriptor instead.
+func (NPMImportStyle) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{2}
+}
+
+// GoConfig is the configuration for a Go plugin.
+type GoConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Optionally define the runtime libraries for the plugin.
+ RuntimeLibraries []*GoConfig_RuntimeLibrary `protobuf:"bytes,1,rep,name=runtime_libraries,json=runtimeLibraries,proto3" json:"runtime_libraries,omitempty"`
+ // The minimum Go version required by the plugin.
+ MinimumVersion string `protobuf:"bytes,2,opt,name=minimum_version,json=minimumVersion,proto3" json:"minimum_version,omitempty"`
+}
+
+func (x *GoConfig) Reset() {
+ *x = GoConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GoConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GoConfig) ProtoMessage() {}
+
+func (x *GoConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 GoConfig.ProtoReflect.Descriptor instead.
+func (*GoConfig) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GoConfig) GetRuntimeLibraries() []*GoConfig_RuntimeLibrary {
+ if x != nil {
+ return x.RuntimeLibraries
+ }
+ return nil
+}
+
+func (x *GoConfig) GetMinimumVersion() string {
+ if x != nil {
+ return x.MinimumVersion
+ }
+ return ""
+}
+
+// NPMConfig is the configuration for a JavaScript NPM plugin.
+type NPMConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Optionally define the runtime libraries for the plugin.
+ RuntimeLibraries []*NPMConfig_RuntimeLibrary `protobuf:"bytes,1,rep,name=runtime_libraries,json=runtimeLibraries,proto3" json:"runtime_libraries,omitempty"`
+ // Optionally define a configuration for rewriting import paths, a feature mainly
+ // used for remote code generation in the BSR npm registry, which makes it possible
+ // to serve the output of a BSR module and a plugin in an individual package.
+ //
+ // All plugins based on @bufbuild/protoplugin support the option "rewrite_imports".
+ // Setting this value, i.e. "connectweb.js" or "pb.js", informs the BSR npm registry
+ // that the plugin supports import rewrites with the given import suffix.
+ RewriteImportPathSuffix string `protobuf:"bytes,2,opt,name=rewrite_import_path_suffix,json=rewriteImportPathSuffix,proto3" json:"rewrite_import_path_suffix,omitempty"`
+ // The import style used for the "type" field in the package.json file.
+ // This exists to support legacy plugins that require "commonjs" support.
+ ImportStyle NPMImportStyle `protobuf:"varint,3,opt,name=import_style,json=importStyle,proto3,enum=buf.alpha.registry.v1alpha1.NPMImportStyle" json:"import_style,omitempty"`
+}
+
+func (x *NPMConfig) Reset() {
+ *x = NPMConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NPMConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NPMConfig) ProtoMessage() {}
+
+func (x *NPMConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 NPMConfig.ProtoReflect.Descriptor instead.
+func (*NPMConfig) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *NPMConfig) GetRuntimeLibraries() []*NPMConfig_RuntimeLibrary {
+ if x != nil {
+ return x.RuntimeLibraries
+ }
+ return nil
+}
+
+func (x *NPMConfig) GetRewriteImportPathSuffix() string {
+ if x != nil {
+ return x.RewriteImportPathSuffix
+ }
+ return ""
+}
+
+func (x *NPMConfig) GetImportStyle() NPMImportStyle {
+ if x != nil {
+ return x.ImportStyle
+ }
+ return NPMImportStyle_NPM_IMPORT_STYLE_UNSPECIFIED
+}
+
+// RegistryConfig is the configuration for the remote registry of a plugin.
+type RegistryConfig struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to RegistryConfig:
+ //
+ // *RegistryConfig_GoConfig
+ // *RegistryConfig_NpmConfig
+ RegistryConfig isRegistryConfig_RegistryConfig `protobuf_oneof:"registry_config"`
+ // The options to pass to the plugin. These will
+ // be merged into a single, comma-separated string.
+ Options []string `protobuf:"bytes,10,rep,name=options,proto3" json:"options,omitempty"`
+}
+
+func (x *RegistryConfig) Reset() {
+ *x = RegistryConfig{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RegistryConfig) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RegistryConfig) ProtoMessage() {}
+
+func (x *RegistryConfig) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 RegistryConfig.ProtoReflect.Descriptor instead.
+func (*RegistryConfig) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{2}
+}
+
+func (m *RegistryConfig) GetRegistryConfig() isRegistryConfig_RegistryConfig {
+ if m != nil {
+ return m.RegistryConfig
+ }
+ return nil
+}
+
+func (x *RegistryConfig) GetGoConfig() *GoConfig {
+ if x, ok := x.GetRegistryConfig().(*RegistryConfig_GoConfig); ok {
+ return x.GoConfig
+ }
+ return nil
+}
+
+func (x *RegistryConfig) GetNpmConfig() *NPMConfig {
+ if x, ok := x.GetRegistryConfig().(*RegistryConfig_NpmConfig); ok {
+ return x.NpmConfig
+ }
+ return nil
+}
+
+func (x *RegistryConfig) GetOptions() []string {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+type isRegistryConfig_RegistryConfig interface {
+ isRegistryConfig_RegistryConfig()
+}
+
+type RegistryConfig_GoConfig struct {
+ GoConfig *GoConfig `protobuf:"bytes,1,opt,name=go_config,json=goConfig,proto3,oneof"`
+}
+
+type RegistryConfig_NpmConfig struct {
+ NpmConfig *NPMConfig `protobuf:"bytes,2,opt,name=npm_config,json=npmConfig,proto3,oneof"`
+}
+
+func (*RegistryConfig_GoConfig) isRegistryConfig_RegistryConfig() {}
+
+func (*RegistryConfig_NpmConfig) isRegistryConfig_RegistryConfig() {}
+
+type CuratedPluginReference struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin, i.e. "library".
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin, i.e. "connect-go".
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // Semver-formatted plugin version.
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ // The revision for this plugin version.
+ Revision uint32 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"`
+}
+
+func (x *CuratedPluginReference) Reset() {
+ *x = CuratedPluginReference{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CuratedPluginReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CuratedPluginReference) ProtoMessage() {}
+
+func (x *CuratedPluginReference) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 CuratedPluginReference.ProtoReflect.Descriptor instead.
+func (*CuratedPluginReference) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CuratedPluginReference) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *CuratedPluginReference) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CuratedPluginReference) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *CuratedPluginReference) GetRevision() uint32 {
+ if x != nil {
+ return x.Revision
+ }
+ return 0
+}
+
+// CuratedPlugin represents a protoc plugin curated by Buf, such as protoc-gen-go.
+type CuratedPlugin struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the plugin, which uniquely identifies the plugin.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // The owner of the plugin, i.e. "library".
+ Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin, i.e. "connect-go".
+ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
+ // The optional registry type of the plugin.
+ RegistryType PluginRegistryType `protobuf:"varint,4,opt,name=registry_type,json=registryType,proto3,enum=buf.alpha.registry.v1alpha1.PluginRegistryType" json:"registry_type,omitempty"`
+ // Semver-formatted plugin version.
+ Version string `protobuf:"bytes,5,opt,name=version,proto3" json:"version,omitempty"`
+ // The full container image digest associated with this plugin version including
+ // the algorithm.
+ // Ref: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests
+ ContainerImageDigest string `protobuf:"bytes,6,opt,name=container_image_digest,json=containerImageDigest,proto3" json:"container_image_digest,omitempty"`
+ // The creation time of the plugin.
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,8,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // List of plugin dependencies.
+ Dependencies []*CuratedPluginReference `protobuf:"bytes,9,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
+ // Optionally specify the URL leading to the source code of the plugin, if available.
+ SourceUrl string `protobuf:"bytes,10,opt,name=source_url,json=sourceUrl,proto3" json:"source_url,omitempty"`
+ // Optionally specify a brief description of the plugin functionality.
+ Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description,omitempty"`
+ // The configuration for the remote registry of the plugin.
+ RegistryConfig *RegistryConfig `protobuf:"bytes,12,opt,name=registry_config,json=registryConfig,proto3" json:"registry_config,omitempty"`
+ // The revision for this plugin version.
+ Revision uint32 `protobuf:"varint,13,opt,name=revision,proto3" json:"revision,omitempty"`
+ // The output languages supported by the plugin.
+ OutputLanguages []PluginLanguage `protobuf:"varint,14,rep,packed,name=output_languages,json=outputLanguages,proto3,enum=buf.alpha.registry.v1alpha1.PluginLanguage" json:"output_languages,omitempty"`
+ // spdx_license_id is the license of the plugin, which should be one of the identifiers
+ // defined in https://spdx.org/licenses
+ SpdxLicenseId string `protobuf:"bytes,15,opt,name=spdx_license_id,json=spdxLicenseId,proto3" json:"spdx_license_id,omitempty"`
+ // license_url specifies an optional URL for the plugin's license (if not using a standard spdx_license_id).
+ LicenseUrl string `protobuf:"bytes,16,opt,name=license_url,json=licenseUrl,proto3" json:"license_url,omitempty"`
+ // verified indicates the plugin has been verified. Verification is a property
+ // of the BSR and cannot be set by end-users.
+ Verified bool `protobuf:"varint,17,opt,name=verified,proto3" json:"verified,omitempty"`
+}
+
+func (x *CuratedPlugin) Reset() {
+ *x = CuratedPlugin{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CuratedPlugin) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CuratedPlugin) ProtoMessage() {}
+
+func (x *CuratedPlugin) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 CuratedPlugin.ProtoReflect.Descriptor instead.
+func (*CuratedPlugin) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *CuratedPlugin) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *CuratedPlugin) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *CuratedPlugin) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CuratedPlugin) GetRegistryType() PluginRegistryType {
+ if x != nil {
+ return x.RegistryType
+ }
+ return PluginRegistryType_PLUGIN_REGISTRY_TYPE_UNSPECIFIED
+}
+
+func (x *CuratedPlugin) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *CuratedPlugin) GetContainerImageDigest() string {
+ if x != nil {
+ return x.ContainerImageDigest
+ }
+ return ""
+}
+
+func (x *CuratedPlugin) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *CuratedPlugin) GetDependencies() []*CuratedPluginReference {
+ if x != nil {
+ return x.Dependencies
+ }
+ return nil
+}
+
+func (x *CuratedPlugin) GetSourceUrl() string {
+ if x != nil {
+ return x.SourceUrl
+ }
+ return ""
+}
+
+func (x *CuratedPlugin) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *CuratedPlugin) GetRegistryConfig() *RegistryConfig {
+ if x != nil {
+ return x.RegistryConfig
+ }
+ return nil
+}
+
+func (x *CuratedPlugin) GetRevision() uint32 {
+ if x != nil {
+ return x.Revision
+ }
+ return 0
+}
+
+func (x *CuratedPlugin) GetOutputLanguages() []PluginLanguage {
+ if x != nil {
+ return x.OutputLanguages
+ }
+ return nil
+}
+
+func (x *CuratedPlugin) GetSpdxLicenseId() string {
+ if x != nil {
+ return x.SpdxLicenseId
+ }
+ return ""
+}
+
+func (x *CuratedPlugin) GetLicenseUrl() string {
+ if x != nil {
+ return x.LicenseUrl
+ }
+ return ""
+}
+
+func (x *CuratedPlugin) GetVerified() bool {
+ if x != nil {
+ return x.Verified
+ }
+ return false
+}
+
+type GenerateCodeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The image to run plugins against to generate the desired file outputs.
+ //
+ // All image files that are not imports and not well-known types will be generated.
+ // If you want to filter what files are generated, modify the image.
+ // If you want to include imports, set include_imports.
+ Image *v1.Image `protobuf:"bytes,1,opt,name=image,proto3" json:"image,omitempty"`
+ Requests []*PluginGenerationRequest `protobuf:"bytes,2,rep,name=requests,proto3" json:"requests,omitempty"`
+ // Include imports from the Image in generation.
+ IncludeImports bool `protobuf:"varint,3,opt,name=include_imports,json=includeImports,proto3" json:"include_imports,omitempty"`
+ // Include Well-Known Types from the Image in generation.
+ //
+ // include_imports must be set if include_well_known_types is set.
+ IncludeWellKnownTypes bool `protobuf:"varint,4,opt,name=include_well_known_types,json=includeWellKnownTypes,proto3" json:"include_well_known_types,omitempty"`
+}
+
+func (x *GenerateCodeRequest) Reset() {
+ *x = GenerateCodeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GenerateCodeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GenerateCodeRequest) ProtoMessage() {}
+
+func (x *GenerateCodeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 GenerateCodeRequest.ProtoReflect.Descriptor instead.
+func (*GenerateCodeRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *GenerateCodeRequest) GetImage() *v1.Image {
+ if x != nil {
+ return x.Image
+ }
+ return nil
+}
+
+func (x *GenerateCodeRequest) GetRequests() []*PluginGenerationRequest {
+ if x != nil {
+ return x.Requests
+ }
+ return nil
+}
+
+func (x *GenerateCodeRequest) GetIncludeImports() bool {
+ if x != nil {
+ return x.IncludeImports
+ }
+ return false
+}
+
+func (x *GenerateCodeRequest) GetIncludeWellKnownTypes() bool {
+ if x != nil {
+ return x.IncludeWellKnownTypes
+ }
+ return false
+}
+
+type GenerateCodeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Responses from each plugin execution.
+ // The order of each response matches the order in the GenerateCodeRequest.
+ Responses []*PluginGenerationResponse `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"`
+}
+
+func (x *GenerateCodeResponse) Reset() {
+ *x = GenerateCodeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GenerateCodeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GenerateCodeResponse) ProtoMessage() {}
+
+func (x *GenerateCodeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 GenerateCodeResponse.ProtoReflect.Descriptor instead.
+func (*GenerateCodeResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *GenerateCodeResponse) GetResponses() []*PluginGenerationResponse {
+ if x != nil {
+ return x.Responses
+ }
+ return nil
+}
+
+// Request for performing code generation using the specified plugin.
+type PluginGenerationRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The plugin to execute.
+ PluginReference *CuratedPluginReference `protobuf:"bytes,1,opt,name=plugin_reference,json=pluginReference,proto3" json:"plugin_reference,omitempty"`
+ // The options to pass to the plugin. These will
+ // be merged into a single, comma-separated string.
+ Options []string `protobuf:"bytes,2,rep,name=options,proto3" json:"options,omitempty"`
+}
+
+func (x *PluginGenerationRequest) Reset() {
+ *x = PluginGenerationRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PluginGenerationRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PluginGenerationRequest) ProtoMessage() {}
+
+func (x *PluginGenerationRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 PluginGenerationRequest.ProtoReflect.Descriptor instead.
+func (*PluginGenerationRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *PluginGenerationRequest) GetPluginReference() *CuratedPluginReference {
+ if x != nil {
+ return x.PluginReference
+ }
+ return nil
+}
+
+func (x *PluginGenerationRequest) GetOptions() []string {
+ if x != nil {
+ return x.Options
+ }
+ return nil
+}
+
+// Response from code generation for a given plugin.
+type PluginGenerationResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Generated code from the plugin.
+ Response *pluginpb.CodeGeneratorResponse `protobuf:"bytes,1,opt,name=response,proto3" json:"response,omitempty"`
+}
+
+func (x *PluginGenerationResponse) Reset() {
+ *x = PluginGenerationResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PluginGenerationResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PluginGenerationResponse) ProtoMessage() {}
+
+func (x *PluginGenerationResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 PluginGenerationResponse.ProtoReflect.Descriptor instead.
+func (*PluginGenerationResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *PluginGenerationResponse) GetResponse() *pluginpb.CodeGeneratorResponse {
+ if x != nil {
+ return x.Response
+ }
+ return nil
+}
+
+type CreateCuratedPluginRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin, i.e. "library".
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin, i.e. "connect-go".
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The optional registry type of the plugin.
+ RegistryType PluginRegistryType `protobuf:"varint,3,opt,name=registry_type,json=registryType,proto3,enum=buf.alpha.registry.v1alpha1.PluginRegistryType" json:"registry_type,omitempty"`
+ // Semver-formatted plugin version.
+ Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`
+ // The full container image digest associated with this plugin version including
+ // the algorithm.
+ // Ref: https://github.com/opencontainers/image-spec/blob/main/descriptor.md#digests
+ ContainerImageDigest string `protobuf:"bytes,5,opt,name=container_image_digest,json=containerImageDigest,proto3" json:"container_image_digest,omitempty"`
+ // List of plugin dependencies.
+ Dependencies []*CuratedPluginReference `protobuf:"bytes,7,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
+ // The URL leading to the source code of the plugin, if available.
+ SourceUrl string `protobuf:"bytes,8,opt,name=source_url,json=sourceUrl,proto3" json:"source_url,omitempty"`
+ // A brief description of the plugin functionality.
+ Description string `protobuf:"bytes,9,opt,name=description,proto3" json:"description,omitempty"`
+ // The configuration for the remote registry of the plugin.
+ RegistryConfig *RegistryConfig `protobuf:"bytes,12,opt,name=registry_config,json=registryConfig,proto3" json:"registry_config,omitempty"`
+ // The revision for this plugin version.
+ Revision uint32 `protobuf:"varint,13,opt,name=revision,proto3" json:"revision,omitempty"`
+ // The output languages supported by the plugin.
+ OutputLanguages []PluginLanguage `protobuf:"varint,14,rep,packed,name=output_languages,json=outputLanguages,proto3,enum=buf.alpha.registry.v1alpha1.PluginLanguage" json:"output_languages,omitempty"`
+ // spdx_license_id is the license of the plugin, which should be one of the identifiers
+ // defined in https://spdx.org/licenses
+ SpdxLicenseId string `protobuf:"bytes,15,opt,name=spdx_license_id,json=spdxLicenseId,proto3" json:"spdx_license_id,omitempty"`
+ // license_url specifies an optional URL for the plugin's license (if not using a standard spdx_license_id).
+ LicenseUrl string `protobuf:"bytes,16,opt,name=license_url,json=licenseUrl,proto3" json:"license_url,omitempty"`
+}
+
+func (x *CreateCuratedPluginRequest) Reset() {
+ *x = CreateCuratedPluginRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateCuratedPluginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateCuratedPluginRequest) ProtoMessage() {}
+
+func (x *CreateCuratedPluginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 CreateCuratedPluginRequest.ProtoReflect.Descriptor instead.
+func (*CreateCuratedPluginRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *CreateCuratedPluginRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *CreateCuratedPluginRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CreateCuratedPluginRequest) GetRegistryType() PluginRegistryType {
+ if x != nil {
+ return x.RegistryType
+ }
+ return PluginRegistryType_PLUGIN_REGISTRY_TYPE_UNSPECIFIED
+}
+
+func (x *CreateCuratedPluginRequest) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *CreateCuratedPluginRequest) GetContainerImageDigest() string {
+ if x != nil {
+ return x.ContainerImageDigest
+ }
+ return ""
+}
+
+func (x *CreateCuratedPluginRequest) GetDependencies() []*CuratedPluginReference {
+ if x != nil {
+ return x.Dependencies
+ }
+ return nil
+}
+
+func (x *CreateCuratedPluginRequest) GetSourceUrl() string {
+ if x != nil {
+ return x.SourceUrl
+ }
+ return ""
+}
+
+func (x *CreateCuratedPluginRequest) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *CreateCuratedPluginRequest) GetRegistryConfig() *RegistryConfig {
+ if x != nil {
+ return x.RegistryConfig
+ }
+ return nil
+}
+
+func (x *CreateCuratedPluginRequest) GetRevision() uint32 {
+ if x != nil {
+ return x.Revision
+ }
+ return 0
+}
+
+func (x *CreateCuratedPluginRequest) GetOutputLanguages() []PluginLanguage {
+ if x != nil {
+ return x.OutputLanguages
+ }
+ return nil
+}
+
+func (x *CreateCuratedPluginRequest) GetSpdxLicenseId() string {
+ if x != nil {
+ return x.SpdxLicenseId
+ }
+ return ""
+}
+
+func (x *CreateCuratedPluginRequest) GetLicenseUrl() string {
+ if x != nil {
+ return x.LicenseUrl
+ }
+ return ""
+}
+
+type CreateCuratedPluginResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The created plugin.
+ Configuration *CuratedPlugin `protobuf:"bytes,1,opt,name=configuration,proto3" json:"configuration,omitempty"`
+}
+
+func (x *CreateCuratedPluginResponse) Reset() {
+ *x = CreateCuratedPluginResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateCuratedPluginResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateCuratedPluginResponse) ProtoMessage() {}
+
+func (x *CreateCuratedPluginResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 CreateCuratedPluginResponse.ProtoReflect.Descriptor instead.
+func (*CreateCuratedPluginResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *CreateCuratedPluginResponse) GetConfiguration() *CuratedPlugin {
+ if x != nil {
+ return x.Configuration
+ }
+ return nil
+}
+
+type ListCuratedPluginsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListCuratedPluginsRequest) Reset() {
+ *x = ListCuratedPluginsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListCuratedPluginsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListCuratedPluginsRequest) ProtoMessage() {}
+
+func (x *ListCuratedPluginsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 ListCuratedPluginsRequest.ProtoReflect.Descriptor instead.
+func (*ListCuratedPluginsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *ListCuratedPluginsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListCuratedPluginsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListCuratedPluginsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListCuratedPluginsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Plugins []*CuratedPlugin `protobuf:"bytes,1,rep,name=plugins,proto3" json:"plugins,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListCuratedPluginsResponse) Reset() {
+ *x = ListCuratedPluginsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListCuratedPluginsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListCuratedPluginsResponse) ProtoMessage() {}
+
+func (x *ListCuratedPluginsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 ListCuratedPluginsResponse.ProtoReflect.Descriptor instead.
+func (*ListCuratedPluginsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *ListCuratedPluginsResponse) GetPlugins() []*CuratedPlugin {
+ if x != nil {
+ return x.Plugins
+ }
+ return nil
+}
+
+func (x *ListCuratedPluginsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type GetLatestCuratedPluginRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the plugin, i.e. "library".
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the plugin, i.e. "connect-go".
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // Both version (semver-formatted) and revision are optional, which means
+ // return the latest plugin.
+ // If version is set, but revision is omitted, then return the latest
+ // revision for that version.
+ // If version and revision are both set, return specific plugin.
+ // It is an error to set a revision without a corresponding version.
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ Revision uint32 `protobuf:"varint,4,opt,name=revision,proto3" json:"revision,omitempty"`
+}
+
+func (x *GetLatestCuratedPluginRequest) Reset() {
+ *x = GetLatestCuratedPluginRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetLatestCuratedPluginRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetLatestCuratedPluginRequest) ProtoMessage() {}
+
+func (x *GetLatestCuratedPluginRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 GetLatestCuratedPluginRequest.ProtoReflect.Descriptor instead.
+func (*GetLatestCuratedPluginRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *GetLatestCuratedPluginRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetLatestCuratedPluginRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *GetLatestCuratedPluginRequest) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *GetLatestCuratedPluginRequest) GetRevision() uint32 {
+ if x != nil {
+ return x.Revision
+ }
+ return 0
+}
+
+type GetLatestCuratedPluginResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Plugin *CuratedPlugin `protobuf:"bytes,1,opt,name=plugin,proto3" json:"plugin,omitempty"`
+ // versions is a semver-sorted list in descending order.
+ Versions []*CuratedPluginVersionRevisions `protobuf:"bytes,2,rep,name=versions,proto3" json:"versions,omitempty"`
+}
+
+func (x *GetLatestCuratedPluginResponse) Reset() {
+ *x = GetLatestCuratedPluginResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetLatestCuratedPluginResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetLatestCuratedPluginResponse) ProtoMessage() {}
+
+func (x *GetLatestCuratedPluginResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 GetLatestCuratedPluginResponse.ProtoReflect.Descriptor instead.
+func (*GetLatestCuratedPluginResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *GetLatestCuratedPluginResponse) GetPlugin() *CuratedPlugin {
+ if x != nil {
+ return x.Plugin
+ }
+ return nil
+}
+
+func (x *GetLatestCuratedPluginResponse) GetVersions() []*CuratedPluginVersionRevisions {
+ if x != nil {
+ return x.Versions
+ }
+ return nil
+}
+
+type CuratedPluginVersionRevisions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Version string `protobuf:"bytes,1,opt,name=version,proto3" json:"version,omitempty"`
+ // revisions is a sorted list in descending order.
+ Revisions []uint32 `protobuf:"varint,2,rep,packed,name=revisions,proto3" json:"revisions,omitempty"`
+}
+
+func (x *CuratedPluginVersionRevisions) Reset() {
+ *x = CuratedPluginVersionRevisions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CuratedPluginVersionRevisions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CuratedPluginVersionRevisions) ProtoMessage() {}
+
+func (x *CuratedPluginVersionRevisions) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 CuratedPluginVersionRevisions.ProtoReflect.Descriptor instead.
+func (*CuratedPluginVersionRevisions) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *CuratedPluginVersionRevisions) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *CuratedPluginVersionRevisions) GetRevisions() []uint32 {
+ if x != nil {
+ return x.Revisions
+ }
+ return nil
+}
+
+// RuntimeLibrary describes the runtime library dependency of the generated code.
+type GoConfig_RuntimeLibrary struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the runtime library module, i.e. "google.golang.org/protobuf".
+ Module string `protobuf:"bytes,1,opt,name=module,proto3" json:"module,omitempty"`
+ // The version of the runtime library, i.e. "v1.27.1".
+ Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
+}
+
+func (x *GoConfig_RuntimeLibrary) Reset() {
+ *x = GoConfig_RuntimeLibrary{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GoConfig_RuntimeLibrary) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GoConfig_RuntimeLibrary) ProtoMessage() {}
+
+func (x *GoConfig_RuntimeLibrary) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 GoConfig_RuntimeLibrary.ProtoReflect.Descriptor instead.
+func (*GoConfig_RuntimeLibrary) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{0, 0}
+}
+
+func (x *GoConfig_RuntimeLibrary) GetModule() string {
+ if x != nil {
+ return x.Module
+ }
+ return ""
+}
+
+func (x *GoConfig_RuntimeLibrary) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+// RuntimeLibrary describes the runtime library dependency of the generated code.
+type NPMConfig_RuntimeLibrary struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the runtime library package, i.e. "@grpc/grpc-js".
+ Package string `protobuf:"bytes,1,opt,name=package,proto3" json:"package,omitempty"`
+ // The version of the runtime library, i.e. "^1.27.1".
+ Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"`
+}
+
+func (x *NPMConfig_RuntimeLibrary) Reset() {
+ *x = NPMConfig_RuntimeLibrary{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *NPMConfig_RuntimeLibrary) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*NPMConfig_RuntimeLibrary) ProtoMessage() {}
+
+func (x *NPMConfig_RuntimeLibrary) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_plugin_curation_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 NPMConfig_RuntimeLibrary.ProtoReflect.Descriptor instead.
+func (*NPMConfig_RuntimeLibrary) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP(), []int{1, 0}
+}
+
+func (x *NPMConfig_RuntimeLibrary) GetPackage() string {
+ if x != nil {
+ return x.Package
+ }
+ return ""
+}
+
+func (x *NPMConfig_RuntimeLibrary) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+var File_buf_alpha_registry_v1alpha1_plugin_curation_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDesc = []byte{
+ 0x0a, 0x31, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x1a, 0x1e, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x69, 0x6d, 0x61, 0x67,
+ 0x65, 0x2f, 0x76, 0x31, 0x2f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x25, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2f, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
+ 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xda, 0x01, 0x0a, 0x08, 0x47, 0x6f, 0x43,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x61, 0x0a, 0x11, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65,
+ 0x5f, 0x6c, 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x34, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47,
+ 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c,
+ 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c,
+ 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x69, 0x6e, 0x69,
+ 0x6d, 0x75, 0x6d, 0x5f, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0e, 0x6d, 0x69, 0x6e, 0x69, 0x6d, 0x75, 0x6d, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f,
+ 0x6e, 0x1a, 0x42, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x69, 0x62, 0x72,
+ 0x61, 0x72, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xc2, 0x02, 0x0a, 0x09, 0x4e, 0x50, 0x4d, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x12, 0x62, 0x0a, 0x11, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x5f, 0x6c,
+ 0x69, 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x50, 0x4d,
+ 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x69,
+ 0x62, 0x72, 0x61, 0x72, 0x79, 0x52, 0x10, 0x72, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c, 0x69,
+ 0x62, 0x72, 0x61, 0x72, 0x69, 0x65, 0x73, 0x12, 0x3b, 0x0a, 0x1a, 0x72, 0x65, 0x77, 0x72, 0x69,
+ 0x74, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x73,
+ 0x75, 0x66, 0x66, 0x69, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x17, 0x72, 0x65, 0x77,
+ 0x72, 0x69, 0x74, 0x65, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x61, 0x74, 0x68, 0x53, 0x75,
+ 0x66, 0x66, 0x69, 0x78, 0x12, 0x4e, 0x0a, 0x0c, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x5f, 0x73,
+ 0x74, 0x79, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x50, 0x4d, 0x49, 0x6d, 0x70, 0x6f,
+ 0x72, 0x74, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x52, 0x0b, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x53,
+ 0x74, 0x79, 0x6c, 0x65, 0x1a, 0x44, 0x0a, 0x0e, 0x52, 0x75, 0x6e, 0x74, 0x69, 0x6d, 0x65, 0x4c,
+ 0x69, 0x62, 0x72, 0x61, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x70, 0x61, 0x63, 0x6b, 0x61, 0x67, 0x65,
+ 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xd2, 0x01, 0x0a, 0x0e, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x44, 0x0a,
+ 0x09, 0x67, 0x6f, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47,
+ 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x08, 0x67, 0x6f, 0x43, 0x6f, 0x6e,
+ 0x66, 0x69, 0x67, 0x12, 0x47, 0x0a, 0x0a, 0x6e, 0x70, 0x6d, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69,
+ 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4e, 0x50, 0x4d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48,
+ 0x00, 0x52, 0x09, 0x6e, 0x70, 0x6d, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07,
+ 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x11, 0x0a, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x4a, 0x04, 0x08, 0x03, 0x10, 0x0a, 0x22,
+ 0x78, 0x0a, 0x16, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a,
+ 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x08, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xf5, 0x05, 0x0a, 0x0d, 0x43, 0x75,
+ 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f,
+ 0x77, 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65,
+ 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e,
+ 0x65, 0x72, 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
+ 0x49, 0x6d, 0x61, 0x67, 0x65, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x3b, 0x0a, 0x0b, 0x63,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x57, 0x0a, 0x0c, 0x64, 0x65, 0x70, 0x65,
+ 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x72,
+ 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65,
+ 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65,
+ 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18,
+ 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x72, 0x6c,
+ 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18,
+ 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f, 0x63,
+ 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76, 0x69,
+ 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x76, 0x69,
+ 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x10, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x6c,
+ 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x2b,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x52, 0x0f, 0x6f, 0x75, 0x74,
+ 0x70, 0x75, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f,
+ 0x73, 0x70, 0x64, 0x78, 0x5f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18,
+ 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x70, 0x64, 0x78, 0x4c, 0x69, 0x63, 0x65, 0x6e,
+ 0x73, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x5f,
+ 0x75, 0x72, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x63, 0x65, 0x6e,
+ 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x1a, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65,
+ 0x64, 0x18, 0x11, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x65,
+ 0x64, 0x22, 0xfa, 0x01, 0x0a, 0x13, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f,
+ 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x05, 0x69, 0x6d, 0x61,
+ 0x67, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x49, 0x6d,
+ 0x61, 0x67, 0x65, 0x52, 0x05, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x12, 0x50, 0x0a, 0x08, 0x72, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x27, 0x0a, 0x0f,
+ 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x69, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x49, 0x6d,
+ 0x70, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x37, 0x0a, 0x18, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
+ 0x5f, 0x77, 0x65, 0x6c, 0x6c, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f, 0x74, 0x79, 0x70, 0x65,
+ 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x15, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
+ 0x57, 0x65, 0x6c, 0x6c, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x73, 0x22, 0x6b,
+ 0x0a, 0x14, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x47, 0x65,
+ 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x22, 0x93, 0x01, 0x0a, 0x17,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x5e, 0x0a, 0x10, 0x70, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x66,
+ 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65,
+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x73, 0x22, 0x67, 0x0a, 0x18, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x47, 0x65, 0x6e, 0x65, 0x72,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a,
+ 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x2f, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x63, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x47,
+ 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x99, 0x05, 0x0a, 0x1a, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x54, 0x0a, 0x0d, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f,
+ 0x74, 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0c, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x12, 0x34, 0x0a, 0x16, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72,
+ 0x5f, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x14, 0x63, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d,
+ 0x61, 0x67, 0x65, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x0c, 0x64, 0x65, 0x70,
+ 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x75,
+ 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72,
+ 0x65, 0x6e, 0x63, 0x65, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69,
+ 0x65, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x5f, 0x75, 0x72, 0x6c,
+ 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x55, 0x72,
+ 0x6c, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x12, 0x54, 0x0a, 0x0f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5f,
+ 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x76,
+ 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x72, 0x65, 0x76,
+ 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x56, 0x0a, 0x10, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f,
+ 0x6c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x18, 0x0e, 0x20, 0x03, 0x28, 0x0e, 0x32,
+ 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c,
+ 0x75, 0x67, 0x69, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x52, 0x0f, 0x6f, 0x75,
+ 0x74, 0x70, 0x75, 0x74, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x73, 0x12, 0x26, 0x0a,
+ 0x0f, 0x73, 0x70, 0x64, 0x78, 0x5f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x64,
+ 0x18, 0x0f, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73, 0x70, 0x64, 0x78, 0x4c, 0x69, 0x63, 0x65,
+ 0x6e, 0x73, 0x65, 0x49, 0x64, 0x12, 0x1f, 0x0a, 0x0b, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65,
+ 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6c, 0x69, 0x63, 0x65,
+ 0x6e, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x22, 0x6f, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x75,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x61, 0x74,
+ 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67,
+ 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x22, 0x71, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x43,
+ 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a,
+ 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x8a, 0x01, 0x0a, 0x1a, 0x4c,
+ 0x69, 0x73, 0x74, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x07, 0x70, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x07, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12,
+ 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61,
+ 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7f, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x4c, 0x61,
+ 0x74, 0x65, 0x73, 0x74, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12,
+ 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08,
+ 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
+ 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xbc, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74,
+ 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x42, 0x0a, 0x06, 0x70,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65,
+ 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12,
+ 0x56, 0x0a, 0x08, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72,
+ 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x08, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x57, 0x0a, 0x1d, 0x43, 0x75, 0x72, 0x61, 0x74,
+ 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x52,
+ 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73,
+ 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69,
+ 0x6f, 0x6e, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18,
+ 0x02, 0x20, 0x03, 0x28, 0x0d, 0x52, 0x09, 0x72, 0x65, 0x76, 0x69, 0x73, 0x69, 0x6f, 0x6e, 0x73,
+ 0x2a, 0x75, 0x0a, 0x12, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x24, 0x0a, 0x20, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e,
+ 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x52, 0x59, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55,
+ 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17,
+ 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x52, 0x59, 0x5f,
+ 0x54, 0x59, 0x50, 0x45, 0x5f, 0x47, 0x4f, 0x10, 0x01, 0x12, 0x1c, 0x0a, 0x18, 0x50, 0x4c, 0x55,
+ 0x47, 0x49, 0x4e, 0x5f, 0x52, 0x45, 0x47, 0x49, 0x53, 0x54, 0x52, 0x59, 0x5f, 0x54, 0x59, 0x50,
+ 0x45, 0x5f, 0x4e, 0x50, 0x4d, 0x10, 0x02, 0x2a, 0xb3, 0x03, 0x0a, 0x0e, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x4c, 0x61, 0x6e, 0x67, 0x75, 0x61, 0x67, 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x4c,
+ 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x55, 0x4e,
+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x50,
+ 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x47,
+ 0x4f, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41,
+ 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x53, 0x43, 0x52, 0x49, 0x50,
+ 0x54, 0x10, 0x02, 0x12, 0x1e, 0x0a, 0x1a, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41,
+ 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x53, 0x43, 0x52, 0x49, 0x50,
+ 0x54, 0x10, 0x03, 0x12, 0x19, 0x0a, 0x15, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41,
+ 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x53, 0x57, 0x49, 0x46, 0x54, 0x10, 0x04, 0x12, 0x17,
+ 0x0a, 0x13, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47, 0x55, 0x41, 0x47,
+ 0x45, 0x5f, 0x43, 0x50, 0x50, 0x10, 0x05, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x4c, 0x55, 0x47, 0x49,
+ 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x4a, 0x41, 0x56, 0x41, 0x10,
+ 0x06, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47,
+ 0x55, 0x41, 0x47, 0x45, 0x5f, 0x44, 0x41, 0x52, 0x54, 0x10, 0x07, 0x12, 0x18, 0x0a, 0x14, 0x50,
+ 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x52,
+ 0x55, 0x53, 0x54, 0x10, 0x08, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f,
+ 0x4c, 0x41, 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x59, 0x54, 0x48, 0x4f, 0x4e, 0x10,
+ 0x09, 0x12, 0x18, 0x0a, 0x14, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47,
+ 0x55, 0x41, 0x47, 0x45, 0x5f, 0x52, 0x55, 0x42, 0x59, 0x10, 0x0a, 0x12, 0x1a, 0x0a, 0x16, 0x50,
+ 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x4b,
+ 0x4f, 0x54, 0x4c, 0x49, 0x4e, 0x10, 0x0b, 0x12, 0x1f, 0x0a, 0x1b, 0x50, 0x4c, 0x55, 0x47, 0x49,
+ 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x4f, 0x42, 0x4a, 0x45, 0x43,
+ 0x54, 0x49, 0x56, 0x45, 0x5f, 0x43, 0x10, 0x0c, 0x12, 0x17, 0x0a, 0x13, 0x50, 0x4c, 0x55, 0x47,
+ 0x49, 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47, 0x55, 0x41, 0x47, 0x45, 0x5f, 0x50, 0x48, 0x50, 0x10,
+ 0x0d, 0x12, 0x1a, 0x0a, 0x16, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x4c, 0x41, 0x4e, 0x47,
+ 0x55, 0x41, 0x47, 0x45, 0x5f, 0x43, 0x53, 0x48, 0x41, 0x52, 0x50, 0x10, 0x0e, 0x2a, 0x6e, 0x0a,
+ 0x0e, 0x4e, 0x50, 0x4d, 0x49, 0x6d, 0x70, 0x6f, 0x72, 0x74, 0x53, 0x74, 0x79, 0x6c, 0x65, 0x12,
+ 0x20, 0x0a, 0x1c, 0x4e, 0x50, 0x4d, 0x5f, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x53, 0x54,
+ 0x59, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
+ 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x4e, 0x50, 0x4d, 0x5f, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x5f,
+ 0x53, 0x54, 0x59, 0x4c, 0x45, 0x5f, 0x4d, 0x4f, 0x44, 0x55, 0x4c, 0x45, 0x10, 0x01, 0x12, 0x1d,
+ 0x0a, 0x19, 0x4e, 0x50, 0x4d, 0x5f, 0x49, 0x4d, 0x50, 0x4f, 0x52, 0x54, 0x5f, 0x53, 0x54, 0x59,
+ 0x4c, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x4f, 0x4e, 0x4a, 0x53, 0x10, 0x02, 0x32, 0xbe, 0x03,
+ 0x0a, 0x15, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74,
+ 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x12, 0x36,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x88, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65,
+ 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61,
+ 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x16, 0x47,
+ 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x75, 0x72,
+ 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x47, 0x65, 0x74, 0x4c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x8c,
+ 0x01, 0x0a, 0x15, 0x43, 0x6f, 0x64, 0x65, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x73, 0x0a, 0x0c, 0x47, 0x65, 0x6e, 0x65,
+ 0x72, 0x61, 0x74, 0x65, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74, 0x65, 0x43,
+ 0x6f, 0x64, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x6e, 0x65, 0x72, 0x61, 0x74,
+ 0x65, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa0, 0x02,
+ 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x42, 0x13, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x43, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75,
+ 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e,
+ 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
+ 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescData = file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_plugin_curation_proto_enumTypes = make([]protoimpl.EnumInfo, 3)
+var file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes = make([]protoimpl.MessageInfo, 18)
+var file_buf_alpha_registry_v1alpha1_plugin_curation_proto_goTypes = []interface{}{
+ (PluginRegistryType)(0), // 0: buf.alpha.registry.v1alpha1.PluginRegistryType
+ (PluginLanguage)(0), // 1: buf.alpha.registry.v1alpha1.PluginLanguage
+ (NPMImportStyle)(0), // 2: buf.alpha.registry.v1alpha1.NPMImportStyle
+ (*GoConfig)(nil), // 3: buf.alpha.registry.v1alpha1.GoConfig
+ (*NPMConfig)(nil), // 4: buf.alpha.registry.v1alpha1.NPMConfig
+ (*RegistryConfig)(nil), // 5: buf.alpha.registry.v1alpha1.RegistryConfig
+ (*CuratedPluginReference)(nil), // 6: buf.alpha.registry.v1alpha1.CuratedPluginReference
+ (*CuratedPlugin)(nil), // 7: buf.alpha.registry.v1alpha1.CuratedPlugin
+ (*GenerateCodeRequest)(nil), // 8: buf.alpha.registry.v1alpha1.GenerateCodeRequest
+ (*GenerateCodeResponse)(nil), // 9: buf.alpha.registry.v1alpha1.GenerateCodeResponse
+ (*PluginGenerationRequest)(nil), // 10: buf.alpha.registry.v1alpha1.PluginGenerationRequest
+ (*PluginGenerationResponse)(nil), // 11: buf.alpha.registry.v1alpha1.PluginGenerationResponse
+ (*CreateCuratedPluginRequest)(nil), // 12: buf.alpha.registry.v1alpha1.CreateCuratedPluginRequest
+ (*CreateCuratedPluginResponse)(nil), // 13: buf.alpha.registry.v1alpha1.CreateCuratedPluginResponse
+ (*ListCuratedPluginsRequest)(nil), // 14: buf.alpha.registry.v1alpha1.ListCuratedPluginsRequest
+ (*ListCuratedPluginsResponse)(nil), // 15: buf.alpha.registry.v1alpha1.ListCuratedPluginsResponse
+ (*GetLatestCuratedPluginRequest)(nil), // 16: buf.alpha.registry.v1alpha1.GetLatestCuratedPluginRequest
+ (*GetLatestCuratedPluginResponse)(nil), // 17: buf.alpha.registry.v1alpha1.GetLatestCuratedPluginResponse
+ (*CuratedPluginVersionRevisions)(nil), // 18: buf.alpha.registry.v1alpha1.CuratedPluginVersionRevisions
+ (*GoConfig_RuntimeLibrary)(nil), // 19: buf.alpha.registry.v1alpha1.GoConfig.RuntimeLibrary
+ (*NPMConfig_RuntimeLibrary)(nil), // 20: buf.alpha.registry.v1alpha1.NPMConfig.RuntimeLibrary
+ (*timestamppb.Timestamp)(nil), // 21: google.protobuf.Timestamp
+ (*v1.Image)(nil), // 22: buf.alpha.image.v1.Image
+ (*pluginpb.CodeGeneratorResponse)(nil), // 23: google.protobuf.compiler.CodeGeneratorResponse
+}
+var file_buf_alpha_registry_v1alpha1_plugin_curation_proto_depIdxs = []int32{
+ 19, // 0: buf.alpha.registry.v1alpha1.GoConfig.runtime_libraries:type_name -> buf.alpha.registry.v1alpha1.GoConfig.RuntimeLibrary
+ 20, // 1: buf.alpha.registry.v1alpha1.NPMConfig.runtime_libraries:type_name -> buf.alpha.registry.v1alpha1.NPMConfig.RuntimeLibrary
+ 2, // 2: buf.alpha.registry.v1alpha1.NPMConfig.import_style:type_name -> buf.alpha.registry.v1alpha1.NPMImportStyle
+ 3, // 3: buf.alpha.registry.v1alpha1.RegistryConfig.go_config:type_name -> buf.alpha.registry.v1alpha1.GoConfig
+ 4, // 4: buf.alpha.registry.v1alpha1.RegistryConfig.npm_config:type_name -> buf.alpha.registry.v1alpha1.NPMConfig
+ 0, // 5: buf.alpha.registry.v1alpha1.CuratedPlugin.registry_type:type_name -> buf.alpha.registry.v1alpha1.PluginRegistryType
+ 21, // 6: buf.alpha.registry.v1alpha1.CuratedPlugin.create_time:type_name -> google.protobuf.Timestamp
+ 6, // 7: buf.alpha.registry.v1alpha1.CuratedPlugin.dependencies:type_name -> buf.alpha.registry.v1alpha1.CuratedPluginReference
+ 5, // 8: buf.alpha.registry.v1alpha1.CuratedPlugin.registry_config:type_name -> buf.alpha.registry.v1alpha1.RegistryConfig
+ 1, // 9: buf.alpha.registry.v1alpha1.CuratedPlugin.output_languages:type_name -> buf.alpha.registry.v1alpha1.PluginLanguage
+ 22, // 10: buf.alpha.registry.v1alpha1.GenerateCodeRequest.image:type_name -> buf.alpha.image.v1.Image
+ 10, // 11: buf.alpha.registry.v1alpha1.GenerateCodeRequest.requests:type_name -> buf.alpha.registry.v1alpha1.PluginGenerationRequest
+ 11, // 12: buf.alpha.registry.v1alpha1.GenerateCodeResponse.responses:type_name -> buf.alpha.registry.v1alpha1.PluginGenerationResponse
+ 6, // 13: buf.alpha.registry.v1alpha1.PluginGenerationRequest.plugin_reference:type_name -> buf.alpha.registry.v1alpha1.CuratedPluginReference
+ 23, // 14: buf.alpha.registry.v1alpha1.PluginGenerationResponse.response:type_name -> google.protobuf.compiler.CodeGeneratorResponse
+ 0, // 15: buf.alpha.registry.v1alpha1.CreateCuratedPluginRequest.registry_type:type_name -> buf.alpha.registry.v1alpha1.PluginRegistryType
+ 6, // 16: buf.alpha.registry.v1alpha1.CreateCuratedPluginRequest.dependencies:type_name -> buf.alpha.registry.v1alpha1.CuratedPluginReference
+ 5, // 17: buf.alpha.registry.v1alpha1.CreateCuratedPluginRequest.registry_config:type_name -> buf.alpha.registry.v1alpha1.RegistryConfig
+ 1, // 18: buf.alpha.registry.v1alpha1.CreateCuratedPluginRequest.output_languages:type_name -> buf.alpha.registry.v1alpha1.PluginLanguage
+ 7, // 19: buf.alpha.registry.v1alpha1.CreateCuratedPluginResponse.configuration:type_name -> buf.alpha.registry.v1alpha1.CuratedPlugin
+ 7, // 20: buf.alpha.registry.v1alpha1.ListCuratedPluginsResponse.plugins:type_name -> buf.alpha.registry.v1alpha1.CuratedPlugin
+ 7, // 21: buf.alpha.registry.v1alpha1.GetLatestCuratedPluginResponse.plugin:type_name -> buf.alpha.registry.v1alpha1.CuratedPlugin
+ 18, // 22: buf.alpha.registry.v1alpha1.GetLatestCuratedPluginResponse.versions:type_name -> buf.alpha.registry.v1alpha1.CuratedPluginVersionRevisions
+ 14, // 23: buf.alpha.registry.v1alpha1.PluginCurationService.ListCuratedPlugins:input_type -> buf.alpha.registry.v1alpha1.ListCuratedPluginsRequest
+ 12, // 24: buf.alpha.registry.v1alpha1.PluginCurationService.CreateCuratedPlugin:input_type -> buf.alpha.registry.v1alpha1.CreateCuratedPluginRequest
+ 16, // 25: buf.alpha.registry.v1alpha1.PluginCurationService.GetLatestCuratedPlugin:input_type -> buf.alpha.registry.v1alpha1.GetLatestCuratedPluginRequest
+ 8, // 26: buf.alpha.registry.v1alpha1.CodeGenerationService.GenerateCode:input_type -> buf.alpha.registry.v1alpha1.GenerateCodeRequest
+ 15, // 27: buf.alpha.registry.v1alpha1.PluginCurationService.ListCuratedPlugins:output_type -> buf.alpha.registry.v1alpha1.ListCuratedPluginsResponse
+ 13, // 28: buf.alpha.registry.v1alpha1.PluginCurationService.CreateCuratedPlugin:output_type -> buf.alpha.registry.v1alpha1.CreateCuratedPluginResponse
+ 17, // 29: buf.alpha.registry.v1alpha1.PluginCurationService.GetLatestCuratedPlugin:output_type -> buf.alpha.registry.v1alpha1.GetLatestCuratedPluginResponse
+ 9, // 30: buf.alpha.registry.v1alpha1.CodeGenerationService.GenerateCode:output_type -> buf.alpha.registry.v1alpha1.GenerateCodeResponse
+ 27, // [27:31] is the sub-list for method output_type
+ 23, // [23:27] is the sub-list for method input_type
+ 23, // [23:23] is the sub-list for extension type_name
+ 23, // [23:23] is the sub-list for extension extendee
+ 0, // [0:23] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_plugin_curation_proto_init() }
+func file_buf_alpha_registry_v1alpha1_plugin_curation_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_plugin_curation_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GoConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NPMConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RegistryConfig); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CuratedPluginReference); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CuratedPlugin); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GenerateCodeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GenerateCodeResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PluginGenerationRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PluginGenerationResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateCuratedPluginRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateCuratedPluginResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListCuratedPluginsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListCuratedPluginsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetLatestCuratedPluginRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetLatestCuratedPluginResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CuratedPluginVersionRevisions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GoConfig_RuntimeLibrary); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*NPMConfig_RuntimeLibrary); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes[2].OneofWrappers = []interface{}{
+ (*RegistryConfig_GoConfig)(nil),
+ (*RegistryConfig_NpmConfig)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDesc,
+ NumEnums: 3,
+ NumMessages: 18,
+ NumExtensions: 0,
+ NumServices: 2,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_plugin_curation_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_plugin_curation_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_plugin_curation_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_plugin_curation_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_plugin_curation_proto = out.File
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/push.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/push.pb.go
new file mode 100644
index 000000000..b5c7cbc35
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/push.pb.go
@@ -0,0 +1,333 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/push.proto
+
+package registryv1alpha1
+
+import (
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type PushRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ // Deprecated: Do not use.
+ Branch string `protobuf:"bytes,3,opt,name=branch,proto3" json:"branch,omitempty"`
+ Module *v1alpha1.Module `protobuf:"bytes,4,opt,name=module,proto3" json:"module,omitempty"`
+ // Optional; if provided, the provided tags
+ // are created for the pushed commit.
+ Tags []string `protobuf:"bytes,5,rep,name=tags,proto3" json:"tags,omitempty"`
+ // Optional; if provided, the pushed commit
+ // will be appended to these tracks. If the
+ // tracks do not exist, they will be created.
+ //
+ // Deprecated: Do not use.
+ Tracks []string `protobuf:"bytes,6,rep,name=tracks,proto3" json:"tracks,omitempty"`
+ // If non-empty, the push creates a draft commit with this name.
+ DraftName string `protobuf:"bytes,7,opt,name=draft_name,json=draftName,proto3" json:"draft_name,omitempty"`
+}
+
+func (x *PushRequest) Reset() {
+ *x = PushRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_push_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PushRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PushRequest) ProtoMessage() {}
+
+func (x *PushRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_push_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 PushRequest.ProtoReflect.Descriptor instead.
+func (*PushRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_push_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *PushRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *PushRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+func (x *PushRequest) GetBranch() string {
+ if x != nil {
+ return x.Branch
+ }
+ return ""
+}
+
+func (x *PushRequest) GetModule() *v1alpha1.Module {
+ if x != nil {
+ return x.Module
+ }
+ return nil
+}
+
+func (x *PushRequest) GetTags() []string {
+ if x != nil {
+ return x.Tags
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+func (x *PushRequest) GetTracks() []string {
+ if x != nil {
+ return x.Tracks
+ }
+ return nil
+}
+
+func (x *PushRequest) GetDraftName() string {
+ if x != nil {
+ return x.DraftName
+ }
+ return ""
+}
+
+type PushResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ LocalModulePin *LocalModulePin `protobuf:"bytes,5,opt,name=local_module_pin,json=localModulePin,proto3" json:"local_module_pin,omitempty"`
+}
+
+func (x *PushResponse) Reset() {
+ *x = PushResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_push_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PushResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PushResponse) ProtoMessage() {}
+
+func (x *PushResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_push_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 PushResponse.ProtoReflect.Descriptor instead.
+func (*PushResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_push_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *PushResponse) GetLocalModulePin() *LocalModulePin {
+ if x != nil {
+ return x.LocalModulePin
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_push_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_push_proto_rawDesc = []byte{
+ 0x0a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x75,
+ 0x73, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x28, 0x62,
+ 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe9, 0x01, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a,
+ 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1a, 0x0a,
+ 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x02, 0x18,
+ 0x01, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x39, 0x0a, 0x06, 0x6d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x06, 0x6d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x05, 0x20, 0x03,
+ 0x28, 0x09, 0x52, 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1a, 0x0a, 0x06, 0x74, 0x72, 0x61, 0x63,
+ 0x6b, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x74, 0x72,
+ 0x61, 0x63, 0x6b, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x72, 0x61, 0x66, 0x74, 0x4e,
+ 0x61, 0x6d, 0x65, 0x22, 0x65, 0x0a, 0x0c, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x55, 0x0a, 0x10, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x5f, 0x70, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61,
+ 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x52, 0x0e, 0x6c, 0x6f, 0x63, 0x61,
+ 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x32, 0x6a, 0x0a, 0x0b, 0x50, 0x75,
+ 0x73, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x5b, 0x0a, 0x04, 0x50, 0x75, 0x73,
+ 0x68, 0x12, 0x28, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x50, 0x75, 0x73, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x29, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x96, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x09, 0x50, 0x75, 0x73, 0x68,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66,
+ 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70,
+ 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61,
+ 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02,
+ 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62,
+ 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_push_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_push_proto_rawDescData = file_buf_alpha_registry_v1alpha1_push_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_push_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_push_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_push_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_push_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_push_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_push_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
+var file_buf_alpha_registry_v1alpha1_push_proto_goTypes = []interface{}{
+ (*PushRequest)(nil), // 0: buf.alpha.registry.v1alpha1.PushRequest
+ (*PushResponse)(nil), // 1: buf.alpha.registry.v1alpha1.PushResponse
+ (*v1alpha1.Module)(nil), // 2: buf.alpha.module.v1alpha1.Module
+ (*LocalModulePin)(nil), // 3: buf.alpha.registry.v1alpha1.LocalModulePin
+}
+var file_buf_alpha_registry_v1alpha1_push_proto_depIdxs = []int32{
+ 2, // 0: buf.alpha.registry.v1alpha1.PushRequest.module:type_name -> buf.alpha.module.v1alpha1.Module
+ 3, // 1: buf.alpha.registry.v1alpha1.PushResponse.local_module_pin:type_name -> buf.alpha.registry.v1alpha1.LocalModulePin
+ 0, // 2: buf.alpha.registry.v1alpha1.PushService.Push:input_type -> buf.alpha.registry.v1alpha1.PushRequest
+ 1, // 3: buf.alpha.registry.v1alpha1.PushService.Push:output_type -> buf.alpha.registry.v1alpha1.PushResponse
+ 3, // [3:4] is the sub-list for method output_type
+ 2, // [2:3] is the sub-list for method input_type
+ 2, // [2:2] is the sub-list for extension type_name
+ 2, // [2:2] is the sub-list for extension extendee
+ 0, // [0:2] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_push_proto_init() }
+func file_buf_alpha_registry_v1alpha1_push_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_push_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_module_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_push_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PushRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_push_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PushResponse); 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_buf_alpha_registry_v1alpha1_push_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 2,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_push_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_push_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_push_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_push_proto = out.File
+ file_buf_alpha_registry_v1alpha1_push_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_push_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_push_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/recommendation.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/recommendation.pb.go
new file mode 100644
index 000000000..74e522fe5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/recommendation.pb.go
@@ -0,0 +1,935 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/recommendation.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// RecommendedRepository is the information about a repository needed to link to
+// its owner page.
+type RecommendedRepository struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ Description string `protobuf:"bytes,4,opt,name=description,proto3" json:"description,omitempty"`
+ RepositoryId string `protobuf:"bytes,5,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+}
+
+func (x *RecommendedRepository) Reset() {
+ *x = RecommendedRepository{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecommendedRepository) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecommendedRepository) ProtoMessage() {}
+
+func (x *RecommendedRepository) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 RecommendedRepository.ProtoReflect.Descriptor instead.
+func (*RecommendedRepository) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *RecommendedRepository) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *RecommendedRepository) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *RecommendedRepository) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *RecommendedRepository) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *RecommendedRepository) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+// RecommendedTemplate is the information needed to recommend a template and link
+// to its owner page.
+//
+// Deprecated: Do not use.
+type RecommendedTemplate struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"`
+ TemplateId string `protobuf:"bytes,4,opt,name=template_id,json=templateId,proto3" json:"template_id,omitempty"`
+}
+
+func (x *RecommendedTemplate) Reset() {
+ *x = RecommendedTemplate{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecommendedTemplate) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecommendedTemplate) ProtoMessage() {}
+
+func (x *RecommendedTemplate) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 RecommendedTemplate.ProtoReflect.Descriptor instead.
+func (*RecommendedTemplate) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RecommendedTemplate) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *RecommendedTemplate) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *RecommendedTemplate) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *RecommendedTemplate) GetTemplateId() string {
+ if x != nil {
+ return x.TemplateId
+ }
+ return ""
+}
+
+// SetRecommendedResource is the information needed to configure a resource recommendation
+type SetRecommendedResource struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *SetRecommendedResource) Reset() {
+ *x = SetRecommendedResource{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetRecommendedResource) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetRecommendedResource) ProtoMessage() {}
+
+func (x *SetRecommendedResource) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 SetRecommendedResource.ProtoReflect.Descriptor instead.
+func (*SetRecommendedResource) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *SetRecommendedResource) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *SetRecommendedResource) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type RecommendedRepositoriesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *RecommendedRepositoriesRequest) Reset() {
+ *x = RecommendedRepositoriesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecommendedRepositoriesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecommendedRepositoriesRequest) ProtoMessage() {}
+
+func (x *RecommendedRepositoriesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 RecommendedRepositoriesRequest.ProtoReflect.Descriptor instead.
+func (*RecommendedRepositoriesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{3}
+}
+
+type RecommendedRepositoriesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repositories []*RecommendedRepository `protobuf:"bytes,1,rep,name=repositories,proto3" json:"repositories,omitempty"`
+}
+
+func (x *RecommendedRepositoriesResponse) Reset() {
+ *x = RecommendedRepositoriesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecommendedRepositoriesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecommendedRepositoriesResponse) ProtoMessage() {}
+
+func (x *RecommendedRepositoriesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 RecommendedRepositoriesResponse.ProtoReflect.Descriptor instead.
+func (*RecommendedRepositoriesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *RecommendedRepositoriesResponse) GetRepositories() []*RecommendedRepository {
+ if x != nil {
+ return x.Repositories
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+type RecommendedTemplatesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *RecommendedTemplatesRequest) Reset() {
+ *x = RecommendedTemplatesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecommendedTemplatesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecommendedTemplatesRequest) ProtoMessage() {}
+
+func (x *RecommendedTemplatesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 RecommendedTemplatesRequest.ProtoReflect.Descriptor instead.
+func (*RecommendedTemplatesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{5}
+}
+
+// Deprecated: Do not use.
+type RecommendedTemplatesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Templates []*RecommendedTemplate `protobuf:"bytes,1,rep,name=templates,proto3" json:"templates,omitempty"`
+}
+
+func (x *RecommendedTemplatesResponse) Reset() {
+ *x = RecommendedTemplatesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RecommendedTemplatesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RecommendedTemplatesResponse) ProtoMessage() {}
+
+func (x *RecommendedTemplatesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 RecommendedTemplatesResponse.ProtoReflect.Descriptor instead.
+func (*RecommendedTemplatesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *RecommendedTemplatesResponse) GetTemplates() []*RecommendedTemplate {
+ if x != nil {
+ return x.Templates
+ }
+ return nil
+}
+
+type ListRecommendedResourcesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *ListRecommendedResourcesRequest) Reset() {
+ *x = ListRecommendedResourcesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRecommendedResourcesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRecommendedResourcesRequest) ProtoMessage() {}
+
+func (x *ListRecommendedResourcesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 ListRecommendedResourcesRequest.ProtoReflect.Descriptor instead.
+func (*ListRecommendedResourcesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{7}
+}
+
+type ListRecommendedResourcesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Resources []*Resource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
+}
+
+func (x *ListRecommendedResourcesResponse) Reset() {
+ *x = ListRecommendedResourcesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRecommendedResourcesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRecommendedResourcesResponse) ProtoMessage() {}
+
+func (x *ListRecommendedResourcesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 ListRecommendedResourcesResponse.ProtoReflect.Descriptor instead.
+func (*ListRecommendedResourcesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *ListRecommendedResourcesResponse) GetResources() []*Resource {
+ if x != nil {
+ return x.Resources
+ }
+ return nil
+}
+
+type SetRecommendedResourcesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Resources []*SetRecommendedResource `protobuf:"bytes,1,rep,name=resources,proto3" json:"resources,omitempty"`
+}
+
+func (x *SetRecommendedResourcesRequest) Reset() {
+ *x = SetRecommendedResourcesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetRecommendedResourcesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetRecommendedResourcesRequest) ProtoMessage() {}
+
+func (x *SetRecommendedResourcesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 SetRecommendedResourcesRequest.ProtoReflect.Descriptor instead.
+func (*SetRecommendedResourcesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *SetRecommendedResourcesRequest) GetResources() []*SetRecommendedResource {
+ if x != nil {
+ return x.Resources
+ }
+ return nil
+}
+
+type SetRecommendedResourcesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *SetRecommendedResourcesResponse) Reset() {
+ *x = SetRecommendedResourcesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetRecommendedResourcesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetRecommendedResourcesResponse) ProtoMessage() {}
+
+func (x *SetRecommendedResourcesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_recommendation_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 SetRecommendedResourcesResponse.ProtoReflect.Descriptor instead.
+func (*SetRecommendedResourcesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP(), []int{10}
+}
+
+var File_buf_alpha_registry_v1alpha1_recommendation_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDesc = []byte{
+ 0x0a, 0x30, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a,
+ 0x2a, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f,
+ 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d,
+ 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a,
+ 0x15, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
+ 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x20, 0x0a,
+ 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12,
+ 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x49, 0x64, 0x22, 0x86, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65,
+ 0x6e, 0x64, 0x65, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12, 0x14, 0x0a, 0x05,
+ 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1f, 0x0a, 0x0b, 0x74, 0x65, 0x6d, 0x70,
+ 0x6c, 0x61, 0x74, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x74,
+ 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x49, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x42, 0x0a,
+ 0x16, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x22, 0x20, 0x0a, 0x1e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x22, 0x79, 0x0a, 0x1f, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64,
+ 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x56, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x21,
+ 0x0a, 0x1b, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x3a, 0x02, 0x18,
+ 0x01, 0x22, 0x72, 0x0a, 0x1c, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64,
+ 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x4e, 0x0a, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x09, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65,
+ 0x73, 0x3a, 0x02, 0x18, 0x01, 0x22, 0x21, 0x0a, 0x1f, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x67, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74,
+ 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x09,
+ 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x22, 0x73, 0x0a, 0x1e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x51, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x52, 0x09, 0x72, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x22, 0x21, 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0xf2, 0x04, 0x0a, 0x15, 0x52, 0x65,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x72, 0x76,
+ 0x69, 0x63, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x17, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e,
+ 0x64, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12,
+ 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69,
+ 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x90, 0x01, 0x0a, 0x14, 0x52,
+ 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61,
+ 0x74, 0x65, 0x73, 0x12, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x65, 0x6d,
+ 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88, 0x02, 0x01, 0x12, 0x97, 0x01,
+ 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65,
+ 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x12, 0x3c, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a, 0x17, 0x53, 0x65, 0x74, 0x52,
+ 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72,
+ 0x63, 0x65, 0x73, 0x12, 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64,
+ 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53,
+ 0x65, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x65, 0x64, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0xa0,
+ 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x42, 0x13, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75,
+ 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62,
+ 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66,
+ 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41,
+ 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70,
+ 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescData = file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
+var file_buf_alpha_registry_v1alpha1_recommendation_proto_goTypes = []interface{}{
+ (*RecommendedRepository)(nil), // 0: buf.alpha.registry.v1alpha1.RecommendedRepository
+ (*RecommendedTemplate)(nil), // 1: buf.alpha.registry.v1alpha1.RecommendedTemplate
+ (*SetRecommendedResource)(nil), // 2: buf.alpha.registry.v1alpha1.SetRecommendedResource
+ (*RecommendedRepositoriesRequest)(nil), // 3: buf.alpha.registry.v1alpha1.RecommendedRepositoriesRequest
+ (*RecommendedRepositoriesResponse)(nil), // 4: buf.alpha.registry.v1alpha1.RecommendedRepositoriesResponse
+ (*RecommendedTemplatesRequest)(nil), // 5: buf.alpha.registry.v1alpha1.RecommendedTemplatesRequest
+ (*RecommendedTemplatesResponse)(nil), // 6: buf.alpha.registry.v1alpha1.RecommendedTemplatesResponse
+ (*ListRecommendedResourcesRequest)(nil), // 7: buf.alpha.registry.v1alpha1.ListRecommendedResourcesRequest
+ (*ListRecommendedResourcesResponse)(nil), // 8: buf.alpha.registry.v1alpha1.ListRecommendedResourcesResponse
+ (*SetRecommendedResourcesRequest)(nil), // 9: buf.alpha.registry.v1alpha1.SetRecommendedResourcesRequest
+ (*SetRecommendedResourcesResponse)(nil), // 10: buf.alpha.registry.v1alpha1.SetRecommendedResourcesResponse
+ (*timestamppb.Timestamp)(nil), // 11: google.protobuf.Timestamp
+ (*Resource)(nil), // 12: buf.alpha.registry.v1alpha1.Resource
+}
+var file_buf_alpha_registry_v1alpha1_recommendation_proto_depIdxs = []int32{
+ 11, // 0: buf.alpha.registry.v1alpha1.RecommendedRepository.create_time:type_name -> google.protobuf.Timestamp
+ 0, // 1: buf.alpha.registry.v1alpha1.RecommendedRepositoriesResponse.repositories:type_name -> buf.alpha.registry.v1alpha1.RecommendedRepository
+ 1, // 2: buf.alpha.registry.v1alpha1.RecommendedTemplatesResponse.templates:type_name -> buf.alpha.registry.v1alpha1.RecommendedTemplate
+ 12, // 3: buf.alpha.registry.v1alpha1.ListRecommendedResourcesResponse.resources:type_name -> buf.alpha.registry.v1alpha1.Resource
+ 2, // 4: buf.alpha.registry.v1alpha1.SetRecommendedResourcesRequest.resources:type_name -> buf.alpha.registry.v1alpha1.SetRecommendedResource
+ 3, // 5: buf.alpha.registry.v1alpha1.RecommendationService.RecommendedRepositories:input_type -> buf.alpha.registry.v1alpha1.RecommendedRepositoriesRequest
+ 5, // 6: buf.alpha.registry.v1alpha1.RecommendationService.RecommendedTemplates:input_type -> buf.alpha.registry.v1alpha1.RecommendedTemplatesRequest
+ 7, // 7: buf.alpha.registry.v1alpha1.RecommendationService.ListRecommendedResources:input_type -> buf.alpha.registry.v1alpha1.ListRecommendedResourcesRequest
+ 9, // 8: buf.alpha.registry.v1alpha1.RecommendationService.SetRecommendedResources:input_type -> buf.alpha.registry.v1alpha1.SetRecommendedResourcesRequest
+ 4, // 9: buf.alpha.registry.v1alpha1.RecommendationService.RecommendedRepositories:output_type -> buf.alpha.registry.v1alpha1.RecommendedRepositoriesResponse
+ 6, // 10: buf.alpha.registry.v1alpha1.RecommendationService.RecommendedTemplates:output_type -> buf.alpha.registry.v1alpha1.RecommendedTemplatesResponse
+ 8, // 11: buf.alpha.registry.v1alpha1.RecommendationService.ListRecommendedResources:output_type -> buf.alpha.registry.v1alpha1.ListRecommendedResourcesResponse
+ 10, // 12: buf.alpha.registry.v1alpha1.RecommendationService.SetRecommendedResources:output_type -> buf.alpha.registry.v1alpha1.SetRecommendedResourcesResponse
+ 9, // [9:13] is the sub-list for method output_type
+ 5, // [5:9] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_recommendation_proto_init() }
+func file_buf_alpha_registry_v1alpha1_recommendation_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_recommendation_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_resource_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecommendedRepository); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecommendedTemplate); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetRecommendedResource); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecommendedRepositoriesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecommendedRepositoriesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecommendedTemplatesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RecommendedTemplatesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRecommendedResourcesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRecommendedResourcesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetRecommendedResourcesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetRecommendedResourcesResponse); 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_buf_alpha_registry_v1alpha1_recommendation_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 11,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_recommendation_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_recommendation_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_recommendation_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_recommendation_proto = out.File
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_recommendation_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/reference.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/reference.pb.go
new file mode 100644
index 000000000..f84278be9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/reference.pb.go
@@ -0,0 +1,603 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/reference.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Reference struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Reference:
+ //
+ // *Reference_Tag
+ // *Reference_Commit
+ // *Reference_Main
+ // *Reference_Draft
+ Reference isReference_Reference `protobuf_oneof:"reference"`
+}
+
+func (x *Reference) Reset() {
+ *x = Reference{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Reference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Reference) ProtoMessage() {}
+
+func (x *Reference) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_reference_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 Reference.ProtoReflect.Descriptor instead.
+func (*Reference) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_reference_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *Reference) GetReference() isReference_Reference {
+ if m != nil {
+ return m.Reference
+ }
+ return nil
+}
+
+func (x *Reference) GetTag() *RepositoryTag {
+ if x, ok := x.GetReference().(*Reference_Tag); ok {
+ return x.Tag
+ }
+ return nil
+}
+
+func (x *Reference) GetCommit() *RepositoryCommit {
+ if x, ok := x.GetReference().(*Reference_Commit); ok {
+ return x.Commit
+ }
+ return nil
+}
+
+func (x *Reference) GetMain() *RepositoryMainReference {
+ if x, ok := x.GetReference().(*Reference_Main); ok {
+ return x.Main
+ }
+ return nil
+}
+
+func (x *Reference) GetDraft() *RepositoryDraft {
+ if x, ok := x.GetReference().(*Reference_Draft); ok {
+ return x.Draft
+ }
+ return nil
+}
+
+type isReference_Reference interface {
+ isReference_Reference()
+}
+
+type Reference_Tag struct {
+ // The requested reference is a tag.
+ Tag *RepositoryTag `protobuf:"bytes,2,opt,name=tag,proto3,oneof"`
+}
+
+type Reference_Commit struct {
+ // The requested reference is a commit.
+ Commit *RepositoryCommit `protobuf:"bytes,3,opt,name=commit,proto3,oneof"`
+}
+
+type Reference_Main struct {
+ // The requested reference is the default reference.
+ Main *RepositoryMainReference `protobuf:"bytes,5,opt,name=main,proto3,oneof"`
+}
+
+type Reference_Draft struct {
+ // The requested reference is a draft commit.
+ Draft *RepositoryDraft `protobuf:"bytes,6,opt,name=draft,proto3,oneof"`
+}
+
+func (*Reference_Tag) isReference_Reference() {}
+
+func (*Reference_Commit) isReference_Reference() {}
+
+func (*Reference_Main) isReference_Reference() {}
+
+func (*Reference_Draft) isReference_Reference() {}
+
+type RepositoryMainReference struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name is always 'main'.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The latest commit in this repository. If the repository has no commits,
+ // this will be empty.
+ Commit *RepositoryCommit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
+}
+
+func (x *RepositoryMainReference) Reset() {
+ *x = RepositoryMainReference{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RepositoryMainReference) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepositoryMainReference) ProtoMessage() {}
+
+func (x *RepositoryMainReference) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_reference_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 RepositoryMainReference.ProtoReflect.Descriptor instead.
+func (*RepositoryMainReference) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_reference_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RepositoryMainReference) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *RepositoryMainReference) GetCommit() *RepositoryCommit {
+ if x != nil {
+ return x.Commit
+ }
+ return nil
+}
+
+type RepositoryDraft struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The name of the draft
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // The commit this draft points to.
+ Commit *RepositoryCommit `protobuf:"bytes,2,opt,name=commit,proto3" json:"commit,omitempty"`
+}
+
+func (x *RepositoryDraft) Reset() {
+ *x = RepositoryDraft{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RepositoryDraft) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepositoryDraft) ProtoMessage() {}
+
+func (x *RepositoryDraft) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_reference_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 RepositoryDraft.ProtoReflect.Descriptor instead.
+func (*RepositoryDraft) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_reference_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *RepositoryDraft) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *RepositoryDraft) GetCommit() *RepositoryCommit {
+ if x != nil {
+ return x.Commit
+ }
+ return nil
+}
+
+type GetReferenceByNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Name of the requested reference.
+ Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+ // Owner of the repository the reference belongs to.
+ Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"`
+ // Name of the repository the reference belongs to.
+ RepositoryName string `protobuf:"bytes,3,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+}
+
+func (x *GetReferenceByNameRequest) Reset() {
+ *x = GetReferenceByNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetReferenceByNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetReferenceByNameRequest) ProtoMessage() {}
+
+func (x *GetReferenceByNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_reference_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 GetReferenceByNameRequest.ProtoReflect.Descriptor instead.
+func (*GetReferenceByNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_reference_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *GetReferenceByNameRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *GetReferenceByNameRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetReferenceByNameRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+type GetReferenceByNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Reference *Reference `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"`
+}
+
+func (x *GetReferenceByNameResponse) Reset() {
+ *x = GetReferenceByNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetReferenceByNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetReferenceByNameResponse) ProtoMessage() {}
+
+func (x *GetReferenceByNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_reference_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 GetReferenceByNameResponse.ProtoReflect.Descriptor instead.
+func (*GetReferenceByNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_reference_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *GetReferenceByNameResponse) GetReference() *Reference {
+ if x != nil {
+ return x.Reference
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_reference_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_reference_proto_rawDesc = []byte{
+ 0x0a, 0x2b, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65,
+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x33, 0x62, 0x75, 0x66, 0x2f,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x30, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x22, 0xce, 0x02, 0x0a, 0x09, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12,
+ 0x3e, 0x0a, 0x03, 0x74, 0x61, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x48, 0x00, 0x52, 0x03, 0x74, 0x61, 0x67, 0x12,
+ 0x47, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x48, 0x00,
+ 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x4a, 0x0a, 0x04, 0x6d, 0x61, 0x69, 0x6e,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x34, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4d,
+ 0x61, 0x69, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x48, 0x00, 0x52, 0x04,
+ 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x44, 0x0a, 0x05, 0x64, 0x72, 0x61, 0x66, 0x74, 0x18, 0x06, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x72, 0x61, 0x66,
+ 0x74, 0x48, 0x00, 0x52, 0x05, 0x64, 0x72, 0x61, 0x66, 0x74, 0x42, 0x0b, 0x0a, 0x09, 0x72, 0x65,
+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x4a, 0x04, 0x08,
+ 0x04, 0x10, 0x05, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x05, 0x74, 0x72, 0x61,
+ 0x63, 0x6b, 0x22, 0x74, 0x0a, 0x17, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x4d, 0x61, 0x69, 0x6e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+ 0x65, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
+ 0x52, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x6c, 0x0a, 0x0f, 0x52, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12,
+ 0x45, 0x0a, 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x06,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0x6e, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66,
+ 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x0a,
+ 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x62, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66,
+ 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x44, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
+ 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52,
+ 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x32, 0x9a, 0x01, 0x0a, 0x10, 0x52,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12,
+ 0x85, 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
+ 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63,
+ 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74,
+ 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x9b, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0e, 0x52, 0x65, 0x66,
+ 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69,
+ 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67,
+ 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02,
+ 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42,
+ 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66,
+ 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c,
+ 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_reference_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_reference_proto_rawDescData = file_buf_alpha_registry_v1alpha1_reference_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_reference_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_reference_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_reference_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_reference_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_reference_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_buf_alpha_registry_v1alpha1_reference_proto_goTypes = []interface{}{
+ (*Reference)(nil), // 0: buf.alpha.registry.v1alpha1.Reference
+ (*RepositoryMainReference)(nil), // 1: buf.alpha.registry.v1alpha1.RepositoryMainReference
+ (*RepositoryDraft)(nil), // 2: buf.alpha.registry.v1alpha1.RepositoryDraft
+ (*GetReferenceByNameRequest)(nil), // 3: buf.alpha.registry.v1alpha1.GetReferenceByNameRequest
+ (*GetReferenceByNameResponse)(nil), // 4: buf.alpha.registry.v1alpha1.GetReferenceByNameResponse
+ (*RepositoryTag)(nil), // 5: buf.alpha.registry.v1alpha1.RepositoryTag
+ (*RepositoryCommit)(nil), // 6: buf.alpha.registry.v1alpha1.RepositoryCommit
+}
+var file_buf_alpha_registry_v1alpha1_reference_proto_depIdxs = []int32{
+ 5, // 0: buf.alpha.registry.v1alpha1.Reference.tag:type_name -> buf.alpha.registry.v1alpha1.RepositoryTag
+ 6, // 1: buf.alpha.registry.v1alpha1.Reference.commit:type_name -> buf.alpha.registry.v1alpha1.RepositoryCommit
+ 1, // 2: buf.alpha.registry.v1alpha1.Reference.main:type_name -> buf.alpha.registry.v1alpha1.RepositoryMainReference
+ 2, // 3: buf.alpha.registry.v1alpha1.Reference.draft:type_name -> buf.alpha.registry.v1alpha1.RepositoryDraft
+ 6, // 4: buf.alpha.registry.v1alpha1.RepositoryMainReference.commit:type_name -> buf.alpha.registry.v1alpha1.RepositoryCommit
+ 6, // 5: buf.alpha.registry.v1alpha1.RepositoryDraft.commit:type_name -> buf.alpha.registry.v1alpha1.RepositoryCommit
+ 0, // 6: buf.alpha.registry.v1alpha1.GetReferenceByNameResponse.reference:type_name -> buf.alpha.registry.v1alpha1.Reference
+ 3, // 7: buf.alpha.registry.v1alpha1.ReferenceService.GetReferenceByName:input_type -> buf.alpha.registry.v1alpha1.GetReferenceByNameRequest
+ 4, // 8: buf.alpha.registry.v1alpha1.ReferenceService.GetReferenceByName:output_type -> buf.alpha.registry.v1alpha1.GetReferenceByNameResponse
+ 8, // [8:9] is the sub-list for method output_type
+ 7, // [7:8] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_reference_proto_init() }
+func file_buf_alpha_registry_v1alpha1_reference_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_reference_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_init()
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Reference); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RepositoryMainReference); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RepositoryDraft); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetReferenceByNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetReferenceByNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*Reference_Tag)(nil),
+ (*Reference_Commit)(nil),
+ (*Reference_Main)(nil),
+ (*Reference_Draft)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_reference_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_reference_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_reference_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_reference_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_reference_proto = out.File
+ file_buf_alpha_registry_v1alpha1_reference_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_reference_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_reference_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository.pb.go
new file mode 100644
index 000000000..27807652b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository.pb.go
@@ -0,0 +1,3611 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/repository.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Visibility int32
+
+const (
+ Visibility_VISIBILITY_UNSPECIFIED Visibility = 0
+ Visibility_VISIBILITY_PUBLIC Visibility = 1
+ Visibility_VISIBILITY_PRIVATE Visibility = 2
+)
+
+// Enum value maps for Visibility.
+var (
+ Visibility_name = map[int32]string{
+ 0: "VISIBILITY_UNSPECIFIED",
+ 1: "VISIBILITY_PUBLIC",
+ 2: "VISIBILITY_PRIVATE",
+ }
+ Visibility_value = map[string]int32{
+ "VISIBILITY_UNSPECIFIED": 0,
+ "VISIBILITY_PUBLIC": 1,
+ "VISIBILITY_PRIVATE": 2,
+ }
+)
+
+func (x Visibility) Enum() *Visibility {
+ p := new(Visibility)
+ *p = x
+ return p
+}
+
+func (x Visibility) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Visibility) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_enumTypes[0].Descriptor()
+}
+
+func (Visibility) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_repository_proto_enumTypes[0]
+}
+
+func (x Visibility) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Visibility.Descriptor instead.
+func (Visibility) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{0}
+}
+
+type Repository struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // primary key, unique, immutable
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // immutable
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // mutable
+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
+ // unique, mutable
+ Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
+ // Types that are assignable to Owner:
+ //
+ // *Repository_UserId
+ // *Repository_OrganizationId
+ Owner isRepository_Owner `protobuf_oneof:"owner"`
+ Visibility Visibility `protobuf:"varint,7,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.Visibility" json:"visibility,omitempty"`
+ // deprecated means this repository is deprecated.
+ Deprecated bool `protobuf:"varint,8,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+ // deprecation_message is the message shown if the repository is deprecated.
+ DeprecationMessage string `protobuf:"bytes,9,opt,name=deprecation_message,json=deprecationMessage,proto3" json:"deprecation_message,omitempty"`
+ // owner_name is the name of the owner of the repository,
+ // either a username or organization name.
+ OwnerName string `protobuf:"bytes,10,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"`
+ // description is the user configurable description of the repository.
+ Description string `protobuf:"bytes,11,opt,name=description,proto3" json:"description,omitempty"`
+ // url is the user configurable URL in the description of the repository,
+ // always included the scheme and will not have a #fragment suffix.
+ Url string `protobuf:"bytes,12,opt,name=url,proto3" json:"url,omitempty"`
+}
+
+func (x *Repository) Reset() {
+ *x = Repository{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Repository) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Repository) ProtoMessage() {}
+
+func (x *Repository) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 Repository.ProtoReflect.Descriptor instead.
+func (*Repository) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Repository) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *Repository) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *Repository) GetUpdateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdateTime
+ }
+ return nil
+}
+
+func (x *Repository) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (m *Repository) GetOwner() isRepository_Owner {
+ if m != nil {
+ return m.Owner
+ }
+ return nil
+}
+
+func (x *Repository) GetUserId() string {
+ if x, ok := x.GetOwner().(*Repository_UserId); ok {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *Repository) GetOrganizationId() string {
+ if x, ok := x.GetOwner().(*Repository_OrganizationId); ok {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+func (x *Repository) GetVisibility() Visibility {
+ if x != nil {
+ return x.Visibility
+ }
+ return Visibility_VISIBILITY_UNSPECIFIED
+}
+
+func (x *Repository) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+func (x *Repository) GetDeprecationMessage() string {
+ if x != nil {
+ return x.DeprecationMessage
+ }
+ return ""
+}
+
+func (x *Repository) GetOwnerName() string {
+ if x != nil {
+ return x.OwnerName
+ }
+ return ""
+}
+
+func (x *Repository) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *Repository) GetUrl() string {
+ if x != nil {
+ return x.Url
+ }
+ return ""
+}
+
+type isRepository_Owner interface {
+ isRepository_Owner()
+}
+
+type Repository_UserId struct {
+ // foreign key, mutable
+ UserId string `protobuf:"bytes,5,opt,name=user_id,json=userId,proto3,oneof"`
+}
+
+type Repository_OrganizationId struct {
+ // foreign key, mutable
+ OrganizationId string `protobuf:"bytes,6,opt,name=organization_id,json=organizationId,proto3,oneof"`
+}
+
+func (*Repository_UserId) isRepository_Owner() {}
+
+func (*Repository_OrganizationId) isRepository_Owner() {}
+
+type RepositoryCounts struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TagsCount uint32 `protobuf:"varint,1,opt,name=tags_count,json=tagsCount,proto3" json:"tags_count,omitempty"`
+ DraftsCount uint32 `protobuf:"varint,3,opt,name=drafts_count,json=draftsCount,proto3" json:"drafts_count,omitempty"`
+}
+
+func (x *RepositoryCounts) Reset() {
+ *x = RepositoryCounts{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RepositoryCounts) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepositoryCounts) ProtoMessage() {}
+
+func (x *RepositoryCounts) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 RepositoryCounts.ProtoReflect.Descriptor instead.
+func (*RepositoryCounts) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *RepositoryCounts) GetTagsCount() uint32 {
+ if x != nil {
+ return x.TagsCount
+ }
+ return 0
+}
+
+func (x *RepositoryCounts) GetDraftsCount() uint32 {
+ if x != nil {
+ return x.DraftsCount
+ }
+ return 0
+}
+
+type RepositoryContributor struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+ // The ID of the for which the role belongs to.
+ RepositoryId string `protobuf:"bytes,2,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+ // The role that the user has been explicitly assigned against the repository.
+ ExplicitRole RepositoryRole `protobuf:"varint,3,opt,name=explicit_role,json=explicitRole,proto3,enum=buf.alpha.registry.v1alpha1.RepositoryRole" json:"explicit_role,omitempty"`
+ // Optionally defines the role that the user has implicitly against the repository through the owning organization.
+ // If the repository does not belong to an organization or the user is not part of the owning organization, this is unset.
+ ImplicitRole RepositoryRole `protobuf:"varint,4,opt,name=implicit_role,json=implicitRole,proto3,enum=buf.alpha.registry.v1alpha1.RepositoryRole" json:"implicit_role,omitempty"`
+}
+
+func (x *RepositoryContributor) Reset() {
+ *x = RepositoryContributor{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RepositoryContributor) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepositoryContributor) ProtoMessage() {}
+
+func (x *RepositoryContributor) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 RepositoryContributor.ProtoReflect.Descriptor instead.
+func (*RepositoryContributor) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *RepositoryContributor) GetUser() *User {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+func (x *RepositoryContributor) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+func (x *RepositoryContributor) GetExplicitRole() RepositoryRole {
+ if x != nil {
+ return x.ExplicitRole
+ }
+ return RepositoryRole_REPOSITORY_ROLE_UNSPECIFIED
+}
+
+func (x *RepositoryContributor) GetImplicitRole() RepositoryRole {
+ if x != nil {
+ return x.ImplicitRole
+ }
+ return RepositoryRole_REPOSITORY_ROLE_UNSPECIFIED
+}
+
+type RepositoryMetadata struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // The name of the repository.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The owner name of the repository.
+ OwnerName string `protobuf:"bytes,3,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"`
+ // The verification status of the owner of the repository.
+ OwnerVerificationStatus VerificationStatus `protobuf:"varint,4,opt,name=owner_verification_status,json=ownerVerificationStatus,proto3,enum=buf.alpha.registry.v1alpha1.VerificationStatus" json:"owner_verification_status,omitempty"`
+ // The commit time of the latest main commit in the repository.
+ LatestCommitTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=latest_commit_time,json=latestCommitTime,proto3" json:"latest_commit_time,omitempty"`
+ // The SPDX license ID of the latest main commit in the repository.
+ LatestSpdxLicenseId string `protobuf:"bytes,6,opt,name=latest_spdx_license_id,json=latestSpdxLicenseId,proto3" json:"latest_spdx_license_id,omitempty"`
+}
+
+func (x *RepositoryMetadata) Reset() {
+ *x = RepositoryMetadata{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RepositoryMetadata) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepositoryMetadata) ProtoMessage() {}
+
+func (x *RepositoryMetadata) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 RepositoryMetadata.ProtoReflect.Descriptor instead.
+func (*RepositoryMetadata) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *RepositoryMetadata) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *RepositoryMetadata) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *RepositoryMetadata) GetOwnerName() string {
+ if x != nil {
+ return x.OwnerName
+ }
+ return ""
+}
+
+func (x *RepositoryMetadata) GetOwnerVerificationStatus() VerificationStatus {
+ if x != nil {
+ return x.OwnerVerificationStatus
+ }
+ return VerificationStatus_VERIFICATION_STATUS_UNSPECIFIED
+}
+
+func (x *RepositoryMetadata) GetLatestCommitTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.LatestCommitTime
+ }
+ return nil
+}
+
+func (x *RepositoryMetadata) GetLatestSpdxLicenseId() string {
+ if x != nil {
+ return x.LatestSpdxLicenseId
+ }
+ return ""
+}
+
+type GetRepositoriesByFullNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // minimum length is 1
+ // maximum length is 250
+ FullNames []string `protobuf:"bytes,1,rep,name=full_names,json=fullNames,proto3" json:"full_names,omitempty"`
+}
+
+func (x *GetRepositoriesByFullNameRequest) Reset() {
+ *x = GetRepositoriesByFullNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoriesByFullNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoriesByFullNameRequest) ProtoMessage() {}
+
+func (x *GetRepositoriesByFullNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 GetRepositoriesByFullNameRequest.ProtoReflect.Descriptor instead.
+func (*GetRepositoriesByFullNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *GetRepositoriesByFullNameRequest) GetFullNames() []string {
+ if x != nil {
+ return x.FullNames
+ }
+ return nil
+}
+
+type GetRepositoriesByFullNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repositories []*Repository `protobuf:"bytes,1,rep,name=repositories,proto3" json:"repositories,omitempty"`
+}
+
+func (x *GetRepositoriesByFullNameResponse) Reset() {
+ *x = GetRepositoriesByFullNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoriesByFullNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoriesByFullNameResponse) ProtoMessage() {}
+
+func (x *GetRepositoriesByFullNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 GetRepositoriesByFullNameResponse.ProtoReflect.Descriptor instead.
+func (*GetRepositoriesByFullNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *GetRepositoriesByFullNameResponse) GetRepositories() []*Repository {
+ if x != nil {
+ return x.Repositories
+ }
+ return nil
+}
+
+type GetRepositoryRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *GetRepositoryRequest) Reset() {
+ *x = GetRepositoryRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoryRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoryRequest) ProtoMessage() {}
+
+func (x *GetRepositoryRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 GetRepositoryRequest.ProtoReflect.Descriptor instead.
+func (*GetRepositoryRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *GetRepositoryRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+type GetRepositoryResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
+ Counts *RepositoryCounts `protobuf:"bytes,2,opt,name=counts,proto3" json:"counts,omitempty"`
+}
+
+func (x *GetRepositoryResponse) Reset() {
+ *x = GetRepositoryResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoryResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoryResponse) ProtoMessage() {}
+
+func (x *GetRepositoryResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 GetRepositoryResponse.ProtoReflect.Descriptor instead.
+func (*GetRepositoryResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *GetRepositoryResponse) GetRepository() *Repository {
+ if x != nil {
+ return x.Repository
+ }
+ return nil
+}
+
+func (x *GetRepositoryResponse) GetCounts() *RepositoryCounts {
+ if x != nil {
+ return x.Counts
+ }
+ return nil
+}
+
+type GetRepositoryByFullNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ FullName string `protobuf:"bytes,1,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
+}
+
+func (x *GetRepositoryByFullNameRequest) Reset() {
+ *x = GetRepositoryByFullNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoryByFullNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoryByFullNameRequest) ProtoMessage() {}
+
+func (x *GetRepositoryByFullNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 GetRepositoryByFullNameRequest.ProtoReflect.Descriptor instead.
+func (*GetRepositoryByFullNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *GetRepositoryByFullNameRequest) GetFullName() string {
+ if x != nil {
+ return x.FullName
+ }
+ return ""
+}
+
+type GetRepositoryByFullNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
+ Counts *RepositoryCounts `protobuf:"bytes,2,opt,name=counts,proto3" json:"counts,omitempty"`
+}
+
+func (x *GetRepositoryByFullNameResponse) Reset() {
+ *x = GetRepositoryByFullNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoryByFullNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoryByFullNameResponse) ProtoMessage() {}
+
+func (x *GetRepositoryByFullNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 GetRepositoryByFullNameResponse.ProtoReflect.Descriptor instead.
+func (*GetRepositoryByFullNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *GetRepositoryByFullNameResponse) GetRepository() *Repository {
+ if x != nil {
+ return x.Repository
+ }
+ return nil
+}
+
+func (x *GetRepositoryByFullNameResponse) GetCounts() *RepositoryCounts {
+ if x != nil {
+ return x.Counts
+ }
+ return nil
+}
+
+type ListRepositoriesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListRepositoriesRequest) Reset() {
+ *x = ListRepositoriesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoriesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoriesRequest) ProtoMessage() {}
+
+func (x *ListRepositoriesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 ListRepositoriesRequest.ProtoReflect.Descriptor instead.
+func (*ListRepositoriesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *ListRepositoriesRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListRepositoriesRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListRepositoriesRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListRepositoriesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repositories []*Repository `protobuf:"bytes,1,rep,name=repositories,proto3" json:"repositories,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListRepositoriesResponse) Reset() {
+ *x = ListRepositoriesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoriesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoriesResponse) ProtoMessage() {}
+
+func (x *ListRepositoriesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 ListRepositoriesResponse.ProtoReflect.Descriptor instead.
+func (*ListRepositoriesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *ListRepositoriesResponse) GetRepositories() []*Repository {
+ if x != nil {
+ return x.Repositories
+ }
+ return nil
+}
+
+func (x *ListRepositoriesResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListUserRepositoriesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the user whose repositories should be listed.
+ UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListUserRepositoriesRequest) Reset() {
+ *x = ListUserRepositoriesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListUserRepositoriesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListUserRepositoriesRequest) ProtoMessage() {}
+
+func (x *ListUserRepositoriesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 ListUserRepositoriesRequest.ProtoReflect.Descriptor instead.
+func (*ListUserRepositoriesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *ListUserRepositoriesRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *ListUserRepositoriesRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListUserRepositoriesRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListUserRepositoriesRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListUserRepositoriesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repositories []*Repository `protobuf:"bytes,1,rep,name=repositories,proto3" json:"repositories,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListUserRepositoriesResponse) Reset() {
+ *x = ListUserRepositoriesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListUserRepositoriesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListUserRepositoriesResponse) ProtoMessage() {}
+
+func (x *ListUserRepositoriesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 ListUserRepositoriesResponse.ProtoReflect.Descriptor instead.
+func (*ListUserRepositoriesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *ListUserRepositoriesResponse) GetRepositories() []*Repository {
+ if x != nil {
+ return x.Repositories
+ }
+ return nil
+}
+
+func (x *ListUserRepositoriesResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListRepositoriesUserCanAccessRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListRepositoriesUserCanAccessRequest) Reset() {
+ *x = ListRepositoriesUserCanAccessRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoriesUserCanAccessRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoriesUserCanAccessRequest) ProtoMessage() {}
+
+func (x *ListRepositoriesUserCanAccessRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 ListRepositoriesUserCanAccessRequest.ProtoReflect.Descriptor instead.
+func (*ListRepositoriesUserCanAccessRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *ListRepositoriesUserCanAccessRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListRepositoriesUserCanAccessRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListRepositoriesUserCanAccessRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListRepositoriesUserCanAccessResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repositories []*Repository `protobuf:"bytes,1,rep,name=repositories,proto3" json:"repositories,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListRepositoriesUserCanAccessResponse) Reset() {
+ *x = ListRepositoriesUserCanAccessResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoriesUserCanAccessResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoriesUserCanAccessResponse) ProtoMessage() {}
+
+func (x *ListRepositoriesUserCanAccessResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 ListRepositoriesUserCanAccessResponse.ProtoReflect.Descriptor instead.
+func (*ListRepositoriesUserCanAccessResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{15}
+}
+
+func (x *ListRepositoriesUserCanAccessResponse) GetRepositories() []*Repository {
+ if x != nil {
+ return x.Repositories
+ }
+ return nil
+}
+
+func (x *ListRepositoriesUserCanAccessResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListOrganizationRepositoriesRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the organization whose repositories should be listed.
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListOrganizationRepositoriesRequest) Reset() {
+ *x = ListOrganizationRepositoriesRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOrganizationRepositoriesRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOrganizationRepositoriesRequest) ProtoMessage() {}
+
+func (x *ListOrganizationRepositoriesRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 ListOrganizationRepositoriesRequest.ProtoReflect.Descriptor instead.
+func (*ListOrganizationRepositoriesRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *ListOrganizationRepositoriesRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+func (x *ListOrganizationRepositoriesRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListOrganizationRepositoriesRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListOrganizationRepositoriesRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListOrganizationRepositoriesResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repositories []*Repository `protobuf:"bytes,1,rep,name=repositories,proto3" json:"repositories,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListOrganizationRepositoriesResponse) Reset() {
+ *x = ListOrganizationRepositoriesResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOrganizationRepositoriesResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOrganizationRepositoriesResponse) ProtoMessage() {}
+
+func (x *ListOrganizationRepositoriesResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 ListOrganizationRepositoriesResponse.ProtoReflect.Descriptor instead.
+func (*ListOrganizationRepositoriesResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{17}
+}
+
+func (x *ListOrganizationRepositoriesResponse) GetRepositories() []*Repository {
+ if x != nil {
+ return x.Repositories
+ }
+ return nil
+}
+
+func (x *ListOrganizationRepositoriesResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type CreateRepositoryByFullNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Must be unique across repositories.
+ FullName string `protobuf:"bytes,1,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
+ Visibility Visibility `protobuf:"varint,2,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.Visibility" json:"visibility,omitempty"`
+}
+
+func (x *CreateRepositoryByFullNameRequest) Reset() {
+ *x = CreateRepositoryByFullNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateRepositoryByFullNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateRepositoryByFullNameRequest) ProtoMessage() {}
+
+func (x *CreateRepositoryByFullNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 CreateRepositoryByFullNameRequest.ProtoReflect.Descriptor instead.
+func (*CreateRepositoryByFullNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *CreateRepositoryByFullNameRequest) GetFullName() string {
+ if x != nil {
+ return x.FullName
+ }
+ return ""
+}
+
+func (x *CreateRepositoryByFullNameRequest) GetVisibility() Visibility {
+ if x != nil {
+ return x.Visibility
+ }
+ return Visibility_VISIBILITY_UNSPECIFIED
+}
+
+type CreateRepositoryByFullNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
+}
+
+func (x *CreateRepositoryByFullNameResponse) Reset() {
+ *x = CreateRepositoryByFullNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateRepositoryByFullNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateRepositoryByFullNameResponse) ProtoMessage() {}
+
+func (x *CreateRepositoryByFullNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 CreateRepositoryByFullNameResponse.ProtoReflect.Descriptor instead.
+func (*CreateRepositoryByFullNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *CreateRepositoryByFullNameResponse) GetRepository() *Repository {
+ if x != nil {
+ return x.Repository
+ }
+ return nil
+}
+
+type DeleteRepositoryRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *DeleteRepositoryRequest) Reset() {
+ *x = DeleteRepositoryRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteRepositoryRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteRepositoryRequest) ProtoMessage() {}
+
+func (x *DeleteRepositoryRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 DeleteRepositoryRequest.ProtoReflect.Descriptor instead.
+func (*DeleteRepositoryRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *DeleteRepositoryRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+type DeleteRepositoryResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteRepositoryResponse) Reset() {
+ *x = DeleteRepositoryResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteRepositoryResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteRepositoryResponse) ProtoMessage() {}
+
+func (x *DeleteRepositoryResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 DeleteRepositoryResponse.ProtoReflect.Descriptor instead.
+func (*DeleteRepositoryResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{21}
+}
+
+type DeleteRepositoryByFullNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ FullName string `protobuf:"bytes,1,opt,name=full_name,json=fullName,proto3" json:"full_name,omitempty"`
+}
+
+func (x *DeleteRepositoryByFullNameRequest) Reset() {
+ *x = DeleteRepositoryByFullNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[22]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteRepositoryByFullNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteRepositoryByFullNameRequest) ProtoMessage() {}
+
+func (x *DeleteRepositoryByFullNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 DeleteRepositoryByFullNameRequest.ProtoReflect.Descriptor instead.
+func (*DeleteRepositoryByFullNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{22}
+}
+
+func (x *DeleteRepositoryByFullNameRequest) GetFullName() string {
+ if x != nil {
+ return x.FullName
+ }
+ return ""
+}
+
+type DeleteRepositoryByFullNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteRepositoryByFullNameResponse) Reset() {
+ *x = DeleteRepositoryByFullNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[23]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteRepositoryByFullNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteRepositoryByFullNameResponse) ProtoMessage() {}
+
+func (x *DeleteRepositoryByFullNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 DeleteRepositoryByFullNameResponse.ProtoReflect.Descriptor instead.
+func (*DeleteRepositoryByFullNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{23}
+}
+
+type DeprecateRepositoryByNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OwnerName string `protobuf:"bytes,1,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"`
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // A message shown along with the deprecation warning for this repository.
+ // It must be a utf8 encoded string containing 256 or fewer characters.
+ DeprecationMessage string `protobuf:"bytes,3,opt,name=deprecation_message,json=deprecationMessage,proto3" json:"deprecation_message,omitempty"`
+}
+
+func (x *DeprecateRepositoryByNameRequest) Reset() {
+ *x = DeprecateRepositoryByNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[24]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeprecateRepositoryByNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeprecateRepositoryByNameRequest) ProtoMessage() {}
+
+func (x *DeprecateRepositoryByNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 DeprecateRepositoryByNameRequest.ProtoReflect.Descriptor instead.
+func (*DeprecateRepositoryByNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *DeprecateRepositoryByNameRequest) GetOwnerName() string {
+ if x != nil {
+ return x.OwnerName
+ }
+ return ""
+}
+
+func (x *DeprecateRepositoryByNameRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *DeprecateRepositoryByNameRequest) GetDeprecationMessage() string {
+ if x != nil {
+ return x.DeprecationMessage
+ }
+ return ""
+}
+
+type DeprecateRepositoryByNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
+}
+
+func (x *DeprecateRepositoryByNameResponse) Reset() {
+ *x = DeprecateRepositoryByNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[25]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeprecateRepositoryByNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeprecateRepositoryByNameResponse) ProtoMessage() {}
+
+func (x *DeprecateRepositoryByNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 DeprecateRepositoryByNameResponse.ProtoReflect.Descriptor instead.
+func (*DeprecateRepositoryByNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{25}
+}
+
+func (x *DeprecateRepositoryByNameResponse) GetRepository() *Repository {
+ if x != nil {
+ return x.Repository
+ }
+ return nil
+}
+
+type UndeprecateRepositoryByNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OwnerName string `protobuf:"bytes,1,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"`
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+}
+
+func (x *UndeprecateRepositoryByNameRequest) Reset() {
+ *x = UndeprecateRepositoryByNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[26]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UndeprecateRepositoryByNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UndeprecateRepositoryByNameRequest) ProtoMessage() {}
+
+func (x *UndeprecateRepositoryByNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 UndeprecateRepositoryByNameRequest.ProtoReflect.Descriptor instead.
+func (*UndeprecateRepositoryByNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{26}
+}
+
+func (x *UndeprecateRepositoryByNameRequest) GetOwnerName() string {
+ if x != nil {
+ return x.OwnerName
+ }
+ return ""
+}
+
+func (x *UndeprecateRepositoryByNameRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+type UndeprecateRepositoryByNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3" json:"repository,omitempty"`
+}
+
+func (x *UndeprecateRepositoryByNameResponse) Reset() {
+ *x = UndeprecateRepositoryByNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[27]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UndeprecateRepositoryByNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UndeprecateRepositoryByNameResponse) ProtoMessage() {}
+
+func (x *UndeprecateRepositoryByNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 UndeprecateRepositoryByNameResponse.ProtoReflect.Descriptor instead.
+func (*UndeprecateRepositoryByNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{27}
+}
+
+func (x *UndeprecateRepositoryByNameResponse) GetRepository() *Repository {
+ if x != nil {
+ return x.Repository
+ }
+ return nil
+}
+
+type SetRepositoryContributorRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository for which the user's role will be set.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+ // The ID of the user whose role will be set.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ // The role to assign to the user.
+ // Setting UNSPECIFIED means removing the user's role.
+ RepositoryRole RepositoryRole `protobuf:"varint,3,opt,name=repository_role,json=repositoryRole,proto3,enum=buf.alpha.registry.v1alpha1.RepositoryRole" json:"repository_role,omitempty"`
+}
+
+func (x *SetRepositoryContributorRequest) Reset() {
+ *x = SetRepositoryContributorRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[28]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetRepositoryContributorRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetRepositoryContributorRequest) ProtoMessage() {}
+
+func (x *SetRepositoryContributorRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 SetRepositoryContributorRequest.ProtoReflect.Descriptor instead.
+func (*SetRepositoryContributorRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{28}
+}
+
+func (x *SetRepositoryContributorRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+func (x *SetRepositoryContributorRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *SetRepositoryContributorRequest) GetRepositoryRole() RepositoryRole {
+ if x != nil {
+ return x.RepositoryRole
+ }
+ return RepositoryRole_REPOSITORY_ROLE_UNSPECIFIED
+}
+
+type SetRepositoryContributorResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *SetRepositoryContributorResponse) Reset() {
+ *x = SetRepositoryContributorResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[29]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetRepositoryContributorResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetRepositoryContributorResponse) ProtoMessage() {}
+
+func (x *SetRepositoryContributorResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 SetRepositoryContributorResponse.ProtoReflect.Descriptor instead.
+func (*SetRepositoryContributorResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{29}
+}
+
+type ListRepositoryContributorsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListRepositoryContributorsRequest) Reset() {
+ *x = ListRepositoryContributorsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[30]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoryContributorsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoryContributorsRequest) ProtoMessage() {}
+
+func (x *ListRepositoryContributorsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 ListRepositoryContributorsRequest.ProtoReflect.Descriptor instead.
+func (*ListRepositoryContributorsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *ListRepositoryContributorsRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+func (x *ListRepositoryContributorsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListRepositoryContributorsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListRepositoryContributorsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListRepositoryContributorsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Users []*RepositoryContributor `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListRepositoryContributorsResponse) Reset() {
+ *x = ListRepositoryContributorsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[31]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoryContributorsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoryContributorsResponse) ProtoMessage() {}
+
+func (x *ListRepositoryContributorsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_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 ListRepositoryContributorsResponse.ProtoReflect.Descriptor instead.
+func (*ListRepositoryContributorsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *ListRepositoryContributorsResponse) GetUsers() []*RepositoryContributor {
+ if x != nil {
+ return x.Users
+ }
+ return nil
+}
+
+func (x *ListRepositoryContributorsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type GetRepositoryContributorRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository for which to get the contributor information.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+ // The ID of the user for which to get the contributor information.
+ UserId string `protobuf:"bytes,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+}
+
+func (x *GetRepositoryContributorRequest) Reset() {
+ *x = GetRepositoryContributorRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[32]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoryContributorRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoryContributorRequest) ProtoMessage() {}
+
+func (x *GetRepositoryContributorRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[32]
+ 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 GetRepositoryContributorRequest.ProtoReflect.Descriptor instead.
+func (*GetRepositoryContributorRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *GetRepositoryContributorRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+func (x *GetRepositoryContributorRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+type GetRepositoryContributorResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The contributor information of the user in the repository.
+ User *RepositoryContributor `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+}
+
+func (x *GetRepositoryContributorResponse) Reset() {
+ *x = GetRepositoryContributorResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[33]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoryContributorResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoryContributorResponse) ProtoMessage() {}
+
+func (x *GetRepositoryContributorResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[33]
+ 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 GetRepositoryContributorResponse.ProtoReflect.Descriptor instead.
+func (*GetRepositoryContributorResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *GetRepositoryContributorResponse) GetUser() *RepositoryContributor {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+type GetRepositorySettingsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository for which to get the settings.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+}
+
+func (x *GetRepositorySettingsRequest) Reset() {
+ *x = GetRepositorySettingsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[34]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositorySettingsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositorySettingsRequest) ProtoMessage() {}
+
+func (x *GetRepositorySettingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[34]
+ 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 GetRepositorySettingsRequest.ProtoReflect.Descriptor instead.
+func (*GetRepositorySettingsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{34}
+}
+
+func (x *GetRepositorySettingsRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+type GetRepositorySettingsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The number of outside contributors in the repository,
+ // excluding owning-organization's members that have an explicit role.
+ ContributorsCount uint32 `protobuf:"varint,1,opt,name=contributors_count,json=contributorsCount,proto3" json:"contributors_count,omitempty"`
+}
+
+func (x *GetRepositorySettingsResponse) Reset() {
+ *x = GetRepositorySettingsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[35]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositorySettingsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositorySettingsResponse) ProtoMessage() {}
+
+func (x *GetRepositorySettingsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[35]
+ 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 GetRepositorySettingsResponse.ProtoReflect.Descriptor instead.
+func (*GetRepositorySettingsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{35}
+}
+
+func (x *GetRepositorySettingsResponse) GetContributorsCount() uint32 {
+ if x != nil {
+ return x.ContributorsCount
+ }
+ return 0
+}
+
+type UpdateRepositorySettingsByNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OwnerName string `protobuf:"bytes,1,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"`
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // optional, update to visibility will only be made if this is specified.
+ Visibility Visibility `protobuf:"varint,3,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.Visibility" json:"visibility,omitempty"`
+ // optional, update to description will only be made when this is present
+ Description *string `protobuf:"bytes,4,opt,name=description,proto3,oneof" json:"description,omitempty"`
+ // optional, update to url will only be made when this is present
+ Url *string `protobuf:"bytes,5,opt,name=url,proto3,oneof" json:"url,omitempty"`
+}
+
+func (x *UpdateRepositorySettingsByNameRequest) Reset() {
+ *x = UpdateRepositorySettingsByNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[36]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateRepositorySettingsByNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateRepositorySettingsByNameRequest) ProtoMessage() {}
+
+func (x *UpdateRepositorySettingsByNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[36]
+ 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 UpdateRepositorySettingsByNameRequest.ProtoReflect.Descriptor instead.
+func (*UpdateRepositorySettingsByNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{36}
+}
+
+func (x *UpdateRepositorySettingsByNameRequest) GetOwnerName() string {
+ if x != nil {
+ return x.OwnerName
+ }
+ return ""
+}
+
+func (x *UpdateRepositorySettingsByNameRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *UpdateRepositorySettingsByNameRequest) GetVisibility() Visibility {
+ if x != nil {
+ return x.Visibility
+ }
+ return Visibility_VISIBILITY_UNSPECIFIED
+}
+
+func (x *UpdateRepositorySettingsByNameRequest) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *UpdateRepositorySettingsByNameRequest) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+type UpdateRepositorySettingsByNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateRepositorySettingsByNameResponse) Reset() {
+ *x = UpdateRepositorySettingsByNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[37]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateRepositorySettingsByNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateRepositorySettingsByNameResponse) ProtoMessage() {}
+
+func (x *UpdateRepositorySettingsByNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[37]
+ 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 UpdateRepositorySettingsByNameResponse.ProtoReflect.Descriptor instead.
+func (*UpdateRepositorySettingsByNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{37}
+}
+
+type GetRepositoriesMetadataRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of repository IDs to request the metadata.
+ Ids []string `protobuf:"bytes,1,rep,name=ids,proto3" json:"ids,omitempty"`
+}
+
+func (x *GetRepositoriesMetadataRequest) Reset() {
+ *x = GetRepositoriesMetadataRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[38]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoriesMetadataRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoriesMetadataRequest) ProtoMessage() {}
+
+func (x *GetRepositoriesMetadataRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[38]
+ 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 GetRepositoriesMetadataRequest.ProtoReflect.Descriptor instead.
+func (*GetRepositoriesMetadataRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{38}
+}
+
+func (x *GetRepositoriesMetadataRequest) GetIds() []string {
+ if x != nil {
+ return x.Ids
+ }
+ return nil
+}
+
+type GetRepositoriesMetadataResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Metadata []*RepositoryMetadata `protobuf:"bytes,1,rep,name=metadata,proto3" json:"metadata,omitempty"`
+}
+
+func (x *GetRepositoriesMetadataResponse) Reset() {
+ *x = GetRepositoriesMetadataResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[39]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoriesMetadataResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoriesMetadataResponse) ProtoMessage() {}
+
+func (x *GetRepositoriesMetadataResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[39]
+ 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 GetRepositoriesMetadataResponse.ProtoReflect.Descriptor instead.
+func (*GetRepositoriesMetadataResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP(), []int{39}
+}
+
+func (x *GetRepositoriesMetadataResponse) GetMetadata() []*RepositoryMetadata {
+ if x != nil {
+ return x.Metadata
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_repository_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_repository_proto_rawDesc = []byte{
+ 0x0a, 0x2c, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x26, 0x62, 0x75, 0x66,
+ 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x1a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x62, 0x75, 0x66,
+ 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0xe6, 0x03, 0x0a, 0x0a, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
+ 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
+ 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
+ 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70,
+ 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x19, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x09, 0x48, 0x00, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x29, 0x0a, 0x0f, 0x6f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12,
+ 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x08, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12,
+ 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6d,
+ 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x64, 0x65,
+ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x0a,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x0b,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03,
+ 0x75, 0x72, 0x6c, 0x42, 0x07, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0x68, 0x0a, 0x10,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x61, 0x67, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x74, 0x61, 0x67, 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
+ 0x21, 0x0a, 0x0c, 0x64, 0x72, 0x61, 0x66, 0x74, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x64, 0x72, 0x61, 0x66, 0x74, 0x73, 0x43, 0x6f, 0x75,
+ 0x6e, 0x74, 0x4a, 0x04, 0x08, 0x02, 0x10, 0x03, 0x52, 0x0c, 0x74, 0x72, 0x61, 0x63, 0x6b, 0x73,
+ 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x97, 0x02, 0x0a, 0x15, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
+ 0x12, 0x35, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65,
+ 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x50, 0x0a, 0x0d,
+ 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65,
+ 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x50,
+ 0x0a, 0x0d, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f,
+ 0x6c, 0x65, 0x52, 0x0c, 0x69, 0x6d, 0x70, 0x6c, 0x69, 0x63, 0x69, 0x74, 0x52, 0x6f, 0x6c, 0x65,
+ 0x22, 0xc3, 0x02, 0x0a, 0x12, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4d,
+ 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f,
+ 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x6b, 0x0a, 0x19, 0x6f, 0x77,
+ 0x6e, 0x65, 0x72, 0x5f, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69,
+ 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x17,
+ 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x48, 0x0a, 0x12, 0x6c, 0x61, 0x74, 0x65, 0x73,
+ 0x74, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
+ 0x10, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x54, 0x69, 0x6d,
+ 0x65, 0x12, 0x33, 0x0a, 0x16, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x5f, 0x73, 0x70, 0x64, 0x78,
+ 0x5f, 0x6c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x13, 0x6c, 0x61, 0x74, 0x65, 0x73, 0x74, 0x53, 0x70, 0x64, 0x78, 0x4c, 0x69, 0x63,
+ 0x65, 0x6e, 0x73, 0x65, 0x49, 0x64, 0x22, 0x41, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e,
+ 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x66, 0x75,
+ 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09,
+ 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x70, 0x0a, 0x21, 0x47, 0x65, 0x74,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x42, 0x79, 0x46, 0x75,
+ 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b,
+ 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x22, 0x26, 0x0a, 0x14, 0x47,
+ 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x02, 0x69, 0x64, 0x22, 0xa7, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a,
+ 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43,
+ 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x22, 0x3d, 0x0a,
+ 0x1e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79,
+ 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xb1, 0x01, 0x0a,
+ 0x1f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79,
+ 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x47, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x45, 0x0a, 0x06, 0x63, 0x6f, 0x75,
+ 0x6e, 0x74, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x73, 0x52, 0x06, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x73,
+ 0x22, 0x6f, 0x0a, 0x17, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08,
+ 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65,
+ 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61,
+ 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72,
+ 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73,
+ 0x65, 0x22, 0x8f, 0x01, 0x0a, 0x18, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b,
+ 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01,
+ 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e,
+ 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x22, 0x8c, 0x01, 0x0a, 0x1b, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70,
+ 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65,
+ 0x72, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72,
+ 0x73, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73,
+ 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50,
+ 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x7c, 0x0a, 0x24, 0x4c, 0x69, 0x73, 0x74,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72,
+ 0x43, 0x61, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07,
+ 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72,
+ 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x9c, 0x01, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x43,
+ 0x61, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x4b, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52,
+ 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x26, 0x0a,
+ 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xa4, 0x01, 0x0a, 0x23, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72,
+ 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a,
+ 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73,
+ 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
+ 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x04, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a,
+ 0x24, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x69, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69,
+ 0x65, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f,
+ 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78,
+ 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x89, 0x01, 0x0a, 0x21, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42,
+ 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a,
+ 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69,
+ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x22, 0x6d, 0x0a, 0x22, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c,
+ 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x29, 0x0a, 0x17, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
+ 0x22, 0x1a, 0x0a, 0x18, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x40, 0x0a, 0x21,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x66, 0x75, 0x6c, 0x6c, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x66, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x24,
+ 0x0a, 0x22, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9b, 0x01, 0x0a, 0x20, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61,
+ 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61,
+ 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f,
+ 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d,
+ 0x65, 0x12, 0x2f, 0x0a, 0x13, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x5f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12,
+ 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61,
+ 0x67, 0x65, 0x22, 0x6c, 0x0a, 0x21, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x22, 0x6c, 0x0a, 0x22, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x6e,
+ 0x0a, 0x23, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x22, 0xb5,
+ 0x01, 0x0a, 0x1f, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f,
+ 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64,
+ 0x12, 0x54, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x72,
+ 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x22, 0x0a, 0x20, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74,
+ 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x9e, 0x01, 0x0a, 0x21, 0x4c,
+ 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e,
+ 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69,
+ 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69,
+ 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x96, 0x01, 0x0a, 0x22,
+ 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f,
+ 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x48, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69,
+ 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f,
+ 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x5f, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x17, 0x0a, 0x07,
+ 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75,
+ 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x6a, 0x0a, 0x20, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f,
+ 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x04, 0x75, 0x73, 0x65,
+ 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65,
+ 0x72, 0x22, 0x43, 0x0a, 0x1c, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x22, 0x4e, 0x0a, 0x1d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x2d, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0d, 0x52, 0x11, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
+ 0x73, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8e, 0x02, 0x0a, 0x25, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69,
+ 0x6e, 0x67, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x47, 0x0a, 0x0a, 0x76, 0x69, 0x73, 0x69,
+ 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69, 0x73, 0x69, 0x62,
+ 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74,
+ 0x79, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
+ 0x05, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x88, 0x01, 0x01, 0x42,
+ 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x42,
+ 0x06, 0x0a, 0x04, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x28, 0x0a, 0x26, 0x55, 0x70, 0x64, 0x61, 0x74,
+ 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69,
+ 0x6e, 0x67, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x22, 0x32, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x69, 0x65, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x69, 0x64, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09,
+ 0x52, 0x03, 0x69, 0x64, 0x73, 0x22, 0x6e, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x4b, 0x0a, 0x08, 0x6d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x08, 0x6d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0x2a, 0x57, 0x0a, 0x0a, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c,
+ 0x69, 0x74, 0x79, 0x12, 0x1a, 0x0a, 0x16, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54,
+ 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12,
+ 0x15, 0x0a, 0x11, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49, 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x55,
+ 0x42, 0x4c, 0x49, 0x43, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x56, 0x49, 0x53, 0x49, 0x42, 0x49,
+ 0x4c, 0x49, 0x54, 0x59, 0x5f, 0x50, 0x52, 0x49, 0x56, 0x41, 0x54, 0x45, 0x10, 0x02, 0x32, 0xc6,
+ 0x15, 0x0a, 0x11, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x76, 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x94, 0x01, 0x0a,
+ 0x17, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79,
+ 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x7f, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x34, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65,
+ 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x38, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0xa6, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x41, 0x63,
+ 0x63, 0x65, 0x73, 0x73, 0x12, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x69, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x41, 0x63, 0x63, 0x65, 0x73, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x55, 0x73, 0x65, 0x72, 0x43, 0x61, 0x6e, 0x41, 0x63, 0x63,
+ 0x65, 0x73, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa3, 0x01, 0x0a, 0x1c,
+ 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x12, 0x40, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x41,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65,
+ 0x12, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42,
+ 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42,
+ 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x7f, 0x0a, 0x10, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x34, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x35, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x1a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d,
+ 0x65, 0x12, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x9a, 0x01, 0x0a, 0x19, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65,
+ 0x12, 0x3d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44,
+ 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65,
+ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0xa0, 0x01, 0x0a, 0x1b, 0x55, 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x6e,
+ 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x40, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55,
+ 0x6e, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x9a, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x42, 0x79, 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65,
+ 0x12, 0x3d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47,
+ 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x42, 0x79,
+ 0x46, 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65,
+ 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x42, 0x79, 0x46,
+ 0x75, 0x6c, 0x6c, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x97, 0x01, 0x0a, 0x18, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x3c, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75,
+ 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f,
+ 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x9d, 0x01, 0x0a, 0x1a, 0x4c, 0x69,
+ 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74,
+ 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x73, 0x12, 0x3e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72,
+ 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x97, 0x01, 0x0a, 0x18, 0x47, 0x65,
+ 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72,
+ 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x12, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x6f, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x8e, 0x01, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x39, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
+ 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa9, 0x01, 0x0a, 0x1e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67,
+ 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, 0x79,
+ 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e,
+ 0x67, 0x73, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x94, 0x01, 0x0a, 0x17, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x69, 0x65, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x3b, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61,
+ 0x74, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3c, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x69, 0x65, 0x73, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x9c, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0f, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59,
+ 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75,
+ 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f,
+ 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66,
+ 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa,
+ 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b,
+ 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75,
+ 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70,
+ 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_repository_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_repository_proto_rawDescData = file_buf_alpha_registry_v1alpha1_repository_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_repository_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_repository_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_repository_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_repository_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_repository_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_repository_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes = make([]protoimpl.MessageInfo, 40)
+var file_buf_alpha_registry_v1alpha1_repository_proto_goTypes = []interface{}{
+ (Visibility)(0), // 0: buf.alpha.registry.v1alpha1.Visibility
+ (*Repository)(nil), // 1: buf.alpha.registry.v1alpha1.Repository
+ (*RepositoryCounts)(nil), // 2: buf.alpha.registry.v1alpha1.RepositoryCounts
+ (*RepositoryContributor)(nil), // 3: buf.alpha.registry.v1alpha1.RepositoryContributor
+ (*RepositoryMetadata)(nil), // 4: buf.alpha.registry.v1alpha1.RepositoryMetadata
+ (*GetRepositoriesByFullNameRequest)(nil), // 5: buf.alpha.registry.v1alpha1.GetRepositoriesByFullNameRequest
+ (*GetRepositoriesByFullNameResponse)(nil), // 6: buf.alpha.registry.v1alpha1.GetRepositoriesByFullNameResponse
+ (*GetRepositoryRequest)(nil), // 7: buf.alpha.registry.v1alpha1.GetRepositoryRequest
+ (*GetRepositoryResponse)(nil), // 8: buf.alpha.registry.v1alpha1.GetRepositoryResponse
+ (*GetRepositoryByFullNameRequest)(nil), // 9: buf.alpha.registry.v1alpha1.GetRepositoryByFullNameRequest
+ (*GetRepositoryByFullNameResponse)(nil), // 10: buf.alpha.registry.v1alpha1.GetRepositoryByFullNameResponse
+ (*ListRepositoriesRequest)(nil), // 11: buf.alpha.registry.v1alpha1.ListRepositoriesRequest
+ (*ListRepositoriesResponse)(nil), // 12: buf.alpha.registry.v1alpha1.ListRepositoriesResponse
+ (*ListUserRepositoriesRequest)(nil), // 13: buf.alpha.registry.v1alpha1.ListUserRepositoriesRequest
+ (*ListUserRepositoriesResponse)(nil), // 14: buf.alpha.registry.v1alpha1.ListUserRepositoriesResponse
+ (*ListRepositoriesUserCanAccessRequest)(nil), // 15: buf.alpha.registry.v1alpha1.ListRepositoriesUserCanAccessRequest
+ (*ListRepositoriesUserCanAccessResponse)(nil), // 16: buf.alpha.registry.v1alpha1.ListRepositoriesUserCanAccessResponse
+ (*ListOrganizationRepositoriesRequest)(nil), // 17: buf.alpha.registry.v1alpha1.ListOrganizationRepositoriesRequest
+ (*ListOrganizationRepositoriesResponse)(nil), // 18: buf.alpha.registry.v1alpha1.ListOrganizationRepositoriesResponse
+ (*CreateRepositoryByFullNameRequest)(nil), // 19: buf.alpha.registry.v1alpha1.CreateRepositoryByFullNameRequest
+ (*CreateRepositoryByFullNameResponse)(nil), // 20: buf.alpha.registry.v1alpha1.CreateRepositoryByFullNameResponse
+ (*DeleteRepositoryRequest)(nil), // 21: buf.alpha.registry.v1alpha1.DeleteRepositoryRequest
+ (*DeleteRepositoryResponse)(nil), // 22: buf.alpha.registry.v1alpha1.DeleteRepositoryResponse
+ (*DeleteRepositoryByFullNameRequest)(nil), // 23: buf.alpha.registry.v1alpha1.DeleteRepositoryByFullNameRequest
+ (*DeleteRepositoryByFullNameResponse)(nil), // 24: buf.alpha.registry.v1alpha1.DeleteRepositoryByFullNameResponse
+ (*DeprecateRepositoryByNameRequest)(nil), // 25: buf.alpha.registry.v1alpha1.DeprecateRepositoryByNameRequest
+ (*DeprecateRepositoryByNameResponse)(nil), // 26: buf.alpha.registry.v1alpha1.DeprecateRepositoryByNameResponse
+ (*UndeprecateRepositoryByNameRequest)(nil), // 27: buf.alpha.registry.v1alpha1.UndeprecateRepositoryByNameRequest
+ (*UndeprecateRepositoryByNameResponse)(nil), // 28: buf.alpha.registry.v1alpha1.UndeprecateRepositoryByNameResponse
+ (*SetRepositoryContributorRequest)(nil), // 29: buf.alpha.registry.v1alpha1.SetRepositoryContributorRequest
+ (*SetRepositoryContributorResponse)(nil), // 30: buf.alpha.registry.v1alpha1.SetRepositoryContributorResponse
+ (*ListRepositoryContributorsRequest)(nil), // 31: buf.alpha.registry.v1alpha1.ListRepositoryContributorsRequest
+ (*ListRepositoryContributorsResponse)(nil), // 32: buf.alpha.registry.v1alpha1.ListRepositoryContributorsResponse
+ (*GetRepositoryContributorRequest)(nil), // 33: buf.alpha.registry.v1alpha1.GetRepositoryContributorRequest
+ (*GetRepositoryContributorResponse)(nil), // 34: buf.alpha.registry.v1alpha1.GetRepositoryContributorResponse
+ (*GetRepositorySettingsRequest)(nil), // 35: buf.alpha.registry.v1alpha1.GetRepositorySettingsRequest
+ (*GetRepositorySettingsResponse)(nil), // 36: buf.alpha.registry.v1alpha1.GetRepositorySettingsResponse
+ (*UpdateRepositorySettingsByNameRequest)(nil), // 37: buf.alpha.registry.v1alpha1.UpdateRepositorySettingsByNameRequest
+ (*UpdateRepositorySettingsByNameResponse)(nil), // 38: buf.alpha.registry.v1alpha1.UpdateRepositorySettingsByNameResponse
+ (*GetRepositoriesMetadataRequest)(nil), // 39: buf.alpha.registry.v1alpha1.GetRepositoriesMetadataRequest
+ (*GetRepositoriesMetadataResponse)(nil), // 40: buf.alpha.registry.v1alpha1.GetRepositoriesMetadataResponse
+ (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp
+ (*User)(nil), // 42: buf.alpha.registry.v1alpha1.User
+ (RepositoryRole)(0), // 43: buf.alpha.registry.v1alpha1.RepositoryRole
+ (VerificationStatus)(0), // 44: buf.alpha.registry.v1alpha1.VerificationStatus
+}
+var file_buf_alpha_registry_v1alpha1_repository_proto_depIdxs = []int32{
+ 41, // 0: buf.alpha.registry.v1alpha1.Repository.create_time:type_name -> google.protobuf.Timestamp
+ 41, // 1: buf.alpha.registry.v1alpha1.Repository.update_time:type_name -> google.protobuf.Timestamp
+ 0, // 2: buf.alpha.registry.v1alpha1.Repository.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility
+ 42, // 3: buf.alpha.registry.v1alpha1.RepositoryContributor.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 43, // 4: buf.alpha.registry.v1alpha1.RepositoryContributor.explicit_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole
+ 43, // 5: buf.alpha.registry.v1alpha1.RepositoryContributor.implicit_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole
+ 44, // 6: buf.alpha.registry.v1alpha1.RepositoryMetadata.owner_verification_status:type_name -> buf.alpha.registry.v1alpha1.VerificationStatus
+ 41, // 7: buf.alpha.registry.v1alpha1.RepositoryMetadata.latest_commit_time:type_name -> google.protobuf.Timestamp
+ 1, // 8: buf.alpha.registry.v1alpha1.GetRepositoriesByFullNameResponse.repositories:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 1, // 9: buf.alpha.registry.v1alpha1.GetRepositoryResponse.repository:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 2, // 10: buf.alpha.registry.v1alpha1.GetRepositoryResponse.counts:type_name -> buf.alpha.registry.v1alpha1.RepositoryCounts
+ 1, // 11: buf.alpha.registry.v1alpha1.GetRepositoryByFullNameResponse.repository:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 2, // 12: buf.alpha.registry.v1alpha1.GetRepositoryByFullNameResponse.counts:type_name -> buf.alpha.registry.v1alpha1.RepositoryCounts
+ 1, // 13: buf.alpha.registry.v1alpha1.ListRepositoriesResponse.repositories:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 1, // 14: buf.alpha.registry.v1alpha1.ListUserRepositoriesResponse.repositories:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 1, // 15: buf.alpha.registry.v1alpha1.ListRepositoriesUserCanAccessResponse.repositories:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 1, // 16: buf.alpha.registry.v1alpha1.ListOrganizationRepositoriesResponse.repositories:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 0, // 17: buf.alpha.registry.v1alpha1.CreateRepositoryByFullNameRequest.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility
+ 1, // 18: buf.alpha.registry.v1alpha1.CreateRepositoryByFullNameResponse.repository:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 1, // 19: buf.alpha.registry.v1alpha1.DeprecateRepositoryByNameResponse.repository:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 1, // 20: buf.alpha.registry.v1alpha1.UndeprecateRepositoryByNameResponse.repository:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 43, // 21: buf.alpha.registry.v1alpha1.SetRepositoryContributorRequest.repository_role:type_name -> buf.alpha.registry.v1alpha1.RepositoryRole
+ 3, // 22: buf.alpha.registry.v1alpha1.ListRepositoryContributorsResponse.users:type_name -> buf.alpha.registry.v1alpha1.RepositoryContributor
+ 3, // 23: buf.alpha.registry.v1alpha1.GetRepositoryContributorResponse.user:type_name -> buf.alpha.registry.v1alpha1.RepositoryContributor
+ 0, // 24: buf.alpha.registry.v1alpha1.UpdateRepositorySettingsByNameRequest.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility
+ 4, // 25: buf.alpha.registry.v1alpha1.GetRepositoriesMetadataResponse.metadata:type_name -> buf.alpha.registry.v1alpha1.RepositoryMetadata
+ 7, // 26: buf.alpha.registry.v1alpha1.RepositoryService.GetRepository:input_type -> buf.alpha.registry.v1alpha1.GetRepositoryRequest
+ 9, // 27: buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoryByFullName:input_type -> buf.alpha.registry.v1alpha1.GetRepositoryByFullNameRequest
+ 11, // 28: buf.alpha.registry.v1alpha1.RepositoryService.ListRepositories:input_type -> buf.alpha.registry.v1alpha1.ListRepositoriesRequest
+ 13, // 29: buf.alpha.registry.v1alpha1.RepositoryService.ListUserRepositories:input_type -> buf.alpha.registry.v1alpha1.ListUserRepositoriesRequest
+ 15, // 30: buf.alpha.registry.v1alpha1.RepositoryService.ListRepositoriesUserCanAccess:input_type -> buf.alpha.registry.v1alpha1.ListRepositoriesUserCanAccessRequest
+ 17, // 31: buf.alpha.registry.v1alpha1.RepositoryService.ListOrganizationRepositories:input_type -> buf.alpha.registry.v1alpha1.ListOrganizationRepositoriesRequest
+ 19, // 32: buf.alpha.registry.v1alpha1.RepositoryService.CreateRepositoryByFullName:input_type -> buf.alpha.registry.v1alpha1.CreateRepositoryByFullNameRequest
+ 21, // 33: buf.alpha.registry.v1alpha1.RepositoryService.DeleteRepository:input_type -> buf.alpha.registry.v1alpha1.DeleteRepositoryRequest
+ 23, // 34: buf.alpha.registry.v1alpha1.RepositoryService.DeleteRepositoryByFullName:input_type -> buf.alpha.registry.v1alpha1.DeleteRepositoryByFullNameRequest
+ 25, // 35: buf.alpha.registry.v1alpha1.RepositoryService.DeprecateRepositoryByName:input_type -> buf.alpha.registry.v1alpha1.DeprecateRepositoryByNameRequest
+ 27, // 36: buf.alpha.registry.v1alpha1.RepositoryService.UndeprecateRepositoryByName:input_type -> buf.alpha.registry.v1alpha1.UndeprecateRepositoryByNameRequest
+ 5, // 37: buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoriesByFullName:input_type -> buf.alpha.registry.v1alpha1.GetRepositoriesByFullNameRequest
+ 29, // 38: buf.alpha.registry.v1alpha1.RepositoryService.SetRepositoryContributor:input_type -> buf.alpha.registry.v1alpha1.SetRepositoryContributorRequest
+ 31, // 39: buf.alpha.registry.v1alpha1.RepositoryService.ListRepositoryContributors:input_type -> buf.alpha.registry.v1alpha1.ListRepositoryContributorsRequest
+ 33, // 40: buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoryContributor:input_type -> buf.alpha.registry.v1alpha1.GetRepositoryContributorRequest
+ 35, // 41: buf.alpha.registry.v1alpha1.RepositoryService.GetRepositorySettings:input_type -> buf.alpha.registry.v1alpha1.GetRepositorySettingsRequest
+ 37, // 42: buf.alpha.registry.v1alpha1.RepositoryService.UpdateRepositorySettingsByName:input_type -> buf.alpha.registry.v1alpha1.UpdateRepositorySettingsByNameRequest
+ 39, // 43: buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoriesMetadata:input_type -> buf.alpha.registry.v1alpha1.GetRepositoriesMetadataRequest
+ 8, // 44: buf.alpha.registry.v1alpha1.RepositoryService.GetRepository:output_type -> buf.alpha.registry.v1alpha1.GetRepositoryResponse
+ 10, // 45: buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoryByFullName:output_type -> buf.alpha.registry.v1alpha1.GetRepositoryByFullNameResponse
+ 12, // 46: buf.alpha.registry.v1alpha1.RepositoryService.ListRepositories:output_type -> buf.alpha.registry.v1alpha1.ListRepositoriesResponse
+ 14, // 47: buf.alpha.registry.v1alpha1.RepositoryService.ListUserRepositories:output_type -> buf.alpha.registry.v1alpha1.ListUserRepositoriesResponse
+ 16, // 48: buf.alpha.registry.v1alpha1.RepositoryService.ListRepositoriesUserCanAccess:output_type -> buf.alpha.registry.v1alpha1.ListRepositoriesUserCanAccessResponse
+ 18, // 49: buf.alpha.registry.v1alpha1.RepositoryService.ListOrganizationRepositories:output_type -> buf.alpha.registry.v1alpha1.ListOrganizationRepositoriesResponse
+ 20, // 50: buf.alpha.registry.v1alpha1.RepositoryService.CreateRepositoryByFullName:output_type -> buf.alpha.registry.v1alpha1.CreateRepositoryByFullNameResponse
+ 22, // 51: buf.alpha.registry.v1alpha1.RepositoryService.DeleteRepository:output_type -> buf.alpha.registry.v1alpha1.DeleteRepositoryResponse
+ 24, // 52: buf.alpha.registry.v1alpha1.RepositoryService.DeleteRepositoryByFullName:output_type -> buf.alpha.registry.v1alpha1.DeleteRepositoryByFullNameResponse
+ 26, // 53: buf.alpha.registry.v1alpha1.RepositoryService.DeprecateRepositoryByName:output_type -> buf.alpha.registry.v1alpha1.DeprecateRepositoryByNameResponse
+ 28, // 54: buf.alpha.registry.v1alpha1.RepositoryService.UndeprecateRepositoryByName:output_type -> buf.alpha.registry.v1alpha1.UndeprecateRepositoryByNameResponse
+ 6, // 55: buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoriesByFullName:output_type -> buf.alpha.registry.v1alpha1.GetRepositoriesByFullNameResponse
+ 30, // 56: buf.alpha.registry.v1alpha1.RepositoryService.SetRepositoryContributor:output_type -> buf.alpha.registry.v1alpha1.SetRepositoryContributorResponse
+ 32, // 57: buf.alpha.registry.v1alpha1.RepositoryService.ListRepositoryContributors:output_type -> buf.alpha.registry.v1alpha1.ListRepositoryContributorsResponse
+ 34, // 58: buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoryContributor:output_type -> buf.alpha.registry.v1alpha1.GetRepositoryContributorResponse
+ 36, // 59: buf.alpha.registry.v1alpha1.RepositoryService.GetRepositorySettings:output_type -> buf.alpha.registry.v1alpha1.GetRepositorySettingsResponse
+ 38, // 60: buf.alpha.registry.v1alpha1.RepositoryService.UpdateRepositorySettingsByName:output_type -> buf.alpha.registry.v1alpha1.UpdateRepositorySettingsByNameResponse
+ 40, // 61: buf.alpha.registry.v1alpha1.RepositoryService.GetRepositoriesMetadata:output_type -> buf.alpha.registry.v1alpha1.GetRepositoriesMetadataResponse
+ 44, // [44:62] is the sub-list for method output_type
+ 26, // [26:44] is the sub-list for method input_type
+ 26, // [26:26] is the sub-list for extension type_name
+ 26, // [26:26] is the sub-list for extension extendee
+ 0, // [0:26] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_repository_proto_init() }
+func file_buf_alpha_registry_v1alpha1_repository_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_repository_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_role_proto_init()
+ file_buf_alpha_registry_v1alpha1_user_proto_init()
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Repository); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RepositoryCounts); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RepositoryContributor); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RepositoryMetadata); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoriesByFullNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoriesByFullNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoryRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoryResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoryByFullNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoryByFullNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoriesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoriesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListUserRepositoriesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListUserRepositoriesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoriesUserCanAccessRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoriesUserCanAccessResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOrganizationRepositoriesRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOrganizationRepositoriesResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateRepositoryByFullNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateRepositoryByFullNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteRepositoryRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteRepositoryResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteRepositoryByFullNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteRepositoryByFullNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeprecateRepositoryByNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeprecateRepositoryByNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UndeprecateRepositoryByNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UndeprecateRepositoryByNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetRepositoryContributorRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetRepositoryContributorResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoryContributorsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoryContributorsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoryContributorRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoryContributorResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositorySettingsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositorySettingsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateRepositorySettingsByNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateRepositorySettingsByNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoriesMetadataRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoriesMetadataResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*Repository_UserId)(nil),
+ (*Repository_OrganizationId)(nil),
+ }
+ file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes[36].OneofWrappers = []interface{}{}
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_repository_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 40,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_repository_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_repository_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_repository_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_repository_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_repository_proto = out.File
+ file_buf_alpha_registry_v1alpha1_repository_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_repository_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_repository_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_commit.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_commit.pb.go
new file mode 100644
index 000000000..96dd6116b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_commit.pb.go
@@ -0,0 +1,1442 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/repository_commit.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type RepositoryCommit struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // primary key, unique, immutable
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // immutable
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // The digest of the commit.
+ Digest string `protobuf:"bytes,3,opt,name=digest,proto3" json:"digest,omitempty"`
+ // The name of the commit.
+ // This is what is referenced by users.
+ // Unique, immutable.
+ Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
+ // The branch on which this commit was created.
+ //
+ // Deprecated: Do not use.
+ Branch string `protobuf:"bytes,5,opt,name=branch,proto3" json:"branch,omitempty"`
+ // The commit sequence ID for this commit. This
+ // is essentially what number commit this is on
+ // the branch.
+ CommitSequenceId int64 `protobuf:"varint,6,opt,name=commit_sequence_id,json=commitSequenceId,proto3" json:"commit_sequence_id,omitempty"`
+ // The username of the user who authored this commit.
+ Author string `protobuf:"bytes,7,opt,name=author,proto3" json:"author,omitempty"`
+ // The tags associated with this commit
+ Tags []*RepositoryTag `protobuf:"bytes,8,rep,name=tags,proto3" json:"tags,omitempty"`
+ // The commit's draft name, if it is a draft commit.
+ DraftName string `protobuf:"bytes,9,opt,name=draft_name,json=draftName,proto3" json:"draft_name,omitempty"`
+ // spdx_license_id is the license of the commit, based on the
+ // license file pushed, which should be one of the identifier defined in
+ // https://spdx.org/licenses, and will be not set if the license file is not
+ // presented or cannot be classified into a known license.
+ SpdxLicenseId string `protobuf:"bytes,10,opt,name=spdx_license_id,json=spdxLicenseId,proto3" json:"spdx_license_id,omitempty"`
+}
+
+func (x *RepositoryCommit) Reset() {
+ *x = RepositoryCommit{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RepositoryCommit) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepositoryCommit) ProtoMessage() {}
+
+func (x *RepositoryCommit) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 RepositoryCommit.ProtoReflect.Descriptor instead.
+func (*RepositoryCommit) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *RepositoryCommit) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *RepositoryCommit) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *RepositoryCommit) GetDigest() string {
+ if x != nil {
+ return x.Digest
+ }
+ return ""
+}
+
+func (x *RepositoryCommit) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+func (x *RepositoryCommit) GetBranch() string {
+ if x != nil {
+ return x.Branch
+ }
+ return ""
+}
+
+func (x *RepositoryCommit) GetCommitSequenceId() int64 {
+ if x != nil {
+ return x.CommitSequenceId
+ }
+ return 0
+}
+
+func (x *RepositoryCommit) GetAuthor() string {
+ if x != nil {
+ return x.Author
+ }
+ return ""
+}
+
+func (x *RepositoryCommit) GetTags() []*RepositoryTag {
+ if x != nil {
+ return x.Tags
+ }
+ return nil
+}
+
+func (x *RepositoryCommit) GetDraftName() string {
+ if x != nil {
+ return x.DraftName
+ }
+ return ""
+}
+
+func (x *RepositoryCommit) GetSpdxLicenseId() string {
+ if x != nil {
+ return x.SpdxLicenseId
+ }
+ return ""
+}
+
+type ListRepositoryCommitsByBranchRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the repository which the repository branch belongs to.
+ RepositoryOwner string `protobuf:"bytes,1,opt,name=repository_owner,json=repositoryOwner,proto3" json:"repository_owner,omitempty"`
+ // The name of the repository which the repository branch belongs to.
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The name of the repository branch whose commits should be listed.
+ RepositoryBranchName string `protobuf:"bytes,3,opt,name=repository_branch_name,json=repositoryBranchName,proto3" json:"repository_branch_name,omitempty"`
+ PageSize uint32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // For now this is the id of he last commit returned in the previous page.
+ // This is directly set by the frontend when listing track history starting with a
+ // specific commit. If we page_token to be anything other than a commit id
+ // we need to change the frontend as well.
+ PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,6,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListRepositoryCommitsByBranchRequest) Reset() {
+ *x = ListRepositoryCommitsByBranchRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoryCommitsByBranchRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoryCommitsByBranchRequest) ProtoMessage() {}
+
+func (x *ListRepositoryCommitsByBranchRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 ListRepositoryCommitsByBranchRequest.ProtoReflect.Descriptor instead.
+func (*ListRepositoryCommitsByBranchRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *ListRepositoryCommitsByBranchRequest) GetRepositoryOwner() string {
+ if x != nil {
+ return x.RepositoryOwner
+ }
+ return ""
+}
+
+func (x *ListRepositoryCommitsByBranchRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *ListRepositoryCommitsByBranchRequest) GetRepositoryBranchName() string {
+ if x != nil {
+ return x.RepositoryBranchName
+ }
+ return ""
+}
+
+func (x *ListRepositoryCommitsByBranchRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListRepositoryCommitsByBranchRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListRepositoryCommitsByBranchRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListRepositoryCommitsByBranchResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RepositoryCommits []*RepositoryCommit `protobuf:"bytes,1,rep,name=repository_commits,json=repositoryCommits,proto3" json:"repository_commits,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListRepositoryCommitsByBranchResponse) Reset() {
+ *x = ListRepositoryCommitsByBranchResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoryCommitsByBranchResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoryCommitsByBranchResponse) ProtoMessage() {}
+
+func (x *ListRepositoryCommitsByBranchResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 ListRepositoryCommitsByBranchResponse.ProtoReflect.Descriptor instead.
+func (*ListRepositoryCommitsByBranchResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ListRepositoryCommitsByBranchResponse) GetRepositoryCommits() []*RepositoryCommit {
+ if x != nil {
+ return x.RepositoryCommits
+ }
+ return nil
+}
+
+func (x *ListRepositoryCommitsByBranchResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListRepositoryCommitsByReferenceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the repository which the repository reference belongs to.
+ RepositoryOwner string `protobuf:"bytes,1,opt,name=repository_owner,json=repositoryOwner,proto3" json:"repository_owner,omitempty"`
+ // The name of the repository which the repository reference belongs to.
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The reference used to resolve repository commits. Can be a tag or commit.
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+ PageSize uint32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,6,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListRepositoryCommitsByReferenceRequest) Reset() {
+ *x = ListRepositoryCommitsByReferenceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoryCommitsByReferenceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoryCommitsByReferenceRequest) ProtoMessage() {}
+
+func (x *ListRepositoryCommitsByReferenceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 ListRepositoryCommitsByReferenceRequest.ProtoReflect.Descriptor instead.
+func (*ListRepositoryCommitsByReferenceRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ListRepositoryCommitsByReferenceRequest) GetRepositoryOwner() string {
+ if x != nil {
+ return x.RepositoryOwner
+ }
+ return ""
+}
+
+func (x *ListRepositoryCommitsByReferenceRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *ListRepositoryCommitsByReferenceRequest) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+func (x *ListRepositoryCommitsByReferenceRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListRepositoryCommitsByReferenceRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListRepositoryCommitsByReferenceRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListRepositoryCommitsByReferenceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RepositoryCommits []*RepositoryCommit `protobuf:"bytes,1,rep,name=repository_commits,json=repositoryCommits,proto3" json:"repository_commits,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListRepositoryCommitsByReferenceResponse) Reset() {
+ *x = ListRepositoryCommitsByReferenceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoryCommitsByReferenceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoryCommitsByReferenceResponse) ProtoMessage() {}
+
+func (x *ListRepositoryCommitsByReferenceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 ListRepositoryCommitsByReferenceResponse.ProtoReflect.Descriptor instead.
+func (*ListRepositoryCommitsByReferenceResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ListRepositoryCommitsByReferenceResponse) GetRepositoryCommits() []*RepositoryCommit {
+ if x != nil {
+ return x.RepositoryCommits
+ }
+ return nil
+}
+
+func (x *ListRepositoryCommitsByReferenceResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type GetRepositoryCommitByReferenceRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the repository which the reference belongs to.
+ RepositoryOwner string `protobuf:"bytes,1,opt,name=repository_owner,json=repositoryOwner,proto3" json:"repository_owner,omitempty"`
+ // The name of the repository which the reference belongs to.
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The reference that should be resolved to a commit. Can be a tag or commit.
+ Reference string `protobuf:"bytes,3,opt,name=reference,proto3" json:"reference,omitempty"`
+}
+
+func (x *GetRepositoryCommitByReferenceRequest) Reset() {
+ *x = GetRepositoryCommitByReferenceRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoryCommitByReferenceRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoryCommitByReferenceRequest) ProtoMessage() {}
+
+func (x *GetRepositoryCommitByReferenceRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 GetRepositoryCommitByReferenceRequest.ProtoReflect.Descriptor instead.
+func (*GetRepositoryCommitByReferenceRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *GetRepositoryCommitByReferenceRequest) GetRepositoryOwner() string {
+ if x != nil {
+ return x.RepositoryOwner
+ }
+ return ""
+}
+
+func (x *GetRepositoryCommitByReferenceRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *GetRepositoryCommitByReferenceRequest) GetReference() string {
+ if x != nil {
+ return x.Reference
+ }
+ return ""
+}
+
+type GetRepositoryCommitByReferenceResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RepositoryCommit *RepositoryCommit `protobuf:"bytes,1,opt,name=repository_commit,json=repositoryCommit,proto3" json:"repository_commit,omitempty"`
+}
+
+func (x *GetRepositoryCommitByReferenceResponse) Reset() {
+ *x = GetRepositoryCommitByReferenceResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoryCommitByReferenceResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoryCommitByReferenceResponse) ProtoMessage() {}
+
+func (x *GetRepositoryCommitByReferenceResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 GetRepositoryCommitByReferenceResponse.ProtoReflect.Descriptor instead.
+func (*GetRepositoryCommitByReferenceResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *GetRepositoryCommitByReferenceResponse) GetRepositoryCommit() *RepositoryCommit {
+ if x != nil {
+ return x.RepositoryCommit
+ }
+ return nil
+}
+
+type GetRepositoryCommitBySequenceIdRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the repository which the repository branch belongs to.
+ RepositoryOwner string `protobuf:"bytes,1,opt,name=repository_owner,json=repositoryOwner,proto3" json:"repository_owner,omitempty"`
+ // The name of the repository which the repository branch belongs to.
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The name of the repository branch which the sequence ID is relative to.
+ RepositoryBranchName string `protobuf:"bytes,3,opt,name=repository_branch_name,json=repositoryBranchName,proto3" json:"repository_branch_name,omitempty"`
+ // The sequence ID to look up.
+ CommitSequenceId int64 `protobuf:"varint,4,opt,name=commit_sequence_id,json=commitSequenceId,proto3" json:"commit_sequence_id,omitempty"`
+}
+
+func (x *GetRepositoryCommitBySequenceIdRequest) Reset() {
+ *x = GetRepositoryCommitBySequenceIdRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoryCommitBySequenceIdRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoryCommitBySequenceIdRequest) ProtoMessage() {}
+
+func (x *GetRepositoryCommitBySequenceIdRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 GetRepositoryCommitBySequenceIdRequest.ProtoReflect.Descriptor instead.
+func (*GetRepositoryCommitBySequenceIdRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *GetRepositoryCommitBySequenceIdRequest) GetRepositoryOwner() string {
+ if x != nil {
+ return x.RepositoryOwner
+ }
+ return ""
+}
+
+func (x *GetRepositoryCommitBySequenceIdRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *GetRepositoryCommitBySequenceIdRequest) GetRepositoryBranchName() string {
+ if x != nil {
+ return x.RepositoryBranchName
+ }
+ return ""
+}
+
+func (x *GetRepositoryCommitBySequenceIdRequest) GetCommitSequenceId() int64 {
+ if x != nil {
+ return x.CommitSequenceId
+ }
+ return 0
+}
+
+type GetRepositoryCommitBySequenceIdResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RepositoryCommit *RepositoryCommit `protobuf:"bytes,1,opt,name=repository_commit,json=repositoryCommit,proto3" json:"repository_commit,omitempty"`
+}
+
+func (x *GetRepositoryCommitBySequenceIdResponse) Reset() {
+ *x = GetRepositoryCommitBySequenceIdResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetRepositoryCommitBySequenceIdResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetRepositoryCommitBySequenceIdResponse) ProtoMessage() {}
+
+func (x *GetRepositoryCommitBySequenceIdResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 GetRepositoryCommitBySequenceIdResponse.ProtoReflect.Descriptor instead.
+func (*GetRepositoryCommitBySequenceIdResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *GetRepositoryCommitBySequenceIdResponse) GetRepositoryCommit() *RepositoryCommit {
+ if x != nil {
+ return x.RepositoryCommit
+ }
+ return nil
+}
+
+type ListRepositoryDraftCommitsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the repository which the repository branch belongs to.
+ RepositoryOwner string `protobuf:"bytes,1,opt,name=repository_owner,json=repositoryOwner,proto3" json:"repository_owner,omitempty"`
+ // The name of the repository which the repository branch belongs to.
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ PageSize uint32 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ PageToken string `protobuf:"bytes,4,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ // By default, draft commits are ordered by last update time descending.
+ // Reverse orders them ascending.
+ Reverse bool `protobuf:"varint,5,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListRepositoryDraftCommitsRequest) Reset() {
+ *x = ListRepositoryDraftCommitsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoryDraftCommitsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoryDraftCommitsRequest) ProtoMessage() {}
+
+func (x *ListRepositoryDraftCommitsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 ListRepositoryDraftCommitsRequest.ProtoReflect.Descriptor instead.
+func (*ListRepositoryDraftCommitsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *ListRepositoryDraftCommitsRequest) GetRepositoryOwner() string {
+ if x != nil {
+ return x.RepositoryOwner
+ }
+ return ""
+}
+
+func (x *ListRepositoryDraftCommitsRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *ListRepositoryDraftCommitsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListRepositoryDraftCommitsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListRepositoryDraftCommitsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListRepositoryDraftCommitsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Each commit will have draft_name set.
+ RepositoryCommits []*RepositoryCommit `protobuf:"bytes,1,rep,name=repository_commits,json=repositoryCommits,proto3" json:"repository_commits,omitempty"`
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListRepositoryDraftCommitsResponse) Reset() {
+ *x = ListRepositoryDraftCommitsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoryDraftCommitsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoryDraftCommitsResponse) ProtoMessage() {}
+
+func (x *ListRepositoryDraftCommitsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 ListRepositoryDraftCommitsResponse.ProtoReflect.Descriptor instead.
+func (*ListRepositoryDraftCommitsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *ListRepositoryDraftCommitsResponse) GetRepositoryCommits() []*RepositoryCommit {
+ if x != nil {
+ return x.RepositoryCommits
+ }
+ return nil
+}
+
+func (x *ListRepositoryDraftCommitsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type DeleteRepositoryDraftCommitRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the repository which the repository branch belongs to.
+ RepositoryOwner string `protobuf:"bytes,1,opt,name=repository_owner,json=repositoryOwner,proto3" json:"repository_owner,omitempty"`
+ // The name of the repository which the repository branch belongs to.
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The name of the draft to delete.
+ DraftName string `protobuf:"bytes,3,opt,name=draft_name,json=draftName,proto3" json:"draft_name,omitempty"`
+}
+
+func (x *DeleteRepositoryDraftCommitRequest) Reset() {
+ *x = DeleteRepositoryDraftCommitRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteRepositoryDraftCommitRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteRepositoryDraftCommitRequest) ProtoMessage() {}
+
+func (x *DeleteRepositoryDraftCommitRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 DeleteRepositoryDraftCommitRequest.ProtoReflect.Descriptor instead.
+func (*DeleteRepositoryDraftCommitRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *DeleteRepositoryDraftCommitRequest) GetRepositoryOwner() string {
+ if x != nil {
+ return x.RepositoryOwner
+ }
+ return ""
+}
+
+func (x *DeleteRepositoryDraftCommitRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *DeleteRepositoryDraftCommitRequest) GetDraftName() string {
+ if x != nil {
+ return x.DraftName
+ }
+ return ""
+}
+
+type DeleteRepositoryDraftCommitResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteRepositoryDraftCommitResponse) Reset() {
+ *x = DeleteRepositoryDraftCommitResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteRepositoryDraftCommitResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteRepositoryDraftCommitResponse) ProtoMessage() {}
+
+func (x *DeleteRepositoryDraftCommitResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_commit_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 DeleteRepositoryDraftCommitResponse.ProtoReflect.Descriptor instead.
+func (*DeleteRepositoryDraftCommitResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP(), []int{12}
+}
+
+var File_buf_alpha_registry_v1alpha1_repository_commit_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDesc = []byte{
+ 0x0a, 0x33, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x1a, 0x30, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xf4, 0x02, 0x0a, 0x10, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73,
+ 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x05, 0x20,
+ 0x01, 0x28, 0x09, 0x42, 0x02, 0x18, 0x01, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12,
+ 0x2c, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73, 0x65, 0x71, 0x75, 0x65, 0x6e,
+ 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x10, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x69, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x12, 0x16, 0x0a,
+ 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61,
+ 0x75, 0x74, 0x68, 0x6f, 0x72, 0x12, 0x3e, 0x0a, 0x04, 0x74, 0x61, 0x67, 0x73, 0x18, 0x08, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x52,
+ 0x04, 0x74, 0x61, 0x67, 0x73, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x72, 0x61, 0x66, 0x74,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x73, 0x70, 0x64, 0x78, 0x5f, 0x6c, 0x69, 0x63,
+ 0x65, 0x6e, 0x73, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x73,
+ 0x70, 0x64, 0x78, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x49, 0x64, 0x22, 0x86, 0x02, 0x0a,
+ 0x24, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43,
+ 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72,
+ 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34, 0x0a, 0x16, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x61, 0x6d, 0x65, 0x12,
+ 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01,
+ 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72,
+ 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65,
+ 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0xad, 0x01, 0x0a, 0x25, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x42,
+ 0x79, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x5c, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x26, 0x0a,
+ 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xf1, 0x01, 0x0a, 0x27, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x42,
+ 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f,
+ 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e,
+ 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65,
+ 0x6e, 0x63, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65,
+ 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
+ 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0xb0, 0x01, 0x0a, 0x28, 0x4c, 0x69,
+ 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d,
+ 0x69, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
+ 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69,
+ 0x74, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d,
+ 0x6d, 0x69, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e,
+ 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x99, 0x01, 0x0a,
+ 0x25, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f,
+ 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65,
+ 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x72, 0x65,
+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x72,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x22, 0x84, 0x01, 0x0a, 0x26, 0x47, 0x65, 0x74,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
+ 0x42, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x5a, 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x10, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22,
+ 0xe0, 0x01, 0x0a, 0x26, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63,
+ 0x65, 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x34,
+ 0x0a, 0x16, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x62, 0x72, 0x61,
+ 0x6e, 0x63, 0x68, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x14,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x2c, 0x0a, 0x12, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x73,
+ 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03,
+ 0x52, 0x10, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65,
+ 0x49, 0x64, 0x22, 0x85, 0x01, 0x0a, 0x27, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x53, 0x65, 0x71, 0x75,
+ 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5a,
+ 0x0a, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d,
+ 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x22, 0xcd, 0x01, 0x0a, 0x21, 0x4c,
+ 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x72, 0x61,
+ 0x66, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6f,
+ 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a,
+ 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a,
+ 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e,
+ 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
+ 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0xaa, 0x01, 0x0a, 0x22, 0x4c,
+ 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x72, 0x61,
+ 0x66, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x5c, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x11, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12,
+ 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61,
+ 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x97, 0x01, 0x0a, 0x22, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x72, 0x61, 0x66,
+ 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29,
+ 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61,
+ 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x64, 0x72, 0x61, 0x66, 0x74, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x64, 0x72, 0x61, 0x66, 0x74, 0x4e, 0x61, 0x6d,
+ 0x65, 0x22, 0x25, 0x0a, 0x23, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x72, 0x61, 0x66, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x97, 0x08, 0x0a, 0x17, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0xab, 0x01, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79,
+ 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x41, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, 0x42, 0x72, 0x61, 0x6e,
+ 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, 0x42,
+ 0x72, 0x61, 0x6e, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x03, 0x88,
+ 0x02, 0x01, 0x12, 0xaf, 0x01, 0x0a, 0x20, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65,
+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x44, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x42, 0x79, 0x52, 0x65, 0x66,
+ 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x45, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
+ 0x73, 0x42, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0xa9, 0x01, 0x0a, 0x1e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x52, 0x65,
+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x42, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x52, 0x65, 0x66, 0x65, 0x72,
+ 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x43, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x52,
+ 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0xac, 0x01, 0x0a, 0x1f, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e,
+ 0x63, 0x65, 0x49, 0x64, 0x12, 0x43, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x53, 0x65, 0x71, 0x75, 0x65, 0x6e, 0x63, 0x65,
+ 0x49, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x44, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x42, 0x79, 0x53, 0x65, 0x71,
+ 0x75, 0x65, 0x6e, 0x63, 0x65, 0x49, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x9d, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x44, 0x72, 0x61, 0x66, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x3e,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x72, 0x61, 0x66, 0x74,
+ 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3f,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x72, 0x61, 0x66, 0x74,
+ 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0xa0, 0x01, 0x0a, 0x1b, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x44, 0x72, 0x61, 0x66, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12,
+ 0x3f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44, 0x72,
+ 0x61, 0x66, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x40, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44,
+ 0x65, 0x6c, 0x65, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x44,
+ 0x72, 0x61, 0x66, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x42, 0xa2, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x15, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a,
+ 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62,
+ 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65,
+ 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75,
+ 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52,
+ 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02,
+ 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42,
+ 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescData = file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes = make([]protoimpl.MessageInfo, 13)
+var file_buf_alpha_registry_v1alpha1_repository_commit_proto_goTypes = []interface{}{
+ (*RepositoryCommit)(nil), // 0: buf.alpha.registry.v1alpha1.RepositoryCommit
+ (*ListRepositoryCommitsByBranchRequest)(nil), // 1: buf.alpha.registry.v1alpha1.ListRepositoryCommitsByBranchRequest
+ (*ListRepositoryCommitsByBranchResponse)(nil), // 2: buf.alpha.registry.v1alpha1.ListRepositoryCommitsByBranchResponse
+ (*ListRepositoryCommitsByReferenceRequest)(nil), // 3: buf.alpha.registry.v1alpha1.ListRepositoryCommitsByReferenceRequest
+ (*ListRepositoryCommitsByReferenceResponse)(nil), // 4: buf.alpha.registry.v1alpha1.ListRepositoryCommitsByReferenceResponse
+ (*GetRepositoryCommitByReferenceRequest)(nil), // 5: buf.alpha.registry.v1alpha1.GetRepositoryCommitByReferenceRequest
+ (*GetRepositoryCommitByReferenceResponse)(nil), // 6: buf.alpha.registry.v1alpha1.GetRepositoryCommitByReferenceResponse
+ (*GetRepositoryCommitBySequenceIdRequest)(nil), // 7: buf.alpha.registry.v1alpha1.GetRepositoryCommitBySequenceIdRequest
+ (*GetRepositoryCommitBySequenceIdResponse)(nil), // 8: buf.alpha.registry.v1alpha1.GetRepositoryCommitBySequenceIdResponse
+ (*ListRepositoryDraftCommitsRequest)(nil), // 9: buf.alpha.registry.v1alpha1.ListRepositoryDraftCommitsRequest
+ (*ListRepositoryDraftCommitsResponse)(nil), // 10: buf.alpha.registry.v1alpha1.ListRepositoryDraftCommitsResponse
+ (*DeleteRepositoryDraftCommitRequest)(nil), // 11: buf.alpha.registry.v1alpha1.DeleteRepositoryDraftCommitRequest
+ (*DeleteRepositoryDraftCommitResponse)(nil), // 12: buf.alpha.registry.v1alpha1.DeleteRepositoryDraftCommitResponse
+ (*timestamppb.Timestamp)(nil), // 13: google.protobuf.Timestamp
+ (*RepositoryTag)(nil), // 14: buf.alpha.registry.v1alpha1.RepositoryTag
+}
+var file_buf_alpha_registry_v1alpha1_repository_commit_proto_depIdxs = []int32{
+ 13, // 0: buf.alpha.registry.v1alpha1.RepositoryCommit.create_time:type_name -> google.protobuf.Timestamp
+ 14, // 1: buf.alpha.registry.v1alpha1.RepositoryCommit.tags:type_name -> buf.alpha.registry.v1alpha1.RepositoryTag
+ 0, // 2: buf.alpha.registry.v1alpha1.ListRepositoryCommitsByBranchResponse.repository_commits:type_name -> buf.alpha.registry.v1alpha1.RepositoryCommit
+ 0, // 3: buf.alpha.registry.v1alpha1.ListRepositoryCommitsByReferenceResponse.repository_commits:type_name -> buf.alpha.registry.v1alpha1.RepositoryCommit
+ 0, // 4: buf.alpha.registry.v1alpha1.GetRepositoryCommitByReferenceResponse.repository_commit:type_name -> buf.alpha.registry.v1alpha1.RepositoryCommit
+ 0, // 5: buf.alpha.registry.v1alpha1.GetRepositoryCommitBySequenceIdResponse.repository_commit:type_name -> buf.alpha.registry.v1alpha1.RepositoryCommit
+ 0, // 6: buf.alpha.registry.v1alpha1.ListRepositoryDraftCommitsResponse.repository_commits:type_name -> buf.alpha.registry.v1alpha1.RepositoryCommit
+ 1, // 7: buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryCommitsByBranch:input_type -> buf.alpha.registry.v1alpha1.ListRepositoryCommitsByBranchRequest
+ 3, // 8: buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryCommitsByReference:input_type -> buf.alpha.registry.v1alpha1.ListRepositoryCommitsByReferenceRequest
+ 5, // 9: buf.alpha.registry.v1alpha1.RepositoryCommitService.GetRepositoryCommitByReference:input_type -> buf.alpha.registry.v1alpha1.GetRepositoryCommitByReferenceRequest
+ 7, // 10: buf.alpha.registry.v1alpha1.RepositoryCommitService.GetRepositoryCommitBySequenceId:input_type -> buf.alpha.registry.v1alpha1.GetRepositoryCommitBySequenceIdRequest
+ 9, // 11: buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryDraftCommits:input_type -> buf.alpha.registry.v1alpha1.ListRepositoryDraftCommitsRequest
+ 11, // 12: buf.alpha.registry.v1alpha1.RepositoryCommitService.DeleteRepositoryDraftCommit:input_type -> buf.alpha.registry.v1alpha1.DeleteRepositoryDraftCommitRequest
+ 2, // 13: buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryCommitsByBranch:output_type -> buf.alpha.registry.v1alpha1.ListRepositoryCommitsByBranchResponse
+ 4, // 14: buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryCommitsByReference:output_type -> buf.alpha.registry.v1alpha1.ListRepositoryCommitsByReferenceResponse
+ 6, // 15: buf.alpha.registry.v1alpha1.RepositoryCommitService.GetRepositoryCommitByReference:output_type -> buf.alpha.registry.v1alpha1.GetRepositoryCommitByReferenceResponse
+ 8, // 16: buf.alpha.registry.v1alpha1.RepositoryCommitService.GetRepositoryCommitBySequenceId:output_type -> buf.alpha.registry.v1alpha1.GetRepositoryCommitBySequenceIdResponse
+ 10, // 17: buf.alpha.registry.v1alpha1.RepositoryCommitService.ListRepositoryDraftCommits:output_type -> buf.alpha.registry.v1alpha1.ListRepositoryDraftCommitsResponse
+ 12, // 18: buf.alpha.registry.v1alpha1.RepositoryCommitService.DeleteRepositoryDraftCommit:output_type -> buf.alpha.registry.v1alpha1.DeleteRepositoryDraftCommitResponse
+ 13, // [13:19] is the sub-list for method output_type
+ 7, // [7:13] is the sub-list for method input_type
+ 7, // [7:7] is the sub-list for extension type_name
+ 7, // [7:7] is the sub-list for extension extendee
+ 0, // [0:7] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_repository_commit_proto_init() }
+func file_buf_alpha_registry_v1alpha1_repository_commit_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_repository_commit_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RepositoryCommit); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoryCommitsByBranchRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoryCommitsByBranchResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoryCommitsByReferenceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoryCommitsByReferenceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoryCommitByReferenceRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoryCommitByReferenceResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoryCommitBySequenceIdRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetRepositoryCommitBySequenceIdResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoryDraftCommitsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoryDraftCommitsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteRepositoryDraftCommitRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteRepositoryDraftCommitResponse); 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_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 13,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_repository_commit_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_repository_commit_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_repository_commit_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_repository_commit_proto = out.File
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go
new file mode 100644
index 000000000..cc1b399a3
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/repository_tag.pb.go
@@ -0,0 +1,582 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/repository_tag.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type RepositoryTag struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // primary key, unique, immutable
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // immutable
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // We reserve field number '3' for the update_time.
+ // google.protobuf.Timestamp update_time = 3;
+ // The name of the repository tag, e.g. "6e2e7f24718a76caa32a80d0e2b1841ef2c61403".
+ Name string `protobuf:"bytes,4,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the commit this tag belongs to.
+ CommitName string `protobuf:"bytes,5,opt,name=commit_name,json=commitName,proto3" json:"commit_name,omitempty"`
+ // The username of the author of the tag.
+ Author string `protobuf:"bytes,6,opt,name=author,proto3" json:"author,omitempty"`
+}
+
+func (x *RepositoryTag) Reset() {
+ *x = RepositoryTag{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RepositoryTag) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepositoryTag) ProtoMessage() {}
+
+func (x *RepositoryTag) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_tag_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 RepositoryTag.ProtoReflect.Descriptor instead.
+func (*RepositoryTag) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *RepositoryTag) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *RepositoryTag) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *RepositoryTag) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *RepositoryTag) GetCommitName() string {
+ if x != nil {
+ return x.CommitName
+ }
+ return ""
+}
+
+func (x *RepositoryTag) GetAuthor() string {
+ if x != nil {
+ return x.Author
+ }
+ return ""
+}
+
+type CreateRepositoryTagRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository this tag should be created on.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+ // The name of the repository tag, e.g. "6e2e7f24718a76caa32a80d0e2b1841ef2c61403".
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the commit this tag should be created for.
+ CommitName string `protobuf:"bytes,3,opt,name=commit_name,json=commitName,proto3" json:"commit_name,omitempty"`
+}
+
+func (x *CreateRepositoryTagRequest) Reset() {
+ *x = CreateRepositoryTagRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateRepositoryTagRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateRepositoryTagRequest) ProtoMessage() {}
+
+func (x *CreateRepositoryTagRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_tag_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 CreateRepositoryTagRequest.ProtoReflect.Descriptor instead.
+func (*CreateRepositoryTagRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CreateRepositoryTagRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+func (x *CreateRepositoryTagRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CreateRepositoryTagRequest) GetCommitName() string {
+ if x != nil {
+ return x.CommitName
+ }
+ return ""
+}
+
+type CreateRepositoryTagResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RepositoryTag *RepositoryTag `protobuf:"bytes,1,opt,name=repository_tag,json=repositoryTag,proto3" json:"repository_tag,omitempty"`
+}
+
+func (x *CreateRepositoryTagResponse) Reset() {
+ *x = CreateRepositoryTagResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateRepositoryTagResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateRepositoryTagResponse) ProtoMessage() {}
+
+func (x *CreateRepositoryTagResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_tag_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 CreateRepositoryTagResponse.ProtoReflect.Descriptor instead.
+func (*CreateRepositoryTagResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *CreateRepositoryTagResponse) GetRepositoryTag() *RepositoryTag {
+ if x != nil {
+ return x.RepositoryTag
+ }
+ return nil
+}
+
+type ListRepositoryTagsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the repository whose tags should be listed.
+ RepositoryId string `protobuf:"bytes,1,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListRepositoryTagsRequest) Reset() {
+ *x = ListRepositoryTagsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoryTagsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoryTagsRequest) ProtoMessage() {}
+
+func (x *ListRepositoryTagsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_tag_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 ListRepositoryTagsRequest.ProtoReflect.Descriptor instead.
+func (*ListRepositoryTagsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *ListRepositoryTagsRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+func (x *ListRepositoryTagsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListRepositoryTagsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListRepositoryTagsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListRepositoryTagsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RepositoryTags []*RepositoryTag `protobuf:"bytes,1,rep,name=repository_tags,json=repositoryTags,proto3" json:"repository_tags,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListRepositoryTagsResponse) Reset() {
+ *x = ListRepositoryTagsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListRepositoryTagsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListRepositoryTagsResponse) ProtoMessage() {}
+
+func (x *ListRepositoryTagsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_repository_tag_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 ListRepositoryTagsResponse.ProtoReflect.Descriptor instead.
+func (*ListRepositoryTagsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ListRepositoryTagsResponse) GetRepositoryTags() []*RepositoryTag {
+ if x != nil {
+ return x.RepositoryTags
+ }
+ return nil
+}
+
+func (x *ListRepositoryTagsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+var File_buf_alpha_registry_v1alpha1_repository_tag_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDesc = []byte{
+ 0x0a, 0x30, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a,
+ 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0xa9, 0x01, 0x0a, 0x0d, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54,
+ 0x61, 0x67, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
+ 0x69, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74,
+ 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x18, 0x06,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x22, 0x76, 0x0a, 0x1a,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x5f, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74,
+ 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x70, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x51, 0x0a, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x5f, 0x74, 0x61, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x52, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x22, 0x96, 0x01, 0x0a, 0x19, 0x4c, 0x69, 0x73, 0x74, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61,
+ 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65,
+ 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22,
+ 0x99, 0x01, 0x0a, 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53,
+ 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x67,
+ 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x54, 0x61, 0x67, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54,
+ 0x61, 0x67, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65,
+ 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65,
+ 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x32, 0xa9, 0x02, 0x0a, 0x14,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x53, 0x65, 0x72,
+ 0x76, 0x69, 0x63, 0x65, 0x12, 0x88, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x12, 0x37, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74,
+ 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x85, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x12, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x9f, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x52, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
+ 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75,
+ 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61,
+ 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f,
+ 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42,
+ 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02,
+ 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a,
+ 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a,
+ 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescData = file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_buf_alpha_registry_v1alpha1_repository_tag_proto_goTypes = []interface{}{
+ (*RepositoryTag)(nil), // 0: buf.alpha.registry.v1alpha1.RepositoryTag
+ (*CreateRepositoryTagRequest)(nil), // 1: buf.alpha.registry.v1alpha1.CreateRepositoryTagRequest
+ (*CreateRepositoryTagResponse)(nil), // 2: buf.alpha.registry.v1alpha1.CreateRepositoryTagResponse
+ (*ListRepositoryTagsRequest)(nil), // 3: buf.alpha.registry.v1alpha1.ListRepositoryTagsRequest
+ (*ListRepositoryTagsResponse)(nil), // 4: buf.alpha.registry.v1alpha1.ListRepositoryTagsResponse
+ (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp
+}
+var file_buf_alpha_registry_v1alpha1_repository_tag_proto_depIdxs = []int32{
+ 5, // 0: buf.alpha.registry.v1alpha1.RepositoryTag.create_time:type_name -> google.protobuf.Timestamp
+ 0, // 1: buf.alpha.registry.v1alpha1.CreateRepositoryTagResponse.repository_tag:type_name -> buf.alpha.registry.v1alpha1.RepositoryTag
+ 0, // 2: buf.alpha.registry.v1alpha1.ListRepositoryTagsResponse.repository_tags:type_name -> buf.alpha.registry.v1alpha1.RepositoryTag
+ 1, // 3: buf.alpha.registry.v1alpha1.RepositoryTagService.CreateRepositoryTag:input_type -> buf.alpha.registry.v1alpha1.CreateRepositoryTagRequest
+ 3, // 4: buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTags:input_type -> buf.alpha.registry.v1alpha1.ListRepositoryTagsRequest
+ 2, // 5: buf.alpha.registry.v1alpha1.RepositoryTagService.CreateRepositoryTag:output_type -> buf.alpha.registry.v1alpha1.CreateRepositoryTagResponse
+ 4, // 6: buf.alpha.registry.v1alpha1.RepositoryTagService.ListRepositoryTags:output_type -> buf.alpha.registry.v1alpha1.ListRepositoryTagsResponse
+ 5, // [5:7] is the sub-list for method output_type
+ 3, // [3:5] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_repository_tag_proto_init() }
+func file_buf_alpha_registry_v1alpha1_repository_tag_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_repository_tag_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RepositoryTag); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateRepositoryTagRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateRepositoryTagResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoryTagsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListRepositoryTagsResponse); 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_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_repository_tag_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_repository_tag_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_repository_tag_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_repository_tag_proto = out.File
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/resolve.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/resolve.pb.go
new file mode 100644
index 000000000..e3bf01a0f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/resolve.pb.go
@@ -0,0 +1,633 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/resolve.proto
+
+package registryv1alpha1
+
+import (
+ v1alpha1 "github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/module/v1alpha1"
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type ResolvedReferenceType int32
+
+const (
+ ResolvedReferenceType_RESOLVED_REFERENCE_TYPE_UNSPECIFIED ResolvedReferenceType = 0
+ ResolvedReferenceType_RESOLVED_REFERENCE_TYPE_COMMIT ResolvedReferenceType = 1
+ ResolvedReferenceType_RESOLVED_REFERENCE_TYPE_TAG ResolvedReferenceType = 3
+ ResolvedReferenceType_RESOLVED_REFERENCE_TYPE_DRAFT ResolvedReferenceType = 5
+)
+
+// Enum value maps for ResolvedReferenceType.
+var (
+ ResolvedReferenceType_name = map[int32]string{
+ 0: "RESOLVED_REFERENCE_TYPE_UNSPECIFIED",
+ 1: "RESOLVED_REFERENCE_TYPE_COMMIT",
+ 3: "RESOLVED_REFERENCE_TYPE_TAG",
+ 5: "RESOLVED_REFERENCE_TYPE_DRAFT",
+ }
+ ResolvedReferenceType_value = map[string]int32{
+ "RESOLVED_REFERENCE_TYPE_UNSPECIFIED": 0,
+ "RESOLVED_REFERENCE_TYPE_COMMIT": 1,
+ "RESOLVED_REFERENCE_TYPE_TAG": 3,
+ "RESOLVED_REFERENCE_TYPE_DRAFT": 5,
+ }
+)
+
+func (x ResolvedReferenceType) Enum() *ResolvedReferenceType {
+ p := new(ResolvedReferenceType)
+ *p = x
+ return p
+}
+
+func (x ResolvedReferenceType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ResolvedReferenceType) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_resolve_proto_enumTypes[0].Descriptor()
+}
+
+func (ResolvedReferenceType) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_resolve_proto_enumTypes[0]
+}
+
+func (x ResolvedReferenceType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ResolvedReferenceType.Descriptor instead.
+func (ResolvedReferenceType) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescGZIP(), []int{0}
+}
+
+type GetModulePinsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ModuleReferences []*v1alpha1.ModuleReference `protobuf:"bytes,1,rep,name=module_references,json=moduleReferences,proto3" json:"module_references,omitempty"`
+ // current_module_pins allows for partial dependency updates by letting clients
+ // send a request with the pins for their current module and only the
+ // identities of the dependencies they want to update in module_references.
+ //
+ // When resolving, if a client supplied module pin is:
+ // - in the transitive closure of pins resolved from the module_references,
+ // the client supplied module pin will be an extra candidate for tie
+ // breaking.
+ // - NOT in the in the transitive closure of pins resolved from the
+ // module_references, it will be returned as is.
+ CurrentModulePins []*v1alpha1.ModulePin `protobuf:"bytes,2,rep,name=current_module_pins,json=currentModulePins,proto3" json:"current_module_pins,omitempty"`
+}
+
+func (x *GetModulePinsRequest) Reset() {
+ *x = GetModulePinsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetModulePinsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetModulePinsRequest) ProtoMessage() {}
+
+func (x *GetModulePinsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_resolve_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 GetModulePinsRequest.ProtoReflect.Descriptor instead.
+func (*GetModulePinsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GetModulePinsRequest) GetModuleReferences() []*v1alpha1.ModuleReference {
+ if x != nil {
+ return x.ModuleReferences
+ }
+ return nil
+}
+
+func (x *GetModulePinsRequest) GetCurrentModulePins() []*v1alpha1.ModulePin {
+ if x != nil {
+ return x.CurrentModulePins
+ }
+ return nil
+}
+
+type GetModulePinsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ ModulePins []*v1alpha1.ModulePin `protobuf:"bytes,1,rep,name=module_pins,json=modulePins,proto3" json:"module_pins,omitempty"`
+}
+
+func (x *GetModulePinsResponse) Reset() {
+ *x = GetModulePinsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetModulePinsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetModulePinsResponse) ProtoMessage() {}
+
+func (x *GetModulePinsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_resolve_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 GetModulePinsResponse.ProtoReflect.Descriptor instead.
+func (*GetModulePinsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetModulePinsResponse) GetModulePins() []*v1alpha1.ModulePin {
+ if x != nil {
+ return x.ModulePins
+ }
+ return nil
+}
+
+type GetLocalModulePinsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ LocalModuleReferences []*LocalModuleReference `protobuf:"bytes,1,rep,name=local_module_references,json=localModuleReferences,proto3" json:"local_module_references,omitempty"`
+}
+
+func (x *GetLocalModulePinsRequest) Reset() {
+ *x = GetLocalModulePinsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetLocalModulePinsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetLocalModulePinsRequest) ProtoMessage() {}
+
+func (x *GetLocalModulePinsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_resolve_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 GetLocalModulePinsRequest.ProtoReflect.Descriptor instead.
+func (*GetLocalModulePinsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *GetLocalModulePinsRequest) GetLocalModuleReferences() []*LocalModuleReference {
+ if x != nil {
+ return x.LocalModuleReferences
+ }
+ return nil
+}
+
+type LocalModuleResolveResult struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // A copy of the reference that was resolved.
+ Reference *LocalModuleReference `protobuf:"bytes,1,opt,name=reference,proto3" json:"reference,omitempty"`
+ // The pin the reference resolved to.
+ Pin *LocalModulePin `protobuf:"bytes,2,opt,name=pin,proto3" json:"pin,omitempty"`
+ // The type the reference resolved as.
+ ResolvedReferenceType ResolvedReferenceType `protobuf:"varint,3,opt,name=resolved_reference_type,json=resolvedReferenceType,proto3,enum=buf.alpha.registry.v1alpha1.ResolvedReferenceType" json:"resolved_reference_type,omitempty"`
+}
+
+func (x *LocalModuleResolveResult) Reset() {
+ *x = LocalModuleResolveResult{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *LocalModuleResolveResult) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*LocalModuleResolveResult) ProtoMessage() {}
+
+func (x *LocalModuleResolveResult) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_resolve_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 LocalModuleResolveResult.ProtoReflect.Descriptor instead.
+func (*LocalModuleResolveResult) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *LocalModuleResolveResult) GetReference() *LocalModuleReference {
+ if x != nil {
+ return x.Reference
+ }
+ return nil
+}
+
+func (x *LocalModuleResolveResult) GetPin() *LocalModulePin {
+ if x != nil {
+ return x.Pin
+ }
+ return nil
+}
+
+func (x *LocalModuleResolveResult) GetResolvedReferenceType() ResolvedReferenceType {
+ if x != nil {
+ return x.ResolvedReferenceType
+ }
+ return ResolvedReferenceType_RESOLVED_REFERENCE_TYPE_UNSPECIFIED
+}
+
+type GetLocalModulePinsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ LocalModuleResolveResults []*LocalModuleResolveResult `protobuf:"bytes,1,rep,name=local_module_resolve_results,json=localModuleResolveResults,proto3" json:"local_module_resolve_results,omitempty"`
+ // dependencies are the dependencies of the LocalModulePins.
+ //
+ // This includes the transitive deps.
+ Dependencies []*v1alpha1.ModulePin `protobuf:"bytes,2,rep,name=dependencies,proto3" json:"dependencies,omitempty"`
+}
+
+func (x *GetLocalModulePinsResponse) Reset() {
+ *x = GetLocalModulePinsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetLocalModulePinsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetLocalModulePinsResponse) ProtoMessage() {}
+
+func (x *GetLocalModulePinsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_resolve_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 GetLocalModulePinsResponse.ProtoReflect.Descriptor instead.
+func (*GetLocalModulePinsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *GetLocalModulePinsResponse) GetLocalModuleResolveResults() []*LocalModuleResolveResult {
+ if x != nil {
+ return x.LocalModuleResolveResults
+ }
+ return nil
+}
+
+func (x *GetLocalModulePinsResponse) GetDependencies() []*v1alpha1.ModulePin {
+ if x != nil {
+ return x.Dependencies
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_resolve_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_resolve_proto_rawDesc = []byte{
+ 0x0a, 0x29, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65,
+ 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x1a, 0x28, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x6d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x14, 0x47,
+ 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x57, 0x0a, 0x11, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x72, 0x65,
+ 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x10, 0x6d, 0x6f, 0x64, 0x75,
+ 0x6c, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x12, 0x54, 0x0a, 0x13,
+ 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x70,
+ 0x69, 0x6e, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x52,
+ 0x11, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69,
+ 0x6e, 0x73, 0x22, 0x5e, 0x0a, 0x15, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50,
+ 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0b, 0x6d,
+ 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x5f, 0x70, 0x69, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x24, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x6d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x52, 0x0a, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69,
+ 0x6e, 0x73, 0x22, 0x86, 0x01, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d,
+ 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x69, 0x0a, 0x17, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
+ 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72,
+ 0x65, 0x6e, 0x63, 0x65, 0x52, 0x15, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x73, 0x22, 0x96, 0x02, 0x0a, 0x18,
+ 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c,
+ 0x76, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x4f, 0x0a, 0x09, 0x72, 0x65, 0x66, 0x65,
+ 0x72, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d,
+ 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x52, 0x09,
+ 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x03, 0x70, 0x69, 0x6e,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65,
+ 0x50, 0x69, 0x6e, 0x52, 0x03, 0x70, 0x69, 0x6e, 0x12, 0x6a, 0x0a, 0x17, 0x72, 0x65, 0x73, 0x6f,
+ 0x6c, 0x76, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64,
+ 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x15, 0x72,
+ 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65,
+ 0x54, 0x79, 0x70, 0x65, 0x22, 0xde, 0x01, 0x0a, 0x1a, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61,
+ 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x76, 0x0a, 0x1c, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x5f, 0x6d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x5f, 0x72, 0x65, 0x73, 0x75,
+ 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64,
+ 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
+ 0x52, 0x19, 0x6c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x52, 0x65, 0x73,
+ 0x6f, 0x6c, 0x76, 0x65, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x48, 0x0a, 0x0c, 0x64,
+ 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65, 0x6e, 0x63, 0x69, 0x65, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28,
+ 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x6d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4d, 0x6f,
+ 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x52, 0x0c, 0x64, 0x65, 0x70, 0x65, 0x6e, 0x64, 0x65,
+ 0x6e, 0x63, 0x69, 0x65, 0x73, 0x2a, 0xf3, 0x01, 0x0a, 0x15, 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76,
+ 0x65, 0x64, 0x52, 0x65, 0x66, 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12,
+ 0x27, 0x0a, 0x23, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45,
+ 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45,
+ 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x22, 0x0a, 0x1e, 0x52, 0x45, 0x53, 0x4f,
+ 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45, 0x5f, 0x54,
+ 0x59, 0x50, 0x45, 0x5f, 0x43, 0x4f, 0x4d, 0x4d, 0x49, 0x54, 0x10, 0x01, 0x12, 0x1f, 0x0a, 0x1b,
+ 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e,
+ 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x41, 0x47, 0x10, 0x03, 0x12, 0x21, 0x0a,
+ 0x1d, 0x52, 0x45, 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45,
+ 0x4e, 0x43, 0x45, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x44, 0x52, 0x41, 0x46, 0x54, 0x10, 0x05,
+ 0x22, 0x04, 0x08, 0x02, 0x10, 0x02, 0x22, 0x04, 0x08, 0x04, 0x10, 0x04, 0x2a, 0x1e, 0x52, 0x45,
+ 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45,
+ 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x2a, 0x1d, 0x52, 0x45,
+ 0x53, 0x4f, 0x4c, 0x56, 0x45, 0x44, 0x5f, 0x52, 0x45, 0x46, 0x45, 0x52, 0x45, 0x4e, 0x43, 0x45,
+ 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x54, 0x52, 0x41, 0x43, 0x4b, 0x32, 0x88, 0x01, 0x0a, 0x0e,
+ 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x76,
+ 0x0a, 0x0d, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x73, 0x12,
+ 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65,
+ 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x47, 0x65, 0x74, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32, 0x9d, 0x01, 0x0a, 0x13, 0x4c, 0x6f, 0x63, 0x61, 0x6c,
+ 0x52, 0x65, 0x73, 0x6f, 0x6c, 0x76, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x85,
+ 0x01, 0x0a, 0x12, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c,
+ 0x65, 0x50, 0x69, 0x6e, 0x73, 0x12, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75,
+ 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x4c,
+ 0x6f, 0x63, 0x61, 0x6c, 0x4d, 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x50, 0x69, 0x6e, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x99, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0c, 0x52, 0x65, 0x73, 0x6f,
+ 0x6c, 0x76, 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68,
+ 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f,
+ 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75,
+ 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c,
+ 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74,
+ 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a,
+ 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescData = file_buf_alpha_registry_v1alpha1_resolve_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_resolve_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_resolve_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_buf_alpha_registry_v1alpha1_resolve_proto_goTypes = []interface{}{
+ (ResolvedReferenceType)(0), // 0: buf.alpha.registry.v1alpha1.ResolvedReferenceType
+ (*GetModulePinsRequest)(nil), // 1: buf.alpha.registry.v1alpha1.GetModulePinsRequest
+ (*GetModulePinsResponse)(nil), // 2: buf.alpha.registry.v1alpha1.GetModulePinsResponse
+ (*GetLocalModulePinsRequest)(nil), // 3: buf.alpha.registry.v1alpha1.GetLocalModulePinsRequest
+ (*LocalModuleResolveResult)(nil), // 4: buf.alpha.registry.v1alpha1.LocalModuleResolveResult
+ (*GetLocalModulePinsResponse)(nil), // 5: buf.alpha.registry.v1alpha1.GetLocalModulePinsResponse
+ (*v1alpha1.ModuleReference)(nil), // 6: buf.alpha.module.v1alpha1.ModuleReference
+ (*v1alpha1.ModulePin)(nil), // 7: buf.alpha.module.v1alpha1.ModulePin
+ (*LocalModuleReference)(nil), // 8: buf.alpha.registry.v1alpha1.LocalModuleReference
+ (*LocalModulePin)(nil), // 9: buf.alpha.registry.v1alpha1.LocalModulePin
+}
+var file_buf_alpha_registry_v1alpha1_resolve_proto_depIdxs = []int32{
+ 6, // 0: buf.alpha.registry.v1alpha1.GetModulePinsRequest.module_references:type_name -> buf.alpha.module.v1alpha1.ModuleReference
+ 7, // 1: buf.alpha.registry.v1alpha1.GetModulePinsRequest.current_module_pins:type_name -> buf.alpha.module.v1alpha1.ModulePin
+ 7, // 2: buf.alpha.registry.v1alpha1.GetModulePinsResponse.module_pins:type_name -> buf.alpha.module.v1alpha1.ModulePin
+ 8, // 3: buf.alpha.registry.v1alpha1.GetLocalModulePinsRequest.local_module_references:type_name -> buf.alpha.registry.v1alpha1.LocalModuleReference
+ 8, // 4: buf.alpha.registry.v1alpha1.LocalModuleResolveResult.reference:type_name -> buf.alpha.registry.v1alpha1.LocalModuleReference
+ 9, // 5: buf.alpha.registry.v1alpha1.LocalModuleResolveResult.pin:type_name -> buf.alpha.registry.v1alpha1.LocalModulePin
+ 0, // 6: buf.alpha.registry.v1alpha1.LocalModuleResolveResult.resolved_reference_type:type_name -> buf.alpha.registry.v1alpha1.ResolvedReferenceType
+ 4, // 7: buf.alpha.registry.v1alpha1.GetLocalModulePinsResponse.local_module_resolve_results:type_name -> buf.alpha.registry.v1alpha1.LocalModuleResolveResult
+ 7, // 8: buf.alpha.registry.v1alpha1.GetLocalModulePinsResponse.dependencies:type_name -> buf.alpha.module.v1alpha1.ModulePin
+ 1, // 9: buf.alpha.registry.v1alpha1.ResolveService.GetModulePins:input_type -> buf.alpha.registry.v1alpha1.GetModulePinsRequest
+ 3, // 10: buf.alpha.registry.v1alpha1.LocalResolveService.GetLocalModulePins:input_type -> buf.alpha.registry.v1alpha1.GetLocalModulePinsRequest
+ 2, // 11: buf.alpha.registry.v1alpha1.ResolveService.GetModulePins:output_type -> buf.alpha.registry.v1alpha1.GetModulePinsResponse
+ 5, // 12: buf.alpha.registry.v1alpha1.LocalResolveService.GetLocalModulePins:output_type -> buf.alpha.registry.v1alpha1.GetLocalModulePinsResponse
+ 11, // [11:13] is the sub-list for method output_type
+ 9, // [9:11] is the sub-list for method input_type
+ 9, // [9:9] is the sub-list for extension type_name
+ 9, // [9:9] is the sub-list for extension extendee
+ 0, // [0:9] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_resolve_proto_init() }
+func file_buf_alpha_registry_v1alpha1_resolve_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_resolve_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_module_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetModulePinsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetModulePinsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetLocalModulePinsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*LocalModuleResolveResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetLocalModulePinsResponse); 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_buf_alpha_registry_v1alpha1_resolve_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 2,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_resolve_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_resolve_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_resolve_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_resolve_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_resolve_proto = out.File
+ file_buf_alpha_registry_v1alpha1_resolve_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_resolve_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_resolve_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/resource.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/resource.pb.go
new file mode 100644
index 000000000..d043bfd55
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/resource.pb.go
@@ -0,0 +1,387 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/resource.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Resource struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Resource:
+ //
+ // *Resource_Repository
+ // *Resource_Plugin
+ Resource isResource_Resource `protobuf_oneof:"resource"`
+}
+
+func (x *Resource) Reset() {
+ *x = Resource{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_resource_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Resource) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Resource) ProtoMessage() {}
+
+func (x *Resource) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_resource_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 Resource.ProtoReflect.Descriptor instead.
+func (*Resource) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_resource_proto_rawDescGZIP(), []int{0}
+}
+
+func (m *Resource) GetResource() isResource_Resource {
+ if m != nil {
+ return m.Resource
+ }
+ return nil
+}
+
+func (x *Resource) GetRepository() *Repository {
+ if x, ok := x.GetResource().(*Resource_Repository); ok {
+ return x.Repository
+ }
+ return nil
+}
+
+func (x *Resource) GetPlugin() *CuratedPlugin {
+ if x, ok := x.GetResource().(*Resource_Plugin); ok {
+ return x.Plugin
+ }
+ return nil
+}
+
+type isResource_Resource interface {
+ isResource_Resource()
+}
+
+type Resource_Repository struct {
+ Repository *Repository `protobuf:"bytes,1,opt,name=repository,proto3,oneof"`
+}
+
+type Resource_Plugin struct {
+ Plugin *CuratedPlugin `protobuf:"bytes,2,opt,name=plugin,proto3,oneof"`
+}
+
+func (*Resource_Repository) isResource_Resource() {}
+
+func (*Resource_Plugin) isResource_Resource() {}
+
+type GetResourceByNameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Owner of the requested resource.
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // Name of the requested resource.
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetResourceByNameRequest) Reset() {
+ *x = GetResourceByNameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_resource_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetResourceByNameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetResourceByNameRequest) ProtoMessage() {}
+
+func (x *GetResourceByNameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_resource_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 GetResourceByNameRequest.ProtoReflect.Descriptor instead.
+func (*GetResourceByNameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_resource_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetResourceByNameRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetResourceByNameRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type GetResourceByNameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Resource *Resource `protobuf:"bytes,1,opt,name=resource,proto3" json:"resource,omitempty"`
+}
+
+func (x *GetResourceByNameResponse) Reset() {
+ *x = GetResourceByNameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_resource_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetResourceByNameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetResourceByNameResponse) ProtoMessage() {}
+
+func (x *GetResourceByNameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_resource_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 GetResourceByNameResponse.ProtoReflect.Descriptor instead.
+func (*GetResourceByNameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_resource_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *GetResourceByNameResponse) GetResource() *Resource {
+ if x != nil {
+ return x.Resource
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_resource_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_resource_proto_rawDesc = []byte{
+ 0x0a, 0x2a, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65,
+ 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x31, 0x62, 0x75, 0x66, 0x2f, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x5f, 0x63, 0x75,
+ 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x2c, 0x62, 0x75,
+ 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa7, 0x01, 0x0a, 0x08, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x27, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x12, 0x44, 0x0a, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x48, 0x00,
+ 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x42, 0x0a, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f,
+ 0x75, 0x72, 0x63, 0x65, 0x22, 0x44, 0x0a, 0x18, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x5e, 0x0a, 0x19, 0x47, 0x65,
+ 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x41, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75,
+ 0x72, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65,
+ 0x52, 0x08, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x32, 0x96, 0x01, 0x0a, 0x0f, 0x52,
+ 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x82,
+ 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79,
+ 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79,
+ 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73,
+ 0x6f, 0x75, 0x72, 0x63, 0x65, 0x42, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x42, 0x9a, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0d, 0x52, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63,
+ 0x65, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75,
+ 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e,
+ 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
+ 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_resource_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_resource_proto_rawDescData = file_buf_alpha_registry_v1alpha1_resource_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_resource_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_resource_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_resource_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_resource_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_resource_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_resource_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_buf_alpha_registry_v1alpha1_resource_proto_goTypes = []interface{}{
+ (*Resource)(nil), // 0: buf.alpha.registry.v1alpha1.Resource
+ (*GetResourceByNameRequest)(nil), // 1: buf.alpha.registry.v1alpha1.GetResourceByNameRequest
+ (*GetResourceByNameResponse)(nil), // 2: buf.alpha.registry.v1alpha1.GetResourceByNameResponse
+ (*Repository)(nil), // 3: buf.alpha.registry.v1alpha1.Repository
+ (*CuratedPlugin)(nil), // 4: buf.alpha.registry.v1alpha1.CuratedPlugin
+}
+var file_buf_alpha_registry_v1alpha1_resource_proto_depIdxs = []int32{
+ 3, // 0: buf.alpha.registry.v1alpha1.Resource.repository:type_name -> buf.alpha.registry.v1alpha1.Repository
+ 4, // 1: buf.alpha.registry.v1alpha1.Resource.plugin:type_name -> buf.alpha.registry.v1alpha1.CuratedPlugin
+ 0, // 2: buf.alpha.registry.v1alpha1.GetResourceByNameResponse.resource:type_name -> buf.alpha.registry.v1alpha1.Resource
+ 1, // 3: buf.alpha.registry.v1alpha1.ResourceService.GetResourceByName:input_type -> buf.alpha.registry.v1alpha1.GetResourceByNameRequest
+ 2, // 4: buf.alpha.registry.v1alpha1.ResourceService.GetResourceByName:output_type -> buf.alpha.registry.v1alpha1.GetResourceByNameResponse
+ 4, // [4:5] is the sub-list for method output_type
+ 3, // [3:4] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_resource_proto_init() }
+func file_buf_alpha_registry_v1alpha1_resource_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_resource_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_curation_proto_init()
+ file_buf_alpha_registry_v1alpha1_repository_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_resource_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Resource); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_resource_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetResourceByNameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_resource_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetResourceByNameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_resource_proto_msgTypes[0].OneofWrappers = []interface{}{
+ (*Resource_Repository)(nil),
+ (*Resource_Plugin)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_resource_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_resource_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_resource_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_resource_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_resource_proto = out.File
+ file_buf_alpha_registry_v1alpha1_resource_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_resource_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_resource_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/role.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/role.pb.go
new file mode 100644
index 000000000..02a3028c3
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/role.pb.go
@@ -0,0 +1,444 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/role.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// The roles that users can have in a Server.
+type ServerRole int32
+
+const (
+ ServerRole_SERVER_ROLE_UNSPECIFIED ServerRole = 0
+ ServerRole_SERVER_ROLE_ADMIN ServerRole = 1
+ ServerRole_SERVER_ROLE_MEMBER ServerRole = 2
+)
+
+// Enum value maps for ServerRole.
+var (
+ ServerRole_name = map[int32]string{
+ 0: "SERVER_ROLE_UNSPECIFIED",
+ 1: "SERVER_ROLE_ADMIN",
+ 2: "SERVER_ROLE_MEMBER",
+ }
+ ServerRole_value = map[string]int32{
+ "SERVER_ROLE_UNSPECIFIED": 0,
+ "SERVER_ROLE_ADMIN": 1,
+ "SERVER_ROLE_MEMBER": 2,
+ }
+)
+
+func (x ServerRole) Enum() *ServerRole {
+ p := new(ServerRole)
+ *p = x
+ return p
+}
+
+func (x ServerRole) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (ServerRole) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_role_proto_enumTypes[0].Descriptor()
+}
+
+func (ServerRole) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_role_proto_enumTypes[0]
+}
+
+func (x ServerRole) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use ServerRole.Descriptor instead.
+func (ServerRole) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_role_proto_rawDescGZIP(), []int{0}
+}
+
+// The roles that users can have in a Organization.
+type OrganizationRole int32
+
+const (
+ OrganizationRole_ORGANIZATION_ROLE_UNSPECIFIED OrganizationRole = 0
+ OrganizationRole_ORGANIZATION_ROLE_OWNER OrganizationRole = 1
+ OrganizationRole_ORGANIZATION_ROLE_ADMIN OrganizationRole = 2
+ OrganizationRole_ORGANIZATION_ROLE_MEMBER OrganizationRole = 3
+ OrganizationRole_ORGANIZATION_ROLE_MACHINE OrganizationRole = 4
+)
+
+// Enum value maps for OrganizationRole.
+var (
+ OrganizationRole_name = map[int32]string{
+ 0: "ORGANIZATION_ROLE_UNSPECIFIED",
+ 1: "ORGANIZATION_ROLE_OWNER",
+ 2: "ORGANIZATION_ROLE_ADMIN",
+ 3: "ORGANIZATION_ROLE_MEMBER",
+ 4: "ORGANIZATION_ROLE_MACHINE",
+ }
+ OrganizationRole_value = map[string]int32{
+ "ORGANIZATION_ROLE_UNSPECIFIED": 0,
+ "ORGANIZATION_ROLE_OWNER": 1,
+ "ORGANIZATION_ROLE_ADMIN": 2,
+ "ORGANIZATION_ROLE_MEMBER": 3,
+ "ORGANIZATION_ROLE_MACHINE": 4,
+ }
+)
+
+func (x OrganizationRole) Enum() *OrganizationRole {
+ p := new(OrganizationRole)
+ *p = x
+ return p
+}
+
+func (x OrganizationRole) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (OrganizationRole) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_role_proto_enumTypes[1].Descriptor()
+}
+
+func (OrganizationRole) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_role_proto_enumTypes[1]
+}
+
+func (x OrganizationRole) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use OrganizationRole.Descriptor instead.
+func (OrganizationRole) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_role_proto_rawDescGZIP(), []int{1}
+}
+
+// The roles that users can have for a Repository.
+type RepositoryRole int32
+
+const (
+ RepositoryRole_REPOSITORY_ROLE_UNSPECIFIED RepositoryRole = 0
+ RepositoryRole_REPOSITORY_ROLE_OWNER RepositoryRole = 1
+ RepositoryRole_REPOSITORY_ROLE_ADMIN RepositoryRole = 2
+ RepositoryRole_REPOSITORY_ROLE_WRITE RepositoryRole = 3
+ RepositoryRole_REPOSITORY_ROLE_READ RepositoryRole = 4
+ RepositoryRole_REPOSITORY_ROLE_LIMITED_WRITE RepositoryRole = 5
+)
+
+// Enum value maps for RepositoryRole.
+var (
+ RepositoryRole_name = map[int32]string{
+ 0: "REPOSITORY_ROLE_UNSPECIFIED",
+ 1: "REPOSITORY_ROLE_OWNER",
+ 2: "REPOSITORY_ROLE_ADMIN",
+ 3: "REPOSITORY_ROLE_WRITE",
+ 4: "REPOSITORY_ROLE_READ",
+ 5: "REPOSITORY_ROLE_LIMITED_WRITE",
+ }
+ RepositoryRole_value = map[string]int32{
+ "REPOSITORY_ROLE_UNSPECIFIED": 0,
+ "REPOSITORY_ROLE_OWNER": 1,
+ "REPOSITORY_ROLE_ADMIN": 2,
+ "REPOSITORY_ROLE_WRITE": 3,
+ "REPOSITORY_ROLE_READ": 4,
+ "REPOSITORY_ROLE_LIMITED_WRITE": 5,
+ }
+)
+
+func (x RepositoryRole) Enum() *RepositoryRole {
+ p := new(RepositoryRole)
+ *p = x
+ return p
+}
+
+func (x RepositoryRole) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (RepositoryRole) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_role_proto_enumTypes[2].Descriptor()
+}
+
+func (RepositoryRole) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_role_proto_enumTypes[2]
+}
+
+func (x RepositoryRole) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use RepositoryRole.Descriptor instead.
+func (RepositoryRole) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_role_proto_rawDescGZIP(), []int{2}
+}
+
+// The roles that users can have for a Template.
+//
+// Deprecated: Do not use.
+type TemplateRole int32
+
+const (
+ TemplateRole_TEMPLATE_ROLE_UNSPECIFIED TemplateRole = 0
+ TemplateRole_TEMPLATE_ROLE_OWNER TemplateRole = 1
+ TemplateRole_TEMPLATE_ROLE_ADMIN TemplateRole = 2
+ TemplateRole_TEMPLATE_ROLE_WRITE TemplateRole = 3
+ TemplateRole_TEMPLATE_ROLE_READ TemplateRole = 4
+)
+
+// Enum value maps for TemplateRole.
+var (
+ TemplateRole_name = map[int32]string{
+ 0: "TEMPLATE_ROLE_UNSPECIFIED",
+ 1: "TEMPLATE_ROLE_OWNER",
+ 2: "TEMPLATE_ROLE_ADMIN",
+ 3: "TEMPLATE_ROLE_WRITE",
+ 4: "TEMPLATE_ROLE_READ",
+ }
+ TemplateRole_value = map[string]int32{
+ "TEMPLATE_ROLE_UNSPECIFIED": 0,
+ "TEMPLATE_ROLE_OWNER": 1,
+ "TEMPLATE_ROLE_ADMIN": 2,
+ "TEMPLATE_ROLE_WRITE": 3,
+ "TEMPLATE_ROLE_READ": 4,
+ }
+)
+
+func (x TemplateRole) Enum() *TemplateRole {
+ p := new(TemplateRole)
+ *p = x
+ return p
+}
+
+func (x TemplateRole) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (TemplateRole) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_role_proto_enumTypes[3].Descriptor()
+}
+
+func (TemplateRole) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_role_proto_enumTypes[3]
+}
+
+func (x TemplateRole) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use TemplateRole.Descriptor instead.
+func (TemplateRole) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_role_proto_rawDescGZIP(), []int{3}
+}
+
+// The roles that users can have for a Plugin.
+//
+// Deprecated: Do not use.
+type PluginRole int32
+
+const (
+ PluginRole_PLUGIN_ROLE_UNSPECIFIED PluginRole = 0
+ PluginRole_PLUGIN_ROLE_OWNER PluginRole = 1
+ PluginRole_PLUGIN_ROLE_ADMIN PluginRole = 2
+ PluginRole_PLUGIN_ROLE_WRITE PluginRole = 3
+ PluginRole_PLUGIN_ROLE_READ PluginRole = 4
+)
+
+// Enum value maps for PluginRole.
+var (
+ PluginRole_name = map[int32]string{
+ 0: "PLUGIN_ROLE_UNSPECIFIED",
+ 1: "PLUGIN_ROLE_OWNER",
+ 2: "PLUGIN_ROLE_ADMIN",
+ 3: "PLUGIN_ROLE_WRITE",
+ 4: "PLUGIN_ROLE_READ",
+ }
+ PluginRole_value = map[string]int32{
+ "PLUGIN_ROLE_UNSPECIFIED": 0,
+ "PLUGIN_ROLE_OWNER": 1,
+ "PLUGIN_ROLE_ADMIN": 2,
+ "PLUGIN_ROLE_WRITE": 3,
+ "PLUGIN_ROLE_READ": 4,
+ }
+)
+
+func (x PluginRole) Enum() *PluginRole {
+ p := new(PluginRole)
+ *p = x
+ return p
+}
+
+func (x PluginRole) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (PluginRole) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_role_proto_enumTypes[4].Descriptor()
+}
+
+func (PluginRole) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_role_proto_enumTypes[4]
+}
+
+func (x PluginRole) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use PluginRole.Descriptor instead.
+func (PluginRole) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_role_proto_rawDescGZIP(), []int{4}
+}
+
+var File_buf_alpha_registry_v1alpha1_role_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_role_proto_rawDesc = []byte{
+ 0x0a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x6f,
+ 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2a, 0x58, 0x0a, 0x0a, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52,
+ 0x6f, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x4f,
+ 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
+ 0x12, 0x15, 0x0a, 0x11, 0x53, 0x45, 0x52, 0x56, 0x45, 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f,
+ 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x01, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x45, 0x52, 0x56, 0x45,
+ 0x52, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x02, 0x2a,
+ 0xac, 0x01, 0x0a, 0x10, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x21, 0x0a, 0x1d, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41,
+ 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
+ 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x52, 0x47, 0x41, 0x4e,
+ 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4f, 0x57, 0x4e,
+ 0x45, 0x52, 0x10, 0x01, 0x12, 0x1b, 0x0a, 0x17, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41,
+ 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10,
+ 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f,
+ 0x4e, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4d, 0x45, 0x4d, 0x42, 0x45, 0x52, 0x10, 0x03, 0x12,
+ 0x1d, 0x0a, 0x19, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f,
+ 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4d, 0x41, 0x43, 0x48, 0x49, 0x4e, 0x45, 0x10, 0x04, 0x2a, 0xbf,
+ 0x01, 0x0a, 0x0e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x6f, 0x6c,
+ 0x65, 0x12, 0x1f, 0x0a, 0x1b, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f,
+ 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44,
+ 0x10, 0x00, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59,
+ 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12, 0x19, 0x0a,
+ 0x15, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45,
+ 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10, 0x02, 0x12, 0x19, 0x0a, 0x15, 0x52, 0x45, 0x50, 0x4f,
+ 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x57, 0x52, 0x49, 0x54,
+ 0x45, 0x10, 0x03, 0x12, 0x18, 0x0a, 0x14, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52,
+ 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x04, 0x12, 0x21, 0x0a,
+ 0x1d, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52, 0x59, 0x5f, 0x52, 0x4f, 0x4c, 0x45,
+ 0x5f, 0x4c, 0x49, 0x4d, 0x49, 0x54, 0x45, 0x44, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x05,
+ 0x2a, 0x94, 0x01, 0x0a, 0x0c, 0x54, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x52, 0x6f, 0x6c,
+ 0x65, 0x12, 0x1d, 0x0a, 0x19, 0x54, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x4f,
+ 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
+ 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x4f, 0x4c,
+ 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x4d,
+ 0x50, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e,
+ 0x10, 0x02, 0x12, 0x17, 0x0a, 0x13, 0x54, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x52,
+ 0x4f, 0x4c, 0x45, 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x03, 0x12, 0x16, 0x0a, 0x12, 0x54,
+ 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x41,
+ 0x44, 0x10, 0x04, 0x1a, 0x02, 0x18, 0x01, 0x2a, 0x88, 0x01, 0x0a, 0x0a, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1b, 0x0a, 0x17, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e,
+ 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45,
+ 0x44, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x52, 0x4f,
+ 0x4c, 0x45, 0x5f, 0x4f, 0x57, 0x4e, 0x45, 0x52, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x4c,
+ 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x41, 0x44, 0x4d, 0x49, 0x4e, 0x10,
+ 0x02, 0x12, 0x15, 0x0a, 0x11, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x5f, 0x52, 0x4f, 0x4c, 0x45,
+ 0x5f, 0x57, 0x52, 0x49, 0x54, 0x45, 0x10, 0x03, 0x12, 0x14, 0x0a, 0x10, 0x50, 0x4c, 0x55, 0x47,
+ 0x49, 0x4e, 0x5f, 0x52, 0x4f, 0x4c, 0x45, 0x5f, 0x52, 0x45, 0x41, 0x44, 0x10, 0x04, 0x1a, 0x02,
+ 0x18, 0x01, 0x42, 0x96, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x09, 0x52, 0x6f, 0x6c, 0x65, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69,
+ 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
+ 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02,
+ 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47,
+ 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66,
+ 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_role_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_role_proto_rawDescData = file_buf_alpha_registry_v1alpha1_role_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_role_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_role_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_role_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_role_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_role_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_role_proto_enumTypes = make([]protoimpl.EnumInfo, 5)
+var file_buf_alpha_registry_v1alpha1_role_proto_goTypes = []interface{}{
+ (ServerRole)(0), // 0: buf.alpha.registry.v1alpha1.ServerRole
+ (OrganizationRole)(0), // 1: buf.alpha.registry.v1alpha1.OrganizationRole
+ (RepositoryRole)(0), // 2: buf.alpha.registry.v1alpha1.RepositoryRole
+ (TemplateRole)(0), // 3: buf.alpha.registry.v1alpha1.TemplateRole
+ (PluginRole)(0), // 4: buf.alpha.registry.v1alpha1.PluginRole
+}
+var file_buf_alpha_registry_v1alpha1_role_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_role_proto_init() }
+func file_buf_alpha_registry_v1alpha1_role_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_role_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_role_proto_rawDesc,
+ NumEnums: 5,
+ NumMessages: 0,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_role_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_role_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_role_proto_enumTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_role_proto = out.File
+ file_buf_alpha_registry_v1alpha1_role_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_role_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_role_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/schema.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/schema.pb.go
new file mode 100644
index 000000000..a06161ff2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/schema.pb.go
@@ -0,0 +1,945 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/schema.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ descriptorpb "google.golang.org/protobuf/types/descriptorpb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Format int32
+
+const (
+ Format_FORMAT_UNSPECIFIED Format = 0
+ Format_FORMAT_BINARY Format = 1
+ Format_FORMAT_JSON Format = 2
+ Format_FORMAT_TEXT Format = 3
+)
+
+// Enum value maps for Format.
+var (
+ Format_name = map[int32]string{
+ 0: "FORMAT_UNSPECIFIED",
+ 1: "FORMAT_BINARY",
+ 2: "FORMAT_JSON",
+ 3: "FORMAT_TEXT",
+ }
+ Format_value = map[string]int32{
+ "FORMAT_UNSPECIFIED": 0,
+ "FORMAT_BINARY": 1,
+ "FORMAT_JSON": 2,
+ "FORMAT_TEXT": 3,
+ }
+)
+
+func (x Format) Enum() *Format {
+ p := new(Format)
+ *p = x
+ return p
+}
+
+func (x Format) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (Format) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_schema_proto_enumTypes[0].Descriptor()
+}
+
+func (Format) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_schema_proto_enumTypes[0]
+}
+
+func (x Format) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use Format.Descriptor instead.
+func (Format) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_schema_proto_rawDescGZIP(), []int{0}
+}
+
+type GetSchemaRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the repo that contains the schema to retrieve (a user name or
+ // organization name).
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the repo that contains the schema to retrieve.
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ // Optional version of the repo. If unspecified, defaults to latest version on
+ // the repo's "main" branch.
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ // Zero or more types names. The names may refer to messages, enums, services,
+ // methods, or extensions. All names must be fully-qualified. If any name
+ // is unknown, the request will fail and no schema will be returned.
+ //
+ // If no names are provided, the full schema for the module is returned.
+ // Otherwise, the resulting schema contains only the named elements and all of
+ // their dependencies. This is enough information for the caller to construct
+ // a dynamic message for any requested message types or to dynamically invoke
+ // an RPC for any requested methods or services.
+ Types []string `protobuf:"bytes,4,rep,name=types,proto3" json:"types,omitempty"`
+ // If present, this is a commit that the client already has cached. So if the
+ // given module version resolves to this same commit, the server should not
+ // send back any descriptors since the client already has them.
+ //
+ // This allows a client to efficiently poll for updates: after the initial RPC
+ // to get a schema, the client can cache the descriptors and the resolved
+ // commit. It then includes that commit in subsequent requests in this field,
+ // and the server will only reply with a schema (and new commit) if/when the
+ // resolved commit changes.
+ IfNotCommit string `protobuf:"bytes,5,opt,name=if_not_commit,json=ifNotCommit,proto3" json:"if_not_commit,omitempty"`
+ // If true, the returned schema will not include extension definitions for custom
+ // options that appear on schema elements. When filtering the schema based on the
+ // given element names, options on all encountered elements are usually examined
+ // as well. But that is not the case if excluding custom options.
+ //
+ // This flag is ignored if element_names is empty as the entire schema is always
+ // returned in that case.
+ ExcludeCustomOptions bool `protobuf:"varint,6,opt,name=exclude_custom_options,json=excludeCustomOptions,proto3" json:"exclude_custom_options,omitempty"`
+ // If true, the returned schema will not include known extensions for extendable
+ // messages for schema elements. If exclude_custom_options is true, such extensions
+ // may still be returned if the applicable descriptor options type is part of the
+ // requested schema.
+ //
+ // This flag is ignored if element_names is empty as the entire schema is always
+ // returned in that case.
+ ExcludeKnownExtensions bool `protobuf:"varint,7,opt,name=exclude_known_extensions,json=excludeKnownExtensions,proto3" json:"exclude_known_extensions,omitempty"`
+}
+
+func (x *GetSchemaRequest) Reset() {
+ *x = GetSchemaRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetSchemaRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSchemaRequest) ProtoMessage() {}
+
+func (x *GetSchemaRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_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 GetSchemaRequest.ProtoReflect.Descriptor instead.
+func (*GetSchemaRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_schema_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *GetSchemaRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *GetSchemaRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *GetSchemaRequest) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *GetSchemaRequest) GetTypes() []string {
+ if x != nil {
+ return x.Types
+ }
+ return nil
+}
+
+func (x *GetSchemaRequest) GetIfNotCommit() string {
+ if x != nil {
+ return x.IfNotCommit
+ }
+ return ""
+}
+
+func (x *GetSchemaRequest) GetExcludeCustomOptions() bool {
+ if x != nil {
+ return x.ExcludeCustomOptions
+ }
+ return false
+}
+
+func (x *GetSchemaRequest) GetExcludeKnownExtensions() bool {
+ if x != nil {
+ return x.ExcludeKnownExtensions
+ }
+ return false
+}
+
+type GetSchemaResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The resolved version of the schema. If the requested version was a commit,
+ // this value is the same as that. If the requested version referred to a tag
+ // or branch, this is the commit for that tag or latest commit for that
+ // branch. If the request did not include any version, this is the latest
+ // version for the module's main branch.
+ Commit string `protobuf:"bytes,1,opt,name=commit,proto3" json:"commit,omitempty"`
+ // The schema, which is a set of file descriptors that include the requested elements
+ // and their dependencies.
+ SchemaFiles *descriptorpb.FileDescriptorSet `protobuf:"bytes,2,opt,name=schema_files,json=schemaFiles,proto3" json:"schema_files,omitempty"`
+}
+
+func (x *GetSchemaResponse) Reset() {
+ *x = GetSchemaResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetSchemaResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSchemaResponse) ProtoMessage() {}
+
+func (x *GetSchemaResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_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 GetSchemaResponse.ProtoReflect.Descriptor instead.
+func (*GetSchemaResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_schema_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *GetSchemaResponse) GetCommit() string {
+ if x != nil {
+ return x.Commit
+ }
+ return ""
+}
+
+func (x *GetSchemaResponse) GetSchemaFiles() *descriptorpb.FileDescriptorSet {
+ if x != nil {
+ return x.SchemaFiles
+ }
+ return nil
+}
+
+type ConvertMessageRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the repo that contains the schema to retrieve (a user name or
+ // organization name).
+ Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The name of the repo that contains the schema to retrieve.
+ Repository string `protobuf:"bytes,2,opt,name=repository,proto3" json:"repository,omitempty"`
+ // Optional version of the repo. This can be a tag or branch name or a commit.
+ // If unspecified, defaults to latest version on the repo's "main" branch.
+ Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"`
+ // The fully-qualified name of the message. Required.
+ MessageName string `protobuf:"bytes,4,opt,name=message_name,json=messageName,proto3" json:"message_name,omitempty"`
+ // The format of the input data. Required.
+ InputFormat Format `protobuf:"varint,5,opt,name=input_format,json=inputFormat,proto3,enum=buf.alpha.registry.v1alpha1.Format" json:"input_format,omitempty"`
+ // The input data that is to be converted. Required. This must be
+ // a valid encoding of type indicated by message_name in the format
+ // indicated by input_format.
+ InputData []byte `protobuf:"bytes,6,opt,name=input_data,json=inputData,proto3" json:"input_data,omitempty"`
+ // If true, any unresolvable fields in the input are discarded. For
+ // formats other than FORMAT_BINARY, this means that the operation
+ // will fail if the input contains unrecognized field names. For
+ // FORMAT_BINARY, unrecognized fields can be retained and possibly
+ // included in the reformatted output (depending on the requested
+ // output format).
+ DiscardUnknown bool `protobuf:"varint,7,opt,name=discard_unknown,json=discardUnknown,proto3" json:"discard_unknown,omitempty"`
+ // Types that are assignable to OutputFormat:
+ //
+ // *ConvertMessageRequest_OutputBinary
+ // *ConvertMessageRequest_OutputJson
+ // *ConvertMessageRequest_OutputText
+ OutputFormat isConvertMessageRequest_OutputFormat `protobuf_oneof:"output_format"`
+}
+
+func (x *ConvertMessageRequest) Reset() {
+ *x = ConvertMessageRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ConvertMessageRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConvertMessageRequest) ProtoMessage() {}
+
+func (x *ConvertMessageRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_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 ConvertMessageRequest.ProtoReflect.Descriptor instead.
+func (*ConvertMessageRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_schema_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ConvertMessageRequest) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *ConvertMessageRequest) GetRepository() string {
+ if x != nil {
+ return x.Repository
+ }
+ return ""
+}
+
+func (x *ConvertMessageRequest) GetVersion() string {
+ if x != nil {
+ return x.Version
+ }
+ return ""
+}
+
+func (x *ConvertMessageRequest) GetMessageName() string {
+ if x != nil {
+ return x.MessageName
+ }
+ return ""
+}
+
+func (x *ConvertMessageRequest) GetInputFormat() Format {
+ if x != nil {
+ return x.InputFormat
+ }
+ return Format_FORMAT_UNSPECIFIED
+}
+
+func (x *ConvertMessageRequest) GetInputData() []byte {
+ if x != nil {
+ return x.InputData
+ }
+ return nil
+}
+
+func (x *ConvertMessageRequest) GetDiscardUnknown() bool {
+ if x != nil {
+ return x.DiscardUnknown
+ }
+ return false
+}
+
+func (m *ConvertMessageRequest) GetOutputFormat() isConvertMessageRequest_OutputFormat {
+ if m != nil {
+ return m.OutputFormat
+ }
+ return nil
+}
+
+func (x *ConvertMessageRequest) GetOutputBinary() *BinaryOutputOptions {
+ if x, ok := x.GetOutputFormat().(*ConvertMessageRequest_OutputBinary); ok {
+ return x.OutputBinary
+ }
+ return nil
+}
+
+func (x *ConvertMessageRequest) GetOutputJson() *JSONOutputOptions {
+ if x, ok := x.GetOutputFormat().(*ConvertMessageRequest_OutputJson); ok {
+ return x.OutputJson
+ }
+ return nil
+}
+
+func (x *ConvertMessageRequest) GetOutputText() *TextOutputOptions {
+ if x, ok := x.GetOutputFormat().(*ConvertMessageRequest_OutputText); ok {
+ return x.OutputText
+ }
+ return nil
+}
+
+type isConvertMessageRequest_OutputFormat interface {
+ isConvertMessageRequest_OutputFormat()
+}
+
+type ConvertMessageRequest_OutputBinary struct {
+ OutputBinary *BinaryOutputOptions `protobuf:"bytes,8,opt,name=output_binary,json=outputBinary,proto3,oneof"`
+}
+
+type ConvertMessageRequest_OutputJson struct {
+ OutputJson *JSONOutputOptions `protobuf:"bytes,9,opt,name=output_json,json=outputJson,proto3,oneof"`
+}
+
+type ConvertMessageRequest_OutputText struct {
+ OutputText *TextOutputOptions `protobuf:"bytes,10,opt,name=output_text,json=outputText,proto3,oneof"`
+}
+
+func (*ConvertMessageRequest_OutputBinary) isConvertMessageRequest_OutputFormat() {}
+
+func (*ConvertMessageRequest_OutputJson) isConvertMessageRequest_OutputFormat() {}
+
+func (*ConvertMessageRequest_OutputText) isConvertMessageRequest_OutputFormat() {}
+
+type BinaryOutputOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *BinaryOutputOptions) Reset() {
+ *x = BinaryOutputOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *BinaryOutputOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*BinaryOutputOptions) ProtoMessage() {}
+
+func (x *BinaryOutputOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_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 BinaryOutputOptions.ProtoReflect.Descriptor instead.
+func (*BinaryOutputOptions) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_schema_proto_rawDescGZIP(), []int{3}
+}
+
+type JSONOutputOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Enum fields will be emitted as numeric values. If false (the dafault), enum
+ // fields are emitted as strings that are the enum values' names.
+ UseEnumNumbers bool `protobuf:"varint,3,opt,name=use_enum_numbers,json=useEnumNumbers,proto3" json:"use_enum_numbers,omitempty"`
+ // Includes fields that have their default values. This applies only to fields
+ // defined in proto3 syntax that have no explicit "optional" keyword. Other
+ // optional fields will be included if present in the input data.
+ IncludeDefaults bool `protobuf:"varint,4,opt,name=include_defaults,json=includeDefaults,proto3" json:"include_defaults,omitempty"`
+}
+
+func (x *JSONOutputOptions) Reset() {
+ *x = JSONOutputOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *JSONOutputOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*JSONOutputOptions) ProtoMessage() {}
+
+func (x *JSONOutputOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_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 JSONOutputOptions.ProtoReflect.Descriptor instead.
+func (*JSONOutputOptions) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_schema_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *JSONOutputOptions) GetUseEnumNumbers() bool {
+ if x != nil {
+ return x.UseEnumNumbers
+ }
+ return false
+}
+
+func (x *JSONOutputOptions) GetIncludeDefaults() bool {
+ if x != nil {
+ return x.IncludeDefaults
+ }
+ return false
+}
+
+type TextOutputOptions struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // If true and the input data includes unrecognized fields, the unrecognized
+ // fields will be preserved in the text output (using field numbers and raw
+ // values).
+ IncludeUnrecognized bool `protobuf:"varint,2,opt,name=include_unrecognized,json=includeUnrecognized,proto3" json:"include_unrecognized,omitempty"`
+}
+
+func (x *TextOutputOptions) Reset() {
+ *x = TextOutputOptions{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TextOutputOptions) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TextOutputOptions) ProtoMessage() {}
+
+func (x *TextOutputOptions) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_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 TextOutputOptions.ProtoReflect.Descriptor instead.
+func (*TextOutputOptions) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_schema_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *TextOutputOptions) GetIncludeUnrecognized() bool {
+ if x != nil {
+ return x.IncludeUnrecognized
+ }
+ return false
+}
+
+type ConvertMessageResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The resolved version of the schema. If the requested version was a commit,
+ // this value is the same as that. If the requested version referred to a tag
+ // or branch, this is the commit for that tag or latest commit for that
+ // branch. If the request did not include any version, this is the latest
+ // version for the module's main branch.
+ Commit string `protobuf:"bytes,1,opt,name=commit,proto3" json:"commit,omitempty"`
+ // The reformatted data.
+ OutputData []byte `protobuf:"bytes,2,opt,name=output_data,json=outputData,proto3" json:"output_data,omitempty"`
+}
+
+func (x *ConvertMessageResponse) Reset() {
+ *x = ConvertMessageResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ConvertMessageResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ConvertMessageResponse) ProtoMessage() {}
+
+func (x *ConvertMessageResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_schema_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 ConvertMessageResponse.ProtoReflect.Descriptor instead.
+func (*ConvertMessageResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_schema_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *ConvertMessageResponse) GetCommit() string {
+ if x != nil {
+ return x.Commit
+ }
+ return ""
+}
+
+func (x *ConvertMessageResponse) GetOutputData() []byte {
+ if x != nil {
+ return x.OutputData
+ }
+ return nil
+}
+
+var File_buf_alpha_registry_v1alpha1_schema_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_schema_proto_rawDesc = []byte{
+ 0x0a, 0x28, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x63,
+ 0x68, 0x65, 0x6d, 0x61, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 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, 0x22, 0x8c, 0x02, 0x0a, 0x10, 0x47, 0x65,
+ 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14,
+ 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f,
+ 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x14,
+ 0x0a, 0x05, 0x74, 0x79, 0x70, 0x65, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x05, 0x74,
+ 0x79, 0x70, 0x65, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x69, 0x66, 0x5f, 0x6e, 0x6f, 0x74, 0x5f, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x69, 0x66, 0x4e,
+ 0x6f, 0x74, 0x43, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x34, 0x0a, 0x16, 0x65, 0x78, 0x63, 0x6c,
+ 0x75, 0x64, 0x65, 0x5f, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64,
+ 0x65, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x38,
+ 0x0a, 0x18, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x5f,
+ 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08,
+ 0x52, 0x16, 0x65, 0x78, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x45, 0x78,
+ 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x72, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x53,
+ 0x63, 0x68, 0x65, 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a,
+ 0x06, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63,
+ 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x45, 0x0a, 0x0c, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x5f,
+ 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 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, 0x53, 0x65, 0x74, 0x52,
+ 0x0b, 0x73, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x22, 0xaa, 0x04, 0x0a,
+ 0x15, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1e, 0x0a, 0x0a,
+ 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x18, 0x0a, 0x07,
+ 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76,
+ 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x0a, 0x0c, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+ 0x65, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x65,
+ 0x73, 0x73, 0x61, 0x67, 0x65, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x46, 0x0a, 0x0c, 0x69, 0x6e, 0x70,
+ 0x75, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x23, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x46, 0x6f,
+ 0x72, 0x6d, 0x61, 0x74, 0x52, 0x0b, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x46, 0x6f, 0x72, 0x6d, 0x61,
+ 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18,
+ 0x06, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61,
+ 0x12, 0x27, 0x0a, 0x0f, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, 0x64, 0x5f, 0x75, 0x6e, 0x6b, 0x6e,
+ 0x6f, 0x77, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x64, 0x69, 0x73, 0x63, 0x61,
+ 0x72, 0x64, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x12, 0x57, 0x0a, 0x0d, 0x6f, 0x75, 0x74,
+ 0x70, 0x75, 0x74, 0x5f, 0x62, 0x69, 0x6e, 0x61, 0x72, 0x79, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x42,
+ 0x69, 0x6e, 0x61, 0x72, 0x79, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f,
+ 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0c, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x42, 0x69, 0x6e, 0x61,
+ 0x72, 0x79, 0x12, 0x51, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x6a, 0x73, 0x6f,
+ 0x6e, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4a, 0x53, 0x4f, 0x4e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74,
+ 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75,
+ 0x74, 0x4a, 0x73, 0x6f, 0x6e, 0x12, 0x51, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f,
+ 0x74, 0x65, 0x78, 0x74, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x78, 0x74, 0x4f, 0x75, 0x74,
+ 0x70, 0x75, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x48, 0x00, 0x52, 0x0a, 0x6f, 0x75,
+ 0x74, 0x70, 0x75, 0x74, 0x54, 0x65, 0x78, 0x74, 0x42, 0x0f, 0x0a, 0x0d, 0x6f, 0x75, 0x74, 0x70,
+ 0x75, 0x74, 0x5f, 0x66, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x22, 0x15, 0x0a, 0x13, 0x42, 0x69, 0x6e,
+ 0x61, 0x72, 0x79, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73,
+ 0x22, 0x68, 0x0a, 0x11, 0x4a, 0x53, 0x4f, 0x4e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4f, 0x70,
+ 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x28, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x5f, 0x65, 0x6e, 0x75,
+ 0x6d, 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x0e, 0x75, 0x73, 0x65, 0x45, 0x6e, 0x75, 0x6d, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x73, 0x12,
+ 0x29, 0x0a, 0x10, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x64, 0x65, 0x66, 0x61, 0x75,
+ 0x6c, 0x74, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75,
+ 0x64, 0x65, 0x44, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x73, 0x22, 0x46, 0x0a, 0x11, 0x54, 0x65,
+ 0x78, 0x74, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12,
+ 0x31, 0x0a, 0x14, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x75, 0x6e, 0x72, 0x65, 0x63,
+ 0x6f, 0x67, 0x6e, 0x69, 0x7a, 0x65, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x69,
+ 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x55, 0x6e, 0x72, 0x65, 0x63, 0x6f, 0x67, 0x6e, 0x69, 0x7a,
+ 0x65, 0x64, 0x22, 0x51, 0x0a, 0x16, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x73,
+ 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06,
+ 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x63, 0x6f,
+ 0x6d, 0x6d, 0x69, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x5f, 0x64,
+ 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x6f, 0x75, 0x74, 0x70, 0x75,
+ 0x74, 0x44, 0x61, 0x74, 0x61, 0x2a, 0x55, 0x0a, 0x06, 0x46, 0x6f, 0x72, 0x6d, 0x61, 0x74, 0x12,
+ 0x16, 0x0a, 0x12, 0x46, 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
+ 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0d, 0x46, 0x4f, 0x52, 0x4d, 0x41,
+ 0x54, 0x5f, 0x42, 0x49, 0x4e, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x46, 0x4f,
+ 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x4a, 0x53, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x0f, 0x0a, 0x0b, 0x46,
+ 0x4f, 0x52, 0x4d, 0x41, 0x54, 0x5f, 0x54, 0x45, 0x58, 0x54, 0x10, 0x03, 0x32, 0xf6, 0x01, 0x0a,
+ 0x0d, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6a,
+ 0x0a, 0x09, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65, 0x6d, 0x61, 0x12, 0x2d, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68,
+ 0x65, 0x6d, 0x61, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x63, 0x68, 0x65,
+ 0x6d, 0x61, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x79, 0x0a, 0x0e, 0x43, 0x6f,
+ 0x6e, 0x76, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x32, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65,
+ 0x72, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43,
+ 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x98, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x53, 0x63, 0x68, 0x65, 0x6d,
+ 0x61, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
+ 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75,
+ 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e,
+ 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c,
+ 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea,
+ 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_schema_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_schema_proto_rawDescData = file_buf_alpha_registry_v1alpha1_schema_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_schema_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_schema_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_schema_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_schema_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_schema_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_schema_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_buf_alpha_registry_v1alpha1_schema_proto_goTypes = []interface{}{
+ (Format)(0), // 0: buf.alpha.registry.v1alpha1.Format
+ (*GetSchemaRequest)(nil), // 1: buf.alpha.registry.v1alpha1.GetSchemaRequest
+ (*GetSchemaResponse)(nil), // 2: buf.alpha.registry.v1alpha1.GetSchemaResponse
+ (*ConvertMessageRequest)(nil), // 3: buf.alpha.registry.v1alpha1.ConvertMessageRequest
+ (*BinaryOutputOptions)(nil), // 4: buf.alpha.registry.v1alpha1.BinaryOutputOptions
+ (*JSONOutputOptions)(nil), // 5: buf.alpha.registry.v1alpha1.JSONOutputOptions
+ (*TextOutputOptions)(nil), // 6: buf.alpha.registry.v1alpha1.TextOutputOptions
+ (*ConvertMessageResponse)(nil), // 7: buf.alpha.registry.v1alpha1.ConvertMessageResponse
+ (*descriptorpb.FileDescriptorSet)(nil), // 8: google.protobuf.FileDescriptorSet
+}
+var file_buf_alpha_registry_v1alpha1_schema_proto_depIdxs = []int32{
+ 8, // 0: buf.alpha.registry.v1alpha1.GetSchemaResponse.schema_files:type_name -> google.protobuf.FileDescriptorSet
+ 0, // 1: buf.alpha.registry.v1alpha1.ConvertMessageRequest.input_format:type_name -> buf.alpha.registry.v1alpha1.Format
+ 4, // 2: buf.alpha.registry.v1alpha1.ConvertMessageRequest.output_binary:type_name -> buf.alpha.registry.v1alpha1.BinaryOutputOptions
+ 5, // 3: buf.alpha.registry.v1alpha1.ConvertMessageRequest.output_json:type_name -> buf.alpha.registry.v1alpha1.JSONOutputOptions
+ 6, // 4: buf.alpha.registry.v1alpha1.ConvertMessageRequest.output_text:type_name -> buf.alpha.registry.v1alpha1.TextOutputOptions
+ 1, // 5: buf.alpha.registry.v1alpha1.SchemaService.GetSchema:input_type -> buf.alpha.registry.v1alpha1.GetSchemaRequest
+ 3, // 6: buf.alpha.registry.v1alpha1.SchemaService.ConvertMessage:input_type -> buf.alpha.registry.v1alpha1.ConvertMessageRequest
+ 2, // 7: buf.alpha.registry.v1alpha1.SchemaService.GetSchema:output_type -> buf.alpha.registry.v1alpha1.GetSchemaResponse
+ 7, // 8: buf.alpha.registry.v1alpha1.SchemaService.ConvertMessage:output_type -> buf.alpha.registry.v1alpha1.ConvertMessageResponse
+ 7, // [7:9] is the sub-list for method output_type
+ 5, // [5:7] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_schema_proto_init() }
+func file_buf_alpha_registry_v1alpha1_schema_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_schema_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetSchemaRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetSchemaResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConvertMessageRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*BinaryOutputOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*JSONOutputOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TextOutputOptions); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ConvertMessageResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes[2].OneofWrappers = []interface{}{
+ (*ConvertMessageRequest_OutputBinary)(nil),
+ (*ConvertMessageRequest_OutputJson)(nil),
+ (*ConvertMessageRequest_OutputText)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_schema_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_schema_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_schema_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_schema_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_schema_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_schema_proto = out.File
+ file_buf_alpha_registry_v1alpha1_schema_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_schema_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_schema_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/search.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/search.pb.go
new file mode 100644
index 000000000..44667afbc
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/search.pb.go
@@ -0,0 +1,1776 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/search.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type SearchFilter int32
+
+const (
+ SearchFilter_SEARCH_FILTER_UNSPECIFIED SearchFilter = 0
+ SearchFilter_SEARCH_FILTER_USER SearchFilter = 1
+ SearchFilter_SEARCH_FILTER_ORGANIZATION SearchFilter = 2
+ SearchFilter_SEARCH_FILTER_REPOSITORY SearchFilter = 3
+ // Deprecated: Do not use.
+ SearchFilter_SEARCH_FILTER_PLUGIN SearchFilter = 4
+ // Deprecated: Do not use.
+ SearchFilter_SEARCH_FILTER_TEMPLATE SearchFilter = 5
+ SearchFilter_SEARCH_FILTER_TEAM SearchFilter = 6
+ SearchFilter_SEARCH_FILTER_CURATED_PLUGIN SearchFilter = 7
+)
+
+// Enum value maps for SearchFilter.
+var (
+ SearchFilter_name = map[int32]string{
+ 0: "SEARCH_FILTER_UNSPECIFIED",
+ 1: "SEARCH_FILTER_USER",
+ 2: "SEARCH_FILTER_ORGANIZATION",
+ 3: "SEARCH_FILTER_REPOSITORY",
+ 4: "SEARCH_FILTER_PLUGIN",
+ 5: "SEARCH_FILTER_TEMPLATE",
+ 6: "SEARCH_FILTER_TEAM",
+ 7: "SEARCH_FILTER_CURATED_PLUGIN",
+ }
+ SearchFilter_value = map[string]int32{
+ "SEARCH_FILTER_UNSPECIFIED": 0,
+ "SEARCH_FILTER_USER": 1,
+ "SEARCH_FILTER_ORGANIZATION": 2,
+ "SEARCH_FILTER_REPOSITORY": 3,
+ "SEARCH_FILTER_PLUGIN": 4,
+ "SEARCH_FILTER_TEMPLATE": 5,
+ "SEARCH_FILTER_TEAM": 6,
+ "SEARCH_FILTER_CURATED_PLUGIN": 7,
+ }
+)
+
+func (x SearchFilter) Enum() *SearchFilter {
+ p := new(SearchFilter)
+ *p = x
+ return p
+}
+
+func (x SearchFilter) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (SearchFilter) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_search_proto_enumTypes[0].Descriptor()
+}
+
+func (SearchFilter) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_search_proto_enumTypes[0]
+}
+
+func (x SearchFilter) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use SearchFilter.Descriptor instead.
+func (SearchFilter) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{0}
+}
+
+type OrderBy int32
+
+const (
+ OrderBy_ORDER_BY_UNSPECIFIED OrderBy = 0
+ OrderBy_ORDER_BY_CREATE_TIME OrderBy = 1
+ OrderBy_ORDER_BY_UPDATE_TIME OrderBy = 2
+ OrderBy_ORDER_BY_NAME OrderBy = 3
+)
+
+// Enum value maps for OrderBy.
+var (
+ OrderBy_name = map[int32]string{
+ 0: "ORDER_BY_UNSPECIFIED",
+ 1: "ORDER_BY_CREATE_TIME",
+ 2: "ORDER_BY_UPDATE_TIME",
+ 3: "ORDER_BY_NAME",
+ }
+ OrderBy_value = map[string]int32{
+ "ORDER_BY_UNSPECIFIED": 0,
+ "ORDER_BY_CREATE_TIME": 1,
+ "ORDER_BY_UPDATE_TIME": 2,
+ "ORDER_BY_NAME": 3,
+ }
+)
+
+func (x OrderBy) Enum() *OrderBy {
+ p := new(OrderBy)
+ *p = x
+ return p
+}
+
+func (x OrderBy) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (OrderBy) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_search_proto_enumTypes[1].Descriptor()
+}
+
+func (OrderBy) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_search_proto_enumTypes[1]
+}
+
+func (x OrderBy) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use OrderBy.Descriptor instead.
+func (OrderBy) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{1}
+}
+
+type RepositorySearchResult struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the user or organization
+ // who is the owner of this repository.
+ Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The visibility of the repository.
+ Visibility Visibility `protobuf:"varint,4,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.Visibility" json:"visibility,omitempty"`
+ Deprecated bool `protobuf:"varint,5,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+}
+
+func (x *RepositorySearchResult) Reset() {
+ *x = RepositorySearchResult{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RepositorySearchResult) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RepositorySearchResult) ProtoMessage() {}
+
+func (x *RepositorySearchResult) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 RepositorySearchResult.ProtoReflect.Descriptor instead.
+func (*RepositorySearchResult) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *RepositorySearchResult) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *RepositorySearchResult) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *RepositorySearchResult) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *RepositorySearchResult) GetVisibility() Visibility {
+ if x != nil {
+ return x.Visibility
+ }
+ return Visibility_VISIBILITY_UNSPECIFIED
+}
+
+func (x *RepositorySearchResult) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+type OrganizationSearchResult struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *OrganizationSearchResult) Reset() {
+ *x = OrganizationSearchResult{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OrganizationSearchResult) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OrganizationSearchResult) ProtoMessage() {}
+
+func (x *OrganizationSearchResult) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 OrganizationSearchResult.ProtoReflect.Descriptor instead.
+func (*OrganizationSearchResult) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *OrganizationSearchResult) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *OrganizationSearchResult) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+type UserSearchResult struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Username string `protobuf:"bytes,2,opt,name=username,proto3" json:"username,omitempty"`
+ Deactivated bool `protobuf:"varint,3,opt,name=deactivated,proto3" json:"deactivated,omitempty"`
+}
+
+func (x *UserSearchResult) Reset() {
+ *x = UserSearchResult{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UserSearchResult) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserSearchResult) ProtoMessage() {}
+
+func (x *UserSearchResult) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 UserSearchResult.ProtoReflect.Descriptor instead.
+func (*UserSearchResult) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *UserSearchResult) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *UserSearchResult) GetUsername() string {
+ if x != nil {
+ return x.Username
+ }
+ return ""
+}
+
+func (x *UserSearchResult) GetDeactivated() bool {
+ if x != nil {
+ return x.Deactivated
+ }
+ return false
+}
+
+type TeamSearchResult struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ OrganizationName string `protobuf:"bytes,3,opt,name=organization_name,json=organizationName,proto3" json:"organization_name,omitempty"`
+}
+
+func (x *TeamSearchResult) Reset() {
+ *x = TeamSearchResult{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TeamSearchResult) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TeamSearchResult) ProtoMessage() {}
+
+func (x *TeamSearchResult) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 TeamSearchResult.ProtoReflect.Descriptor instead.
+func (*TeamSearchResult) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *TeamSearchResult) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *TeamSearchResult) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *TeamSearchResult) GetOrganizationName() string {
+ if x != nil {
+ return x.OrganizationName
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type PluginSearchResult struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the user or organization
+ // who is the owner of this plugin.
+ Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The visibility of the plugin.
+ Visibility PluginVisibility `protobuf:"varint,4,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.PluginVisibility" json:"visibility,omitempty"`
+ Deprecated bool `protobuf:"varint,5,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+}
+
+func (x *PluginSearchResult) Reset() {
+ *x = PluginSearchResult{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *PluginSearchResult) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PluginSearchResult) ProtoMessage() {}
+
+func (x *PluginSearchResult) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 PluginSearchResult.ProtoReflect.Descriptor instead.
+func (*PluginSearchResult) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *PluginSearchResult) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *PluginSearchResult) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *PluginSearchResult) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *PluginSearchResult) GetVisibility() PluginVisibility {
+ if x != nil {
+ return x.Visibility
+ }
+ return PluginVisibility_PLUGIN_VISIBILITY_UNSPECIFIED
+}
+
+func (x *PluginSearchResult) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+type CuratedPluginSearchResult struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the user or organization
+ // who is the owner of this plugin.
+ Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
+}
+
+func (x *CuratedPluginSearchResult) Reset() {
+ *x = CuratedPluginSearchResult{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CuratedPluginSearchResult) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CuratedPluginSearchResult) ProtoMessage() {}
+
+func (x *CuratedPluginSearchResult) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 CuratedPluginSearchResult.ProtoReflect.Descriptor instead.
+func (*CuratedPluginSearchResult) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *CuratedPluginSearchResult) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *CuratedPluginSearchResult) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CuratedPluginSearchResult) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+// Deprecated: Do not use.
+type TemplateSearchResult struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"`
+ // The name of the user or organization
+ // who is the owner of this template.
+ Owner string `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
+ // The visibility of the template.
+ Visibility PluginVisibility `protobuf:"varint,4,opt,name=visibility,proto3,enum=buf.alpha.registry.v1alpha1.PluginVisibility" json:"visibility,omitempty"`
+ Deprecated bool `protobuf:"varint,5,opt,name=deprecated,proto3" json:"deprecated,omitempty"`
+}
+
+func (x *TemplateSearchResult) Reset() {
+ *x = TemplateSearchResult{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *TemplateSearchResult) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*TemplateSearchResult) ProtoMessage() {}
+
+func (x *TemplateSearchResult) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 TemplateSearchResult.ProtoReflect.Descriptor instead.
+func (*TemplateSearchResult) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *TemplateSearchResult) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *TemplateSearchResult) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *TemplateSearchResult) GetOwner() string {
+ if x != nil {
+ return x.Owner
+ }
+ return ""
+}
+
+func (x *TemplateSearchResult) GetVisibility() PluginVisibility {
+ if x != nil {
+ return x.Visibility
+ }
+ return PluginVisibility_PLUGIN_VISIBILITY_UNSPECIFIED
+}
+
+func (x *TemplateSearchResult) GetDeprecated() bool {
+ if x != nil {
+ return x.Deprecated
+ }
+ return false
+}
+
+type SearchResult struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Types that are assignable to Item:
+ //
+ // *SearchResult_Repository
+ // *SearchResult_Organization
+ // *SearchResult_User
+ // *SearchResult_Team
+ // *SearchResult_Plugin
+ // *SearchResult_Template
+ // *SearchResult_CuratedPlugin
+ Item isSearchResult_Item `protobuf_oneof:"item"`
+}
+
+func (x *SearchResult) Reset() {
+ *x = SearchResult{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SearchResult) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SearchResult) ProtoMessage() {}
+
+func (x *SearchResult) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 SearchResult.ProtoReflect.Descriptor instead.
+func (*SearchResult) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{7}
+}
+
+func (m *SearchResult) GetItem() isSearchResult_Item {
+ if m != nil {
+ return m.Item
+ }
+ return nil
+}
+
+func (x *SearchResult) GetRepository() *RepositorySearchResult {
+ if x, ok := x.GetItem().(*SearchResult_Repository); ok {
+ return x.Repository
+ }
+ return nil
+}
+
+func (x *SearchResult) GetOrganization() *OrganizationSearchResult {
+ if x, ok := x.GetItem().(*SearchResult_Organization); ok {
+ return x.Organization
+ }
+ return nil
+}
+
+func (x *SearchResult) GetUser() *UserSearchResult {
+ if x, ok := x.GetItem().(*SearchResult_User); ok {
+ return x.User
+ }
+ return nil
+}
+
+func (x *SearchResult) GetTeam() *TeamSearchResult {
+ if x, ok := x.GetItem().(*SearchResult_Team); ok {
+ return x.Team
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+func (x *SearchResult) GetPlugin() *PluginSearchResult {
+ if x, ok := x.GetItem().(*SearchResult_Plugin); ok {
+ return x.Plugin
+ }
+ return nil
+}
+
+// Deprecated: Do not use.
+func (x *SearchResult) GetTemplate() *TemplateSearchResult {
+ if x, ok := x.GetItem().(*SearchResult_Template); ok {
+ return x.Template
+ }
+ return nil
+}
+
+func (x *SearchResult) GetCuratedPlugin() *CuratedPluginSearchResult {
+ if x, ok := x.GetItem().(*SearchResult_CuratedPlugin); ok {
+ return x.CuratedPlugin
+ }
+ return nil
+}
+
+type isSearchResult_Item interface {
+ isSearchResult_Item()
+}
+
+type SearchResult_Repository struct {
+ Repository *RepositorySearchResult `protobuf:"bytes,1,opt,name=repository,proto3,oneof"`
+}
+
+type SearchResult_Organization struct {
+ Organization *OrganizationSearchResult `protobuf:"bytes,2,opt,name=organization,proto3,oneof"`
+}
+
+type SearchResult_User struct {
+ User *UserSearchResult `protobuf:"bytes,3,opt,name=user,proto3,oneof"`
+}
+
+type SearchResult_Team struct {
+ Team *TeamSearchResult `protobuf:"bytes,4,opt,name=team,proto3,oneof"`
+}
+
+type SearchResult_Plugin struct {
+ // Deprecated: Do not use.
+ Plugin *PluginSearchResult `protobuf:"bytes,5,opt,name=plugin,proto3,oneof"`
+}
+
+type SearchResult_Template struct {
+ // Deprecated: Do not use.
+ Template *TemplateSearchResult `protobuf:"bytes,6,opt,name=template,proto3,oneof"`
+}
+
+type SearchResult_CuratedPlugin struct {
+ CuratedPlugin *CuratedPluginSearchResult `protobuf:"bytes,7,opt,name=curated_plugin,json=curatedPlugin,proto3,oneof"`
+}
+
+func (*SearchResult_Repository) isSearchResult_Item() {}
+
+func (*SearchResult_Organization) isSearchResult_Item() {}
+
+func (*SearchResult_User) isSearchResult_Item() {}
+
+func (*SearchResult_Team) isSearchResult_Item() {}
+
+func (*SearchResult_Plugin) isSearchResult_Item() {}
+
+func (*SearchResult_Template) isSearchResult_Item() {}
+
+func (*SearchResult_CuratedPlugin) isSearchResult_Item() {}
+
+type SearchRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The search string.
+ Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is 0.
+ PageToken uint32 `protobuf:"varint,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ // Empty list means show all. Supplying one or more enums will
+ // limit the search to only the requested resources.
+ // Supplying all possible enums is equivalent to empty list of filters.
+ Filters []SearchFilter `protobuf:"varint,4,rep,packed,name=filters,proto3,enum=buf.alpha.registry.v1alpha1.SearchFilter" json:"filters,omitempty"`
+}
+
+func (x *SearchRequest) Reset() {
+ *x = SearchRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SearchRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SearchRequest) ProtoMessage() {}
+
+func (x *SearchRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 SearchRequest.ProtoReflect.Descriptor instead.
+func (*SearchRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *SearchRequest) GetQuery() string {
+ if x != nil {
+ return x.Query
+ }
+ return ""
+}
+
+func (x *SearchRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *SearchRequest) GetPageToken() uint32 {
+ if x != nil {
+ return x.PageToken
+ }
+ return 0
+}
+
+func (x *SearchRequest) GetFilters() []SearchFilter {
+ if x != nil {
+ return x.Filters
+ }
+ return nil
+}
+
+type SearchResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ SearchResults []*SearchResult `protobuf:"bytes,1,rep,name=search_results,json=searchResults,proto3" json:"search_results,omitempty"`
+ // There are no more pages if this is 0.
+ NextPageToken uint32 `protobuf:"varint,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *SearchResponse) Reset() {
+ *x = SearchResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SearchResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SearchResponse) ProtoMessage() {}
+
+func (x *SearchResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 SearchResponse.ProtoReflect.Descriptor instead.
+func (*SearchResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *SearchResponse) GetSearchResults() []*SearchResult {
+ if x != nil {
+ return x.SearchResults
+ }
+ return nil
+}
+
+func (x *SearchResponse) GetNextPageToken() uint32 {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return 0
+}
+
+type SearchTagRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the repository.
+ RepositoryOwner string `protobuf:"bytes,1,opt,name=repository_owner,json=repositoryOwner,proto3" json:"repository_owner,omitempty"`
+ // The name of the repository.
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The search string.
+ Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
+ PageSize uint32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ // The field to order results by.
+ OrderBy OrderBy `protobuf:"varint,6,opt,name=order_by,json=orderBy,proto3,enum=buf.alpha.registry.v1alpha1.OrderBy" json:"order_by,omitempty"`
+ // Reverse orders results in descending order.
+ Reverse bool `protobuf:"varint,7,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *SearchTagRequest) Reset() {
+ *x = SearchTagRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SearchTagRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SearchTagRequest) ProtoMessage() {}
+
+func (x *SearchTagRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 SearchTagRequest.ProtoReflect.Descriptor instead.
+func (*SearchTagRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *SearchTagRequest) GetRepositoryOwner() string {
+ if x != nil {
+ return x.RepositoryOwner
+ }
+ return ""
+}
+
+func (x *SearchTagRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *SearchTagRequest) GetQuery() string {
+ if x != nil {
+ return x.Query
+ }
+ return ""
+}
+
+func (x *SearchTagRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *SearchTagRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *SearchTagRequest) GetOrderBy() OrderBy {
+ if x != nil {
+ return x.OrderBy
+ }
+ return OrderBy_ORDER_BY_UNSPECIFIED
+}
+
+func (x *SearchTagRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type SearchTagResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RepositoryTags []*RepositoryTag `protobuf:"bytes,1,rep,name=repository_tags,json=repositoryTags,proto3" json:"repository_tags,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *SearchTagResponse) Reset() {
+ *x = SearchTagResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SearchTagResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SearchTagResponse) ProtoMessage() {}
+
+func (x *SearchTagResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 SearchTagResponse.ProtoReflect.Descriptor instead.
+func (*SearchTagResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *SearchTagResponse) GetRepositoryTags() []*RepositoryTag {
+ if x != nil {
+ return x.RepositoryTags
+ }
+ return nil
+}
+
+func (x *SearchTagResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type SearchDraftRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The owner of the repository.
+ RepositoryOwner string `protobuf:"bytes,1,opt,name=repository_owner,json=repositoryOwner,proto3" json:"repository_owner,omitempty"`
+ // The name of the repository.
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The search string.
+ Query string `protobuf:"bytes,3,opt,name=query,proto3" json:"query,omitempty"`
+ PageSize uint32 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,5,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ // The field to order results by.
+ OrderBy OrderBy `protobuf:"varint,6,opt,name=order_by,json=orderBy,proto3,enum=buf.alpha.registry.v1alpha1.OrderBy" json:"order_by,omitempty"`
+ // Reverse orders results in descending order.
+ Reverse bool `protobuf:"varint,7,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *SearchDraftRequest) Reset() {
+ *x = SearchDraftRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SearchDraftRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SearchDraftRequest) ProtoMessage() {}
+
+func (x *SearchDraftRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 SearchDraftRequest.ProtoReflect.Descriptor instead.
+func (*SearchDraftRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{12}
+}
+
+func (x *SearchDraftRequest) GetRepositoryOwner() string {
+ if x != nil {
+ return x.RepositoryOwner
+ }
+ return ""
+}
+
+func (x *SearchDraftRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *SearchDraftRequest) GetQuery() string {
+ if x != nil {
+ return x.Query
+ }
+ return ""
+}
+
+func (x *SearchDraftRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *SearchDraftRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *SearchDraftRequest) GetOrderBy() OrderBy {
+ if x != nil {
+ return x.OrderBy
+ }
+ return OrderBy_ORDER_BY_UNSPECIFIED
+}
+
+func (x *SearchDraftRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type SearchDraftResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ RepositoryCommits []*RepositoryCommit `protobuf:"bytes,1,rep,name=repository_commits,json=repositoryCommits,proto3" json:"repository_commits,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *SearchDraftResponse) Reset() {
+ *x = SearchDraftResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SearchDraftResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SearchDraftResponse) ProtoMessage() {}
+
+func (x *SearchDraftResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_search_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 SearchDraftResponse.ProtoReflect.Descriptor instead.
+func (*SearchDraftResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP(), []int{13}
+}
+
+func (x *SearchDraftResponse) GetRepositoryCommits() []*RepositoryCommit {
+ if x != nil {
+ return x.RepositoryCommits
+ }
+ return nil
+}
+
+func (x *SearchDraftResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+var File_buf_alpha_registry_v1alpha1_search_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_search_proto_rawDesc = []byte{
+ 0x0a, 0x28, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x65,
+ 0x61, 0x72, 0x63, 0x68, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x28, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2f, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x1a, 0x2c, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a,
+ 0x33, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x30, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x67,
+ 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xbb, 0x01, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c,
+ 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x47, 0x0a, 0x0a, 0x76,
+ 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x69,
+ 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69,
+ 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74,
+ 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63,
+ 0x61, 0x74, 0x65, 0x64, 0x22, 0x3e, 0x0a, 0x18, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74,
+ 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
+ 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x60, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x61, 0x72,
+ 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
+ 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61,
+ 0x74, 0x65, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65, 0x61, 0x63, 0x74,
+ 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x22, 0x63, 0x0a, 0x10, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x65,
+ 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x2b,
+ 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e,
+ 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0xc1, 0x01, 0x0a, 0x12,
+ 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75,
+ 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
+ 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18,
+ 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0a,
+ 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52,
+ 0x0a, 0x76, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x64,
+ 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52,
+ 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22,
+ 0x55, 0x0a, 0x19, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x0e, 0x0a, 0x02,
+ 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65,
+ 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, 0xc3, 0x01, 0x0a, 0x14, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12,
+ 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12,
+ 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e,
+ 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x4d, 0x0a, 0x0a, 0x76, 0x69, 0x73,
+ 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2d, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67,
+ 0x69, 0x6e, 0x56, 0x69, 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x52, 0x0a, 0x76, 0x69,
+ 0x73, 0x69, 0x62, 0x69, 0x6c, 0x69, 0x74, 0x79, 0x12, 0x1e, 0x0a, 0x0a, 0x64, 0x65, 0x70, 0x72,
+ 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x64, 0x65,
+ 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x3a, 0x02, 0x18, 0x01, 0x22, 0xd9, 0x04, 0x0a,
+ 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x55, 0x0a,
+ 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0b, 0x32, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68,
+ 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x12, 0x5b, 0x0a, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x35, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c,
+ 0x74, 0x48, 0x00, 0x52, 0x0c, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x12, 0x43, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73,
+ 0x65, 0x72, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48, 0x00,
+ 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x43, 0x0a, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x54, 0x65, 0x61, 0x6d, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73,
+ 0x75, 0x6c, 0x74, 0x48, 0x00, 0x52, 0x04, 0x74, 0x65, 0x61, 0x6d, 0x12, 0x4d, 0x0a, 0x06, 0x70,
+ 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2f, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42, 0x02, 0x18, 0x01,
+ 0x48, 0x00, 0x52, 0x06, 0x70, 0x6c, 0x75, 0x67, 0x69, 0x6e, 0x12, 0x53, 0x0a, 0x08, 0x74, 0x65,
+ 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x31, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x65, 0x6d, 0x70, 0x6c,
+ 0x61, 0x74, 0x65, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x42,
+ 0x02, 0x18, 0x01, 0x48, 0x00, 0x52, 0x08, 0x74, 0x65, 0x6d, 0x70, 0x6c, 0x61, 0x74, 0x65, 0x12,
+ 0x5f, 0x0a, 0x0e, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x70, 0x6c, 0x75, 0x67, 0x69,
+ 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75,
+ 0x67, 0x69, 0x6e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x48,
+ 0x00, 0x52, 0x0d, 0x63, 0x75, 0x72, 0x61, 0x74, 0x65, 0x64, 0x50, 0x6c, 0x75, 0x67, 0x69, 0x6e,
+ 0x42, 0x06, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x22, 0xa6, 0x01, 0x0a, 0x0d, 0x53, 0x65, 0x61,
+ 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75,
+ 0x65, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79,
+ 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a,
+ 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x43, 0x0a, 0x07,
+ 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x0e, 0x32, 0x29, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72,
+ 0x63, 0x68, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x52, 0x07, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72,
+ 0x73, 0x22, 0x8a, 0x01, 0x0a, 0x0e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x50, 0x0a, 0x0e, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x5f, 0x72,
+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63,
+ 0x68, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x0d, 0x73, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52,
+ 0x65, 0x73, 0x75, 0x6c, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x93,
+ 0x02, 0x0a, 0x10, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54, 0x61, 0x67, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72,
+ 0x79, 0x5f, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72,
+ 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x27,
+ 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d,
+ 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74,
+ 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79,
+ 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1b, 0x0a,
+ 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d,
+ 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+ 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x72, 0x64,
+ 0x65, 0x72, 0x5f, 0x62, 0x79, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42,
+ 0x79, 0x52, 0x07, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65,
+ 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76,
+ 0x65, 0x72, 0x73, 0x65, 0x22, 0x90, 0x01, 0x0a, 0x11, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54,
+ 0x61, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x53, 0x0a, 0x0f, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x74, 0x61, 0x67, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x52,
+ 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x54, 0x61, 0x67, 0x73, 0x12,
+ 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61,
+ 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x95, 0x02, 0x0a, 0x12, 0x53, 0x65, 0x61, 0x72,
+ 0x63, 0x68, 0x44, 0x72, 0x61, 0x66, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x29,
+ 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61,
+ 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65,
+ 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67,
+ 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x3f, 0x0a, 0x08, 0x6f, 0x72, 0x64, 0x65, 0x72, 0x5f, 0x62, 0x79,
+ 0x18, 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x52, 0x07, 0x6f, 0x72,
+ 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65,
+ 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22,
+ 0x9b, 0x01, 0x0a, 0x13, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x72, 0x61, 0x66, 0x74, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x5c, 0x0a, 0x12, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x63, 0x6f, 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f, 0x6d, 0x6d,
+ 0x69, 0x74, 0x52, 0x11, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x43, 0x6f,
+ 0x6d, 0x6d, 0x69, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
+ 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x2a, 0xfb, 0x01,
+ 0x0a, 0x0c, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x1d,
+ 0x0a, 0x19, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f,
+ 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a,
+ 0x12, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x55,
+ 0x53, 0x45, 0x52, 0x10, 0x01, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x5f,
+ 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x4f, 0x52, 0x47, 0x41, 0x4e, 0x49, 0x5a, 0x41, 0x54,
+ 0x49, 0x4f, 0x4e, 0x10, 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x5f,
+ 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x4f, 0x52,
+ 0x59, 0x10, 0x03, 0x12, 0x1c, 0x0a, 0x14, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x5f, 0x46, 0x49,
+ 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, 0x04, 0x1a, 0x02, 0x08,
+ 0x01, 0x12, 0x1e, 0x0a, 0x16, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x5f, 0x46, 0x49, 0x4c, 0x54,
+ 0x45, 0x52, 0x5f, 0x54, 0x45, 0x4d, 0x50, 0x4c, 0x41, 0x54, 0x45, 0x10, 0x05, 0x1a, 0x02, 0x08,
+ 0x01, 0x12, 0x16, 0x0a, 0x12, 0x53, 0x45, 0x41, 0x52, 0x43, 0x48, 0x5f, 0x46, 0x49, 0x4c, 0x54,
+ 0x45, 0x52, 0x5f, 0x54, 0x45, 0x41, 0x4d, 0x10, 0x06, 0x12, 0x20, 0x0a, 0x1c, 0x53, 0x45, 0x41,
+ 0x52, 0x43, 0x48, 0x5f, 0x46, 0x49, 0x4c, 0x54, 0x45, 0x52, 0x5f, 0x43, 0x55, 0x52, 0x41, 0x54,
+ 0x45, 0x44, 0x5f, 0x50, 0x4c, 0x55, 0x47, 0x49, 0x4e, 0x10, 0x07, 0x2a, 0x6a, 0x0a, 0x07, 0x4f,
+ 0x72, 0x64, 0x65, 0x72, 0x42, 0x79, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f,
+ 0x42, 0x59, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
+ 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x43, 0x52, 0x45,
+ 0x41, 0x54, 0x45, 0x5f, 0x54, 0x49, 0x4d, 0x45, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x4f, 0x52,
+ 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59, 0x5f, 0x55, 0x50, 0x44, 0x41, 0x54, 0x45, 0x5f, 0x54, 0x49,
+ 0x4d, 0x45, 0x10, 0x02, 0x12, 0x11, 0x0a, 0x0d, 0x4f, 0x52, 0x44, 0x45, 0x52, 0x5f, 0x42, 0x59,
+ 0x5f, 0x4e, 0x41, 0x4d, 0x45, 0x10, 0x03, 0x32, 0xd0, 0x02, 0x0a, 0x0d, 0x53, 0x65, 0x61, 0x72,
+ 0x63, 0x68, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x61, 0x0a, 0x06, 0x53, 0x65, 0x61,
+ 0x72, 0x63, 0x68, 0x12, 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65,
+ 0x61, 0x72, 0x63, 0x68, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x09,
+ 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54, 0x61, 0x67, 0x12, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54, 0x61,
+ 0x67, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x54, 0x61, 0x67,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x0b, 0x53, 0x65, 0x61, 0x72,
+ 0x63, 0x68, 0x44, 0x72, 0x61, 0x66, 0x74, 0x12, 0x2f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x72, 0x61, 0x66,
+ 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x44, 0x72, 0x61,
+ 0x66, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x98, 0x02, 0x0a, 0x1f, 0x63,
+ 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b,
+ 0x53, 0x65, 0x61, 0x72, 0x63, 0x68, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69,
+ 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67,
+ 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02,
+ 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42,
+ 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66,
+ 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c,
+ 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_search_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_search_proto_rawDescData = file_buf_alpha_registry_v1alpha1_search_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_search_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_search_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_search_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_search_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_search_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_search_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_buf_alpha_registry_v1alpha1_search_proto_msgTypes = make([]protoimpl.MessageInfo, 14)
+var file_buf_alpha_registry_v1alpha1_search_proto_goTypes = []interface{}{
+ (SearchFilter)(0), // 0: buf.alpha.registry.v1alpha1.SearchFilter
+ (OrderBy)(0), // 1: buf.alpha.registry.v1alpha1.OrderBy
+ (*RepositorySearchResult)(nil), // 2: buf.alpha.registry.v1alpha1.RepositorySearchResult
+ (*OrganizationSearchResult)(nil), // 3: buf.alpha.registry.v1alpha1.OrganizationSearchResult
+ (*UserSearchResult)(nil), // 4: buf.alpha.registry.v1alpha1.UserSearchResult
+ (*TeamSearchResult)(nil), // 5: buf.alpha.registry.v1alpha1.TeamSearchResult
+ (*PluginSearchResult)(nil), // 6: buf.alpha.registry.v1alpha1.PluginSearchResult
+ (*CuratedPluginSearchResult)(nil), // 7: buf.alpha.registry.v1alpha1.CuratedPluginSearchResult
+ (*TemplateSearchResult)(nil), // 8: buf.alpha.registry.v1alpha1.TemplateSearchResult
+ (*SearchResult)(nil), // 9: buf.alpha.registry.v1alpha1.SearchResult
+ (*SearchRequest)(nil), // 10: buf.alpha.registry.v1alpha1.SearchRequest
+ (*SearchResponse)(nil), // 11: buf.alpha.registry.v1alpha1.SearchResponse
+ (*SearchTagRequest)(nil), // 12: buf.alpha.registry.v1alpha1.SearchTagRequest
+ (*SearchTagResponse)(nil), // 13: buf.alpha.registry.v1alpha1.SearchTagResponse
+ (*SearchDraftRequest)(nil), // 14: buf.alpha.registry.v1alpha1.SearchDraftRequest
+ (*SearchDraftResponse)(nil), // 15: buf.alpha.registry.v1alpha1.SearchDraftResponse
+ (Visibility)(0), // 16: buf.alpha.registry.v1alpha1.Visibility
+ (PluginVisibility)(0), // 17: buf.alpha.registry.v1alpha1.PluginVisibility
+ (*RepositoryTag)(nil), // 18: buf.alpha.registry.v1alpha1.RepositoryTag
+ (*RepositoryCommit)(nil), // 19: buf.alpha.registry.v1alpha1.RepositoryCommit
+}
+var file_buf_alpha_registry_v1alpha1_search_proto_depIdxs = []int32{
+ 16, // 0: buf.alpha.registry.v1alpha1.RepositorySearchResult.visibility:type_name -> buf.alpha.registry.v1alpha1.Visibility
+ 17, // 1: buf.alpha.registry.v1alpha1.PluginSearchResult.visibility:type_name -> buf.alpha.registry.v1alpha1.PluginVisibility
+ 17, // 2: buf.alpha.registry.v1alpha1.TemplateSearchResult.visibility:type_name -> buf.alpha.registry.v1alpha1.PluginVisibility
+ 2, // 3: buf.alpha.registry.v1alpha1.SearchResult.repository:type_name -> buf.alpha.registry.v1alpha1.RepositorySearchResult
+ 3, // 4: buf.alpha.registry.v1alpha1.SearchResult.organization:type_name -> buf.alpha.registry.v1alpha1.OrganizationSearchResult
+ 4, // 5: buf.alpha.registry.v1alpha1.SearchResult.user:type_name -> buf.alpha.registry.v1alpha1.UserSearchResult
+ 5, // 6: buf.alpha.registry.v1alpha1.SearchResult.team:type_name -> buf.alpha.registry.v1alpha1.TeamSearchResult
+ 6, // 7: buf.alpha.registry.v1alpha1.SearchResult.plugin:type_name -> buf.alpha.registry.v1alpha1.PluginSearchResult
+ 8, // 8: buf.alpha.registry.v1alpha1.SearchResult.template:type_name -> buf.alpha.registry.v1alpha1.TemplateSearchResult
+ 7, // 9: buf.alpha.registry.v1alpha1.SearchResult.curated_plugin:type_name -> buf.alpha.registry.v1alpha1.CuratedPluginSearchResult
+ 0, // 10: buf.alpha.registry.v1alpha1.SearchRequest.filters:type_name -> buf.alpha.registry.v1alpha1.SearchFilter
+ 9, // 11: buf.alpha.registry.v1alpha1.SearchResponse.search_results:type_name -> buf.alpha.registry.v1alpha1.SearchResult
+ 1, // 12: buf.alpha.registry.v1alpha1.SearchTagRequest.order_by:type_name -> buf.alpha.registry.v1alpha1.OrderBy
+ 18, // 13: buf.alpha.registry.v1alpha1.SearchTagResponse.repository_tags:type_name -> buf.alpha.registry.v1alpha1.RepositoryTag
+ 1, // 14: buf.alpha.registry.v1alpha1.SearchDraftRequest.order_by:type_name -> buf.alpha.registry.v1alpha1.OrderBy
+ 19, // 15: buf.alpha.registry.v1alpha1.SearchDraftResponse.repository_commits:type_name -> buf.alpha.registry.v1alpha1.RepositoryCommit
+ 10, // 16: buf.alpha.registry.v1alpha1.SearchService.Search:input_type -> buf.alpha.registry.v1alpha1.SearchRequest
+ 12, // 17: buf.alpha.registry.v1alpha1.SearchService.SearchTag:input_type -> buf.alpha.registry.v1alpha1.SearchTagRequest
+ 14, // 18: buf.alpha.registry.v1alpha1.SearchService.SearchDraft:input_type -> buf.alpha.registry.v1alpha1.SearchDraftRequest
+ 11, // 19: buf.alpha.registry.v1alpha1.SearchService.Search:output_type -> buf.alpha.registry.v1alpha1.SearchResponse
+ 13, // 20: buf.alpha.registry.v1alpha1.SearchService.SearchTag:output_type -> buf.alpha.registry.v1alpha1.SearchTagResponse
+ 15, // 21: buf.alpha.registry.v1alpha1.SearchService.SearchDraft:output_type -> buf.alpha.registry.v1alpha1.SearchDraftResponse
+ 19, // [19:22] is the sub-list for method output_type
+ 16, // [16:19] is the sub-list for method input_type
+ 16, // [16:16] is the sub-list for extension type_name
+ 16, // [16:16] is the sub-list for extension extendee
+ 0, // [0:16] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_search_proto_init() }
+func file_buf_alpha_registry_v1alpha1_search_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_search_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_plugin_proto_init()
+ file_buf_alpha_registry_v1alpha1_repository_proto_init()
+ file_buf_alpha_registry_v1alpha1_repository_commit_proto_init()
+ file_buf_alpha_registry_v1alpha1_repository_tag_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RepositorySearchResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OrganizationSearchResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UserSearchResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TeamSearchResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*PluginSearchResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CuratedPluginSearchResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*TemplateSearchResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SearchResult); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SearchRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SearchResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SearchTagRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SearchTagResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SearchDraftRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SearchDraftResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_search_proto_msgTypes[7].OneofWrappers = []interface{}{
+ (*SearchResult_Repository)(nil),
+ (*SearchResult_Organization)(nil),
+ (*SearchResult_User)(nil),
+ (*SearchResult_Team)(nil),
+ (*SearchResult_Plugin)(nil),
+ (*SearchResult_Template)(nil),
+ (*SearchResult_CuratedPlugin)(nil),
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_search_proto_rawDesc,
+ NumEnums: 2,
+ NumMessages: 14,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_search_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_search_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_search_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_search_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_search_proto = out.File
+ file_buf_alpha_registry_v1alpha1_search_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_search_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_search_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio.pb.go
new file mode 100644
index 000000000..e43e18027
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio.pb.go
@@ -0,0 +1,529 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/studio.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// The protocols supported by Studio agent.
+type StudioAgentProtocol int32
+
+const (
+ StudioAgentProtocol_STUDIO_AGENT_PROTOCOL_UNSPECIFIED StudioAgentProtocol = 0
+ StudioAgentProtocol_STUDIO_AGENT_PROTOCOL_GRPC StudioAgentProtocol = 1
+ StudioAgentProtocol_STUDIO_AGENT_PROTOCOL_CONNECT StudioAgentProtocol = 2
+)
+
+// Enum value maps for StudioAgentProtocol.
+var (
+ StudioAgentProtocol_name = map[int32]string{
+ 0: "STUDIO_AGENT_PROTOCOL_UNSPECIFIED",
+ 1: "STUDIO_AGENT_PROTOCOL_GRPC",
+ 2: "STUDIO_AGENT_PROTOCOL_CONNECT",
+ }
+ StudioAgentProtocol_value = map[string]int32{
+ "STUDIO_AGENT_PROTOCOL_UNSPECIFIED": 0,
+ "STUDIO_AGENT_PROTOCOL_GRPC": 1,
+ "STUDIO_AGENT_PROTOCOL_CONNECT": 2,
+ }
+)
+
+func (x StudioAgentProtocol) Enum() *StudioAgentProtocol {
+ p := new(StudioAgentProtocol)
+ *p = x
+ return p
+}
+
+func (x StudioAgentProtocol) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (StudioAgentProtocol) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_studio_proto_enumTypes[0].Descriptor()
+}
+
+func (StudioAgentProtocol) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_studio_proto_enumTypes[0]
+}
+
+func (x StudioAgentProtocol) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use StudioAgentProtocol.Descriptor instead.
+func (StudioAgentProtocol) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_proto_rawDescGZIP(), []int{0}
+}
+
+// StudioAgentPreset is the information about an agent preset in the Studio.
+type StudioAgentPreset struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The target agent URL in the Studio.
+ Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"`
+ // The optional alias of the agent URL.
+ Alias string `protobuf:"bytes,2,opt,name=alias,proto3" json:"alias,omitempty"`
+ // The protocol the agent should use to forward requests.
+ Protocol StudioAgentProtocol `protobuf:"varint,3,opt,name=protocol,proto3,enum=buf.alpha.registry.v1alpha1.StudioAgentProtocol" json:"protocol,omitempty"`
+}
+
+func (x *StudioAgentPreset) Reset() {
+ *x = StudioAgentPreset{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StudioAgentPreset) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StudioAgentPreset) ProtoMessage() {}
+
+func (x *StudioAgentPreset) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_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 StudioAgentPreset.ProtoReflect.Descriptor instead.
+func (*StudioAgentPreset) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *StudioAgentPreset) GetUrl() string {
+ if x != nil {
+ return x.Url
+ }
+ return ""
+}
+
+func (x *StudioAgentPreset) GetAlias() string {
+ if x != nil {
+ return x.Alias
+ }
+ return ""
+}
+
+func (x *StudioAgentPreset) GetProtocol() StudioAgentProtocol {
+ if x != nil {
+ return x.Protocol
+ }
+ return StudioAgentProtocol_STUDIO_AGENT_PROTOCOL_UNSPECIFIED
+}
+
+type ListStudioAgentPresetsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *ListStudioAgentPresetsRequest) Reset() {
+ *x = ListStudioAgentPresetsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListStudioAgentPresetsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListStudioAgentPresetsRequest) ProtoMessage() {}
+
+func (x *ListStudioAgentPresetsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_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 ListStudioAgentPresetsRequest.ProtoReflect.Descriptor instead.
+func (*ListStudioAgentPresetsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_proto_rawDescGZIP(), []int{1}
+}
+
+type ListStudioAgentPresetsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Agents []*StudioAgentPreset `protobuf:"bytes,1,rep,name=agents,proto3" json:"agents,omitempty"`
+}
+
+func (x *ListStudioAgentPresetsResponse) Reset() {
+ *x = ListStudioAgentPresetsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListStudioAgentPresetsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListStudioAgentPresetsResponse) ProtoMessage() {}
+
+func (x *ListStudioAgentPresetsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_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 ListStudioAgentPresetsResponse.ProtoReflect.Descriptor instead.
+func (*ListStudioAgentPresetsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *ListStudioAgentPresetsResponse) GetAgents() []*StudioAgentPreset {
+ if x != nil {
+ return x.Agents
+ }
+ return nil
+}
+
+type SetStudioAgentPresetsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Agents []*StudioAgentPreset `protobuf:"bytes,1,rep,name=agents,proto3" json:"agents,omitempty"`
+}
+
+func (x *SetStudioAgentPresetsRequest) Reset() {
+ *x = SetStudioAgentPresetsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetStudioAgentPresetsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetStudioAgentPresetsRequest) ProtoMessage() {}
+
+func (x *SetStudioAgentPresetsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_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 SetStudioAgentPresetsRequest.ProtoReflect.Descriptor instead.
+func (*SetStudioAgentPresetsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *SetStudioAgentPresetsRequest) GetAgents() []*StudioAgentPreset {
+ if x != nil {
+ return x.Agents
+ }
+ return nil
+}
+
+type SetStudioAgentPresetsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *SetStudioAgentPresetsResponse) Reset() {
+ *x = SetStudioAgentPresetsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *SetStudioAgentPresetsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SetStudioAgentPresetsResponse) ProtoMessage() {}
+
+func (x *SetStudioAgentPresetsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_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 SetStudioAgentPresetsResponse.ProtoReflect.Descriptor instead.
+func (*SetStudioAgentPresetsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_proto_rawDescGZIP(), []int{4}
+}
+
+var File_buf_alpha_registry_v1alpha1_studio_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_studio_proto_rawDesc = []byte{
+ 0x0a, 0x28, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x74,
+ 0x75, 0x64, 0x69, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x22, 0x89, 0x01, 0x0a, 0x11, 0x53, 0x74, 0x75, 0x64,
+ 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x12, 0x10, 0x0a,
+ 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12,
+ 0x14, 0x0a, 0x05, 0x61, 0x6c, 0x69, 0x61, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05,
+ 0x61, 0x6c, 0x69, 0x61, 0x73, 0x12, 0x4c, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f,
+ 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e,
+ 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x22, 0x1f, 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69,
+ 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x22, 0x68, 0x0a, 0x1e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64,
+ 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73,
+ 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74,
+ 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x66,
+ 0x0a, 0x1c, 0x53, 0x65, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74,
+ 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x46,
+ 0x0a, 0x06, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2e,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x75,
+ 0x64, 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x52, 0x06,
+ 0x61, 0x67, 0x65, 0x6e, 0x74, 0x73, 0x22, 0x1f, 0x0a, 0x1d, 0x53, 0x65, 0x74, 0x53, 0x74, 0x75,
+ 0x64, 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x7f, 0x0a, 0x13, 0x53, 0x74, 0x75, 0x64, 0x69,
+ 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x25,
+ 0x0a, 0x21, 0x53, 0x54, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x50,
+ 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46,
+ 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1e, 0x0a, 0x1a, 0x53, 0x54, 0x55, 0x44, 0x49, 0x4f, 0x5f,
+ 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x47,
+ 0x52, 0x50, 0x43, 0x10, 0x01, 0x12, 0x21, 0x0a, 0x1d, 0x53, 0x54, 0x55, 0x44, 0x49, 0x4f, 0x5f,
+ 0x41, 0x47, 0x45, 0x4e, 0x54, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x43,
+ 0x4f, 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x02, 0x32, 0xb4, 0x02, 0x0a, 0x0d, 0x53, 0x74, 0x75,
+ 0x64, 0x69, 0x6f, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x91, 0x01, 0x0a, 0x16, 0x4c,
+ 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72,
+ 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x41, 0x67,
+ 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x3b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50,
+ 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8e,
+ 0x01, 0x0a, 0x15, 0x53, 0x65, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e,
+ 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x12, 0x39, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f,
+ 0x41, 0x67, 0x65, 0x6e, 0x74, 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x53, 0x65, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x41, 0x67, 0x65, 0x6e, 0x74,
+ 0x50, 0x72, 0x65, 0x73, 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42,
+ 0x98, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x42, 0x0b, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62,
+ 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76,
+ 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f,
+ 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03,
+ 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2,
+ 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50,
+ 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a,
+ 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_studio_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_studio_proto_rawDescData = file_buf_alpha_registry_v1alpha1_studio_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_studio_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_studio_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_studio_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_studio_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_studio_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_studio_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
+var file_buf_alpha_registry_v1alpha1_studio_proto_goTypes = []interface{}{
+ (StudioAgentProtocol)(0), // 0: buf.alpha.registry.v1alpha1.StudioAgentProtocol
+ (*StudioAgentPreset)(nil), // 1: buf.alpha.registry.v1alpha1.StudioAgentPreset
+ (*ListStudioAgentPresetsRequest)(nil), // 2: buf.alpha.registry.v1alpha1.ListStudioAgentPresetsRequest
+ (*ListStudioAgentPresetsResponse)(nil), // 3: buf.alpha.registry.v1alpha1.ListStudioAgentPresetsResponse
+ (*SetStudioAgentPresetsRequest)(nil), // 4: buf.alpha.registry.v1alpha1.SetStudioAgentPresetsRequest
+ (*SetStudioAgentPresetsResponse)(nil), // 5: buf.alpha.registry.v1alpha1.SetStudioAgentPresetsResponse
+}
+var file_buf_alpha_registry_v1alpha1_studio_proto_depIdxs = []int32{
+ 0, // 0: buf.alpha.registry.v1alpha1.StudioAgentPreset.protocol:type_name -> buf.alpha.registry.v1alpha1.StudioAgentProtocol
+ 1, // 1: buf.alpha.registry.v1alpha1.ListStudioAgentPresetsResponse.agents:type_name -> buf.alpha.registry.v1alpha1.StudioAgentPreset
+ 1, // 2: buf.alpha.registry.v1alpha1.SetStudioAgentPresetsRequest.agents:type_name -> buf.alpha.registry.v1alpha1.StudioAgentPreset
+ 2, // 3: buf.alpha.registry.v1alpha1.StudioService.ListStudioAgentPresets:input_type -> buf.alpha.registry.v1alpha1.ListStudioAgentPresetsRequest
+ 4, // 4: buf.alpha.registry.v1alpha1.StudioService.SetStudioAgentPresets:input_type -> buf.alpha.registry.v1alpha1.SetStudioAgentPresetsRequest
+ 3, // 5: buf.alpha.registry.v1alpha1.StudioService.ListStudioAgentPresets:output_type -> buf.alpha.registry.v1alpha1.ListStudioAgentPresetsResponse
+ 5, // 6: buf.alpha.registry.v1alpha1.StudioService.SetStudioAgentPresets:output_type -> buf.alpha.registry.v1alpha1.SetStudioAgentPresetsResponse
+ 5, // [5:7] is the sub-list for method output_type
+ 3, // [3:5] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_studio_proto_init() }
+func file_buf_alpha_registry_v1alpha1_studio_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_studio_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StudioAgentPreset); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListStudioAgentPresetsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListStudioAgentPresetsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetStudioAgentPresetsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*SetStudioAgentPresetsResponse); 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_buf_alpha_registry_v1alpha1_studio_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 5,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_studio_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_studio_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_studio_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_studio_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_studio_proto = out.File
+ file_buf_alpha_registry_v1alpha1_studio_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_studio_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_studio_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio_request.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio_request.pb.go
new file mode 100644
index 000000000..f83206ada
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/studio_request.pb.go
@@ -0,0 +1,1165 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/studio_request.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// StudioProtocol are the supported protocols for Studio Requests.
+type StudioProtocol int32
+
+const (
+ // STUDIO_PROTOCOL_UNSPECIFIED is a safe default for requests with no protocol
+ // defined.
+ StudioProtocol_STUDIO_PROTOCOL_UNSPECIFIED StudioProtocol = 0
+ // STUDIO_PROTOCOL_CONNECT is the Connect protocol in Studio.
+ StudioProtocol_STUDIO_PROTOCOL_CONNECT StudioProtocol = 1
+ // STUDIO_PROTOCOL_GRPC is the gRPC protocol in Studio.
+ StudioProtocol_STUDIO_PROTOCOL_GRPC StudioProtocol = 2
+ // STUDIO_PROTOCOL_GRPC_WEB is the gRPC-web protocol in Studio.
+ StudioProtocol_STUDIO_PROTOCOL_GRPC_WEB StudioProtocol = 3
+)
+
+// Enum value maps for StudioProtocol.
+var (
+ StudioProtocol_name = map[int32]string{
+ 0: "STUDIO_PROTOCOL_UNSPECIFIED",
+ 1: "STUDIO_PROTOCOL_CONNECT",
+ 2: "STUDIO_PROTOCOL_GRPC",
+ 3: "STUDIO_PROTOCOL_GRPC_WEB",
+ }
+ StudioProtocol_value = map[string]int32{
+ "STUDIO_PROTOCOL_UNSPECIFIED": 0,
+ "STUDIO_PROTOCOL_CONNECT": 1,
+ "STUDIO_PROTOCOL_GRPC": 2,
+ "STUDIO_PROTOCOL_GRPC_WEB": 3,
+ }
+)
+
+func (x StudioProtocol) Enum() *StudioProtocol {
+ p := new(StudioProtocol)
+ *p = x
+ return p
+}
+
+func (x StudioProtocol) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (StudioProtocol) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_enumTypes[0].Descriptor()
+}
+
+func (StudioProtocol) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_studio_request_proto_enumTypes[0]
+}
+
+func (x StudioProtocol) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use StudioProtocol.Descriptor instead.
+func (StudioProtocol) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP(), []int{0}
+}
+
+// CreateStudioRequestRequest is the proto request representation of the
+// CreateStudioRequest method.
+type CreateStudioRequestRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The linked BSR repository owner name (user or organization).
+ RepositoryOwner string `protobuf:"bytes,1,opt,name=repository_owner,json=repositoryOwner,proto3" json:"repository_owner,omitempty"`
+ // The linked BSR repository name.
+ RepositoryName string `protobuf:"bytes,2,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The friendly name of this request.
+ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
+ // The target base URL of this request.
+ TargetBaseUrl string `protobuf:"bytes,4,opt,name=target_base_url,json=targetBaseUrl,proto3" json:"target_base_url,omitempty"`
+ // The target service name as defined in the BSR repository.
+ Service string `protobuf:"bytes,5,opt,name=service,proto3" json:"service,omitempty"`
+ // The target RPC method name as defined in the BSR repository.
+ Method string `protobuf:"bytes,6,opt,name=method,proto3" json:"method,omitempty"`
+ // The request body as defined in Studio.
+ Body string `protobuf:"bytes,7,opt,name=body,proto3" json:"body,omitempty"`
+ // The request headers as defined in Studio.
+ Headers map[string]string `protobuf:"bytes,8,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Should this request include cookies from the Studio current session?
+ IncludeCookies bool `protobuf:"varint,9,opt,name=include_cookies,json=includeCookies,proto3" json:"include_cookies,omitempty"`
+ // The protocol that Studio uses to send this request.
+ Protocol StudioProtocol `protobuf:"varint,10,opt,name=protocol,proto3,enum=buf.alpha.registry.v1alpha1.StudioProtocol" json:"protocol,omitempty"`
+ // The agent url (if any) used by Studio to send the request. See
+ // https://docs.buf.build/bsr/studio#via-buf-studio-agent for details.
+ AgentUrl string `protobuf:"bytes,11,opt,name=agent_url,json=agentUrl,proto3" json:"agent_url,omitempty"`
+}
+
+func (x *CreateStudioRequestRequest) Reset() {
+ *x = CreateStudioRequestRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateStudioRequestRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateStudioRequestRequest) ProtoMessage() {}
+
+func (x *CreateStudioRequestRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_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 CreateStudioRequestRequest.ProtoReflect.Descriptor instead.
+func (*CreateStudioRequestRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CreateStudioRequestRequest) GetRepositoryOwner() string {
+ if x != nil {
+ return x.RepositoryOwner
+ }
+ return ""
+}
+
+func (x *CreateStudioRequestRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *CreateStudioRequestRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *CreateStudioRequestRequest) GetTargetBaseUrl() string {
+ if x != nil {
+ return x.TargetBaseUrl
+ }
+ return ""
+}
+
+func (x *CreateStudioRequestRequest) GetService() string {
+ if x != nil {
+ return x.Service
+ }
+ return ""
+}
+
+func (x *CreateStudioRequestRequest) GetMethod() string {
+ if x != nil {
+ return x.Method
+ }
+ return ""
+}
+
+func (x *CreateStudioRequestRequest) GetBody() string {
+ if x != nil {
+ return x.Body
+ }
+ return ""
+}
+
+func (x *CreateStudioRequestRequest) GetHeaders() map[string]string {
+ if x != nil {
+ return x.Headers
+ }
+ return nil
+}
+
+func (x *CreateStudioRequestRequest) GetIncludeCookies() bool {
+ if x != nil {
+ return x.IncludeCookies
+ }
+ return false
+}
+
+func (x *CreateStudioRequestRequest) GetProtocol() StudioProtocol {
+ if x != nil {
+ return x.Protocol
+ }
+ return StudioProtocol_STUDIO_PROTOCOL_UNSPECIFIED
+}
+
+func (x *CreateStudioRequestRequest) GetAgentUrl() string {
+ if x != nil {
+ return x.AgentUrl
+ }
+ return ""
+}
+
+// CreateStudioRequestResponse returns the created StudioRequest.
+type CreateStudioRequestResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Created Studio Request.
+ CreatedRequest *StudioRequest `protobuf:"bytes,1,opt,name=created_request,json=createdRequest,proto3" json:"created_request,omitempty"`
+}
+
+func (x *CreateStudioRequestResponse) Reset() {
+ *x = CreateStudioRequestResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateStudioRequestResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateStudioRequestResponse) ProtoMessage() {}
+
+func (x *CreateStudioRequestResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_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 CreateStudioRequestResponse.ProtoReflect.Descriptor instead.
+func (*CreateStudioRequestResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CreateStudioRequestResponse) GetCreatedRequest() *StudioRequest {
+ if x != nil {
+ return x.CreatedRequest
+ }
+ return nil
+}
+
+// RenameStudioRequestRequest is the proto request representation of the
+// RenameStudioRequest method.
+type RenameStudioRequestRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The Studio Request ID that will be renamed.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // The new name for the request.
+ NewName string `protobuf:"bytes,2,opt,name=new_name,json=newName,proto3" json:"new_name,omitempty"`
+}
+
+func (x *RenameStudioRequestRequest) Reset() {
+ *x = RenameStudioRequestRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RenameStudioRequestRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RenameStudioRequestRequest) ProtoMessage() {}
+
+func (x *RenameStudioRequestRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_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 RenameStudioRequestRequest.ProtoReflect.Descriptor instead.
+func (*RenameStudioRequestRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *RenameStudioRequestRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *RenameStudioRequestRequest) GetNewName() string {
+ if x != nil {
+ return x.NewName
+ }
+ return ""
+}
+
+// RenameStudioRequestResponse returns empty on successful renaming.
+type RenameStudioRequestResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *RenameStudioRequestResponse) Reset() {
+ *x = RenameStudioRequestResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *RenameStudioRequestResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RenameStudioRequestResponse) ProtoMessage() {}
+
+func (x *RenameStudioRequestResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_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 RenameStudioRequestResponse.ProtoReflect.Descriptor instead.
+func (*RenameStudioRequestResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP(), []int{3}
+}
+
+// DeleteStudioRequestRequest is the proto request representation of the
+// DeleteStudioRequest method.
+type DeleteStudioRequestRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The Studio Request ID that will be deleted.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *DeleteStudioRequestRequest) Reset() {
+ *x = DeleteStudioRequestRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteStudioRequestRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteStudioRequestRequest) ProtoMessage() {}
+
+func (x *DeleteStudioRequestRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_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 DeleteStudioRequestRequest.ProtoReflect.Descriptor instead.
+func (*DeleteStudioRequestRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *DeleteStudioRequestRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+// DeleteStudioRequestResponse returns empty on successful deletions.
+type DeleteStudioRequestResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteStudioRequestResponse) Reset() {
+ *x = DeleteStudioRequestResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteStudioRequestResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteStudioRequestResponse) ProtoMessage() {}
+
+func (x *DeleteStudioRequestResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_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 DeleteStudioRequestResponse.ProtoReflect.Descriptor instead.
+func (*DeleteStudioRequestResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP(), []int{5}
+}
+
+// ListStudioRequestsRequest is the proto request representation of the
+// ListStudioRequests method.
+type ListStudioRequestsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The page size for listing studio requests, values between 1-250.
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The page token for paginating. The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ // The listed studio requests are order by created time in ascending order.
+ // You can reverse that order setting this value to true.
+ Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListStudioRequestsRequest) Reset() {
+ *x = ListStudioRequestsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListStudioRequestsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListStudioRequestsRequest) ProtoMessage() {}
+
+func (x *ListStudioRequestsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_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 ListStudioRequestsRequest.ProtoReflect.Descriptor instead.
+func (*ListStudioRequestsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *ListStudioRequestsRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListStudioRequestsRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListStudioRequestsRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+// ListStudioRequestsResponse is the proto response representation of the
+// ListStudioRequests method.
+type ListStudioRequestsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of requests in the current page.
+ Requests []*StudioRequest `protobuf:"bytes,1,rep,name=requests,proto3" json:"requests,omitempty"`
+ // The requests' next page token. There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListStudioRequestsResponse) Reset() {
+ *x = ListStudioRequestsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListStudioRequestsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListStudioRequestsResponse) ProtoMessage() {}
+
+func (x *ListStudioRequestsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_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 ListStudioRequestsResponse.ProtoReflect.Descriptor instead.
+func (*ListStudioRequestsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *ListStudioRequestsResponse) GetRequests() []*StudioRequest {
+ if x != nil {
+ return x.Requests
+ }
+ return nil
+}
+
+func (x *ListStudioRequestsResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+// StudioRequest represents a saved request in Studio, that is synced to a BSR
+// user's profile.
+type StudioRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of this Studio Request.
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // The request creation timestamp.
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // The request last updated timestamp.
+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
+ // User ID who created and saved this request.
+ AuthorUserId string `protobuf:"bytes,4,opt,name=author_user_id,json=authorUserId,proto3" json:"author_user_id,omitempty"`
+ // BSR repository ID this request is linked to.
+ RepositoryId string `protobuf:"bytes,5,opt,name=repository_id,json=repositoryId,proto3" json:"repository_id,omitempty"`
+ // The friendly name of this request.
+ Name string `protobuf:"bytes,6,opt,name=name,proto3" json:"name,omitempty"`
+ // The target base URL of this request.
+ TargetBaseUrl string `protobuf:"bytes,7,opt,name=target_base_url,json=targetBaseUrl,proto3" json:"target_base_url,omitempty"`
+ // The BSR repository owner name (user or organization).
+ RepositoryOwner string `protobuf:"bytes,8,opt,name=repository_owner,json=repositoryOwner,proto3" json:"repository_owner,omitempty"`
+ // The BSR repository name.
+ RepositoryName string `protobuf:"bytes,9,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The target service name as defined in the BSR repository.
+ Service string `protobuf:"bytes,10,opt,name=service,proto3" json:"service,omitempty"`
+ // The target RPC method name as defined in the BSR repository.
+ Method string `protobuf:"bytes,11,opt,name=method,proto3" json:"method,omitempty"`
+ // The request body as defined in Studio.
+ Body string `protobuf:"bytes,12,opt,name=body,proto3" json:"body,omitempty"`
+ // The request headers as defined in Studio.
+ Headers map[string]string `protobuf:"bytes,13,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"`
+ // Should this request include cookies from the Studio current session?
+ IncludeCookies bool `protobuf:"varint,14,opt,name=include_cookies,json=includeCookies,proto3" json:"include_cookies,omitempty"`
+ // The protocol that Studio uses to send this request.
+ Protocol StudioProtocol `protobuf:"varint,15,opt,name=protocol,proto3,enum=buf.alpha.registry.v1alpha1.StudioProtocol" json:"protocol,omitempty"`
+ // The agent url (if any) used by Studio to send the request. See
+ // https://docs.buf.build/bsr/studio#via-buf-studio-agent for details.
+ AgentUrl string `protobuf:"bytes,16,opt,name=agent_url,json=agentUrl,proto3" json:"agent_url,omitempty"`
+}
+
+func (x *StudioRequest) Reset() {
+ *x = StudioRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *StudioRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*StudioRequest) ProtoMessage() {}
+
+func (x *StudioRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_studio_request_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 StudioRequest.ProtoReflect.Descriptor instead.
+func (*StudioRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *StudioRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *StudioRequest) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *StudioRequest) GetUpdateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdateTime
+ }
+ return nil
+}
+
+func (x *StudioRequest) GetAuthorUserId() string {
+ if x != nil {
+ return x.AuthorUserId
+ }
+ return ""
+}
+
+func (x *StudioRequest) GetRepositoryId() string {
+ if x != nil {
+ return x.RepositoryId
+ }
+ return ""
+}
+
+func (x *StudioRequest) GetName() string {
+ if x != nil {
+ return x.Name
+ }
+ return ""
+}
+
+func (x *StudioRequest) GetTargetBaseUrl() string {
+ if x != nil {
+ return x.TargetBaseUrl
+ }
+ return ""
+}
+
+func (x *StudioRequest) GetRepositoryOwner() string {
+ if x != nil {
+ return x.RepositoryOwner
+ }
+ return ""
+}
+
+func (x *StudioRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *StudioRequest) GetService() string {
+ if x != nil {
+ return x.Service
+ }
+ return ""
+}
+
+func (x *StudioRequest) GetMethod() string {
+ if x != nil {
+ return x.Method
+ }
+ return ""
+}
+
+func (x *StudioRequest) GetBody() string {
+ if x != nil {
+ return x.Body
+ }
+ return ""
+}
+
+func (x *StudioRequest) GetHeaders() map[string]string {
+ if x != nil {
+ return x.Headers
+ }
+ return nil
+}
+
+func (x *StudioRequest) GetIncludeCookies() bool {
+ if x != nil {
+ return x.IncludeCookies
+ }
+ return false
+}
+
+func (x *StudioRequest) GetProtocol() StudioProtocol {
+ if x != nil {
+ return x.Protocol
+ }
+ return StudioProtocol_STUDIO_PROTOCOL_UNSPECIFIED
+}
+
+func (x *StudioRequest) GetAgentUrl() string {
+ if x != nil {
+ return x.AgentUrl
+ }
+ return ""
+}
+
+var File_buf_alpha_registry_v1alpha1_studio_request_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDesc = []byte{
+ 0x0a, 0x30, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x73, 0x74,
+ 0x75, 0x64, 0x69, 0x6f, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a,
+ 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x22, 0x9d, 0x04, 0x0a, 0x1a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69,
+ 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x29, 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x77,
+ 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73,
+ 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65,
+ 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e,
+ 0x61, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65,
+ 0x74, 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12,
+ 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74,
+ 0x68, 0x6f, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f,
+ 0x64, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x5e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73,
+ 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x44, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69,
+ 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e,
+ 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65,
+ 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65,
+ 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e,
+ 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x43, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x12, 0x47,
+ 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53,
+ 0x74, 0x75, 0x64, 0x69, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1b, 0x0a, 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74,
+ 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x61, 0x67, 0x65, 0x6e,
+ 0x74, 0x55, 0x72, 0x6c, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45,
+ 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01,
+ 0x22, 0x72, 0x0a, 0x1b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x53, 0x0a, 0x0f, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x72, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x52, 0x0e, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x64, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x22, 0x47, 0x0a, 0x1a, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x74,
+ 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02,
+ 0x69, 0x64, 0x12, 0x19, 0x0a, 0x08, 0x6e, 0x65, 0x77, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x6e, 0x65, 0x77, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x1d, 0x0a,
+ 0x1b, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71,
+ 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x2c, 0x0a, 0x1a,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x1d, 0x0a, 0x1b, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x71, 0x0a, 0x19, 0x4c, 0x69, 0x73,
+ 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73,
+ 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53,
+ 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x8c, 0x01, 0x0a,
+ 0x1a, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x08, 0x72,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x75, 0x64,
+ 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x08, 0x72, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65,
+ 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65,
+ 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xd8, 0x05, 0x0a, 0x0d,
+ 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a,
+ 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b, 0x0a,
+ 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
+ 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a,
+ 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32,
+ 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75,
+ 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x24, 0x0a, 0x0e, 0x61, 0x75, 0x74, 0x68, 0x6f,
+ 0x72, 0x5f, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0c, 0x61, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x23, 0x0a,
+ 0x0d, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x69, 0x64, 0x18, 0x05,
+ 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79,
+ 0x49, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x26, 0x0a, 0x0f, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74,
+ 0x5f, 0x62, 0x61, 0x73, 0x65, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x0d, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x42, 0x61, 0x73, 0x65, 0x55, 0x72, 0x6c, 0x12, 0x29,
+ 0x0a, 0x10, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6f, 0x77, 0x6e,
+ 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69,
+ 0x74, 0x6f, 0x72, 0x79, 0x4f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70,
+ 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x09, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61,
+ 0x6d, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x18, 0x0a, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06,
+ 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65,
+ 0x74, 0x68, 0x6f, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x0c, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x51, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64,
+ 0x65, 0x72, 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74,
+ 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x69,
+ 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x5f, 0x63, 0x6f, 0x6f, 0x6b, 0x69, 0x65, 0x73, 0x18, 0x0e,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x69, 0x6e, 0x63, 0x6c, 0x75, 0x64, 0x65, 0x43, 0x6f, 0x6f,
+ 0x6b, 0x69, 0x65, 0x73, 0x12, 0x47, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c,
+ 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f,
+ 0x63, 0x6f, 0x6c, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1b, 0x0a,
+ 0x09, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x10, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x08, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x55, 0x72, 0x6c, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65,
+ 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65,
+ 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05,
+ 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c,
+ 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x2a, 0x86, 0x01, 0x0a, 0x0e, 0x53, 0x74, 0x75, 0x64, 0x69,
+ 0x6f, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x12, 0x1f, 0x0a, 0x1b, 0x53, 0x54, 0x55,
+ 0x44, 0x49, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x55, 0x4e, 0x53,
+ 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x1b, 0x0a, 0x17, 0x53, 0x54,
+ 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x43, 0x4f,
+ 0x4e, 0x4e, 0x45, 0x43, 0x54, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x53, 0x54, 0x55, 0x44, 0x49,
+ 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x54, 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x47, 0x52, 0x50, 0x43, 0x10,
+ 0x02, 0x12, 0x1c, 0x0a, 0x18, 0x53, 0x54, 0x55, 0x44, 0x49, 0x4f, 0x5f, 0x50, 0x52, 0x4f, 0x54,
+ 0x4f, 0x43, 0x4f, 0x4c, 0x5f, 0x47, 0x52, 0x50, 0x43, 0x5f, 0x57, 0x45, 0x42, 0x10, 0x03, 0x32,
+ 0xc7, 0x04, 0x0a, 0x14, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x8a, 0x01, 0x0a, 0x13, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x53, 0x74,
+ 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x8a, 0x01, 0x0a, 0x13, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65,
+ 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6e, 0x61,
+ 0x6d, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x52, 0x65, 0x6e, 0x61, 0x6d, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69,
+ 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x22, 0x00, 0x12, 0x8a, 0x01, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x75,
+ 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53,
+ 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12,
+ 0x87, 0x01, 0x0a, 0x12, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x12, 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73,
+ 0x74, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x73, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x9f, 0x02, 0x0a, 0x1f, 0x63, 0x6f,
+ 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x12, 0x53,
+ 0x74, 0x75, 0x64, 0x69, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x50, 0x72, 0x6f, 0x74,
+ 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f,
+ 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69,
+ 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67,
+ 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02,
+ 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47,
+ 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66,
+ 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescData = file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_studio_request_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
+var file_buf_alpha_registry_v1alpha1_studio_request_proto_goTypes = []interface{}{
+ (StudioProtocol)(0), // 0: buf.alpha.registry.v1alpha1.StudioProtocol
+ (*CreateStudioRequestRequest)(nil), // 1: buf.alpha.registry.v1alpha1.CreateStudioRequestRequest
+ (*CreateStudioRequestResponse)(nil), // 2: buf.alpha.registry.v1alpha1.CreateStudioRequestResponse
+ (*RenameStudioRequestRequest)(nil), // 3: buf.alpha.registry.v1alpha1.RenameStudioRequestRequest
+ (*RenameStudioRequestResponse)(nil), // 4: buf.alpha.registry.v1alpha1.RenameStudioRequestResponse
+ (*DeleteStudioRequestRequest)(nil), // 5: buf.alpha.registry.v1alpha1.DeleteStudioRequestRequest
+ (*DeleteStudioRequestResponse)(nil), // 6: buf.alpha.registry.v1alpha1.DeleteStudioRequestResponse
+ (*ListStudioRequestsRequest)(nil), // 7: buf.alpha.registry.v1alpha1.ListStudioRequestsRequest
+ (*ListStudioRequestsResponse)(nil), // 8: buf.alpha.registry.v1alpha1.ListStudioRequestsResponse
+ (*StudioRequest)(nil), // 9: buf.alpha.registry.v1alpha1.StudioRequest
+ nil, // 10: buf.alpha.registry.v1alpha1.CreateStudioRequestRequest.HeadersEntry
+ nil, // 11: buf.alpha.registry.v1alpha1.StudioRequest.HeadersEntry
+ (*timestamppb.Timestamp)(nil), // 12: google.protobuf.Timestamp
+}
+var file_buf_alpha_registry_v1alpha1_studio_request_proto_depIdxs = []int32{
+ 10, // 0: buf.alpha.registry.v1alpha1.CreateStudioRequestRequest.headers:type_name -> buf.alpha.registry.v1alpha1.CreateStudioRequestRequest.HeadersEntry
+ 0, // 1: buf.alpha.registry.v1alpha1.CreateStudioRequestRequest.protocol:type_name -> buf.alpha.registry.v1alpha1.StudioProtocol
+ 9, // 2: buf.alpha.registry.v1alpha1.CreateStudioRequestResponse.created_request:type_name -> buf.alpha.registry.v1alpha1.StudioRequest
+ 9, // 3: buf.alpha.registry.v1alpha1.ListStudioRequestsResponse.requests:type_name -> buf.alpha.registry.v1alpha1.StudioRequest
+ 12, // 4: buf.alpha.registry.v1alpha1.StudioRequest.create_time:type_name -> google.protobuf.Timestamp
+ 12, // 5: buf.alpha.registry.v1alpha1.StudioRequest.update_time:type_name -> google.protobuf.Timestamp
+ 11, // 6: buf.alpha.registry.v1alpha1.StudioRequest.headers:type_name -> buf.alpha.registry.v1alpha1.StudioRequest.HeadersEntry
+ 0, // 7: buf.alpha.registry.v1alpha1.StudioRequest.protocol:type_name -> buf.alpha.registry.v1alpha1.StudioProtocol
+ 1, // 8: buf.alpha.registry.v1alpha1.StudioRequestService.CreateStudioRequest:input_type -> buf.alpha.registry.v1alpha1.CreateStudioRequestRequest
+ 3, // 9: buf.alpha.registry.v1alpha1.StudioRequestService.RenameStudioRequest:input_type -> buf.alpha.registry.v1alpha1.RenameStudioRequestRequest
+ 5, // 10: buf.alpha.registry.v1alpha1.StudioRequestService.DeleteStudioRequest:input_type -> buf.alpha.registry.v1alpha1.DeleteStudioRequestRequest
+ 7, // 11: buf.alpha.registry.v1alpha1.StudioRequestService.ListStudioRequests:input_type -> buf.alpha.registry.v1alpha1.ListStudioRequestsRequest
+ 2, // 12: buf.alpha.registry.v1alpha1.StudioRequestService.CreateStudioRequest:output_type -> buf.alpha.registry.v1alpha1.CreateStudioRequestResponse
+ 4, // 13: buf.alpha.registry.v1alpha1.StudioRequestService.RenameStudioRequest:output_type -> buf.alpha.registry.v1alpha1.RenameStudioRequestResponse
+ 6, // 14: buf.alpha.registry.v1alpha1.StudioRequestService.DeleteStudioRequest:output_type -> buf.alpha.registry.v1alpha1.DeleteStudioRequestResponse
+ 8, // 15: buf.alpha.registry.v1alpha1.StudioRequestService.ListStudioRequests:output_type -> buf.alpha.registry.v1alpha1.ListStudioRequestsResponse
+ 12, // [12:16] is the sub-list for method output_type
+ 8, // [8:12] is the sub-list for method input_type
+ 8, // [8:8] is the sub-list for extension type_name
+ 8, // [8:8] is the sub-list for extension extendee
+ 0, // [0:8] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_studio_request_proto_init() }
+func file_buf_alpha_registry_v1alpha1_studio_request_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_studio_request_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateStudioRequestRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateStudioRequestResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RenameStudioRequestRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*RenameStudioRequestResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteStudioRequestRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteStudioRequestResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListStudioRequestsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListStudioRequestsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*StudioRequest); 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_buf_alpha_registry_v1alpha1_studio_request_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 11,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_studio_request_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_studio_request_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_studio_request_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_studio_request_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_studio_request_proto = out.File
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_studio_request_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/token.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/token.pb.go
new file mode 100644
index 000000000..72d306640
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/token.pb.go
@@ -0,0 +1,822 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/token.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type Token struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ ExpireTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
+ Note string `protobuf:"bytes,4,opt,name=note,proto3" json:"note,omitempty"`
+}
+
+func (x *Token) Reset() {
+ *x = Token{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Token) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Token) ProtoMessage() {}
+
+func (x *Token) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_token_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 Token.ProtoReflect.Descriptor instead.
+func (*Token) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_token_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Token) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *Token) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *Token) GetExpireTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.ExpireTime
+ }
+ return nil
+}
+
+func (x *Token) GetNote() string {
+ if x != nil {
+ return x.Note
+ }
+ return ""
+}
+
+type CreateTokenRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Note string `protobuf:"bytes,1,opt,name=note,proto3" json:"note,omitempty"`
+ // The time until which the token should be valid.
+ // Must be in the future. May be null for no expiry.
+ ExpireTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=expire_time,json=expireTime,proto3" json:"expire_time,omitempty"`
+ // The ID of the user to create a new token, can only be
+ // the user who perform this action, or a machine user.
+ // Default to the user who perform this action if this is empty.
+ UserId string `protobuf:"bytes,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+}
+
+func (x *CreateTokenRequest) Reset() {
+ *x = CreateTokenRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateTokenRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateTokenRequest) ProtoMessage() {}
+
+func (x *CreateTokenRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_token_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 CreateTokenRequest.ProtoReflect.Descriptor instead.
+func (*CreateTokenRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_token_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CreateTokenRequest) GetNote() string {
+ if x != nil {
+ return x.Note
+ }
+ return ""
+}
+
+func (x *CreateTokenRequest) GetExpireTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.ExpireTime
+ }
+ return nil
+}
+
+func (x *CreateTokenRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+type CreateTokenResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The plaintext token to use for authentication.
+ Token string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
+}
+
+func (x *CreateTokenResponse) Reset() {
+ *x = CreateTokenResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateTokenResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateTokenResponse) ProtoMessage() {}
+
+func (x *CreateTokenResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_token_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 CreateTokenResponse.ProtoReflect.Descriptor instead.
+func (*CreateTokenResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_token_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *CreateTokenResponse) GetToken() string {
+ if x != nil {
+ return x.Token
+ }
+ return ""
+}
+
+type GetTokenRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TokenId string `protobuf:"bytes,1,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
+}
+
+func (x *GetTokenRequest) Reset() {
+ *x = GetTokenRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetTokenRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetTokenRequest) ProtoMessage() {}
+
+func (x *GetTokenRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_token_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 GetTokenRequest.ProtoReflect.Descriptor instead.
+func (*GetTokenRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_token_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *GetTokenRequest) GetTokenId() string {
+ if x != nil {
+ return x.TokenId
+ }
+ return ""
+}
+
+type GetTokenResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Token *Token `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
+}
+
+func (x *GetTokenResponse) Reset() {
+ *x = GetTokenResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetTokenResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetTokenResponse) ProtoMessage() {}
+
+func (x *GetTokenResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_token_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 GetTokenResponse.ProtoReflect.Descriptor instead.
+func (*GetTokenResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_token_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *GetTokenResponse) GetToken() *Token {
+ if x != nil {
+ return x.Token
+ }
+ return nil
+}
+
+type ListTokensRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"`
+ // The ID of the user to list tokens, can only be
+ // the user who perform this action, or a machine user.
+ // Default to the user who perform this action if this is empty.
+ UserId string `protobuf:"bytes,4,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+}
+
+func (x *ListTokensRequest) Reset() {
+ *x = ListTokensRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListTokensRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListTokensRequest) ProtoMessage() {}
+
+func (x *ListTokensRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_token_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 ListTokensRequest.ProtoReflect.Descriptor instead.
+func (*ListTokensRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_token_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *ListTokensRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListTokensRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListTokensRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+func (x *ListTokensRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+type ListTokensResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Tokens []*Token `protobuf:"bytes,1,rep,name=tokens,proto3" json:"tokens,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListTokensResponse) Reset() {
+ *x = ListTokensResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListTokensResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListTokensResponse) ProtoMessage() {}
+
+func (x *ListTokensResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_token_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 ListTokensResponse.ProtoReflect.Descriptor instead.
+func (*ListTokensResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_token_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *ListTokensResponse) GetTokens() []*Token {
+ if x != nil {
+ return x.Tokens
+ }
+ return nil
+}
+
+func (x *ListTokensResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type DeleteTokenRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TokenId string `protobuf:"bytes,1,opt,name=token_id,json=tokenId,proto3" json:"token_id,omitempty"`
+}
+
+func (x *DeleteTokenRequest) Reset() {
+ *x = DeleteTokenRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteTokenRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteTokenRequest) ProtoMessage() {}
+
+func (x *DeleteTokenRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_token_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 DeleteTokenRequest.ProtoReflect.Descriptor instead.
+func (*DeleteTokenRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_token_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *DeleteTokenRequest) GetTokenId() string {
+ if x != nil {
+ return x.TokenId
+ }
+ return ""
+}
+
+type DeleteTokenResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteTokenResponse) Reset() {
+ *x = DeleteTokenResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteTokenResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteTokenResponse) ProtoMessage() {}
+
+func (x *DeleteTokenResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_token_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 DeleteTokenResponse.ProtoReflect.Descriptor instead.
+func (*DeleteTokenResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_token_proto_rawDescGZIP(), []int{8}
+}
+
+var File_buf_alpha_registry_v1alpha1_token_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_token_proto_rawDesc = []byte{
+ 0x0a, 0x27, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x74, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
+ 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa5, 0x01, 0x0a, 0x05, 0x54, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
+ 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61,
+ 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b,
+ 0x0a, 0x0b, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
+ 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6e,
+ 0x6f, 0x74, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x22,
+ 0x7e, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x6f, 0x74, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x65, 0x78, 0x70,
+ 0x69, 0x72, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a,
+ 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+ 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x69,
+ 0x72, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69,
+ 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22,
+ 0x2b, 0x0a, 0x13, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18,
+ 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2c, 0x0a, 0x0f,
+ 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
+ 0x19, 0x0a, 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x09, 0x52, 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, 0x4c, 0x0a, 0x10, 0x47, 0x65,
+ 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x38,
+ 0x0a, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x52, 0x05, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x82, 0x01, 0x0a, 0x11, 0x4c, 0x69, 0x73,
+ 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b,
+ 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70,
+ 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65,
+ 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76,
+ 0x65, 0x72, 0x73, 0x65, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x22, 0x78, 0x0a,
+ 0x12, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f,
+ 0x6e, 0x73, 0x65, 0x12, 0x3a, 0x0a, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x18, 0x01, 0x20,
+ 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x06, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12,
+ 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61,
+ 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x2f, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 0x0a,
+ 0x08, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52,
+ 0x07, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x49, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x44, 0x65, 0x6c, 0x65,
+ 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x32,
+ 0xca, 0x03, 0x0a, 0x0c, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65,
+ 0x12, 0x70, 0x0a, 0x0b, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
+ 0x2f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43,
+ 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e,
+ 0x73, 0x65, 0x12, 0x67, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2c,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74,
+ 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x0a, 0x4c,
+ 0x69, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x73, 0x12, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x6f, 0x6b, 0x65,
+ 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x70, 0x0a, 0x0b, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x2f, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x30, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x97, 0x02, 0x0a,
+ 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x42, 0x0a, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59,
+ 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75,
+ 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f,
+ 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66,
+ 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa,
+ 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b,
+ 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75,
+ 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74,
+ 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70,
+ 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_token_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_token_proto_rawDescData = file_buf_alpha_registry_v1alpha1_token_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_token_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_token_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_token_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_token_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_token_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_token_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
+var file_buf_alpha_registry_v1alpha1_token_proto_goTypes = []interface{}{
+ (*Token)(nil), // 0: buf.alpha.registry.v1alpha1.Token
+ (*CreateTokenRequest)(nil), // 1: buf.alpha.registry.v1alpha1.CreateTokenRequest
+ (*CreateTokenResponse)(nil), // 2: buf.alpha.registry.v1alpha1.CreateTokenResponse
+ (*GetTokenRequest)(nil), // 3: buf.alpha.registry.v1alpha1.GetTokenRequest
+ (*GetTokenResponse)(nil), // 4: buf.alpha.registry.v1alpha1.GetTokenResponse
+ (*ListTokensRequest)(nil), // 5: buf.alpha.registry.v1alpha1.ListTokensRequest
+ (*ListTokensResponse)(nil), // 6: buf.alpha.registry.v1alpha1.ListTokensResponse
+ (*DeleteTokenRequest)(nil), // 7: buf.alpha.registry.v1alpha1.DeleteTokenRequest
+ (*DeleteTokenResponse)(nil), // 8: buf.alpha.registry.v1alpha1.DeleteTokenResponse
+ (*timestamppb.Timestamp)(nil), // 9: google.protobuf.Timestamp
+}
+var file_buf_alpha_registry_v1alpha1_token_proto_depIdxs = []int32{
+ 9, // 0: buf.alpha.registry.v1alpha1.Token.create_time:type_name -> google.protobuf.Timestamp
+ 9, // 1: buf.alpha.registry.v1alpha1.Token.expire_time:type_name -> google.protobuf.Timestamp
+ 9, // 2: buf.alpha.registry.v1alpha1.CreateTokenRequest.expire_time:type_name -> google.protobuf.Timestamp
+ 0, // 3: buf.alpha.registry.v1alpha1.GetTokenResponse.token:type_name -> buf.alpha.registry.v1alpha1.Token
+ 0, // 4: buf.alpha.registry.v1alpha1.ListTokensResponse.tokens:type_name -> buf.alpha.registry.v1alpha1.Token
+ 1, // 5: buf.alpha.registry.v1alpha1.TokenService.CreateToken:input_type -> buf.alpha.registry.v1alpha1.CreateTokenRequest
+ 3, // 6: buf.alpha.registry.v1alpha1.TokenService.GetToken:input_type -> buf.alpha.registry.v1alpha1.GetTokenRequest
+ 5, // 7: buf.alpha.registry.v1alpha1.TokenService.ListTokens:input_type -> buf.alpha.registry.v1alpha1.ListTokensRequest
+ 7, // 8: buf.alpha.registry.v1alpha1.TokenService.DeleteToken:input_type -> buf.alpha.registry.v1alpha1.DeleteTokenRequest
+ 2, // 9: buf.alpha.registry.v1alpha1.TokenService.CreateToken:output_type -> buf.alpha.registry.v1alpha1.CreateTokenResponse
+ 4, // 10: buf.alpha.registry.v1alpha1.TokenService.GetToken:output_type -> buf.alpha.registry.v1alpha1.GetTokenResponse
+ 6, // 11: buf.alpha.registry.v1alpha1.TokenService.ListTokens:output_type -> buf.alpha.registry.v1alpha1.ListTokensResponse
+ 8, // 12: buf.alpha.registry.v1alpha1.TokenService.DeleteToken:output_type -> buf.alpha.registry.v1alpha1.DeleteTokenResponse
+ 9, // [9:13] is the sub-list for method output_type
+ 5, // [5:9] is the sub-list for method input_type
+ 5, // [5:5] is the sub-list for extension type_name
+ 5, // [5:5] is the sub-list for extension extendee
+ 0, // [0:5] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_token_proto_init() }
+func file_buf_alpha_registry_v1alpha1_token_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_token_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Token); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateTokenRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateTokenResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetTokenRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetTokenResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListTokensRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListTokensResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteTokenRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_token_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteTokenResponse); 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_buf_alpha_registry_v1alpha1_token_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 9,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_token_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_token_proto_depIdxs,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_token_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_token_proto = out.File
+ file_buf_alpha_registry_v1alpha1_token_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_token_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_token_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/usage.gen.go
new file mode 100644
index 000000000..727e8183d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package registryv1alpha1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/user.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/user.pb.go
new file mode 100644
index 000000000..966094249
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/user.pb.go
@@ -0,0 +1,1974 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/user.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+type UserState int32
+
+const (
+ UserState_USER_STATE_UNSPECIFIED UserState = 0
+ UserState_USER_STATE_ACTIVE UserState = 1
+ UserState_USER_STATE_DEACTIVATED UserState = 2
+)
+
+// Enum value maps for UserState.
+var (
+ UserState_name = map[int32]string{
+ 0: "USER_STATE_UNSPECIFIED",
+ 1: "USER_STATE_ACTIVE",
+ 2: "USER_STATE_DEACTIVATED",
+ }
+ UserState_value = map[string]int32{
+ "USER_STATE_UNSPECIFIED": 0,
+ "USER_STATE_ACTIVE": 1,
+ "USER_STATE_DEACTIVATED": 2,
+ }
+)
+
+func (x UserState) Enum() *UserState {
+ p := new(UserState)
+ *p = x
+ return p
+}
+
+func (x UserState) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (UserState) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_user_proto_enumTypes[0].Descriptor()
+}
+
+func (UserState) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_user_proto_enumTypes[0]
+}
+
+func (x UserState) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use UserState.Descriptor instead.
+func (UserState) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{0}
+}
+
+type UserType int32
+
+const (
+ UserType_USER_TYPE_UNSPECIFIED UserType = 0
+ UserType_USER_TYPE_PERSONAL UserType = 1
+ UserType_USER_TYPE_MACHINE UserType = 2
+)
+
+// Enum value maps for UserType.
+var (
+ UserType_name = map[int32]string{
+ 0: "USER_TYPE_UNSPECIFIED",
+ 1: "USER_TYPE_PERSONAL",
+ 2: "USER_TYPE_MACHINE",
+ }
+ UserType_value = map[string]int32{
+ "USER_TYPE_UNSPECIFIED": 0,
+ "USER_TYPE_PERSONAL": 1,
+ "USER_TYPE_MACHINE": 2,
+ }
+)
+
+func (x UserType) Enum() *UserType {
+ p := new(UserType)
+ *p = x
+ return p
+}
+
+func (x UserType) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (UserType) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_user_proto_enumTypes[1].Descriptor()
+}
+
+func (UserType) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_user_proto_enumTypes[1]
+}
+
+func (x UserType) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use UserType.Descriptor instead.
+func (UserType) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{1}
+}
+
+type User struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // primary key, unique, immutable
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+ // immutable
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // mutable
+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
+ // unique, mutable
+ Username string `protobuf:"bytes,4,opt,name=username,proto3" json:"username,omitempty"`
+ // mutable
+ Deactivated bool `protobuf:"varint,5,opt,name=deactivated,proto3" json:"deactivated,omitempty"`
+ // description is the user configurable description of the user.
+ Description string `protobuf:"bytes,6,opt,name=description,proto3" json:"description,omitempty"`
+ // url is the user configurable URL in the description of the user,
+ // always included the scheme and will not have a #fragment suffix.
+ Url string `protobuf:"bytes,7,opt,name=url,proto3" json:"url,omitempty"`
+ // verification status of the user, configurable by server admin.
+ VerificationStatus VerificationStatus `protobuf:"varint,8,opt,name=verification_status,json=verificationStatus,proto3,enum=buf.alpha.registry.v1alpha1.VerificationStatus" json:"verification_status,omitempty"`
+ // user type of the user, depends on how the user was created.
+ UserType UserType `protobuf:"varint,9,opt,name=user_type,json=userType,proto3,enum=buf.alpha.registry.v1alpha1.UserType" json:"user_type,omitempty"`
+}
+
+func (x *User) Reset() {
+ *x = User{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *User) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*User) ProtoMessage() {}
+
+func (x *User) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 User.ProtoReflect.Descriptor instead.
+func (*User) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *User) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+func (x *User) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *User) GetUpdateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdateTime
+ }
+ return nil
+}
+
+func (x *User) GetUsername() string {
+ if x != nil {
+ return x.Username
+ }
+ return ""
+}
+
+func (x *User) GetDeactivated() bool {
+ if x != nil {
+ return x.Deactivated
+ }
+ return false
+}
+
+func (x *User) GetDescription() string {
+ if x != nil {
+ return x.Description
+ }
+ return ""
+}
+
+func (x *User) GetUrl() string {
+ if x != nil {
+ return x.Url
+ }
+ return ""
+}
+
+func (x *User) GetVerificationStatus() VerificationStatus {
+ if x != nil {
+ return x.VerificationStatus
+ }
+ return VerificationStatus_VERIFICATION_STATUS_UNSPECIFIED
+}
+
+func (x *User) GetUserType() UserType {
+ if x != nil {
+ return x.UserType
+ }
+ return UserType_USER_TYPE_UNSPECIFIED
+}
+
+// TODO: #663 move this to organization service
+type OrganizationUser struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+ // The ID of the organization for which the role belongs to.
+ OrganizationId string `protobuf:"bytes,2,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+ // The role that the user has in the organization above.
+ OrganizationRole OrganizationRole `protobuf:"varint,3,opt,name=organization_role,json=organizationRole,proto3,enum=buf.alpha.registry.v1alpha1.OrganizationRole" json:"organization_role,omitempty"`
+}
+
+func (x *OrganizationUser) Reset() {
+ *x = OrganizationUser{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *OrganizationUser) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*OrganizationUser) ProtoMessage() {}
+
+func (x *OrganizationUser) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 OrganizationUser.ProtoReflect.Descriptor instead.
+func (*OrganizationUser) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *OrganizationUser) GetUser() *User {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+func (x *OrganizationUser) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+func (x *OrganizationUser) GetOrganizationRole() OrganizationRole {
+ if x != nil {
+ return x.OrganizationRole
+ }
+ return OrganizationRole_ORGANIZATION_ROLE_UNSPECIFIED
+}
+
+type CreateUserRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
+}
+
+func (x *CreateUserRequest) Reset() {
+ *x = CreateUserRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateUserRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateUserRequest) ProtoMessage() {}
+
+func (x *CreateUserRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 CreateUserRequest.ProtoReflect.Descriptor instead.
+func (*CreateUserRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *CreateUserRequest) GetUsername() string {
+ if x != nil {
+ return x.Username
+ }
+ return ""
+}
+
+type CreateUserResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+}
+
+func (x *CreateUserResponse) Reset() {
+ *x = CreateUserResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateUserResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateUserResponse) ProtoMessage() {}
+
+func (x *CreateUserResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 CreateUserResponse.ProtoReflect.Descriptor instead.
+func (*CreateUserResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *CreateUserResponse) GetUser() *User {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+type GetUserRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *GetUserRequest) Reset() {
+ *x = GetUserRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetUserRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetUserRequest) ProtoMessage() {}
+
+func (x *GetUserRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 GetUserRequest.ProtoReflect.Descriptor instead.
+func (*GetUserRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *GetUserRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+type GetUserResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+}
+
+func (x *GetUserResponse) Reset() {
+ *x = GetUserResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetUserResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetUserResponse) ProtoMessage() {}
+
+func (x *GetUserResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 GetUserResponse.ProtoReflect.Descriptor instead.
+func (*GetUserResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *GetUserResponse) GetUser() *User {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+type GetUserByUsernameRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Username string `protobuf:"bytes,1,opt,name=username,proto3" json:"username,omitempty"`
+}
+
+func (x *GetUserByUsernameRequest) Reset() {
+ *x = GetUserByUsernameRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetUserByUsernameRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetUserByUsernameRequest) ProtoMessage() {}
+
+func (x *GetUserByUsernameRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 GetUserByUsernameRequest.ProtoReflect.Descriptor instead.
+func (*GetUserByUsernameRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *GetUserByUsernameRequest) GetUsername() string {
+ if x != nil {
+ return x.Username
+ }
+ return ""
+}
+
+type GetUserByUsernameResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ User *User `protobuf:"bytes,1,opt,name=user,proto3" json:"user,omitempty"`
+}
+
+func (x *GetUserByUsernameResponse) Reset() {
+ *x = GetUserByUsernameResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[7]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *GetUserByUsernameResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetUserByUsernameResponse) ProtoMessage() {}
+
+func (x *GetUserByUsernameResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 GetUserByUsernameResponse.ProtoReflect.Descriptor instead.
+func (*GetUserByUsernameResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *GetUserByUsernameResponse) GetUser() *User {
+ if x != nil {
+ return x.User
+ }
+ return nil
+}
+
+type ListUsersRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ PageSize uint32 `protobuf:"varint,1,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,3,opt,name=reverse,proto3" json:"reverse,omitempty"`
+ // If the user_state_filter is unspecified, users of all states are included.
+ UserStateFilter UserState `protobuf:"varint,4,opt,name=user_state_filter,json=userStateFilter,proto3,enum=buf.alpha.registry.v1alpha1.UserState" json:"user_state_filter,omitempty"`
+ // If the user_type_filter is unspecified, users of all types are included.
+ UserTypeFilter UserType `protobuf:"varint,5,opt,name=user_type_filter,json=userTypeFilter,proto3,enum=buf.alpha.registry.v1alpha1.UserType" json:"user_type_filter,omitempty"`
+}
+
+func (x *ListUsersRequest) Reset() {
+ *x = ListUsersRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[8]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListUsersRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListUsersRequest) ProtoMessage() {}
+
+func (x *ListUsersRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 ListUsersRequest.ProtoReflect.Descriptor instead.
+func (*ListUsersRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *ListUsersRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListUsersRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListUsersRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+func (x *ListUsersRequest) GetUserStateFilter() UserState {
+ if x != nil {
+ return x.UserStateFilter
+ }
+ return UserState_USER_STATE_UNSPECIFIED
+}
+
+func (x *ListUsersRequest) GetUserTypeFilter() UserType {
+ if x != nil {
+ return x.UserTypeFilter
+ }
+ return UserType_USER_TYPE_UNSPECIFIED
+}
+
+type ListUsersResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Users []*User `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListUsersResponse) Reset() {
+ *x = ListUsersResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[9]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListUsersResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListUsersResponse) ProtoMessage() {}
+
+func (x *ListUsersResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 ListUsersResponse.ProtoReflect.Descriptor instead.
+func (*ListUsersResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{9}
+}
+
+func (x *ListUsersResponse) GetUsers() []*User {
+ if x != nil {
+ return x.Users
+ }
+ return nil
+}
+
+func (x *ListUsersResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type ListOrganizationUsersRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ OrganizationId string `protobuf:"bytes,1,opt,name=organization_id,json=organizationId,proto3" json:"organization_id,omitempty"`
+ PageSize uint32 `protobuf:"varint,2,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"`
+ // The first page is returned if this is empty.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+ Reverse bool `protobuf:"varint,4,opt,name=reverse,proto3" json:"reverse,omitempty"`
+}
+
+func (x *ListOrganizationUsersRequest) Reset() {
+ *x = ListOrganizationUsersRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[10]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOrganizationUsersRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOrganizationUsersRequest) ProtoMessage() {}
+
+func (x *ListOrganizationUsersRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 ListOrganizationUsersRequest.ProtoReflect.Descriptor instead.
+func (*ListOrganizationUsersRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{10}
+}
+
+func (x *ListOrganizationUsersRequest) GetOrganizationId() string {
+ if x != nil {
+ return x.OrganizationId
+ }
+ return ""
+}
+
+func (x *ListOrganizationUsersRequest) GetPageSize() uint32 {
+ if x != nil {
+ return x.PageSize
+ }
+ return 0
+}
+
+func (x *ListOrganizationUsersRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+func (x *ListOrganizationUsersRequest) GetReverse() bool {
+ if x != nil {
+ return x.Reverse
+ }
+ return false
+}
+
+type ListOrganizationUsersResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Users []*OrganizationUser `protobuf:"bytes,1,rep,name=users,proto3" json:"users,omitempty"`
+ // There are no more pages if this is empty.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListOrganizationUsersResponse) Reset() {
+ *x = ListOrganizationUsersResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[11]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListOrganizationUsersResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListOrganizationUsersResponse) ProtoMessage() {}
+
+func (x *ListOrganizationUsersResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 ListOrganizationUsersResponse.ProtoReflect.Descriptor instead.
+func (*ListOrganizationUsersResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *ListOrganizationUsersResponse) GetUsers() []*OrganizationUser {
+ if x != nil {
+ return x.Users
+ }
+ return nil
+}
+
+func (x *ListOrganizationUsersResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+type DeleteUserRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteUserRequest) Reset() {
+ *x = DeleteUserRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[12]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteUserRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteUserRequest) ProtoMessage() {}
+
+func (x *DeleteUserRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 DeleteUserRequest.ProtoReflect.Descriptor instead.
+func (*DeleteUserRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{12}
+}
+
+type DeleteUserResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteUserResponse) Reset() {
+ *x = DeleteUserResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[13]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteUserResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteUserResponse) ProtoMessage() {}
+
+func (x *DeleteUserResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 DeleteUserResponse.ProtoReflect.Descriptor instead.
+func (*DeleteUserResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{13}
+}
+
+type DeactivateUserRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
+}
+
+func (x *DeactivateUserRequest) Reset() {
+ *x = DeactivateUserRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[14]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeactivateUserRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeactivateUserRequest) ProtoMessage() {}
+
+func (x *DeactivateUserRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 DeactivateUserRequest.ProtoReflect.Descriptor instead.
+func (*DeactivateUserRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{14}
+}
+
+func (x *DeactivateUserRequest) GetId() string {
+ if x != nil {
+ return x.Id
+ }
+ return ""
+}
+
+type DeactivateUserResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeactivateUserResponse) Reset() {
+ *x = DeactivateUserResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[15]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeactivateUserResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeactivateUserResponse) ProtoMessage() {}
+
+func (x *DeactivateUserResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 DeactivateUserResponse.ProtoReflect.Descriptor instead.
+func (*DeactivateUserResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{15}
+}
+
+type UpdateUserServerRoleRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The ID of the user for which to be updated a role.
+ UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ // The new role of the user in the server.
+ ServerRole ServerRole `protobuf:"varint,2,opt,name=server_role,json=serverRole,proto3,enum=buf.alpha.registry.v1alpha1.ServerRole" json:"server_role,omitempty"`
+}
+
+func (x *UpdateUserServerRoleRequest) Reset() {
+ *x = UpdateUserServerRoleRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[16]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateUserServerRoleRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateUserServerRoleRequest) ProtoMessage() {}
+
+func (x *UpdateUserServerRoleRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 UpdateUserServerRoleRequest.ProtoReflect.Descriptor instead.
+func (*UpdateUserServerRoleRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{16}
+}
+
+func (x *UpdateUserServerRoleRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *UpdateUserServerRoleRequest) GetServerRole() ServerRole {
+ if x != nil {
+ return x.ServerRole
+ }
+ return ServerRole_SERVER_ROLE_UNSPECIFIED
+}
+
+type UpdateUserServerRoleResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateUserServerRoleResponse) Reset() {
+ *x = UpdateUserServerRoleResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[17]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateUserServerRoleResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateUserServerRoleResponse) ProtoMessage() {}
+
+func (x *UpdateUserServerRoleResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 UpdateUserServerRoleResponse.ProtoReflect.Descriptor instead.
+func (*UpdateUserServerRoleResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{17}
+}
+
+type CountUsersRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // If the user_state_filter is unspecified, all users are included.
+ UserStateFilter UserState `protobuf:"varint,1,opt,name=user_state_filter,json=userStateFilter,proto3,enum=buf.alpha.registry.v1alpha1.UserState" json:"user_state_filter,omitempty"`
+}
+
+func (x *CountUsersRequest) Reset() {
+ *x = CountUsersRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[18]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CountUsersRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CountUsersRequest) ProtoMessage() {}
+
+func (x *CountUsersRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 CountUsersRequest.ProtoReflect.Descriptor instead.
+func (*CountUsersRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{18}
+}
+
+func (x *CountUsersRequest) GetUserStateFilter() UserState {
+ if x != nil {
+ return x.UserStateFilter
+ }
+ return UserState_USER_STATE_UNSPECIFIED
+}
+
+type CountUsersResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ TotalCount uint32 `protobuf:"varint,1,opt,name=total_count,json=totalCount,proto3" json:"total_count,omitempty"`
+}
+
+func (x *CountUsersResponse) Reset() {
+ *x = CountUsersResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[19]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CountUsersResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CountUsersResponse) ProtoMessage() {}
+
+func (x *CountUsersResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 CountUsersResponse.ProtoReflect.Descriptor instead.
+func (*CountUsersResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{19}
+}
+
+func (x *CountUsersResponse) GetTotalCount() uint32 {
+ if x != nil {
+ return x.TotalCount
+ }
+ return 0
+}
+
+type UpdateUserSettingsRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ UserId string `protobuf:"bytes,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
+ // optional, update to description will only be made when this is present
+ Description *string `protobuf:"bytes,2,opt,name=description,proto3,oneof" json:"description,omitempty"`
+ // optional, update to url will only be made when this is present
+ Url *string `protobuf:"bytes,3,opt,name=url,proto3,oneof" json:"url,omitempty"`
+}
+
+func (x *UpdateUserSettingsRequest) Reset() {
+ *x = UpdateUserSettingsRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[20]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateUserSettingsRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateUserSettingsRequest) ProtoMessage() {}
+
+func (x *UpdateUserSettingsRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 UpdateUserSettingsRequest.ProtoReflect.Descriptor instead.
+func (*UpdateUserSettingsRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *UpdateUserSettingsRequest) GetUserId() string {
+ if x != nil {
+ return x.UserId
+ }
+ return ""
+}
+
+func (x *UpdateUserSettingsRequest) GetDescription() string {
+ if x != nil && x.Description != nil {
+ return *x.Description
+ }
+ return ""
+}
+
+func (x *UpdateUserSettingsRequest) GetUrl() string {
+ if x != nil && x.Url != nil {
+ return *x.Url
+ }
+ return ""
+}
+
+type UpdateUserSettingsResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *UpdateUserSettingsResponse) Reset() {
+ *x = UpdateUserSettingsResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[21]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *UpdateUserSettingsResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UpdateUserSettingsResponse) ProtoMessage() {}
+
+func (x *UpdateUserSettingsResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_user_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 UpdateUserSettingsResponse.ProtoReflect.Descriptor instead.
+func (*UpdateUserSettingsResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP(), []int{21}
+}
+
+var File_buf_alpha_registry_v1alpha1_user_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_user_proto_rawDesc = []byte{
+ 0x0a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x75, 0x73,
+ 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2f, 0x72, 0x6f, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x35, 0x62,
+ 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x76, 0x65, 0x72, 0x69, 0x66,
+ 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e,
+ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xa8, 0x03, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x0e,
+ 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x3b,
+ 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52,
+ 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x0b, 0x75,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b,
+ 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62,
+ 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x75, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72,
+ 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61,
+ 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0b, 0x64, 0x65, 0x61, 0x63, 0x74,
+ 0x69, 0x76, 0x61, 0x74, 0x65, 0x64, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69,
+ 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18,
+ 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x60, 0x0a, 0x13, 0x76, 0x65,
+ 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x2f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x12, 0x76, 0x65, 0x72, 0x69, 0x66, 0x69,
+ 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x42, 0x0a, 0x09,
+ 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32,
+ 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73,
+ 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,
+ 0x22, 0xce, 0x01, 0x0a, 0x10, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f,
+ 0x6e, 0x55, 0x73, 0x65, 0x72, 0x12, 0x35, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20,
+ 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x12, 0x27, 0x0a, 0x0f,
+ 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18,
+ 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74,
+ 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x5a, 0x0a, 0x11, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x72, 0x6f, 0x6c, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f,
+ 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c, 0x65, 0x52,
+ 0x10, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x6f, 0x6c,
+ 0x65, 0x22, 0x2f, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
+ 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e, 0x61,
+ 0x6d, 0x65, 0x22, 0x4b, 0x0a, 0x12, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22,
+ 0x20, 0x0a, 0x0e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69,
+ 0x64, 0x22, 0x48, 0x0a, 0x0f, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x36, 0x0a, 0x18, 0x47,
+ 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e,
+ 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x75, 0x73, 0x65, 0x72, 0x6e,
+ 0x61, 0x6d, 0x65, 0x22, 0x52, 0x0a, 0x19, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79,
+ 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x35, 0x0a, 0x04, 0x75, 0x73, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65,
+ 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x8d, 0x02, 0x0a, 0x10, 0x4c, 0x69, 0x73, 0x74,
+ 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1b, 0x0a, 0x09,
+ 0x70, 0x61, 0x67, 0x65, 0x5f, 0x73, 0x69, 0x7a, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0d, 0x52,
+ 0x08, 0x70, 0x61, 0x67, 0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70,
+ 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65,
+ 0x72, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72,
+ 0x73, 0x65, 0x12, 0x52, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65,
+ 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72,
+ 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65,
+ 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x4f, 0x0a, 0x10, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x74,
+ 0x79, 0x70, 0x65, 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0e,
+ 0x32, 0x25, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55,
+ 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, 0x0e, 0x75, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70,
+ 0x65, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x74, 0x0a, 0x11, 0x4c, 0x69, 0x73, 0x74, 0x55,
+ 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x37, 0x0a, 0x05,
+ 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05,
+ 0x75, 0x73, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61,
+ 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
+ 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x9d, 0x01,
+ 0x0a, 0x1c, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27,
+ 0x0a, 0x0f, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x69,
+ 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x6f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x12, 0x1b, 0x0a, 0x09, 0x70, 0x61, 0x67, 0x65, 0x5f,
+ 0x73, 0x69, 0x7a, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x08, 0x70, 0x61, 0x67, 0x65,
+ 0x53, 0x69, 0x7a, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x18, 0x04,
+ 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x22, 0x8c, 0x01,
+ 0x0a, 0x1d, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69,
+ 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x43, 0x0a, 0x05, 0x75, 0x73, 0x65, 0x72, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2d,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4f, 0x72, 0x67,
+ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x05, 0x75,
+ 0x73, 0x65, 0x72, 0x73, 0x12, 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67,
+ 0x65, 0x5f, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e,
+ 0x65, 0x78, 0x74, 0x50, 0x61, 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x13, 0x0a, 0x11,
+ 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x22, 0x14, 0x0a, 0x12, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,
+ 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x27, 0x0a, 0x15, 0x44, 0x65, 0x61, 0x63, 0x74,
+ 0x69, 0x76, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64,
+ 0x22, 0x18, 0x0a, 0x16, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x55, 0x73,
+ 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x80, 0x01, 0x0a, 0x1b, 0x55,
+ 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52,
+ 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75, 0x73,
+ 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65,
+ 0x72, 0x49, 0x64, 0x12, 0x48, 0x0a, 0x0b, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x5f, 0x72, 0x6f,
+ 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x27, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x6f, 0x6c,
+ 0x65, 0x52, 0x0a, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x22, 0x1e, 0x0a,
+ 0x1c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65,
+ 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x67, 0x0a,
+ 0x11, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x52, 0x0a, 0x11, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x65,
+ 0x5f, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x26, 0x2e,
+ 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x73, 0x65, 0x72,
+ 0x53, 0x74, 0x61, 0x74, 0x65, 0x52, 0x0f, 0x75, 0x73, 0x65, 0x72, 0x53, 0x74, 0x61, 0x74, 0x65,
+ 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x22, 0x35, 0x0a, 0x12, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x55,
+ 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x1f, 0x0a, 0x0b,
+ 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x5f, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28,
+ 0x0d, 0x52, 0x0a, 0x74, 0x6f, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x8a, 0x01,
+ 0x0a, 0x19, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74,
+ 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x07, 0x75,
+ 0x73, 0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73,
+ 0x65, 0x72, 0x49, 0x64, 0x12, 0x25, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74,
+ 0x69, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x0b, 0x64, 0x65, 0x73,
+ 0x63, 0x72, 0x69, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x75,
+ 0x72, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x88,
+ 0x01, 0x01, 0x42, 0x0e, 0x0a, 0x0c, 0x5f, 0x64, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x69,
+ 0x6f, 0x6e, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x75, 0x72, 0x6c, 0x22, 0x1c, 0x0a, 0x1a, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2a, 0x5a, 0x0a, 0x09, 0x55, 0x73, 0x65, 0x72,
+ 0x53, 0x74, 0x61, 0x74, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54,
+ 0x41, 0x54, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10,
+ 0x00, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f,
+ 0x41, 0x43, 0x54, 0x49, 0x56, 0x45, 0x10, 0x01, 0x12, 0x1a, 0x0a, 0x16, 0x55, 0x53, 0x45, 0x52,
+ 0x5f, 0x53, 0x54, 0x41, 0x54, 0x45, 0x5f, 0x44, 0x45, 0x41, 0x43, 0x54, 0x49, 0x56, 0x41, 0x54,
+ 0x45, 0x44, 0x10, 0x02, 0x2a, 0x54, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65,
+ 0x12, 0x19, 0x0a, 0x15, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x55, 0x4e,
+ 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x55,
+ 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45, 0x5f, 0x50, 0x45, 0x52, 0x53, 0x4f, 0x4e, 0x41,
+ 0x4c, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x55, 0x53, 0x45, 0x52, 0x5f, 0x54, 0x59, 0x50, 0x45,
+ 0x5f, 0x4d, 0x41, 0x43, 0x48, 0x49, 0x4e, 0x45, 0x10, 0x02, 0x32, 0xd3, 0x09, 0x0a, 0x0b, 0x55,
+ 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x6d, 0x0a, 0x0a, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65,
+ 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65,
+ 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x64, 0x0a, 0x07, 0x47, 0x65, 0x74,
+ 0x55, 0x73, 0x65, 0x72, 0x12, 0x2b, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x2c, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
+ 0x82, 0x01, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x55, 0x73, 0x65,
+ 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x35, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x42, 0x79, 0x55, 0x73, 0x65,
+ 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x36, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x47, 0x65, 0x74, 0x55, 0x73,
+ 0x65, 0x72, 0x42, 0x79, 0x55, 0x73, 0x65, 0x72, 0x6e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6a, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72,
+ 0x73, 0x12, 0x2d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x4c, 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
+ 0x1a, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c,
+ 0x69, 0x73, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x8e, 0x01, 0x0a, 0x15, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x39, 0x2e, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67,
+ 0x61, 0x6e, 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65,
+ 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x3a, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x4f, 0x72, 0x67, 0x61, 0x6e, 0x69, 0x7a, 0x61,
+ 0x74, 0x69, 0x6f, 0x6e, 0x55, 0x73, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73,
+ 0x65, 0x12, 0x6d, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x12,
+ 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+ 0x2f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65,
+ 0x6c, 0x65, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x12, 0x79, 0x0a, 0x0e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x55, 0x73,
+ 0x65, 0x72, 0x12, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x52,
+ 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x33, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x61, 0x63, 0x74, 0x69, 0x76, 0x61, 0x74, 0x65, 0x55,
+ 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x8b, 0x01, 0x0a, 0x14,
+ 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72,
+ 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x38, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72,
+ 0x76, 0x65, 0x72, 0x52, 0x6f, 0x6c, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x39,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x52, 0x6f, 0x6c,
+ 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x6d, 0x0a, 0x0a, 0x43, 0x6f, 0x75,
+ 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73, 0x12, 0x2e, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2f, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x55, 0x73, 0x65, 0x72, 0x73,
+ 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x85, 0x01, 0x0a, 0x12, 0x55, 0x70, 0x64,
+ 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12,
+ 0x36, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70,
+ 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x37, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,
+ 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65,
+ 0x42, 0x96, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x42, 0x09, 0x55, 0x73, 0x65, 0x72, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
+ 0x01, 0x5a, 0x59, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75,
+ 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61,
+ 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f,
+ 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42,
+ 0x41, 0x52, 0xaa, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0xca, 0x02, 0x1b, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67,
+ 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02,
+ 0x27, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42,
+ 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a,
+ 0x41, 0x6c, 0x70, 0x68, 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a,
+ 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_user_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_user_proto_rawDescData = file_buf_alpha_registry_v1alpha1_user_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_user_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_user_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_user_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_user_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_user_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_user_proto_enumTypes = make([]protoimpl.EnumInfo, 2)
+var file_buf_alpha_registry_v1alpha1_user_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
+var file_buf_alpha_registry_v1alpha1_user_proto_goTypes = []interface{}{
+ (UserState)(0), // 0: buf.alpha.registry.v1alpha1.UserState
+ (UserType)(0), // 1: buf.alpha.registry.v1alpha1.UserType
+ (*User)(nil), // 2: buf.alpha.registry.v1alpha1.User
+ (*OrganizationUser)(nil), // 3: buf.alpha.registry.v1alpha1.OrganizationUser
+ (*CreateUserRequest)(nil), // 4: buf.alpha.registry.v1alpha1.CreateUserRequest
+ (*CreateUserResponse)(nil), // 5: buf.alpha.registry.v1alpha1.CreateUserResponse
+ (*GetUserRequest)(nil), // 6: buf.alpha.registry.v1alpha1.GetUserRequest
+ (*GetUserResponse)(nil), // 7: buf.alpha.registry.v1alpha1.GetUserResponse
+ (*GetUserByUsernameRequest)(nil), // 8: buf.alpha.registry.v1alpha1.GetUserByUsernameRequest
+ (*GetUserByUsernameResponse)(nil), // 9: buf.alpha.registry.v1alpha1.GetUserByUsernameResponse
+ (*ListUsersRequest)(nil), // 10: buf.alpha.registry.v1alpha1.ListUsersRequest
+ (*ListUsersResponse)(nil), // 11: buf.alpha.registry.v1alpha1.ListUsersResponse
+ (*ListOrganizationUsersRequest)(nil), // 12: buf.alpha.registry.v1alpha1.ListOrganizationUsersRequest
+ (*ListOrganizationUsersResponse)(nil), // 13: buf.alpha.registry.v1alpha1.ListOrganizationUsersResponse
+ (*DeleteUserRequest)(nil), // 14: buf.alpha.registry.v1alpha1.DeleteUserRequest
+ (*DeleteUserResponse)(nil), // 15: buf.alpha.registry.v1alpha1.DeleteUserResponse
+ (*DeactivateUserRequest)(nil), // 16: buf.alpha.registry.v1alpha1.DeactivateUserRequest
+ (*DeactivateUserResponse)(nil), // 17: buf.alpha.registry.v1alpha1.DeactivateUserResponse
+ (*UpdateUserServerRoleRequest)(nil), // 18: buf.alpha.registry.v1alpha1.UpdateUserServerRoleRequest
+ (*UpdateUserServerRoleResponse)(nil), // 19: buf.alpha.registry.v1alpha1.UpdateUserServerRoleResponse
+ (*CountUsersRequest)(nil), // 20: buf.alpha.registry.v1alpha1.CountUsersRequest
+ (*CountUsersResponse)(nil), // 21: buf.alpha.registry.v1alpha1.CountUsersResponse
+ (*UpdateUserSettingsRequest)(nil), // 22: buf.alpha.registry.v1alpha1.UpdateUserSettingsRequest
+ (*UpdateUserSettingsResponse)(nil), // 23: buf.alpha.registry.v1alpha1.UpdateUserSettingsResponse
+ (*timestamppb.Timestamp)(nil), // 24: google.protobuf.Timestamp
+ (VerificationStatus)(0), // 25: buf.alpha.registry.v1alpha1.VerificationStatus
+ (OrganizationRole)(0), // 26: buf.alpha.registry.v1alpha1.OrganizationRole
+ (ServerRole)(0), // 27: buf.alpha.registry.v1alpha1.ServerRole
+}
+var file_buf_alpha_registry_v1alpha1_user_proto_depIdxs = []int32{
+ 24, // 0: buf.alpha.registry.v1alpha1.User.create_time:type_name -> google.protobuf.Timestamp
+ 24, // 1: buf.alpha.registry.v1alpha1.User.update_time:type_name -> google.protobuf.Timestamp
+ 25, // 2: buf.alpha.registry.v1alpha1.User.verification_status:type_name -> buf.alpha.registry.v1alpha1.VerificationStatus
+ 1, // 3: buf.alpha.registry.v1alpha1.User.user_type:type_name -> buf.alpha.registry.v1alpha1.UserType
+ 2, // 4: buf.alpha.registry.v1alpha1.OrganizationUser.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 26, // 5: buf.alpha.registry.v1alpha1.OrganizationUser.organization_role:type_name -> buf.alpha.registry.v1alpha1.OrganizationRole
+ 2, // 6: buf.alpha.registry.v1alpha1.CreateUserResponse.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 2, // 7: buf.alpha.registry.v1alpha1.GetUserResponse.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 2, // 8: buf.alpha.registry.v1alpha1.GetUserByUsernameResponse.user:type_name -> buf.alpha.registry.v1alpha1.User
+ 0, // 9: buf.alpha.registry.v1alpha1.ListUsersRequest.user_state_filter:type_name -> buf.alpha.registry.v1alpha1.UserState
+ 1, // 10: buf.alpha.registry.v1alpha1.ListUsersRequest.user_type_filter:type_name -> buf.alpha.registry.v1alpha1.UserType
+ 2, // 11: buf.alpha.registry.v1alpha1.ListUsersResponse.users:type_name -> buf.alpha.registry.v1alpha1.User
+ 3, // 12: buf.alpha.registry.v1alpha1.ListOrganizationUsersResponse.users:type_name -> buf.alpha.registry.v1alpha1.OrganizationUser
+ 27, // 13: buf.alpha.registry.v1alpha1.UpdateUserServerRoleRequest.server_role:type_name -> buf.alpha.registry.v1alpha1.ServerRole
+ 0, // 14: buf.alpha.registry.v1alpha1.CountUsersRequest.user_state_filter:type_name -> buf.alpha.registry.v1alpha1.UserState
+ 4, // 15: buf.alpha.registry.v1alpha1.UserService.CreateUser:input_type -> buf.alpha.registry.v1alpha1.CreateUserRequest
+ 6, // 16: buf.alpha.registry.v1alpha1.UserService.GetUser:input_type -> buf.alpha.registry.v1alpha1.GetUserRequest
+ 8, // 17: buf.alpha.registry.v1alpha1.UserService.GetUserByUsername:input_type -> buf.alpha.registry.v1alpha1.GetUserByUsernameRequest
+ 10, // 18: buf.alpha.registry.v1alpha1.UserService.ListUsers:input_type -> buf.alpha.registry.v1alpha1.ListUsersRequest
+ 12, // 19: buf.alpha.registry.v1alpha1.UserService.ListOrganizationUsers:input_type -> buf.alpha.registry.v1alpha1.ListOrganizationUsersRequest
+ 14, // 20: buf.alpha.registry.v1alpha1.UserService.DeleteUser:input_type -> buf.alpha.registry.v1alpha1.DeleteUserRequest
+ 16, // 21: buf.alpha.registry.v1alpha1.UserService.DeactivateUser:input_type -> buf.alpha.registry.v1alpha1.DeactivateUserRequest
+ 18, // 22: buf.alpha.registry.v1alpha1.UserService.UpdateUserServerRole:input_type -> buf.alpha.registry.v1alpha1.UpdateUserServerRoleRequest
+ 20, // 23: buf.alpha.registry.v1alpha1.UserService.CountUsers:input_type -> buf.alpha.registry.v1alpha1.CountUsersRequest
+ 22, // 24: buf.alpha.registry.v1alpha1.UserService.UpdateUserSettings:input_type -> buf.alpha.registry.v1alpha1.UpdateUserSettingsRequest
+ 5, // 25: buf.alpha.registry.v1alpha1.UserService.CreateUser:output_type -> buf.alpha.registry.v1alpha1.CreateUserResponse
+ 7, // 26: buf.alpha.registry.v1alpha1.UserService.GetUser:output_type -> buf.alpha.registry.v1alpha1.GetUserResponse
+ 9, // 27: buf.alpha.registry.v1alpha1.UserService.GetUserByUsername:output_type -> buf.alpha.registry.v1alpha1.GetUserByUsernameResponse
+ 11, // 28: buf.alpha.registry.v1alpha1.UserService.ListUsers:output_type -> buf.alpha.registry.v1alpha1.ListUsersResponse
+ 13, // 29: buf.alpha.registry.v1alpha1.UserService.ListOrganizationUsers:output_type -> buf.alpha.registry.v1alpha1.ListOrganizationUsersResponse
+ 15, // 30: buf.alpha.registry.v1alpha1.UserService.DeleteUser:output_type -> buf.alpha.registry.v1alpha1.DeleteUserResponse
+ 17, // 31: buf.alpha.registry.v1alpha1.UserService.DeactivateUser:output_type -> buf.alpha.registry.v1alpha1.DeactivateUserResponse
+ 19, // 32: buf.alpha.registry.v1alpha1.UserService.UpdateUserServerRole:output_type -> buf.alpha.registry.v1alpha1.UpdateUserServerRoleResponse
+ 21, // 33: buf.alpha.registry.v1alpha1.UserService.CountUsers:output_type -> buf.alpha.registry.v1alpha1.CountUsersResponse
+ 23, // 34: buf.alpha.registry.v1alpha1.UserService.UpdateUserSettings:output_type -> buf.alpha.registry.v1alpha1.UpdateUserSettingsResponse
+ 25, // [25:35] is the sub-list for method output_type
+ 15, // [15:25] is the sub-list for method input_type
+ 15, // [15:15] is the sub-list for extension type_name
+ 15, // [15:15] is the sub-list for extension extendee
+ 0, // [0:15] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_user_proto_init() }
+func file_buf_alpha_registry_v1alpha1_user_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_user_proto != nil {
+ return
+ }
+ file_buf_alpha_registry_v1alpha1_role_proto_init()
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_init()
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*User); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*OrganizationUser); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateUserRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateUserResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetUserRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetUserResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetUserByUsernameRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*GetUserByUsernameResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListUsersRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListUsersResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOrganizationUsersRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListOrganizationUsersResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteUserRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteUserResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeactivateUserRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeactivateUserResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateUserServerRoleRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateUserServerRoleResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CountUsersRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CountUsersResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateUserSettingsRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*UpdateUserSettingsResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_user_proto_msgTypes[20].OneofWrappers = []interface{}{}
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_user_proto_rawDesc,
+ NumEnums: 2,
+ NumMessages: 22,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_user_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_user_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_user_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_user_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_user_proto = out.File
+ file_buf_alpha_registry_v1alpha1_user_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_user_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_user_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/verification_status.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/verification_status.pb.go
new file mode 100644
index 000000000..fbe0f2253
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/verification_status.pb.go
@@ -0,0 +1,176 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/verification_status.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// VerificationStatus is the verification status of an owner on if we recognize them,
+// an owner can be either user or organization.
+type VerificationStatus int32
+
+const (
+ VerificationStatus_VERIFICATION_STATUS_UNSPECIFIED VerificationStatus = 0
+ // OFFICIAL indicates that the owner is maintained by Buf.
+ VerificationStatus_VERIFICATION_STATUS_OFFICIAL VerificationStatus = 1
+ // VERIFIED_PUBLISHER indicates that the owner is a third-party that has been
+ // verified by Buf.
+ VerificationStatus_VERIFICATION_STATUS_VERIFIED_PUBLISHER VerificationStatus = 2
+)
+
+// Enum value maps for VerificationStatus.
+var (
+ VerificationStatus_name = map[int32]string{
+ 0: "VERIFICATION_STATUS_UNSPECIFIED",
+ 1: "VERIFICATION_STATUS_OFFICIAL",
+ 2: "VERIFICATION_STATUS_VERIFIED_PUBLISHER",
+ }
+ VerificationStatus_value = map[string]int32{
+ "VERIFICATION_STATUS_UNSPECIFIED": 0,
+ "VERIFICATION_STATUS_OFFICIAL": 1,
+ "VERIFICATION_STATUS_VERIFIED_PUBLISHER": 2,
+ }
+)
+
+func (x VerificationStatus) Enum() *VerificationStatus {
+ p := new(VerificationStatus)
+ *p = x
+ return p
+}
+
+func (x VerificationStatus) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (VerificationStatus) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_verification_status_proto_enumTypes[0].Descriptor()
+}
+
+func (VerificationStatus) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_verification_status_proto_enumTypes[0]
+}
+
+func (x VerificationStatus) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use VerificationStatus.Descriptor instead.
+func (VerificationStatus) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDescGZIP(), []int{0}
+}
+
+var File_buf_alpha_registry_v1alpha1_verification_status_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDesc = []byte{
+ 0x0a, 0x35, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x76, 0x65,
+ 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x74, 0x61, 0x74, 0x75,
+ 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2a, 0x87, 0x01, 0x0a, 0x12, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63,
+ 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x23, 0x0a, 0x1f, 0x56,
+ 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54,
+ 0x55, 0x53, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
+ 0x12, 0x20, 0x0a, 0x1c, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49, 0x4f, 0x4e,
+ 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x4f, 0x46, 0x46, 0x49, 0x43, 0x49, 0x41, 0x4c,
+ 0x10, 0x01, 0x12, 0x2a, 0x0a, 0x26, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49, 0x43, 0x41, 0x54, 0x49,
+ 0x4f, 0x4e, 0x5f, 0x53, 0x54, 0x41, 0x54, 0x55, 0x53, 0x5f, 0x56, 0x45, 0x52, 0x49, 0x46, 0x49,
+ 0x45, 0x44, 0x5f, 0x50, 0x55, 0x42, 0x4c, 0x49, 0x53, 0x48, 0x45, 0x52, 0x10, 0x02, 0x42, 0xa4,
+ 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x31, 0x42, 0x17, 0x56, 0x65, 0x72, 0x69, 0x66, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67,
+ 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69,
+ 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67,
+ 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02,
+ 0x1b, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42,
+ 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72,
+ 0x79, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66,
+ 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c,
+ 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDescData = file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_verification_status_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_buf_alpha_registry_v1alpha1_verification_status_proto_goTypes = []interface{}{
+ (VerificationStatus)(0), // 0: buf.alpha.registry.v1alpha1.VerificationStatus
+}
+var file_buf_alpha_registry_v1alpha1_verification_status_proto_depIdxs = []int32{
+ 0, // [0:0] is the sub-list for method output_type
+ 0, // [0:0] is the sub-list for method input_type
+ 0, // [0:0] is the sub-list for extension type_name
+ 0, // [0:0] is the sub-list for extension extendee
+ 0, // [0:0] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_verification_status_proto_init() }
+func file_buf_alpha_registry_v1alpha1_verification_status_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_verification_status_proto != nil {
+ return
+ }
+ type x struct{}
+ out := protoimpl.TypeBuilder{
+ File: protoimpl.DescBuilder{
+ GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
+ RawDescriptor: file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 0,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_verification_status_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_verification_status_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_verification_status_proto_enumTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_verification_status_proto = out.File
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_verification_status_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/webhook.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/webhook.pb.go
new file mode 100644
index 000000000..08845fac7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/registry/v1alpha1/webhook.pb.go
@@ -0,0 +1,815 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/registry/v1alpha1/webhook.proto
+
+package registryv1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ timestamppb "google.golang.org/protobuf/types/known/timestamppb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// WebhookEvent contains the currently supported webhook event types.
+type WebhookEvent int32
+
+const (
+ // WEBHOOK_EVENT_UNSPECIFIED is a safe noop default for webhook events
+ // subscription. It will trigger an error if trying to register a webhook with
+ // this event.
+ WebhookEvent_WEBHOOK_EVENT_UNSPECIFIED WebhookEvent = 0
+ // WEBHOOK_EVENT_REPOSITORY_PUSH is emitted whenever a successful buf push is
+ // completed for a specific repository.
+ WebhookEvent_WEBHOOK_EVENT_REPOSITORY_PUSH WebhookEvent = 1
+)
+
+// Enum value maps for WebhookEvent.
+var (
+ WebhookEvent_name = map[int32]string{
+ 0: "WEBHOOK_EVENT_UNSPECIFIED",
+ 1: "WEBHOOK_EVENT_REPOSITORY_PUSH",
+ }
+ WebhookEvent_value = map[string]int32{
+ "WEBHOOK_EVENT_UNSPECIFIED": 0,
+ "WEBHOOK_EVENT_REPOSITORY_PUSH": 1,
+ }
+)
+
+func (x WebhookEvent) Enum() *WebhookEvent {
+ p := new(WebhookEvent)
+ *p = x
+ return p
+}
+
+func (x WebhookEvent) String() string {
+ return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
+}
+
+func (WebhookEvent) Descriptor() protoreflect.EnumDescriptor {
+ return file_buf_alpha_registry_v1alpha1_webhook_proto_enumTypes[0].Descriptor()
+}
+
+func (WebhookEvent) Type() protoreflect.EnumType {
+ return &file_buf_alpha_registry_v1alpha1_webhook_proto_enumTypes[0]
+}
+
+func (x WebhookEvent) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(x)
+}
+
+// Deprecated: Use WebhookEvent.Descriptor instead.
+func (WebhookEvent) EnumDescriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescGZIP(), []int{0}
+}
+
+// CreateWebhookRequest is the proto request representation of a
+// webhook request body.
+type CreateWebhookRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The event to subscribe to for the given repository.
+ WebhookEvent WebhookEvent `protobuf:"varint,1,opt,name=webhook_event,json=webhookEvent,proto3,enum=buf.alpha.registry.v1alpha1.WebhookEvent" json:"webhook_event,omitempty"`
+ // The owner name of the repository in the corresponding subscription request.
+ OwnerName string `protobuf:"bytes,2,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"`
+ // The repository name that the subscriber wishes create a subscription for.
+ RepositoryName string `protobuf:"bytes,3,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The subscriber's callback URL where notifications should be delivered.
+ CallbackUrl string `protobuf:"bytes,4,opt,name=callback_url,json=callbackUrl,proto3" json:"callback_url,omitempty"`
+}
+
+func (x *CreateWebhookRequest) Reset() {
+ *x = CreateWebhookRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateWebhookRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateWebhookRequest) ProtoMessage() {}
+
+func (x *CreateWebhookRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_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 CreateWebhookRequest.ProtoReflect.Descriptor instead.
+func (*CreateWebhookRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *CreateWebhookRequest) GetWebhookEvent() WebhookEvent {
+ if x != nil {
+ return x.WebhookEvent
+ }
+ return WebhookEvent_WEBHOOK_EVENT_UNSPECIFIED
+}
+
+func (x *CreateWebhookRequest) GetOwnerName() string {
+ if x != nil {
+ return x.OwnerName
+ }
+ return ""
+}
+
+func (x *CreateWebhookRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *CreateWebhookRequest) GetCallbackUrl() string {
+ if x != nil {
+ return x.CallbackUrl
+ }
+ return ""
+}
+
+// CreateWebhookResponse is the proto response representation
+// of a webhook request.
+type CreateWebhookResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Created webhook subscription.
+ Webhook *Webhook `protobuf:"bytes,1,opt,name=webhook,proto3" json:"webhook,omitempty"`
+}
+
+func (x *CreateWebhookResponse) Reset() {
+ *x = CreateWebhookResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *CreateWebhookResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CreateWebhookResponse) ProtoMessage() {}
+
+func (x *CreateWebhookResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_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 CreateWebhookResponse.ProtoReflect.Descriptor instead.
+func (*CreateWebhookResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CreateWebhookResponse) GetWebhook() *Webhook {
+ if x != nil {
+ return x.Webhook
+ }
+ return nil
+}
+
+// DeleteWebhookRequest is the request for unsubscribing to a webhook.
+type DeleteWebhookRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The id of the webhook subscription to delete.
+ WebhookId string `protobuf:"bytes,1,opt,name=webhook_id,json=webhookId,proto3" json:"webhook_id,omitempty"`
+}
+
+func (x *DeleteWebhookRequest) Reset() {
+ *x = DeleteWebhookRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteWebhookRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteWebhookRequest) ProtoMessage() {}
+
+func (x *DeleteWebhookRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_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 DeleteWebhookRequest.ProtoReflect.Descriptor instead.
+func (*DeleteWebhookRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *DeleteWebhookRequest) GetWebhookId() string {
+ if x != nil {
+ return x.WebhookId
+ }
+ return ""
+}
+
+// DeleteWebhookResponse is the response for unsubscribing
+// from a webhook.
+type DeleteWebhookResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+}
+
+func (x *DeleteWebhookResponse) Reset() {
+ *x = DeleteWebhookResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[3]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *DeleteWebhookResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DeleteWebhookResponse) ProtoMessage() {}
+
+func (x *DeleteWebhookResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_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 DeleteWebhookResponse.ProtoReflect.Descriptor instead.
+func (*DeleteWebhookResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescGZIP(), []int{3}
+}
+
+// ListWebhooksRequest is the request to get the
+// list of subscribed webhooks for a given repository.
+type ListWebhooksRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The repository name given in the corresponding subscription request.
+ RepositoryName string `protobuf:"bytes,1,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The owner associated with the repository.
+ OwnerName string `protobuf:"bytes,2,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"`
+ // The page token for paginating.
+ PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken,proto3" json:"page_token,omitempty"`
+}
+
+func (x *ListWebhooksRequest) Reset() {
+ *x = ListWebhooksRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[4]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListWebhooksRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListWebhooksRequest) ProtoMessage() {}
+
+func (x *ListWebhooksRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_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 ListWebhooksRequest.ProtoReflect.Descriptor instead.
+func (*ListWebhooksRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *ListWebhooksRequest) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *ListWebhooksRequest) GetOwnerName() string {
+ if x != nil {
+ return x.OwnerName
+ }
+ return ""
+}
+
+func (x *ListWebhooksRequest) GetPageToken() string {
+ if x != nil {
+ return x.PageToken
+ }
+ return ""
+}
+
+// ListWebhooksResponse is the response for the list of
+// subscribed webhooks for a given repository.
+type ListWebhooksResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The list of subscribed webhooks for a given repository.
+ Webhooks []*Webhook `protobuf:"bytes,1,rep,name=webhooks,proto3" json:"webhooks,omitempty"`
+ // The next page token for paginating.
+ NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken,proto3" json:"next_page_token,omitempty"`
+}
+
+func (x *ListWebhooksResponse) Reset() {
+ *x = ListWebhooksResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[5]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *ListWebhooksResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ListWebhooksResponse) ProtoMessage() {}
+
+func (x *ListWebhooksResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_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 ListWebhooksResponse.ProtoReflect.Descriptor instead.
+func (*ListWebhooksResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *ListWebhooksResponse) GetWebhooks() []*Webhook {
+ if x != nil {
+ return x.Webhooks
+ }
+ return nil
+}
+
+func (x *ListWebhooksResponse) GetNextPageToken() string {
+ if x != nil {
+ return x.NextPageToken
+ }
+ return ""
+}
+
+// Webhook is the representation of a webhook repository event subscription.
+type Webhook struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // The event associated with the subscription id.
+ Event WebhookEvent `protobuf:"varint,1,opt,name=event,proto3,enum=buf.alpha.registry.v1alpha1.WebhookEvent" json:"event,omitempty"`
+ // The id of the associated subscription.
+ WebhookId string `protobuf:"bytes,2,opt,name=webhook_id,json=webhookId,proto3" json:"webhook_id,omitempty"`
+ // The webhook creation timestamp.
+ CreateTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+ // The webhook last updated timestamp.
+ UpdateTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=update_time,json=updateTime,proto3" json:"update_time,omitempty"`
+ // The webhook repository name.
+ RepositoryName string `protobuf:"bytes,5,opt,name=repository_name,json=repositoryName,proto3" json:"repository_name,omitempty"`
+ // The webhook repository owner name.
+ OwnerName string `protobuf:"bytes,6,opt,name=owner_name,json=ownerName,proto3" json:"owner_name,omitempty"`
+ // The subscriber's callback URL where notifications are delivered. Currently
+ // we only support Connect-powered backends with application/proto as the
+ // content type. Make sure that your URL ends with
+ // "/buf.alpha.webhook.v1alpha1.EventService/Event". For more information
+ // about Connect, see https://connect.build.
+ CallbackUrl string `protobuf:"bytes,7,opt,name=callback_url,json=callbackUrl,proto3" json:"callback_url,omitempty"`
+}
+
+func (x *Webhook) Reset() {
+ *x = Webhook{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[6]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Webhook) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Webhook) ProtoMessage() {}
+
+func (x *Webhook) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_registry_v1alpha1_webhook_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 Webhook.ProtoReflect.Descriptor instead.
+func (*Webhook) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *Webhook) GetEvent() WebhookEvent {
+ if x != nil {
+ return x.Event
+ }
+ return WebhookEvent_WEBHOOK_EVENT_UNSPECIFIED
+}
+
+func (x *Webhook) GetWebhookId() string {
+ if x != nil {
+ return x.WebhookId
+ }
+ return ""
+}
+
+func (x *Webhook) GetCreateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.CreateTime
+ }
+ return nil
+}
+
+func (x *Webhook) GetUpdateTime() *timestamppb.Timestamp {
+ if x != nil {
+ return x.UpdateTime
+ }
+ return nil
+}
+
+func (x *Webhook) GetRepositoryName() string {
+ if x != nil {
+ return x.RepositoryName
+ }
+ return ""
+}
+
+func (x *Webhook) GetOwnerName() string {
+ if x != nil {
+ return x.OwnerName
+ }
+ return ""
+}
+
+func (x *Webhook) GetCallbackUrl() string {
+ if x != nil {
+ return x.CallbackUrl
+ }
+ return ""
+}
+
+var File_buf_alpha_registry_v1alpha1_webhook_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_registry_v1alpha1_webhook_proto_rawDesc = []byte{
+ 0x0a, 0x29, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x77, 0x65,
+ 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1b, 0x62, 0x75, 0x66,
+ 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74,
+ 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xd1, 0x01, 0x0a, 0x14, 0x43, 0x72,
+ 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65,
+ 0x73, 0x74, 0x12, 0x4e, 0x0a, 0x0d, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x65, 0x76,
+ 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45,
+ 0x76, 0x65, 0x6e, 0x74, 0x52, 0x0c, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65,
+ 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x4e, 0x61, 0x6d,
+ 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f,
+ 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61,
+ 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09,
+ 0x52, 0x0b, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x55, 0x72, 0x6c, 0x22, 0x57, 0x0a,
+ 0x15, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x07, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f,
+ 0x6b, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x07, 0x77,
+ 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x22, 0x35, 0x0a, 0x14, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1d,
+ 0x0a, 0x0a, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x09, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x49, 0x64, 0x22, 0x17, 0x0a,
+ 0x15, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x7c, 0x0a, 0x13, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65,
+ 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x27, 0x0a,
+ 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f,
+ 0x6b, 0x65, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x70, 0x61, 0x67, 0x65, 0x54,
+ 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0x80, 0x01, 0x0a, 0x14, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62,
+ 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x40, 0x0a,
+ 0x08, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32,
+ 0x24, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69,
+ 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x57, 0x65,
+ 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x08, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x12,
+ 0x26, 0x0a, 0x0f, 0x6e, 0x65, 0x78, 0x74, 0x5f, 0x70, 0x61, 0x67, 0x65, 0x5f, 0x74, 0x6f, 0x6b,
+ 0x65, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x6e, 0x65, 0x78, 0x74, 0x50, 0x61,
+ 0x67, 0x65, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x22, 0xce, 0x02, 0x0a, 0x07, 0x57, 0x65, 0x62, 0x68,
+ 0x6f, 0x6f, 0x6b, 0x12, 0x3f, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01,
+ 0x28, 0x0e, 0x32, 0x29, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72,
+ 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0x2e, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x52, 0x05, 0x65,
+ 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x5f,
+ 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x77, 0x65, 0x62, 0x68, 0x6f, 0x6f,
+ 0x6b, 0x49, 0x64, 0x12, 0x3b, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
+ 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
+ 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73,
+ 0x74, 0x61, 0x6d, 0x70, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65,
+ 0x12, 0x3b, 0x0a, 0x0b, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18,
+ 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70,
+ 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d,
+ 0x70, 0x52, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x27, 0x0a,
+ 0x0f, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x6e, 0x61, 0x6d, 0x65,
+ 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x72, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f,
+ 0x72, 0x79, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x5f,
+ 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x6f, 0x77, 0x6e, 0x65,
+ 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63,
+ 0x6b, 0x5f, 0x75, 0x72, 0x6c, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x61, 0x6c,
+ 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x55, 0x72, 0x6c, 0x2a, 0x50, 0x0a, 0x0c, 0x57, 0x65, 0x62, 0x68,
+ 0x6f, 0x6f, 0x6b, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x12, 0x1d, 0x0a, 0x19, 0x57, 0x45, 0x42, 0x48,
+ 0x4f, 0x4f, 0x4b, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
+ 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x21, 0x0a, 0x1d, 0x57, 0x45, 0x42, 0x48, 0x4f,
+ 0x4f, 0x4b, 0x5f, 0x45, 0x56, 0x45, 0x4e, 0x54, 0x5f, 0x52, 0x45, 0x50, 0x4f, 0x53, 0x49, 0x54,
+ 0x4f, 0x52, 0x59, 0x5f, 0x50, 0x55, 0x53, 0x48, 0x10, 0x01, 0x32, 0xfb, 0x02, 0x0a, 0x0e, 0x57,
+ 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x78, 0x0a,
+ 0x0d, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x31,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x43, 0x72, 0x65,
+ 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
+ 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73,
+ 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x12, 0x78, 0x0a, 0x0d, 0x44, 0x65, 0x6c, 0x65, 0x74,
+ 0x65, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x12, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x57, 0x65, 0x62,
+ 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x32, 0x2e, 0x62, 0x75,
+ 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65,
+ 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22,
+ 0x00, 0x12, 0x75, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b,
+ 0x73, 0x12, 0x30, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65,
+ 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e,
+ 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x75,
+ 0x65, 0x73, 0x74, 0x1a, 0x31, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e,
+ 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x65, 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x73, 0x52, 0x65,
+ 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x99, 0x02, 0x0a, 0x1f, 0x63, 0x6f, 0x6d,
+ 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x72, 0x65, 0x67, 0x69, 0x73,
+ 0x74, 0x72, 0x79, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0c, 0x57, 0x65,
+ 0x62, 0x68, 0x6f, 0x6f, 0x6b, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x59, 0x67, 0x69,
+ 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c,
+ 0x64, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65,
+ 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x2f, 0x76, 0x31,
+ 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x76,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02, 0x03, 0x42, 0x41, 0x52, 0xaa, 0x02, 0x1b,
+ 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74,
+ 0x72, 0x79, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xca, 0x02, 0x1b, 0x42, 0x75,
+ 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79,
+ 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x27, 0x42, 0x75, 0x66, 0x5c,
+ 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x5c, 0x56,
+ 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64,
+ 0x61, 0x74, 0x61, 0xea, 0x02, 0x1e, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68, 0x61,
+ 0x3a, 0x3a, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescOnce sync.Once
+ file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescData = file_buf_alpha_registry_v1alpha1_webhook_proto_rawDesc
+)
+
+func file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescGZIP() []byte {
+ file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescData)
+ })
+ return file_buf_alpha_registry_v1alpha1_webhook_proto_rawDescData
+}
+
+var file_buf_alpha_registry_v1alpha1_webhook_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
+var file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes = make([]protoimpl.MessageInfo, 7)
+var file_buf_alpha_registry_v1alpha1_webhook_proto_goTypes = []interface{}{
+ (WebhookEvent)(0), // 0: buf.alpha.registry.v1alpha1.WebhookEvent
+ (*CreateWebhookRequest)(nil), // 1: buf.alpha.registry.v1alpha1.CreateWebhookRequest
+ (*CreateWebhookResponse)(nil), // 2: buf.alpha.registry.v1alpha1.CreateWebhookResponse
+ (*DeleteWebhookRequest)(nil), // 3: buf.alpha.registry.v1alpha1.DeleteWebhookRequest
+ (*DeleteWebhookResponse)(nil), // 4: buf.alpha.registry.v1alpha1.DeleteWebhookResponse
+ (*ListWebhooksRequest)(nil), // 5: buf.alpha.registry.v1alpha1.ListWebhooksRequest
+ (*ListWebhooksResponse)(nil), // 6: buf.alpha.registry.v1alpha1.ListWebhooksResponse
+ (*Webhook)(nil), // 7: buf.alpha.registry.v1alpha1.Webhook
+ (*timestamppb.Timestamp)(nil), // 8: google.protobuf.Timestamp
+}
+var file_buf_alpha_registry_v1alpha1_webhook_proto_depIdxs = []int32{
+ 0, // 0: buf.alpha.registry.v1alpha1.CreateWebhookRequest.webhook_event:type_name -> buf.alpha.registry.v1alpha1.WebhookEvent
+ 7, // 1: buf.alpha.registry.v1alpha1.CreateWebhookResponse.webhook:type_name -> buf.alpha.registry.v1alpha1.Webhook
+ 7, // 2: buf.alpha.registry.v1alpha1.ListWebhooksResponse.webhooks:type_name -> buf.alpha.registry.v1alpha1.Webhook
+ 0, // 3: buf.alpha.registry.v1alpha1.Webhook.event:type_name -> buf.alpha.registry.v1alpha1.WebhookEvent
+ 8, // 4: buf.alpha.registry.v1alpha1.Webhook.create_time:type_name -> google.protobuf.Timestamp
+ 8, // 5: buf.alpha.registry.v1alpha1.Webhook.update_time:type_name -> google.protobuf.Timestamp
+ 1, // 6: buf.alpha.registry.v1alpha1.WebhookService.CreateWebhook:input_type -> buf.alpha.registry.v1alpha1.CreateWebhookRequest
+ 3, // 7: buf.alpha.registry.v1alpha1.WebhookService.DeleteWebhook:input_type -> buf.alpha.registry.v1alpha1.DeleteWebhookRequest
+ 5, // 8: buf.alpha.registry.v1alpha1.WebhookService.ListWebhooks:input_type -> buf.alpha.registry.v1alpha1.ListWebhooksRequest
+ 2, // 9: buf.alpha.registry.v1alpha1.WebhookService.CreateWebhook:output_type -> buf.alpha.registry.v1alpha1.CreateWebhookResponse
+ 4, // 10: buf.alpha.registry.v1alpha1.WebhookService.DeleteWebhook:output_type -> buf.alpha.registry.v1alpha1.DeleteWebhookResponse
+ 6, // 11: buf.alpha.registry.v1alpha1.WebhookService.ListWebhooks:output_type -> buf.alpha.registry.v1alpha1.ListWebhooksResponse
+ 9, // [9:12] is the sub-list for method output_type
+ 6, // [6:9] is the sub-list for method input_type
+ 6, // [6:6] is the sub-list for extension type_name
+ 6, // [6:6] is the sub-list for extension extendee
+ 0, // [0:6] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_registry_v1alpha1_webhook_proto_init() }
+func file_buf_alpha_registry_v1alpha1_webhook_proto_init() {
+ if File_buf_alpha_registry_v1alpha1_webhook_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateWebhookRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*CreateWebhookResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteWebhookRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*DeleteWebhookResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListWebhooksRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*ListWebhooksResponse); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Webhook); 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_buf_alpha_registry_v1alpha1_webhook_proto_rawDesc,
+ NumEnums: 1,
+ NumMessages: 7,
+ NumExtensions: 0,
+ NumServices: 1,
+ },
+ GoTypes: file_buf_alpha_registry_v1alpha1_webhook_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_registry_v1alpha1_webhook_proto_depIdxs,
+ EnumInfos: file_buf_alpha_registry_v1alpha1_webhook_proto_enumTypes,
+ MessageInfos: file_buf_alpha_registry_v1alpha1_webhook_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_registry_v1alpha1_webhook_proto = out.File
+ file_buf_alpha_registry_v1alpha1_webhook_proto_rawDesc = nil
+ file_buf_alpha_registry_v1alpha1_webhook_proto_goTypes = nil
+ file_buf_alpha_registry_v1alpha1_webhook_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/studio/v1alpha1/invoke.pb.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/studio/v1alpha1/invoke.pb.go
new file mode 100644
index 000000000..0dfa78350
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/studio/v1alpha1/invoke.pb.go
@@ -0,0 +1,395 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1-devel
+// protoc (unknown)
+// source: buf/alpha/studio/v1alpha1/invoke.proto
+
+// The buf.alpha.studio.v1alpha1 package contains types used by the buf studio
+// agent. Because browsers are not capable of sending gRPC requests directly,
+// users can run a studio agent to that receives enveloped requests from the
+// browser and forwards them as gRPC requests.
+//
+// Ideally the agent would be simple protocol translating HTTP proxy without
+// requiring any custom envelope. Unfortunately, js in the browser cannot set
+// per request proxy configuration and we cannot specify that we want to open a
+// connection to the request agent while specifying a different server in the
+// request's Host header. The studio agent and UI could communicate this through
+// a custom header instead, but reading custom headers requires a CORS-preflight
+// request.
+//
+// To facilitate easier deployment it in environments with complicated edge
+// configuration, it is a goal for the agent and UI to communicate without the
+// need for a CORS-preflight requests. This limits our ability to use custom
+// headers and restricts allowed values for the Content-Type header. Due to this
+// we cannot simply use gRPC-Web with an additional header, but instead rely on
+// enveloping the request and responses in a base64 encoded binary proto message
+// sent over a POST endpoint with text/plain as Content-Type.
+//
+// We may explore other transports such as WebSockets or WebTransport, at which
+// point we should define proper proto services and methods here as well.
+
+package studiov1alpha1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// Headers encode HTTP headers.
+type Headers struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
+ Value []string `protobuf:"bytes,2,rep,name=value,proto3" json:"value,omitempty"`
+}
+
+func (x *Headers) Reset() {
+ *x = Headers{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_studio_v1alpha1_invoke_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Headers) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Headers) ProtoMessage() {}
+
+func (x *Headers) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_studio_v1alpha1_invoke_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 Headers.ProtoReflect.Descriptor instead.
+func (*Headers) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_studio_v1alpha1_invoke_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Headers) GetKey() string {
+ if x != nil {
+ return x.Key
+ }
+ return ""
+}
+
+func (x *Headers) GetValue() []string {
+ if x != nil {
+ return x.Value
+ }
+ return nil
+}
+
+// InvokeRequest encodes an enveloped RPC request. See the package documentation
+// for more information.
+type InvokeRequest struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Target server the agent should forward this request to, e.g.
+ // "https://api.acme.corp/pkg.Service/Method". Using the "http" scheme will
+ // cause the request to be forwarded as h2c, whereas "https" forwards the
+ // request with regular h2.
+ Target string `protobuf:"bytes,1,opt,name=target,proto3" json:"target,omitempty"`
+ // Headers to send with the request. If body is set, a Content-Type header
+ // must be specified.
+ Headers []*Headers `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty"`
+ // The message to be sent in the request (without any protocol specific framing).
+ Body []byte `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"`
+}
+
+func (x *InvokeRequest) Reset() {
+ *x = InvokeRequest{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_studio_v1alpha1_invoke_proto_msgTypes[1]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InvokeRequest) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InvokeRequest) ProtoMessage() {}
+
+func (x *InvokeRequest) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_studio_v1alpha1_invoke_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 InvokeRequest.ProtoReflect.Descriptor instead.
+func (*InvokeRequest) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_studio_v1alpha1_invoke_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *InvokeRequest) GetTarget() string {
+ if x != nil {
+ return x.Target
+ }
+ return ""
+}
+
+func (x *InvokeRequest) GetHeaders() []*Headers {
+ if x != nil {
+ return x.Headers
+ }
+ return nil
+}
+
+func (x *InvokeRequest) GetBody() []byte {
+ if x != nil {
+ return x.Body
+ }
+ return nil
+}
+
+// InvokeResponse encodes an enveloped RPC response. See the package documentation
+// for more information.
+type InvokeResponse struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ // Headers received in the response.
+ Headers []*Headers `protobuf:"bytes,1,rep,name=headers,proto3" json:"headers,omitempty"`
+ // The encoded message received in the response (without protocol specific framing).
+ Body []byte `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"`
+ // Trailers received in the response.
+ Trailers []*Headers `protobuf:"bytes,3,rep,name=trailers,proto3" json:"trailers,omitempty"`
+}
+
+func (x *InvokeResponse) Reset() {
+ *x = InvokeResponse{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_buf_alpha_studio_v1alpha1_invoke_proto_msgTypes[2]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *InvokeResponse) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*InvokeResponse) ProtoMessage() {}
+
+func (x *InvokeResponse) ProtoReflect() protoreflect.Message {
+ mi := &file_buf_alpha_studio_v1alpha1_invoke_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 InvokeResponse.ProtoReflect.Descriptor instead.
+func (*InvokeResponse) Descriptor() ([]byte, []int) {
+ return file_buf_alpha_studio_v1alpha1_invoke_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *InvokeResponse) GetHeaders() []*Headers {
+ if x != nil {
+ return x.Headers
+ }
+ return nil
+}
+
+func (x *InvokeResponse) GetBody() []byte {
+ if x != nil {
+ return x.Body
+ }
+ return nil
+}
+
+func (x *InvokeResponse) GetTrailers() []*Headers {
+ if x != nil {
+ return x.Trailers
+ }
+ return nil
+}
+
+var File_buf_alpha_studio_v1alpha1_invoke_proto protoreflect.FileDescriptor
+
+var file_buf_alpha_studio_v1alpha1_invoke_proto_rawDesc = []byte{
+ 0x0a, 0x26, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f, 0x73, 0x74, 0x75, 0x64,
+ 0x69, 0x6f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2f, 0x69, 0x6e, 0x76, 0x6f,
+ 0x6b, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x19, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x2e, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x22, 0x31, 0x0a, 0x07, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x10,
+ 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79,
+ 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52,
+ 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x79, 0x0a, 0x0d, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65,
+ 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65,
+ 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x12,
+ 0x3c, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b,
+ 0x32, 0x22, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x73, 0x74, 0x75,
+ 0x64, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61,
+ 0x64, 0x65, 0x72, 0x73, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a,
+ 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64,
+ 0x79, 0x22, 0xa2, 0x01, 0x0a, 0x0e, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65, 0x52, 0x65, 0x73, 0x70,
+ 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18,
+ 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68,
+ 0x61, 0x2e, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61,
+ 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65,
+ 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c,
+ 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x3e, 0x0a, 0x08, 0x74, 0x72, 0x61, 0x69, 0x6c, 0x65,
+ 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x62, 0x75, 0x66, 0x2e, 0x61,
+ 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x2e, 0x76, 0x31, 0x61, 0x6c,
+ 0x70, 0x68, 0x61, 0x31, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x52, 0x08, 0x74, 0x72,
+ 0x61, 0x69, 0x6c, 0x65, 0x72, 0x73, 0x42, 0x8a, 0x02, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x62,
+ 0x75, 0x66, 0x2e, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2e, 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x2e,
+ 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x42, 0x0b, 0x49, 0x6e, 0x76, 0x6f, 0x6b, 0x65,
+ 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x55, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e,
+ 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75, 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x62, 0x75, 0x66,
+ 0x2f, 0x70, 0x72, 0x69, 0x76, 0x61, 0x74, 0x65, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x70, 0x72, 0x6f,
+ 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x2f,
+ 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x2f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x3b,
+ 0x73, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x76, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xa2, 0x02,
+ 0x03, 0x42, 0x41, 0x53, 0xaa, 0x02, 0x19, 0x42, 0x75, 0x66, 0x2e, 0x41, 0x6c, 0x70, 0x68, 0x61,
+ 0x2e, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x2e, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31,
+ 0xca, 0x02, 0x19, 0x42, 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x53, 0x74, 0x75,
+ 0x64, 0x69, 0x6f, 0x5c, 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0xe2, 0x02, 0x25, 0x42,
+ 0x75, 0x66, 0x5c, 0x41, 0x6c, 0x70, 0x68, 0x61, 0x5c, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x5c,
+ 0x56, 0x31, 0x61, 0x6c, 0x70, 0x68, 0x61, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61,
+ 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x1c, 0x42, 0x75, 0x66, 0x3a, 0x3a, 0x41, 0x6c, 0x70, 0x68,
+ 0x61, 0x3a, 0x3a, 0x53, 0x74, 0x75, 0x64, 0x69, 0x6f, 0x3a, 0x3a, 0x56, 0x31, 0x61, 0x6c, 0x70,
+ 0x68, 0x61, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+}
+
+var (
+ file_buf_alpha_studio_v1alpha1_invoke_proto_rawDescOnce sync.Once
+ file_buf_alpha_studio_v1alpha1_invoke_proto_rawDescData = file_buf_alpha_studio_v1alpha1_invoke_proto_rawDesc
+)
+
+func file_buf_alpha_studio_v1alpha1_invoke_proto_rawDescGZIP() []byte {
+ file_buf_alpha_studio_v1alpha1_invoke_proto_rawDescOnce.Do(func() {
+ file_buf_alpha_studio_v1alpha1_invoke_proto_rawDescData = protoimpl.X.CompressGZIP(file_buf_alpha_studio_v1alpha1_invoke_proto_rawDescData)
+ })
+ return file_buf_alpha_studio_v1alpha1_invoke_proto_rawDescData
+}
+
+var file_buf_alpha_studio_v1alpha1_invoke_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
+var file_buf_alpha_studio_v1alpha1_invoke_proto_goTypes = []interface{}{
+ (*Headers)(nil), // 0: buf.alpha.studio.v1alpha1.Headers
+ (*InvokeRequest)(nil), // 1: buf.alpha.studio.v1alpha1.InvokeRequest
+ (*InvokeResponse)(nil), // 2: buf.alpha.studio.v1alpha1.InvokeResponse
+}
+var file_buf_alpha_studio_v1alpha1_invoke_proto_depIdxs = []int32{
+ 0, // 0: buf.alpha.studio.v1alpha1.InvokeRequest.headers:type_name -> buf.alpha.studio.v1alpha1.Headers
+ 0, // 1: buf.alpha.studio.v1alpha1.InvokeResponse.headers:type_name -> buf.alpha.studio.v1alpha1.Headers
+ 0, // 2: buf.alpha.studio.v1alpha1.InvokeResponse.trailers:type_name -> buf.alpha.studio.v1alpha1.Headers
+ 3, // [3:3] is the sub-list for method output_type
+ 3, // [3:3] is the sub-list for method input_type
+ 3, // [3:3] is the sub-list for extension type_name
+ 3, // [3:3] is the sub-list for extension extendee
+ 0, // [0:3] is the sub-list for field type_name
+}
+
+func init() { file_buf_alpha_studio_v1alpha1_invoke_proto_init() }
+func file_buf_alpha_studio_v1alpha1_invoke_proto_init() {
+ if File_buf_alpha_studio_v1alpha1_invoke_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_buf_alpha_studio_v1alpha1_invoke_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Headers); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_studio_v1alpha1_invoke_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InvokeRequest); i {
+ case 0:
+ return &v.state
+ case 1:
+ return &v.sizeCache
+ case 2:
+ return &v.unknownFields
+ default:
+ return nil
+ }
+ }
+ file_buf_alpha_studio_v1alpha1_invoke_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*InvokeResponse); 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_buf_alpha_studio_v1alpha1_invoke_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 3,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_buf_alpha_studio_v1alpha1_invoke_proto_goTypes,
+ DependencyIndexes: file_buf_alpha_studio_v1alpha1_invoke_proto_depIdxs,
+ MessageInfos: file_buf_alpha_studio_v1alpha1_invoke_proto_msgTypes,
+ }.Build()
+ File_buf_alpha_studio_v1alpha1_invoke_proto = out.File
+ file_buf_alpha_studio_v1alpha1_invoke_proto_rawDesc = nil
+ file_buf_alpha_studio_v1alpha1_invoke_proto_goTypes = nil
+ file_buf_alpha_studio_v1alpha1_invoke_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/studio/v1alpha1/usage.gen.go b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/studio/v1alpha1/usage.gen.go
new file mode 100644
index 000000000..67b398d8b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/gen/proto/go/buf/alpha/studio/v1alpha1/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package studiov1alpha1
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/app.go b/vendor/github.com/bufbuild/buf/private/pkg/app/app.go
new file mode 100644
index 000000000..59cad0e87
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/app.go
@@ -0,0 +1,334 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 app provides application primitives.
+package app
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "os"
+ "sort"
+
+ "github.com/bufbuild/buf/private/pkg/interrupt"
+)
+
+// EnvContainer provides envionment variables.
+type EnvContainer interface {
+ // Env gets the environment variable value for the key.
+ //
+ // Returns empty string if the key is not set or the value is empty.
+ Env(key string) string
+ // ForEachEnv iterates over all non-empty environment variables and calls the function.
+ //
+ // The value will never be empty.
+ ForEachEnv(func(string, string))
+}
+
+// NewEnvContainer returns a new EnvContainer.
+//
+// Empty values are effectively ignored.
+func NewEnvContainer(m map[string]string) EnvContainer {
+ return newEnvContainer(m)
+}
+
+// NewEnvContainerForOS returns a new EnvContainer for the operating system.
+func NewEnvContainerForOS() (EnvContainer, error) {
+ return newEnvContainerForEnviron(os.Environ())
+}
+
+// NewEnvContainerWithOverrides returns a new EnvContainer with the values of the input
+// EnvContainer, overridden by the values in overrides.
+//
+// Empty values are effectively ignored. To unset a key, set the value to "" in overrides.
+func NewEnvContainerWithOverrides(envContainer EnvContainer, overrides map[string]string) EnvContainer {
+ m := EnvironMap(envContainer)
+ for key, value := range overrides {
+ m[key] = value
+ }
+ return newEnvContainer(m)
+}
+
+// StdinContainer provides stdin.
+type StdinContainer interface {
+ // Stdin provides stdin.
+ //
+ // If no value was passed when Stdio was created, this will return io.EOF on any call.
+ Stdin() io.Reader
+}
+
+// NewStdinContainer returns a new StdinContainer.
+func NewStdinContainer(reader io.Reader) StdinContainer {
+ return newStdinContainer(reader)
+}
+
+// NewStdinContainerForOS returns a new StdinContainer for the operating system.
+func NewStdinContainerForOS() StdinContainer {
+ return newStdinContainer(os.Stdin)
+}
+
+// StdoutContainer provides stdout.
+type StdoutContainer interface {
+ // Stdout provides stdout.
+ //
+ // If no value was passed when Stdio was created, this will return io.EOF on any call.
+ Stdout() io.Writer
+}
+
+// NewStdoutContainer returns a new StdoutContainer.
+func NewStdoutContainer(writer io.Writer) StdoutContainer {
+ return newStdoutContainer(writer)
+}
+
+// NewStdoutContainerForOS returns a new StdoutContainer for the operatoutg system.
+func NewStdoutContainerForOS() StdoutContainer {
+ return newStdoutContainer(os.Stdout)
+}
+
+// StderrContainer provides stderr.
+type StderrContainer interface {
+ // Stderr provides stderr.
+ //
+ // If no value was passed when Stdio was created, this will return io.EOF on any call.
+ Stderr() io.Writer
+}
+
+// NewStderrContainer returns a new StderrContainer.
+func NewStderrContainer(writer io.Writer) StderrContainer {
+ return newStderrContainer(writer)
+}
+
+// NewStderrContainerForOS returns a new StderrContainer for the operaterrg system.
+func NewStderrContainerForOS() StderrContainer {
+ return newStderrContainer(os.Stderr)
+}
+
+// ArgContainer provides the arguments.
+type ArgContainer interface {
+ // NumArgs gets the number of arguments.
+ NumArgs() int
+ // Arg gets the ith argument.
+ //
+ // Panics if i < 0 || i >= Len().
+ Arg(i int) string
+}
+
+// NewArgContainer returns a new ArgContainer.
+func NewArgContainer(args ...string) ArgContainer {
+ return newArgContainer(args)
+}
+
+// NewArgContainerForOS returns a new ArgContainer for the operating system.
+func NewArgContainerForOS() ArgContainer {
+ return newArgContainer(os.Args)
+}
+
+// Container contains environment variables, args, and stdio.
+type Container interface {
+ EnvContainer
+ StdinContainer
+ StdoutContainer
+ StderrContainer
+ ArgContainer
+}
+
+// NewContainer returns a new Container.
+func NewContainer(
+ env map[string]string,
+ stdin io.Reader,
+ stdout io.Writer,
+ stderr io.Writer,
+ args ...string,
+) Container {
+ return newContainer(
+ NewEnvContainer(env),
+ NewStdinContainer(stdin),
+ NewStdoutContainer(stdout),
+ NewStderrContainer(stderr),
+ NewArgContainer(args...),
+ )
+}
+
+// NewContainerForOS returns a new Container for the operating system.
+func NewContainerForOS() (Container, error) {
+ envContainer, err := NewEnvContainerForOS()
+ if err != nil {
+ return nil, err
+ }
+ return newContainer(
+ envContainer,
+ NewStdinContainerForOS(),
+ NewStdoutContainerForOS(),
+ NewStderrContainerForOS(),
+ NewArgContainerForOS(),
+ ), nil
+}
+
+// NewContainerForArgs returns a new Container with the replacement args.
+func NewContainerForArgs(container Container, newArgs ...string) Container {
+ return newContainer(
+ container,
+ container,
+ container,
+ container,
+ NewArgContainer(newArgs...),
+ )
+}
+
+// StdioContainer is a stdio container.
+type StdioContainer interface {
+ StdinContainer
+ StdoutContainer
+ StderrContainer
+}
+
+// EnvStdinContainer is an environment and stdin container.
+type EnvStdinContainer interface {
+ EnvContainer
+ StdinContainer
+}
+
+// EnvStdoutContainer is an environment and stdout container.
+type EnvStdoutContainer interface {
+ EnvContainer
+ StdoutContainer
+}
+
+// EnvStderrContainer is an environment and stderr container.
+type EnvStderrContainer interface {
+ EnvContainer
+ StderrContainer
+}
+
+// EnvStdioContainer is an environment and stdio container.
+type EnvStdioContainer interface {
+ EnvContainer
+ StdioContainer
+}
+
+// Environ returns all environment variables in the form "KEY=VALUE".
+//
+// Equivalent to os.Enviorn.
+//
+// Sorted.
+func Environ(envContainer EnvContainer) []string {
+ var environ []string
+ envContainer.ForEachEnv(func(key string, value string) {
+ environ = append(environ, key+"="+value)
+ })
+ sort.Strings(environ)
+ return environ
+}
+
+// EnvironMap returns all environment variables in a map.
+//
+// No key will have an empty value.
+func EnvironMap(envContainer EnvContainer) map[string]string {
+ m := make(map[string]string)
+ envContainer.ForEachEnv(func(key string, value string) {
+ // This should be done anyways per the EnvContainer documentation but just to make sure
+ if value != "" {
+ m[key] = value
+ }
+ })
+ return m
+}
+
+// Args returns all arguments.
+//
+// Equivalent to os.Args.
+func Args(argList ArgContainer) []string {
+ numArgs := argList.NumArgs()
+ args := make([]string, numArgs)
+ for i := 0; i < numArgs; i++ {
+ args[i] = argList.Arg(i)
+ }
+ return args
+}
+
+// IsDevStdin returns true if the path is the equivalent of /dev/stdin.
+func IsDevStdin(path string) bool {
+ return path != "" && path == DevStdinFilePath
+}
+
+// IsDevStdout returns true if the path is the equivalent of /dev/stdout.
+func IsDevStdout(path string) bool {
+ return path != "" && path == DevStdoutFilePath
+}
+
+// IsDevStderr returns true if the path is the equivalent of /dev/stderr.
+func IsDevStderr(path string) bool {
+ return path != "" && path == DevStderrFilePath
+}
+
+// IsDevNull returns true if the path is the equivalent of /dev/null.
+func IsDevNull(path string) bool {
+ return path != "" && path == DevNullFilePath
+}
+
+// Main runs the application using the OS Container and calling os.Exit on the return value of Run.
+func Main(ctx context.Context, f func(context.Context, Container) error) {
+ container, err := NewContainerForOS()
+ if err != nil {
+ printError(container, err)
+ os.Exit(GetExitCode(err))
+ }
+ os.Exit(GetExitCode(Run(ctx, container, f)))
+}
+
+// Run runs the application using the container.
+//
+// The run will be stopped on interrupt signal.
+// The exit code can be determined using GetExitCode.
+func Run(ctx context.Context, container Container, f func(context.Context, Container) error) error {
+ ctx, cancel := interrupt.WithCancel(ctx)
+ defer cancel()
+ if err := f(ctx, container); err != nil {
+ printError(container, err)
+ return err
+ }
+ return nil
+}
+
+// NewError returns a new Error that contains an exit code.
+//
+// The exit code cannot be 0.
+func NewError(exitCode int, message string) error {
+ return newAppError(exitCode, message)
+}
+
+// NewErrorf returns a new error that contains an exit code.
+//
+// The exit code cannot be 0.
+func NewErrorf(exitCode int, format string, args ...interface{}) error {
+ return newAppError(exitCode, fmt.Sprintf(format, args...))
+}
+
+// GetExitCode gets the exit code.
+//
+// If err == nil, this returns 0.
+// If err was created by this package, this returns the exit code from the error.
+// Otherwise, this returns 1.
+func GetExitCode(err error) int {
+ if err == nil {
+ return 0
+ }
+ appErr := &appError{}
+ if errors.As(err, &appErr) {
+ return appErr.exitCode
+ }
+ return 1
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/app_error.go b/vendor/github.com/bufbuild/buf/private/pkg/app/app_error.go
new file mode 100644
index 000000000..72f84d2f6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/app_error.go
@@ -0,0 +1,49 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 app
+
+import (
+ "fmt"
+)
+
+type appError struct {
+ exitCode int
+ message string
+}
+
+func newAppError(exitCode int, message string) *appError {
+ if exitCode == 0 {
+ message = fmt.Sprintf(
+ "got invalid exit code %d when constructing error (original message was %q)",
+ exitCode,
+ message,
+ )
+ exitCode = 1
+ }
+ return &appError{
+ exitCode: exitCode,
+ message: message,
+ }
+}
+
+func (e *appError) Error() string {
+ return e.message
+}
+
+func printError(container StderrContainer, err error) {
+ if errString := err.Error(); errString != "" {
+ _, _ = fmt.Fprintln(container.Stderr(), errString)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/app_unix.go b/vendor/github.com/bufbuild/buf/private/pkg/app/app_unix.go
new file mode 100644
index 000000000..5934385f6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/app_unix.go
@@ -0,0 +1,121 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Matching the unix-like build tags in the Golang source i.e. https://github.com/golang/go/blob/912f0750472dd4f674b69ca1616bfaf377af1805/src/os/file_unix.go#L6
+//
+// We expanded this to all unix-like platforms, including those we don't support, as most
+// of this should work without issue, and there are bigger problems with supporting i.e. js,wasm
+// that are outside the scope of these build tags. Being able to build buf on i.e. openbsd
+// was a blocker, see https://github.com/bufbuild/buf/issues/362 and the linked discussions.
+// We still only officially support linux and darwin for buf as a whole.
+
+//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+
+package app
+
+import (
+ "errors"
+ "fmt"
+ "path/filepath"
+)
+
+const (
+ // DevStdinFilePath is the equivalent of /dev/stdin.
+ //
+ // This will be /dev/stdin for darwin and linux.
+ // This does not exist for windows.
+ DevStdinFilePath = "/dev/stdin"
+ // DevStdoutFilePath is the equivalent of /dev/stdout.
+ //
+ // This will be /dev/stdout for darwin and linux.
+ // This does not exist for windows.
+ DevStdoutFilePath = "/dev/stdout"
+ // DevStderrFilePath is the equivalent of /dev/stderr.
+ //
+ // This will be /dev/stderr for darwin and linux.
+ // This does not exist for windows.
+ DevStderrFilePath = "/dev/stderr"
+ // DevNullFilePath is the equivalent of /dev/null.
+ //
+ // This will be /dev/null for darwin and linux.
+ // This will be nul for windows.
+ DevNullFilePath = "/dev/null"
+)
+
+// HomeDirPath returns the home directory path.
+//
+// This will be $HOME for darwin and linux.
+// This will be %USERPROFILE% for windows.
+func HomeDirPath(envContainer EnvContainer) (string, error) {
+ if home := envContainer.Env("HOME"); home != "" {
+ return home, nil
+ }
+ return "", errors.New("$HOME is not set")
+}
+
+// CacheDirPath returns the cache directory path.
+//
+// This will be $XDG_CACHE_HOME for darwin and linux, falling back to $HOME/.cache.
+// This will be %LocalAppData% for windows.
+//
+// See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+// for darwin and linux. Note that we use the same for darwin and linux as this is
+// what developers expect, as opposed to ~/Library/Preferences etc as the stdlib
+// does for Go.
+//
+// Users cannot assume that CacheDirPath, ConfigDirPath, and DataDirPath are unique.
+func CacheDirPath(envContainer EnvContainer) (string, error) {
+ return xdgDirPath(envContainer, "XDG_CACHE_HOME", ".cache")
+}
+
+// ConfigDirPath returns the config directory path.
+//
+// This will be $XDG_CONFIG_HOME for darwin and linux, falling back to $HOME/.config.
+// This will be %AppData% for windows.
+//
+// See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+// for darwin and linux. Note that we use the same for darwin and linux as this is
+// what developers expect, as opposed to ~/Library/Preferences etc as the stdlib
+// does for Go.
+//
+// Users cannot assume that CacheDirPath, ConfigDirPath, and DataDirPath are unique.
+func ConfigDirPath(envContainer EnvContainer) (string, error) {
+ return xdgDirPath(envContainer, "XDG_CONFIG_HOME", ".config")
+}
+
+// DataDirPath returns the data directory path.
+//
+// This will be $XDG_DATA_HOME for darwin and linux, falling back to $HOME/.local/share.
+// This will be %LocalAppData% for windows.
+//
+// See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+// for darwin and linux. Note that we use the same for darwin and linux as this is
+// what developers expect, as opposed to ~/Library/Preferences etc as the stdlib
+// does for Go.
+//
+// Users cannot assume that CacheDirPath, ConfigDirPath, and DataDirPath are unique.
+func DataDirPath(envContainer EnvContainer) (string, error) {
+ return xdgDirPath(envContainer, "XDG_DATA_HOME", filepath.Join(".local", "share"))
+}
+
+func xdgDirPath(envContainer EnvContainer, key string, fallbackRelHomeDirPath string) (string, error) {
+ if value := envContainer.Env(key); value != "" {
+ return value, nil
+ }
+ if home := envContainer.Env("HOME"); home != "" {
+ return filepath.Join(home, fallbackRelHomeDirPath), nil
+ }
+ return "", fmt.Errorf("$%s and $HOME are not set", key)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/app_windows.go b/vendor/github.com/bufbuild/buf/private/pkg/app/app_windows.go
new file mode 100644
index 000000000..b9184d245
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/app_windows.go
@@ -0,0 +1,110 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 app
+
+import (
+ "errors"
+)
+
+const (
+ // DevStdinFilePath is the equivalent of /dev/stdin.
+ //
+ // This will be /dev/stdin for darwin and linux.
+ // This does not exist for windows.
+ DevStdinFilePath = ""
+ // DevStdoutFilePath is the equivalent of /dev/stdout.
+ //
+ // This will be /dev/stdout for darwin and linux.
+ // This does not exist for windows.
+ DevStdoutFilePath = ""
+ // DevStderrFilePath is the equivalent of /dev/stderr.
+ //
+ // This will be /dev/stderr for darwin and linux.
+ // This does not exist for windows.
+ DevStderrFilePath = ""
+ // DevNullFilePath is the equivalent of /dev/null.
+ //
+ // This will be /dev/null for darwin and linux.
+ // This will be nul for windows.
+ DevNullFilePath = "nul"
+)
+
+// HomeDirPath returns the home directory path.
+//
+// This will be $HOME for darwin and linux.
+// This will be %USERPROFILE% for windows.
+func HomeDirPath(envContainer EnvContainer) (string, error) {
+ if value := envContainer.Env("USERPROFILE"); value != "" {
+ return value, nil
+ }
+ return "", errors.New("%USERPROFILE% is not set")
+}
+
+// CacheDirPath returns the cache directory path.
+//
+// This will be $XDG_CACHE_HOME for darwin and linux, falling back to $HOME/.cache.
+// This will be %LocalAppData% for windows.
+//
+// See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+// for darwin and linux. Note that we use the same for darwin and linux as this is
+// what developers expect, as opposed to ~/Library/Preferences etc as the stdlib
+// does for Go.
+//
+// Users cannot assume that CacheDirPath, ConfigDirPath, and DataDirPath are unique.
+func CacheDirPath(envContainer EnvContainer) (string, error) {
+ if value := envContainer.Env("LOCALAPPDATA"); value != "" {
+ return value, nil
+ }
+ return "", errors.New("%LocalAppData% is not set")
+}
+
+// ConfigDirPath returns the config directory path.
+//
+// This will be $XDG_CONFIG_HOME for darwin and linux, falling back to $HOME/.config.
+// This will be %AppData% for windows.
+//
+// See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+// for darwin and linux. Note that we use the same for darwin and linux as this is
+// what developers expect, as opposed to ~/Library/Preferences etc as the stdlib
+// does for Go.
+//
+// Users cannot assume that CacheDirPath, ConfigDirPath, and DataDirPath are unique.
+func ConfigDirPath(envContainer EnvContainer) (string, error) {
+ if value := envContainer.Env("APPDATA"); value != "" {
+ return value, nil
+ }
+ return "", errors.New("%AppData% is not set")
+}
+
+// DataDirPath returns the data directory path.
+//
+// This will be $XDG_DATA_HOME for darwin and linux, falling back to $HOME/.local/share.
+// This will be %LocalAppData% for windows.
+//
+// See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
+// for darwin and linux. Note that we use the same for darwin and linux as this is
+// what developers expect, as opposed to ~/Library/Preferences etc as the stdlib
+// does for Go.
+//
+// Users cannot assume that CacheDirPath, ConfigDirPath, and DataDirPath are unique.
+func DataDirPath(envContainer EnvContainer) (string, error) {
+ if value := envContainer.Env("LOCALAPPDATA"); value != "" {
+ return value, nil
+ }
+ return "", errors.New("%LocalAppData% is not set")
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/appcmd.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/appcmd.go
new file mode 100644
index 000000000..7e36c4828
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/appcmd.go
@@ -0,0 +1,363 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appcmd contains helper functionality for applications using commands.
+package appcmd
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/spf13/cobra"
+ "github.com/spf13/cobra/doc"
+ "github.com/spf13/pflag"
+)
+
+// Command is a command.
+type Command struct {
+ // Use is the one-line usage message.
+ // Required.
+ Use string
+ // Aliases are aliases that can be used instead of the first word in Use.
+ Aliases []string
+ // Short is the short message shown in the 'help' output.
+ // Required if Long is set.
+ Short string
+ // Long is the long message shown in the 'help ' output.
+ // The Short field will be prepended to the Long field with two newlines.
+ // Must be unset if short is unset.
+ Long string
+ // Args are the expected arguments.
+ //
+ // TODO: make specific types for appcmd to limit what can be done.
+ Args cobra.PositionalArgs
+ // Deprecated says to print this deprecation string.
+ Deprecated string
+ // Hidden says to hide this command.
+ Hidden bool
+ // BindFlags allows binding of flags on build.
+ BindFlags func(*pflag.FlagSet)
+ // BindPersistentFlags allows binding of flags on build.
+ BindPersistentFlags func(*pflag.FlagSet)
+ // NormalizeFlag allows for normalization of flag names.
+ NormalizeFlag func(*pflag.FlagSet, string) string
+ // NormalizePersistentFlag allows for normalization of flag names.
+ NormalizePersistentFlag func(*pflag.FlagSet, string) string
+ // Run is the command to run.
+ // Required if there are no sub-commands.
+ // Must be unset if there are sub-commands.
+ Run func(context.Context, app.Container) error
+ // SubCommands are the sub-commands. Optional.
+ // Must be unset if there is a run function.
+ SubCommands []*Command
+ // Version the version of the command.
+ //
+ // If this is specified, a flag --version will be added to the command
+ // that precedes all other functionality, and which prints the version
+ // to stdout.
+ Version string
+}
+
+// NewInvalidArgumentError creates a new invalidArgumentError, indicating that
+// the error was caused by argument validation. This causes us to print the usage
+// help text for the command that it is returned from.
+func NewInvalidArgumentError(message string) error {
+ return newInvalidArgumentError(message)
+}
+
+// NewInvalidArgumentErrorf creates a new InvalidArgumentError, indicating that
+// the error was caused by argument validation. This causes us to print the usage
+// help text for the command that it is returned from.
+func NewInvalidArgumentErrorf(format string, args ...interface{}) error {
+ return NewInvalidArgumentError(fmt.Sprintf(format, args...))
+}
+
+// Main runs the application using the OS container and calling os.Exit on the return value of Run.
+func Main(ctx context.Context, command *Command) {
+ app.Main(ctx, newRunFunc(command))
+}
+
+// Run runs the application using the container.
+func Run(ctx context.Context, container app.Container, command *Command) error {
+ return app.Run(ctx, container, newRunFunc(command))
+}
+
+// BindMultiple is a convenience function for binding multiple flag functions.
+func BindMultiple(bindFuncs ...func(*pflag.FlagSet)) func(*pflag.FlagSet) {
+ return func(flagSet *pflag.FlagSet) {
+ for _, bindFunc := range bindFuncs {
+ bindFunc(flagSet)
+ }
+ }
+}
+
+func newRunFunc(command *Command) func(context.Context, app.Container) error {
+ return func(ctx context.Context, container app.Container) error {
+ return run(ctx, container, command)
+ }
+}
+
+func run(
+ ctx context.Context,
+ container app.Container,
+ command *Command,
+) error {
+ var runErr error
+
+ cobraCommand, err := commandToCobra(ctx, container, command, &runErr)
+ if err != nil {
+ return err
+ }
+
+ // Cobra 1.2.0 introduced default completion commands under
+ // " completion "". Since we have
+ // our own completion commands, disable the generation of the default
+ // commands.
+ cobraCommand.CompletionOptions.DisableDefaultCmd = true
+
+ // If the root command is not the only command, add a hidden manpages command
+ // and a visible completion command.
+ if len(command.SubCommands) > 0 {
+ shellCobraCommand, err := commandToCobra(
+ ctx,
+ container,
+ &Command{
+ Use: "completion",
+ Short: "Generate auto-completion scripts for commonly used shells.",
+ SubCommands: []*Command{
+ {
+ Use: "bash",
+ Short: "Generate auto-completion scripts for bash.",
+ Args: cobra.NoArgs,
+ Run: func(ctx context.Context, container app.Container) error {
+ return cobraCommand.GenBashCompletion(container.Stdout())
+ },
+ },
+ {
+ Use: "fish",
+ Short: "Generate auto-completion scripts for fish.",
+ Args: cobra.NoArgs,
+ Run: func(ctx context.Context, container app.Container) error {
+ return cobraCommand.GenFishCompletion(container.Stdout(), true)
+ },
+ },
+ {
+ Use: "powershell",
+ Short: "Generate auto-completion scripts for powershell.",
+ Args: cobra.NoArgs,
+ Run: func(ctx context.Context, container app.Container) error {
+ return cobraCommand.GenPowerShellCompletion(container.Stdout())
+ },
+ },
+ {
+ Use: "zsh",
+ Short: "Generate auto-completion scripts for zsh.",
+ Args: cobra.NoArgs,
+ Run: func(ctx context.Context, container app.Container) error {
+ return cobraCommand.GenZshCompletion(container.Stdout())
+ },
+ },
+ },
+ },
+ &runErr,
+ )
+ if err != nil {
+ return err
+ }
+ cobraCommand.AddCommand(shellCobraCommand)
+ manpagesCobraCommand, err := commandToCobra(
+ ctx,
+ container,
+ &Command{
+ Use: "manpages",
+ Args: cobra.ExactArgs(1),
+ Hidden: true,
+ Run: func(ctx context.Context, container app.Container) error {
+ return doc.GenManTree(
+ cobraCommand,
+ &doc.GenManHeader{
+ Title: "Buf",
+ Section: "1",
+ },
+ container.Arg(0),
+ )
+ },
+ },
+ &runErr,
+ )
+ if err != nil {
+ return err
+ }
+ cobraCommand.AddCommand(manpagesCobraCommand)
+ }
+
+ cobraCommand.SetOut(container.Stderr())
+ args := app.Args(container)[1:]
+ // cobra will implicitly create __complete and __completeNoDesc subcommands
+ // https://github.com/spf13/cobra/blob/4590150168e93f4b017c6e33469e26590ba839df/completions.go#L14-L17
+ // at the very last possible point, to enable them to be overridden. Unfortunately
+ // the creation of the subcommands uses hidden helper methods (unlike the automatic help command support).
+ // See https://github.com/spf13/cobra/blob/4590150168e93f4b017c6e33469e26590ba839df/completions.go#L134.
+ //
+ // Additionally, the automatically generated commands inherit the output of the root command,
+ // which we are ensuring is always stderr.
+ // https://github.com/spf13/cobra/blob/4590150168e93f4b017c6e33469e26590ba839df/completions.go#L175
+ //
+ // bash completion has much more detailed code generation and doesn't rely on the __completion command
+ // in most cases, the zsh and fish completion implementation however exclusively rely on these commands.
+ // Those completion implementations send stderr to /dev/null
+ // https://github.com/spf13/cobra/blob/4590150168e93f4b017c6e33469e26590ba839df/zsh_completions.go#L135
+ // and the automatically generated __complete command sends extra data to /dev/null so we cannot
+ // work around this by minimally changing the code generation commands, we would have to rewrite the
+ // __completion command which is much more complicated.
+ //
+ // Instead of all that, we can peek at the positionals and if the sub command starts with __complete
+ // we sets its output to stdout. This would mean that we cannot add a "real" sub-command that starts with
+ // __complete _and_ has its output set to stderr. This shouldn't ever be a problem.
+ //
+ // SetOut sets the output location for usage, help, and version messages by default.
+ if len(args) > 0 && strings.HasPrefix(args[0], "__complete") {
+ cobraCommand.SetOut(container.Stdout())
+ }
+ cobraCommand.SetArgs(args)
+ // SetErr sets the output location for error messages.
+ cobraCommand.SetErr(container.Stderr())
+ cobraCommand.SetIn(container.Stdin())
+
+ if err := cobraCommand.Execute(); err != nil {
+ return err
+ }
+ return runErr
+}
+
+func commandToCobra(
+ ctx context.Context,
+ container app.Container,
+ command *Command,
+ runErrAddr *error,
+) (*cobra.Command, error) {
+ if err := commandValidate(command); err != nil {
+ return nil, err
+ }
+ cobraCommand := &cobra.Command{
+ Use: command.Use,
+ Aliases: command.Aliases,
+ Args: command.Args,
+ Deprecated: command.Deprecated,
+ Hidden: command.Hidden,
+ Short: strings.TrimSpace(command.Short),
+ }
+ cobraCommand.SetHelpFunc(
+ func(c *cobra.Command, _ []string) {
+ if err := tmpl(container.Stdout(), c.HelpTemplate(), c); err != nil {
+ c.PrintErrln(err)
+ }
+ },
+ )
+ if command.Long != "" {
+ cobraCommand.Long = cobraCommand.Short + "\n\n" + strings.TrimSpace(command.Long)
+ }
+ if command.BindFlags != nil {
+ command.BindFlags(cobraCommand.Flags())
+ }
+ if command.BindPersistentFlags != nil {
+ command.BindPersistentFlags(cobraCommand.PersistentFlags())
+ }
+ if command.NormalizeFlag != nil {
+ cobraCommand.Flags().SetNormalizeFunc(normalizeFunc(command.NormalizeFlag))
+ }
+ if command.NormalizePersistentFlag != nil {
+ cobraCommand.PersistentFlags().SetNormalizeFunc(normalizeFunc(command.NormalizePersistentFlag))
+ }
+ if command.Run != nil {
+ cobraCommand.Run = func(_ *cobra.Command, args []string) {
+ runErr := command.Run(ctx, app.NewContainerForArgs(container, args...))
+ if asErr := (&invalidArgumentError{}); errors.As(runErr, &asErr) {
+ // Print usage for failing command if an args error is returned.
+ // This has to be done at this level since the usage must relate
+ // to the command executed.
+ printUsage(container, cobraCommand.UsageString())
+ }
+ *runErrAddr = runErr
+ }
+ }
+ if len(command.SubCommands) > 0 {
+ // command.Run will not be set per validation
+ cobraCommand.Run = func(cmd *cobra.Command, args []string) {
+ printUsage(container, cobraCommand.UsageString())
+ if len(args) == 0 {
+ *runErrAddr = errors.New("Sub-command required.")
+ } else {
+ *runErrAddr = fmt.Errorf("Unknown sub-command: %s", strings.Join(args, " "))
+ }
+ }
+ for _, subCommand := range command.SubCommands {
+ subCobraCommand, err := commandToCobra(ctx, container, subCommand, runErrAddr)
+ if err != nil {
+ return nil, err
+ }
+ cobraCommand.AddCommand(subCobraCommand)
+ }
+ }
+ if command.Version != "" {
+ doVersion := false
+ oldRun := cobraCommand.Run
+ cobraCommand.Flags().BoolVar(
+ &doVersion,
+ "version",
+ false,
+ "Print the version.",
+ )
+ cobraCommand.Run = func(cmd *cobra.Command, args []string) {
+ if doVersion {
+ _, err := container.Stdout().Write([]byte(command.Version + "\n"))
+ *runErrAddr = err
+ return
+ }
+ oldRun(cmd, args)
+ }
+ }
+ // appcommand prints errors, disable to prevent duplicates.
+ cobraCommand.SilenceErrors = true
+ return cobraCommand, nil
+}
+
+func commandValidate(command *Command) error {
+ if command.Use == "" {
+ return errors.New("must set Command.Use")
+ }
+ if command.Long != "" && command.Short == "" {
+ return errors.New("must set Command.Short if Command.Long is set")
+ }
+ if command.Run != nil && len(command.SubCommands) > 0 {
+ return errors.New("cannot set both Command.Run and Command.SubCommands")
+ }
+ if command.Run == nil && len(command.SubCommands) == 0 {
+ return errors.New("must set one of Command.Run and Command.SubCommands")
+ }
+ return nil
+}
+
+func normalizeFunc(f func(*pflag.FlagSet, string) string) func(*pflag.FlagSet, string) pflag.NormalizedName {
+ return func(flagSet *pflag.FlagSet, name string) pflag.NormalizedName {
+ return pflag.NormalizedName(f(flagSet, name))
+ }
+}
+
+func printUsage(container app.StderrContainer, usage string) {
+ _, _ = container.Stderr().Write([]byte(usage + "\n"))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/cobra.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/cobra.go
new file mode 100644
index 000000000..5499004d4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/cobra.go
@@ -0,0 +1,58 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appcmd
+
+import (
+ "fmt"
+ "io"
+ "strings"
+ "text/template"
+ "unicode"
+
+ "github.com/spf13/cobra"
+)
+
+// The functions in this file are mostly copied from github.com/spf13/cobra.
+// https://github.com/spf13/cobra/blob/master/LICENSE.txt
+
+var templateFuncs = template.FuncMap{
+ "trim": strings.TrimSpace,
+ "trimRightSpace": trimRightSpace,
+ "trimTrailingWhitespaces": trimRightSpace,
+ "rpad": rpad,
+ "gt": cobra.Gt,
+ "eq": cobra.Eq,
+}
+
+func trimRightSpace(s string) string {
+ return strings.TrimRightFunc(s, unicode.IsSpace)
+}
+
+// rpad adds padding to the right of a string.
+func rpad(s string, padding int) string {
+ template := fmt.Sprintf("%%-%ds", padding)
+ return fmt.Sprintf(template, 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)
+ t, err := t.Parse(text)
+ if err != nil {
+ return err
+ }
+ return t.Execute(w, data)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/error.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/error.go
new file mode 100644
index 000000000..432adf1ab
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/error.go
@@ -0,0 +1,29 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appcmd
+
+// invalidArgumentError is used to indicate that an error was
+// caused by argument validation.
+type invalidArgumentError struct {
+ message string
+}
+
+func newInvalidArgumentError(message string) *invalidArgumentError {
+ return &invalidArgumentError{message: message}
+}
+
+func (a *invalidArgumentError) Error() string {
+ return a.message
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/usage.gen.go
new file mode 100644
index 000000000..aa452c01f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appcmd/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package appcmd
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/appflag.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/appflag.go
new file mode 100644
index 000000000..2604a2f90
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/appflag.go
@@ -0,0 +1,66 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appflag contains functionality to work with flags.
+package appflag
+
+import (
+ "context"
+ "time"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/applog"
+ "github.com/bufbuild/buf/private/pkg/app/appname"
+ "github.com/bufbuild/buf/private/pkg/app/appverbose"
+ "github.com/spf13/pflag"
+)
+
+// Container is a container.
+type Container interface {
+ app.Container
+ appname.Container
+ applog.Container
+ appverbose.Container
+}
+
+// Interceptor intercepts and adapts the request or response of run functions.
+type Interceptor func(func(context.Context, Container) error) func(context.Context, Container) error
+
+// Builder builds run functions.
+type Builder interface {
+ BindRoot(flagSet *pflag.FlagSet)
+ NewRunFunc(func(context.Context, Container) error, ...Interceptor) func(context.Context, app.Container) error
+}
+
+// NewBuilder returns a new Builder.
+func NewBuilder(appName string, options ...BuilderOption) Builder {
+ return newBuilder(appName, options...)
+}
+
+// BuilderOption is an option for a new Builder
+type BuilderOption func(*builder)
+
+// BuilderWithTimeout returns a new BuilderOption that adds a timeout flag and the default timeout.
+func BuilderWithTimeout(defaultTimeout time.Duration) BuilderOption {
+ return func(builder *builder) {
+ builder.defaultTimeout = defaultTimeout
+ }
+}
+
+// BuilderWithTracing enables zap tracing for the builder.
+func BuilderWithTracing() BuilderOption {
+ return func(builder *builder) {
+ builder.tracing = true
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/builder.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/builder.go
new file mode 100644
index 000000000..10d3f2957
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/builder.go
@@ -0,0 +1,247 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appflag
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "time"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/applog"
+ "github.com/bufbuild/buf/private/pkg/app/appverbose"
+ "github.com/bufbuild/buf/private/pkg/observability"
+ "github.com/bufbuild/buf/private/pkg/observability/observabilityzap"
+ "github.com/pkg/profile"
+ "github.com/spf13/pflag"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+type builder struct {
+ appName string
+
+ verbose bool
+ debug bool
+ noWarn bool
+ logFormat string
+
+ profile bool
+ profilePath string
+ profileLoops int
+ profileType string
+ profileAllowError bool
+
+ timeout time.Duration
+
+ defaultTimeout time.Duration
+
+ tracing bool
+}
+
+func newBuilder(appName string, options ...BuilderOption) *builder {
+ builder := &builder{
+ appName: appName,
+ }
+ for _, option := range options {
+ option(builder)
+ }
+ return builder
+}
+
+func (b *builder) BindRoot(flagSet *pflag.FlagSet) {
+ flagSet.BoolVarP(&b.verbose, "verbose", "v", false, "Turn on verbose mode.")
+ flagSet.BoolVar(&b.debug, "debug", false, "Turn on debug logging.")
+ flagSet.StringVar(&b.logFormat, "log-format", "color", "The log format [text,color,json].")
+ if b.defaultTimeout > 0 {
+ flagSet.DurationVar(&b.timeout, "timeout", b.defaultTimeout, `The duration until timing out.`)
+ }
+
+ flagSet.BoolVar(&b.profile, "profile", false, "Run profiling.")
+ _ = flagSet.MarkHidden("profile")
+ flagSet.StringVar(&b.profilePath, "profile-path", "", "The profile base directory path.")
+ _ = flagSet.MarkHidden("profile-path")
+ flagSet.IntVar(&b.profileLoops, "profile-loops", 1, "The number of loops to run.")
+ _ = flagSet.MarkHidden("profile-loops")
+ flagSet.StringVar(&b.profileType, "profile-type", "cpu", "The profile type [cpu,mem,block,mutex].")
+ _ = flagSet.MarkHidden("profile-type")
+ flagSet.BoolVar(&b.profileAllowError, "profile-allow-error", false, "Allow errors for profiled commands.")
+ _ = flagSet.MarkHidden("profile-allow-error")
+
+ // We do not officially support this flag, this is for testing, where we need warnings turned off.
+ flagSet.BoolVar(&b.noWarn, "no-warn", false, "Turn off warn logging.")
+ _ = flagSet.MarkHidden("no-warn")
+}
+
+func (b *builder) NewRunFunc(
+ f func(context.Context, Container) error,
+ interceptors ...Interceptor,
+) func(context.Context, app.Container) error {
+ interceptor := chainInterceptors(interceptors...)
+ return func(ctx context.Context, appContainer app.Container) error {
+ if interceptor != nil {
+ return b.run(ctx, appContainer, interceptor(f))
+ }
+ return b.run(ctx, appContainer, f)
+ }
+}
+
+func (b *builder) run(
+ ctx context.Context,
+ appContainer app.Container,
+ f func(context.Context, Container) error,
+) (retErr error) {
+ logLevel, err := getLogLevel(b.debug, b.noWarn)
+ if err != nil {
+ return err
+ }
+ logger, err := applog.NewLogger(appContainer.Stderr(), logLevel, b.logFormat)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, logger.Sync())
+ }()
+ verbosePrinter := appverbose.NewVerbosePrinter(appContainer.Stderr(), b.appName, b.verbose)
+ container, err := newContainer(appContainer, b.appName, logger, verbosePrinter)
+ if err != nil {
+ return err
+ }
+
+ var cancel context.CancelFunc
+ if !b.profile && b.timeout != 0 {
+ ctx, cancel = context.WithTimeout(ctx, b.timeout)
+ defer cancel()
+ }
+
+ if b.tracing {
+ closer := observability.Start(
+ observability.StartWithTraceExportCloser(
+ observabilityzap.NewTraceExportCloser(logger),
+ ),
+ )
+ defer func() {
+ retErr = multierr.Append(retErr, closer.Close())
+ }()
+ var span *trace.Span
+ ctx, span = trace.StartSpan(ctx, "command")
+ defer span.End()
+ }
+ if !b.profile {
+ return f(ctx, container)
+ }
+ return runProfile(
+ logger,
+ b.profilePath,
+ b.profileType,
+ b.profileLoops,
+ b.profileAllowError,
+ func() error {
+ return f(ctx, container)
+ },
+ )
+}
+
+// runProfile profiles the function.
+func runProfile(
+ logger *zap.Logger,
+ profilePath string,
+ profileType string,
+ profileLoops int,
+ profileAllowError bool,
+ f func() error,
+) error {
+ var err error
+ if profilePath == "" {
+ profilePath, err = os.MkdirTemp("", "")
+ if err != nil {
+ return err
+ }
+ }
+ logger.Debug("profile", zap.String("path", profilePath))
+ if profileType == "" {
+ profileType = "cpu"
+ }
+ if profileLoops == 0 {
+ profileLoops = 10
+ }
+ var profileFunc func(*profile.Profile)
+ switch profileType {
+ case "cpu":
+ profileFunc = profile.CPUProfile
+ case "mem":
+ profileFunc = profile.MemProfile
+ case "block":
+ profileFunc = profile.BlockProfile
+ case "mutex":
+ profileFunc = profile.MutexProfile
+ default:
+ return fmt.Errorf("unknown profile type: %q", profileType)
+ }
+ stop := profile.Start(
+ profile.Quiet,
+ profile.ProfilePath(profilePath),
+ profileFunc,
+ )
+ for i := 0; i < profileLoops; i++ {
+ if err := f(); err != nil {
+ if !profileAllowError {
+ return err
+ }
+ }
+ }
+ stop.Stop()
+ return nil
+}
+
+func getLogLevel(debugFlag bool, noWarnFlag bool) (string, error) {
+ if debugFlag && noWarnFlag {
+ return "", fmt.Errorf("cannot set both --debug and --no-warn")
+ }
+ if noWarnFlag {
+ return "error", nil
+ }
+ if debugFlag {
+ return "debug", nil
+ }
+ return "info", nil
+}
+
+// chainInterceptors consolidates the given interceptors into one.
+// The interceptors are applied in the order they are declared.
+func chainInterceptors(interceptors ...Interceptor) Interceptor {
+ filtered := make([]Interceptor, 0, len(interceptors))
+ for _, interceptor := range interceptors {
+ if interceptor != nil {
+ filtered = append(filtered, interceptor)
+ }
+ }
+ switch n := len(filtered); n {
+ case 0:
+ return nil
+ case 1:
+ return filtered[0]
+ default:
+ first := filtered[0]
+ return func(next func(context.Context, Container) error) func(context.Context, Container) error {
+ for i := len(filtered) - 1; i > 0; i-- {
+ next = filtered[i](next)
+ }
+ return first(next)
+ }
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/container.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/container.go
new file mode 100644
index 000000000..58ad361cc
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/container.go
@@ -0,0 +1,77 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appflag
+
+import (
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/applog"
+ "github.com/bufbuild/buf/private/pkg/app/appname"
+ "github.com/bufbuild/buf/private/pkg/app/appverbose"
+ "github.com/bufbuild/buf/private/pkg/verbose"
+ "go.uber.org/zap"
+)
+
+type container struct {
+ app.Container
+ nameContainer appname.Container
+ logContainer applog.Container
+ verboseContainer appverbose.Container
+}
+
+func newContainer(
+ baseContainer app.Container,
+ appName string,
+ logger *zap.Logger,
+ verbosePrinter verbose.Printer,
+) (*container, error) {
+ nameContainer, err := appname.NewContainer(baseContainer, appName)
+ if err != nil {
+ return nil, err
+ }
+ return &container{
+ Container: baseContainer,
+ nameContainer: nameContainer,
+ logContainer: applog.NewContainer(logger),
+ verboseContainer: appverbose.NewContainer(verbosePrinter),
+ }, nil
+}
+
+func (c *container) AppName() string {
+ return c.nameContainer.AppName()
+}
+
+func (c *container) ConfigDirPath() string {
+ return c.nameContainer.ConfigDirPath()
+}
+
+func (c *container) CacheDirPath() string {
+ return c.nameContainer.CacheDirPath()
+}
+
+func (c *container) DataDirPath() string {
+ return c.nameContainer.DataDirPath()
+}
+
+func (c *container) Port() (uint16, error) {
+ return c.nameContainer.Port()
+}
+
+func (c *container) Logger() *zap.Logger {
+ return c.logContainer.Logger()
+}
+
+func (c *container) VerbosePrinter() verbose.Printer {
+ return c.verboseContainer.VerbosePrinter()
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/usage.gen.go
new file mode 100644
index 000000000..7085b5284
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appflag/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package appflag
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/applog/applog.go b/vendor/github.com/bufbuild/buf/private/pkg/app/applog/applog.go
new file mode 100644
index 000000000..d45a37f22
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/applog/applog.go
@@ -0,0 +1,82 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 applog contains utilities to work with logging.
+package applog
+
+import (
+ "fmt"
+ "io"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/zaputil"
+ "go.uber.org/zap"
+ "go.uber.org/zap/zapcore"
+)
+
+// Container is a container.
+type Container interface {
+ Logger() *zap.Logger
+}
+
+// NewContainer returns a new Container.
+func NewContainer(logger *zap.Logger) Container {
+ return newContainer(logger)
+}
+
+// NewLogger returns a new Logger.
+//
+// The level can be [debug,info,warn,error]. The default is info.
+// The format can be [text,color,json]. The default is color.
+func NewLogger(writer io.Writer, levelString string, format string) (*zap.Logger, error) {
+ level, err := getZapLevel(levelString)
+ if err != nil {
+ return nil, err
+ }
+ encoder, err := getZapEncoder(format)
+ if err != nil {
+ return nil, err
+ }
+ return zaputil.NewLogger(writer, level, encoder), nil
+}
+
+func getZapLevel(level string) (zapcore.Level, error) {
+ level = strings.TrimSpace(strings.ToLower(level))
+ switch level {
+ case "debug":
+ return zapcore.DebugLevel, nil
+ case "info", "":
+ return zapcore.InfoLevel, nil
+ case "warn":
+ return zapcore.WarnLevel, nil
+ case "error":
+ return zapcore.ErrorLevel, nil
+ default:
+ return 0, fmt.Errorf("unknown log level [debug,info,warn,error]: %q", level)
+ }
+}
+
+func getZapEncoder(format string) (zapcore.Encoder, error) {
+ format = strings.TrimSpace(strings.ToLower(format))
+ switch format {
+ case "text":
+ return zaputil.NewTextEncoder(), nil
+ case "color", "":
+ return zaputil.NewColortextEncoder(), nil
+ case "json":
+ return zaputil.NewJSONEncoder(), nil
+ default:
+ return nil, fmt.Errorf("unknown log format [text,color,json]: %q", format)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/applog/container.go b/vendor/github.com/bufbuild/buf/private/pkg/app/applog/container.go
new file mode 100644
index 000000000..25b8da307
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/applog/container.go
@@ -0,0 +1,33 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 applog
+
+import (
+ "go.uber.org/zap"
+)
+
+type container struct {
+ logger *zap.Logger
+}
+
+func newContainer(logger *zap.Logger) *container {
+ return &container{
+ logger: logger,
+ }
+}
+
+func (c *container) Logger() *zap.Logger {
+ return c.logger
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/applog/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/app/applog/usage.gen.go
new file mode 100644
index 000000000..5e2b3e7bd
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/applog/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package applog
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appname/appname.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appname/appname.go
new file mode 100644
index 000000000..420bbfc2f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appname/appname.go
@@ -0,0 +1,141 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appname provides containers for named applications.
+//
+// Application name foo-bar translate to environment variable prefix FOO_BAR_.
+package appname
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net"
+ "os"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/encoding"
+)
+
+const (
+ configFileName = "config.yaml"
+ secretRelDirPath = "secrets"
+)
+
+// Container is a container.
+type Container interface {
+ // AppName is the application name.
+ //
+ // The name must be in [a-zA-Z0-9-_].
+ AppName() string
+ // ConfigDirPath is the config directory path for the named application.
+ //
+ // First checks for $APP_NAME_CONFIG_DIR.
+ // If this is not set, uses app.ConfigDirPath()/app-name.
+ // Unnormalized.
+ ConfigDirPath() string
+ // CacheDirPath is the cache directory path for the named application.
+ //
+ // First checks for $APP_NAME_CACHE_DIR.
+ // If this is not set, uses app.CacheDirPath()/app-name.
+ // Unnormalized.
+ CacheDirPath() string
+ // DataDirPath is the data directory path for the named application.
+ //
+ // First checks for $APP_NAME_DATA_DIR.
+ // If this is not set, uses app.DataDirPath()/app-name.
+ // Unnormalized.
+ DataDirPath() string
+ // Port is the port to use for serving.
+ //
+ // First checks for $APP_NAME_PORT.
+ // If this is not set, checks for $PORT.
+ // If this is not set, returns 0, which means no port is known.
+ // Returns error on parse.
+ Port() (uint16, error)
+}
+
+// NewContainer returns a new Container.
+//
+// The name must be in [a-zA-Z0-9-_].
+func NewContainer(envContainer app.EnvContainer, name string) (Container, error) {
+ return newContainer(envContainer, name)
+}
+
+// ReadConfig reads the configuration from the YAML configuration file config.yaml
+// in the configuration directory.
+//
+// If the file does not exist, this is a no-op.
+// The value should be a pointer to unmarshal into.
+func ReadConfig(container Container, value interface{}) error {
+ configFilePath := filepath.Join(container.ConfigDirPath(), configFileName)
+ data, err := os.ReadFile(configFilePath)
+ if !errors.Is(err, os.ErrNotExist) {
+ if err != nil {
+ return fmt.Errorf("could not read %s configuration file at %s: %w", container.AppName(), configFilePath, err)
+ }
+ if err := encoding.UnmarshalYAMLStrict(data, value); err != nil {
+ return fmt.Errorf("invalid %s configuration file: %w", container.AppName(), err)
+ }
+ }
+ return nil
+}
+
+// ReadSecret returns the contents of the file at path
+// filepath.Join(container.ConfigDirPath(), secretRelDirPath, name).
+func ReadSecret(container Container, name string) (string, error) {
+ secretFilePath := filepath.Join(container.ConfigDirPath(), secretRelDirPath, name)
+ data, err := os.ReadFile(secretFilePath)
+ if err != nil {
+ return "", fmt.Errorf("failed to read secret at %s: %w", secretFilePath, err)
+ }
+ return string(data), nil
+}
+
+// WriteConfig writes the configuration to the YAML configuration file config.yaml
+// in the configuration directory.
+//
+// The directory is created if it does not exist.
+// The value should be a pointer to marshal.
+func WriteConfig(container Container, value interface{}) error {
+ data, err := encoding.MarshalYAML(value)
+ if err != nil {
+ return err
+ }
+ if err := os.MkdirAll(container.ConfigDirPath(), 0755); err != nil {
+ return err
+ }
+ configFilePath := filepath.Join(container.ConfigDirPath(), configFileName)
+ fileMode := os.FileMode(0644)
+ // OK to use os.Stat instead of os.Lstat here
+ if fileInfo, err := os.Stat(configFilePath); err == nil {
+ fileMode = fileInfo.Mode()
+ }
+ return os.WriteFile(configFilePath, data, fileMode)
+}
+
+// Listen listens on the container's port, falling back to defaultPort.
+func Listen(ctx context.Context, container Container, defaultPort uint16) (net.Listener, error) {
+ port, err := container.Port()
+ if err != nil {
+ return nil, err
+ }
+ if port == 0 {
+ port = defaultPort
+ }
+ // Must be 0.0.0.0
+ var listenConfig net.ListenConfig
+ return listenConfig.Listen(ctx, "tcp", fmt.Sprintf("0.0.0.0:%d", port))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appname/container.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appname/container.go
new file mode 100644
index 000000000..b8cd13108
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appname/container.go
@@ -0,0 +1,132 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appname
+
+import (
+ "errors"
+ "fmt"
+ "path/filepath"
+ "strconv"
+ "strings"
+ "sync"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+)
+
+type container struct {
+ envContainer app.EnvContainer
+ appName string
+
+ configDirPath string
+ configDirPathOnce sync.Once
+ cacheDirPath string
+ cacheDirPathOnce sync.Once
+ dataDirPath string
+ dataDirPathOnce sync.Once
+ port uint16
+ portErr error
+ portOnce sync.Once
+}
+
+func newContainer(envContainer app.EnvContainer, appName string) (*container, error) {
+ if err := validateAppName(appName); err != nil {
+ return nil, err
+ }
+ return &container{
+ envContainer: envContainer,
+ appName: appName,
+ }, nil
+}
+
+func (c *container) AppName() string {
+ return c.appName
+}
+
+func (c *container) ConfigDirPath() string {
+ c.configDirPathOnce.Do(c.setConfigDirPath)
+ return c.configDirPath
+}
+
+func (c *container) CacheDirPath() string {
+ c.cacheDirPathOnce.Do(c.setCacheDirPath)
+ return c.cacheDirPath
+}
+
+func (c *container) DataDirPath() string {
+ c.dataDirPathOnce.Do(c.setDataDirPath)
+ return c.dataDirPath
+}
+
+func (c *container) Port() (uint16, error) {
+ c.portOnce.Do(c.setPort)
+ return c.port, c.portErr
+}
+
+func (c *container) setConfigDirPath() {
+ c.configDirPath = c.getDirPath("CONFIG_DIR", app.ConfigDirPath)
+}
+
+func (c *container) setCacheDirPath() {
+ c.cacheDirPath = c.getDirPath("CACHE_DIR", app.CacheDirPath)
+}
+
+func (c *container) setDataDirPath() {
+ c.dataDirPath = c.getDirPath("DATA_DIR", app.DataDirPath)
+}
+
+func (c *container) setPort() {
+ c.port, c.portErr = c.getPort()
+}
+
+func (c *container) getDirPath(envSuffix string, getBaseDirPath func(app.EnvContainer) (string, error)) string {
+ dirPath := c.envContainer.Env(getEnvPrefix(c.appName) + envSuffix)
+ if dirPath == "" {
+ baseDirPath, err := getBaseDirPath(c.envContainer)
+ if err == nil {
+ dirPath = filepath.Join(baseDirPath, c.appName)
+ }
+ }
+ return dirPath
+}
+
+func (c *container) getPort() (uint16, error) {
+ portString := c.envContainer.Env(getEnvPrefix(c.appName) + "PORT")
+ if portString == "" {
+ portString = c.envContainer.Env("PORT")
+ if portString == "" {
+ return 0, nil
+ }
+ }
+ port, err := strconv.ParseUint(portString, 10, 16)
+ if err != nil {
+ return 0, fmt.Errorf("could not parse port %q to uint16: %v", portString, err)
+ }
+ return uint16(port), nil
+}
+
+func getEnvPrefix(appName string) string {
+ return strings.ToUpper(strings.ReplaceAll(appName, "-", "_")) + "_"
+}
+func validateAppName(appName string) error {
+ if appName == "" {
+ return errors.New("empty application name")
+ }
+ for _, c := range appName {
+ if !((c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || c == '-' || c == '_') {
+ return fmt.Errorf("invalid application name: %s", appName)
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appname/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appname/usage.gen.go
new file mode 100644
index 000000000..e2f1ae8fb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appname/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package appname
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appproto.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appproto.go
new file mode 100644
index 000000000..b4089ae4d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appproto.go
@@ -0,0 +1,298 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appproto contains helper functionality for protoc plugins.
+//
+// Note this is currently implicitly tested through buf's protoc command.
+// If this were split out into a separate package, testing would need to be
+// moved to this package.
+package appproto
+
+import (
+ "bufio"
+ "bytes"
+ "context"
+ "fmt"
+ "io"
+ "path/filepath"
+ "unicode"
+ "unicode/utf8"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/protodescriptor"
+ "github.com/bufbuild/buf/private/pkg/protoencoding"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+const (
+ // Our generated files in `private/gen/proto` are on average 15KB which isn't
+ // an unreasonable amount of memory to reserve each time we process an insertion
+ // point and will save a significant number of allocations.
+ averageGeneratedFileSize = 15 * 1024
+ // We don't use insertion points internally, but assume they are smaller than
+ // entire generated files.
+ averageInsertionPointSize = 1024
+)
+
+// ResponseBuilder builds CodeGeneratorResponses.
+type ResponseBuilder interface {
+ // Add adds the file to the response.
+ //
+ // Returns error if nil or the name is empty.
+ // Warns to stderr if the name is already added or the name is not normalized.
+ AddFile(*pluginpb.CodeGeneratorResponse_File) error
+ // AddError adds the error message to the response.
+ //
+ // If there is an existing error message, this will be concatenated with a newline.
+ // If message is empty, a message "error" will be added.
+ AddError(message string)
+ // SetFeatureProto3Optional sets the proto3 optional feature.
+ SetFeatureProto3Optional()
+ // toResponse returns the resulting CodeGeneratorResponse. This must
+ // only be called after all writing has been completed.
+ toResponse() *pluginpb.CodeGeneratorResponse
+}
+
+// Handler is a protoc plugin handler.
+type Handler interface {
+ // Handle handles the plugin.
+ //
+ // This function can assume the request is valid.
+ // This should only return error on system error.
+ // Plugin generation errors should be added with AddError.
+ // See https://github.com/protocolbuffers/protobuf/blob/95e6c5b4746dd7474d540ce4fb375e3f79a086f8/src/google/protobuf/compiler/plugin.proto#L100
+ Handle(
+ ctx context.Context,
+ container app.EnvStderrContainer,
+ responseWriter ResponseBuilder,
+ request *pluginpb.CodeGeneratorRequest,
+ ) error
+}
+
+// HandlerFunc is a handler function.
+type HandlerFunc func(
+ context.Context,
+ app.EnvStderrContainer,
+ ResponseBuilder,
+ *pluginpb.CodeGeneratorRequest,
+) error
+
+// Handle implements Handler.
+func (h HandlerFunc) Handle(
+ ctx context.Context,
+ container app.EnvStderrContainer,
+ responseWriter ResponseBuilder,
+ request *pluginpb.CodeGeneratorRequest,
+) error {
+ return h(ctx, container, responseWriter, request)
+}
+
+// Main runs the plugin using app.Main and the Handler.
+func Main(ctx context.Context, handler Handler) {
+ app.Main(ctx, newRunFunc(handler))
+}
+
+// Run runs the plugin using app.Main and the Handler.
+//
+// The exit code can be determined using app.GetExitCode.
+func Run(ctx context.Context, container app.Container, handler Handler) error {
+ return app.Run(ctx, container, newRunFunc(handler))
+}
+
+// Generator executes the Handler using protoc's plugin execution logic.
+//
+// If multiple requests are specified, these are executed in parallel and the
+// result is combined into one response that is written.
+type Generator interface {
+ // Generate generates a CodeGeneratorResponse for the given CodeGeneratorRequests.
+ //
+ // A new ResponseBuilder is constructed for every invocation of Generate and is
+ // used to consolidate all of the CodeGeneratorResponse_Files returned from a single
+ // plugin into a single CodeGeneratorResponse.
+ Generate(
+ ctx context.Context,
+ container app.EnvStderrContainer,
+ requests []*pluginpb.CodeGeneratorRequest,
+ ) (*pluginpb.CodeGeneratorResponse, error)
+}
+
+// NewGenerator returns a new Generator.
+func NewGenerator(
+ logger *zap.Logger,
+ handler Handler,
+) Generator {
+ return newGenerator(logger, handler)
+}
+
+// ResponseWriter handles the response and writes it to the given storage.WriteBucket
+// without executing any plugins and handles insertion points as needed.
+type ResponseWriter interface {
+ // WriteResponse writes to the bucket with the given response. In practice, the
+ // WriteBucket is most often an in-memory bucket.
+ //
+ // CodeGeneratorResponses are consolidated into the bucket, and insertion points
+ // are applied in-place so that they can only access the files created in a single
+ // generation invocation (just like protoc).
+ WriteResponse(
+ ctx context.Context,
+ writeBucket storage.WriteBucket,
+ response *pluginpb.CodeGeneratorResponse,
+ options ...WriteResponseOption,
+ ) error
+}
+
+// NewResponseWriter returns a new ResponseWriter.
+func NewResponseWriter(logger *zap.Logger) ResponseWriter {
+ return newResponseWriter(logger)
+}
+
+// WriteResponseOption is an option for WriteResponse.
+type WriteResponseOption func(*writeResponseOptions)
+
+// WriteResponseWithInsertionPointReadBucket returns a new WriteResponseOption that uses the given
+// ReadBucket to read from for insertion points.
+//
+// If this is not specified, insertion points are not supported.
+func WriteResponseWithInsertionPointReadBucket(
+ insertionPointReadBucket storage.ReadBucket,
+) WriteResponseOption {
+ return func(writeResponseOptions *writeResponseOptions) {
+ writeResponseOptions.insertionPointReadBucket = insertionPointReadBucket
+ }
+}
+
+// PluginResponse encapsulates a CodeGeneratorResponse,
+// along with the name of the plugin that created it.
+type PluginResponse struct {
+ Response *pluginpb.CodeGeneratorResponse
+ PluginName string
+ PluginOut string
+}
+
+// NewPluginResponse retruns a new *PluginResponse.
+func NewPluginResponse(
+ response *pluginpb.CodeGeneratorResponse,
+ pluginName string,
+ pluginOut string,
+) *PluginResponse {
+ return &PluginResponse{
+ Response: response,
+ PluginName: pluginName,
+ PluginOut: pluginOut,
+ }
+}
+
+// ValidatePluginResponses validates that each file is only defined by a single *PluginResponse.
+func ValidatePluginResponses(pluginResponses []*PluginResponse) error {
+ seen := make(map[string]string)
+ for _, pluginResponse := range pluginResponses {
+ for _, file := range pluginResponse.Response.File {
+ if file.GetInsertionPoint() != "" {
+ // We expect insertion points to write
+ // to files that already exist.
+ continue
+ }
+ fileName := filepath.Join(pluginResponse.PluginOut, file.GetName())
+ if pluginName, ok := seen[fileName]; ok {
+ return fmt.Errorf(
+ "file %q was generated multiple times: once by plugin %q and again by plugin %q",
+ fileName,
+ pluginName,
+ pluginResponse.PluginName,
+ )
+ }
+ seen[fileName] = pluginResponse.PluginName
+ }
+ }
+ return nil
+}
+
+// newRunFunc returns a new RunFunc for app.Main and app.Run.
+func newRunFunc(handler Handler) func(context.Context, app.Container) error {
+ return func(ctx context.Context, container app.Container) error {
+ input, err := io.ReadAll(container.Stdin())
+ if err != nil {
+ return err
+ }
+ request := &pluginpb.CodeGeneratorRequest{}
+ // We do not know the FileDescriptorSet before unmarshaling this
+ if err := protoencoding.NewWireUnmarshaler(nil).Unmarshal(input, request); err != nil {
+ return err
+ }
+ if err := protodescriptor.ValidateCodeGeneratorRequest(request); err != nil {
+ return err
+ }
+ responseWriter := newResponseBuilder(container)
+ if err := handler.Handle(ctx, container, responseWriter, request); err != nil {
+ return err
+ }
+ response := responseWriter.toResponse()
+ if err := protodescriptor.ValidateCodeGeneratorResponse(response); err != nil {
+ return err
+ }
+ data, err := protoencoding.NewWireMarshaler().Marshal(response)
+ if err != nil {
+ return err
+ }
+ _, err = container.Stdout().Write(data)
+ return err
+ }
+}
+
+// NewResponseBuilder returns a new ResponseBuilder.
+func NewResponseBuilder(container app.StderrContainer) ResponseBuilder {
+ return newResponseBuilder(container)
+}
+
+// leadingWhitespace iterates through the given string,
+// and returns the leading whitespace substring, if any,
+// respecting utf-8 encoding.
+//
+// leadingWhitespace("\u205F foo ") -> "\u205F "
+func leadingWhitespace(buf []byte) []byte {
+ leadingSize := 0
+ iterBuf := buf
+ for len(iterBuf) > 0 {
+ r, size := utf8.DecodeRune(iterBuf)
+ // protobuf strings must always be valid UTF8
+ // https://developers.google.com/protocol-buffers/docs/proto3#scalar
+ // Additionally, utf8.RuneError is not a space so we'll terminate
+ // and return the leading, valid, UTF8 whitespace sequence.
+ if !unicode.IsSpace(r) {
+ out := make([]byte, leadingSize)
+ copy(out, buf)
+ return out
+ }
+ leadingSize += size
+ iterBuf = iterBuf[size:]
+ }
+ return buf
+}
+
+// scanWithPrefixAndLineEnding iterates over each of the given scanner's lines
+// prepends prefix, and appends the newline sequence.
+func scanWithPrefixAndLineEnding(scanner *bufio.Scanner, prefix []byte, newline []byte) []byte {
+ result := bytes.NewBuffer(nil)
+ result.Grow(averageInsertionPointSize)
+ for scanner.Scan() {
+ // These writes cannot fail, they will panic if they cannot
+ // allocate
+ _, _ = result.Write(prefix)
+ _, _ = result.Write(scanner.Bytes())
+ _, _ = result.Write(newline)
+ }
+ return result.Bytes()
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/appprotoexec.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/appprotoexec.go
new file mode 100644
index 000000000..5e1c7ef43
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/appprotoexec.go
@@ -0,0 +1,185 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appprotoexec provides protoc plugin handling and execution.
+//
+// Note this is currently implicitly tested through buf's protoc command.
+// If this were split out into a separate package, testing would need to be moved to this package.
+package appprotoexec
+
+import (
+ "context"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/appproto"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+const (
+ // Note on versions: while Protobuf is on vX.0 where X >=21, and we
+ // download protoc vX.0, the version reported by protoc --version is 3.X.0.
+ // This is what we want to report here.
+
+ // DefaultMajorVersion is the default major version.
+ defaultMajorVersion = 3
+ // DefaultMinorVersion is the default minor version.
+ defaultMinorVersion = 21
+ // DefaultPatchVersion is the default patch version.
+ defaultPatchVersion = 7
+ // DefaultSuffixVersion is the default suffix version.
+ defaultSuffixVersion = ""
+)
+
+var (
+ // ProtocProxyPluginNames are the names of the plugins that should be proxied through protoc
+ // in the absence of a binary.
+ ProtocProxyPluginNames = map[string]struct{}{
+ "cpp": {},
+ "csharp": {},
+ "java": {},
+ "js": {},
+ "objc": {},
+ "php": {},
+ "python": {},
+ "pyi": {},
+ "ruby": {},
+ "kotlin": {},
+ }
+
+ // DefaultVersion represents the default version to use as compiler version for codegen requests.
+ DefaultVersion = newVersion(
+ defaultMajorVersion,
+ defaultMinorVersion,
+ defaultPatchVersion,
+ defaultSuffixVersion,
+ )
+)
+
+// Generator is used to generate code with plugins found on the local filesystem.
+type Generator interface {
+ // Generate generates a CodeGeneratorResponse for the given pluginName. The
+ // pluginName must be available on the system's PATH or one of the plugins
+ // built-in to protoc. The plugin path can be overridden via the
+ // GenerateWithPluginPath option.
+ Generate(
+ ctx context.Context,
+ container app.EnvStderrContainer,
+ pluginName string,
+ requests []*pluginpb.CodeGeneratorRequest,
+ options ...GenerateOption,
+ ) (*pluginpb.CodeGeneratorResponse, error)
+}
+
+// NewGenerator returns a new Generator.
+func NewGenerator(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+) Generator {
+ return newGenerator(logger, storageosProvider, runner)
+}
+
+// GenerateOption is an option for Generate.
+type GenerateOption func(*generateOptions)
+
+// GenerateWithPluginPath returns a new GenerateOption that uses the given
+// path to the plugin.
+func GenerateWithPluginPath(pluginPath string) GenerateOption {
+ return func(generateOptions *generateOptions) {
+ generateOptions.pluginPath = pluginPath
+ }
+}
+
+// NewHandler returns a new Handler based on the plugin name and optional path.
+//
+// protocPath and pluginPath are optional.
+//
+// - If the plugin path is set, this returns a new binary handler for that path.
+// - If the plugin path is unset, this does exec.LookPath for a binary named protoc-gen-pluginName,
+// and if one is found, a new binary handler is returned for this.
+// - Else, if the name is in ProtocProxyPluginNames, this returns a new protoc proxy handler.
+// - Else, this returns error.
+func NewHandler(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ pluginName string,
+ options ...HandlerOption,
+) (appproto.Handler, error) {
+ handlerOptions := newHandlerOptions()
+ for _, option := range options {
+ option(handlerOptions)
+ }
+ if handlerOptions.pluginPath != "" {
+ pluginPath, err := unsafeLookPath(handlerOptions.pluginPath)
+ if err != nil {
+ return nil, err
+ }
+ return newBinaryHandler(logger, runner, pluginPath), nil
+ }
+ pluginPath, err := unsafeLookPath("protoc-gen-" + pluginName)
+ if err == nil {
+ return newBinaryHandler(logger, runner, pluginPath), nil
+ }
+ // we always look for protoc-gen-X first, but if not, check the builtins
+ if _, ok := ProtocProxyPluginNames[pluginName]; ok {
+ if handlerOptions.protocPath == "" {
+ handlerOptions.protocPath = "protoc"
+ }
+ protocPath, err := unsafeLookPath(handlerOptions.protocPath)
+ if err != nil {
+ return nil, err
+ }
+ return newProtocProxyHandler(logger, storageosProvider, runner, protocPath, pluginName), nil
+ }
+ return nil, fmt.Errorf(
+ "could not find protoc plugin for name %s - please make sure protoc-gen-%s is installed and present on your $PATH",
+ pluginName,
+ pluginName,
+ )
+}
+
+// HandlerOption is an option for a new Handler.
+type HandlerOption func(*handlerOptions)
+
+// HandlerWithProtocPath returns a new HandlerOption that sets the path to the protoc binary.
+//
+// The default is to do exec.LookPath on "protoc".
+func HandlerWithProtocPath(protocPath string) HandlerOption {
+ return func(handlerOptions *handlerOptions) {
+ handlerOptions.protocPath = protocPath
+ }
+}
+
+// HandlerWithPluginPath returns a new HandlerOption that sets the path to the plugin binary.
+//
+// The default is to do exec.LookPath on "protoc-gen-" + pluginName.
+func HandlerWithPluginPath(pluginPath string) HandlerOption {
+ return func(handlerOptions *handlerOptions) {
+ handlerOptions.pluginPath = pluginPath
+ }
+}
+
+type handlerOptions struct {
+ protocPath string
+ pluginPath string
+}
+
+func newHandlerOptions() *handlerOptions {
+ return &handlerOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/appprotoexec_go18.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/appprotoexec_go18.go
new file mode 100644
index 000000000..d2b22b8c6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/appprotoexec_go18.go
@@ -0,0 +1,32 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 !go1.19
+
+package appprotoexec
+
+import (
+ "os/exec"
+)
+
+// unsafeLookPath is a wrapper around exec.LookPath that restores the original
+// pre-Go 1.19 behavior of resolving queries that would use relative PATH
+// entries. We consider it acceptable for the use case of locating plugins.
+//
+// On Go 1.18 and below, this function is just a direct call to exec.LookPath.
+//
+// https://pkg.go.dev/os/exec#hdr-Executables_in_the_current_directory
+func unsafeLookPath(file string) (string, error) {
+ return exec.LookPath(file)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/appprotoexec_go19.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/appprotoexec_go19.go
new file mode 100644
index 000000000..8bff256a9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/appprotoexec_go19.go
@@ -0,0 +1,37 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 go1.19
+
+package appprotoexec
+
+import (
+ "errors"
+ "os/exec"
+)
+
+// unsafeLookPath is a wrapper around exec.LookPath that restores the original
+// pre-Go 1.19 behavior of resolving queries that would use relative PATH
+// entries. We consider it acceptable for the use case of locating plugins.
+//
+// On Go 1.18 and below, this function is just a direct call to exec.LookPath.
+//
+// https://pkg.go.dev/os/exec#hdr-Executables_in_the_current_directory
+func unsafeLookPath(file string) (string, error) {
+ path, err := exec.LookPath(file)
+ if errors.Is(err, exec.ErrDot) {
+ err = nil
+ }
+ return path, err
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/binary_handler.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/binary_handler.go
new file mode 100644
index 000000000..7940c7945
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/binary_handler.go
@@ -0,0 +1,97 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appprotoexec
+
+import (
+ "bytes"
+ "context"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/appproto"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/protoencoding"
+ "go.opencensus.io/trace"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+type binaryHandler struct {
+ logger *zap.Logger
+ runner command.Runner
+ pluginPath string
+}
+
+func newBinaryHandler(
+ logger *zap.Logger,
+ runner command.Runner,
+ pluginPath string,
+) *binaryHandler {
+ return &binaryHandler{
+ logger: logger.Named("appprotoexec"),
+ runner: runner,
+ pluginPath: pluginPath,
+ }
+}
+
+func (h *binaryHandler) Handle(
+ ctx context.Context,
+ container app.EnvStderrContainer,
+ responseWriter appproto.ResponseBuilder,
+ request *pluginpb.CodeGeneratorRequest,
+) error {
+ ctx, span := trace.StartSpan(ctx, "plugin_proxy")
+ span.AddAttributes(trace.StringAttribute("plugin", filepath.Base(h.pluginPath)))
+ defer span.End()
+ requestData, err := protoencoding.NewWireMarshaler().Marshal(request)
+ if err != nil {
+ return err
+ }
+ responseBuffer := bytes.NewBuffer(nil)
+ if err := h.runner.Run(
+ ctx,
+ h.pluginPath,
+ command.RunWithEnv(app.EnvironMap(container)),
+ command.RunWithStdin(bytes.NewReader(requestData)),
+ command.RunWithStdout(responseBuffer),
+ command.RunWithStderr(container.Stderr()),
+ ); err != nil {
+ // TODO: strip binary path as well?
+ return handlePotentialTooManyFilesError(err)
+ }
+ response := &pluginpb.CodeGeneratorResponse{}
+ if err := protoencoding.NewWireUnmarshaler(nil).Unmarshal(responseBuffer.Bytes(), response); err != nil {
+ return err
+ }
+ response, err = normalizeCodeGeneratorResponse(response)
+ if err != nil {
+ return err
+ }
+ if response.GetSupportedFeatures()&uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL) != 0 {
+ responseWriter.SetFeatureProto3Optional()
+ }
+ for _, file := range response.File {
+ if err := responseWriter.AddFile(file); err != nil {
+ return err
+ }
+ }
+ // plugin.proto specifies that only non-empty errors are considered errors.
+ // This is also consistent with protoc's behavior.
+ // Ref: https://github.com/protocolbuffers/protobuf/blob/069f989b483e63005f87ab309de130677718bbec/src/google/protobuf/compiler/plugin.proto#L100-L108.
+ if response.GetError() != "" {
+ responseWriter.AddError(response.GetError())
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/generator.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/generator.go
new file mode 100644
index 000000000..14e8256a3
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/generator.go
@@ -0,0 +1,83 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appprotoexec
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/appproto"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+type generator struct {
+ logger *zap.Logger
+ storageosProvider storageos.Provider
+ runner command.Runner
+}
+
+func newGenerator(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+) *generator {
+ return &generator{
+ logger: logger,
+ storageosProvider: storageosProvider,
+ runner: runner,
+ }
+}
+
+func (g *generator) Generate(
+ ctx context.Context,
+ container app.EnvStderrContainer,
+ pluginName string,
+ requests []*pluginpb.CodeGeneratorRequest,
+ options ...GenerateOption,
+) (_ *pluginpb.CodeGeneratorResponse, retErr error) {
+ generateOptions := newGenerateOptions()
+ for _, option := range options {
+ option(generateOptions)
+ }
+ handler, err := NewHandler(
+ g.logger,
+ g.storageosProvider,
+ g.runner,
+ pluginName,
+ HandlerWithPluginPath(generateOptions.pluginPath),
+ )
+ if err != nil {
+ return nil, err
+ }
+ return appproto.NewGenerator(
+ g.logger,
+ handler,
+ ).Generate(
+ ctx,
+ container,
+ requests,
+ )
+}
+
+type generateOptions struct {
+ pluginPath string
+}
+
+func newGenerateOptions() *generateOptions {
+ return &generateOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/normalize.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/normalize.go
new file mode 100644
index 000000000..cf27c2b9b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/normalize.go
@@ -0,0 +1,78 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appprotoexec
+
+import (
+ "errors"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+func normalizeCodeGeneratorResponse(
+ response *pluginpb.CodeGeneratorResponse,
+) (*pluginpb.CodeGeneratorResponse, error) {
+ // we do validation after this function returns
+ if response == nil || len(response.File) == 0 {
+ return response, nil
+ }
+
+ prevFile := response.File[0]
+ if prevFile.GetName() == "" {
+ return nil, errors.New("first CodeGeneratorResponse.File had no name set")
+ }
+ // if we only have one file, just return so that we don't have to handle
+ // edge cases in our loop
+ if len(response.File) == 1 {
+ return response, nil
+ }
+
+ var curFile *pluginpb.CodeGeneratorResponse_File
+ newFiles := make([]*pluginpb.CodeGeneratorResponse_File, 0, len(response.File))
+ for i := 1; i < len(response.File); i++ {
+ curFile = response.File[i]
+ if curFile.GetName() != "" {
+ // if the name is non-empty, append the previous file to the slice
+ newFiles = append(newFiles, prevFile)
+ prevFile = curFile
+ } else {
+ // if the name is empty, append the content to the previous file
+ // after making sure that there is no insertion point on the current file
+ if curFile.GetInsertionPoint() != "" {
+ return nil, errors.New("empty name on CodeGeneratorResponse.File with non-empty insertion point")
+ }
+ if curFile.Content != nil {
+ if prevFile.Content == nil {
+ prevFile.Content = curFile.Content
+ } else {
+ prevFile.Content = proto.String(
+ prevFile.GetContent() + curFile.GetContent(),
+ )
+ }
+ }
+ }
+ // if we are at the end of the loop, add the current file, as we
+ // will not hit the beginning of the loop again
+ if i == len(response.File)-1 {
+ newFiles = append(newFiles, prevFile)
+ }
+ }
+
+ return &pluginpb.CodeGeneratorResponse{
+ Error: response.Error,
+ SupportedFeatures: response.SupportedFeatures,
+ File: newFiles,
+ }, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/protoc_proxy_handler.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/protoc_proxy_handler.go
new file mode 100644
index 000000000..001186217
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/protoc_proxy_handler.go
@@ -0,0 +1,187 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appprotoexec
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "io"
+ "path/filepath"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/app/appproto"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/ioextended"
+ "github.com/bufbuild/buf/private/pkg/protoencoding"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/bufbuild/buf/private/pkg/tmp"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+type protocProxyHandler struct {
+ logger *zap.Logger
+ storageosProvider storageos.Provider
+ runner command.Runner
+ protocPath string
+ pluginName string
+}
+
+func newProtocProxyHandler(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ protocPath string,
+ pluginName string,
+) *protocProxyHandler {
+ return &protocProxyHandler{
+ logger: logger.Named("appprotoexec"),
+ storageosProvider: storageosProvider,
+ runner: runner,
+ protocPath: protocPath,
+ pluginName: pluginName,
+ }
+}
+
+func (h *protocProxyHandler) Handle(
+ ctx context.Context,
+ container app.EnvStderrContainer,
+ responseWriter appproto.ResponseBuilder,
+ request *pluginpb.CodeGeneratorRequest,
+) (retErr error) {
+ ctx, span := trace.StartSpan(ctx, "protoc_proxy")
+ span.AddAttributes(trace.StringAttribute("plugin", filepath.Base(h.pluginName)))
+ defer span.End()
+ protocVersion, err := h.getProtocVersion(ctx, container)
+ if err != nil {
+ return err
+ }
+ if h.pluginName == "kotlin" && !getKotlinSupported(protocVersion) {
+ return fmt.Errorf("kotlin is not supported for protoc version %s", versionString(protocVersion))
+ }
+ fileDescriptorSet := &descriptorpb.FileDescriptorSet{
+ File: request.ProtoFile,
+ }
+ fileDescriptorSetData, err := protoencoding.NewWireMarshaler().Marshal(fileDescriptorSet)
+ if err != nil {
+ return err
+ }
+ descriptorFilePath := app.DevStdinFilePath
+ var tmpFile tmp.File
+ if descriptorFilePath == "" {
+ // since we have no stdin file (i.e. Windows), we're going to have to use a temporary file
+ tmpFile, err = tmp.NewFileWithData(fileDescriptorSetData)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, tmpFile.Close())
+ }()
+ descriptorFilePath = tmpFile.AbsPath()
+ }
+ tmpDir, err := tmp.NewDir()
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, tmpDir.Close())
+ }()
+ args := []string{
+ fmt.Sprintf("--descriptor_set_in=%s", descriptorFilePath),
+ fmt.Sprintf("--%s_out=%s", h.pluginName, tmpDir.AbsPath()),
+ }
+ if getExperimentalAllowProto3Optional(protocVersion) {
+ args = append(
+ args,
+ "--experimental_allow_proto3_optional",
+ )
+ }
+ if parameter := request.GetParameter(); parameter != "" {
+ args = append(
+ args,
+ fmt.Sprintf("--%s_opt=%s", h.pluginName, parameter),
+ )
+ }
+ args = append(
+ args,
+ request.FileToGenerate...,
+ )
+ stdin := ioextended.DiscardReader
+ if descriptorFilePath != "" && descriptorFilePath == app.DevStdinFilePath {
+ stdin = bytes.NewReader(fileDescriptorSetData)
+ }
+ if err := h.runner.Run(
+ ctx,
+ h.protocPath,
+ command.RunWithArgs(args...),
+ command.RunWithEnv(app.EnvironMap(container)),
+ command.RunWithStdin(stdin),
+ command.RunWithStderr(container.Stderr()),
+ ); err != nil {
+ // TODO: strip binary path as well?
+ // We don't know if this is a system error or plugin error, so we assume system error
+ return handlePotentialTooManyFilesError(err)
+ }
+ if getFeatureProto3Optional(protocVersion) {
+ responseWriter.SetFeatureProto3Optional()
+ }
+ // no need for symlinks here, and don't want to support
+ readWriteBucket, err := h.storageosProvider.NewReadWriteBucket(tmpDir.AbsPath())
+ if err != nil {
+ return err
+ }
+ return storage.WalkReadObjects(
+ ctx,
+ readWriteBucket,
+ "",
+ func(readObject storage.ReadObject) error {
+ data, err := io.ReadAll(readObject)
+ if err != nil {
+ return err
+ }
+ return responseWriter.AddFile(
+ &pluginpb.CodeGeneratorResponse_File{
+ Name: proto.String(readObject.Path()),
+ Content: proto.String(string(data)),
+ },
+ )
+ },
+ )
+}
+
+func (h *protocProxyHandler) getProtocVersion(
+ ctx context.Context,
+ container app.EnvContainer,
+) (*pluginpb.Version, error) {
+ stdoutBuffer := bytes.NewBuffer(nil)
+ if err := h.runner.Run(
+ ctx,
+ h.protocPath,
+ command.RunWithArgs("--version"),
+ command.RunWithEnv(app.EnvironMap(container)),
+ command.RunWithStdout(stdoutBuffer),
+ ); err != nil {
+ // TODO: strip binary path as well?
+ return nil, handlePotentialTooManyFilesError(err)
+ }
+ return parseVersionForCLIVersion(strings.TrimSpace(stdoutBuffer.String()))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/usage.gen.go
new file mode 100644
index 000000000..a8c131196
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package appprotoexec
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/util.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/util.go
new file mode 100644
index 000000000..f58fa74ad
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/util.go
@@ -0,0 +1,46 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appprotoexec
+
+import (
+ "errors"
+ "fmt"
+ "os"
+)
+
+// handlePotentialTooManyFilesError checks if the error is a result of too many files
+// being open, and if so, modifies the output error with a help message.
+//
+// This could potentially go in osextended, but we want to provide a specific help
+// message referencing StrategyAll, so it is simplest to just put this here for now.
+func handlePotentialTooManyFilesError(err error) error {
+ if isTooManyFilesError(err) {
+ return fmt.Errorf("%w: %s", err, tooManyFilesHelpMessage)
+ }
+ return err
+}
+
+func isTooManyFilesError(err error) bool {
+ var syscallError *os.SyscallError
+ if errors.As(err, &syscallError) {
+ // This may not actually be correct on other platforms, however the worst case
+ // is that we just don't provide the additional help message.
+ //
+ // Note that syscallError.Syscall has both equalled "pipe" and "fork/exec" in testing, but
+ // we don't match on this as this could be particularly prone to being platform-specific.
+ return syscallError.Err != nil && syscallError.Err.Error() == "too many open files"
+ }
+ return false
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/util_darwin.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/util_darwin.go
new file mode 100644
index 000000000..a0c4115e2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/util_darwin.go
@@ -0,0 +1,20 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 darwin
+// +build darwin
+
+package appprotoexec
+
+const tooManyFilesHelpMessage = `This is commonly caused by the maximum file limit being too low. On Mac, the default is 256, which is very low. Run "ulimit -n" to check your file limit. If this happened on generation, setting "strategy: all" for each configured plugin in your buf.gen.yaml can mitigate the issue if you are unable to change your file limit.`
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/util_undarwin.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/util_undarwin.go
new file mode 100644
index 000000000..a4fcaa3f9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/util_undarwin.go
@@ -0,0 +1,20 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 !darwin
+// +build !darwin
+
+package appprotoexec
+
+const tooManyFilesHelpMessage = `This is commonly caused by the maximum file limit being too low. Run "ulimit -n" to check your file limit. If this happened on generation, setting "strategy: all" for each configured plugin in your buf.gen.yaml can mitigate the issue if you are unable to change your file limit.`
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/version.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/version.go
new file mode 100644
index 000000000..bc65a5fd8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoexec/version.go
@@ -0,0 +1,135 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appprotoexec
+
+import (
+ "errors"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+func newVersion(major int32, minor int32, patch int32, suffix string) *pluginpb.Version {
+ version := &pluginpb.Version{
+ Major: proto.Int32(major),
+ Minor: proto.Int32(minor),
+ Patch: proto.Int32(patch),
+ }
+ if suffix != "" {
+ version.Suffix = proto.String(suffix)
+ }
+ return version
+}
+
+func parseVersionForCLIVersion(value string) (_ *pluginpb.Version, retErr error) {
+ defer func() {
+ if retErr != nil {
+ retErr = fmt.Errorf("cannot parse protoc version %q: %w", value, retErr)
+ }
+ }()
+
+ // protoc always starts with "libprotoc "
+ value = strings.TrimPrefix(value, "libprotoc ")
+ split := strings.Split(value, ".")
+ if n := len(split); n != 2 && n != 3 {
+ return nil, fmt.Errorf("%d components split by '.'", n)
+ }
+ major, err := strconv.ParseInt(split[0], 10, 32)
+ if err != nil {
+ return nil, err
+ }
+ var suffix string
+ restSplit := strings.SplitN(split[len(split)-1], "-", 2)
+ lastNumber, err := strconv.ParseInt(restSplit[0], 10, 32)
+ if err != nil {
+ return nil, err
+ }
+ switch len(restSplit) {
+ case 1:
+ case 2:
+ suffix = restSplit[1]
+ default:
+ return nil, errors.New("more than two patch components split by '-'")
+ }
+ var minor int64
+ var patch int64
+ switch len(split) {
+ case 2:
+ minor = lastNumber
+ case 3:
+ minor, err = strconv.ParseInt(split[1], 10, 32)
+ if err != nil {
+ return nil, err
+ }
+ patch = lastNumber
+ }
+ return newVersion(int32(major), int32(minor), int32(patch), suffix), nil
+}
+
+func versionString(version *pluginpb.Version) string {
+ var value string
+ if version.GetMajor() <= 3 || version.GetPatch() != 0 {
+ value = fmt.Sprintf("%d.%d.%d", version.GetMajor(), version.GetMinor(), version.GetPatch())
+ } else {
+ value = fmt.Sprintf("%d.%d", version.GetMajor(), version.GetMinor())
+ }
+ if version.Suffix != nil {
+ value = value + "-" + version.GetSuffix()
+ }
+ return value
+}
+
+// Should I set the --experimental_allow_proto3_optional flag?
+func getExperimentalAllowProto3Optional(version *pluginpb.Version) bool {
+ if version.GetSuffix() == "buf" {
+ return false
+ }
+ if version.GetMajor() != 3 {
+ return false
+ }
+ return version.GetMinor() > 11 && version.GetMinor() < 15
+}
+
+// Should I notify that I am OK with the proto3 optional feature?
+func getFeatureProto3Optional(version *pluginpb.Version) bool {
+ if version.GetSuffix() == "buf" {
+ return true
+ }
+ if version.GetMajor() < 3 {
+ return false
+ }
+ if version.GetMajor() == 3 {
+ return version.GetMinor() > 11
+ }
+ // version.GetMajor() > 3
+ return true
+}
+
+func getKotlinSupported(version *pluginpb.Version) bool {
+ if version.GetSuffix() == "buf" {
+ return true
+ }
+ if version.GetMajor() < 3 {
+ return false
+ }
+ if version.GetMajor() == 3 {
+ return version.GetMinor() > 16
+ }
+ // version.GetMajor() > 3
+ return true
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos/appprotoos.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos/appprotoos.go
new file mode 100644
index 000000000..3d55ae990
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos/appprotoos.go
@@ -0,0 +1,68 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appprotoos does OS-specific generation.
+package appprotoos
+
+import (
+ "context"
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+// ResponseWriter writes CodeGeneratorResponses to the OS filesystem.
+type ResponseWriter interface {
+ // Close writes all of the responses to disk. No further calls can be
+ // made to the ResponseWriter after this call.
+ io.Closer
+
+ // AddResponse adds the response to the writer, switching on the file extension.
+ // If there is a .jar extension, this generates a jar. If there is a .zip
+ // extension, this generates a zip. If there is no extension, this outputs
+ // to the directory.
+ //
+ // pluginOut will be unnormalized within this function.
+ AddResponse(
+ ctx context.Context,
+ response *pluginpb.CodeGeneratorResponse,
+ pluginOut string,
+ ) error
+}
+
+// NewResponseWriter returns a new ResponseWriter.
+func NewResponseWriter(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ options ...ResponseWriterOption,
+) ResponseWriter {
+ return newResponseWriter(
+ logger,
+ storageosProvider,
+ options...,
+ )
+}
+
+// ResponseWriterOption is an option for the ResponseWriter.
+type ResponseWriterOption func(*responseWriterOptions)
+
+// ResponseWriterWithCreateOutDirIfNotExists returns a new ResponseWriterOption that creates
+// the directory if it does not exist.
+func ResponseWriterWithCreateOutDirIfNotExists() ResponseWriterOption {
+ return func(responseWriterOptions *responseWriterOptions) {
+ responseWriterOptions.createOutDirIfNotExists = true
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos/response_writer.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos/response_writer.go
new file mode 100644
index 000000000..1e3546352
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos/response_writer.go
@@ -0,0 +1,301 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appprotoos
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "path/filepath"
+ "sync"
+
+ "github.com/bufbuild/buf/private/pkg/app/appproto"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagearchive"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+// Constants used to create .jar files.
+var (
+ manifestPath = normalpath.Join("META-INF", "MANIFEST.MF")
+ manifestContent = []byte(`Manifest-Version: 1.0
+Created-By: 1.6.0 (protoc)
+
+`)
+)
+
+type responseWriter struct {
+ logger *zap.Logger
+ storageosProvider storageos.Provider
+ responseWriter appproto.ResponseWriter
+ // If set, create directories if they don't already exist.
+ createOutDirIfNotExists bool
+ // Cache the readWriteBuckets by their respective output paths.
+ // These builders are transformed to storage.ReadBuckets and written
+ // to disk once the responseWriter is flushed.
+ //
+ // Note that output paths are used as-is with respect to the
+ // caller's configuration. It's possible that a single invocation
+ // will specify the same filepath in multiple ways, e.g. "." and
+ // "$(pwd)". However, we intentionally treat these as distinct paths
+ // to mirror protoc's insertion point behavior.
+ //
+ // For example, the following command will fail because protoc treats
+ // "." and "$(pwd)" as distinct paths:
+ //
+ // $ protoc example.proto --insertion-point-receiver_out=. --insertion-point-writer_out=$(pwd)
+ //
+ readWriteBuckets map[string]storage.ReadWriteBucket
+ // Cache the functions used to flush all of the responses to disk.
+ // This holds all of the buckets in-memory so that we only write
+ // the results to disk if all of the responses are successful.
+ closers []func() error
+ lock sync.RWMutex
+}
+
+func newResponseWriter(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ options ...ResponseWriterOption,
+) *responseWriter {
+ responseWriterOptions := newResponseWriterOptions()
+ for _, option := range options {
+ option(responseWriterOptions)
+ }
+ return &responseWriter{
+ logger: logger,
+ storageosProvider: storageosProvider,
+ responseWriter: appproto.NewResponseWriter(logger),
+ createOutDirIfNotExists: responseWriterOptions.createOutDirIfNotExists,
+ readWriteBuckets: make(map[string]storage.ReadWriteBucket),
+ }
+}
+
+func (w *responseWriter) AddResponse(
+ ctx context.Context,
+ response *pluginpb.CodeGeneratorResponse,
+ pluginOut string,
+) error {
+ // It's important that we get a consistent output path
+ // so that we use the same in-memory bucket for paths
+ // set to the same directory.
+ //
+ // filepath.Abs calls filepath.Clean.
+ //
+ // For example:
+ //
+ // --insertion-point-receiver_out=insertion --insertion-point-writer_out=./insertion/ --insertion-point_writer_out=/foo/insertion
+ absPluginOut, err := filepath.Abs(normalpath.Unnormalize(pluginOut))
+ if err != nil {
+ return err
+ }
+ w.lock.Lock()
+ defer w.lock.Unlock()
+ return w.addResponse(
+ ctx,
+ response,
+ absPluginOut,
+ w.createOutDirIfNotExists,
+ )
+}
+
+func (w *responseWriter) Close() error {
+ w.lock.Lock()
+ defer w.lock.Unlock()
+ for _, closeFunc := range w.closers {
+ if err := closeFunc(); err != nil {
+ // Although unlikely, if an error happens here,
+ // some generated files could be written to disk,
+ // whereas others aren't.
+ //
+ // Regardless, we stop at the first error so that
+ // we don't unncessarily write more results.
+ return err
+ }
+ }
+ // Re-initialize the cached values to be safe.
+ w.readWriteBuckets = make(map[string]storage.ReadWriteBucket)
+ w.closers = nil
+ return nil
+}
+
+func (w *responseWriter) addResponse(
+ ctx context.Context,
+ response *pluginpb.CodeGeneratorResponse,
+ pluginOut string,
+ createOutDirIfNotExists bool,
+) error {
+ switch filepath.Ext(pluginOut) {
+ case ".jar":
+ return w.writeZip(
+ ctx,
+ response,
+ pluginOut,
+ true,
+ createOutDirIfNotExists,
+ )
+ case ".zip":
+ return w.writeZip(
+ ctx,
+ response,
+ pluginOut,
+ false,
+ createOutDirIfNotExists,
+ )
+ default:
+ return w.writeDirectory(
+ ctx,
+ response,
+ pluginOut,
+ createOutDirIfNotExists,
+ )
+ }
+}
+
+func (w *responseWriter) writeZip(
+ ctx context.Context,
+ response *pluginpb.CodeGeneratorResponse,
+ outFilePath string,
+ includeManifest bool,
+ createOutDirIfNotExists bool,
+) (retErr error) {
+ outDirPath := filepath.Dir(outFilePath)
+ if readWriteBucket, ok := w.readWriteBuckets[outFilePath]; ok {
+ // We already have a readWriteBucket for this outFilePath, so
+ // we can write to the same bucket.
+ if err := w.responseWriter.WriteResponse(
+ ctx,
+ readWriteBucket,
+ response,
+ appproto.WriteResponseWithInsertionPointReadBucket(readWriteBucket),
+ ); err != nil {
+ return err
+ }
+ return nil
+ }
+ // OK to use os.Stat instead of os.Lstat here.
+ fileInfo, err := os.Stat(outDirPath)
+ if err != nil {
+ if os.IsNotExist(err) {
+ if createOutDirIfNotExists {
+ if err := os.MkdirAll(outDirPath, 0755); err != nil {
+ return err
+ }
+ } else {
+ return err
+ }
+ }
+ return err
+ } else if !fileInfo.IsDir() {
+ return fmt.Errorf("not a directory: %s", outDirPath)
+ }
+ readWriteBucket := storagemem.NewReadWriteBucket()
+ if includeManifest {
+ if err := storage.PutPath(ctx, readWriteBucket, manifestPath, manifestContent); err != nil {
+ return err
+ }
+ }
+ if err := w.responseWriter.WriteResponse(
+ ctx,
+ readWriteBucket,
+ response,
+ appproto.WriteResponseWithInsertionPointReadBucket(readWriteBucket),
+ ); err != nil {
+ return err
+ }
+ // Add this readWriteBucket to the set so that other plugins
+ // can write to the same files (re: insertion points).
+ w.readWriteBuckets[outFilePath] = readWriteBucket
+ w.closers = append(w.closers, func() (retErr error) {
+ // We're done writing all of the content into this
+ // readWriteBucket, so we zip it when we flush.
+ file, err := os.Create(outFilePath)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, file.Close())
+ }()
+ // protoc does not compress.
+ return storagearchive.Zip(ctx, readWriteBucket, file, false)
+ })
+ return nil
+}
+
+func (w *responseWriter) writeDirectory(
+ ctx context.Context,
+ response *pluginpb.CodeGeneratorResponse,
+ outDirPath string,
+ createOutDirIfNotExists bool,
+) error {
+ if readWriteBucket, ok := w.readWriteBuckets[outDirPath]; ok {
+ // We already have a readWriteBucket for this outDirPath, so
+ // we can write to the same bucket.
+ if err := w.responseWriter.WriteResponse(
+ ctx,
+ readWriteBucket,
+ response,
+ appproto.WriteResponseWithInsertionPointReadBucket(readWriteBucket),
+ ); err != nil {
+ return err
+ }
+ return nil
+ }
+ readWriteBucket := storagemem.NewReadWriteBucket()
+ if err := w.responseWriter.WriteResponse(
+ ctx,
+ readWriteBucket,
+ response,
+ appproto.WriteResponseWithInsertionPointReadBucket(readWriteBucket),
+ ); err != nil {
+ return err
+ }
+ // Add this readWriteBucket to the set so that other plugins
+ // can write to the same files (re: insertion points).
+ w.readWriteBuckets[outDirPath] = readWriteBucket
+ w.closers = append(w.closers, func() error {
+ if createOutDirIfNotExists {
+ if err := os.MkdirAll(outDirPath, 0755); err != nil {
+ return err
+ }
+ }
+ // This checks that the directory exists.
+ osReadWriteBucket, err := w.storageosProvider.NewReadWriteBucket(
+ outDirPath,
+ storageos.ReadWriteBucketWithSymlinksIfSupported(),
+ )
+ if err != nil {
+ return err
+ }
+ if _, err := storage.Copy(ctx, readWriteBucket, osReadWriteBucket); err != nil {
+ return err
+ }
+ return nil
+ })
+ return nil
+}
+
+type responseWriterOptions struct {
+ createOutDirIfNotExists bool
+}
+
+func newResponseWriterOptions() *responseWriterOptions {
+ return &responseWriterOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos/usage.gen.go
new file mode 100644
index 000000000..9e63ea22d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/appprotoos/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package appprotoos
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/generator.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/generator.go
new file mode 100644
index 000000000..27303b799
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/generator.go
@@ -0,0 +1,72 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appproto
+
+import (
+ "context"
+ "errors"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/protodescriptor"
+ "github.com/bufbuild/buf/private/pkg/thread"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+type generator struct {
+ logger *zap.Logger
+ handler Handler
+}
+
+func newGenerator(
+ logger *zap.Logger,
+ handler Handler,
+) *generator {
+ return &generator{
+ logger: logger,
+ handler: handler,
+ }
+}
+
+func (g *generator) Generate(
+ ctx context.Context,
+ container app.EnvStderrContainer,
+ requests []*pluginpb.CodeGeneratorRequest,
+) (*pluginpb.CodeGeneratorResponse, error) {
+ responseBuilder := newResponseBuilder(container)
+ jobs := make([]func(context.Context) error, len(requests))
+ for i, request := range requests {
+ request := request
+ jobs[i] = func(ctx context.Context) error {
+ if err := protodescriptor.ValidateCodeGeneratorRequest(request); err != nil {
+ return err
+ }
+ return g.handler.Handle(ctx, container, responseBuilder, request)
+ }
+ }
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+ if err := thread.Parallelize(ctx, jobs, thread.ParallelizeWithCancel(cancel)); err != nil {
+ return nil, err
+ }
+ response := responseBuilder.toResponse()
+ if err := protodescriptor.ValidateCodeGeneratorResponse(response); err != nil {
+ return nil, err
+ }
+ if errString := response.GetError(); errString != "" {
+ return nil, errors.New(errString)
+ }
+ return response, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/response_builder.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/response_builder.go
new file mode 100644
index 000000000..b509ad6be
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/response_builder.go
@@ -0,0 +1,159 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appproto
+
+import (
+ "errors"
+ "fmt"
+ "strings"
+ "sync"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+type responseBuilder struct {
+ container app.StderrContainer
+ fileNames map[string]struct{}
+ files []*pluginpb.CodeGeneratorResponse_File
+ errorMessages []string
+ featureProto3Optional bool
+ lock sync.RWMutex
+}
+
+func newResponseBuilder(container app.StderrContainer) *responseBuilder {
+ return &responseBuilder{
+ container: container,
+ fileNames: make(map[string]struct{}),
+ }
+}
+
+func (r *responseBuilder) AddFile(file *pluginpb.CodeGeneratorResponse_File) error {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ if file == nil {
+ return errors.New("add CodeGeneratorResponse.File is nil")
+ }
+ name := file.GetName()
+ if name == "" {
+ return errors.New("add CodeGeneratorResponse.File.Name is empty")
+ }
+ // name must be relative, to-slashed, and not contain "." or ".." per the documentation
+ // this is what normalize does
+ normalizedName, err := normalpath.NormalizeAndValidate(name)
+ if err != nil {
+ // we need names to be normalized for the appproto.Generator to properly put them in buckets
+ // so we have to error here if it is not validated
+ return newUnvalidatedNameError(name)
+ }
+ if normalizedName != name {
+ if err := r.warnUnnormalizedName(name); err != nil {
+ return err
+ }
+ // we need names to be normalized for the appproto.Generator to properly put
+ // them in buckets, so we will coerce this into a normalized name if it is
+ // validated, ie if it does not container ".." and is absolute, we can still
+ // continue, assuming we validate here
+ name = normalizedName
+ file.Name = proto.String(name)
+ }
+ if r.isDuplicate(file) {
+ if err := r.warnDuplicateName(name); err != nil {
+ return err
+ }
+ } else {
+ // we drop the file if it is duplicated, and only put in the map and files slice
+ // if it does not exist
+ r.fileNames[name] = struct{}{}
+ r.files = append(r.files, file)
+ }
+ return nil
+}
+
+func (r *responseBuilder) AddError(message string) {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ if message == "" {
+ // default to an error message to make sure we pass an error
+ // if this function was called
+ message = "error"
+ }
+ r.errorMessages = append(r.errorMessages, message)
+}
+
+func (r *responseBuilder) SetFeatureProto3Optional() {
+ r.lock.Lock()
+ defer r.lock.Unlock()
+ r.featureProto3Optional = true
+}
+
+// toResponse turns the response writer into a Protobuf CodeGeneratorResponse.
+// It should be run after all writing to the response has finished.
+func (r *responseBuilder) toResponse() *pluginpb.CodeGeneratorResponse {
+ r.lock.RLock()
+ defer r.lock.RUnlock()
+ response := &pluginpb.CodeGeneratorResponse{
+ File: r.files,
+ }
+ if len(r.errorMessages) > 0 {
+ response.Error = proto.String(strings.Join(r.errorMessages, "\n"))
+ }
+ if r.featureProto3Optional {
+ response.SupportedFeatures = proto.Uint64(uint64(pluginpb.CodeGeneratorResponse_FEATURE_PROTO3_OPTIONAL))
+ }
+ return response
+}
+
+// isDuplicate determines if the given file is a duplicate file.
+// Insertion points are intentionally ignored because they must
+// always reference duplicate files in order to take effect.
+//
+// Note that we do not acquire the lock here because this helper
+// is only called within the context of r.AddFile.
+func (r *responseBuilder) isDuplicate(file *pluginpb.CodeGeneratorResponse_File) bool {
+ if file.GetInsertionPoint() != "" {
+ return false
+ }
+ _, ok := r.fileNames[file.GetName()]
+ return ok
+}
+
+func (r *responseBuilder) warnUnnormalizedName(name string) error {
+ _, err := r.container.Stderr().Write([]byte(fmt.Sprintf(
+ `Warning: Generated file name %q does not conform to the Protobuf generation specification. Note that the file name must be relative, use "/" instead of "\", and not use "." or ".." as part of the file name. Buf will continue without error here, but please raise an issue with the maintainer of the plugin and reference https://github.com/protocolbuffers/protobuf/blob/95e6c5b4746dd7474d540ce4fb375e3f79a086f8/src/google/protobuf/compiler/plugin.proto#L122
+`,
+ name,
+ )))
+ return err
+}
+
+func (r *responseBuilder) warnDuplicateName(name string) error {
+ _, err := r.container.Stderr().Write([]byte(fmt.Sprintf(
+ `Warning: Duplicate generated file name %q. Buf will continue without error here and drop the second occurrence of this file, but please raise an issue with the maintainer of the plugin.
+`,
+ name,
+ )))
+ return err
+}
+
+func newUnvalidatedNameError(name string) error {
+ return fmt.Errorf(
+ `Generated file name %q does not conform to the Protobuf generation specification. Note that the file name must be relative, and not use "..". Please raise an issue with the maintainer of the plugin and reference https://github.com/protocolbuffers/protobuf/blob/95e6c5b4746dd7474d540ce4fb375e3f79a086f8/src/google/protobuf/compiler/plugin.proto#L122
+`,
+ name,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/response_writer.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/response_writer.go
new file mode 100644
index 000000000..f6c82e841
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/response_writer.go
@@ -0,0 +1,154 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appproto
+
+import (
+ "bufio"
+ "bytes"
+ "context"
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+type responseWriter struct {
+ logger *zap.Logger
+}
+
+func newResponseWriter(
+ logger *zap.Logger,
+) *responseWriter {
+ return &responseWriter{
+ logger: logger,
+ }
+}
+
+func (h *responseWriter) WriteResponse(
+ ctx context.Context,
+ writeBucket storage.WriteBucket,
+ response *pluginpb.CodeGeneratorResponse,
+ options ...WriteResponseOption,
+) error {
+ writeResponseOptions := newWriteResponseOptions()
+ for _, option := range options {
+ option(writeResponseOptions)
+ }
+ for _, file := range response.File {
+ if file.GetInsertionPoint() != "" {
+ if writeResponseOptions.insertionPointReadBucket == nil {
+ return storage.NewErrNotExist(file.GetName())
+ }
+ if err := applyInsertionPoint(ctx, file, writeResponseOptions.insertionPointReadBucket, writeBucket); err != nil {
+ return err
+ }
+ } else if err := storage.PutPath(ctx, writeBucket, file.GetName(), []byte(file.GetContent())); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// applyInsertionPoint inserts the content of the given file at the insertion point that it specfiies.
+// For more details on insertion points, see the following:
+//
+// https://github.com/protocolbuffers/protobuf/blob/f5bdd7cd56aa86612e166706ed8ef139db06edf2/src/google/protobuf/compiler/plugin.proto#L135-L171
+func applyInsertionPoint(
+ ctx context.Context,
+ file *pluginpb.CodeGeneratorResponse_File,
+ readBucket storage.ReadBucket,
+ writeBucket storage.WriteBucket,
+) (retErr error) {
+ targetReadObjectCloser, err := readBucket.Get(ctx, file.GetName())
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, targetReadObjectCloser.Close())
+ }()
+ resultData, err := writeInsertionPoint(ctx, file, targetReadObjectCloser)
+ if err != nil {
+ return err
+ }
+ // This relies on storageos buckets maintaining existing file permissions
+ return storage.PutPath(ctx, writeBucket, file.GetName(), resultData)
+}
+
+// writeInsertionPoint writes the insertion point defined in insertionPointFile
+// to the targetFile and returns the result as []byte. The caller must ensure the
+// provided targetFile matches the file requested in insertionPointFile.Name.
+func writeInsertionPoint(
+ ctx context.Context,
+ insertionPointFile *pluginpb.CodeGeneratorResponse_File,
+ targetFile io.Reader,
+) (_ []byte, retErr error) {
+ targetScanner := bufio.NewScanner(targetFile)
+ match := []byte("@@protoc_insertion_point(" + insertionPointFile.GetInsertionPoint() + ")")
+ postInsertionContent := bytes.NewBuffer(nil)
+ postInsertionContent.Grow(averageGeneratedFileSize)
+ // TODO: We should respect the line endings in the generated file. This would
+ // require either targetFile being an io.ReadSeeker and in the worst case
+ // doing 2 full scans of the file (if it is a single line), or implementing
+ // bufio.Scanner.Scan() inline
+ newline := []byte{'\n'}
+ for targetScanner.Scan() {
+ targetLine := targetScanner.Bytes()
+ if !bytes.Contains(targetLine, match) {
+ // these writes cannot fail, they will panic if they cannot
+ // allocate
+ _, _ = postInsertionContent.Write(targetLine)
+ _, _ = postInsertionContent.Write(newline)
+ continue
+ }
+ // For each line in then new content, apply the
+ // same amount of whitespace. This is important
+ // for specific languages, e.g. Python.
+ whitespace := leadingWhitespace(targetLine)
+
+ // Create another scanner so that we can seamlessly handle
+ // newlines in a platform-agnostic manner.
+ insertedContentScanner := bufio.NewScanner(bytes.NewBufferString(insertionPointFile.GetContent()))
+ insertedContent := scanWithPrefixAndLineEnding(insertedContentScanner, whitespace, newline)
+ // This write cannot fail, it will panic if it cannot
+ // allocate
+ _, _ = postInsertionContent.Write(insertedContent)
+
+ // Code inserted at this point is placed immediately
+ // above the line containing the insertion point, so
+ // we include it last.
+ // These writes cannot fail, they will panic if they cannot
+ // allocate
+ _, _ = postInsertionContent.Write(targetLine)
+ _, _ = postInsertionContent.Write(newline)
+ }
+
+ if err := targetScanner.Err(); err != nil {
+ return nil, err
+ }
+
+ // trim the trailing newline
+ postInsertionBytes := postInsertionContent.Bytes()
+ return postInsertionBytes[:len(postInsertionBytes)-1], nil
+}
+
+type writeResponseOptions struct {
+ insertionPointReadBucket storage.ReadBucket
+}
+
+func newWriteResponseOptions() *writeResponseOptions {
+ return &writeResponseOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/usage.gen.go
new file mode 100644
index 000000000..91773b41f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appproto/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package appproto
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appverbose/appverbose.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appverbose/appverbose.go
new file mode 100644
index 000000000..f93e1b222
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appverbose/appverbose.go
@@ -0,0 +1,39 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appverbose
+
+import (
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/verbose"
+)
+
+// Container is a container.
+type Container interface {
+ VerbosePrinter() verbose.Printer
+}
+
+// NewContainer returns a new Container.
+func NewContainer(verbosePrinter verbose.Printer) Container {
+ return newContainer(verbosePrinter)
+}
+
+// NewVerbosePrinter returns a new verbose.Printer depending on the value of verboseValue.
+func NewVerbosePrinter(writer io.Writer, prefix string, verboseValue bool) verbose.Printer {
+ if verboseValue {
+ return verbose.NewWritePrinter(writer, prefix)
+ }
+ return verbose.NopPrinter
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appverbose/container.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appverbose/container.go
new file mode 100644
index 000000000..6fce442f6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appverbose/container.go
@@ -0,0 +1,31 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appverbose
+
+import "github.com/bufbuild/buf/private/pkg/verbose"
+
+type container struct {
+ verbosePrinter verbose.Printer
+}
+
+func newContainer(verbosePrinter verbose.Printer) *container {
+ return &container{
+ verbosePrinter: verbosePrinter,
+ }
+}
+
+func (c *container) VerbosePrinter() verbose.Printer {
+ return c.verbosePrinter
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/appverbose/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/app/appverbose/usage.gen.go
new file mode 100644
index 000000000..e886a7f53
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/appverbose/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package appverbose
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/arg_container.go b/vendor/github.com/bufbuild/buf/private/pkg/app/arg_container.go
new file mode 100644
index 000000000..f6e46cdd8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/arg_container.go
@@ -0,0 +1,35 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 app
+
+type argContainer struct {
+ values []string
+}
+
+func newArgContainer(s []string) *argContainer {
+ values := make([]string, len(s))
+ copy(values, s)
+ return &argContainer{
+ values: values,
+ }
+}
+
+func (a *argContainer) NumArgs() int {
+ return len(a.values)
+}
+
+func (a *argContainer) Arg(i int) string {
+ return a.values[i]
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/container.go b/vendor/github.com/bufbuild/buf/private/pkg/app/container.go
new file mode 100644
index 000000000..f864f6174
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/container.go
@@ -0,0 +1,39 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 app
+
+type container struct {
+ EnvContainer
+ StdinContainer
+ StdoutContainer
+ StderrContainer
+ ArgContainer
+}
+
+func newContainer(
+ envContainer EnvContainer,
+ stdinContainer StdinContainer,
+ stdoutContainer StdoutContainer,
+ stderrContainer StderrContainer,
+ argContainer ArgContainer,
+) *container {
+ return &container{
+ EnvContainer: envContainer,
+ StdinContainer: stdinContainer,
+ StdoutContainer: stdoutContainer,
+ StderrContainer: stderrContainer,
+ ArgContainer: argContainer,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/env_container.go b/vendor/github.com/bufbuild/buf/private/pkg/app/env_container.go
new file mode 100644
index 000000000..66c69d1a0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/env_container.go
@@ -0,0 +1,74 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 app
+
+import (
+ "errors"
+ "strings"
+)
+
+type envContainer struct {
+ variables map[string]string
+}
+
+func newEnvContainer(m map[string]string) *envContainer {
+ variables := make(map[string]string)
+ for key, value := range m {
+ if value != "" {
+ variables[key] = value
+ }
+ }
+ return &envContainer{
+ variables: variables,
+ }
+}
+
+func newEnvContainerForEnviron(environ []string) (*envContainer, error) {
+ variables := make(map[string]string, len(environ))
+ for _, elem := range environ {
+ if !strings.ContainsRune(elem, '=') {
+ // Do not print out as we don't want to mistakenly leak a secure environment variable
+ return nil, errors.New("environment variable does not contain =")
+ }
+ split := strings.SplitN(elem, "=", 2)
+ if len(split) != 2 {
+ // Do not print out as we don't want to mistakenly leak a secure environment variable
+ return nil, errors.New("unknown environment split")
+ }
+ if split[1] != "" {
+ variables[split[0]] = split[1]
+ }
+ }
+ return &envContainer{
+ variables: variables,
+ }, nil
+}
+
+func (e *envContainer) Env(key string) string {
+ return e.variables[key]
+}
+
+func (e *envContainer) ForEachEnv(f func(string, string)) {
+ for key, value := range e.variables {
+ // This should be done anyways but just to make sure
+ if value != "" {
+ f(key, value)
+ }
+ }
+}
+
+func (e *envContainer) Size() int {
+ return len(e.variables)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/stderr_container.go b/vendor/github.com/bufbuild/buf/private/pkg/app/stderr_container.go
new file mode 100644
index 000000000..10f07f05d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/stderr_container.go
@@ -0,0 +1,38 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 app
+
+import (
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/ioextended"
+)
+
+type stderrContainer struct {
+ writer io.Writer
+}
+
+func newStderrContainer(writer io.Writer) *stderrContainer {
+ if writer == nil {
+ writer = io.Discard
+ }
+ return &stderrContainer{
+ writer: ioextended.LockedWriter(writer),
+ }
+}
+
+func (s *stderrContainer) Stderr() io.Writer {
+ return s.writer
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/stdin_container.go b/vendor/github.com/bufbuild/buf/private/pkg/app/stdin_container.go
new file mode 100644
index 000000000..b6d44a385
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/stdin_container.go
@@ -0,0 +1,38 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 app
+
+import (
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/ioextended"
+)
+
+type stdinContainer struct {
+ reader io.Reader
+}
+
+func newStdinContainer(reader io.Reader) *stdinContainer {
+ if reader == nil {
+ reader = ioextended.DiscardReader
+ }
+ return &stdinContainer{
+ reader: reader,
+ }
+}
+
+func (s *stdinContainer) Stdin() io.Reader {
+ return s.reader
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/stdout_container.go b/vendor/github.com/bufbuild/buf/private/pkg/app/stdout_container.go
new file mode 100644
index 000000000..e88208a44
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/stdout_container.go
@@ -0,0 +1,38 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 app
+
+import (
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/ioextended"
+)
+
+type stdoutContainer struct {
+ writer io.Writer
+}
+
+func newStdoutContainer(writer io.Writer) *stdoutContainer {
+ if writer == nil {
+ writer = io.Discard
+ }
+ return &stdoutContainer{
+ writer: ioextended.LockedWriter(writer),
+ }
+}
+
+func (s *stdoutContainer) Stdout() io.Writer {
+ return s.writer
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/app/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/app/usage.gen.go
new file mode 100644
index 000000000..929849fad
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/app/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package app
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/cert/certclient/certclient.go b/vendor/github.com/bufbuild/buf/private/pkg/cert/certclient/certclient.go
new file mode 100644
index 000000000..1e6c5ae66
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/cert/certclient/certclient.go
@@ -0,0 +1,64 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 certclient
+
+import (
+ "crypto/tls"
+ "fmt"
+ "path/filepath"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/app/appname"
+)
+
+// ExternalClientTLSConfig allows users to configure TLS on the client side.
+type ExternalClientTLSConfig struct {
+ Use string `json:"use,omitempty" yaml:"use,omitempty"`
+ RootCertFilePaths []string `json:"root_cert_file_paths,omitempty" yaml:"root_cert_file_paths,omitempty"`
+}
+
+// IsEmpty returns true if the ExternalClientTLSConfig is empty.
+func (e ExternalClientTLSConfig) IsEmpty() bool {
+ return e.Use == "" && len(e.RootCertFilePaths) == 0
+}
+
+// NewClientTLSConfig creates a new *tls.Config from the ExternalTLSConfig
+//
+// The default is to use the system TLS config.
+func NewClientTLSConfig(
+ container appname.Container,
+ externalClientTLSConfig ExternalClientTLSConfig,
+) (*tls.Config, error) {
+ switch t := strings.ToLower(strings.TrimSpace(externalClientTLSConfig.Use)); t {
+ case "local":
+ rootCertFilePaths := externalClientTLSConfig.RootCertFilePaths
+ if len(rootCertFilePaths) == 0 {
+ rootCertFilePaths = []string{
+ filepath.Join(
+ container.ConfigDirPath(),
+ "tls",
+ "root.pem",
+ ),
+ }
+ }
+ return NewClientTLSConfigFromRootCertFiles(rootCertFilePaths...)
+ case "", "system":
+ return newClientSystemTLSConfig(), nil
+ case "false":
+ return nil, nil
+ default:
+ return nil, fmt.Errorf("unknown tls.use: %q", t)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/cert/certclient/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/cert/certclient/usage.gen.go
new file mode 100644
index 000000000..3db5055ad
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/cert/certclient/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package certclient
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/cert/certclient/util.go b/vendor/github.com/bufbuild/buf/private/pkg/cert/certclient/util.go
new file mode 100644
index 000000000..fd0e02e62
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/cert/certclient/util.go
@@ -0,0 +1,68 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 certclient
+
+import (
+ "crypto/tls"
+ "crypto/x509"
+ "errors"
+ "os"
+)
+
+// NewClientTLSConfigFromRootCertFiles creates a new tls.Config from a root certificate files.
+func NewClientTLSConfigFromRootCertFiles(rootCertFilePaths ...string) (*tls.Config, error) {
+ rootCertDatas := make([][]byte, len(rootCertFilePaths))
+ for i, rootCertFilePath := range rootCertFilePaths {
+ rootCertData, err := os.ReadFile(rootCertFilePath)
+ if err != nil {
+ return nil, err
+ }
+ rootCertDatas[i] = rootCertData
+ }
+ return newClientTLSConfigFromRootCertDatas(rootCertDatas...)
+}
+
+// newClientTLSConfigFromRootCertDatas creates a new tls.Config from root certificate datas.
+func newClientTLSConfigFromRootCertDatas(rootCertDatas ...[]byte) (*tls.Config, error) {
+ certPool := x509.NewCertPool()
+ for _, rootCertData := range rootCertDatas {
+ if !certPool.AppendCertsFromPEM(rootCertData) {
+ return nil, errors.New("failed to append root certificate")
+ }
+ }
+ return newClientTLSConfigFromRootCertPool(certPool), nil
+}
+
+// newClientTLSConfigFromRootCertPool creates a new tls.Config from a root certificate pool.
+func newClientTLSConfigFromRootCertPool(certPool *x509.CertPool) *tls.Config {
+ return &tls.Config{
+ MinVersion: tls.VersionTLS12,
+ RootCAs: certPool,
+ }
+}
+
+// newClientSystemTLSConfig creates a new tls.Config that uses the system cert pool for verifying
+// server certificates.
+func newClientSystemTLSConfig() *tls.Config {
+ return &tls.Config{
+ MinVersion: tls.VersionTLS12,
+ // An empty TLS config will use the system certificate pool
+ // when verifying the servers certificate. This is because
+ // not setting any RootCAs will set `x509.VerifyOptions.Roots`
+ // to nil, which triggers the loading of system certs (including
+ // on Windows somehow) within (*x509.Certificate).Verify.
+ RootCAs: nil,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/command/command.go b/vendor/github.com/bufbuild/buf/private/pkg/command/command.go
new file mode 100644
index 000000000..fa06c4253
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/command/command.go
@@ -0,0 +1,141 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 command
+
+import (
+ "bytes"
+ "context"
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+)
+
+// Runner runs external commands.
+//
+// A Runner will limit the number of concurrent commands, as well as explicitly
+// set stdin, stdout, stderr, and env to nil/empty values if not set with options.
+//
+// All external commands in buf MUST use command.Runner instead of
+// exec.Command, exec.CommandContext.
+type Runner interface {
+ // Run runs the external command.
+ //
+ // This should be used instead of exec.CommandContext(...).Run().
+ Run(ctx context.Context, name string, options ...RunOption) error
+}
+
+// RunOption is an option for Run.
+type RunOption func(*runOptions)
+
+// RunWithArgs returns a new RunOption that sets the arguments other
+// than the name.
+//
+// The default is no arguments.
+func RunWithArgs(args ...string) RunOption {
+ return func(runOptions *runOptions) {
+ runOptions.args = args
+ }
+}
+
+// RunWithEnv returns a new RunOption that sets the environment variables.
+//
+// The default is to use the single environment variable __EMPTY_ENV__=1 as we
+// cannot explicitly set an empty environment with the exec package.
+func RunWithEnv(env map[string]string) RunOption {
+ return func(runOptions *runOptions) {
+ runOptions.env = env
+ }
+}
+
+// RunWithStdin returns a new RunOption that sets the stdin.
+//
+// The default is ioextended.DiscardReader.
+func RunWithStdin(stdin io.Reader) RunOption {
+ return func(runOptions *runOptions) {
+ runOptions.stdin = stdin
+ }
+}
+
+// RunWithStdout returns a new RunOption that sets the stdout.
+//
+// The default is io.Discard.
+func RunWithStdout(stdout io.Writer) RunOption {
+ return func(runOptions *runOptions) {
+ runOptions.stdout = stdout
+ }
+}
+
+// RunWithStderr returns a new RunOption that sets the stderr.
+//
+// The default is io.Discard.
+func RunWithStderr(stderr io.Writer) RunOption {
+ return func(runOptions *runOptions) {
+ runOptions.stderr = stderr
+ }
+}
+
+// RunWithDir returns a new RunOption that sets the working directory.
+//
+// The default is the current working directory.
+func RunWithDir(dir string) RunOption {
+ return func(runOptions *runOptions) {
+ runOptions.dir = dir
+ }
+}
+
+// NewRunner returns a new Runner.
+func NewRunner(options ...RunnerOption) Runner {
+ return newRunner(options...)
+}
+
+// RunnerOption is an option for a new Runner.
+type RunnerOption func(*runner)
+
+// RunnerWithParallelism returns a new Runner that sets the number of
+// external commands that can be run concurrently.
+//
+// The default is thread.Parallelism().
+func RunnerWithParallelism(parallelism int) RunnerOption {
+ if parallelism < 1 {
+ parallelism = 1
+ }
+ return func(runner *runner) {
+ runner.parallelism = parallelism
+ }
+}
+
+// RunStdout is a convenience function that attaches the container environment,
+// stdin, and stderr, and returns the stdout as a byte slice.
+func RunStdout(
+ ctx context.Context,
+ container app.EnvStdioContainer,
+ runner Runner,
+ name string,
+ args ...string,
+) ([]byte, error) {
+ buffer := bytes.NewBuffer(nil)
+ if err := runner.Run(
+ ctx,
+ name,
+ RunWithArgs(args...),
+ RunWithEnv(app.EnvironMap(container)),
+ RunWithStdin(container.Stdin()),
+ RunWithStdout(buffer),
+ RunWithStderr(container.Stderr()),
+ ); err != nil {
+ return nil, err
+ }
+ return buffer.Bytes(), nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/command/runner.go b/vendor/github.com/bufbuild/buf/private/pkg/command/runner.go
new file mode 100644
index 000000000..6a6380713
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/command/runner.go
@@ -0,0 +1,102 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 command
+
+import (
+ "context"
+ "io"
+ "os/exec"
+ "sort"
+
+ "github.com/bufbuild/buf/private/pkg/ioextended"
+ "github.com/bufbuild/buf/private/pkg/thread"
+)
+
+var emptyEnv = map[string]string{
+ "__EMPTY_ENV": "1",
+}
+
+type runner struct {
+ parallelism int
+
+ semaphoreC chan struct{}
+}
+
+func newRunner(options ...RunnerOption) *runner {
+ runner := &runner{
+ parallelism: thread.Parallelism(),
+ }
+ for _, option := range options {
+ option(runner)
+ }
+ runner.semaphoreC = make(chan struct{}, runner.parallelism)
+ return runner
+}
+
+func (r *runner) Run(ctx context.Context, name string, options ...RunOption) error {
+ runOptions := newRunOptions()
+ for _, option := range options {
+ option(runOptions)
+ }
+ if len(runOptions.env) == 0 {
+ runOptions.env = emptyEnv
+ }
+ if runOptions.stdin == nil {
+ runOptions.stdin = ioextended.DiscardReader
+ }
+ if runOptions.stdout == nil {
+ runOptions.stdout = io.Discard
+ }
+ if runOptions.stderr == nil {
+ runOptions.stderr = io.Discard
+ }
+ cmd := exec.CommandContext(ctx, name, runOptions.args...)
+ cmd.Env = envSlice(runOptions.env)
+ cmd.Stdin = runOptions.stdin
+ cmd.Stdout = runOptions.stdout
+ cmd.Stderr = runOptions.stderr
+ // The default behavior for dir is what we want already, i.e. the current
+ // working directory.
+ cmd.Dir = runOptions.dir
+ r.semaphoreC <- struct{}{}
+ err := cmd.Run()
+ <-r.semaphoreC
+ return err
+}
+
+type runOptions struct {
+ args []string
+ env map[string]string
+ stdin io.Reader
+ stdout io.Writer
+ stderr io.Writer
+ dir string
+}
+
+// We set the defaults after calling any RunOptions on a runOptions struct
+// so that users cannot override the empty values, which would lead to the
+// default stdin, stdout, stderr, and environment being used.
+func newRunOptions() *runOptions {
+ return &runOptions{}
+}
+
+func envSlice(env map[string]string) []string {
+ var environ []string
+ for key, value := range env {
+ environ = append(environ, key+"="+value)
+ }
+ sort.Strings(environ)
+ return environ
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/command/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/command/usage.gen.go
new file mode 100644
index 000000000..64a426fcf
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/command/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package command
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/connectclient/connectclient.go b/vendor/github.com/bufbuild/buf/private/pkg/connectclient/connectclient.go
new file mode 100644
index 000000000..8aaaed2d4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/connectclient/connectclient.go
@@ -0,0 +1,80 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 connectclient
+
+import (
+ "github.com/bufbuild/connect-go"
+)
+
+// Config holds configuration for creating Connect RPC clients.
+type Config struct {
+ httpClient connect.HTTPClient
+ addressMapper func(string) string
+ interceptors []connect.Interceptor
+ authInterceptorProvider func(string) connect.UnaryInterceptorFunc
+}
+
+// NewConfig creates a new client configuration with the given HTTP client
+// and options.
+func NewConfig(httpClient connect.HTTPClient, options ...ConfigOption) *Config {
+ cfg := &Config{
+ httpClient: httpClient,
+ }
+ for _, opt := range options {
+ opt(cfg)
+ }
+ return cfg
+}
+
+// ConfigOption is an option for customizing a new Config.
+type ConfigOption func(*Config)
+
+// WithAddressMapper maps the address with the given function.
+func WithAddressMapper(addressMapper func(string) string) ConfigOption {
+ return func(cfg *Config) {
+ cfg.addressMapper = addressMapper
+ }
+}
+
+// WithInterceptors adds the slice of interceptors to all clients returned from this provider.
+func WithInterceptors(interceptors []connect.Interceptor) ConfigOption {
+ return func(cfg *Config) {
+ cfg.interceptors = interceptors
+ }
+}
+
+// WithAuthInterceptorProvider configures a provider that, when invoked, returns an interceptor that can be added
+// to a client for setting the auth token
+func WithAuthInterceptorProvider(authInterceptorProvider func(string) connect.UnaryInterceptorFunc) ConfigOption {
+ return func(cfg *Config) {
+ cfg.authInterceptorProvider = authInterceptorProvider
+ }
+}
+
+// StubFactory is the type of a generated factory function, for creating Connect client stubs.
+type StubFactory[T any] func(connect.HTTPClient, string, ...connect.ClientOption) T
+
+// Make uses the given generated factory function to create a new connect client.
+func Make[T any](cfg *Config, address string, factory StubFactory[T]) T {
+ interceptors := append([]connect.Interceptor{}, cfg.interceptors...)
+ if cfg.authInterceptorProvider != nil {
+ interceptor := cfg.authInterceptorProvider(address)
+ interceptors = append(interceptors, interceptor)
+ }
+ if cfg.addressMapper != nil {
+ address = cfg.addressMapper(address)
+ }
+ return factory(cfg.httpClient, address, connect.WithInterceptors(interceptors...))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/connectclient/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/connectclient/usage.gen.go
new file mode 100644
index 000000000..c7f6b8991
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/connectclient/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package connectclient
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/diff/diff.go b/vendor/github.com/bufbuild/buf/private/pkg/diff/diff.go
new file mode 100644
index 000000000..8a70344d7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/diff/diff.go
@@ -0,0 +1,201 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 diff implements diffing.
+//
+// Should primarily be used for testing.
+package diff
+
+// Largely copied from https://github.com/golang/go/blob/master/src/cmd/gofmt/gofmt.go
+//
+// 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.
+//
+// https://github.com/golang/go/blob/master/LICENSE
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "os"
+ "path/filepath"
+ "runtime"
+
+ "github.com/bufbuild/buf/private/pkg/command"
+)
+
+// Diff does a diff.
+//
+// Returns nil if no diff.
+func Diff(
+ ctx context.Context,
+ runner command.Runner,
+ b1 []byte,
+ b2 []byte,
+ filename1 string,
+ filename2 string,
+ options ...DiffOption,
+) ([]byte, error) {
+ diffOptions := newDiffOptions()
+ for _, option := range options {
+ option(diffOptions)
+ }
+ return doDiff(
+ ctx,
+ runner,
+ b1,
+ b2,
+ filename1,
+ filename2,
+ diffOptions.suppressCommands,
+ diffOptions.suppressTimestamps,
+ )
+}
+
+// DiffOption is an option for Diff.
+type DiffOption func(*diffOptions)
+
+// DiffWithSuppressCommands returns a new DiffOption that suppresses printing of commands.
+func DiffWithSuppressCommands() DiffOption {
+ return func(diffOptions *diffOptions) {
+ diffOptions.suppressCommands = true
+ }
+}
+
+// DiffWithSuppressCommands returns a new DiffOption that suppresses printing of timestamps.
+func DiffWithSuppressTimestamps() DiffOption {
+ return func(diffOptions *diffOptions) {
+ diffOptions.suppressTimestamps = true
+ }
+}
+
+func doDiff(
+ ctx context.Context,
+ runner command.Runner,
+ b1 []byte,
+ b2 []byte,
+ filename1 string,
+ filename2 string,
+ suppressCommands bool,
+ suppressTimestamps bool,
+) ([]byte, error) {
+ if bytes.Equal(b1, b2) {
+ return nil, nil
+ }
+
+ f1, err := writeTempFile("", "", b1)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ _ = os.Remove(f1)
+ }()
+
+ f2, err := writeTempFile("", "", b2)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ _ = os.Remove(f2)
+ }()
+
+ binaryPath := "diff"
+ if runtime.GOOS == "plan9" {
+ binaryPath = "/bin/ape/diff"
+ }
+
+ buffer := bytes.NewBuffer(nil)
+ err = runner.Run(
+ ctx,
+ binaryPath,
+ command.RunWithArgs("-u", f1, f2),
+ command.RunWithStdout(buffer),
+ command.RunWithStderr(buffer),
+ )
+ data := buffer.Bytes()
+ if len(data) > 0 {
+ // diff exits with a non-zero status when the files don't match.
+ // Ignore that failure as long as we get output.
+ return tryModifyHeader(data, filename1, filename2, suppressCommands, suppressTimestamps), nil
+ }
+ return nil, err
+}
+
+func writeTempFile(dir string, prefix string, data []byte) (string, error) {
+ file, err := os.CreateTemp(dir, prefix)
+ if err != nil {
+ return "", err
+ }
+ if len(data) > 0 {
+ _, err = file.Write(data)
+ }
+ if err1 := file.Close(); err == nil {
+ err = err1
+ }
+ if err != nil {
+ _ = os.Remove(file.Name())
+ return "", err
+ }
+ return file.Name(), nil
+}
+
+func tryModifyHeader(
+ diff []byte,
+ filename1 string,
+ filename2 string,
+ suppressCommands bool,
+ suppressTimestamps bool,
+) []byte {
+ bs := bytes.SplitN(diff, []byte{'\n'}, 3)
+ if len(bs) < 3 {
+ return diff
+ }
+ // Preserve timestamps.
+ var t0, t1 []byte
+ if !suppressTimestamps {
+ if i := bytes.LastIndexByte(bs[0], '\t'); i != -1 {
+ t0 = bs[0][i:]
+ }
+ if i := bytes.LastIndexByte(bs[1], '\t'); i != -1 {
+ t1 = bs[1][i:]
+ }
+ }
+ // Always print filepath with slash separator.
+ filename1 = filepath.ToSlash(filename1)
+ filename2 = filepath.ToSlash(filename2)
+ if filename1 == filename2 {
+ filename1 = filename1 + ".orig"
+ }
+ bs[0] = []byte(fmt.Sprintf("--- %s%s", filename1, t0))
+ bs[1] = []byte(fmt.Sprintf("+++ %s%s", filename2, t1))
+ if !suppressCommands {
+ bs = append(
+ [][]byte{
+ []byte(fmt.Sprintf("diff -u %s %s", filename1, filename2)),
+ },
+ bs...,
+ )
+ }
+ return bytes.Join(bs, []byte{'\n'})
+}
+
+type diffOptions struct {
+ suppressCommands bool
+ suppressTimestamps bool
+}
+
+func newDiffOptions() *diffOptions {
+ return &diffOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/diff/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/diff/usage.gen.go
new file mode 100644
index 000000000..3b14f6f27
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/diff/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package diff
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/encoding/encoding.go b/vendor/github.com/bufbuild/buf/private/pkg/encoding/encoding.go
new file mode 100644
index 000000000..49aecc810
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/encoding/encoding.go
@@ -0,0 +1,192 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 encoding provides encoding utilities.
+package encoding
+
+import (
+ "bytes"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "strings"
+
+ "go.uber.org/multierr"
+ "gopkg.in/yaml.v3"
+)
+
+// UnmarshalJSONStrict unmarshals the data as JSON, returning a user error on failure.
+//
+// If the data length is 0, this is a no-op.
+func UnmarshalJSONStrict(data []byte, v interface{}) error {
+ if len(data) == 0 {
+ return nil
+ }
+ jsonDecoder := json.NewDecoder(bytes.NewReader(data))
+ jsonDecoder.DisallowUnknownFields()
+ if err := jsonDecoder.Decode(v); err != nil {
+ return fmt.Errorf("could not unmarshal as JSON: %v", err)
+ }
+ return nil
+}
+
+// UnmarshalYAMLStrict unmarshals the data as YAML, returning a user error on failure.
+//
+// If the data length is 0, this is a no-op.
+func UnmarshalYAMLStrict(data []byte, v interface{}) error {
+ if len(data) == 0 {
+ return nil
+ }
+ yamlDecoder := NewYAMLDecoderStrict(bytes.NewReader(data))
+ if err := yamlDecoder.Decode(v); err != nil {
+ return fmt.Errorf("could not unmarshal as YAML: %v", err)
+ }
+ return nil
+}
+
+// UnmarshalJSONOrYAMLStrict unmarshals the data as JSON or YAML in order, returning
+// a user error with both errors on failure.
+//
+// If the data length is 0, this is a no-op.
+func UnmarshalJSONOrYAMLStrict(data []byte, v interface{}) error {
+ if len(data) == 0 {
+ return nil
+ }
+ if jsonErr := UnmarshalJSONStrict(data, v); jsonErr != nil {
+ if yamlErr := UnmarshalYAMLStrict(data, v); yamlErr != nil {
+ return errors.New(jsonErr.Error() + "\n" + yamlErr.Error())
+ }
+ }
+ return nil
+}
+
+// UnmarshalJSONNonStrict unmarshals the data as JSON, returning a user error on failure.
+//
+// If the data length is 0, this is a no-op.
+func UnmarshalJSONNonStrict(data []byte, v interface{}) error {
+ if len(data) == 0 {
+ return nil
+ }
+ jsonDecoder := json.NewDecoder(bytes.NewReader(data))
+ if err := jsonDecoder.Decode(v); err != nil {
+ return fmt.Errorf("could not unmarshal as JSON: %v", err)
+ }
+ return nil
+}
+
+// UnmarshalYAMLNonStrict unmarshals the data as YAML, returning a user error on failure.
+//
+// If the data length is 0, this is a no-op.
+func UnmarshalYAMLNonStrict(data []byte, v interface{}) error {
+ if len(data) == 0 {
+ return nil
+ }
+ yamlDecoder := NewYAMLDecoderNonStrict(bytes.NewReader(data))
+ if err := yamlDecoder.Decode(v); err != nil {
+ return fmt.Errorf("could not unmarshal as YAML: %v", err)
+ }
+ return nil
+}
+
+// UnmarshalJSONOrYAMLNonStrict unmarshals the data as JSON or YAML in order, returning
+// a user error with both errors on failure.
+//
+// If the data length is 0, this is a no-op.
+func UnmarshalJSONOrYAMLNonStrict(data []byte, v interface{}) error {
+ if len(data) == 0 {
+ return nil
+ }
+ if jsonErr := UnmarshalJSONNonStrict(data, v); jsonErr != nil {
+ if yamlErr := UnmarshalYAMLNonStrict(data, v); yamlErr != nil {
+ return multierr.Append(jsonErr, yamlErr)
+ }
+ }
+ return nil
+}
+
+// GetJSONStringOrStringValue returns the JSON string for the RawMessage if the
+// RawMessage is a string, and the raw value as a string otherwise.
+//
+// If the RawMessage is empty, this returns "".
+func GetJSONStringOrStringValue(rawMessage json.RawMessage) string {
+ if len(rawMessage) == 0 {
+ return ""
+ }
+ var s string
+ if err := json.Unmarshal(rawMessage, &s); err == nil {
+ return s
+ }
+ return string(rawMessage)
+}
+
+// MarshalYAML marshals the given value into YAML.
+func MarshalYAML(v interface{}) (_ []byte, retErr error) {
+ buffer := bytes.NewBuffer(nil)
+ yamlEncoder := NewYAMLEncoder(buffer)
+ defer func() {
+ retErr = multierr.Append(retErr, yamlEncoder.Close())
+ }()
+ if err := yamlEncoder.Encode(v); err != nil {
+ return nil, err
+ }
+ return buffer.Bytes(), nil
+}
+
+// NewYAMLEncoder creates a new YAML encoder reader from the Writer.
+// The encoder must be closed after use.
+func NewYAMLEncoder(writer io.Writer) *yaml.Encoder {
+ yamlEncoder := yaml.NewEncoder(writer)
+ yamlEncoder.SetIndent(2)
+ return yamlEncoder
+}
+
+// NewYAMLDecoderStrict creates a new YAML decoder from the reader.
+func NewYAMLDecoderStrict(reader io.Reader) *yaml.Decoder {
+ yamlDecoder := yaml.NewDecoder(reader)
+ yamlDecoder.KnownFields(true)
+ return yamlDecoder
+}
+
+// NewYAMLDecoderNonStrict creates a new YAML decoder from the reader.
+func NewYAMLDecoderNonStrict(reader io.Reader) *yaml.Decoder {
+ return yaml.NewDecoder(reader)
+}
+
+// InterfaceSliceOrStringToCommaSepString parses the input as a
+// slice or string into a comma separated string. This is commonly
+// used with JSON or YAML fields that need to support both string slices
+// and string literals.
+func InterfaceSliceOrStringToCommaSepString(in interface{}) (string, error) {
+ var opt string
+ switch t := in.(type) {
+ case string:
+ opt = t
+ case []interface{}:
+ opts := make([]string, len(t))
+ for i, elem := range t {
+ s, ok := elem.(string)
+ if !ok {
+ return "", fmt.Errorf("could not convert element %T to a string", elem)
+ }
+ opts[i] = s
+ }
+ opt = strings.Join(opts, ",")
+ case nil:
+ // If the variable is omitted, the value is nil
+ default:
+ return "", fmt.Errorf("unknown type %T for opt", t)
+ }
+ return opt, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/encoding/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/encoding/usage.gen.go
new file mode 100644
index 000000000..7288f7f32
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/encoding/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package encoding
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/filelock/filelock.go b/vendor/github.com/bufbuild/buf/private/pkg/filelock/filelock.go
new file mode 100644
index 000000000..9d2a28a23
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/filelock/filelock.go
@@ -0,0 +1,95 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 filelock
+
+import (
+ "context"
+ "time"
+)
+
+const (
+ // DefaultLockTimeout is the default lock timeout.
+ DefaultLockTimeout = 3 * time.Second
+ // DefaultLockRetryDelay is the default lock retry delay.
+ DefaultLockRetryDelay = 200 * time.Millisecond
+)
+
+// Unlocker unlocks a file lock.
+type Unlocker interface {
+ Unlock() error
+}
+
+// Lock locks a file lock.
+//
+// Use in cases where you need a lock for a specific system file, such as in testing,
+// otherwise use a Locker to manage your file locks.
+func Lock(ctx context.Context, filePath string, options ...LockOption) (Unlocker, error) {
+ return lock(ctx, filePath, options...)
+}
+
+// RLock read-locks a file lock.
+//
+// Use in cases where you need a lock for a specific system file, such as in testing,
+// otherwise use a Locker to manage your file locks.
+func RLock(ctx context.Context, filePath string, options ...LockOption) (Unlocker, error) {
+ return rlock(ctx, filePath, options...)
+}
+
+// Locker provides file locks.
+type Locker interface {
+ // Lock locks a file lock within the root directory of the Locker.
+ //
+ // The given path must be normalized and relative.
+ Lock(ctx context.Context, path string, options ...LockOption) (Unlocker, error)
+ // RLock read-locks a file lock within the root directory of the Locker.
+ //
+ // The given path must be normalized and relative.
+ RLock(ctx context.Context, path string, options ...LockOption) (Unlocker, error)
+}
+
+// NewLocker returns a new Locker for the given root directory path.
+//
+// The root directory path should generally be a data directory path.
+// The root directory must exist.
+func NewLocker(rootDirPath string) (Locker, error) {
+ return newLocker(rootDirPath)
+}
+
+// LockOption is an option for lock.
+type LockOption func(*lockOptions)
+
+// LockWithTimeout returns a new LockOption that sets the lock timeout.
+//
+// Lock returns error if the lock cannot be acquired after this amount of time.
+// If this is set to 0, the lock will never timeout.
+func LockWithTimeout(timeout time.Duration) LockOption {
+ return func(lockOptions *lockOptions) {
+ lockOptions.timeout = timeout
+ }
+}
+
+// LockWithRetryDelay returns a new LockOption that sets the lock retry delay.
+//
+// Lock will try to lock on this delay up until the lock timeout.
+func LockWithRetryDelay(retryDelay time.Duration) LockOption {
+ return func(lockOptions *lockOptions) {
+ lockOptions.retryDelay = retryDelay
+ }
+}
+
+// NewNopLocker returns a new no-op Locker.
+func NewNopLocker() Locker {
+ return newNopLocker()
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/filelock/lock.go b/vendor/github.com/bufbuild/buf/private/pkg/filelock/lock.go
new file mode 100644
index 000000000..819c16324
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/filelock/lock.go
@@ -0,0 +1,93 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 filelock
+
+import (
+ "context"
+ "fmt"
+ "os"
+ "path/filepath"
+ "time"
+
+ "github.com/gofrs/flock"
+)
+
+func lock(
+ ctx context.Context,
+ filePath string,
+ options ...LockOption,
+) (Unlocker, error) {
+ return lockForFunc(
+ ctx,
+ filePath,
+ (*flock.Flock).TryLockContext,
+ options...,
+ )
+}
+
+func rlock(
+ ctx context.Context,
+ filePath string,
+ options ...LockOption,
+) (Unlocker, error) {
+ return lockForFunc(
+ ctx,
+ filePath,
+ (*flock.Flock).TryRLockContext,
+ options...,
+ )
+}
+
+func lockForFunc(
+ ctx context.Context,
+ filePath string,
+ tryLockContextFunc func(*flock.Flock, context.Context, time.Duration) (bool, error),
+ options ...LockOption,
+) (Unlocker, error) {
+ lockOptions := newLockOptions()
+ for _, option := range options {
+ option(lockOptions)
+ }
+ // mkdir is an atomic operation
+ if err := os.MkdirAll(filepath.Dir(filePath), 0755); err != nil {
+ return nil, err
+ }
+ var cancel context.CancelFunc
+ if lockOptions.timeout != 0 {
+ ctx, cancel = context.WithTimeout(ctx, lockOptions.timeout)
+ defer cancel()
+ }
+ flock := flock.New(filePath)
+ locked, err := tryLockContextFunc(flock, ctx, lockOptions.retryDelay)
+ if err != nil {
+ return nil, fmt.Errorf("could not get file lock %q: %w", filePath, err)
+ }
+ if !locked {
+ return nil, fmt.Errorf("could not lock %q", filePath)
+ }
+ return flock, nil
+}
+
+type lockOptions struct {
+ timeout time.Duration
+ retryDelay time.Duration
+}
+
+func newLockOptions() *lockOptions {
+ return &lockOptions{
+ timeout: DefaultLockTimeout,
+ retryDelay: DefaultLockRetryDelay,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/filelock/locker.go b/vendor/github.com/bufbuild/buf/private/pkg/filelock/locker.go
new file mode 100644
index 000000000..4f9d7c653
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/filelock/locker.go
@@ -0,0 +1,76 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 filelock
+
+import (
+ "context"
+ "fmt"
+ "os"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+type locker struct {
+ rootDirPath string
+}
+
+func newLocker(rootDirPath string) (*locker, error) {
+ // allow symlinks
+ fileInfo, err := os.Stat(normalpath.Unnormalize(rootDirPath))
+ if err != nil {
+ return nil, err
+ }
+ if !fileInfo.IsDir() {
+ return nil, fmt.Errorf("%q is not a directory", rootDirPath)
+ }
+ return &locker{
+ // do not validate - allow anything including absolute paths and jumping context
+ rootDirPath: normalpath.Normalize(rootDirPath),
+ }, nil
+}
+
+func (l *locker) Lock(ctx context.Context, path string, options ...LockOption) (Unlocker, error) {
+ if err := validatePath(path); err != nil {
+ return nil, err
+ }
+ return lock(
+ ctx,
+ normalpath.Unnormalize(normalpath.Join(l.rootDirPath, path)),
+ options...,
+ )
+}
+
+func (l *locker) RLock(ctx context.Context, path string, options ...LockOption) (Unlocker, error) {
+ if err := validatePath(path); err != nil {
+ return nil, err
+ }
+ return rlock(
+ ctx,
+ normalpath.Unnormalize(normalpath.Join(l.rootDirPath, path)),
+ options...,
+ )
+}
+
+func validatePath(path string) error {
+ normalPath, err := normalpath.NormalizeAndValidate(path)
+ if err != nil {
+ return err
+ }
+ if path != normalPath {
+ // just extra safety
+ return fmt.Errorf("expected file lock path %q to be equal to normalized path %q", path, normalPath)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/filelock/nop_locker.go b/vendor/github.com/bufbuild/buf/private/pkg/filelock/nop_locker.go
new file mode 100644
index 000000000..477aa4ccb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/filelock/nop_locker.go
@@ -0,0 +1,33 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 filelock
+
+import (
+ "context"
+)
+
+type nopLocker struct{}
+
+func newNopLocker() *nopLocker {
+ return &nopLocker{}
+}
+
+func (l *nopLocker) Lock(ctx context.Context, path string, options ...LockOption) (Unlocker, error) {
+ return newNopUnlocker(), nil
+}
+
+func (l *nopLocker) RLock(ctx context.Context, path string, options ...LockOption) (Unlocker, error) {
+ return newNopUnlocker(), nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/filelock/nop_unlocker.go b/vendor/github.com/bufbuild/buf/private/pkg/filelock/nop_unlocker.go
new file mode 100644
index 000000000..fe8a5f23b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/filelock/nop_unlocker.go
@@ -0,0 +1,25 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 filelock
+
+type nopUnlocker struct{}
+
+func newNopUnlocker() *nopUnlocker {
+ return &nopUnlocker{}
+}
+
+func (l *nopUnlocker) Unlock() error {
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/filelock/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/filelock/usage.gen.go
new file mode 100644
index 000000000..f2e246299
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/filelock/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package filelock
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/filepathextended/filepathextended.go b/vendor/github.com/bufbuild/buf/private/pkg/filepathextended/filepathextended.go
new file mode 100644
index 000000000..99d98e598
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/filepathextended/filepathextended.go
@@ -0,0 +1,220 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 filepathextended provides filepath utilities.
+package filepathextended
+
+// Walking largely copied from https://github.com/golang/go/blob/master/src/path/filepath/path.go
+//
+// 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.
+//
+// https://github.com/golang/go/blob/master/LICENSE
+
+import (
+ "os"
+ "path/filepath"
+ "sort"
+
+ "github.com/bufbuild/buf/private/pkg/osextended"
+ "go.uber.org/multierr"
+)
+
+// RealClean does filepath.Clean and filepath.FromSlash,
+// but also handles ..'s in relative paths relative to the
+// current working directory.
+//
+// As an example, if we are in proto, and we pass in
+// ../proto/foo, RealClean will return foo.
+func RealClean(path string) (string, error) {
+ path = filepath.Clean(filepath.FromSlash(path))
+ if !filepath.IsAbs(path) {
+ absPath, err := filepath.Abs(path)
+ if err != nil {
+ return "", err
+ }
+ pwd, err := osextended.Getwd()
+ if err != nil {
+ return "", err
+ }
+ if relPath, err := filepath.Rel(pwd, absPath); err == nil {
+ return relPath, nil
+ }
+ }
+ return path, nil
+}
+
+// Walk walks the walkPath.
+//
+// This is analogous to filepath.Walk, but optionally follows symlinks.
+func Walk(walkPath string, walkFunc filepath.WalkFunc, options ...WalkOption) (retErr error) {
+ defer func() {
+ // If we end up with a SkipDir, this isn't an error.
+ if retErr == filepath.SkipDir {
+ retErr = nil
+ }
+ }()
+ walkOptions := newWalkOptions()
+ for _, option := range options {
+ option(walkOptions)
+ }
+ // os.Lstat does not follow symlinks, while os.Stat does.
+ fileInfo, err := os.Lstat(walkPath)
+ if err != nil {
+ // If we have an error, then we still walk to call walkFunc with the error.
+ return walkFunc(walkPath, nil, err)
+ }
+ resolvedPath, fileInfo, err := optionallyEvaluateSymlink(walkPath, fileInfo, walkOptions.symlinks)
+ if err != nil {
+ // If we have an error, then we still walk to call walkFunc with the error.
+ return walkFunc(walkPath, nil, err)
+ }
+ return walk(walkPath, resolvedPath, fileInfo, walkFunc, make(map[string]struct{}), walkOptions.symlinks)
+}
+
+// WalkOption is an option for Walk.
+type WalkOption func(*walkOptions)
+
+// WalkWithSymlinks returns a WalkOption that results in Walk following symlinks.
+func WalkWithSymlinks() WalkOption {
+ return func(walkOptions *walkOptions) {
+ walkOptions.symlinks = true
+ }
+}
+
+// walkPath is the path we give to the WalkFunc
+// resolvedPath is the potentially-resolved path that we actually read from.
+func walk(
+ walkPath string,
+ resolvedPath string,
+ fileInfo os.FileInfo,
+ walkFunc filepath.WalkFunc,
+ resolvedPathMap map[string]struct{},
+ symlinks bool,
+) error {
+ if symlinks {
+ if _, ok := resolvedPathMap[resolvedPath]; ok {
+ // Do not walk down this path.
+ // We could later make it optional to error in this case.
+ return nil
+ }
+ resolvedPathMap[resolvedPath] = struct{}{}
+ }
+
+ // If this is not a directory, just call walkFunc on it and we're done.
+ if !fileInfo.IsDir() {
+ return walkFunc(walkPath, fileInfo, nil)
+ }
+
+ // This is a directory, read it.
+ subNames, readDirErr := readDirNames(resolvedPath)
+ walkErr := walkFunc(walkPath, fileInfo, readDirErr)
+ // If readDirErr != nil, walk can't walk into this directory.
+ // walkErr != nil means walkFunc want walk to skip this directory or stop walking.
+ // Therefore, if one of readDirErr and walkErr isn't nil, walk will return.
+ if readDirErr != nil || walkErr != nil {
+ // The caller's behavior is controlled by the return value, which is decided
+ // by walkFunc. walkFunc may ignore readDirErr and return nil.
+ // If walkFunc returns SkipDir, it will be handled by the caller.
+ // So walk should return whatever walkFunc returns.
+ return walkErr
+ }
+
+ for _, subName := range subNames {
+ // The path we want to pass to walk is the directory walk path plus the name.
+ subWalkPath := filepath.Join(walkPath, subName)
+ // The path we want to actually used is the directory resolved path plus the name.
+ // This is potentially a symlink-evaluated path.
+ subResolvedPath := filepath.Join(resolvedPath, subName)
+ subFileInfo, err := os.Lstat(subResolvedPath)
+ if err != nil {
+ // If we have an error, still call walkFunc and match filepath.Walk.
+ if walkErr := walkFunc(subWalkPath, subFileInfo, err); walkErr != nil && walkErr != filepath.SkipDir {
+ return walkErr
+ }
+ // No error, just continue the for loop.
+ // Note that filepath.Walk does an else block instead, but we want to match
+ // the same code as in the symlink if statement below.
+ continue
+ }
+ subResolvedPath, subFileInfo, err = optionallyEvaluateSymlink(subResolvedPath, subFileInfo, symlinks)
+ if err != nil {
+ // If we have an error, still call walkFunc and match filepath.Walk.
+ if walkErr := walkFunc(subWalkPath, subFileInfo, err); walkErr != nil && walkErr != filepath.SkipDir {
+ return walkErr
+ }
+ // No error, just continue the for loop.
+ continue
+ }
+ if err := walk(subWalkPath, subResolvedPath, subFileInfo, walkFunc, resolvedPathMap, symlinks); err != nil {
+ // If not a directory, return the error.
+ // Else, if the error is filepath.SkipDir, return the error.
+ // Else, this is a directory and we have filepath.SkipDir, do not return the error and continue.
+ if !subFileInfo.IsDir() || err != filepath.SkipDir {
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
+// readDirNames reads the directory named by dirname and returns
+// a sorted list of directory entries.
+//
+// We need to use this instead of os.ReadDir because we want to do the os.Lstat ourselves
+// separately to completely match filepath.Walk.
+func readDirNames(dirPath string) (_ []string, retErr error) {
+ file, err := os.Open(dirPath)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, file.Close())
+ }()
+ dirNames, err := file.Readdirnames(-1)
+ if err != nil {
+ return nil, err
+ }
+ sort.Strings(dirNames)
+ return dirNames, nil
+}
+
+type walkOptions struct {
+ symlinks bool
+}
+
+func newWalkOptions() *walkOptions {
+ return &walkOptions{}
+}
+
+// returns optionally-resolved path, optionally-resolved os.FileInfo
+func optionallyEvaluateSymlink(filePath string, fileInfo os.FileInfo, symlinks bool) (string, os.FileInfo, error) {
+ if !symlinks {
+ return filePath, fileInfo, nil
+ }
+ if fileInfo.Mode()&os.ModeSymlink != os.ModeSymlink {
+ return filePath, fileInfo, nil
+ }
+ resolvedFilePath, err := filepath.EvalSymlinks(filePath)
+ if err != nil {
+ return filePath, fileInfo, err
+ }
+ resolvedFileInfo, err := os.Lstat(resolvedFilePath)
+ if err != nil {
+ return filePath, fileInfo, err
+ }
+ return resolvedFilePath, resolvedFileInfo, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/filepathextended/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/filepathextended/usage.gen.go
new file mode 100644
index 000000000..3be1d7961
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/filepathextended/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package filepathextended
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/git/branch.go b/vendor/github.com/bufbuild/buf/private/pkg/git/branch.go
new file mode 100644
index 000000000..164ffbd64
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/git/branch.go
@@ -0,0 +1,45 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 git
+
+type branch struct {
+ branch string
+}
+
+func newBranch(name string) *branch {
+ return &branch{
+ branch: name,
+ }
+}
+
+func (r *branch) cloneBranch() string {
+ if r == nil {
+ return ""
+ }
+ return r.branch
+}
+
+func (r branch) checkout() string {
+ return ""
+}
+
+// Used for logging
+func (r *branch) MarshalJSON() ([]byte, error) {
+ return []byte(`"` + r.cloneBranch() + `"`), nil
+}
+
+func (r *branch) String() string {
+ return r.cloneBranch()
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/git/cloner.go b/vendor/github.com/bufbuild/buf/private/pkg/git/cloner.go
new file mode 100644
index 000000000..45d8e2419
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/git/cloner.go
@@ -0,0 +1,376 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 git
+
+import (
+ "bytes"
+ "context"
+ "errors"
+ "fmt"
+ "strconv"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "github.com/bufbuild/buf/private/pkg/tmp"
+ "go.opencensus.io/trace"
+ "go.uber.org/multierr"
+ "go.uber.org/zap"
+)
+
+// bufCloneOrigin is the name for the remote. It helps distinguish the origin of
+// the repo we're cloning from the "origin" of our clone (which is the repo
+// being cloned).
+// We can fetch directly from an origin URL, but without any remote set git LFS
+// will fail to fetch so we need to pick something.
+const bufCloneOrigin = "bufCloneOrigin"
+
+type cloner struct {
+ logger *zap.Logger
+ storageosProvider storageos.Provider
+ runner command.Runner
+ options ClonerOptions
+}
+
+func newCloner(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ options ClonerOptions,
+) *cloner {
+ return &cloner{
+ logger: logger,
+ storageosProvider: storageosProvider,
+ runner: runner,
+ options: options,
+ }
+}
+
+func (c *cloner) CloneToBucket(
+ ctx context.Context,
+ envContainer app.EnvContainer,
+ url string,
+ depth uint32,
+ writeBucket storage.WriteBucket,
+ options CloneToBucketOptions,
+) (retErr error) {
+ ctx, span := trace.StartSpan(ctx, "git_clone_to_bucket")
+ defer span.End()
+
+ var err error
+ switch {
+ case strings.HasPrefix(url, "http://"),
+ strings.HasPrefix(url, "https://"),
+ strings.HasPrefix(url, "ssh://"),
+ strings.HasPrefix(url, "git://"),
+ strings.HasPrefix(url, "file://"):
+ default:
+ return fmt.Errorf("invalid git url: %q", url)
+ }
+
+ if depth == 0 {
+ return errors.New("depth must be > 0")
+ }
+
+ depthArg := strconv.Itoa(int(depth))
+
+ bareDir, err := tmp.NewDir()
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, bareDir.Close())
+ }()
+ worktreeDir, err := tmp.NewDir()
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, worktreeDir.Close())
+ }()
+
+ buffer := bytes.NewBuffer(nil)
+ if err := c.runner.Run(
+ ctx,
+ "git",
+ command.RunWithArgs("init", "--bare"),
+ command.RunWithEnv(app.EnvironMap(envContainer)),
+ command.RunWithStderr(buffer),
+ command.RunWithDir(bareDir.AbsPath()),
+ ); err != nil {
+ return newGitCommandError(err, buffer, bareDir)
+ }
+
+ buffer.Reset()
+ remoteArgs := []string{
+ "--git-dir=" + bareDir.AbsPath(),
+ "remote",
+ "add",
+ bufCloneOrigin,
+ url,
+ }
+ if err := c.runner.Run(
+ ctx,
+ "git",
+ command.RunWithArgs(remoteArgs...),
+ command.RunWithEnv(app.EnvironMap(envContainer)),
+ command.RunWithStderr(buffer),
+ ); err != nil {
+ return newGitCommandError(err, buffer, bareDir)
+ }
+
+ var gitConfigAuthArgs []string
+ if strings.HasPrefix(url, "https://") {
+ // These extraArgs MUST be first, as the -c flag potentially produced
+ // is only a flag on the parent git command, not on git fetch.
+ extraArgs, err := c.getArgsForHTTPSCommand(envContainer)
+ if err != nil {
+ return err
+ }
+ gitConfigAuthArgs = append(gitConfigAuthArgs, extraArgs...)
+ }
+ fetchRef, worktreeRef, checkoutRef := getRefspecsForName(options.Name)
+ fetchArgs := append(
+ gitConfigAuthArgs,
+ "--git-dir="+bareDir.AbsPath(),
+ "fetch",
+ "--depth", depthArg,
+ bufCloneOrigin,
+ fetchRef,
+ )
+
+ if strings.HasPrefix(url, "ssh://") {
+ envContainer, err = c.getEnvContainerWithGitSSHCommand(envContainer)
+ if err != nil {
+ return err
+ }
+ }
+ buffer.Reset()
+ if err := c.runner.Run(
+ ctx,
+ "git",
+ command.RunWithArgs(fetchArgs...),
+ command.RunWithEnv(app.EnvironMap(envContainer)),
+ command.RunWithStderr(buffer),
+ ); err != nil {
+ return newGitCommandError(err, buffer, bareDir)
+ }
+
+ buffer.Reset()
+ args := append(
+ gitConfigAuthArgs,
+ "--git-dir="+bareDir.AbsPath(),
+ "worktree",
+ "add",
+ worktreeDir.AbsPath(),
+ worktreeRef,
+ )
+ if err := c.runner.Run(
+ ctx,
+ "git",
+ command.RunWithArgs(args...),
+ command.RunWithEnv(app.EnvironMap(envContainer)),
+ command.RunWithStderr(buffer),
+ ); err != nil {
+ return newGitCommandError(err, buffer, worktreeDir)
+ }
+
+ if checkoutRef != "" {
+ buffer.Reset()
+ args := append(
+ gitConfigAuthArgs,
+ "checkout",
+ checkoutRef,
+ )
+ if err := c.runner.Run(
+ ctx,
+ "git",
+ command.RunWithArgs(args...),
+ command.RunWithEnv(app.EnvironMap(envContainer)),
+ command.RunWithStderr(buffer),
+ command.RunWithDir(worktreeDir.AbsPath()),
+ ); err != nil {
+ return newGitCommandError(err, buffer, worktreeDir)
+ }
+ }
+
+ if options.RecurseSubmodules {
+ submoduleArgs := append(
+ gitConfigAuthArgs,
+ "submodule",
+ "update",
+ "--init",
+ "--recursive",
+ "--depth",
+ depthArg,
+ )
+ buffer.Reset()
+ if err := c.runner.Run(
+ ctx,
+ "git",
+ command.RunWithArgs(submoduleArgs...),
+ command.RunWithEnv(app.EnvironMap(envContainer)),
+ command.RunWithStderr(buffer),
+ command.RunWithDir(worktreeDir.AbsPath()),
+ ); err != nil {
+ // Suppress printing of temp path
+ return fmt.Errorf("%v\n%v", err, strings.Replace(buffer.String(), worktreeDir.AbsPath(), "", -1))
+ }
+ }
+
+ // we do NOT want to read in symlinks
+ tmpReadWriteBucket, err := c.storageosProvider.NewReadWriteBucket(worktreeDir.AbsPath())
+ if err != nil {
+ return err
+ }
+ var readBucket storage.ReadBucket = tmpReadWriteBucket
+ if options.Mapper != nil {
+ readBucket = storage.MapReadBucket(readBucket, options.Mapper)
+ }
+ ctx, span2 := trace.StartSpan(ctx, "git_clone_to_bucket_copy")
+ defer span2.End()
+ // do NOT copy external paths
+ _, err = storage.Copy(ctx, readBucket, writeBucket)
+ return err
+}
+
+func (c *cloner) getArgsForHTTPSCommand(envContainer app.EnvContainer) ([]string, error) {
+ if c.options.HTTPSUsernameEnvKey == "" || c.options.HTTPSPasswordEnvKey == "" {
+ return nil, nil
+ }
+ httpsUsernameSet := envContainer.Env(c.options.HTTPSUsernameEnvKey) != ""
+ httpsPasswordSet := envContainer.Env(c.options.HTTPSPasswordEnvKey) != ""
+ if !httpsUsernameSet {
+ if httpsPasswordSet {
+ return nil, fmt.Errorf("%s set but %s not set", c.options.HTTPSPasswordEnvKey, c.options.HTTPSUsernameEnvKey)
+ }
+ return nil, nil
+ }
+ c.logger.Debug("git_credential_helper_override")
+ return []string{
+ "-c",
+ fmt.Sprintf(
+ // TODO: is this OK for windows/other platforms?
+ // we might need an alternate flow where the binary has a sub-command to do this, and calls itself
+ //
+ // putting the variable name in this script, NOT the actual variable value
+ // we do not want to store the variable on disk, ever
+ // this is especially important if the program dies
+ // note that this means i.e. HTTPS_PASSWORD=foo invoke_program does not work as
+ // this variable needs to be in the actual global environment
+ // TODO this is a mess
+ "credential.helper=!f(){ echo username=${%s}; echo password=${%s}; };f",
+ c.options.HTTPSUsernameEnvKey,
+ c.options.HTTPSPasswordEnvKey,
+ ),
+ }, nil
+}
+
+func (c *cloner) getEnvContainerWithGitSSHCommand(envContainer app.EnvContainer) (app.EnvContainer, error) {
+ gitSSHCommand, err := c.getGitSSHCommand(envContainer)
+ if err != nil {
+ return nil, err
+ }
+ if gitSSHCommand != "" {
+ c.logger.Debug("git_ssh_command_override")
+ return app.NewEnvContainerWithOverrides(
+ envContainer,
+ map[string]string{
+ "GIT_SSH_COMMAND": gitSSHCommand,
+ },
+ ), nil
+ }
+ return envContainer, nil
+}
+
+func (c *cloner) getGitSSHCommand(envContainer app.EnvContainer) (string, error) {
+ sshKeyFilePath := envContainer.Env(c.options.SSHKeyFileEnvKey)
+ sshKnownHostsFiles := envContainer.Env(c.options.SSHKnownHostsFilesEnvKey)
+ if sshKeyFilePath == "" {
+ if sshKnownHostsFiles != "" {
+ return "", fmt.Errorf("%s set but %s not set", c.options.SSHKnownHostsFilesEnvKey, c.options.SSHKeyFileEnvKey)
+ }
+ return "", nil
+ }
+ if sshKnownHostsFilePaths := getSSHKnownHostsFilePaths(sshKnownHostsFiles); len(sshKnownHostsFilePaths) > 0 {
+ return fmt.Sprintf(
+ `ssh -q -i "%s" -o "IdentitiesOnly=yes" -o "UserKnownHostsFile=%s"`,
+ sshKeyFilePath,
+ strings.Join(sshKnownHostsFilePaths, " "),
+ ), nil
+ }
+ // we want to set StrictHostKeyChecking=no because the SSH key file variable was set, so
+ // there is an ask to override the default ssh settings here
+ return fmt.Sprintf(
+ `ssh -q -i "%s" -o "IdentitiesOnly=yes" -o "UserKnownHostsFile=%s" -o "StrictHostKeyChecking=no"`,
+ sshKeyFilePath,
+ app.DevNullFilePath,
+ ), nil
+}
+
+func getSSHKnownHostsFilePaths(sshKnownHostsFiles string) []string {
+ if sshKnownHostsFiles == "" {
+ return nil
+ }
+ var filePaths []string
+ for _, filePath := range strings.Split(sshKnownHostsFiles, ":") {
+ filePath = strings.TrimSpace(filePath)
+ if filePath != "" {
+ filePaths = append(filePaths, filePath)
+ }
+ }
+ return filePaths
+}
+
+// getRefspecsForName decides the refspecs to use in the subsequent git fetch,
+// git worktree add and git checkout. When checkoutRefspec is empty, Name
+// explicitly refer to a named ref and the checkout isn't a necessary step.
+func getRefspecsForName(gitName Name) (fetchRefSpec string, worktreeRefSpec string, checkoutRefspec string) {
+ if gitName == nil {
+ return "HEAD", "FETCH_HEAD", ""
+ }
+ if gitName.cloneBranch() != "" && gitName.checkout() != "" {
+ // When doing branch/tag clones, make sure we use a
+ // refspec that creates a local referece in `refs/` even if the ref
+ // is remote tracking, so that the checkoutRefs may reference it,
+ // for example:
+ // branch=origin/main,ref=origin/main~1
+ fetchRefSpec := gitName.cloneBranch() + ":" + gitName.cloneBranch()
+ return fetchRefSpec, "FETCH_HEAD", gitName.checkout()
+ } else if gitName.cloneBranch() != "" {
+ return gitName.cloneBranch(), "FETCH_HEAD", ""
+ } else if gitName.checkout() != "" {
+ // After fetch we won't have checked out any refs. This
+ // will cause `refs=` containing "HEAD" to fail, as HEAD
+ // is a special case that is not fetched into a ref but
+ // instead refers to the current commit checked out. By
+ // checking out "FETCH_HEAD" before checking out the
+ // user supplied ref, we behave similarly to git clone.
+ return "HEAD", "FETCH_HEAD", gitName.checkout()
+ } else {
+ return "HEAD", "FETCH_HEAD", ""
+ }
+}
+
+func newGitCommandError(
+ err error,
+ buffer *bytes.Buffer,
+ tmpDir tmp.Dir,
+) error {
+ // Suppress printing of temp path
+ return fmt.Errorf("%v\n%v", err, strings.TrimSpace(strings.Replace(buffer.String(), tmpDir.AbsPath(), "", -1)))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/git/git.go b/vendor/github.com/bufbuild/buf/private/pkg/git/git.go
new file mode 100644
index 000000000..581156f16
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/git/git.go
@@ -0,0 +1,94 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 git
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageos"
+ "go.uber.org/zap"
+)
+
+// Name is a name identifiable by git.
+type Name interface {
+ // If cloneBranch returns a non-empty string, any clones will be performed with --branch set to the value.
+ cloneBranch() string
+ // If checkout returns a non-empty string, a checkout of the value will be performed after cloning.
+ checkout() string
+}
+
+// NewBranchName returns a new Name for the branch.
+func NewBranchName(branch string) Name {
+ return newBranch(branch)
+}
+
+// NewTagName returns a new Name for the tag.
+func NewTagName(tag string) Name {
+ return newBranch(tag)
+}
+
+// NewRefName returns a new Name for the ref.
+func NewRefName(ref string) Name {
+ return newRef(ref)
+}
+
+// NewRefNameWithBranch returns a new Name for the ref while setting branch as the clone target.
+func NewRefNameWithBranch(ref string, branch string) Name {
+ return newRefWithBranch(ref, branch)
+}
+
+// Cloner clones git repositories to buckets.
+type Cloner interface {
+ // CloneToBucket clones the repository to the bucket.
+ //
+ // The url must contain the scheme, including file:// if necessary.
+ // depth must be > 0.
+ CloneToBucket(
+ ctx context.Context,
+ envContainer app.EnvContainer,
+ url string,
+ depth uint32,
+ writeBucket storage.WriteBucket,
+ options CloneToBucketOptions,
+ ) error
+}
+
+// CloneToBucketOptions are options for Clone.
+type CloneToBucketOptions struct {
+ Mapper storage.Mapper
+ Name Name
+ RecurseSubmodules bool
+}
+
+// NewCloner returns a new Cloner.
+func NewCloner(
+ logger *zap.Logger,
+ storageosProvider storageos.Provider,
+ runner command.Runner,
+ options ClonerOptions,
+) Cloner {
+ return newCloner(logger, storageosProvider, runner, options)
+}
+
+// ClonerOptions are options for a new Cloner.
+type ClonerOptions struct {
+ HTTPSUsernameEnvKey string
+ HTTPSPasswordEnvKey string
+ SSHKeyFileEnvKey string
+ SSHKnownHostsFilesEnvKey string
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/git/ref.go b/vendor/github.com/bufbuild/buf/private/pkg/git/ref.go
new file mode 100644
index 000000000..447781227
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/git/ref.go
@@ -0,0 +1,45 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 git
+
+type ref struct {
+ ref string
+}
+
+func newRef(name string) *ref {
+ return &ref{
+ ref: name,
+ }
+}
+
+func (r *ref) cloneBranch() string {
+ return ""
+}
+
+func (r *ref) checkout() string {
+ if r == nil {
+ return ""
+ }
+ return r.ref
+}
+
+// Used for logging
+func (r *ref) MarshalJSON() ([]byte, error) {
+ return []byte(`"` + r.checkout() + `"`), nil
+}
+
+func (r *ref) String() string {
+ return r.checkout()
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/git/ref_branch.go b/vendor/github.com/bufbuild/buf/private/pkg/git/ref_branch.go
new file mode 100644
index 000000000..a86735c46
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/git/ref_branch.go
@@ -0,0 +1,58 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 git
+
+import "encoding/json"
+
+type refWithBranch struct {
+ ref string
+ branch string
+}
+
+func newRefWithBranch(ref string, branch string) *refWithBranch {
+ return &refWithBranch{
+ ref: ref,
+ branch: branch,
+ }
+}
+
+func (r *refWithBranch) cloneBranch() string {
+ if r == nil {
+ return ""
+ }
+ return r.branch
+}
+
+func (r *refWithBranch) checkout() string {
+ if r == nil {
+ return ""
+ }
+ return r.ref
+}
+
+// Used for logging
+func (r *refWithBranch) MarshalJSON() ([]byte, error) {
+ return json.Marshal(struct {
+ Ref string
+ Branch string
+ }{
+ Ref: r.checkout(),
+ Branch: r.cloneBranch(),
+ })
+}
+
+func (r *refWithBranch) String() string {
+ return r.checkout()
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/git/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/git/usage.gen.go
new file mode 100644
index 000000000..2c3a1ef18
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/git/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package git
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/httpauth/env_authenticator.go b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/env_authenticator.go
new file mode 100644
index 000000000..8b4434912
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/env_authenticator.go
@@ -0,0 +1,46 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 httpauth
+
+import (
+ "net/http"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+)
+
+type envAuthenticator struct {
+ usernameKey string
+ passwordKey string
+}
+
+func newEnvAuthenticator(
+ usernameKey string,
+ passwordKey string,
+) *envAuthenticator {
+ return &envAuthenticator{
+ usernameKey: usernameKey,
+ passwordKey: passwordKey,
+ }
+}
+
+func (a *envAuthenticator) SetAuth(envContainer app.EnvContainer, request *http.Request) (bool, error) {
+ return setBasicAuth(
+ request,
+ envContainer.Env(a.usernameKey),
+ envContainer.Env(a.passwordKey),
+ a.usernameKey,
+ a.passwordKey,
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/httpauth/httpauth.go b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/httpauth.go
new file mode 100644
index 000000000..2773ff4af
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/httpauth.go
@@ -0,0 +1,63 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 httpauth
+
+import (
+ "net/http"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+)
+
+// Authenticator adds authentication to request.
+//
+// This could be instead replaced with a http.RoundTripper workflow, however
+// this means we have to use the same http.Client, and we generally pass EnvContainers
+// to functions right now, and not building objects with EnvContainers, so this would
+// not fit in with the rest of this codebase. This should be re-evaluated though.
+type Authenticator interface {
+ // SetAuth sets authentication on the request.
+ //
+ // Returns true if authentication successfully set.
+ // Does nothing and returns false if no authentication available for the given request.
+ // Does nothing and returns false if the request scheme is not https.
+ SetAuth(envContainer app.EnvContainer, request *http.Request) (bool, error)
+}
+
+// NewEnvAuthenticator returns a new env Authenticator for the environment.
+func NewEnvAuthenticator(usernameKey string, passwordKey string) Authenticator {
+ return newEnvAuthenticator(
+ usernameKey,
+ passwordKey,
+ )
+}
+
+// NewNetrcAuthenticator returns a new netrc Authenticator.
+func NewNetrcAuthenticator() Authenticator {
+ return newNetrcAuthenticator()
+}
+
+// NewNopAuthenticator returns a new nop Authenticator.
+//
+// Always returns false and nil.
+func NewNopAuthenticator() Authenticator {
+ return newNopAuthenticator()
+}
+
+// NewMultiAuthenticator returns a new multi Authenticator.
+//
+// Stops on first matching SetAuth request.
+func NewMultiAuthenticator(authenticators ...Authenticator) Authenticator {
+ return newMultiAuthenticator(authenticators...)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/httpauth/multi_authenticator.go b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/multi_authenticator.go
new file mode 100644
index 000000000..dc15ac722
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/multi_authenticator.go
@@ -0,0 +1,51 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 httpauth
+
+import (
+ "net/http"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+)
+
+type multiAuthenticator struct {
+ authenticators []Authenticator
+}
+
+func newMultiAuthenticator(authenticators ...Authenticator) *multiAuthenticator {
+ return &multiAuthenticator{
+ authenticators: authenticators,
+ }
+}
+
+func (a *multiAuthenticator) SetAuth(envContainer app.EnvContainer, request *http.Request) (bool, error) {
+ switch len(a.authenticators) {
+ case 0:
+ return false, nil
+ case 1:
+ return a.authenticators[0].SetAuth(envContainer, request)
+ default:
+ for _, authenticator := range a.authenticators {
+ ok, err := authenticator.SetAuth(envContainer, request)
+ if err != nil {
+ return false, err
+ }
+ if ok {
+ return true, nil
+ }
+ }
+ return false, nil
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/httpauth/netrc_authenticator.go b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/netrc_authenticator.go
new file mode 100644
index 000000000..b65d406e0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/netrc_authenticator.go
@@ -0,0 +1,52 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 httpauth
+
+import (
+ "errors"
+ "net/http"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/bufbuild/buf/private/pkg/netrc"
+)
+
+type netrcAuthenticator struct{}
+
+func newNetrcAuthenticator() *netrcAuthenticator {
+ return &netrcAuthenticator{}
+}
+
+func (a *netrcAuthenticator) SetAuth(envContainer app.EnvContainer, request *http.Request) (bool, error) {
+ if request.URL == nil {
+ return false, errors.New("malformed request: no url")
+ }
+ if request.URL.Host == "" {
+ return false, errors.New("malformed request: no url host")
+ }
+ machine, err := netrc.GetMachineForName(envContainer, request.URL.Host)
+ if err != nil {
+ return false, err
+ }
+ if machine == nil {
+ return false, nil
+ }
+ return setBasicAuth(
+ request,
+ machine.Login(),
+ machine.Password(),
+ "netrc login for host",
+ "netrc password for host",
+ )
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/httpauth/nop_authenticator.go b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/nop_authenticator.go
new file mode 100644
index 000000000..ef959c298
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/nop_authenticator.go
@@ -0,0 +1,31 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 httpauth
+
+import (
+ "net/http"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+)
+
+type nopAuthenticator struct{}
+
+func newNopAuthenticator() *nopAuthenticator {
+ return &nopAuthenticator{}
+}
+
+func (*nopAuthenticator) SetAuth(app.EnvContainer, *http.Request) (bool, error) {
+ return false, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/httpauth/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/usage.gen.go
new file mode 100644
index 000000000..ec080eec6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package httpauth
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/httpauth/util.go b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/util.go
new file mode 100644
index 000000000..3f7df4418
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/httpauth/util.go
@@ -0,0 +1,50 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 httpauth
+
+import (
+ "errors"
+ "fmt"
+ "net/http"
+)
+
+func setBasicAuth(
+ request *http.Request,
+ username string,
+ password string,
+ usernameKey string,
+ passwordKey string,
+) (bool, error) {
+ if request.URL == nil {
+ return false, errors.New("malformed request: no url")
+ }
+ if request.URL.Scheme == "" {
+ return false, errors.New("malformed request: no url scheme")
+ }
+ if request.URL.Scheme != "https" {
+ return false, nil
+ }
+ if username != "" && password != "" {
+ request.SetBasicAuth(username, password)
+ return true, nil
+ }
+ if username == "" && password == "" {
+ return false, nil
+ }
+ if password == "" {
+ return false, fmt.Errorf("%s set but %s not set", usernameKey, passwordKey)
+ }
+ return false, fmt.Errorf("%s set but %s not set", passwordKey, usernameKey)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/interrupt/interrupt.go b/vendor/github.com/bufbuild/buf/private/pkg/interrupt/interrupt.go
new file mode 100644
index 000000000..4c683fef7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/interrupt/interrupt.go
@@ -0,0 +1,52 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 interrupt
+
+import (
+ "context"
+ "os"
+ "os/signal"
+)
+
+var signals = append(
+ []os.Signal{
+ os.Interrupt,
+ },
+ extraSignals...,
+)
+
+// WithCancel returns a context that is cancelled if interrupt signals are sent.
+func WithCancel(ctx context.Context) (context.Context, context.CancelFunc) {
+ signalC, closer := NewSignalChannel()
+ ctx, cancel := context.WithCancel(ctx)
+ go func() {
+ <-signalC
+ closer()
+ cancel()
+ }()
+ return ctx, cancel
+}
+
+// NewSignalChannel returns a new channel for interrupt signals.
+//
+// Call the returned function to cancel sending to this channel.
+func NewSignalChannel() (<-chan os.Signal, func()) {
+ signalC := make(chan os.Signal, 1)
+ signal.Notify(signalC, signals...)
+ return signalC, func() {
+ signal.Stop(signalC)
+ close(signalC)
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/interrupt/interrupt_unix.go b/vendor/github.com/bufbuild/buf/private/pkg/interrupt/interrupt_unix.go
new file mode 100644
index 000000000..a9a91c218
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/interrupt/interrupt_unix.go
@@ -0,0 +1,35 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Matching the unix-like build tags in the Golang source i.e. https://github.com/golang/go/blob/912f0750472dd4f674b69ca1616bfaf377af1805/src/os/file_unix.go#L6
+
+//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+
+package interrupt
+
+import (
+ "os"
+ "syscall"
+)
+
+// extraSignals are signals beyond os.Interrupt that we want to be handled
+// as interrupts.
+//
+// For unix-like platforms, this adds syscall.SIGTERM, although this is only
+// tested on darwin and linux, which buf officially supports. Other unix-like
+// platforms should have this as well, however.
+var extraSignals = []os.Signal{
+ syscall.SIGTERM,
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/interrupt/interrupt_windows.go b/vendor/github.com/bufbuild/buf/private/pkg/interrupt/interrupt_windows.go
new file mode 100644
index 000000000..97baf48b9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/interrupt/interrupt_windows.go
@@ -0,0 +1,28 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 interrupt
+
+import "os"
+
+// extraSignals are signals beyond os.Interrupt that we want to be handled
+// as interrupts.
+//
+// For unix-like platforms, this adds syscall.SIGTERM, although this is only
+// tested on darwin and linux, which buf officially supports. Other unix-like
+// platforms should have this as well, however.
+var extraSignals = []os.Signal{}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/interrupt/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/interrupt/usage.gen.go
new file mode 100644
index 000000000..f03e6a7c2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/interrupt/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package interrupt
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/ioextended/ioextended.go b/vendor/github.com/bufbuild/buf/private/pkg/ioextended/ioextended.go
new file mode 100644
index 000000000..4aa043ee5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/ioextended/ioextended.go
@@ -0,0 +1,126 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ioextended provides io utilities.
+package ioextended
+
+import (
+ "bytes"
+ "io"
+ "sync"
+
+ "go.uber.org/multierr"
+)
+
+var (
+ // DiscardReader is an io.Reader in which all calls return 0 and io.EOF.
+ DiscardReader io.Reader = discardReader{}
+ // DiscardReadCloser is an io.ReadCloser in which all calls return 0 and io.EOF.
+ DiscardReadCloser io.ReadCloser = io.NopCloser(DiscardReader)
+ // DiscardWriteCloser is a discard io.WriteCloser.
+ DiscardWriteCloser io.WriteCloser = NopWriteCloser(io.Discard)
+ // NopCloser is a no-op closer.
+ NopCloser = nopCloser{}
+)
+
+// NopWriteCloser returns an io.WriteCloser with a no-op Close method wrapping the provided io.Writer.
+func NopWriteCloser(writer io.Writer) io.WriteCloser {
+ return nopWriteCloser{Writer: writer}
+}
+
+// LockedWriter creates a locked Writer.
+func LockedWriter(writer io.Writer) io.Writer {
+ return &lockedWriter{writer: writer}
+}
+
+// CompositeReadCloser returns a io.ReadCloser that is a composite of the Reader and Closer.
+func CompositeReadCloser(reader io.Reader, closer io.Closer) io.ReadCloser {
+ return compositeReadCloser{Reader: reader, Closer: closer}
+}
+
+// CompositeWriteCloser returns a io.WriteCloser that is a composite of the Writer and Closer.
+func CompositeWriteCloser(writer io.Writer, closer io.Closer) io.WriteCloser {
+ return compositeWriteCloser{Writer: writer, Closer: closer}
+}
+
+// ChainCloser chains the closers by calling them in order.
+func ChainCloser(closers ...io.Closer) io.Closer {
+ return chainCloser{closers: closers}
+}
+
+// ReaderAtForReader converts an io.Reader to an io.ReaderAt.
+func ReaderAtForReader(reader io.Reader) (io.ReaderAt, error) {
+ if readerAt, ok := reader.(io.ReaderAt); ok {
+ return readerAt, nil
+ }
+ data, err := io.ReadAll(reader)
+ if err != nil {
+ return nil, err
+ }
+ return bytes.NewReader(data), nil
+}
+
+type discardReader struct{}
+
+func (discardReader) Read([]byte) (int, error) {
+ return 0, io.EOF
+}
+
+type nopWriteCloser struct {
+ io.Writer
+}
+
+func (nopWriteCloser) Close() error {
+ return nil
+}
+
+type nopCloser struct{}
+
+func (nopCloser) Close() error {
+ return nil
+}
+
+type lockedWriter struct {
+ writer io.Writer
+ lock sync.Mutex
+}
+
+func (l *lockedWriter) Write(p []byte) (int, error) {
+ l.lock.Lock()
+ n, err := l.writer.Write(p)
+ l.lock.Unlock()
+ return n, err
+}
+
+type compositeReadCloser struct {
+ io.Reader
+ io.Closer
+}
+
+type compositeWriteCloser struct {
+ io.Writer
+ io.Closer
+}
+
+type chainCloser struct {
+ closers []io.Closer
+}
+
+func (c chainCloser) Close() error {
+ var err error
+ for _, closer := range c.closers {
+ err = multierr.Append(err, closer.Close())
+ }
+ return err
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/ioextended/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/ioextended/usage.gen.go
new file mode 100644
index 000000000..d7db8751a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/ioextended/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package ioextended
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/netextended/netextended.go b/vendor/github.com/bufbuild/buf/private/pkg/netextended/netextended.go
new file mode 100644
index 000000000..b6e6f49f7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/netextended/netextended.go
@@ -0,0 +1,104 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 netextended
+
+import (
+ "errors"
+ "fmt"
+ "net"
+)
+
+const (
+ domainNameMinLength = 2
+ domainNameMaxLength = 254
+ maxSegmentLength = 63
+)
+
+// ValidateHostname verifies the given hostname is a well-formed IP address
+// or domain name, optionally including a port, and returns the hostname part.
+func ValidateHostname(hostname string) (string, error) {
+ if len(hostname) == 0 {
+ return "", errors.New("must not be empty")
+ }
+ if len(hostname) < domainNameMinLength || len(hostname) > domainNameMaxLength {
+ return "", fmt.Errorf("must be at least %d and at most %d characters", domainNameMinLength, domainNameMaxLength)
+ }
+
+ parsedHost := hostname
+ if host, _, err := net.SplitHostPort(hostname); err == nil {
+ parsedHost = host
+ }
+ if net.ParseIP(parsedHost) != nil {
+ // hostname is a valid IP address
+ return hostname, nil
+ }
+ if err := isValidDomainName(parsedHost); err != nil {
+ return "", fmt.Errorf("must either be a valid IP address or domain name: invalid domain name %q, %w", hostname, err)
+ }
+ return hostname, nil
+}
+
+// isValidDomainName validates a hostname according to the requirements set for
+// domain names internally in the Go standard library's net package, see
+// golang.org/issue/12421.
+//
+// Adapted from https://github.com/golang/go/blob/f4e7a6b905ce60448e506a3f6578d01b60602cdd/src/net/dnsclient.go#L73-L128
+// See https://github.com/golang/go/blob/f4e7a6b905ce60448e506a3f6578d01b60602cdd/LICENSE for the license.
+func isValidDomainName(hostname string) error {
+ previous := rune('.')
+ nonNumeric := false
+ segmentLen := 0
+ for _, char := range hostname {
+ switch {
+ case '0' <= char && char <= '9':
+ segmentLen++
+ case 'a' <= char && char <= 'z' || 'A' <= char && char <= 'Z' || char == '_':
+ nonNumeric = true
+ segmentLen++
+ case char == '-':
+ if previous == '.' {
+ return fmt.Errorf("cannot begin a segment after a period (.) with a hyphen (-)")
+ }
+ nonNumeric = true
+ segmentLen++
+ case char == '.':
+ if previous == '.' {
+ return fmt.Errorf("cannot contain two periods (.) in a row")
+ }
+ if previous == '-' {
+ return fmt.Errorf("cannot have a hyphen (-) immediately before a period (.)")
+ }
+ if segmentLen > maxSegmentLength {
+ return fmt.Errorf("cannot have segments greater than %v characters between periods (.)", maxSegmentLength)
+ }
+ segmentLen = 0
+ default:
+ return fmt.Errorf("included invalid character %q, must only contain letters, digits, periods (.), hyphens (-), or underscores (_)", char)
+ }
+ previous = char
+ }
+
+ if previous == '-' {
+ return fmt.Errorf("cannot have a hyphen (-) as the final character")
+ }
+ if segmentLen > maxSegmentLength {
+ return fmt.Errorf("cannot have segments greater than %v characters between periods (.)", maxSegmentLength)
+ }
+ if !nonNumeric {
+ return errors.New("must have at least one non-numeric character")
+ }
+
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/netextended/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/netextended/usage.gen.go
new file mode 100644
index 000000000..e879439f9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/netextended/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package netextended
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/netrc/machine.go b/vendor/github.com/bufbuild/buf/private/pkg/netrc/machine.go
new file mode 100644
index 000000000..40ff4cba4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/netrc/machine.go
@@ -0,0 +1,45 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 netrc
+
+type machine struct {
+ name string
+ login string
+ password string
+}
+
+func newMachine(
+ name string,
+ login string,
+ password string,
+) *machine {
+ return &machine{
+ name: name,
+ login: login,
+ password: password,
+ }
+}
+
+func (m *machine) Name() string {
+ return m.name
+}
+
+func (m *machine) Login() string {
+ return m.login
+}
+
+func (m *machine) Password() string {
+ return m.password
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/netrc/netrc.go b/vendor/github.com/bufbuild/buf/private/pkg/netrc/netrc.go
new file mode 100644
index 000000000..3048789d1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/netrc/netrc.go
@@ -0,0 +1,173 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 netrc contains functionality to work with netrc.
+package netrc
+
+import (
+ "io/fs"
+ "os"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/pkg/app"
+ "github.com/jdxcode/netrc"
+)
+
+// Filename exposes the netrc filename based on the current operating system.
+const Filename = netrcFilename
+
+// Machine is a machine.
+type Machine interface {
+ // Empty for default machine.
+ Name() string
+ Login() string
+ Password() string
+}
+
+// NewMachine creates a new Machine.
+func NewMachine(
+ name string,
+ login string,
+ password string,
+) Machine {
+ return newMachine(name, login, password)
+}
+
+// GetMachineForName returns the Machine for the given name.
+//
+// Returns nil if no such Machine.
+func GetMachineForName(envContainer app.EnvContainer, name string) (_ Machine, retErr error) {
+ filePath, err := GetFilePath(envContainer)
+ if err != nil {
+ return nil, err
+ }
+ return getMachineForNameAndFilePath(name, filePath)
+}
+
+// PutMachines adds the given Machines to the configured netrc file.
+func PutMachines(envContainer app.EnvContainer, machines ...Machine) error {
+ filePath, err := GetFilePath(envContainer)
+ if err != nil {
+ return err
+ }
+ return putMachinesForFilePath(machines, filePath)
+}
+
+// DeleteMachineForName deletes the Machine for the given name, if set.
+//
+// Returns false if there was no Machine for the given name.
+func DeleteMachineForName(envContainer app.EnvContainer, name string) (bool, error) {
+ filePath, err := GetFilePath(envContainer)
+ if err != nil {
+ return false, err
+ }
+ return deleteMachineForFilePath(name, filePath)
+}
+
+// GetFilePath gets the netrc file path for the given environment.
+func GetFilePath(envContainer app.EnvContainer) (string, error) {
+ if netrcFilePath := envContainer.Env("NETRC"); netrcFilePath != "" {
+ return netrcFilePath, nil
+ }
+ homeDirPath, err := app.HomeDirPath(envContainer)
+ if err != nil {
+ return "", err
+ }
+ return filepath.Join(homeDirPath, netrcFilename), nil
+}
+
+func getMachineForNameAndFilePath(name string, filePath string) (_ Machine, retErr error) {
+ if _, err := os.Stat(filePath); err != nil {
+ if os.IsNotExist(err) {
+ return nil, nil
+ }
+ return nil, err
+ }
+ netrcStruct, err := netrc.Parse(filePath)
+ if err != nil {
+ return nil, err
+ }
+ netrcMachine := netrcStruct.Machine(name)
+ if netrcMachine == nil {
+ netrcMachine = netrcStruct.Machine("default")
+ if netrcMachine == nil {
+ return nil, nil
+ }
+ }
+ // We take the name from the read Machine just in case there's some case-insensitivity weirdness
+ machineName := netrcMachine.Name
+ if machineName == "default" {
+ machineName = ""
+ }
+ return newMachine(
+ machineName,
+ netrcMachine.Get("login"),
+ netrcMachine.Get("password"),
+ ), nil
+}
+
+func putMachinesForFilePath(machines []Machine, filePath string) (retErr error) {
+ var netrcStruct *netrc.Netrc
+ fileInfo, err := os.Stat(filePath)
+ var fileMode fs.FileMode
+ if err != nil {
+ if os.IsNotExist(err) {
+ netrcStruct = &netrc.Netrc{}
+ fileMode = 0600
+ } else {
+ return err
+ }
+ } else {
+ netrcStruct, err = netrc.Parse(filePath)
+ if err != nil {
+ return err
+ }
+ fileMode = fileInfo.Mode()
+ }
+ for _, machine := range machines {
+ if foundMachine := netrcStruct.Machine(machine.Name()); foundMachine != nil {
+ netrcStruct.RemoveMachine(machine.Name())
+ }
+ netrcStruct.AddMachine(
+ machine.Name(),
+ machine.Login(),
+ machine.Password(),
+ )
+ }
+ return os.WriteFile(filePath, []byte(netrcStruct.Render()), fileMode)
+}
+
+func deleteMachineForFilePath(name string, filePath string) (_ bool, retErr error) {
+ fileInfo, err := os.Stat(filePath)
+ if err != nil {
+ if os.IsNotExist(err) {
+ // If a netrc file does not already exist, there's nothing to be done.
+ return false, nil
+ }
+ return false, err
+ }
+ netrcStruct, err := netrc.Parse(filePath)
+ if err != nil {
+ return false, err
+ }
+ if netrcStruct.Machine(name) == nil {
+ // Machine is not set, there is nothing to be done.
+ return false, nil
+ }
+ netrcStruct.RemoveMachine(name)
+ if err := os.WriteFile(filePath, []byte(netrcStruct.Render()), fileInfo.Mode()); err != nil {
+ return false, err
+ }
+ return true, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/netrc/netrc_unix.go b/vendor/github.com/bufbuild/buf/private/pkg/netrc/netrc_unix.go
new file mode 100644
index 000000000..abf740d24
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/netrc/netrc_unix.go
@@ -0,0 +1,26 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Matching the unix-like build tags in the Golang source i.e. https://github.com/golang/go/blob/912f0750472dd4f674b69ca1616bfaf377af1805/src/os/file_unix.go#L6
+
+//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+
+package netrc
+
+// netrcFilename is the netrc filename.
+//
+// This will be .netrc for unix-like platforms including darwin.
+// This will be _netrc for windows.
+const netrcFilename = ".netrc"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/netrc/netrc_windows.go b/vendor/github.com/bufbuild/buf/private/pkg/netrc/netrc_windows.go
new file mode 100644
index 000000000..c200d41ce
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/netrc/netrc_windows.go
@@ -0,0 +1,24 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 netrc
+
+// netrcFilename is the netrc filename.
+//
+// This will be .netrc for darwin and linux.
+// This will be _netrc for windows.
+const netrcFilename = "_netrc"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/netrc/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/netrc/usage.gen.go
new file mode 100644
index 000000000..6c705fb36
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/netrc/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package netrc
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/normalpath/normalpath.go b/vendor/github.com/bufbuild/buf/private/pkg/normalpath/normalpath.go
new file mode 100644
index 000000000..0e62a0ef9
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/normalpath/normalpath.go
@@ -0,0 +1,373 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 normalpath provides functions similar to filepath.
+//
+// A normalized path is a cleaned and to-slash'ed path.
+// A validated path validates that a path is relative and does not jump context.
+package normalpath
+
+import (
+ "errors"
+ "fmt"
+ "net/url"
+ "os"
+ "path/filepath"
+ "sort"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/stringutil"
+)
+
+const (
+ // Relative is the PathType for normalized and validated paths.
+ Relative PathType = 1
+ // Absolute is the PathType for normalized and absolute paths.
+ Absolute PathType = 2
+
+ stringOSPathSeparator = string(os.PathSeparator)
+ // This has to be with "/" instead of os.PathSeparator as we use this on normalized paths
+ normalizedRelPathJumpContextPrefix = "../"
+)
+
+var (
+ // errNotRelative is the error returned if the path is not relative.
+ errNotRelative = errors.New("expected to be relative")
+ // errOutsideContextDir is the error returned if the path is outside the context directory.
+ errOutsideContextDir = errors.New("is outside the context directory")
+)
+
+// PathType is a terminate type for path comparisons.
+type PathType int
+
+// Separator gets the string value of the separator.
+//
+// TODO: rename to Terminator if we keep this
+// TODO: we should probably refactor so we never need to use absolute paths at all
+// this could be accomplished if we could for ExternalPathToRelPath on buckets
+func (t PathType) Separator() string {
+ switch t {
+ case Relative:
+ return "."
+ case Absolute:
+ return "/"
+ default:
+ return ""
+ }
+}
+
+// Error is a path error.
+type Error struct {
+ Path string
+ Err error
+}
+
+// NewError returns a new Error.
+func NewError(path string, err error) *Error {
+ return &Error{
+ Path: path,
+ Err: err,
+ }
+}
+
+// Error implements error.
+func (e *Error) Error() string {
+ errString := ""
+ if e.Err != nil {
+ errString = e.Err.Error()
+ }
+ if errString == "" {
+ errString = "error"
+ }
+ return e.Path + ": " + errString
+}
+
+// Unwrap implements errors.Unwrap for Error.
+func (e *Error) Unwrap() error {
+ if e == nil {
+ return nil
+ }
+ return e.Err
+}
+
+// Normalize normalizes the given path.
+//
+// This calls filepath.Clean and filepath.ToSlash on the path.
+// If the path is "" or ".", this returns ".".
+func Normalize(path string) string {
+ return filepath.ToSlash(filepath.Clean(path))
+}
+
+// NormalizeAndAbsolute normalizes the path and makes it absolute.
+func NormalizeAndAbsolute(path string) (string, error) {
+ absPath, err := filepath.Abs(Unnormalize(path))
+ if err != nil {
+ return "", err
+ }
+ return Normalize(absPath), nil
+}
+
+// NormalizeAndTransformForPathType calls NormalizeAndValidate for relative
+// paths, and NormalizeAndAbsolute for absolute paths.
+func NormalizeAndTransformForPathType(path string, pathType PathType) (string, error) {
+ switch pathType {
+ case Relative:
+ return NormalizeAndValidate(path)
+ case Absolute:
+ return NormalizeAndAbsolute(path)
+ default:
+ return "", fmt.Errorf("unknown PathType: %v", pathType)
+ }
+}
+
+// Unnormalize unnormalizes the given path.
+//
+// This calls filepath.FromSlash on the path.
+// If the path is "", this returns "".
+func Unnormalize(path string) string {
+ return filepath.FromSlash(path)
+}
+
+// Base is equivalent to filepath.Base.
+//
+// Normalizes before returning.
+func Base(path string) string {
+ return Normalize(filepath.Base(Unnormalize(path)))
+}
+
+// Dir is equivalent to filepath.Dir.
+//
+// Normalizes before returning.
+func Dir(path string) string {
+ return Normalize(filepath.Dir(Unnormalize(path)))
+}
+
+// Ext is equivalent to filepath.Ext.
+//
+// Can return empty string.
+func Ext(path string) string {
+ return filepath.Ext(Unnormalize(path))
+}
+
+// Join is equivalent to filepath.Join.
+//
+// Empty strings are ignored,
+// Can return empty string.
+//
+// Normalizes before returning otherwise.
+func Join(paths ...string) string {
+ unnormalized := make([]string, len(paths))
+ for i, path := range paths {
+ unnormalized[i] = Unnormalize(path)
+ }
+ value := filepath.Join(unnormalized...)
+ if value == "" {
+ return ""
+ }
+ return Normalize(value)
+}
+
+// Rel is equivalent to filepath.Rel.
+//
+// Can return empty string, especially on error.
+//
+// Normalizes before returning otherwise.
+func Rel(basepath string, targpath string) (string, error) {
+ path, err := filepath.Rel(Unnormalize(basepath), Unnormalize(targpath))
+ if path == "" {
+ return "", err
+ }
+ return Normalize(path), err
+}
+
+// ByDir maps the paths into a map from directory via Dir to the original paths.
+//
+// The paths for each value slice will be sorted.
+//
+// The path is expected to be normalized.
+func ByDir(paths ...string) map[string][]string {
+ m := make(map[string][]string)
+ for _, path := range paths {
+ path = Normalize(path)
+ dir := filepath.Dir(path)
+ m[dir] = append(m[dir], path)
+ }
+ for _, dirPaths := range m {
+ sort.Strings(dirPaths)
+ }
+ return m
+}
+
+// ChunkByDir splits paths into chunks of around the suggestedChunkSize while keeping
+// directory affinity, i.e. paths in the same directory will be in the same chunk.
+//
+// Paths are expected to be normalized.
+// If paths is nil or empty, returns empty.
+// If suggestedChunkSize is <=0, returns [][]string{paths}.
+func ChunkByDir(paths []string, suggestedChunkSize int) [][]string {
+ var chunks [][]string
+ if len(paths) == 0 {
+ return chunks
+ }
+ if suggestedChunkSize <= 0 {
+ return [][]string{paths}
+ }
+
+ dirToPaths := ByDir(paths...)
+ // Get the keys and sort them to keep the output of this stable
+ dirs := make([]string, 0, len(dirToPaths))
+ for dir := range dirToPaths {
+ dirs = append(dirs, dir)
+ }
+ sort.Strings(dirs)
+ // Create a slice of the per-directory path slices
+ pathsByDir := make([][]string, 0, len(dirToPaths))
+ for _, dir := range dirs {
+ pathsByDir = append(pathsByDir, dirToPaths[dir])
+ }
+ // Sort the per-directory path slices by length, from greatest to smallest
+ // We do greatest to smallest because we pop the greatest off first, and
+ // This will approximate keeping things in alphabetical order given that
+ // pathsByDir is in alphabetical order of directories.
+ sort.SliceStable(
+ pathsByDir,
+ func(i int, j int) bool {
+ return len(pathsByDir[i]) > len(pathsByDir[j])
+ },
+ )
+
+ for len(pathsByDir) > 0 {
+ // Take the largest set of paths and remove from pathsByDir
+ chunk := pathsByDir[0]
+ pathsByDir = pathsByDir[1:]
+ // While our current chunk is less than the suggestedChunkSize, take the smallest
+ // set of paths and append them to the chunk, and then remove them from pathsByDir
+ //
+ // This will mean that sometimes we have chunks larger than suggestedChunkSize, but
+ // this is best effort. We could likely use more-complicated algorithms here that
+ // smartly combine per-directory path sets that minimize the distance from
+ // suggestedChunkSize, as there are adversary cases to this algorithm, but we
+ // are not diving into that at the moment unless there is a need.
+ for len(chunk) < suggestedChunkSize && len(pathsByDir) > 0 {
+ chunk = append(chunk, pathsByDir[len(pathsByDir)-1]...)
+ pathsByDir = pathsByDir[:len(pathsByDir)-1]
+ }
+ // Append the chunk to the list of chunks
+ chunks = append(chunks, chunk)
+ }
+
+ return chunks
+}
+
+// ContainsPath returns true if the dirPath contains the path.
+//
+// The path and value are expected to be normalized and validated if Relative is used.
+// The path and value are expected to be normalized and absolute if Absolute is used.
+//
+// For a given dirPath:
+//
+// - If path == PathType, dirPath does not contain the path.
+// - If dirPath == PathType, the dirPath contains the path.
+// - If dirPath is a directory that contains path, this returns true.
+func ContainsPath(dirPath string, path string, pathType PathType) bool {
+ if dirPath == path {
+ return false
+ }
+ return EqualsOrContainsPath(dirPath, Dir(path), pathType)
+}
+
+// MapAllEqualOrContainingPaths returns the matching paths in the map in a sorted slice.
+//
+// The path and keys in m are expected to be normalized and validated if Relative is used.
+// The path and keys in m are expected to be normalized and absolute if Absolute is used.
+//
+// If the map is empty, returns nil.
+func MapAllEqualOrContainingPaths(m map[string]struct{}, path string, pathType PathType) []string {
+ if len(m) == 0 {
+ return nil
+ }
+ return stringutil.MapToSortedSlice(MapAllEqualOrContainingPathMap(m, path, pathType))
+}
+
+// StripComponents strips the specified number of components.
+//
+// Path expected to be normalized.
+// Returns false if the path does not have more than the specified number of components.
+func StripComponents(path string, countUint32 uint32) (string, bool) {
+ count := int(countUint32)
+ if count == 0 {
+ return path, true
+ }
+ components := Components(path)
+ if len(components) <= count {
+ return "", false
+ }
+ return Join(components[count:]...), true
+}
+
+// ValidatePathComponent validates that the string is a valid
+// component of a path, e.g. it can be Joined and form a valid path.
+func ValidatePathComponent(component string) error {
+ if component == "" {
+ return errors.New("path component must not be empty")
+ }
+ if strings.ContainsRune(component, '/') {
+ return errors.New(`path component must not contain "/" `)
+ }
+ if strings.Contains(component, "..") {
+ return errors.New(`path component must not contain ".."`)
+ }
+ if url.PathEscape(component) != component {
+ return fmt.Errorf(
+ "path component must match its URL escaped version: %q did not match %q",
+ component,
+ url.PathEscape(component),
+ )
+ }
+ return nil
+}
+
+// ValidatePathComponents validates that all the strings are valid
+// components of a path, e.g. they can be Joined and form a valid path.
+func ValidatePathComponents(components ...string) error {
+ for _, component := range components {
+ if err := ValidatePathComponent(component); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// ValidatePathsNormalizedValidatedUnique validates the file or diretory paths are normalized
+// and validated, and not duplicated.
+func ValidatePathsNormalizedValidatedUnique(paths []string) error {
+ pathMap := make(map[string]struct{}, len(paths))
+ for _, path := range paths {
+ if path == "" {
+ return errors.New("path is empty")
+ }
+ normalized, err := NormalizeAndValidate(path)
+ if err != nil {
+ return fmt.Errorf("path had normalization error: %w", err)
+ }
+ if path != normalized {
+ return fmt.Errorf("path %s was not normalized to %s", path, normalized)
+ }
+ if _, ok := pathMap[path]; ok {
+ return fmt.Errorf("duplicate path: %s", path)
+ }
+ pathMap[path] = struct{}{}
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/normalpath/normalpath_unix.go b/vendor/github.com/bufbuild/buf/private/pkg/normalpath/normalpath_unix.go
new file mode 100644
index 000000000..f2ad7db72
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/normalpath/normalpath_unix.go
@@ -0,0 +1,161 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Matching the unix-like build tags in the Golang standard library based on the dependency
+// on "path/filepath", i.e. https://cs.opensource.google/go/go/+/refs/tags/go1.17:src/path/filepath/path_unix.go;l=5-6
+
+//go:build aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+
+package normalpath
+
+import (
+ "path/filepath"
+ "strings"
+)
+
+// NormalizeAndValidate normalizes and validates the given path.
+//
+// This calls Normalize on the path.
+// Returns Error if the path is not relative or jumps context.
+// This can be used to validate that paths are valid to use with Buckets.
+// The error message is safe to pass to users.
+func NormalizeAndValidate(path string) (string, error) {
+ normalizedPath := Normalize(path)
+ if filepath.IsAbs(normalizedPath) {
+ return "", NewError(path, errNotRelative)
+ }
+ // https://github.com/bufbuild/buf/issues/51
+ if strings.HasPrefix(normalizedPath, normalizedRelPathJumpContextPrefix) {
+ return "", NewError(path, errOutsideContextDir)
+ }
+ return normalizedPath, nil
+}
+
+// EqualsOrContainsPath returns true if the value is equal to or contains the path.
+//
+// The path and value are expected to be normalized and validated if Relative is used.
+// The path and value are expected to be normalized and absolute if Absolute is used.
+func EqualsOrContainsPath(value string, path string, pathType PathType) bool {
+ pathRoot := stringOSPathSeparator
+ if pathType == Relative {
+ pathRoot = "."
+ }
+
+ if value == pathRoot {
+ return true
+ }
+
+ // Walk up the path and compare at each directory level until there is a
+ // match or the path reaches its root (either `/` or `.`).
+ for curPath := path; curPath != pathRoot; curPath = Dir(curPath) {
+ if value == curPath {
+ return true
+ }
+ }
+ return false
+}
+
+// MapHasEqualOrContainingPath returns true if the path matches any file or directory in the map.
+//
+// The path and keys in m are expected to be normalized and validated if Relative is used.
+// The path and keys in m are expected to be normalized and absolute if Absolute is used.
+//
+// If the map is empty, returns false.
+func MapHasEqualOrContainingPath(m map[string]struct{}, path string, pathType PathType) bool {
+ if len(m) == 0 {
+ return false
+ }
+
+ pathRoot := stringOSPathSeparator
+ if pathType == Relative {
+ pathRoot = "."
+ }
+
+ if _, ok := m[pathRoot]; ok {
+ return true
+ }
+ for curPath := path; curPath != pathRoot; curPath = Dir(curPath) {
+ if _, ok := m[curPath]; ok {
+ return true
+ }
+ }
+ return false
+}
+
+// MapAllEqualOrContainingPathMap returns the paths in m that are equal to, or contain
+// path, in a new map.
+//
+// The path and keys in m are expected to be normalized and validated if Relative is used.
+// The path and keys in m are expected to be normalized and absolute if Absolute is used.
+//
+// If the map is empty, returns nil.
+func MapAllEqualOrContainingPathMap(m map[string]struct{}, path string, pathType PathType) map[string]struct{} {
+ if len(m) == 0 {
+ return nil
+ }
+
+ pathRoot := stringOSPathSeparator
+ if pathType == Relative {
+ pathRoot = "."
+ }
+
+ n := make(map[string]struct{})
+ if _, ok := m[pathRoot]; ok {
+ // also covers if path == separator.
+ n[pathRoot] = struct{}{}
+ }
+ for potentialMatch := range m {
+ for curPath := path; curPath != pathRoot; curPath = Dir(curPath) {
+ if potentialMatch == curPath {
+ n[potentialMatch] = struct{}{}
+ break
+ }
+ }
+ }
+ return n
+}
+
+// Components splits the path into it's components.
+//
+// This calls filepath.Split repeatedly.
+//
+// The path is expected to be normalized.
+func Components(path string) []string {
+ var components []string
+ dir := Unnormalize(path)
+ for {
+ var file string
+ dir, file = filepath.Split(dir)
+ // puts in reverse
+ components = append(components, file)
+ if dir == stringOSPathSeparator {
+ components = append(components, dir)
+ break
+ }
+ dir = strings.TrimSuffix(dir, stringOSPathSeparator)
+ if dir == "" {
+ break
+ }
+ }
+ // https://github.com/golang/go/wiki/SliceTricks#reversing
+ for i := len(components)/2 - 1; i >= 0; i-- {
+ opp := len(components) - 1 - i
+ components[i], components[opp] = components[opp], components[i]
+ }
+ for i, component := range components {
+ components[i] = Normalize(component)
+ }
+ return components
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/normalpath/normalpath_windows.go b/vendor/github.com/bufbuild/buf/private/pkg/normalpath/normalpath_windows.go
new file mode 100644
index 000000000..7a304e253
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/normalpath/normalpath_windows.go
@@ -0,0 +1,203 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 normalpath
+
+import (
+ "os"
+ "path/filepath"
+ "strings"
+)
+
+// NormalizeAndValidate normalizes and validates the given path.
+//
+// This calls Normalize on the path.
+// Returns Error if the path is not relative or jumps context.
+// This can be used to validate that paths are valid to use with Buckets.
+// The error message is safe to pass to users.
+func NormalizeAndValidate(path string) (string, error) {
+ normalizedPath := Normalize(path)
+ if filepath.IsAbs(normalizedPath) || (len(normalizedPath) > 0 && normalizedPath[0] == '/') {
+ // the stdlib implementation of `IsAbs` assumes that a volume name is required for a path to
+ // be absolute, however Windows treats a `/` (normalized) rooted path as absolute _within_ the current volume.
+ // In the context of validating that a path is _not_ relative, we need to reject a path that begins
+ // with `/`.
+ return "", NewError(path, errNotRelative)
+ }
+ // https://github.com/bufbuild/buf/issues/51
+ if strings.HasPrefix(normalizedPath, normalizedRelPathJumpContextPrefix) {
+ return "", NewError(path, errOutsideContextDir)
+ }
+ return normalizedPath, nil
+}
+
+// EqualsOrContainsPath returns true if the value is equal to or contains the path.
+// path is compared at each directory level to value for equivalency under simple unicode
+// codepoint folding. This means it is context and locale independent. This matching
+// will not support the few rare cases, primarily in Turkish and Lithuanian, noted
+// in the caseless matching section of Unicode 13.0 https://www.unicode.org/versions/Unicode13.0.0/ch05.pdf#page=47.
+//
+// The path and value are expected to be normalized and validated if Relative is used.
+// The path and value are expected to be normalized and absolute if Absolute is used.
+func EqualsOrContainsPath(value string, path string, pathType PathType) bool {
+ pathRoot := "."
+ if pathType == Absolute {
+ // To check an absolute path on Windows we must first determine
+ // the root volume. This can appear in one of 3 forms (examples are after Normalize())
+ // c.f. https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#fully-qualified-vs-relative-paths
+ // * A disk designator: `C:/`
+ // * A UNC Path: `//servername/share/`
+ // c.f. https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dfsc/149a3039-98ce-491a-9268-2f5ddef08192
+ // * A "current volume absolute path" `/`
+ // This refers to the root of the current volume
+ //
+ // We do not support paths with string parsing disabled such as
+ // `\\?\path`
+ volumeName := filepath.VolumeName(path)
+
+ // If value has a disk designator or is a UNC path, we'll get a volume name with no trailing separator.
+ // However, filepath.Dir() will return a path component with a trailing separator so we need to add one.
+ // If value is a current volume absolute path, volumeName will be "".
+ // Therefore, we unconditionally add `/` to the volume name to get to the root path component
+ // at which we should stop iterating
+ pathRoot = volumeName + "/"
+ }
+
+ if pathRoot == value {
+ return true
+ }
+
+ // Walk up the path and compare at each directory level until there is a
+ // match or the path reaches its root (either `/` or `.`).
+ for curPath := path; !strings.EqualFold(curPath, pathRoot); curPath = Dir(curPath) {
+ if strings.EqualFold(value, curPath) {
+ return true
+ }
+ }
+ return false
+}
+
+// MapHasEqualOrContainingPath returns true if the path matches any file or directory in the map.
+//
+// The path and keys in m are expected to be normalized and validated if Relative is used.
+// The path and keys in m are expected to be normalized and absolute if Absolute is used.
+//
+// If the map is empty, returns false.
+func MapHasEqualOrContainingPath(m map[string]struct{}, path string, pathType PathType) bool {
+ if len(m) == 0 {
+ return false
+ }
+
+ for value := range m {
+ if EqualsOrContainsPath(value, path, pathType) {
+ return true
+ }
+ }
+
+ return false
+}
+
+// MapAllEqualOrContainingPathMap returns the paths in m that are equal to, or contain
+// path, in a new map.
+//
+// The path and keys in m are expected to be normalized and validated if Relative is used.
+// The path and keys in m are expected to be normalized and absolute if Absolute is used.
+//
+// If the map is empty, returns nil.
+func MapAllEqualOrContainingPathMap(m map[string]struct{}, path string, pathType PathType) map[string]struct{} {
+ if len(m) == 0 {
+ return nil
+ }
+
+ n := make(map[string]struct{})
+
+ for potentialMatch := range m {
+ if EqualsOrContainsPath(potentialMatch, path, pathType) {
+ n[potentialMatch] = struct{}{}
+ }
+ }
+ return n
+}
+
+// Components splits the path into its components.
+//
+// This calls filepath.Split repeatedly.
+//
+// The path is expected to be normalized.
+func Components(path string) []string {
+ var components []string
+
+ if len(path) < 1 {
+ return []string{"."}
+ }
+
+ dir := Unnormalize(path)
+
+ volumeComponent := filepath.VolumeName(dir)
+ if len(volumeComponent) > 0 {
+ // On Windows the volume of an absolute path could be one of the following 3 forms
+ // c.f. https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file?redirectedfrom=MSDN#fully-qualified-vs-relative-paths
+ // * A disk designator: `C:\`
+ // * A UNC Path: `\\servername\share\`
+ // c.f. https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dfsc/149a3039-98ce-491a-9268-2f5ddef08192
+ // * A "current volume absolute path" `\`
+ // This refers to the root of the current volume
+ //
+ // We do not support paths with string parsing disabled such as
+ // `\\?\path`
+ //
+ // If we did extract a volume name, we need to add a path separator to turn it into
+ // a path component. Volume Names without path separators have an implied "current directory"
+ // when performing a join operation, or using them as a path directly, which is not the
+ // intention of `Split` so we ensure they always mean "the root of this volume".
+ volumeComponent = volumeComponent + stringOSPathSeparator
+ }
+ if len(volumeComponent) < 1 && dir[0] == os.PathSeparator {
+ // If we didn't extract a volume name then the path is either
+ // absolute and starts with an os.PathSeparator (it must be exactly 1
+ // otherwise its a UNC path and we would have found a volume above) or it is relative.
+ // If it is absolute, we set the expected volume component to os.PathSeparator.
+ // otherwise we leave it as an empty string.
+ volumeComponent = stringOSPathSeparator
+ }
+ for {
+ var file string
+ dir, file = filepath.Split(dir)
+ // puts in reverse
+ components = append(components, file)
+
+ if dir == volumeComponent {
+ if volumeComponent != "" {
+ components = append(components, dir)
+ }
+ break
+ }
+
+ dir = strings.TrimSuffix(dir, stringOSPathSeparator)
+ }
+
+ // https://github.com/golang/go/wiki/SliceTricks#reversing
+ for i := len(components)/2 - 1; i >= 0; i-- {
+ opp := len(components) - 1 - i
+ components[i], components[opp] = components[opp], components[i]
+ }
+ for i, component := range components {
+ components[i] = Normalize(component)
+ }
+
+ return components
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/normalpath/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/normalpath/usage.gen.go
new file mode 100644
index 000000000..fa73880e3
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/normalpath/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package normalpath
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/observability/observability.go b/vendor/github.com/bufbuild/buf/private/pkg/observability/observability.go
new file mode 100644
index 000000000..634ce0afa
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/observability/observability.go
@@ -0,0 +1,169 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 observability
+
+import (
+ "io"
+ "net/http"
+
+ "github.com/bufbuild/buf/private/pkg/ioextended"
+ "go.opencensus.io/plugin/ochttp"
+ "go.opencensus.io/stats/view"
+ "go.opencensus.io/tag"
+ "go.opencensus.io/trace"
+ otelmetric "go.opentelemetry.io/otel/metric"
+ oteltrace "go.opentelemetry.io/otel/trace"
+)
+
+// TraceExportCloser describes the interface used to export OpenCensus traces
+// and cleaning of resources.
+type TraceExportCloser interface {
+ trace.Exporter
+ io.Closer
+}
+
+// ViewExportCloser describes the interface used to export OpenCensus views
+// and cleaning of resources.
+type ViewExportCloser interface {
+ view.Exporter
+ io.Closer
+}
+
+// TraceViewExportCloser implements both OpenCensus view and trace exporting.
+type TraceViewExportCloser interface {
+ ViewExportCloser
+ TraceExportCloser
+}
+
+type TracerProviderCloser interface {
+ oteltrace.TracerProvider
+ io.Closer
+}
+
+type MeterProviderCloser interface {
+ otelmetric.MeterProvider
+ io.Closer
+}
+
+// Start initializes tracing.
+//
+// Tracing is a global function due to how go.opencensus.io is written.
+// The returned io.Closer needs to be called at the completion of the program.
+func Start(options ...StartOption) io.Closer {
+ startOptions := newStartOptions()
+ for _, option := range options {
+ option(startOptions)
+ }
+ if len(startOptions.traceExportClosers) == 0 && len(startOptions.traceViewExportClosers) == 0 {
+ return ioextended.NopCloser
+ }
+ trace.ApplyConfig(
+ trace.Config{
+ DefaultSampler: trace.AlwaysSample(),
+ },
+ )
+ var closers []io.Closer
+ for _, traceExportCloser := range startOptions.traceExportClosers {
+ traceExportCloser := traceExportCloser
+ trace.RegisterExporter(traceExportCloser)
+ closers = append(closers, traceExportCloser)
+ }
+ for _, viewExportCloser := range startOptions.viewExportClosers {
+ viewExportCloser := viewExportCloser
+ view.RegisterExporter(viewExportCloser)
+ closers = append(closers, viewExportCloser)
+ }
+ for _, traceViewExportCloser := range startOptions.traceViewExportClosers {
+ traceViewExportCloser := traceViewExportCloser
+ trace.RegisterExporter(traceViewExportCloser)
+ view.RegisterExporter(traceViewExportCloser)
+ closers = append(closers, traceViewExportCloser)
+ }
+ for _, tracerProviderCloser := range startOptions.tracerProviderClosers {
+ tracerProviderCloser := tracerProviderCloser
+ closers = append(closers, tracerProviderCloser)
+ }
+ for _, meterProviderCloser := range startOptions.meterProviderClosers {
+ meterProviderCloser := meterProviderCloser
+ closers = append(closers, meterProviderCloser)
+ }
+ return ioextended.ChainCloser(closers...)
+}
+
+// StartOption is an option for start.
+type StartOption func(*startOptions)
+
+// StartWithTraceExportCloser returns a new StartOption that adds the given TraceExportCloser.
+func StartWithTraceExportCloser(traceExportCloser TraceExportCloser) StartOption {
+ return func(startOptions *startOptions) {
+ startOptions.traceExportClosers = append(startOptions.traceExportClosers, traceExportCloser)
+ }
+}
+
+// StartWithViewExportCloser returns a new StartOption that adds the given TraceExportCloser.
+func StartWithViewExportCloser(viewExportCloser ViewExportCloser) StartOption {
+ return func(startOptions *startOptions) {
+ startOptions.viewExportClosers = append(startOptions.viewExportClosers, viewExportCloser)
+ }
+}
+
+// StartWithTraceViewExportCloser returns a new StartOption that adds the given TraceViewExportCloser.
+func StartWithTraceViewExportCloser(traceViewExportCloser TraceViewExportCloser) StartOption {
+ return func(startOptions *startOptions) {
+ startOptions.traceViewExportClosers = append(startOptions.traceViewExportClosers, traceViewExportCloser)
+ }
+}
+
+func StartWithTracerProviderCloser(tracerProviderCloser TracerProviderCloser) StartOption {
+ return func(startOptions *startOptions) {
+ startOptions.tracerProviderClosers = append(startOptions.tracerProviderClosers, tracerProviderCloser)
+ }
+}
+
+func StartWithMeterProviderCloser(meterProviderCloser MeterProviderCloser) StartOption {
+ return func(startOptions *startOptions) {
+ startOptions.meterProviderClosers = append(startOptions.meterProviderClosers, meterProviderCloser)
+ }
+}
+
+// NewHTTPTransport returns a HTTP transport instrumented with OpenCensus traces and metrics.
+func NewHTTPTransport(base http.RoundTripper, tags ...tag.Mutator) http.RoundTripper {
+ return &wrappedRoundTripper{
+ Base: &ochttp.Transport{
+ NewClientTrace: ochttp.NewSpanAnnotatingClientTrace,
+ Base: base,
+ },
+ Tags: tags,
+ }
+}
+
+// NewHTTPClient returns a HTTP client instrumented with OpenCensus traces and metrics.
+func NewHTTPClient() *http.Client {
+ return &http.Client{
+ Transport: NewHTTPTransport(http.DefaultTransport),
+ }
+}
+
+type startOptions struct {
+ traceExportClosers []TraceExportCloser
+ viewExportClosers []ViewExportCloser
+ traceViewExportClosers []TraceViewExportCloser
+ tracerProviderClosers []TracerProviderCloser
+ meterProviderClosers []MeterProviderCloser
+}
+
+func newStartOptions() *startOptions {
+ return &startOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/observability/observabilityzap/observabilityzap.go b/vendor/github.com/bufbuild/buf/private/pkg/observability/observabilityzap/observabilityzap.go
new file mode 100644
index 000000000..2a25a3eef
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/observability/observabilityzap/observabilityzap.go
@@ -0,0 +1,25 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 observabilityzap
+
+import (
+ "github.com/bufbuild/buf/private/pkg/observability"
+ "go.uber.org/zap"
+)
+
+// NewTraceExportCloser returns a new TraceExportCloser with a zap backend.
+func NewTraceExportCloser(logger *zap.Logger) observability.TraceExportCloser {
+ return newTraceExportCloser(logger)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/observability/observabilityzap/trace_export_closer.go b/vendor/github.com/bufbuild/buf/private/pkg/observability/observabilityzap/trace_export_closer.go
new file mode 100644
index 000000000..3228cf2bb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/observability/observabilityzap/trace_export_closer.go
@@ -0,0 +1,50 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 observabilityzap
+
+import (
+ "go.opencensus.io/trace"
+ "go.uber.org/zap"
+)
+
+type traceExportCloser struct {
+ logger *zap.Logger
+}
+
+func newTraceExportCloser(logger *zap.Logger) *traceExportCloser {
+ return &traceExportCloser{
+ logger: logger,
+ }
+}
+
+// ExportSpan implements the opencensus trace.Exporter interface.
+func (t *traceExportCloser) ExportSpan(spanData *trace.SpanData) {
+ if spanData == nil || !spanData.IsSampled() {
+ return
+ }
+ if checkedEntry := t.logger.Check(zap.DebugLevel, spanData.Name); checkedEntry != nil {
+ fields := []zap.Field{
+ zap.Duration("duration", spanData.EndTime.Sub(spanData.StartTime)),
+ }
+ for key, value := range spanData.Attributes {
+ fields = append(fields, zap.Any(key, value))
+ }
+ checkedEntry.Write(fields...)
+ }
+}
+
+func (t *traceExportCloser) Close() error {
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/observability/observabilityzap/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/observability/observabilityzap/usage.gen.go
new file mode 100644
index 000000000..f076ebbfe
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/observability/observabilityzap/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package observabilityzap
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/observability/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/observability/usage.gen.go
new file mode 100644
index 000000000..ec9c5d4bb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/observability/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package observability
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/observability/wrapped_round_tripper.go b/vendor/github.com/bufbuild/buf/private/pkg/observability/wrapped_round_tripper.go
new file mode 100644
index 000000000..ac54c33e1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/observability/wrapped_round_tripper.go
@@ -0,0 +1,35 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 observability
+
+import (
+ "net/http"
+
+ "go.opencensus.io/tag"
+)
+
+type wrappedRoundTripper struct {
+ Base http.RoundTripper
+ Tags []tag.Mutator
+}
+
+func (w *wrappedRoundTripper) RoundTrip(req *http.Request) (*http.Response, error) {
+ ctx, err := tag.New(req.Context(), w.Tags...)
+ if err != nil {
+ return nil, err
+ }
+ wrappedRequest := req.WithContext(ctx)
+ return w.Base.RoundTrip(wrappedRequest)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/osextended/osextended.go b/vendor/github.com/bufbuild/buf/private/pkg/osextended/osextended.go
new file mode 100644
index 000000000..9eb7ee02e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/osextended/osextended.go
@@ -0,0 +1,46 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 osextended provides os utilities.
+package osextended
+
+import (
+ "errors"
+ "os"
+ "sync"
+)
+
+var (
+ workDirPath string
+ workDirPathErr error
+ once sync.Once
+
+ errOSGetwdEmpty = errors.New("os.Getwd returned empty and no error")
+)
+
+// Getwd replaces os.Getwd and caches the result.
+func Getwd() (string, error) {
+ once.Do(func() {
+ workDirPath, workDirPathErr = getwdUncached()
+ })
+ return workDirPath, workDirPathErr
+}
+
+func getwdUncached() (string, error) {
+ currentWorkDirPath, currentWorkDirPathErr := os.Getwd()
+ if currentWorkDirPath == "" && currentWorkDirPathErr == nil {
+ return "", errOSGetwdEmpty
+ }
+ return currentWorkDirPath, currentWorkDirPathErr
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/osextended/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/osextended/usage.gen.go
new file mode 100644
index 000000000..442b87cf0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/osextended/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package osextended
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protodescriptor/protodescriptor.go b/vendor/github.com/bufbuild/buf/private/pkg/protodescriptor/protodescriptor.go
new file mode 100644
index 000000000..f1dfb6a5c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protodescriptor/protodescriptor.go
@@ -0,0 +1,221 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protodescriptor
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+ "google.golang.org/protobuf/types/pluginpb"
+)
+
+// FileDescriptor is an interface that matches the methods on a *descriptorpb.FileDescriptorProto.
+//
+// Note that a FileDescriptor is not necessarily validated, unlike other interfaces in buf.
+type FileDescriptor interface {
+ GetName() string
+ GetPackage() string
+ GetDependency() []string
+ GetPublicDependency() []int32
+ GetWeakDependency() []int32
+ GetMessageType() []*descriptorpb.DescriptorProto
+ GetEnumType() []*descriptorpb.EnumDescriptorProto
+ GetService() []*descriptorpb.ServiceDescriptorProto
+ GetExtension() []*descriptorpb.FieldDescriptorProto
+ GetOptions() *descriptorpb.FileOptions
+ GetSourceCodeInfo() *descriptorpb.SourceCodeInfo
+ GetSyntax() string
+}
+
+// FileDescriptorsForFileDescriptorProtos is a convenience function since Go does not have generics.
+func FileDescriptorsForFileDescriptorProtos(fileDescriptorProtos ...*descriptorpb.FileDescriptorProto) []FileDescriptor {
+ fileDescriptors := make([]FileDescriptor, len(fileDescriptorProtos))
+ for i, fileDescriptorProto := range fileDescriptorProtos {
+ fileDescriptors[i] = fileDescriptorProto
+ }
+ return fileDescriptors
+}
+
+// FileDescriptorsForFileDescriptorSet is a convenience function since Go does not have generics.
+func FileDescriptorsForFileDescriptorSet(fileDescriptorSet *descriptorpb.FileDescriptorSet) []FileDescriptor {
+ return FileDescriptorsForFileDescriptorProtos(fileDescriptorSet.File...)
+}
+
+// FileDescriptorProtoForFileDescriptor creates a new *descriptorpb.FileDescriptorProto for the fileDescriptor.
+//
+// If the FileDescriptor is already a *descriptorpb.FileDescriptorProto, this returns the input value.
+//
+// Note that this will not round trip exactly. If a *descriptorpb.FileDescriptorProto is turned into another
+// object that is a FileDescriptor, and then passed to this function, the return value will not be equal
+// if name, package, or syntax are set but empty. Instead, the return value will have these values unset.
+// For our/most purposes, this is fine.
+func FileDescriptorProtoForFileDescriptor(fileDescriptor FileDescriptor) *descriptorpb.FileDescriptorProto {
+ if fileDescriptorProto, ok := fileDescriptor.(*descriptorpb.FileDescriptorProto); ok {
+ return fileDescriptorProto
+ }
+ fileDescriptorProto := &descriptorpb.FileDescriptorProto{
+ Dependency: fileDescriptor.GetDependency(),
+ PublicDependency: fileDescriptor.GetPublicDependency(),
+ WeakDependency: fileDescriptor.GetWeakDependency(),
+ MessageType: fileDescriptor.GetMessageType(),
+ EnumType: fileDescriptor.GetEnumType(),
+ Service: fileDescriptor.GetService(),
+ Extension: fileDescriptor.GetExtension(),
+ Options: fileDescriptor.GetOptions(),
+ SourceCodeInfo: fileDescriptor.GetSourceCodeInfo(),
+ }
+ // Note that if a *descriptorpb.FileDescriptorProto has a set but empty name, package,
+ // or syntax, this won't be an exact round trip. But for our use, we say this is fine.
+ if name := fileDescriptor.GetName(); name != "" {
+ fileDescriptorProto.Name = proto.String(name)
+ }
+ if pkg := fileDescriptor.GetPackage(); pkg != "" {
+ fileDescriptorProto.Package = proto.String(pkg)
+ }
+ if syntax := fileDescriptor.GetSyntax(); syntax != "" {
+ fileDescriptorProto.Syntax = proto.String(syntax)
+ }
+ return fileDescriptorProto
+}
+
+// FileDescriptorProtosForFileDescriptors is a convenience function since Go does not have generics.
+//
+// Note that this will not round trip exactly. If a *descriptorpb.FileDescriptorProto is turned into another
+// object that is a FileDescriptor, and then passed to this function, the return value will not be equal
+// if name, package, or syntax are set but empty. Instead, the return value will have these values unset.
+// For our/most purposes, this is fine.
+func FileDescriptorProtosForFileDescriptors(fileDescriptors ...FileDescriptor) []*descriptorpb.FileDescriptorProto {
+ fileDescriptorProtos := make([]*descriptorpb.FileDescriptorProto, len(fileDescriptors))
+ for i, fileDescriptor := range fileDescriptors {
+ fileDescriptorProtos[i] = FileDescriptorProtoForFileDescriptor(fileDescriptor)
+ }
+ return fileDescriptorProtos
+}
+
+// FileDescriptorSetForFileDescriptors returns a new *descriptorpb.FileDescriptorSet for the given FileDescriptors.
+//
+// Note that this will not round trip exactly. If a *descriptorpb.FileDescriptorProto is turned into another
+// object that is a FileDescriptor, and then passed to this function, the return value will not be equal
+// if name, package, or syntax are set but empty. Instead, the return value will have these values unset.
+// For our/most purposes, this is fine.
+func FileDescriptorSetForFileDescriptors(fileDescriptors ...FileDescriptor) *descriptorpb.FileDescriptorSet {
+ return &descriptorpb.FileDescriptorSet{
+ File: FileDescriptorProtosForFileDescriptors(fileDescriptors...),
+ }
+}
+
+// ValidateFileDescriptor validates the FileDescriptor.
+//
+// A *descriptorpb.FileDescriptorProto can be passed to this.
+func ValidateFileDescriptor(fileDescriptor FileDescriptor) error {
+ if fileDescriptor == nil {
+ return errors.New("nil FileDescriptor")
+ }
+ if err := ValidateProtoPath("FileDescriptor.Name", fileDescriptor.GetName()); err != nil {
+ return err
+ }
+ if err := ValidateProtoPaths("FileDescriptor.Dependency", fileDescriptor.GetDependency()); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ValidateCodeGeneratorRequest validates the CodeGeneratorRequest.
+func ValidateCodeGeneratorRequest(request *pluginpb.CodeGeneratorRequest) error {
+ if err := ValidateCodeGeneratorRequestExceptFileDescriptorProtos(request); err != nil {
+ return err
+ }
+ for _, fileDescriptorProto := range request.ProtoFile {
+ if err := ValidateFileDescriptor(fileDescriptorProto); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// ValidateCodeGeneratorRequestExceptFileDescriptorProtos validates the CodeGeneratorRequest
+// minus the FileDescriptorProtos.
+func ValidateCodeGeneratorRequestExceptFileDescriptorProtos(request *pluginpb.CodeGeneratorRequest) error {
+ if request == nil {
+ return errors.New("nil CodeGeneratorRequest")
+ }
+ if len(request.ProtoFile) == 0 {
+ return errors.New("empty CodeGeneratorRequest.ProtoFile")
+ }
+ if len(request.FileToGenerate) == 0 {
+ return errors.New("empty CodeGeneratorRequest.FileToGenerate")
+ }
+ if err := ValidateProtoPaths("CodeGeneratorRequest.FileToGenerate", request.FileToGenerate); err != nil {
+ return err
+ }
+ return nil
+}
+
+// ValidateCodeGeneratorResponse validates the CodeGeneratorResponse.
+//
+// This validates that names are set.
+//
+// It is actually OK per the plugin.proto specs to not have the name set, and
+// if this is empty, the content should be combined with the previous file.
+// However, for our handlers, we do not support this, and for our
+// binary handlers, we combine CodeGeneratorResponse.File contents.
+//
+// https://github.com/protocolbuffers/protobuf/blob/b99994d994e399174fe688a5efbcb6d91f36952a/src/google/protobuf/compiler/plugin.proto#L127
+func ValidateCodeGeneratorResponse(response *pluginpb.CodeGeneratorResponse) error {
+ if response == nil {
+ return errors.New("nil CodeGeneratorResponse")
+ }
+ for _, file := range response.File {
+ if file.GetName() == "" {
+ return errors.New("empty CodeGeneratorResponse.File.Name")
+ }
+ }
+ return nil
+}
+
+// ValidateProtoPath validates the proto path.
+//
+// This checks that the path is normalized and ends in .proto.
+func ValidateProtoPath(name string, path string) error {
+ if path == "" {
+ return fmt.Errorf("%s is empty", name)
+ }
+ normalized, err := normalpath.NormalizeAndValidate(path)
+ if err != nil {
+ return fmt.Errorf("%s had normalization error: %w", name, err)
+ }
+ if path != normalized {
+ return fmt.Errorf("%s %s was not normalized to %s", name, path, normalized)
+ }
+ if normalpath.Ext(path) != ".proto" {
+ return fmt.Errorf("%s %s does not have a .proto extension", name, path)
+ }
+ return nil
+}
+
+// ValidateProtoPaths validates the proto paths.
+//
+// This checks that the paths are normalized and end in .proto.
+func ValidateProtoPaths(name string, paths []string) error {
+ for _, path := range paths {
+ if err := ValidateProtoPath(name, path); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protodescriptor/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/protodescriptor/usage.gen.go
new file mode 100644
index 000000000..3764d5b54
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protodescriptor/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package protodescriptor
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/json_marshaler.go b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/json_marshaler.go
new file mode 100644
index 000000000..7743ccd74
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/json_marshaler.go
@@ -0,0 +1,65 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoencoding
+
+import (
+ "bytes"
+ "encoding/json"
+
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+)
+
+type jsonMarshaler struct {
+ resolver Resolver
+ indent string
+ useProtoNames bool
+}
+
+func newJSONMarshaler(resolver Resolver, indent string, useProtoNames bool) Marshaler {
+ return &jsonMarshaler{
+ resolver: resolver,
+ indent: indent,
+ useProtoNames: useProtoNames,
+ }
+}
+
+func (m *jsonMarshaler) Marshal(message proto.Message) ([]byte, error) {
+ if err := ReparseUnrecognized(m.resolver, message.ProtoReflect()); err != nil {
+ return nil, err
+ }
+ options := protojson.MarshalOptions{
+ Resolver: m.resolver,
+ Indent: m.indent,
+ UseProtoNames: m.useProtoNames,
+ }
+ data, err := options.Marshal(message)
+ if err != nil {
+ return nil, err
+ }
+ // This is needed due to the instability of protojson output.
+ //
+ // https://github.com/golang/protobuf/issues/1121
+ // https://go-review.googlesource.com/c/protobuf/+/151340
+ // https://developers.google.com/protocol-buffers/docs/reference/go/faq#unstable-json
+ //
+ // We may need to do a full encoding/json encode/decode in the future if protojson
+ // produces non-deterministic output.
+ buffer := bytes.NewBuffer(nil)
+ if err := json.Compact(buffer, data); err != nil {
+ return nil, err
+ }
+ return buffer.Bytes(), nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/json_unmarshaler.go b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/json_unmarshaler.go
new file mode 100644
index 000000000..3d25d2e54
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/json_unmarshaler.go
@@ -0,0 +1,39 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoencoding
+
+import (
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+)
+
+type jsonUnmarshaler struct {
+ resolver Resolver
+}
+
+func newJSONUnmarshaler(resolver Resolver) Unmarshaler {
+ return &jsonUnmarshaler{
+ resolver: resolver,
+ }
+}
+
+func (m *jsonUnmarshaler) Unmarshal(data []byte, message proto.Message) error {
+ options := protojson.UnmarshalOptions{
+ Resolver: m.resolver,
+ // TODO: make this an option
+ DiscardUnknown: true,
+ }
+ return options.Unmarshal(data, message)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/protoencoding.go b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/protoencoding.go
new file mode 100644
index 000000000..635e37e00
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/protoencoding.go
@@ -0,0 +1,105 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoencoding
+
+import (
+ "github.com/bufbuild/buf/private/pkg/protodescriptor"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoregistry"
+)
+
+// Resolver is a Resolver.
+//
+// This is only needed in cases where extensions may be present.
+type Resolver interface {
+ protoregistry.ExtensionTypeResolver
+ protoregistry.MessageTypeResolver
+}
+
+// NewResolver creates a new Resolver.
+//
+// If the input slice is empty, this returns nil
+// The given FileDescriptors must be self-contained, that is they must contain all imports.
+// This can NOT be guaranteed for FileDescriptorSets given over the wire, and can only be guaranteed from builds.
+func NewResolver(fileDescriptors ...protodescriptor.FileDescriptor) (Resolver, error) {
+ return newResolver(fileDescriptors...)
+}
+
+// NewLazyResolver creates a new Resolver that is constructed from the given
+// descriptors only as needed, if invoked.
+//
+// If there is an error when constructing the resolver, it will be returned by all
+// method calls of the returned resolver.
+func NewLazyResolver(fileDescriptors ...protodescriptor.FileDescriptor) Resolver {
+ return &lazyResolver{fn: func() (Resolver, error) {
+ return newResolver(fileDescriptors...)
+ }}
+}
+
+// Marshaler marshals Messages.
+type Marshaler interface {
+ Marshal(message proto.Message) ([]byte, error)
+}
+
+// NewWireMarshaler returns a new Marshaler for wire.
+//
+// See https://godoc.org/google.golang.org/protobuf/proto#MarshalOptions for a discussion on stability.
+// This has the potential to be unstable over time.
+func NewWireMarshaler() Marshaler {
+ return newWireMarshaler()
+}
+
+// NewJSONMarshaler returns a new Marshaler for JSON.
+//
+// This has the potential to be unstable over time.
+// resolver can be nil if unknown and are only needed for extensions.
+func NewJSONMarshaler(resolver Resolver) Marshaler {
+ return newJSONMarshaler(resolver, "", false)
+}
+
+// NewJSONMarshalerIndent returns a new Marshaler for JSON with indents.
+//
+// This has the potential to be unstable over time.
+// resolver can be nil if unknown and are only needed for extensions.
+func NewJSONMarshalerIndent(resolver Resolver) Marshaler {
+ return newJSONMarshaler(resolver, " ", false)
+}
+
+// NewJSONMarshalerUseProtoNames returns a new Marshaler for JSON using the proto names for keys.
+//
+// This has the potential to be unstable over time.
+// resolver can be nil if unknown and are only needed for extensions.
+func NewJSONMarshalerUseProtoNames(resolver Resolver) Marshaler {
+ return newJSONMarshaler(resolver, "", true)
+}
+
+// Unmarshaler unmarshals Messages.
+type Unmarshaler interface {
+ Unmarshal(data []byte, message proto.Message) error
+}
+
+// NewWireUnmarshaler returns a new Unmarshaler for wire.
+//
+// resolver can be nil if unknown and are only needed for extensions.
+func NewWireUnmarshaler(resolver Resolver) Unmarshaler {
+ return newWireUnmarshaler(resolver)
+}
+
+// NewJSONUnmarshaler returns a new Unmarshaler for json.
+//
+// resolver can be nil if unknown and are only needed for extensions.
+func NewJSONUnmarshaler(resolver Resolver) Unmarshaler {
+ return newJSONUnmarshaler(resolver)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/reparse_unrecognized.go b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/reparse_unrecognized.go
new file mode 100644
index 000000000..a19f75e37
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/reparse_unrecognized.go
@@ -0,0 +1,76 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoencoding
+
+import (
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+)
+
+// ReparseUnrecognized uses the given resolver to parse any unrecognized fields in the
+// given reflectMessage. It does so recursively, resolving any unrecognized fields in
+// nested messages.
+func ReparseUnrecognized(resolver Resolver, reflectMessage protoreflect.Message) error {
+ if resolver == nil {
+ return nil
+ }
+ unknown := reflectMessage.GetUnknown()
+ if len(unknown) > 0 {
+ reflectMessage.SetUnknown(nil)
+ options := proto.UnmarshalOptions{
+ Resolver: resolver,
+ Merge: true,
+ }
+ if err := options.Unmarshal(unknown, reflectMessage.Interface()); err != nil {
+ return err
+ }
+ }
+ var err error
+ reflectMessage.Range(func(fieldDescriptor protoreflect.FieldDescriptor, value protoreflect.Value) bool {
+ err = reparseUnrecognizedInField(resolver, fieldDescriptor, value)
+ return err == nil
+ })
+ return err
+}
+
+func reparseUnrecognizedInField(resolver Resolver, fieldDescriptor protoreflect.FieldDescriptor, value protoreflect.Value) error {
+ if fieldDescriptor.IsMap() {
+ valDesc := fieldDescriptor.MapValue()
+ if valDesc.Kind() != protoreflect.MessageKind && valDesc.Kind() != protoreflect.GroupKind {
+ // nothing to reparse
+ return nil
+ }
+ var err error
+ value.Map().Range(func(k protoreflect.MapKey, v protoreflect.Value) bool {
+ err = ReparseUnrecognized(resolver, v.Message())
+ return err == nil
+ })
+ return err
+ }
+ if fieldDescriptor.Kind() != protoreflect.MessageKind && fieldDescriptor.Kind() != protoreflect.GroupKind {
+ // nothing to reparse
+ return nil
+ }
+ if fieldDescriptor.IsList() {
+ list := value.List()
+ for i := 0; i < list.Len(); i++ {
+ if err := ReparseUnrecognized(resolver, list.Get(i).Message()); err != nil {
+ return err
+ }
+ }
+ return nil
+ }
+ return ReparseUnrecognized(resolver, value.Message())
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/resolver.go b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/resolver.go
new file mode 100644
index 000000000..700586279
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/resolver.go
@@ -0,0 +1,130 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoencoding
+
+import (
+ "sync"
+
+ "github.com/bufbuild/buf/private/pkg/protodescriptor"
+ "google.golang.org/protobuf/reflect/protodesc"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/types/dynamicpb"
+)
+
+func newResolver(fileDescriptors ...protodescriptor.FileDescriptor) (Resolver, error) {
+ if len(fileDescriptors) == 0 {
+ return nil, nil
+ }
+ // TODO: handle if resolvable
+ files, err := protodesc.FileOptions{
+ AllowUnresolvable: true,
+ }.NewFiles(
+ protodescriptor.FileDescriptorSetForFileDescriptors(fileDescriptors...),
+ )
+ if err != nil {
+ return nil, err
+ }
+ types := &protoregistry.Types{}
+ var rangeErr error
+ files.RangeFiles(func(fileDescriptor protoreflect.FileDescriptor) bool {
+ if err := addMessagesToTypes(types, fileDescriptor.Messages()); err != nil {
+ rangeErr = err
+ return false
+ }
+ if err := addExtensionsToTypes(types, fileDescriptor.Extensions()); err != nil {
+ rangeErr = err
+ return false
+ }
+ // There is no way to do register enum, and it is not used
+ // https://github.com/golang/protobuf/issues/1065
+ // https://godoc.org/google.golang.org/protobuf/types/dynamicpb does not have NewEnumType
+ return true
+ })
+ if rangeErr != nil {
+ return nil, rangeErr
+ }
+ return types, nil
+}
+
+func addMessagesToTypes(types *protoregistry.Types, messageDescriptors protoreflect.MessageDescriptors) error {
+ messagesLen := messageDescriptors.Len()
+ for i := 0; i < messagesLen; i++ {
+ messageDescriptor := messageDescriptors.Get(i)
+ if err := types.RegisterMessage(dynamicpb.NewMessageType(messageDescriptor)); err != nil {
+ return err
+ }
+ if err := addMessagesToTypes(types, messageDescriptor.Messages()); err != nil {
+ return err
+ }
+ if err := addExtensionsToTypes(types, messageDescriptor.Extensions()); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func addExtensionsToTypes(types *protoregistry.Types, extensionDescriptors protoreflect.ExtensionDescriptors) error {
+ extensionsLen := extensionDescriptors.Len()
+ for i := 0; i < extensionsLen; i++ {
+ extensionDescriptor := extensionDescriptors.Get(i)
+ if err := types.RegisterExtension(dynamicpb.NewExtensionType(extensionDescriptor)); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+type lazyResolver struct {
+ fn func() (Resolver, error)
+ init sync.Once
+ resolver Resolver
+ err error
+}
+
+func (l *lazyResolver) maybeInit() error {
+ l.init.Do(func() {
+ l.resolver, l.err = l.fn()
+ })
+ return l.err
+}
+
+func (l *lazyResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {
+ if err := l.maybeInit(); err != nil {
+ return nil, err
+ }
+ return l.resolver.FindExtensionByName(field)
+}
+
+func (l *lazyResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {
+ if err := l.maybeInit(); err != nil {
+ return nil, err
+ }
+ return l.resolver.FindExtensionByNumber(message, field)
+}
+
+func (l *lazyResolver) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) {
+ if err := l.maybeInit(); err != nil {
+ return nil, err
+ }
+ return l.resolver.FindMessageByName(message)
+}
+
+func (l *lazyResolver) FindMessageByURL(url string) (protoreflect.MessageType, error) {
+ if err := l.maybeInit(); err != nil {
+ return nil, err
+ }
+ return l.resolver.FindMessageByURL(url)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/usage.gen.go
new file mode 100644
index 000000000..31edb3e92
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package protoencoding
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/wire_marshaler.go b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/wire_marshaler.go
new file mode 100644
index 000000000..a2aacf0f2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/wire_marshaler.go
@@ -0,0 +1,32 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoencoding
+
+import (
+ "google.golang.org/protobuf/proto"
+)
+
+type wireMarshaler struct{}
+
+func newWireMarshaler() Marshaler {
+ return &wireMarshaler{}
+}
+
+func (m *wireMarshaler) Marshal(message proto.Message) ([]byte, error) {
+ options := proto.MarshalOptions{
+ Deterministic: true,
+ }
+ return options.Marshal(message)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/wire_unmarshaler.go b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/wire_unmarshaler.go
new file mode 100644
index 000000000..42bf97080
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoencoding/wire_unmarshaler.go
@@ -0,0 +1,36 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoencoding
+
+import (
+ "google.golang.org/protobuf/proto"
+)
+
+type wireUnmarshaler struct {
+ resolver Resolver
+}
+
+func newWireUnmarshaler(resolver Resolver) Unmarshaler {
+ return &wireUnmarshaler{
+ resolver: resolver,
+ }
+}
+
+func (m *wireUnmarshaler) Unmarshal(data []byte, message proto.Message) error {
+ options := proto.UnmarshalOptions{
+ Resolver: m.resolver,
+ }
+ return options.Unmarshal(data, message)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/alias_types.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/alias_types.go
new file mode 100644
index 000000000..bf1335c96
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/alias_types.go
@@ -0,0 +1,314 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+import (
+ "fmt"
+ "strconv"
+
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+const (
+ // FieldDescriptorProtoTypeDouble is an alias.
+ FieldDescriptorProtoTypeDouble FieldDescriptorProtoType = 1
+ // FieldDescriptorProtoTypeFloat is an alias.
+ FieldDescriptorProtoTypeFloat FieldDescriptorProtoType = 2
+ // FieldDescriptorProtoTypeInt64 is an alias.
+ FieldDescriptorProtoTypeInt64 FieldDescriptorProtoType = 3
+ // FieldDescriptorProtoTypeUint64 is an alias.
+ FieldDescriptorProtoTypeUint64 FieldDescriptorProtoType = 4
+ // FieldDescriptorProtoTypeInt32 is an alias.
+ FieldDescriptorProtoTypeInt32 FieldDescriptorProtoType = 5
+ // FieldDescriptorProtoTypeFixed64 is an alias.
+ FieldDescriptorProtoTypeFixed64 FieldDescriptorProtoType = 6
+ // FieldDescriptorProtoTypeFixed32 is an alias.
+ FieldDescriptorProtoTypeFixed32 FieldDescriptorProtoType = 7
+ // FieldDescriptorProtoTypeBool is an alias.
+ FieldDescriptorProtoTypeBool FieldDescriptorProtoType = 8
+ // FieldDescriptorProtoTypeString is an alias.
+ FieldDescriptorProtoTypeString FieldDescriptorProtoType = 9
+ // FieldDescriptorProtoTypeGroup is an alias.
+ FieldDescriptorProtoTypeGroup FieldDescriptorProtoType = 10
+ // FieldDescriptorProtoTypeMessage is an alias.
+ FieldDescriptorProtoTypeMessage FieldDescriptorProtoType = 11
+ // FieldDescriptorProtoTypeBytes is an alias.
+ FieldDescriptorProtoTypeBytes FieldDescriptorProtoType = 12
+ // FieldDescriptorProtoTypeUint32 is an alias.
+ FieldDescriptorProtoTypeUint32 FieldDescriptorProtoType = 13
+ // FieldDescriptorProtoTypeEnum is an alias.
+ FieldDescriptorProtoTypeEnum FieldDescriptorProtoType = 14
+ // FieldDescriptorProtoTypeSfixed32 is an alias.
+ FieldDescriptorProtoTypeSfixed32 FieldDescriptorProtoType = 15
+ // FieldDescriptorProtoTypeSfixed64 is an alias.
+ FieldDescriptorProtoTypeSfixed64 FieldDescriptorProtoType = 16
+ // FieldDescriptorProtoTypeSint32 is an alias.
+ FieldDescriptorProtoTypeSint32 FieldDescriptorProtoType = 17
+ // FieldDescriptorProtoTypeSint64 is an alias.
+ FieldDescriptorProtoTypeSint64 FieldDescriptorProtoType = 18
+
+ // FieldDescriptorProtoLabelOptional is an alias.
+ FieldDescriptorProtoLabelOptional FieldDescriptorProtoLabel = 1
+ // FieldDescriptorProtoLabelRequired is an alias.
+ FieldDescriptorProtoLabelRequired FieldDescriptorProtoLabel = 2
+ // FieldDescriptorProtoLabelRepeated is an alias.
+ FieldDescriptorProtoLabelRepeated FieldDescriptorProtoLabel = 3
+
+ // FieldOptionsCTypeString is an alias.
+ FieldOptionsCTypeString FieldOptionsCType = 0
+ // FieldOptionsCTypeCord is an alias.
+ FieldOptionsCTypeCord FieldOptionsCType = 1
+ // FieldOptionsCTypeStringPiece is an alias.
+ FieldOptionsCTypeStringPiece FieldOptionsCType = 2
+
+ // FieldOptionsJSTypeJSNormal is an alias.
+ FieldOptionsJSTypeJSNormal FieldOptionsJSType = 0
+ // FieldOptionsJSTypeJSString is an alias.
+ FieldOptionsJSTypeJSString FieldOptionsJSType = 1
+ // FieldOptionsJSTypeJSNumber is an alias.
+ FieldOptionsJSTypeJSNumber FieldOptionsJSType = 2
+
+ // FileOptionsOptimizeModeSpeed is an alias.
+ FileOptionsOptimizeModeSpeed FileOptionsOptimizeMode = 1
+ // FileOptionsOptimizeModeCodeSize is an alias.
+ FileOptionsOptimizeModeCodeSize FileOptionsOptimizeMode = 2
+ // FileOptionsOptimizeModeLiteRuntime is an alias.
+ FileOptionsOptimizeModeLiteRuntime FileOptionsOptimizeMode = 3
+
+ // MethodOptionsIdempotencyLevelIdempotencyUnknown is an alias.
+ MethodOptionsIdempotencyLevelIdempotencyUnknown = 0
+ // MethodOptionsIdempotencyLevelNoSideEffects is an alias.
+ MethodOptionsIdempotencyLevelNoSideEffects = 1
+ // MethodOptionsIdempotencyLevelIdempotent is an alias.
+ MethodOptionsIdempotencyLevelIdempotent = 2
+)
+
+var (
+ numberToFieldDescriptorProtoType = map[int32]FieldDescriptorProtoType{
+ 1: FieldDescriptorProtoTypeDouble,
+ 2: FieldDescriptorProtoTypeFloat,
+ 3: FieldDescriptorProtoTypeInt64,
+ 4: FieldDescriptorProtoTypeUint64,
+ 5: FieldDescriptorProtoTypeInt32,
+ 6: FieldDescriptorProtoTypeFixed64,
+ 7: FieldDescriptorProtoTypeFixed32,
+ 8: FieldDescriptorProtoTypeBool,
+ 9: FieldDescriptorProtoTypeString,
+ 10: FieldDescriptorProtoTypeGroup,
+ 11: FieldDescriptorProtoTypeMessage,
+ 12: FieldDescriptorProtoTypeBytes,
+ 13: FieldDescriptorProtoTypeUint32,
+ 14: FieldDescriptorProtoTypeEnum,
+ 15: FieldDescriptorProtoTypeSfixed32,
+ 16: FieldDescriptorProtoTypeSfixed64,
+ 17: FieldDescriptorProtoTypeSint32,
+ 18: FieldDescriptorProtoTypeSint64,
+ }
+ fieldDescriptorProtoTypeToString = map[FieldDescriptorProtoType]string{
+ FieldDescriptorProtoTypeDouble: "double",
+ FieldDescriptorProtoTypeFloat: "float",
+ FieldDescriptorProtoTypeInt64: "int64",
+ FieldDescriptorProtoTypeUint64: "uint64",
+ FieldDescriptorProtoTypeInt32: "int32",
+ FieldDescriptorProtoTypeFixed64: "fixed64",
+ FieldDescriptorProtoTypeFixed32: "fixed32",
+ FieldDescriptorProtoTypeBool: "bool",
+ FieldDescriptorProtoTypeString: "string",
+ FieldDescriptorProtoTypeGroup: "group",
+ FieldDescriptorProtoTypeMessage: "message",
+ FieldDescriptorProtoTypeBytes: "bytes",
+ FieldDescriptorProtoTypeUint32: "uint32",
+ FieldDescriptorProtoTypeEnum: "enum",
+ FieldDescriptorProtoTypeSfixed32: "sfixed32",
+ FieldDescriptorProtoTypeSfixed64: "sfixed64",
+ FieldDescriptorProtoTypeSint32: "sint32",
+ FieldDescriptorProtoTypeSint64: "sint64",
+ }
+
+ numberToFieldDescriptorProtoLabel = map[int32]FieldDescriptorProtoLabel{
+ 1: FieldDescriptorProtoLabelOptional,
+ 2: FieldDescriptorProtoLabelRequired,
+ 3: FieldDescriptorProtoLabelRepeated,
+ }
+ fieldDescriptorProtoLabelToString = map[FieldDescriptorProtoLabel]string{
+ FieldDescriptorProtoLabelOptional: "optional",
+ FieldDescriptorProtoLabelRequired: "required",
+ FieldDescriptorProtoLabelRepeated: "repeated",
+ }
+
+ numberToFieldOptionsCType = map[int32]FieldOptionsCType{
+ 0: FieldOptionsCTypeString,
+ 1: FieldOptionsCTypeCord,
+ 2: FieldOptionsCTypeStringPiece,
+ }
+ fieldOptionsCTypeToString = map[FieldOptionsCType]string{
+ FieldOptionsCTypeString: "STRING",
+ FieldOptionsCTypeCord: "CORD",
+ FieldOptionsCTypeStringPiece: "STRING_PIECE",
+ }
+
+ numberToFieldOptionsJSType = map[int32]FieldOptionsJSType{
+ 0: FieldOptionsJSTypeJSNormal,
+ 1: FieldOptionsJSTypeJSString,
+ 2: FieldOptionsJSTypeJSNumber,
+ }
+ fieldOptionsJSTypeToString = map[FieldOptionsJSType]string{
+ FieldOptionsJSTypeJSNormal: "JS_NORMAL",
+ FieldOptionsJSTypeJSString: "JS_STRING",
+ FieldOptionsJSTypeJSNumber: "JS_NUMBER",
+ }
+
+ numberToFileOptionsOptimizeMode = map[int32]FileOptionsOptimizeMode{
+ 1: FileOptionsOptimizeModeSpeed,
+ 2: FileOptionsOptimizeModeCodeSize,
+ 3: FileOptionsOptimizeModeLiteRuntime,
+ }
+ fileOptionsOptimizeModeToString = map[FileOptionsOptimizeMode]string{
+ FileOptionsOptimizeModeSpeed: "SPEED",
+ FileOptionsOptimizeModeCodeSize: "CODE_SIZE",
+ FileOptionsOptimizeModeLiteRuntime: "LITE_RUNTIME",
+ }
+
+ numberToMethodOptionsIdempotencyLevel = map[int32]MethodOptionsIdempotencyLevel{
+ 0: MethodOptionsIdempotencyLevelIdempotencyUnknown,
+ 1: MethodOptionsIdempotencyLevelNoSideEffects,
+ 2: MethodOptionsIdempotencyLevelIdempotent,
+ }
+ methodOptionsIdempotencyLevelToString = map[MethodOptionsIdempotencyLevel]string{
+ MethodOptionsIdempotencyLevelIdempotencyUnknown: "IDEMPOTENCY_UNKNOWN",
+ MethodOptionsIdempotencyLevelNoSideEffects: "NO_SIDE_EFFECTS",
+ MethodOptionsIdempotencyLevelIdempotent: "IDEMPOTENT",
+ }
+)
+
+// FieldDescriptorProtoType aliases descriptorpb.FieldDescriptorProto_Type.
+type FieldDescriptorProtoType int32
+
+// String returns the string representation of the FieldDescriptorProtoType.
+func (t FieldDescriptorProtoType) String() string {
+ s, ok := fieldDescriptorProtoTypeToString[t]
+ if !ok {
+ return strconv.Itoa(int(t))
+ }
+ return s
+}
+
+func getFieldDescriptorProtoType(v descriptorpb.FieldDescriptorProto_Type) (FieldDescriptorProtoType, error) {
+ t, ok := numberToFieldDescriptorProtoType[int32(v)]
+ if !ok {
+ return 0, fmt.Errorf("no FieldDescriptorProtoType for %v", v)
+ }
+ return t, nil
+}
+
+// FieldDescriptorProtoLabel aliases descriptorpb.FieldDescriptorProto_Label.
+type FieldDescriptorProtoLabel int32
+
+// String returns the string representation of the FieldDescriptorProtoLabel.
+func (l FieldDescriptorProtoLabel) String() string {
+ s, ok := fieldDescriptorProtoLabelToString[l]
+ if !ok {
+ return strconv.Itoa(int(l))
+ }
+ return s
+}
+
+func getFieldDescriptorProtoLabel(v descriptorpb.FieldDescriptorProto_Label) (FieldDescriptorProtoLabel, error) {
+ t, ok := numberToFieldDescriptorProtoLabel[int32(v)]
+ if !ok {
+ return 0, fmt.Errorf("no FieldDescriptorProtoLabel for %v", v)
+ }
+ return t, nil
+}
+
+// FieldOptionsCType aliases descriptorpb.FieldOptions_CType.
+type FieldOptionsCType int32
+
+// String returns the string representation of the FieldOptionsCType.
+func (c FieldOptionsCType) String() string {
+ s, ok := fieldOptionsCTypeToString[c]
+ if !ok {
+ return strconv.Itoa(int(c))
+ }
+ return s
+}
+
+func getFieldOptionsCType(v descriptorpb.FieldOptions_CType) (FieldOptionsCType, error) {
+ t, ok := numberToFieldOptionsCType[int32(v)]
+ if !ok {
+ return 0, fmt.Errorf("no FieldOptionsCType for %v", v)
+ }
+ return t, nil
+}
+
+// FieldOptionsJSType aliases descriptorpb.FieldOptions_JSType.
+type FieldOptionsJSType int32
+
+// String returns the string representation of the FieldOptionsJSType.
+func (j FieldOptionsJSType) String() string {
+ s, ok := fieldOptionsJSTypeToString[j]
+ if !ok {
+ return strconv.Itoa(int(j))
+ }
+ return s
+}
+
+func getFieldOptionsJSType(v descriptorpb.FieldOptions_JSType) (FieldOptionsJSType, error) {
+ t, ok := numberToFieldOptionsJSType[int32(v)]
+ if !ok {
+ return 0, fmt.Errorf("no FieldOptionsJSType for %v", v)
+ }
+ return t, nil
+}
+
+// FileOptionsOptimizeMode aliases descriptorpb.FileOptions_OptimizeMode.
+type FileOptionsOptimizeMode int32
+
+// String returns the string representation of the FileOptionsOptimizeMode.
+func (t FileOptionsOptimizeMode) String() string {
+ s, ok := fileOptionsOptimizeModeToString[t]
+ if !ok {
+ return strconv.Itoa(int(t))
+ }
+ return s
+}
+
+func getFileOptionsOptimizeMode(v descriptorpb.FileOptions_OptimizeMode) (FileOptionsOptimizeMode, error) {
+ t, ok := numberToFileOptionsOptimizeMode[int32(v)]
+ if !ok {
+ return 0, fmt.Errorf("no FileOptionsOptimizeMode for %v", v)
+ }
+ return t, nil
+}
+
+// MethodOptionsIdempotencyLevel aliases descriptorpb.MethodOptions_IdempotencyLevel.
+type MethodOptionsIdempotencyLevel int32
+
+// String returns the string representation of the MethodOptionsIdempotencyLevel.
+func (t MethodOptionsIdempotencyLevel) String() string {
+ s, ok := methodOptionsIdempotencyLevelToString[t]
+ if !ok {
+ return strconv.Itoa(int(t))
+ }
+ return s
+}
+
+func getMethodOptionsIdempotencyLevel(v descriptorpb.MethodOptions_IdempotencyLevel) (MethodOptionsIdempotencyLevel, error) {
+ t, ok := numberToMethodOptionsIdempotencyLevel[int32(v)]
+ if !ok {
+ return 0, fmt.Errorf("no MethodOptionsIdempotencyLevel for %v", v)
+ }
+ return t, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/descriptor.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/descriptor.go
new file mode 100644
index 000000000..3fd70e1fd
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/descriptor.go
@@ -0,0 +1,48 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+type descriptor struct {
+ file File
+ locationStore *locationStore
+}
+
+func newDescriptor(
+ file File,
+ locationStore *locationStore,
+) descriptor {
+ return descriptor{
+ file: file,
+ locationStore: locationStore,
+ }
+}
+
+func (d *descriptor) File() File {
+ return d.file
+}
+
+func (d *descriptor) getLocation(path []int32) Location {
+ if d.locationStore == nil || len(path) == 0 {
+ return nil
+ }
+ return d.locationStore.getLocation(path)
+}
+
+func (d *descriptor) getLocationByPathKey(pathKey string) Location {
+ if d.locationStore == nil || pathKey == "" {
+ return nil
+ }
+ return d.locationStore.getLocationByPathKey(pathKey)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/enum.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/enum.go
new file mode 100644
index 000000000..e4301a468
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/enum.go
@@ -0,0 +1,94 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+type enum struct {
+ namedDescriptor
+ optionExtensionDescriptor
+
+ values []EnumValue
+ allowAlias bool
+ deprecated bool
+ allowAliasPath []int32
+ reservedEnumRanges []EnumRange
+ reservedNames []ReservedName
+ parent Message
+}
+
+func newEnum(
+ namedDescriptor namedDescriptor,
+ optionExtensionDescriptor optionExtensionDescriptor,
+ allowAlias bool,
+ deprecated bool,
+ allowAliasPath []int32,
+ parent Message,
+) *enum {
+ return &enum{
+ namedDescriptor: namedDescriptor,
+ optionExtensionDescriptor: optionExtensionDescriptor,
+ allowAlias: allowAlias,
+ deprecated: deprecated,
+ allowAliasPath: allowAliasPath,
+ parent: parent,
+ }
+}
+
+func (e *enum) Values() []EnumValue {
+ return e.values
+}
+
+func (e *enum) AllowAlias() bool {
+ return e.allowAlias
+}
+
+func (e *enum) Deprecated() bool {
+ return e.deprecated
+}
+
+func (e *enum) AllowAliasLocation() Location {
+ return e.getLocation(e.allowAliasPath)
+}
+
+func (e *enum) ReservedEnumRanges() []EnumRange {
+ return e.reservedEnumRanges
+}
+
+func (e *enum) ReservedTagRanges() []TagRange {
+ tagRanges := make([]TagRange, len(e.reservedEnumRanges))
+ for i, reservedEnumRange := range e.reservedEnumRanges {
+ tagRanges[i] = reservedEnumRange
+ }
+ return tagRanges
+}
+
+func (e *enum) ReservedNames() []ReservedName {
+ return e.reservedNames
+}
+
+func (e *enum) Parent() Message {
+ return e.parent
+}
+
+func (e *enum) addValue(value EnumValue) {
+ e.values = append(e.values, value)
+}
+
+func (e *enum) addReservedEnumRange(reservedEnumRange EnumRange) {
+ e.reservedEnumRanges = append(e.reservedEnumRanges, reservedEnumRange)
+}
+
+func (e *enum) addReservedName(reservedName ReservedName) {
+ e.reservedNames = append(e.reservedNames, reservedName)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/enum_range.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/enum_range.go
new file mode 100644
index 000000000..010cd29a4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/enum_range.go
@@ -0,0 +1,58 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+const (
+ enumRangeInclusiveMax = 2147483647
+)
+
+type enumRange struct {
+ locationDescriptor
+
+ enum Enum
+ start int
+ end int
+}
+
+func newEnumRange(
+ locationDescriptor locationDescriptor,
+ enum Enum,
+ start int,
+ // end is inclusive for enums
+ end int,
+) *enumRange {
+ return &enumRange{
+ locationDescriptor: locationDescriptor,
+ enum: enum,
+ start: start,
+ end: end,
+ }
+}
+
+func (r *enumRange) Enum() Enum {
+ return r.enum
+}
+
+func (r *enumRange) Start() int {
+ return r.start
+}
+
+func (r *enumRange) End() int {
+ return r.end
+}
+
+func (r *enumRange) Max() bool {
+ return r.end == enumRangeInclusiveMax
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/enum_value.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/enum_value.go
new file mode 100644
index 000000000..d069279fd
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/enum_value.go
@@ -0,0 +1,59 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+type enumValue struct {
+ namedDescriptor
+ optionExtensionDescriptor
+
+ enum Enum
+ number int
+ deprecated bool
+ numberPath []int32
+}
+
+func newEnumValue(
+ namedDescriptor namedDescriptor,
+ optionExtensionDescriptor optionExtensionDescriptor,
+ enum Enum,
+ number int,
+ deprecated bool,
+ numberPath []int32,
+) *enumValue {
+ return &enumValue{
+ namedDescriptor: namedDescriptor,
+ optionExtensionDescriptor: optionExtensionDescriptor,
+ enum: enum,
+ number: number,
+ deprecated: deprecated,
+ numberPath: numberPath,
+ }
+}
+
+func (e *enumValue) Enum() Enum {
+ return e.enum
+}
+
+func (e *enumValue) Number() int {
+ return e.number
+}
+
+func (e *enumValue) Deprecated() bool {
+ return e.deprecated
+}
+
+func (e *enumValue) NumberLocation() Location {
+ return e.getLocation(e.numberPath)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/field.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/field.go
new file mode 100644
index 000000000..8b9b29780
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/field.go
@@ -0,0 +1,186 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+type field struct {
+ namedDescriptor
+ optionExtensionDescriptor
+
+ message Message
+ number int
+ label FieldDescriptorProtoLabel
+ typ FieldDescriptorProtoType
+ typeName string
+ // if the field is an extension, this is the type being extended
+ extendee string
+ // this has to be the pointer to the private struct or you have the bug where the
+ // interface is nil but value == nil is false
+ oneof *oneof
+ proto3Optional bool
+ jsonName string
+ jsType FieldOptionsJSType
+ cType FieldOptionsCType
+ packed *bool
+ deprecated bool
+ numberPath []int32
+ typePath []int32
+ typeNamePath []int32
+ jsonNamePath []int32
+ jsTypePath []int32
+ cTypePath []int32
+ packedPath []int32
+ extendeePath []int32
+}
+
+func newField(
+ namedDescriptor namedDescriptor,
+ optionExtensionDescriptor optionExtensionDescriptor,
+ message Message,
+ number int,
+ label FieldDescriptorProtoLabel,
+ typ FieldDescriptorProtoType,
+ typeName string,
+ extendee string,
+ oneof *oneof,
+ proto3Optional bool,
+ jsonName string,
+ jsType FieldOptionsJSType,
+ cType FieldOptionsCType,
+ packed *bool,
+ deprecated bool,
+ numberPath []int32,
+ typePath []int32,
+ typeNamePath []int32,
+ jsonNamePath []int32,
+ jsTypePath []int32,
+ cTypePath []int32,
+ packedPath []int32,
+ extendeePath []int32,
+) *field {
+ return &field{
+ namedDescriptor: namedDescriptor,
+ optionExtensionDescriptor: optionExtensionDescriptor,
+ message: message,
+ number: number,
+ label: label,
+ typ: typ,
+ typeName: typeName,
+ extendee: extendee,
+ oneof: oneof,
+ proto3Optional: proto3Optional,
+ jsonName: jsonName,
+ jsType: jsType,
+ cType: cType,
+ packed: packed,
+ deprecated: deprecated,
+ numberPath: numberPath,
+ typePath: typePath,
+ typeNamePath: typeNamePath,
+ jsonNamePath: jsonNamePath,
+ jsTypePath: jsTypePath,
+ cTypePath: cTypePath,
+ packedPath: packedPath,
+ extendeePath: extendeePath,
+ }
+}
+
+func (f *field) Message() Message {
+ return f.message
+}
+
+func (f *field) Number() int {
+ return f.number
+}
+
+func (f *field) Label() FieldDescriptorProtoLabel {
+ return f.label
+}
+
+func (f *field) Type() FieldDescriptorProtoType {
+ return f.typ
+}
+
+func (f *field) TypeName() string {
+ return f.typeName
+}
+
+func (f *field) Extendee() string {
+ return f.extendee
+}
+
+func (f *field) Oneof() Oneof {
+ // this has to be done or you have the bug where the interface is nil
+ // but value == nil is false
+ if f.oneof == nil {
+ return nil
+ }
+ return f.oneof
+}
+
+func (f *field) Proto3Optional() bool {
+ return f.proto3Optional
+}
+
+func (f *field) JSONName() string {
+ return f.jsonName
+}
+
+func (f *field) JSType() FieldOptionsJSType {
+ return f.jsType
+}
+
+func (f *field) CType() FieldOptionsCType {
+ return f.cType
+}
+
+func (f *field) Packed() *bool {
+ return f.packed
+}
+
+func (f *field) Deprecated() bool {
+ return f.deprecated
+}
+
+func (f *field) NumberLocation() Location {
+ return f.getLocation(f.numberPath)
+}
+
+func (f *field) TypeLocation() Location {
+ return f.getLocation(f.typePath)
+}
+
+func (f *field) TypeNameLocation() Location {
+ return f.getLocation(f.typeNamePath)
+}
+
+func (f *field) JSONNameLocation() Location {
+ return f.getLocation(f.jsonNamePath)
+}
+
+func (f *field) JSTypeLocation() Location {
+ return f.getLocation(f.jsTypePath)
+}
+
+func (f *field) CTypeLocation() Location {
+ return f.getLocation(f.cTypePath)
+}
+
+func (f *field) PackedLocation() Location {
+ return f.getLocation(f.packedPath)
+}
+
+func (f *field) ExtendeeLocation() Location {
+ return f.getLocation(f.extendeePath)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/file.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/file.go
new file mode 100644
index 000000000..5a786acb6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/file.go
@@ -0,0 +1,851 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+import (
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/protodescriptor"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+type file struct {
+ FileInfo
+ descriptor
+ optionExtensionDescriptor
+
+ fileDescriptor protodescriptor.FileDescriptor
+ syntax Syntax
+ fileImports []FileImport
+ messages []Message
+ enums []Enum
+ services []Service
+ extensions []Field
+ optimizeMode FileOptionsOptimizeMode
+}
+
+func (f *file) Syntax() Syntax {
+ return f.syntax
+}
+
+func (f *file) Package() string {
+ return f.fileDescriptor.GetPackage()
+}
+
+func (f *file) FileImports() []FileImport {
+ return f.fileImports
+}
+
+func (f *file) Messages() []Message {
+ return f.messages
+}
+
+func (f *file) Enums() []Enum {
+ return f.enums
+}
+
+func (f *file) Services() []Service {
+ return f.services
+}
+
+func (f *file) Extensions() []Field {
+ return f.extensions
+}
+
+func (f *file) CsharpNamespace() string {
+ return f.fileDescriptor.GetOptions().GetCsharpNamespace()
+}
+
+func (f *file) Deprecated() bool {
+ return f.fileDescriptor.GetOptions().GetDeprecated()
+}
+
+func (f *file) GoPackage() string {
+ return f.fileDescriptor.GetOptions().GetGoPackage()
+}
+
+func (f *file) JavaMultipleFiles() bool {
+ return f.fileDescriptor.GetOptions().GetJavaMultipleFiles()
+}
+
+func (f *file) JavaOuterClassname() string {
+ return f.fileDescriptor.GetOptions().GetJavaOuterClassname()
+}
+
+func (f *file) JavaPackage() string {
+ return f.fileDescriptor.GetOptions().GetJavaPackage()
+}
+
+func (f *file) JavaStringCheckUtf8() bool {
+ return f.fileDescriptor.GetOptions().GetJavaStringCheckUtf8()
+}
+
+func (f *file) ObjcClassPrefix() string {
+ return f.fileDescriptor.GetOptions().GetObjcClassPrefix()
+}
+
+func (f *file) PhpClassPrefix() string {
+ return f.fileDescriptor.GetOptions().GetPhpClassPrefix()
+}
+
+func (f *file) PhpNamespace() string {
+ return f.fileDescriptor.GetOptions().GetPhpNamespace()
+}
+
+func (f *file) PhpMetadataNamespace() string {
+ return f.fileDescriptor.GetOptions().GetPhpMetadataNamespace()
+}
+
+func (f *file) RubyPackage() string {
+ return f.fileDescriptor.GetOptions().GetRubyPackage()
+}
+
+func (f *file) SwiftPrefix() string {
+ return f.fileDescriptor.GetOptions().GetSwiftPrefix()
+}
+
+func (f *file) OptimizeFor() FileOptionsOptimizeMode {
+ return f.optimizeMode
+}
+
+func (f *file) CcGenericServices() bool {
+ return f.fileDescriptor.GetOptions().GetCcGenericServices()
+}
+
+func (f *file) JavaGenericServices() bool {
+ return f.fileDescriptor.GetOptions().GetJavaGenericServices()
+}
+
+func (f *file) PyGenericServices() bool {
+ return f.fileDescriptor.GetOptions().GetPyGenericServices()
+}
+
+func (f *file) PhpGenericServices() bool {
+ return f.fileDescriptor.GetOptions().GetPhpGenericServices()
+}
+
+func (f *file) CcEnableArenas() bool {
+ return f.fileDescriptor.GetOptions().GetCcEnableArenas()
+}
+
+func (f *file) PackageLocation() Location {
+ return f.getLocationByPathKey(packagePathKey)
+}
+
+func (f *file) CsharpNamespaceLocation() Location {
+ return f.getLocationByPathKey(csharpNamespacePathKey)
+}
+
+func (f *file) GoPackageLocation() Location {
+ return f.getLocationByPathKey(goPackagePathKey)
+}
+
+func (f *file) JavaMultipleFilesLocation() Location {
+ return f.getLocationByPathKey(javaMultipleFilesPathKey)
+}
+
+func (f *file) JavaOuterClassnameLocation() Location {
+ return f.getLocationByPathKey(javaOuterClassnamePathKey)
+}
+
+func (f *file) JavaPackageLocation() Location {
+ return f.getLocationByPathKey(javaPackagePathKey)
+}
+
+func (f *file) JavaStringCheckUtf8Location() Location {
+ return f.getLocationByPathKey(javaStringCheckUtf8PathKey)
+}
+
+func (f *file) ObjcClassPrefixLocation() Location {
+ return f.getLocationByPathKey(objcClassPrefixPathKey)
+}
+
+func (f *file) PhpClassPrefixLocation() Location {
+ return f.getLocationByPathKey(phpClassPrefixPathKey)
+}
+
+func (f *file) PhpNamespaceLocation() Location {
+ return f.getLocationByPathKey(phpNamespacePathKey)
+}
+
+func (f *file) PhpMetadataNamespaceLocation() Location {
+ return f.getLocationByPathKey(phpMetadataNamespacePathKey)
+}
+
+func (f *file) RubyPackageLocation() Location {
+ return f.getLocationByPathKey(rubyPackagePathKey)
+}
+
+func (f *file) SwiftPrefixLocation() Location {
+ return f.getLocationByPathKey(swiftPrefixPathKey)
+}
+
+func (f *file) OptimizeForLocation() Location {
+ return f.getLocationByPathKey(optimizeForPathKey)
+}
+
+func (f *file) CcGenericServicesLocation() Location {
+ return f.getLocationByPathKey(ccGenericServicesPathKey)
+}
+
+func (f *file) JavaGenericServicesLocation() Location {
+ return f.getLocationByPathKey(javaGenericServicesPathKey)
+}
+
+func (f *file) PyGenericServicesLocation() Location {
+ return f.getLocationByPathKey(pyGenericServicesPathKey)
+}
+
+func (f *file) PhpGenericServicesLocation() Location {
+ return f.getLocationByPathKey(phpGenericServicesPathKey)
+}
+
+func (f *file) CcEnableArenasLocation() Location {
+ return f.getLocationByPathKey(ccEnableArenasPathKey)
+}
+
+func (f *file) SyntaxLocation() Location {
+ return f.getLocationByPathKey(syntaxPathKey)
+}
+
+// does not validation of the fileDescriptorProto - this is assumed to be done elsewhere
+// does no duplicate checking by name - could just have maps ie importToFileImport, enumNameToEnum, etc
+func newFile(inputFile InputFile) (*file, error) {
+ f := &file{
+ FileInfo: inputFile,
+ fileDescriptor: inputFile.FileDescriptor(),
+ optionExtensionDescriptor: newOptionExtensionDescriptor(
+ inputFile.FileDescriptor().GetOptions(),
+ ),
+ }
+ descriptor := newDescriptor(
+ f,
+ newLocationStore(f.fileDescriptor.GetSourceCodeInfo().GetLocation()),
+ )
+ f.descriptor = descriptor
+
+ if inputFile.IsSyntaxUnspecified() {
+ f.syntax = SyntaxUnspecified
+ } else {
+ switch syntaxString := f.fileDescriptor.GetSyntax(); syntaxString {
+ // if the syntax is "proto2", protoc and buf will not set the syntax
+ // field even if it was explicitly set, this is why we have
+ // IsSyntaxUnspecified
+ case "", "proto2":
+ f.syntax = SyntaxProto2
+ case "proto3":
+ f.syntax = SyntaxProto3
+ default:
+ return nil, fmt.Errorf("unknown syntax: %q", syntaxString)
+ }
+ }
+
+ for dependencyIndex, dependency := range f.fileDescriptor.GetDependency() {
+ fileImport, err := newFileImport(
+ f.descriptor,
+ dependency,
+ getDependencyPath(dependencyIndex),
+ )
+ if err != nil {
+ return nil, err
+ }
+ f.fileImports = append(f.fileImports, fileImport)
+ }
+ for _, dependencyIndex := range f.fileDescriptor.GetPublicDependency() {
+ if int(dependencyIndex) < 0 || len(f.fileImports) <= int(dependencyIndex) {
+ return nil, fmt.Errorf("got dependency index of %d but length of imports is %d", dependencyIndex, len(f.fileImports))
+ }
+ fileImport, ok := f.fileImports[dependencyIndex].(*fileImport)
+ if !ok {
+ return nil, fmt.Errorf("could not cast %T to a *fileImport", f.fileImports[dependencyIndex])
+ }
+ fileImport.setIsPublic()
+ }
+ for _, dependencyIndex := range f.fileDescriptor.GetWeakDependency() {
+ if int(dependencyIndex) < 0 || len(f.fileImports) <= int(dependencyIndex) {
+ return nil, fmt.Errorf("got dependency index of %d but length of imports is %d", dependencyIndex, len(f.fileImports))
+ }
+ fileImport, ok := f.fileImports[dependencyIndex].(*fileImport)
+ if !ok {
+ return nil, fmt.Errorf("could not cast %T to a *fileImport", f.fileImports[dependencyIndex])
+ }
+ fileImport.setIsWeak()
+ }
+ for _, dependencyIndex := range inputFile.UnusedDependencyIndexes() {
+ if int(dependencyIndex) < 0 || len(f.fileImports) <= int(dependencyIndex) {
+ return nil, fmt.Errorf("got dependency index of %d but length of imports is %d", dependencyIndex, len(f.fileImports))
+ }
+ fileImport, ok := f.fileImports[dependencyIndex].(*fileImport)
+ if !ok {
+ return nil, fmt.Errorf("could not cast %T to a *fileImport", f.fileImports[dependencyIndex])
+ }
+ fileImport.setIsUnused()
+ }
+ for enumIndex, enumDescriptorProto := range f.fileDescriptor.GetEnumType() {
+ enum, err := f.populateEnum(
+ enumDescriptorProto,
+ enumIndex,
+ nil,
+ nil,
+ nil,
+ )
+ if err != nil {
+ return nil, err
+ }
+ f.enums = append(f.enums, enum)
+ }
+ for messageIndex, descriptorProto := range f.fileDescriptor.GetMessageType() {
+ message, err := f.populateMessage(
+ descriptorProto,
+ messageIndex,
+ nil,
+ nil,
+ nil,
+ )
+ if err != nil {
+ return nil, err
+ }
+ f.messages = append(f.messages, message)
+ }
+ for serviceIndex, serviceDescriptorProto := range f.fileDescriptor.GetService() {
+ service, err := f.populateService(
+ serviceDescriptorProto,
+ serviceIndex,
+ )
+ if err != nil {
+ return nil, err
+ }
+ f.services = append(f.services, service)
+ }
+ for extensionIndex, extensionDescriptorProto := range f.fileDescriptor.GetExtension() {
+ extension, err := f.populateExtension(
+ extensionDescriptorProto,
+ extensionIndex,
+ )
+ if err != nil {
+ return nil, err
+ }
+ f.extensions = append(f.extensions, extension)
+ }
+ optimizeMode, err := getFileOptionsOptimizeMode(f.fileDescriptor.GetOptions().GetOptimizeFor())
+ if err != nil {
+ return nil, err
+ }
+ f.optimizeMode = optimizeMode
+ return f, nil
+}
+
+func (f *file) populateEnum(
+ enumDescriptorProto *descriptorpb.EnumDescriptorProto,
+ enumIndex int,
+ // all message indexes leading to this enum
+ nestedMessageIndexes []int,
+ // all message names leading to this enum
+ nestedMessageNames []string,
+ parent Message,
+) (Enum, error) {
+ enumNamedDescriptor, err := newNamedDescriptor(
+ newLocationDescriptor(
+ f.descriptor,
+ getEnumPath(enumIndex, nestedMessageIndexes...),
+ ),
+ enumDescriptorProto.GetName(),
+ getEnumNamePath(enumIndex, nestedMessageIndexes...),
+ nestedMessageNames,
+ )
+ if err != nil {
+ return nil, err
+ }
+ enum := newEnum(
+ enumNamedDescriptor,
+ newOptionExtensionDescriptor(
+ enumDescriptorProto.GetOptions(),
+ ),
+ enumDescriptorProto.GetOptions().GetAllowAlias(),
+ enumDescriptorProto.GetOptions().GetDeprecated(),
+ getEnumAllowAliasPath(enumIndex, nestedMessageIndexes...),
+ parent,
+ )
+
+ for enumValueIndex, enumValueDescriptorProto := range enumDescriptorProto.GetValue() {
+ enumValueNamedDescriptor, err := newNamedDescriptor(
+ newLocationDescriptor(
+ f.descriptor,
+ getEnumValuePath(enumIndex, enumValueIndex, nestedMessageIndexes...),
+ ),
+ enumValueDescriptorProto.GetName(),
+ getEnumValueNamePath(enumIndex, enumValueIndex, nestedMessageIndexes...),
+ append(nestedMessageNames, enum.Name()),
+ )
+ if err != nil {
+ return nil, err
+ }
+ enumValue := newEnumValue(
+ enumValueNamedDescriptor,
+ newOptionExtensionDescriptor(
+ enumValueDescriptorProto.GetOptions(),
+ ),
+ enum,
+ int(enumValueDescriptorProto.GetNumber()),
+ enumValueDescriptorProto.GetOptions().GetDeprecated(),
+ getEnumValueNumberPath(enumIndex, enumValueIndex, nestedMessageIndexes...),
+ )
+ enum.addValue(enumValue)
+ }
+
+ for reservedRangeIndex, reservedRangeDescriptorProto := range enumDescriptorProto.GetReservedRange() {
+ reservedRangeLocationDescriptor := newLocationDescriptor(
+ f.descriptor,
+ getEnumReservedRangePath(enumIndex, reservedRangeIndex, nestedMessageIndexes...),
+ )
+ reservedEnumRange := newEnumRange(
+ reservedRangeLocationDescriptor,
+ enum,
+ int(reservedRangeDescriptorProto.GetStart()),
+ int(reservedRangeDescriptorProto.GetEnd()),
+ )
+ enum.addReservedEnumRange(reservedEnumRange)
+ }
+ for reservedNameIndex, reservedNameValue := range enumDescriptorProto.GetReservedName() {
+ reservedNameLocationDescriptor := newLocationDescriptor(
+ f.descriptor,
+ getEnumReservedNamePath(enumIndex, reservedNameIndex, nestedMessageIndexes...),
+ )
+ reservedName, err := newReservedName(
+ reservedNameLocationDescriptor,
+ reservedNameValue,
+ )
+ if err != nil {
+ return nil, err
+ }
+ enum.addReservedName(reservedName)
+ }
+ return enum, nil
+}
+
+func (f *file) populateMessage(
+ descriptorProto *descriptorpb.DescriptorProto,
+ // always stays the same on every recursive call
+ topLevelMessageIndex int,
+ // includes descriptorProto index
+ nestedMessageIndexes []int,
+ // does NOT include descriptorProto.GetName()
+ nestedMessageNames []string,
+ parent Message,
+) (Message, error) {
+ messageNamedDescriptor, err := newNamedDescriptor(
+ newLocationDescriptor(
+ f.descriptor,
+ getMessagePath(topLevelMessageIndex, nestedMessageIndexes...),
+ ),
+ descriptorProto.GetName(),
+ getMessageNamePath(topLevelMessageIndex, nestedMessageIndexes...),
+ nestedMessageNames,
+ )
+ if err != nil {
+ return nil, err
+ }
+ message := newMessage(
+ messageNamedDescriptor,
+ newOptionExtensionDescriptor(
+ descriptorProto.GetOptions(),
+ ),
+ parent,
+ descriptorProto.GetOptions().GetMapEntry(),
+ descriptorProto.GetOptions().GetMessageSetWireFormat(),
+ descriptorProto.GetOptions().GetNoStandardDescriptorAccessor(),
+ descriptorProto.GetOptions().GetDeprecated(),
+ getMessageMessageSetWireFormatPath(topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageNoStandardDescriptorAccessorPath(topLevelMessageIndex, nestedMessageIndexes...),
+ )
+ oneofIndexToOneof := make(map[int]*oneof)
+ for oneofIndex, oneofDescriptorProto := range descriptorProto.GetOneofDecl() {
+ oneofNamedDescriptor, err := newNamedDescriptor(
+ newLocationDescriptor(
+ f.descriptor,
+ getMessageOneofPath(oneofIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ ),
+ oneofDescriptorProto.GetName(),
+ getMessageOneofNamePath(oneofIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ append(nestedMessageNames, message.Name()),
+ )
+ if err != nil {
+ return nil, err
+ }
+ oneof := newOneof(
+ oneofNamedDescriptor,
+ newOptionExtensionDescriptor(
+ oneofDescriptorProto.GetOptions(),
+ ),
+ message,
+ )
+ message.addOneof(oneof)
+ oneofIndexToOneof[oneofIndex] = oneof
+ }
+ for fieldIndex, fieldDescriptorProto := range descriptorProto.GetField() {
+ // TODO: not working for map entries
+ fieldNamedDescriptor, err := newNamedDescriptor(
+ newLocationDescriptor(
+ f.descriptor,
+ getMessageFieldPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ ),
+ fieldDescriptorProto.GetName(),
+ getMessageFieldNamePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ append(nestedMessageNames, message.Name()),
+ )
+ if err != nil {
+ return nil, err
+ }
+ var packed *bool
+ if fieldDescriptorProto.Options != nil {
+ packed = fieldDescriptorProto.GetOptions().Packed
+ }
+ label, err := getFieldDescriptorProtoLabel(fieldDescriptorProto.GetLabel())
+ if err != nil {
+ return nil, err
+ }
+ typ, err := getFieldDescriptorProtoType(fieldDescriptorProto.GetType())
+ if err != nil {
+ return nil, err
+ }
+ jsType, err := getFieldOptionsJSType(fieldDescriptorProto.GetOptions().GetJstype())
+ if err != nil {
+ return nil, err
+ }
+ cType, err := getFieldOptionsCType(fieldDescriptorProto.GetOptions().GetCtype())
+ if err != nil {
+ return nil, err
+ }
+ var oneof *oneof
+ var ok bool
+ if fieldDescriptorProto.OneofIndex != nil {
+ oneofIndex := int(*fieldDescriptorProto.OneofIndex)
+ oneof, ok = oneofIndexToOneof[oneofIndex]
+ if !ok {
+ return nil, fmt.Errorf("no oneof for index %d", oneofIndex)
+ }
+ }
+ field := newField(
+ fieldNamedDescriptor,
+ newOptionExtensionDescriptor(
+ fieldDescriptorProto.GetOptions(),
+ ),
+ message,
+ int(fieldDescriptorProto.GetNumber()),
+ label,
+ typ,
+ strings.TrimPrefix(fieldDescriptorProto.GetTypeName(), "."),
+ strings.TrimPrefix(fieldDescriptorProto.GetExtendee(), "."),
+ oneof,
+ fieldDescriptorProto.GetProto3Optional(),
+ fieldDescriptorProto.GetJsonName(),
+ jsType,
+ cType,
+ packed,
+ fieldDescriptorProto.GetOptions().GetDeprecated(),
+ getMessageFieldNumberPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageFieldTypePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageFieldTypeNamePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageFieldJSONNamePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageFieldJSTypePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageFieldCTypePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageFieldPackedPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageFieldExtendeePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ )
+ message.addField(field)
+ if oneof != nil {
+ oneof.addField(field)
+ }
+ }
+ for fieldIndex, fieldDescriptorProto := range descriptorProto.GetExtension() {
+ fieldNamedDescriptor, err := newNamedDescriptor(
+ newLocationDescriptor(
+ f.descriptor,
+ getMessageExtensionPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ ),
+ fieldDescriptorProto.GetName(),
+ getMessageExtensionNamePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ append(nestedMessageNames, message.Name()),
+ )
+ if err != nil {
+ return nil, err
+ }
+ var packed *bool
+ if fieldDescriptorProto.Options != nil {
+ packed = fieldDescriptorProto.GetOptions().Packed
+ }
+ label, err := getFieldDescriptorProtoLabel(fieldDescriptorProto.GetLabel())
+ if err != nil {
+ return nil, err
+ }
+ typ, err := getFieldDescriptorProtoType(fieldDescriptorProto.GetType())
+ if err != nil {
+ return nil, err
+ }
+ jsType, err := getFieldOptionsJSType(fieldDescriptorProto.GetOptions().GetJstype())
+ if err != nil {
+ return nil, err
+ }
+ cType, err := getFieldOptionsCType(fieldDescriptorProto.GetOptions().GetCtype())
+ if err != nil {
+ return nil, err
+ }
+ var oneof *oneof
+ var ok bool
+ if fieldDescriptorProto.OneofIndex != nil {
+ oneofIndex := int(*fieldDescriptorProto.OneofIndex)
+ oneof, ok = oneofIndexToOneof[oneofIndex]
+ if !ok {
+ return nil, fmt.Errorf("no oneof for index %d", oneofIndex)
+ }
+ }
+ field := newField(
+ fieldNamedDescriptor,
+ newOptionExtensionDescriptor(
+ fieldDescriptorProto.GetOptions(),
+ ),
+ message,
+ int(fieldDescriptorProto.GetNumber()),
+ label,
+ typ,
+ strings.TrimPrefix(fieldDescriptorProto.GetTypeName(), "."),
+ strings.TrimPrefix(fieldDescriptorProto.GetExtendee(), "."),
+ oneof,
+ fieldDescriptorProto.GetProto3Optional(),
+ fieldDescriptorProto.GetJsonName(),
+ jsType,
+ cType,
+ packed,
+ fieldDescriptorProto.GetOptions().GetDeprecated(),
+ getMessageExtensionNumberPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageExtensionTypePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageExtensionTypeNamePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageExtensionJSONNamePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageExtensionJSTypePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageExtensionCTypePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageExtensionPackedPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ getMessageExtensionExtendeePath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ )
+ if err != nil {
+ return nil, err
+ }
+ message.addExtension(field)
+ if oneof != nil {
+ oneof.addField(field)
+ }
+ }
+ for reservedRangeIndex, reservedRangeDescriptorProto := range descriptorProto.GetReservedRange() {
+ reservedRangeLocationDescriptor := newLocationDescriptor(
+ f.descriptor,
+ getMessageReservedRangePath(reservedRangeIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ )
+ reservedMessageRange := newMessageRange(
+ reservedRangeLocationDescriptor,
+ message,
+ int(reservedRangeDescriptorProto.GetStart()),
+ int(reservedRangeDescriptorProto.GetEnd()),
+ )
+ message.addReservedMessageRange(reservedMessageRange)
+ }
+ for reservedNameIndex, reservedNameValue := range descriptorProto.GetReservedName() {
+ reservedNameLocationDescriptor := newLocationDescriptor(
+ f.descriptor,
+ getMessageReservedNamePath(reservedNameIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ )
+ reservedName, err := newReservedName(
+ reservedNameLocationDescriptor,
+ reservedNameValue,
+ )
+ if err != nil {
+ return nil, err
+ }
+ message.addReservedName(reservedName)
+ }
+ for extensionRangeIndex, extensionRangeDescriptorProto := range descriptorProto.GetExtensionRange() {
+ extensionRangeLocationDescriptor := newLocationDescriptor(
+ f.descriptor,
+ getMessageExtensionRangePath(extensionRangeIndex, topLevelMessageIndex, nestedMessageIndexes...),
+ )
+ extensionMessageRange := newExtensionRange(
+ extensionRangeLocationDescriptor,
+ message,
+ int(extensionRangeDescriptorProto.GetStart()),
+ int(extensionRangeDescriptorProto.GetEnd()),
+ newOptionExtensionDescriptor(
+ extensionRangeDescriptorProto.GetOptions(),
+ ),
+ )
+ message.addExtensionRange(extensionMessageRange)
+ }
+ for enumIndex, enumDescriptorProto := range descriptorProto.GetEnumType() {
+ nestedEnum, err := f.populateEnum(
+ enumDescriptorProto,
+ enumIndex,
+ // this is all of the message indexes including this one
+ // TODO we should refactor get.*Path messages to be more consistent
+ append([]int{topLevelMessageIndex}, nestedMessageIndexes...),
+ append(nestedMessageNames, message.Name()),
+ message,
+ )
+ if err != nil {
+ return nil, err
+ }
+ message.addNestedEnum(nestedEnum)
+ }
+ for nestedMessageIndex, nestedMessageDescriptorProto := range descriptorProto.GetNestedType() {
+ nestedMessage, err := f.populateMessage(
+ nestedMessageDescriptorProto,
+ topLevelMessageIndex,
+ append(nestedMessageIndexes, nestedMessageIndex),
+ append(nestedMessageNames, message.Name()),
+ message,
+ )
+ if err != nil {
+ return nil, err
+ }
+ message.addNestedMessage(nestedMessage)
+ }
+ return message, nil
+}
+
+func (f *file) populateService(
+ serviceDescriptorProto *descriptorpb.ServiceDescriptorProto,
+ serviceIndex int,
+) (Service, error) {
+ serviceNamedDescriptor, err := newNamedDescriptor(
+ newLocationDescriptor(
+ f.descriptor,
+ getServicePath(serviceIndex),
+ ),
+ serviceDescriptorProto.GetName(),
+ getServiceNamePath(serviceIndex),
+ nil,
+ )
+ if err != nil {
+ return nil, err
+ }
+ service := newService(
+ serviceNamedDescriptor,
+ newOptionExtensionDescriptor(
+ serviceDescriptorProto.GetOptions(),
+ ),
+ serviceDescriptorProto.GetOptions().GetDeprecated(),
+ )
+ for methodIndex, methodDescriptorProto := range serviceDescriptorProto.GetMethod() {
+ methodNamedDescriptor, err := newNamedDescriptor(
+ newLocationDescriptor(
+ f.descriptor,
+ getMethodPath(serviceIndex, methodIndex),
+ ),
+ methodDescriptorProto.GetName(),
+ getMethodNamePath(serviceIndex, methodIndex),
+ []string{service.Name()},
+ )
+ if err != nil {
+ return nil, err
+ }
+ idempotencyLevel, err := getMethodOptionsIdempotencyLevel(methodDescriptorProto.GetOptions().GetIdempotencyLevel())
+ if err != nil {
+ return nil, err
+ }
+ method, err := newMethod(
+ methodNamedDescriptor,
+ newOptionExtensionDescriptor(
+ methodDescriptorProto.GetOptions(),
+ ),
+ service,
+ strings.TrimPrefix(methodDescriptorProto.GetInputType(), "."),
+ strings.TrimPrefix(methodDescriptorProto.GetOutputType(), "."),
+ methodDescriptorProto.GetClientStreaming(),
+ methodDescriptorProto.GetServerStreaming(),
+ methodDescriptorProto.GetOptions().GetDeprecated(),
+ getMethodInputTypePath(serviceIndex, methodIndex),
+ getMethodOutputTypePath(serviceIndex, methodIndex),
+ idempotencyLevel,
+ getMethodIdempotencyLevelPath(serviceIndex, methodIndex),
+ )
+ if err != nil {
+ return nil, err
+ }
+ service.addMethod(method)
+ }
+ return service, nil
+}
+
+func (f *file) populateExtension(
+ fieldDescriptorProto *descriptorpb.FieldDescriptorProto,
+ fieldIndex int,
+) (Field, error) {
+ fieldNamedDescriptor, err := newNamedDescriptor(
+ newLocationDescriptor(
+ f.descriptor,
+ getFileExtensionPath(fieldIndex),
+ ),
+ fieldDescriptorProto.GetName(),
+ getFileExtensionNamePath(fieldIndex),
+ nil,
+ )
+ if err != nil {
+ return nil, err
+ }
+ var packed *bool
+ if fieldDescriptorProto.Options != nil {
+ packed = fieldDescriptorProto.GetOptions().Packed
+ }
+ label, err := getFieldDescriptorProtoLabel(fieldDescriptorProto.GetLabel())
+ if err != nil {
+ return nil, err
+ }
+ typ, err := getFieldDescriptorProtoType(fieldDescriptorProto.GetType())
+ if err != nil {
+ return nil, err
+ }
+ jsType, err := getFieldOptionsJSType(fieldDescriptorProto.GetOptions().GetJstype())
+ if err != nil {
+ return nil, err
+ }
+ cType, err := getFieldOptionsCType(fieldDescriptorProto.GetOptions().GetCtype())
+ if err != nil {
+ return nil, err
+ }
+ return newField(
+ fieldNamedDescriptor,
+ newOptionExtensionDescriptor(
+ fieldDescriptorProto.GetOptions(),
+ ),
+ nil,
+ int(fieldDescriptorProto.GetNumber()),
+ label,
+ typ,
+ strings.TrimPrefix(fieldDescriptorProto.GetTypeName(), "."),
+ strings.TrimPrefix(fieldDescriptorProto.GetExtendee(), "."),
+ nil,
+ fieldDescriptorProto.GetProto3Optional(),
+ fieldDescriptorProto.GetJsonName(),
+ jsType,
+ cType,
+ packed,
+ fieldDescriptorProto.GetOptions().GetDeprecated(),
+ getFileExtensionNumberPath(fieldIndex),
+ getFileExtensionTypePath(fieldIndex),
+ getFileExtensionTypeNamePath(fieldIndex),
+ getFileExtensionJSONNamePath(fieldIndex),
+ getFileExtensionJSTypePath(fieldIndex),
+ getFileExtensionCTypePath(fieldIndex),
+ getFileExtensionPackedPath(fieldIndex),
+ getFileExtensionExtendeePath(fieldIndex),
+ ), nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/file_import.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/file_import.go
new file mode 100644
index 000000000..f4e7c727e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/file_import.go
@@ -0,0 +1,74 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+import "fmt"
+
+type fileImport struct {
+ descriptor
+
+ imp string
+ isPublic bool
+ isWeak bool
+ isUnused bool
+ path []int32
+}
+
+func newFileImport(
+ descriptor descriptor,
+ imp string,
+ path []int32,
+) (*fileImport, error) {
+ if imp == "" {
+ return nil, fmt.Errorf("no dependency value in %q", descriptor.File().Path())
+ }
+ return &fileImport{
+ descriptor: descriptor,
+ imp: imp,
+ path: path,
+ }, nil
+}
+
+func (f *fileImport) Import() string {
+ return f.imp
+}
+
+func (f *fileImport) IsPublic() bool {
+ return f.isPublic
+}
+
+func (f *fileImport) IsWeak() bool {
+ return f.isWeak
+}
+
+func (f *fileImport) IsUnused() bool {
+ return f.isUnused
+}
+
+func (f *fileImport) Location() Location {
+ return f.getLocation(f.path)
+}
+
+func (f *fileImport) setIsPublic() {
+ f.isPublic = true
+}
+
+func (f *fileImport) setIsWeak() {
+ f.isWeak = true
+}
+
+func (f *fileImport) setIsUnused() {
+ f.isUnused = true
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/files.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/files.go
new file mode 100644
index 000000000..181127d65
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/files.go
@@ -0,0 +1,105 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/pkg/thread"
+ "go.uber.org/multierr"
+)
+
+const defaultChunkSizeThreshold = 8
+
+func newFilesUnstable(ctx context.Context, inputFiles ...InputFile) ([]File, error) {
+ if len(inputFiles) == 0 {
+ return nil, nil
+ }
+
+ chunkSize := len(inputFiles) / thread.Parallelism()
+ if defaultChunkSizeThreshold != 0 && chunkSize < defaultChunkSizeThreshold {
+ files := make([]File, 0, len(inputFiles))
+ for _, inputFile := range inputFiles {
+ file, err := NewFile(inputFile)
+ if err != nil {
+ return nil, err
+ }
+ files = append(files, file)
+ }
+ return files, nil
+ }
+
+ chunks := inputFilesToChunks(inputFiles, chunkSize)
+ resultC := make(chan *result, len(chunks))
+ for _, inputFileChunk := range chunks {
+ inputFileChunk := inputFileChunk
+ go func() {
+ files := make([]File, 0, len(inputFileChunk))
+ for _, inputFile := range inputFileChunk {
+ file, err := NewFile(inputFile)
+ if err != nil {
+ resultC <- newResult(nil, err)
+ return
+ }
+ files = append(files, file)
+ }
+ resultC <- newResult(files, nil)
+ }()
+ }
+ files := make([]File, 0, len(inputFiles))
+ var err error
+ for i := 0; i < len(chunks); i++ {
+ select {
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ case result := <-resultC:
+ files = append(files, result.Files...)
+ err = multierr.Append(err, result.Err)
+ }
+ }
+ if err != nil {
+ return nil, err
+ }
+ return files, nil
+}
+
+func inputFilesToChunks(s []InputFile, chunkSize int) [][]InputFile {
+ var chunks [][]InputFile
+ if len(s) == 0 {
+ return chunks
+ }
+ if chunkSize <= 0 {
+ return [][]InputFile{s}
+ }
+ c := make([]InputFile, len(s))
+ copy(c, s)
+ // https://github.com/golang/go/wiki/SliceTricks#batching-with-minimal-allocation
+ for chunkSize < len(c) {
+ c, chunks = c[chunkSize:], append(chunks, c[0:chunkSize:chunkSize])
+ }
+ return append(chunks, c)
+}
+
+type result struct {
+ Files []File
+ Err error
+}
+
+func newResult(files []File, err error) *result {
+ return &result{
+ Files: files,
+ Err: err,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/location.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/location.go
new file mode 100644
index 000000000..f8a9657e5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/location.go
@@ -0,0 +1,93 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+import "google.golang.org/protobuf/types/descriptorpb"
+
+type location struct {
+ sourceCodeInfoLocation *descriptorpb.SourceCodeInfo_Location
+}
+
+func newLocation(sourceCodeInfoLocation *descriptorpb.SourceCodeInfo_Location) *location {
+ return &location{
+ sourceCodeInfoLocation: sourceCodeInfoLocation,
+ }
+}
+
+func (l *location) StartLine() int {
+ switch len(l.sourceCodeInfoLocation.Span) {
+ case 3, 4:
+ return int(l.sourceCodeInfoLocation.Span[0]) + 1
+ default:
+ // since we are not erroring, making this and others 1 so that other code isn't messed up by assuming
+ // this is >= 1
+ return 1
+ }
+}
+
+func (l *location) StartColumn() int {
+ switch len(l.sourceCodeInfoLocation.Span) {
+ case 3, 4:
+ return int(l.sourceCodeInfoLocation.Span[1]) + 1
+ default:
+ // since we are not erroring, making this and others 1 so that other code isn't messed up by assuming
+ // this is >= 1
+ return 1
+ }
+}
+
+func (l *location) EndLine() int {
+ switch len(l.sourceCodeInfoLocation.Span) {
+ case 3:
+ return int(l.sourceCodeInfoLocation.Span[0]) + 1
+ case 4:
+ return int(l.sourceCodeInfoLocation.Span[2]) + 1
+ default:
+ // since we are not erroring, making this and others 1 so that other code isn't messed up by assuming
+ // this is >= 1
+ return 1
+ }
+}
+
+func (l *location) EndColumn() int {
+ switch len(l.sourceCodeInfoLocation.Span) {
+ case 3:
+ return int(l.sourceCodeInfoLocation.Span[2]) + 1
+ case 4:
+ return int(l.sourceCodeInfoLocation.Span[3]) + 1
+ default:
+ // since we are not erroring, making this and others 1 so that other code isn't messed up by assuming
+ // this is >= 1
+ return 1
+ }
+}
+
+func (l *location) LeadingComments() string {
+ if l.sourceCodeInfoLocation.LeadingComments == nil {
+ return ""
+ }
+ return *l.sourceCodeInfoLocation.LeadingComments
+}
+
+func (l *location) TrailingComments() string {
+ if l.sourceCodeInfoLocation.TrailingComments == nil {
+ return ""
+ }
+ return *l.sourceCodeInfoLocation.TrailingComments
+}
+
+func (l *location) LeadingDetachedComments() []string {
+ return l.sourceCodeInfoLocation.LeadingDetachedComments
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/location_descriptor.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/location_descriptor.go
new file mode 100644
index 000000000..12f656ed7
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/location_descriptor.go
@@ -0,0 +1,35 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+type locationDescriptor struct {
+ descriptor
+
+ path []int32
+}
+
+func newLocationDescriptor(
+ descriptor descriptor,
+ path []int32,
+) locationDescriptor {
+ return locationDescriptor{
+ descriptor: descriptor,
+ path: path,
+ }
+}
+
+func (l *locationDescriptor) Location() Location {
+ return l.getLocation(l.path)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/location_store.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/location_store.go
new file mode 100644
index 000000000..dc92effa6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/location_store.go
@@ -0,0 +1,104 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+import (
+ "sync"
+
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+type locationStore struct {
+ sourceCodeInfoLocations []*descriptorpb.SourceCodeInfo_Location
+
+ pathToLocation map[string]Location
+ pathToSourceCodeInfoLocation map[string]*descriptorpb.SourceCodeInfo_Location
+ locationLock sync.RWMutex
+ sourceCodeInfoLocationLock sync.RWMutex
+}
+
+func newLocationStore(sourceCodeInfoLocations []*descriptorpb.SourceCodeInfo_Location) *locationStore {
+ return &locationStore{
+ sourceCodeInfoLocations: sourceCodeInfoLocations,
+ pathToLocation: make(map[string]Location),
+ }
+}
+
+func (l *locationStore) getLocation(path []int32) Location {
+ return l.getLocationByPathKey(getPathKey(path))
+}
+
+// optimization for keys we know ahead of time such as package location, certain file options
+func (l *locationStore) getLocationByPathKey(pathKey string) Location {
+ // check cache first
+ l.locationLock.RLock()
+ location, ok := l.pathToLocation[pathKey]
+ l.locationLock.RUnlock()
+ if ok {
+ return location
+ }
+
+ // build index and get sourceCodeInfoLocation
+ l.sourceCodeInfoLocationLock.RLock()
+ pathToSourceCodeInfoLocation := l.pathToSourceCodeInfoLocation
+ l.sourceCodeInfoLocationLock.RUnlock()
+ if pathToSourceCodeInfoLocation == nil {
+ l.sourceCodeInfoLocationLock.Lock()
+ pathToSourceCodeInfoLocation = l.pathToSourceCodeInfoLocation
+ if pathToSourceCodeInfoLocation == nil {
+ pathToSourceCodeInfoLocation = make(map[string]*descriptorpb.SourceCodeInfo_Location)
+ for _, sourceCodeInfoLocation := range l.sourceCodeInfoLocations {
+ pathKey := getPathKey(sourceCodeInfoLocation.Path)
+ // - 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.
+ if _, ok := pathToSourceCodeInfoLocation[pathKey]; !ok {
+ pathToSourceCodeInfoLocation[pathKey] = sourceCodeInfoLocation
+ }
+ }
+ }
+ l.pathToSourceCodeInfoLocation = pathToSourceCodeInfoLocation
+ l.sourceCodeInfoLocationLock.Unlock()
+ }
+ sourceCodeInfoLocation, ok := pathToSourceCodeInfoLocation[pathKey]
+ if !ok {
+ return nil
+ }
+
+ // populate cache and return
+ if sourceCodeInfoLocation == nil {
+ location = nil
+ } else {
+ location = newLocation(sourceCodeInfoLocation)
+ }
+ l.locationLock.Lock()
+ l.pathToLocation[pathKey] = location
+ l.locationLock.Unlock()
+ return location
+}
+
+func getPathKey(path []int32) string {
+ key := make([]byte, len(path)*4)
+ j := 0
+ for _, elem := range path {
+ key[j] = byte(elem)
+ key[j+1] = byte(elem >> 8)
+ key[j+2] = byte(elem >> 16)
+ key[j+3] = byte(elem >> 24)
+ j += 4
+ }
+ return string(key)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/merge_comment_location.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/merge_comment_location.go
new file mode 100644
index 000000000..abf6dde42
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/merge_comment_location.go
@@ -0,0 +1,66 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+type mergeCommentLocation struct {
+ base Location
+ delegate Location
+ baseHasComments bool
+}
+
+func newMergeCommentLocation(base Location, delegate Location) *mergeCommentLocation {
+ return &mergeCommentLocation{
+ base: base,
+ delegate: delegate,
+ baseHasComments: base.LeadingComments() != "" || base.TrailingComments() != "" || len(base.LeadingDetachedComments()) > 0,
+ }
+}
+
+func (l *mergeCommentLocation) StartLine() int {
+ return l.base.StartLine()
+}
+
+func (l *mergeCommentLocation) StartColumn() int {
+ return l.base.StartColumn()
+}
+
+func (l *mergeCommentLocation) EndLine() int {
+ return l.base.EndLine()
+}
+
+func (l *mergeCommentLocation) EndColumn() int {
+ return l.base.EndColumn()
+}
+
+func (l *mergeCommentLocation) LeadingComments() string {
+ if l.baseHasComments {
+ return l.base.LeadingComments()
+ }
+ return l.delegate.LeadingComments()
+}
+
+func (l *mergeCommentLocation) TrailingComments() string {
+ if l.baseHasComments {
+ return l.base.TrailingComments()
+ }
+ return l.delegate.TrailingComments()
+}
+
+func (l *mergeCommentLocation) LeadingDetachedComments() []string {
+ if l.baseHasComments {
+ return l.base.LeadingDetachedComments()
+ }
+ return l.delegate.LeadingDetachedComments()
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/message.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/message.go
new file mode 100644
index 000000000..d610e3ec4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/message.go
@@ -0,0 +1,168 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+type message struct {
+ namedDescriptor
+ optionExtensionDescriptor
+
+ fields []Field
+ extensions []Field
+ nestedMessages []Message
+ nestedEnums []Enum
+ oneofs []Oneof
+ reservedMessageRanges []MessageRange
+ reservedNames []ReservedName
+ extensionRanges []ExtensionRange
+ parent Message
+ isMapEntry bool
+ messageSetWireFormat bool
+ noStandardDescriptorAccessor bool
+ deprecated bool
+ messageSetWireFormatPath []int32
+ noStandardDescriptorAccessorPath []int32
+}
+
+func newMessage(
+ namedDescriptor namedDescriptor,
+ optionExtensionDescriptor optionExtensionDescriptor,
+ parent Message,
+ isMapEntry bool,
+ messageSetWireFormat bool,
+ noStandardDescriptorAccessor bool,
+ deprecated bool,
+ messageSetWireFormatPath []int32,
+ noStandardDescriptorAccessorPath []int32,
+) *message {
+ return &message{
+ namedDescriptor: namedDescriptor,
+ optionExtensionDescriptor: optionExtensionDescriptor,
+ parent: parent,
+ isMapEntry: isMapEntry,
+ messageSetWireFormat: messageSetWireFormat,
+ noStandardDescriptorAccessor: noStandardDescriptorAccessor,
+ deprecated: deprecated,
+ messageSetWireFormatPath: messageSetWireFormatPath,
+ noStandardDescriptorAccessorPath: noStandardDescriptorAccessorPath,
+ }
+}
+
+func (m *message) Fields() []Field {
+ return m.fields
+}
+
+func (m *message) Extensions() []Field {
+ return m.extensions
+}
+
+func (m *message) Messages() []Message {
+ return m.nestedMessages
+}
+
+func (m *message) Enums() []Enum {
+ return m.nestedEnums
+}
+
+func (m *message) Oneofs() []Oneof {
+ return m.oneofs
+}
+
+func (m *message) ReservedMessageRanges() []MessageRange {
+ return m.reservedMessageRanges
+}
+
+func (m *message) ReservedTagRanges() []TagRange {
+ tagRanges := make([]TagRange, len(m.reservedMessageRanges))
+ for i, reservedMessageRange := range m.reservedMessageRanges {
+ tagRanges[i] = reservedMessageRange
+ }
+ return tagRanges
+}
+
+func (m *message) ReservedNames() []ReservedName {
+ return m.reservedNames
+}
+
+func (m *message) ExtensionRanges() []ExtensionRange {
+ return m.extensionRanges
+}
+
+func (m *message) ExtensionMessageRanges() []MessageRange {
+ extMsgRanges := make([]MessageRange, len(m.extensionRanges))
+ for i, extensionRange := range m.extensionRanges {
+ extMsgRanges[i] = extensionRange
+ }
+ return extMsgRanges
+}
+
+func (m *message) Parent() Message {
+ return m.parent
+}
+
+func (m *message) IsMapEntry() bool {
+ return m.isMapEntry
+}
+
+func (m *message) MessageSetWireFormat() bool {
+ return m.messageSetWireFormat
+}
+
+func (m *message) NoStandardDescriptorAccessor() bool {
+ return m.noStandardDescriptorAccessor
+}
+
+func (m *message) Deprecated() bool {
+ return m.deprecated
+}
+
+func (m *message) MessageSetWireFormatLocation() Location {
+ return m.getLocation(m.messageSetWireFormatPath)
+}
+
+func (m *message) NoStandardDescriptorAccessorLocation() Location {
+ return m.getLocation(m.noStandardDescriptorAccessorPath)
+}
+
+func (m *message) addField(field Field) {
+ m.fields = append(m.fields, field)
+}
+
+func (m *message) addExtension(extension Field) {
+ m.extensions = append(m.extensions, extension)
+}
+
+func (m *message) addNestedMessage(nestedMessage Message) {
+ m.nestedMessages = append(m.nestedMessages, nestedMessage)
+}
+
+func (m *message) addNestedEnum(nestedEnum Enum) {
+ m.nestedEnums = append(m.nestedEnums, nestedEnum)
+}
+
+func (m *message) addOneof(oneof Oneof) {
+ m.oneofs = append(m.oneofs, oneof)
+}
+
+func (m *message) addReservedMessageRange(reservedMessageRange MessageRange) {
+ m.reservedMessageRanges = append(m.reservedMessageRanges, reservedMessageRange)
+}
+
+func (m *message) addReservedName(reservedName ReservedName) {
+ m.reservedNames = append(m.reservedNames, reservedName)
+}
+
+func (m *message) addExtensionRange(extensionRange ExtensionRange) {
+ m.extensionRanges = append(m.extensionRanges, extensionRange)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/message_range.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/message_range.go
new file mode 100644
index 000000000..debe02071
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/message_range.go
@@ -0,0 +1,94 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+const (
+ messageRangeInclusiveMax = 536870911
+)
+
+type messageRange struct {
+ locationDescriptor
+
+ message Message
+ start int
+ end int
+}
+
+func newMessageRange(
+ locationDescriptor locationDescriptor,
+ message Message,
+ start int,
+ end int,
+) *messageRange {
+ return &messageRange{
+ locationDescriptor: locationDescriptor,
+ message: message,
+ start: start,
+ // end is exclusive for messages
+ end: end - 1,
+ }
+}
+
+func newFreeMessageRange(message Message, start int, endInclusive int) MessageRange {
+ return newMessageRange(
+ newLocationDescriptor(
+ newDescriptor(
+ message.File(),
+ nil,
+ ),
+ nil,
+ ),
+ message,
+ start,
+ // we expect exclusive for newMessageRange
+ endInclusive+1,
+ )
+}
+
+func (r *messageRange) Message() Message {
+ return r.message
+}
+
+func (r *messageRange) Start() int {
+ return r.start
+}
+
+func (r *messageRange) End() int {
+ return r.end
+}
+
+func (r *messageRange) Max() bool {
+ return r.end == messageRangeInclusiveMax
+}
+
+type extensionRange struct {
+ *messageRange
+ optionExtensionDescriptor
+}
+
+func newExtensionRange(
+ locationDescriptor locationDescriptor,
+ message Message,
+ start int,
+ end int,
+ opts optionExtensionDescriptor,
+) *extensionRange {
+ return &extensionRange{
+ messageRange: newMessageRange(
+ locationDescriptor, message, start, end,
+ ),
+ optionExtensionDescriptor: opts,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/method.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/method.go
new file mode 100644
index 000000000..6bacc64a5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/method.go
@@ -0,0 +1,109 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+import "fmt"
+
+type method struct {
+ namedDescriptor
+ optionExtensionDescriptor
+
+ service Service
+ inputTypeName string
+ outputTypeName string
+ clientStreaming bool
+ serverStreaming bool
+ deprecated bool
+ inputTypePath []int32
+ outputTypePath []int32
+ idempotencyLevel MethodOptionsIdempotencyLevel
+ idempotencyLevelPath []int32
+}
+
+func newMethod(
+ namedDescriptor namedDescriptor,
+ optionExtensionDescriptor optionExtensionDescriptor,
+ service Service,
+ inputTypeName string,
+ outputTypeName string,
+ clientStreaming bool,
+ serverStreaming bool,
+ deprecated bool,
+ inputTypePath []int32,
+ outputTypePath []int32,
+ idempotencyLevel MethodOptionsIdempotencyLevel,
+ idempotencyLevelPath []int32,
+) (*method, error) {
+ if inputTypeName == "" {
+ return nil, fmt.Errorf("no inputTypeName on %q", namedDescriptor.name)
+ }
+ if outputTypeName == "" {
+ return nil, fmt.Errorf("no outputTypeName on %q", namedDescriptor.name)
+ }
+ return &method{
+ namedDescriptor: namedDescriptor,
+ optionExtensionDescriptor: optionExtensionDescriptor,
+ service: service,
+ inputTypeName: inputTypeName,
+ outputTypeName: outputTypeName,
+ clientStreaming: clientStreaming,
+ serverStreaming: serverStreaming,
+ deprecated: deprecated,
+ inputTypePath: inputTypePath,
+ outputTypePath: outputTypePath,
+ idempotencyLevel: idempotencyLevel,
+ idempotencyLevelPath: idempotencyLevelPath,
+ }, nil
+}
+
+func (m *method) Service() Service {
+ return m.service
+}
+
+func (m *method) InputTypeName() string {
+ return m.inputTypeName
+}
+
+func (m *method) OutputTypeName() string {
+ return m.outputTypeName
+}
+
+func (m *method) ClientStreaming() bool {
+ return m.clientStreaming
+}
+
+func (m *method) ServerStreaming() bool {
+ return m.serverStreaming
+}
+
+func (m *method) Deprecated() bool {
+ return m.deprecated
+}
+
+func (m *method) InputTypeLocation() Location {
+ return m.getLocation(m.inputTypePath)
+}
+
+func (m *method) OutputTypeLocation() Location {
+ return m.getLocation(m.outputTypePath)
+}
+
+func (m *method) IdempotencyLevel() MethodOptionsIdempotencyLevel {
+ return m.idempotencyLevel
+}
+
+func (m *method) IdempotencyLevelLocation() Location {
+ return m.getLocation(m.idempotencyLevelPath)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/named_descriptor.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/named_descriptor.go
new file mode 100644
index 000000000..629c28cca
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/named_descriptor.go
@@ -0,0 +1,75 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+import (
+ "fmt"
+ "strings"
+)
+
+type namedDescriptor struct {
+ locationDescriptor
+
+ name string
+ namePath []int32
+ nestedNames []string
+}
+
+func newNamedDescriptor(
+ locationDescriptor locationDescriptor,
+ name string,
+ namePath []int32,
+ nestedNames []string,
+) (namedDescriptor, error) {
+ if name == "" {
+ return namedDescriptor{}, fmt.Errorf("no name in %q", locationDescriptor.File().Path())
+ }
+ return namedDescriptor{
+ locationDescriptor: locationDescriptor,
+ name: name,
+ namePath: namePath,
+ nestedNames: nestedNames,
+ }, nil
+}
+
+func (n *namedDescriptor) FullName() string {
+ if n.File().Package() != "" {
+ return n.File().Package() + "." + n.NestedName()
+ }
+ return n.NestedName()
+}
+
+func (n *namedDescriptor) NestedName() string {
+ if len(n.nestedNames) == 0 {
+ return n.Name()
+ }
+ return strings.Join(n.nestedNames, ".") + "." + n.Name()
+}
+
+func (n *namedDescriptor) Name() string {
+ return n.name
+}
+
+func (n *namedDescriptor) NameLocation() Location {
+ nameLocation := n.getLocation(n.namePath)
+ location := n.getLocation(n.path)
+ if nameLocation != nil {
+ if location != nil {
+ return newMergeCommentLocation(nameLocation, location)
+ }
+ return nameLocation
+ }
+ return location
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/oneof.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/oneof.go
new file mode 100644
index 000000000..2bd455c8b
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/oneof.go
@@ -0,0 +1,47 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+type oneof struct {
+ namedDescriptor
+ optionExtensionDescriptor
+
+ message Message
+ fields []Field
+}
+
+func newOneof(
+ namedDescriptor namedDescriptor,
+ optionExtensionDescriptor optionExtensionDescriptor,
+ message Message,
+) *oneof {
+ return &oneof{
+ namedDescriptor: namedDescriptor,
+ optionExtensionDescriptor: optionExtensionDescriptor,
+ message: message,
+ }
+}
+
+func (o *oneof) Message() Message {
+ return o.message
+}
+
+func (o *oneof) Fields() []Field {
+ return o.fields
+}
+
+func (o *oneof) addField(field Field) {
+ o.fields = append(o.fields, field)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/option_extension_descriptor.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/option_extension_descriptor.go
new file mode 100644
index 000000000..56f3e0483
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/option_extension_descriptor.go
@@ -0,0 +1,74 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+import (
+ "google.golang.org/protobuf/encoding/protowire"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+)
+
+type optionExtensionDescriptor struct {
+ message proto.Message
+}
+
+func newOptionExtensionDescriptor(message proto.Message) optionExtensionDescriptor {
+ return optionExtensionDescriptor{
+ message: message,
+ }
+}
+
+func (o *optionExtensionDescriptor) OptionExtension(extensionType protoreflect.ExtensionType) (interface{}, bool) {
+ if extensionType.TypeDescriptor().ContainingMessage().FullName() != o.message.ProtoReflect().Descriptor().FullName() {
+ return nil, false
+ }
+ if !proto.HasExtension(o.message, extensionType) {
+ return nil, false
+ }
+ return proto.GetExtension(o.message, extensionType), true
+}
+
+func (o *optionExtensionDescriptor) PresentExtensionNumbers() []int32 {
+ fieldNumbersSet := map[int32]struct{}{}
+ var fieldNumbers []int32
+ addFieldNumber := func(fieldNo int32) {
+ if _, ok := fieldNumbersSet[fieldNo]; !ok {
+ fieldNumbersSet[fieldNo] = struct{}{}
+ fieldNumbers = append(fieldNumbers, fieldNo)
+ }
+ }
+ msg := o.message.ProtoReflect()
+ extensionRanges := msg.Descriptor().ExtensionRanges()
+ for b := msg.GetUnknown(); len(b) > 0; {
+ fieldNo, _, n := protowire.ConsumeField(b)
+ if extensionRanges.Has(fieldNo) {
+ addFieldNumber(int32(fieldNo))
+ }
+ b = b[n:]
+ }
+ // Extensions for google.protobuf.*Options are a bit of a special case
+ // as the extensions in a FileDescriptorSet message may differ with
+ // the extensions defined in the proto with which buf is compiled.
+ //
+ // Also loop through known extensions here to get extension numbers.
+ msg.Range(func(fieldDescriptor protoreflect.FieldDescriptor, _ protoreflect.Value) bool {
+ if fieldDescriptor.IsExtension() {
+ addFieldNumber(int32(fieldDescriptor.Number()))
+ }
+ return true
+ })
+
+ return fieldNumbers
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/paths.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/paths.go
new file mode 100644
index 000000000..93d5c5d66
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/paths.go
@@ -0,0 +1,268 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+var (
+ csharpNamespacePathKey = getPathKey([]int32{8, 37})
+ goPackagePathKey = getPathKey([]int32{8, 11})
+ javaMultipleFilesPathKey = getPathKey([]int32{8, 10})
+ javaOuterClassnamePathKey = getPathKey([]int32{8, 8})
+ javaPackagePathKey = getPathKey([]int32{8, 1})
+ javaStringCheckUtf8PathKey = getPathKey([]int32{8, 27})
+ objcClassPrefixPathKey = getPathKey([]int32{8, 36})
+ packagePathKey = getPathKey([]int32{2})
+ phpClassPrefixPathKey = getPathKey([]int32{8, 40})
+ phpNamespacePathKey = getPathKey([]int32{8, 41})
+ phpMetadataNamespacePathKey = getPathKey([]int32{8, 44})
+ rubyPackagePathKey = getPathKey([]int32{8, 45})
+ swiftPrefixPathKey = getPathKey([]int32{8, 39})
+ optimizeForPathKey = getPathKey([]int32{8, 9})
+ ccGenericServicesPathKey = getPathKey([]int32{8, 16})
+ javaGenericServicesPathKey = getPathKey([]int32{8, 17})
+ pyGenericServicesPathKey = getPathKey([]int32{8, 18})
+ phpGenericServicesPathKey = getPathKey([]int32{8, 42})
+ ccEnableArenasPathKey = getPathKey([]int32{8, 31})
+ syntaxPathKey = getPathKey([]int32{12})
+)
+
+func getDependencyPath(dependencyIndex int) []int32 {
+ return []int32{3, int32(dependencyIndex)}
+}
+
+func getMessagePath(topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ path := []int32{4, int32(topLevelMessageIndex)}
+ for _, nestedMessageIndex := range nestedMessageIndexes {
+ path = append(path, 3, int32(nestedMessageIndex))
+ }
+ return path
+}
+
+func getMessageNamePath(messageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessagePath(messageIndex, nestedMessageIndexes...), 1)
+}
+
+func getMessageMessageSetWireFormatPath(messageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessagePath(messageIndex, nestedMessageIndexes...), 7, 1)
+}
+
+func getMessageNoStandardDescriptorAccessorPath(messageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessagePath(messageIndex, nestedMessageIndexes...), 7, 2)
+}
+
+func getMessageFieldPath(fieldIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessagePath(topLevelMessageIndex, nestedMessageIndexes...), 2, int32(fieldIndex))
+}
+
+func getMessageFieldNamePath(fieldIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageFieldPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...), 1)
+}
+
+func getMessageFieldNumberPath(fieldIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageFieldPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...), 3)
+}
+
+func getMessageFieldTypePath(fieldIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageFieldPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...), 5)
+}
+
+func getMessageFieldTypeNamePath(fieldIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageFieldPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...), 6)
+}
+
+func getMessageFieldJSONNamePath(fieldIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageFieldPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...), 10)
+}
+
+func getMessageFieldJSTypePath(fieldIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageFieldPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...), 8, 6)
+}
+
+func getMessageFieldCTypePath(fieldIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageFieldPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...), 8, 1)
+}
+
+func getMessageFieldPackedPath(fieldIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageFieldPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...), 8, 2)
+}
+
+func getMessageFieldExtendeePath(fieldIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageFieldPath(fieldIndex, topLevelMessageIndex, nestedMessageIndexes...), 2)
+}
+
+func getMessageExtensionPath(extensionIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessagePath(topLevelMessageIndex, nestedMessageIndexes...), 6, int32(extensionIndex))
+}
+
+func getMessageExtensionNamePath(extensionIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageExtensionPath(extensionIndex, topLevelMessageIndex, nestedMessageIndexes...), 1)
+}
+
+func getMessageExtensionNumberPath(extensionIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageExtensionPath(extensionIndex, topLevelMessageIndex, nestedMessageIndexes...), 3)
+}
+
+func getMessageExtensionTypePath(extensionIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageExtensionPath(extensionIndex, topLevelMessageIndex, nestedMessageIndexes...), 5)
+}
+
+func getMessageExtensionTypeNamePath(extensionIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageExtensionPath(extensionIndex, topLevelMessageIndex, nestedMessageIndexes...), 6)
+}
+
+func getMessageExtensionJSONNamePath(extensionIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageExtensionPath(extensionIndex, topLevelMessageIndex, nestedMessageIndexes...), 10)
+}
+
+func getMessageExtensionJSTypePath(extensionIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageExtensionPath(extensionIndex, topLevelMessageIndex, nestedMessageIndexes...), 8, 6)
+}
+
+func getMessageExtensionCTypePath(extensionIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageExtensionPath(extensionIndex, topLevelMessageIndex, nestedMessageIndexes...), 8, 1)
+}
+
+func getMessageExtensionPackedPath(extensionIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageExtensionPath(extensionIndex, topLevelMessageIndex, nestedMessageIndexes...), 8, 2)
+}
+
+func getMessageExtensionExtendeePath(extensionIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageExtensionPath(extensionIndex, topLevelMessageIndex, nestedMessageIndexes...), 2)
+}
+
+func getMessageOneofPath(oneofIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessagePath(topLevelMessageIndex, nestedMessageIndexes...), 8, int32(oneofIndex))
+}
+
+func getMessageOneofNamePath(oneofIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessageOneofPath(oneofIndex, topLevelMessageIndex, nestedMessageIndexes...), 1)
+}
+
+func getMessageReservedRangePath(reservedRangeIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessagePath(topLevelMessageIndex, nestedMessageIndexes...), 9, int32(reservedRangeIndex))
+}
+
+func getMessageReservedNamePath(reservedNameIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessagePath(topLevelMessageIndex, nestedMessageIndexes...), 10, int32(reservedNameIndex))
+}
+
+func getMessageExtensionRangePath(extensionRangeIndex int, topLevelMessageIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getMessagePath(topLevelMessageIndex, nestedMessageIndexes...), 5, int32(extensionRangeIndex))
+}
+
+func getEnumPath(enumIndex int, nestedMessageIndexes ...int) []int32 {
+ if len(nestedMessageIndexes) == 0 {
+ return []int32{5, int32(enumIndex)}
+ }
+ path := []int32{4, int32(nestedMessageIndexes[0])}
+ for _, nestedMessageIndex := range nestedMessageIndexes[1:] {
+ path = append(path, 3, int32(nestedMessageIndex))
+ }
+ return append(path, 4, int32(enumIndex))
+}
+func getEnumNamePath(enumIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getEnumPath(enumIndex, nestedMessageIndexes...), 1)
+}
+
+func getEnumAllowAliasPath(enumIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getEnumPath(enumIndex, nestedMessageIndexes...), 3, 2)
+}
+
+func getEnumValuePath(enumIndex int, enumValueIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getEnumPath(enumIndex, nestedMessageIndexes...), 2, int32(enumValueIndex))
+}
+
+func getEnumValueNamePath(enumIndex int, enumValueIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getEnumValuePath(enumIndex, enumValueIndex, nestedMessageIndexes...), 1)
+}
+
+func getEnumValueNumberPath(enumIndex int, enumValueIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getEnumValuePath(enumIndex, enumValueIndex, nestedMessageIndexes...), 2)
+}
+
+func getEnumReservedRangePath(enumIndex int, reservedRangeIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getEnumPath(enumIndex, nestedMessageIndexes...), 4, int32(reservedRangeIndex))
+}
+
+func getEnumReservedNamePath(enumIndex int, reservedNameIndex int, nestedMessageIndexes ...int) []int32 {
+ return append(getEnumPath(enumIndex, nestedMessageIndexes...), 5, int32(reservedNameIndex))
+}
+
+func getServicePath(serviceIndex int) []int32 {
+ return []int32{6, int32(serviceIndex)}
+}
+
+func getServiceNamePath(serviceIndex int) []int32 {
+ return append(getServicePath(serviceIndex), 1)
+}
+
+func getMethodPath(serviceIndex int, methodIndex int) []int32 {
+ return []int32{6, int32(serviceIndex), 2, int32(methodIndex)}
+}
+
+func getMethodNamePath(serviceIndex int, methodIndex int) []int32 {
+ return append(getMethodPath(serviceIndex, methodIndex), 1)
+}
+
+func getMethodInputTypePath(serviceIndex int, methodIndex int) []int32 {
+ return append(getMethodPath(serviceIndex, methodIndex), 2)
+}
+
+func getMethodOutputTypePath(serviceIndex int, methodIndex int) []int32 {
+ return append(getMethodPath(serviceIndex, methodIndex), 3)
+}
+
+func getMethodIdempotencyLevelPath(serviceIndex int, methodIndex int) []int32 {
+ return append(getMethodPath(serviceIndex, methodIndex), 4, 34)
+}
+
+func getFileExtensionPath(fieldIndex int) []int32 {
+ return []int32{7, int32(fieldIndex)}
+}
+
+func getFileExtensionNamePath(fieldIndex int) []int32 {
+ return append(getFileExtensionPath(fieldIndex), 1)
+}
+
+func getFileExtensionNumberPath(fieldIndex int) []int32 {
+ return append(getFileExtensionPath(fieldIndex), 3)
+}
+
+func getFileExtensionTypePath(fieldIndex int) []int32 {
+ return append(getFileExtensionPath(fieldIndex), 5)
+}
+
+func getFileExtensionTypeNamePath(fieldIndex int) []int32 {
+ return append(getFileExtensionPath(fieldIndex), 6)
+}
+
+func getFileExtensionJSONNamePath(fieldIndex int) []int32 {
+ return append(getFileExtensionPath(fieldIndex), 10)
+}
+
+func getFileExtensionJSTypePath(fieldIndex int) []int32 {
+ return append(getFileExtensionPath(fieldIndex), 8, 6)
+}
+
+func getFileExtensionCTypePath(fieldIndex int) []int32 {
+ return append(getFileExtensionPath(fieldIndex), 8, 1)
+}
+
+func getFileExtensionPackedPath(fieldIndex int) []int32 {
+ return append(getFileExtensionPath(fieldIndex), 8, 2)
+}
+
+func getFileExtensionExtendeePath(fieldIndex int) []int32 {
+ return append(getFileExtensionPath(fieldIndex), 2)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/protosource.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/protosource.go
new file mode 100644
index 000000000..4955f0ce6
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/protosource.go
@@ -0,0 +1,1134 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource defines minimal interfaces for Protobuf descriptor types.
+//
+// This is done so that the backing package can be swapped out easily.
+//
+// All values that return SourceLocation can be nil.
+//
+// Testing is currently implicitly done through the bufcheck packages, however
+// if this were to be split out into a separate library, it would need a separate
+// testing suite.
+package protosource
+
+import (
+ "context"
+ "fmt"
+ "sort"
+ "strconv"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/protodescriptor"
+ "google.golang.org/protobuf/reflect/protoreflect"
+)
+
+const (
+ // SyntaxUnspecified represents no syntax being specified.
+ //
+ // This is functionally equivalent to SyntaxProto2.
+ SyntaxUnspecified Syntax = iota + 1
+ // SyntaxProto2 represents the proto2 syntax.
+ SyntaxProto2
+ // SyntaxProto3 represents the proto3 syntax.
+ SyntaxProto3
+)
+
+// Syntax is the syntax of a file.
+type Syntax int
+
+// String returns the string representation of s
+func (s Syntax) String() string {
+ switch s {
+ case SyntaxUnspecified:
+ return "unspecified"
+ case SyntaxProto2:
+ return "proto2"
+ case SyntaxProto3:
+ return "proto3"
+ default:
+ return strconv.Itoa(int(s))
+ }
+}
+
+// Descriptor is the base interface for a descriptor type.
+type Descriptor interface {
+ // File returns the associated File.
+ //
+ // Always non-nil.
+ File() File
+}
+
+// LocationDescriptor is the base interface for a descriptor type with a location.
+type LocationDescriptor interface {
+ Descriptor
+
+ // Location returns the location of the entire descriptor.
+ //
+ // Can return nil, although will generally not be nil.
+ Location() Location
+}
+
+// NamedDescriptor is the base interface for a named descriptor type.
+type NamedDescriptor interface {
+ LocationDescriptor
+
+ // FullName returns the fully-qualified name, i.e. some.pkg.Nested.Message.FooEnum.ENUM_VALUE.
+ //
+ // Always non-empty.
+ FullName() string
+ // NestedName returns the full nested name without the package, i.e. Nested.Message.FooEnum
+ // or Nested.Message.FooEnum.ENUM_VALUE.
+ //
+ // Always non-empty.
+ NestedName() string
+ // Name returns the short name, or the name of a value or field, i.e. FooEnum or ENUM_VALUE.
+ //
+ // Always non-empty.
+ Name() string
+ // NameLocation returns the location of the name of the descriptor.
+ //
+ // If the backing descriptor does not have name-level resolution, this will
+ // attempt to return a location of the entire descriptor.
+ //
+ // If the backing descriptor has comments for the entire descriptor, these
+ // will be added to the named location.
+ //
+ // Can return nil.
+ NameLocation() Location
+}
+
+// ContainerDescriptor contains Enums and Messages.
+type ContainerDescriptor interface {
+ Enums() []Enum
+ Messages() []Message
+}
+
+// OptionExtensionDescriptor contains option extensions.
+type OptionExtensionDescriptor interface {
+ // OptionExtension returns the value for an options extension field.
+ //
+ // Returns false if the extension is not set.
+ //
+ // See https://pkg.go.dev/google.golang.org/protobuf/proto#HasExtension
+ // See https://pkg.go.dev/google.golang.org/protobuf/proto#GetExtension
+ OptionExtension(extensionType protoreflect.ExtensionType) (interface{}, bool)
+
+ // PresentExtensionNumbers returns field numbers for all options that
+ // have a set value on this descriptor.
+ PresentExtensionNumbers() []int32
+}
+
+// Location defines source code info location information.
+//
+// May be extended in the future to include comments.
+//
+// Note that unlike SourceCodeInfo_Location, these are not zero-indexed.
+type Location interface {
+ StartLine() int
+ StartColumn() int
+ EndLine() int
+ EndColumn() int
+ LeadingComments() string
+ TrailingComments() string
+ // NOT a copy. Do not modify.
+ LeadingDetachedComments() []string
+}
+
+// ModuleIdentity is a module identity.
+type ModuleIdentity interface {
+ Remote() string
+ Owner() string
+ Repository() string
+}
+
+// FileInfo contains Protobuf file info.
+type FileInfo interface {
+ // Path is the path of the file relative to the root it is contained within.
+ // This will be normalized, validated and never empty,
+ // This will be unique within a given Image.
+ Path() string
+ // ExternalPath returns the path that identifies this file externally.
+ //
+ // This will be unnormalized.
+ // Never empty. Falls back to Path if there is not an external path.
+ //
+ // Example:
+ // Assume we had the input path /foo/bar which is a local directory.
+
+ // Path: one/one.proto
+ // RootDirPath: proto
+ // ExternalPath: /foo/bar/proto/one/one.proto
+ ExternalPath() string
+ // ModuleIdentity is the module that this file came from.
+ //
+ // Note this *can* be nil if we did not build from a named module.
+ // All code must assume this can be nil.
+ // Note that nil checking should work since the backing type is always a pointer.
+ ModuleIdentity() ModuleIdentity
+ // Commit is the commit for the module that this file came from.
+ //
+ // This will only be set if ModuleIdentity is set, but may not be set
+ // even if ModuleIdentity is set, that is commit is optional information
+ // even if we know what module this file came from.
+ Commit() string
+}
+
+// File is a file descriptor.
+type File interface {
+ Descriptor
+ FileInfo
+
+ // Top-level only.
+ ContainerDescriptor
+ OptionExtensionDescriptor
+
+ Syntax() Syntax
+ Package() string
+ FileImports() []FileImport
+ Services() []Service
+ Extensions() []Field
+
+ CsharpNamespace() string
+ GoPackage() string
+ JavaMultipleFiles() bool
+ JavaOuterClassname() string
+ JavaPackage() string
+ JavaStringCheckUtf8() bool
+ ObjcClassPrefix() string
+ PhpClassPrefix() string
+ PhpNamespace() string
+ PhpMetadataNamespace() string
+ RubyPackage() string
+ SwiftPrefix() string
+ Deprecated() bool
+
+ OptimizeFor() FileOptionsOptimizeMode
+ CcGenericServices() bool
+ JavaGenericServices() bool
+ PyGenericServices() bool
+ PhpGenericServices() bool
+ CcEnableArenas() bool
+
+ SyntaxLocation() Location
+ PackageLocation() Location
+ CsharpNamespaceLocation() Location
+ GoPackageLocation() Location
+ JavaMultipleFilesLocation() Location
+ JavaOuterClassnameLocation() Location
+ JavaPackageLocation() Location
+ JavaStringCheckUtf8Location() Location
+ ObjcClassPrefixLocation() Location
+ PhpClassPrefixLocation() Location
+ PhpNamespaceLocation() Location
+ PhpMetadataNamespaceLocation() Location
+ RubyPackageLocation() Location
+ SwiftPrefixLocation() Location
+
+ OptimizeForLocation() Location
+ CcGenericServicesLocation() Location
+ JavaGenericServicesLocation() Location
+ PyGenericServicesLocation() Location
+ PhpGenericServicesLocation() Location
+ CcEnableArenasLocation() Location
+}
+
+// FileImport is a file import descriptor.
+type FileImport interface {
+ LocationDescriptor
+
+ Import() string
+ IsPublic() bool
+ IsWeak() bool
+ IsUnused() bool
+}
+
+// TagRange is a tag range from start to end.
+type TagRange interface {
+ LocationDescriptor
+
+ // Start is the start of the range.
+ Start() int
+ // End is the end of the range.
+ // Inclusive.
+ End() int
+ // Max says that the End is the max.
+ Max() bool
+}
+
+// ReservedName is a reserved name for an enum or message.
+type ReservedName interface {
+ LocationDescriptor
+
+ Value() string
+}
+
+// ReservedDescriptor has reserved ranges and names.
+type ReservedDescriptor interface {
+ ReservedTagRanges() []TagRange
+ ReservedNames() []ReservedName
+}
+
+// EnumRange is a TagRange for Enums.
+type EnumRange interface {
+ TagRange
+
+ Enum() Enum
+}
+
+// MessageRange is a TagRange for Messages.
+type MessageRange interface {
+ TagRange
+
+ Message() Message
+}
+
+// ExtensionRange represents an extension range in Messages.
+type ExtensionRange interface {
+ MessageRange
+ OptionExtensionDescriptor
+}
+
+// Enum is an enum descriptor.
+type Enum interface {
+ NamedDescriptor
+ ReservedDescriptor
+ OptionExtensionDescriptor
+
+ Values() []EnumValue
+ ReservedEnumRanges() []EnumRange
+
+ AllowAlias() bool
+ Deprecated() bool
+ AllowAliasLocation() Location
+
+ // Will return nil if this is a top-level Enum
+ Parent() Message
+}
+
+// EnumValue is an enum value descriptor.
+type EnumValue interface {
+ NamedDescriptor
+ OptionExtensionDescriptor
+
+ Enum() Enum
+ Number() int
+
+ Deprecated() bool
+ NumberLocation() Location
+}
+
+// Message is a message descriptor.
+type Message interface {
+ NamedDescriptor
+ // Only those directly nested under this message.
+ ContainerDescriptor
+ ReservedDescriptor
+ OptionExtensionDescriptor
+
+ // Includes fields in oneofs.
+ Fields() []Field
+ Extensions() []Field
+ Oneofs() []Oneof
+ ExtensionRanges() []ExtensionRange
+ ExtensionMessageRanges() []MessageRange
+ ReservedMessageRanges() []MessageRange
+
+ // Will return nil if this is a top-level message
+ Parent() Message
+ IsMapEntry() bool
+
+ MessageSetWireFormat() bool
+ NoStandardDescriptorAccessor() bool
+ Deprecated() bool
+ MessageSetWireFormatLocation() Location
+ NoStandardDescriptorAccessorLocation() Location
+}
+
+// Field is a field descriptor.
+type Field interface {
+ NamedDescriptor
+ OptionExtensionDescriptor
+
+ // May be nil if this is attached to a file.
+ Message() Message
+ Number() int
+ Label() FieldDescriptorProtoLabel
+ Type() FieldDescriptorProtoType
+ TypeName() string
+ // may be nil
+ Oneof() Oneof
+ Proto3Optional() bool
+ JSONName() string
+ JSType() FieldOptionsJSType
+ CType() FieldOptionsCType
+ // Set vs unset matters for packed
+ // See the comments on descriptor.proto
+ Packed() *bool
+ Deprecated() bool
+ // Empty string unless the field is part of an extension
+ Extendee() string
+
+ NumberLocation() Location
+ TypeLocation() Location
+ TypeNameLocation() Location
+ JSONNameLocation() Location
+ JSTypeLocation() Location
+ CTypeLocation() Location
+ PackedLocation() Location
+ ExtendeeLocation() Location
+}
+
+// Oneof is a oneof descriptor.
+type Oneof interface {
+ NamedDescriptor
+ OptionExtensionDescriptor
+
+ Message() Message
+ Fields() []Field
+}
+
+// Service is a service descriptor.
+type Service interface {
+ NamedDescriptor
+ OptionExtensionDescriptor
+
+ Methods() []Method
+ Deprecated() bool
+}
+
+// Method is a method descriptor.
+type Method interface {
+ NamedDescriptor
+ OptionExtensionDescriptor
+
+ Service() Service
+ InputTypeName() string
+ OutputTypeName() string
+ ClientStreaming() bool
+ ServerStreaming() bool
+ InputTypeLocation() Location
+ OutputTypeLocation() Location
+
+ Deprecated() bool
+ IdempotencyLevel() MethodOptionsIdempotencyLevel
+ IdempotencyLevelLocation() Location
+}
+
+// InputFile is an input file for NewFile.
+type InputFile interface {
+ FileInfo
+ // FileDescriptor is the backing FileDescriptor for this File.
+ //
+ // This will never be nil.
+ // The value Path() is equal to FileDescriptor().GetName() .
+ FileDescriptor() protodescriptor.FileDescriptor
+ // IsSyntaxUnspecified will be true if the syntax was not explicitly specified.
+ IsSyntaxUnspecified() bool
+ // UnusedDependencyIndexes returns the indexes of the unused dependencies within
+ // FileDescriptor.GetDependency().
+ //
+ // All indexes will be valid.
+ // Will return nil if empty.
+ UnusedDependencyIndexes() []int32
+}
+
+// NewFile returns a new File.
+func NewFile(inputFile InputFile) (File, error) {
+ return newFile(inputFile)
+}
+
+// NewFilesUnstable converts the input Files into Files.
+//
+// This may be done concurrently and the returned Files may not be in the same
+// order as the input FileDescriptors. If ordering matters, use NewFile.
+func NewFilesUnstable(ctx context.Context, inputFiles ...InputFile) ([]File, error) {
+ return newFilesUnstable(ctx, inputFiles...)
+}
+
+// SortFiles sorts the Files by FilePath.
+func SortFiles(files []File) {
+ sort.Slice(files, func(i int, j int) bool { return files[i].Path() < files[j].Path() })
+}
+
+// FilePathToFile maps the Files to a map from Path() to File.
+//
+// Returns error if file paths are not unique.
+func FilePathToFile(files ...File) (map[string]File, error) {
+ filePathToFile := make(map[string]File, len(files))
+ for _, file := range files {
+ filePath := file.Path()
+ if _, ok := filePathToFile[filePath]; ok {
+ return nil, fmt.Errorf("duplicate filePath: %q", filePath)
+ }
+ filePathToFile[filePath] = file
+ }
+ return filePathToFile, nil
+}
+
+// DirPathToFiles maps the Files to a map from directory
+// to the slice of Files in that directory.
+//
+// Returns error if file paths are not unique.
+// Directories are normalized.
+//
+// Files will be sorted by FilePath.
+func DirPathToFiles(files ...File) (map[string][]File, error) {
+ return mapFiles(files, func(file File) string { return normalpath.Dir(file.Path()) })
+}
+
+// PackageToFiles maps the Files to a map from Protobuf package
+// to the slice of Files in that package.
+//
+// Returns error if file paths are not unique.
+//
+// Files will be sorted by Path.
+func PackageToFiles(files ...File) (map[string][]File, error) {
+ // works for no package since "" is a valid map key
+ return mapFiles(files, File.Package)
+}
+
+// ForEachEnum calls f on each Enum in the given ContainerDescriptor, including nested Enums.
+//
+// Returns error and stops iterating if f returns error
+// Never returns error unless f returns error.
+func ForEachEnum(f func(Enum) error, containerDescriptor ContainerDescriptor) error {
+ for _, enum := range containerDescriptor.Enums() {
+ if err := f(enum); err != nil {
+ return err
+ }
+ }
+ for _, message := range containerDescriptor.Messages() {
+ if err := ForEachEnum(f, message); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// ForEachMessage calls f on each Message in the given ContainerDescriptor, including nested Messages.
+//
+// Returns error and stops iterating if f returns error
+// Never returns error unless f returns error.
+func ForEachMessage(f func(Message) error, containerDescriptor ContainerDescriptor) error {
+ for _, message := range containerDescriptor.Messages() {
+ if err := f(message); err != nil {
+ return err
+ }
+ if err := ForEachMessage(f, message); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// NestedNameToEnum maps the Enums in the ContainerDescriptor to a map from
+// nested name to Enum.
+//
+// Returns error if Enums do not have unique nested names within the ContainerDescriptor,
+// which should generally never happen for properly-formed ContainerDescriptors.
+func NestedNameToEnum(containerDescriptor ContainerDescriptor) (map[string]Enum, error) {
+ nestedNameToEnum := make(map[string]Enum)
+ if err := ForEachEnum(
+ func(enum Enum) error {
+ nestedName := enum.NestedName()
+ if _, ok := nestedNameToEnum[nestedName]; ok {
+ return fmt.Errorf("duplicate enum: %q", nestedName)
+ }
+ nestedNameToEnum[nestedName] = enum
+ return nil
+ },
+ containerDescriptor,
+ ); err != nil {
+ return nil, err
+ }
+ return nestedNameToEnum, nil
+}
+
+// FullNameToEnum maps the Enums in the Files to a map from full name to enum.
+//
+// Returns error if the Enums do not have unique full names within the Files,
+// which should generally never happen for properly-formed Files.
+func FullNameToEnum(files ...File) (map[string]Enum, error) {
+ fullNameToEnum := make(map[string]Enum)
+ for _, file := range files {
+ if err := ForEachEnum(
+ func(enum Enum) error {
+ fullName := enum.FullName()
+ if _, ok := fullNameToEnum[fullName]; ok {
+ return fmt.Errorf("duplicate enum: %q", fullName)
+ }
+ fullNameToEnum[fullName] = enum
+ return nil
+ },
+ file,
+ ); err != nil {
+ return nil, err
+ }
+ }
+ return fullNameToEnum, nil
+}
+
+// PackageToNestedNameToEnum maps the Enums in the Files to a map from
+// package to nested name to Enum.
+//
+// Returns error if the Enums do not have unique nested names within the packages,
+// which should generally never happen for properly-formed Files.
+func PackageToNestedNameToEnum(files ...File) (map[string]map[string]Enum, error) {
+ packageToNestedNameToEnum := make(map[string]map[string]Enum)
+ for _, file := range files {
+ if err := ForEachEnum(
+ func(enum Enum) error {
+ pkg := enum.File().Package()
+ nestedName := enum.NestedName()
+ nestedNameToEnum, ok := packageToNestedNameToEnum[pkg]
+ if !ok {
+ nestedNameToEnum = make(map[string]Enum)
+ packageToNestedNameToEnum[pkg] = nestedNameToEnum
+ }
+ if _, ok := nestedNameToEnum[nestedName]; ok {
+ return fmt.Errorf("duplicate enum in package %q: %q", pkg, nestedName)
+ }
+ nestedNameToEnum[nestedName] = enum
+ return nil
+ },
+ file,
+ ); err != nil {
+ return nil, err
+ }
+ }
+ return packageToNestedNameToEnum, nil
+}
+
+// NameToEnumValue maps the EnumValues in the Enum to a map from name to EnumValue.
+//
+// Returns error if the EnumValues do not have unique names within the Enum,
+// which should generally never happen for properly-formed Enums.
+func NameToEnumValue(enum Enum) (map[string]EnumValue, error) {
+ nameToEnumValue := make(map[string]EnumValue)
+ for _, enumValue := range enum.Values() {
+ name := enumValue.Name()
+ if _, ok := nameToEnumValue[name]; ok {
+ return nil, fmt.Errorf("duplicate enum value name for enum %q: %q", enum.NestedName(), name)
+ }
+ nameToEnumValue[name] = enumValue
+ }
+ return nameToEnumValue, nil
+}
+
+// NumberToNameToEnumValue maps the EnumValues in the Enum to a map from number to name to EnumValue.
+//
+// Duplicates by number may occur if allow_alias = true.
+//
+// Returns error if the EnumValues do not have unique names within the Enum for a given number,
+// which should generally never happen for properly-formed Enums.
+func NumberToNameToEnumValue(enum Enum) (map[int]map[string]EnumValue, error) {
+ numberToNameToEnumValue := make(map[int]map[string]EnumValue)
+ for _, enumValue := range enum.Values() {
+ number := enumValue.Number()
+ nameToEnumValue, ok := numberToNameToEnumValue[number]
+ if !ok {
+ nameToEnumValue = make(map[string]EnumValue)
+ numberToNameToEnumValue[number] = nameToEnumValue
+ }
+ name := enumValue.Name()
+ if _, ok := nameToEnumValue[name]; ok {
+ return nil, fmt.Errorf("duplicate enum value name for enum %q: %q", enum.NestedName(), name)
+ }
+ nameToEnumValue[name] = enumValue
+ }
+ return numberToNameToEnumValue, nil
+}
+
+// NestedNameToMessage maps the Messages in the ContainerDescriptor to a map from
+// nested name to Message.
+//
+// Returns error if Messages do not have unique nested names within the ContainerDescriptor,
+// which should generally never happen for properly-formed files.
+func NestedNameToMessage(containerDescriptor ContainerDescriptor) (map[string]Message, error) {
+ nestedNameToMessage := make(map[string]Message)
+ if err := ForEachMessage(
+ func(message Message) error {
+ nestedName := message.NestedName()
+ if _, ok := nestedNameToMessage[nestedName]; ok {
+ return fmt.Errorf("duplicate message: %q", nestedName)
+ }
+ nestedNameToMessage[nestedName] = message
+ return nil
+ },
+ containerDescriptor,
+ ); err != nil {
+ return nil, err
+ }
+ return nestedNameToMessage, nil
+}
+
+// FullNameToMessage maps the Messages in the Files to a map from full name to message.
+//
+// Returns error if the Messages do not have unique full names within the Files,
+// which should generally never happen for properly-formed Files.
+func FullNameToMessage(files ...File) (map[string]Message, error) {
+ fullNameToMessage := make(map[string]Message)
+ for _, file := range files {
+ if err := ForEachMessage(
+ func(message Message) error {
+ fullName := message.FullName()
+ if _, ok := fullNameToMessage[fullName]; ok {
+ return fmt.Errorf("duplicate message: %q", fullName)
+ }
+ fullNameToMessage[fullName] = message
+ return nil
+ },
+ file,
+ ); err != nil {
+ return nil, err
+ }
+ }
+ return fullNameToMessage, nil
+}
+
+// PackageToNestedNameToMessage maps the Messages in the Files to a map from
+// package to nested name to Message.
+//
+// Returns error if the Messages do not have unique nested names within the packages,
+// which should generally never happen for properly-formed Files.
+func PackageToNestedNameToMessage(files ...File) (map[string]map[string]Message, error) {
+ packageToNestedNameToMessage := make(map[string]map[string]Message)
+ for _, file := range files {
+ if err := ForEachMessage(
+ func(message Message) error {
+ pkg := message.File().Package()
+ nestedName := message.NestedName()
+ nestedNameToMessage, ok := packageToNestedNameToMessage[pkg]
+ if !ok {
+ nestedNameToMessage = make(map[string]Message)
+ packageToNestedNameToMessage[pkg] = nestedNameToMessage
+ }
+ if _, ok := nestedNameToMessage[nestedName]; ok {
+ return fmt.Errorf("duplicate message in package %q: %q", pkg, nestedName)
+ }
+ nestedNameToMessage[nestedName] = message
+ return nil
+ },
+ file,
+ ); err != nil {
+ return nil, err
+ }
+ }
+ return packageToNestedNameToMessage, nil
+}
+
+// NumberToMessageField maps the Fields in the Message to a map from number to Field.
+//
+// TODO: is this right?
+// Includes extensions.
+//
+// Returns error if the Fields do not have unique numbers within the Message,
+// which should generally never happen for properly-formed Messages.
+func NumberToMessageField(message Message) (map[int]Field, error) {
+ numberToMessageField := make(map[int]Field)
+ for _, messageField := range message.Fields() {
+ number := messageField.Number()
+ if _, ok := numberToMessageField[number]; ok {
+ return nil, fmt.Errorf("duplicate message field: %d", number)
+ }
+ numberToMessageField[number] = messageField
+ }
+ for _, messageField := range message.Extensions() {
+ if messageField.Extendee() != message.FullName() {
+ // TODO: ideally we want this field to be returned when
+ // the Extendee message is passed into some function,
+ // need to investigate what index is necessary for that.
+ continue
+ }
+ number := messageField.Number()
+ if _, ok := numberToMessageField[number]; ok {
+ return nil, fmt.Errorf("duplicate message field: %d", number)
+ }
+ numberToMessageField[number] = messageField
+ }
+ return numberToMessageField, nil
+}
+
+// NumberToMessageFieldForLabel maps the Fields with the given label in the message
+// to a map from number to Field.
+//
+// TODO: is this right?
+// Includes extensions.
+//
+// Returns error if the Fields do not have unique numbers within the Message,
+// which should generally never happen for properly-formed Messages.
+func NumberToMessageFieldForLabel(message Message, label FieldDescriptorProtoLabel) (map[int]Field, error) {
+ numberToField, err := NumberToMessageField(message)
+ if err != nil {
+ return nil, err
+ }
+ for number, field := range numberToField {
+ if field.Label() != label {
+ delete(numberToField, number)
+ }
+ }
+ return numberToField, nil
+}
+
+// NameToMessageOneof maps the Oneofs in the Message to a map from name to Oneof.
+//
+// Returns error if the Oneofs do not have unique names within the Message,
+// which should generally never happen for properly-formed Messages.
+func NameToMessageOneof(message Message) (map[string]Oneof, error) {
+ nameToMessageOneof := make(map[string]Oneof)
+ for _, messageOneof := range message.Oneofs() {
+ name := messageOneof.Name()
+ if _, ok := nameToMessageOneof[name]; ok {
+ return nil, fmt.Errorf("duplicate message oneof: %q", name)
+ }
+ nameToMessageOneof[name] = messageOneof
+ }
+ return nameToMessageOneof, nil
+}
+
+// NameToService maps the Services in the File to a map from name to Service.
+//
+// Returns error if Services do not have unique names within the File, which should
+// generally never happen for properly-formed Files.
+func NameToService(file File) (map[string]Service, error) {
+ nameToService := make(map[string]Service)
+ for _, service := range file.Services() {
+ name := service.Name()
+ if _, ok := nameToService[name]; ok {
+ return nil, fmt.Errorf("duplicate service: %q", name)
+ }
+ nameToService[name] = service
+ }
+ return nameToService, nil
+}
+
+// FullNameToService maps the Services in the Files to a map from full name to Service.
+//
+// Returns error if Services do not have unique full names within the Files, which should
+// generally never happen for properly-formed Files.
+func FullNameToService(files ...File) (map[string]Service, error) {
+ fullNameToService := make(map[string]Service)
+ for _, file := range files {
+ for _, service := range file.Services() {
+ fullName := service.FullName()
+ if _, ok := fullNameToService[fullName]; ok {
+ return nil, fmt.Errorf("duplicate service: %q", fullName)
+ }
+ fullNameToService[fullName] = service
+ }
+ }
+ return fullNameToService, nil
+}
+
+// PackageToNameToService maps the Services in the Files to a map from
+// package to name to Service.
+//
+// Returns error if the Services do not have unique names within the packages,
+// which should generally never happen for properly-formed Files.
+func PackageToNameToService(files ...File) (map[string]map[string]Service, error) {
+ packageToNameToService := make(map[string]map[string]Service)
+ for _, file := range files {
+ pkg := file.Package()
+ nameToService, ok := packageToNameToService[pkg]
+ if !ok {
+ nameToService = make(map[string]Service)
+ packageToNameToService[pkg] = nameToService
+ }
+ for _, service := range file.Services() {
+ name := service.Name()
+ if _, ok := nameToService[name]; ok {
+ return nil, fmt.Errorf("duplicate service in package %q: %q", pkg, name)
+ }
+ nameToService[name] = service
+ }
+ }
+ return packageToNameToService, nil
+}
+
+// PackageToDirectlyImportedPackageToFileImports maps packages to directly imported packages
+// to the FileImports that import this package.
+//
+// For example, if package a imports package b via c/d.proto and c/e.proto, this will have
+// a -> b -> [c/d.proto, c/e.proto].
+//
+// A directly imported package will not be equal to the package, i.e. there will be no a -> a.
+//
+// Files with no packages are included with key "" to be consistent with other functions.
+func PackageToDirectlyImportedPackageToFileImports(files ...File) (map[string]map[string][]FileImport, error) {
+ filePathToFile, err := FilePathToFile(files...)
+ if err != nil {
+ return nil, err
+ }
+ packageToDirectlyImportedPackageToFileImports := make(map[string]map[string][]FileImport)
+ for _, file := range files {
+ pkg := file.Package()
+ directlyImportedPackageToFileImports, ok := packageToDirectlyImportedPackageToFileImports[pkg]
+ if !ok {
+ directlyImportedPackageToFileImports = make(map[string][]FileImport)
+ packageToDirectlyImportedPackageToFileImports[pkg] = directlyImportedPackageToFileImports
+ }
+ for _, fileImport := range file.FileImports() {
+ if importedFile, ok := filePathToFile[fileImport.Import()]; ok {
+ importedPkg := importedFile.Package()
+ if importedPkg != pkg {
+ directlyImportedPackageToFileImports[importedFile.Package()] = append(
+ directlyImportedPackageToFileImports[importedPkg],
+ fileImport,
+ )
+ }
+ }
+ }
+ }
+ return packageToDirectlyImportedPackageToFileImports, nil
+}
+
+// NameToMethod maps the Methods in the Service to a map from name to Method.
+//
+// Returns error if Methods do not have unique names within the Service, which should
+// generally never happen for properly-formed Services.
+func NameToMethod(service Service) (map[string]Method, error) {
+ nameToMethod := make(map[string]Method)
+ for _, method := range service.Methods() {
+ name := method.Name()
+ if _, ok := nameToMethod[name]; ok {
+ return nil, fmt.Errorf("duplicate method: %q", name)
+ }
+ nameToMethod[name] = method
+ }
+ return nameToMethod, nil
+}
+
+// FullNameToMethod maps the Methods in the Files to a map from full name to Method.
+//
+// Returns error if Methods do not have unique full names within the Files, which should
+// generally never happen for properly-formed Files.
+func FullNameToMethod(files ...File) (map[string]Method, error) {
+ fullNameToMethod := make(map[string]Method)
+ for _, file := range files {
+ for _, service := range file.Services() {
+ for _, method := range service.Methods() {
+ fullName := method.FullName()
+ if _, ok := fullNameToMethod[fullName]; ok {
+ return nil, fmt.Errorf("duplicate method: %q", fullName)
+ }
+ fullNameToMethod[fullName] = method
+ }
+ }
+ }
+ return fullNameToMethod, nil
+}
+
+// StringToReservedTagRange maps the ReservedTagRanges in the ReservedDescriptor to a map
+// from string string to reserved TagRange.
+//
+// Ignores duplicates.
+func StringToReservedTagRange(reservedDescriptor ReservedDescriptor) map[string]TagRange {
+ stringToReservedTagRange := make(map[string]TagRange)
+ for _, reservedTagRange := range reservedDescriptor.ReservedTagRanges() {
+ stringToReservedTagRange[TagRangeString(reservedTagRange)] = reservedTagRange
+ }
+ return stringToReservedTagRange
+}
+
+// ValueToReservedName maps the ReservedNames in the ReservedDescriptor to a map
+// from string value to ReservedName.
+//
+// Ignores duplicates.
+func ValueToReservedName(reservedDescriptor ReservedDescriptor) map[string]ReservedName {
+ valueToReservedName := make(map[string]ReservedName)
+ for _, reservedName := range reservedDescriptor.ReservedNames() {
+ valueToReservedName[reservedName.Value()] = reservedName
+ }
+ return valueToReservedName
+}
+
+// StringToExtensionMessageRange maps the ExtensionMessageRanges in the Message to a map
+// from string string to ExtensionMessageRange.
+//
+// Ignores duplicates.
+func StringToExtensionMessageRange(message Message) map[string]MessageRange {
+ stringToExtensionMessageRange := make(map[string]MessageRange)
+ for _, extensionMessageRange := range message.ExtensionMessageRanges() {
+ stringToExtensionMessageRange[TagRangeString(extensionMessageRange)] = extensionMessageRange
+ }
+ return stringToExtensionMessageRange
+}
+
+// NumberInReservedRanges returns true if the number is in one of the Ranges.
+func NumberInReservedRanges(number int, reservedRanges ...TagRange) bool {
+ for _, reservedRange := range reservedRanges {
+ start := reservedRange.Start()
+ end := reservedRange.End()
+ if number >= start && number <= end {
+ return true
+ }
+ }
+ return false
+}
+
+// NameInReservedNames returns true if the name is in one of the ReservedNames.
+func NameInReservedNames(name string, reservedNames ...ReservedName) bool {
+ for _, reservedName := range reservedNames {
+ if name == reservedName.Value() {
+ return true
+ }
+ }
+ return false
+}
+
+// EnumIsSubset checks if subsetEnum is a subset of supersetEnum.
+func EnumIsSubset(supersetEnum Enum, subsetEnum Enum) (bool, error) {
+ supersetNameToEnumValue, err := NameToEnumValue(supersetEnum)
+ if err != nil {
+ return false, err
+ }
+ subsetNameToEnumValue, err := NameToEnumValue(subsetEnum)
+ if err != nil {
+ return false, err
+ }
+ for subsetName, subsetEnumValue := range subsetNameToEnumValue {
+ supersetEnumValue, ok := supersetNameToEnumValue[subsetName]
+ if !ok {
+ // The enum value does not exist by name, this is not a superset.
+ return false, nil
+ }
+ if subsetEnumValue.Number() != supersetEnumValue.Number() {
+ // The enum values are not equal, this is not a superset.
+ return false, nil
+ }
+ }
+ // All enum values by name exist in the superset and have the same number,
+ // subsetEnum is a subset of supersetEnum.
+ return true, nil
+}
+
+// TagRangeString returns the string representation of the range.
+func TagRangeString(tagRange TagRange) string {
+ start := tagRange.Start()
+ end := tagRange.End()
+ if start == end {
+ return fmt.Sprintf("[%d]", start)
+ }
+ if tagRange.Max() {
+ return fmt.Sprintf("[%d,max]", start)
+ }
+ return fmt.Sprintf("[%d,%d]", start, end)
+}
+
+// FreeMessageRangeString returns the string representation of the free ranges for the message.
+func FreeMessageRangeString(message Message) string {
+ freeRanges := FreeMessageRanges(message)
+ if len(freeRanges) == 0 {
+ return ""
+ }
+ suffixes := make([]string, len(freeRanges))
+ for i, freeRange := range freeRanges {
+ suffixes[i] = freeMessageRangeStringSuffix(freeRange)
+ }
+ return fmt.Sprintf(
+ "%- 35s free: %s",
+ freeRanges[0].Message().FullName(),
+ strings.Join(suffixes, " "),
+ )
+}
+
+// FreeMessageRanges returns the free message ranges for the given message.
+//
+// Not recursive.
+func FreeMessageRanges(message Message) []MessageRange {
+ used := append(
+ message.ReservedMessageRanges(),
+ message.ExtensionMessageRanges()...,
+ )
+ for _, field := range message.Fields() {
+ used = append(
+ used,
+ newFreeMessageRange(message, field.Number(), field.Number()),
+ )
+ }
+ sort.Slice(used, func(i, j int) bool {
+ return used[i].Start() < used[j].Start()
+ })
+ // now compute the inverse (unused ranges)
+ unused := make([]MessageRange, 0, len(used)+1)
+ last := 0
+ for _, r := range used {
+ if r.Start() <= last+1 {
+ last = r.End()
+ continue
+ }
+ unused = append(
+ unused,
+ newFreeMessageRange(message, last+1, r.Start()-1),
+ )
+ last = r.End()
+ }
+ if last < messageRangeInclusiveMax {
+ unused = append(
+ unused,
+ newFreeMessageRange(message, last+1, messageRangeInclusiveMax),
+ )
+ }
+ return unused
+}
+
+func freeMessageRangeStringSuffix(freeRange MessageRange) string {
+ start := freeRange.Start()
+ end := freeRange.End()
+ if start == end {
+ return fmt.Sprintf("%d", start)
+ }
+ if freeRange.Max() {
+ return fmt.Sprintf("%d-INF", start)
+ }
+ return fmt.Sprintf("%d-%d", start, end)
+}
+
+func mapFiles(files []File, getKey func(File) string) (map[string][]File, error) {
+ keyToFilePathToFile := make(map[string]map[string]File)
+ for _, file := range files {
+ if err := addUniqueFileToMap(keyToFilePathToFile, getKey(file), file); err != nil {
+ return nil, err
+ }
+ }
+ return mapToSortedFiles(keyToFilePathToFile), nil
+}
+
+func addUniqueFileToMap(keyToFilePathToFile map[string]map[string]File, key string, file File) error {
+ filePathToFile, ok := keyToFilePathToFile[key]
+ if !ok {
+ filePathToFile = make(map[string]File)
+ keyToFilePathToFile[key] = filePathToFile
+ }
+ if _, ok := filePathToFile[file.Path()]; ok {
+ return fmt.Errorf("duplicate file: %s", file.Path())
+ }
+ filePathToFile[file.Path()] = file
+ return nil
+}
+
+func mapToSortedFiles(keyToFileMap map[string]map[string]File) map[string][]File {
+ keyToSortedFiles := make(map[string][]File, len(keyToFileMap))
+ for key, fileMap := range keyToFileMap {
+ files := make([]File, 0, len(fileMap))
+ for _, file := range fileMap {
+ files = append(files, file)
+ }
+ SortFiles(files)
+ keyToSortedFiles[key] = files
+ }
+ return keyToSortedFiles
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/reserved_name.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/reserved_name.go
new file mode 100644
index 000000000..a33ac5e81
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/reserved_name.go
@@ -0,0 +1,40 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+import "fmt"
+
+type reservedName struct {
+ locationDescriptor
+
+ value string
+}
+
+func newReservedName(
+ locationDescriptor locationDescriptor,
+ value string,
+) (*reservedName, error) {
+ if value == "" {
+ return nil, fmt.Errorf("no value for reserved name in %q", locationDescriptor.File().Path())
+ }
+ return &reservedName{
+ locationDescriptor: locationDescriptor,
+ value: value,
+ }, nil
+}
+
+func (r *reservedName) Value() string {
+ return r.value
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/service.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/service.go
new file mode 100644
index 000000000..356328114
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/service.go
@@ -0,0 +1,47 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protosource
+
+type service struct {
+ namedDescriptor
+ optionExtensionDescriptor
+
+ methods []Method
+ deprecated bool
+}
+
+func newService(
+ namedDescriptor namedDescriptor,
+ optionExtensionDescriptor optionExtensionDescriptor,
+ deprecated bool,
+) *service {
+ return &service{
+ namedDescriptor: namedDescriptor,
+ optionExtensionDescriptor: optionExtensionDescriptor,
+ deprecated: deprecated,
+ }
+}
+
+func (m *service) Methods() []Method {
+ return m.methods
+}
+
+func (m *service) addMethod(method Method) {
+ m.methods = append(m.methods, method)
+}
+
+func (m *service) Deprecated() bool {
+ return m.deprecated
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protosource/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/protosource/usage.gen.go
new file mode 100644
index 000000000..a9293eff2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protosource/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package protosource
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/prototime/prototime.go b/vendor/github.com/bufbuild/buf/private/pkg/prototime/prototime.go
new file mode 100644
index 000000000..6def8a1e2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/prototime/prototime.go
@@ -0,0 +1,31 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 prototime
+
+import (
+ "time"
+
+ "google.golang.org/protobuf/types/known/timestamppb"
+)
+
+// NewTimestamp creates a new proto WKT timestamp from a time.Time.
+// It runs CheckValid() on the timestamp before returning.
+func NewTimestamp(t time.Time) (*timestamppb.Timestamp, error) {
+ timestamp := timestamppb.New(t)
+ if err := timestamp.CheckValid(); err != nil {
+ return nil, err
+ }
+ return timestamp, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/prototime/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/prototime/usage.gen.go
new file mode 100644
index 000000000..eb3e24b05
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/prototime/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package prototime
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoversion/package_version.go b/vendor/github.com/bufbuild/buf/private/pkg/protoversion/package_version.go
new file mode 100644
index 000000000..86848d307
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoversion/package_version.go
@@ -0,0 +1,204 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoversion
+
+import (
+ "strconv"
+ "strings"
+)
+
+var _ PackageVersion = &packageVersion{}
+
+type packageVersion struct {
+ major int
+ stabilityLevel StabilityLevel
+ minor int
+ patch int
+ suffix string
+}
+
+func newPackageVersionForPackage(pkg string) (*packageVersion, bool) {
+ if pkg == "" {
+ return nil, false
+ }
+ parts := strings.Split(pkg, ".")
+ if len(parts) < 2 {
+ return nil, false
+ }
+ lastPart := parts[len(parts)-1]
+ // must at least contain 'v' and a number
+ if len(lastPart) < 2 {
+ return nil, false
+ }
+ if lastPart[0] != 'v' {
+ return nil, false
+ }
+
+ // v1beta1 -> 1beta1
+ // v1testfoo -> 1testfoo
+ // v1p1alpha1 -> p1alpha1
+ version := lastPart[1:]
+
+ if strings.Contains(version, "test") {
+ // 1testfoo -> [1, foo]
+ split := strings.SplitN(version, "test", 2)
+ if len(split) != 2 {
+ return nil, false
+ }
+ major, ok := positiveNumber(split[0])
+ if !ok {
+ return nil, false
+ }
+ return newPackageVersion(major, StabilityLevelTest, 0, 0, split[1]), true
+ }
+
+ var stabilityLevel StabilityLevel
+ containsAlpha := strings.Contains(version, "alpha")
+ containsBeta := strings.Contains(version, "beta")
+ switch {
+ case !containsAlpha && !containsBeta:
+ stabilityLevel = StabilityLevelStable
+ case containsAlpha && !containsBeta:
+ stabilityLevel = StabilityLevelAlpha
+ case !containsAlpha && containsBeta:
+ stabilityLevel = StabilityLevelBeta
+ case containsAlpha && containsBeta:
+ return nil, false
+ }
+ if stabilityLevel != StabilityLevelStable {
+ // 1alpha1 -> [1, 1]
+ // 1p1alpha1 ->[1p1, 1]
+ // 1alpha -> [1, ""]
+ split := strings.SplitN(version, stabilityLevel.String(), 2)
+ if len(split) != 2 {
+ return nil, false
+ }
+ minor := 0
+ var ok bool
+ if split[1] != "" {
+ minor, ok = positiveNumber(split[1])
+ if !ok {
+ return nil, false
+ }
+ }
+ major, patch, ok := getAlphaBetaMajorPatch(split[0])
+ if !ok {
+ return nil, false
+ }
+ return newPackageVersion(major, stabilityLevel, minor, patch, ""), true
+ }
+
+ // no suffix that is valid, make sure we just have a number
+ major, ok := positiveNumber(version)
+ if !ok {
+ return nil, false
+ }
+ return newPackageVersion(major, StabilityLevelStable, 0, 0, ""), true
+}
+
+func newPackageVersion(
+ major int,
+ stabilityLevel StabilityLevel,
+ minor int,
+ patch int,
+ suffix string,
+) *packageVersion {
+ return &packageVersion{
+ major: major,
+ stabilityLevel: stabilityLevel,
+ minor: minor,
+ patch: patch,
+ suffix: suffix,
+ }
+}
+
+func (p *packageVersion) Major() int {
+ return p.major
+}
+
+func (p *packageVersion) StabilityLevel() StabilityLevel {
+ return p.stabilityLevel
+}
+
+func (p *packageVersion) Minor() int {
+ return p.minor
+}
+
+func (p *packageVersion) Patch() int {
+ return p.patch
+}
+
+func (p *packageVersion) Suffix() string {
+ return p.suffix
+}
+
+func (p *packageVersion) String() string {
+ var builder strings.Builder
+ builder.WriteRune('v')
+ builder.WriteString(strconv.Itoa(p.major))
+ if p.patch > 0 {
+ builder.WriteRune('p')
+ builder.WriteString(strconv.Itoa(p.patch))
+ }
+ builder.WriteString(p.stabilityLevel.String())
+ if p.minor > 0 {
+ builder.WriteString(strconv.Itoa(p.minor))
+ }
+ if p.suffix != "" {
+ builder.WriteString(p.suffix)
+ }
+ return builder.String()
+}
+
+func (p *packageVersion) isPackageVersion() {}
+
+func getAlphaBetaMajorPatch(remainder string) (int, int, bool) {
+ if strings.Contains(remainder, "p") {
+ // 1p1 -> [1, 1]
+ patchSplit := strings.SplitN(remainder, "p", 2)
+ if len(patchSplit) != 2 {
+ return 0, 0, false
+ }
+ major, ok := positiveNumber(patchSplit[0])
+ if !ok {
+ return 0, 0, false
+ }
+ patch, ok := positiveNumber(patchSplit[1])
+ if !ok {
+ return 0, 0, false
+ }
+ return major, patch, true
+ }
+ // no patch, make sure just a number
+ major, ok := positiveNumber(remainder)
+ if !ok {
+ return 0, 0, false
+ }
+ return major, 0, true
+}
+
+func positiveNumber(s string) (int, bool) {
+ if s == "" {
+ return 0, false
+ }
+ value, err := strconv.ParseInt(s, 10, 32)
+ if err != nil {
+ return 0, false
+ }
+ if value < 1 {
+ return 0, false
+ }
+ return int(value), true
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoversion/protoversion.go b/vendor/github.com/bufbuild/buf/private/pkg/protoversion/protoversion.go
new file mode 100644
index 000000000..366ad256f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoversion/protoversion.go
@@ -0,0 +1,90 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoversion
+
+import (
+ "fmt"
+ "strconv"
+)
+
+const (
+ // StabilityLevelStable is stable.
+ StabilityLevelStable StabilityLevel = iota + 1
+ // StabilityLevelAlpha is alpha stability.
+ StabilityLevelAlpha
+ // StabilityLevelBeta is beta stability.
+ StabilityLevelBeta
+ // StabilityLevelTest is test stability.
+ StabilityLevelTest
+)
+
+var (
+ stabilityLevelToString = map[StabilityLevel]string{
+ StabilityLevelStable: "",
+ StabilityLevelAlpha: "alpha",
+ StabilityLevelBeta: "beta",
+ StabilityLevelTest: "test",
+ }
+)
+
+// StabilityLevel is the stability level.
+type StabilityLevel int
+
+// String implements fmt.Stringer.
+func (s StabilityLevel) String() string {
+ value, ok := stabilityLevelToString[s]
+ if ok {
+ return value
+ }
+ return strconv.Itoa(int(s))
+}
+
+// PackageVersion is a package version.
+//
+// A package has a version if the last component is a version of the form
+// v\d+, v\d+test.*, v\d+(alpha|beta)\d*, or v\d+p\d+(alpha|beta)\d*
+// where numbers are >=1.
+//
+// See https://cloud.google.com/apis/design/versioning#channel-based_versioning
+// See https://cloud.google.com/apis/design/versioning#release-based_versioning
+type PackageVersion interface {
+ fmt.Stringer
+
+ // Required.
+ // Will always be >=1.
+ Major() int
+ // Required.
+ StabilityLevel() StabilityLevel
+ // Optional.
+ // Only potentially set if the stability level is alpha or beta.
+ // Will always be >=1.
+ Minor() int
+ // Optional.
+ // Only potentially set if the stability level is alpha or beta.
+ // Will always be >=1.
+ Patch() int
+ // Optional.
+ // Only potentially set if the stability level is test.
+ Suffix() string
+
+ isPackageVersion()
+}
+
+// NewPackageVersionForPackage returns the PackageVersion for the package.
+//
+// Returns false if the package has no package version per the specifications.
+func NewPackageVersionForPackage(pkg string) (PackageVersion, bool) {
+ return newPackageVersionForPackage(pkg)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/protoversion/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/protoversion/usage.gen.go
new file mode 100644
index 000000000..db38fd595
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/protoversion/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package protoversion
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/bucket.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/bucket.go
new file mode 100644
index 000000000..5cb68d769
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/bucket.go
@@ -0,0 +1,213 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "context"
+ "io"
+)
+
+// ReadBucket is a simple read-only bucket.
+//
+// All paths are regular files - Buckets do not handle directories.
+// All paths must be relative.
+// All paths are cleaned and ToSlash'ed by each function.
+// Paths must not jump the bucket context, that is after clean, they
+// cannot contain "..".
+type ReadBucket interface {
+ // Get gets the path.
+ //
+ // The behavior of concurrently Getting and Putting an object is undefined.
+ // The returned ReadObjectCloser is not thread-safe.
+ //
+ // Returns ErrNotExist if the path does not exist, other error
+ // if there is a system error.
+ Get(ctx context.Context, path string) (ReadObjectCloser, error)
+ // Stat gets info in the object.
+ //
+ // Returns ErrNotExist if the path does not exist, other error
+ // if there is a system error.
+ Stat(ctx context.Context, path string) (ObjectInfo, error)
+ // Walk walks the bucket with the prefix, calling f on each path.
+ // If the prefix doesn't exist, this is a no-op.
+ //
+ // Note that foo/barbaz will not be called for foo/bar, but will
+ // be called for foo/bar/baz.
+ //
+ // All paths given to f are normalized and validated.
+ // If f returns error, Walk will stop short and return this error.
+ // Returns other error on system error.
+ Walk(ctx context.Context, prefix string, f func(ObjectInfo) error) error
+}
+
+// WriteBucket is a write-only bucket.
+type WriteBucket interface {
+ // Put returns a WriteObjectCloser to write to the path.
+ //
+ // The path is truncated on close.
+ // The behavior of concurrently Getting and Putting an object is undefined.
+ // The returned WriteObjectCloser is not thread-safe.
+ //
+ // Returns error on system error.
+ Put(ctx context.Context, path string) (WriteObjectCloser, error)
+ // Delete deletes the object at the path.
+ //
+ // Returns ErrNotExist if the path does not exist, other error
+ // if there is a system error.
+ Delete(ctx context.Context, path string) error
+ // DeleteAll deletes all objects with the prefix.
+ // If the prefix doesn't exist, this is a no-op.
+ //
+ // Note that the prefix is used as a filepath prefix, and
+ // NOT a string prefix. For example, the prefix "foo/bar"
+ // will delete "foo/bar/baz", but NOT "foo/barbaz".
+ DeleteAll(ctx context.Context, prefix string) error
+ // SetExternalPathSupported returns true if SetExternalPath is supported.
+ //
+ // For example, in-memory buckets may choose to return true so that object sources
+ // are preserved, but filesystem buckets may choose to return false as they have
+ // their own external paths.
+ SetExternalPathSupported() bool
+}
+
+// ReadWriteBucket is a simple read/write bucket.
+type ReadWriteBucket interface {
+ ReadBucket
+ WriteBucket
+}
+
+// ReadBucketCloser is a read-only bucket that must be closed.
+type ReadBucketCloser interface {
+ io.Closer
+ ReadBucket
+}
+
+// NopReadBucketCloser returns a ReadBucketCloser for the ReadBucket.
+func NopReadBucketCloser(readBucket ReadBucket) ReadBucketCloser {
+ return nopReadBucketCloser{readBucket}
+}
+
+// WriteBucketCloser is a write-only bucket that must be closed.
+type WriteBucketCloser interface {
+ io.Closer
+ WriteBucket
+}
+
+// NopWriteBucketCloser returns a WriteBucketCloser for the WriteBucket.
+func NopWriteBucketCloser(writeBucket WriteBucket) WriteBucketCloser {
+ return nopWriteBucketCloser{writeBucket}
+}
+
+// ReadWriteBucketCloser is a read/write bucket that must be closed.
+type ReadWriteBucketCloser interface {
+ io.Closer
+ ReadWriteBucket
+}
+
+// NopReadWriteBucketCloser returns a ReadWriteBucketCloser for the ReadWriteBucket.
+func NopReadWriteBucketCloser(readWriteBucket ReadWriteBucket) ReadWriteBucketCloser {
+ return nopReadWriteBucketCloser{readWriteBucket}
+}
+
+// ObjectInfo contains object info.
+type ObjectInfo interface {
+ // Path is the path of the object.
+ //
+ // This will always correspond to a path within the Bucket. For sub-buckets, this is the sub-path, but the
+ // external path will include the sub-bucket path.
+ //
+ // This path will always be normalized, validated, and non-empty.
+ Path() string
+ // ExternalPath is the path that identifies the object externally.
+ //
+ // This path is not necessarily a file path, and should only be used to
+ // uniquely identify this file as compared to other assets, to for display
+ // to users.
+ //
+ // The path will be unnormalized, if it is a file path.
+ // The path will never be empty. If a given implementation has no external path, this falls back to path.
+ //
+ // Example:
+ // Directory: /foo/bar
+ // Path: baz/bat.proto
+ // ExternalPath: /foo/bar/baz/bat.proto
+ //
+ // Example:
+ // Directory: .
+ // Path: baz/bat.proto
+ // ExternalPath: baz/bat.proto
+ //
+ // Example:
+ // S3 Bucket: https://s3.amazonaws.com/foo
+ // Path: baz/bat.proto
+ // ExternalPath: s3://foo/baz/bat.proto
+ ExternalPath() string
+}
+
+// ReadObject is an object read from a bucket.
+type ReadObject interface {
+ ObjectInfo
+ io.Reader
+}
+
+// ReadObjectCloser is a ReadObject with a closer.
+//
+// It must be closed when done.
+type ReadObjectCloser interface {
+ ReadObject
+ io.Closer
+}
+
+// WriteObject object written to a bucket.
+type WriteObject interface {
+ io.Writer
+
+ // ExternalPath attempts to explicitly set the external path for the new object.
+ //
+ // If SetExternalPathSupported returns false, this returns error.
+ SetExternalPath(externalPath string) error
+}
+
+// WriteObjectCloser is a WriteObject with a closer.
+//
+// It must be closed when done.
+type WriteObjectCloser interface {
+ WriteObject
+ io.Closer
+}
+
+type nopReadBucketCloser struct {
+ ReadBucket
+}
+
+func (nopReadBucketCloser) Close() error {
+ return nil
+}
+
+type nopWriteBucketCloser struct {
+ WriteBucket
+}
+
+func (nopWriteBucketCloser) Close() error {
+ return nil
+}
+
+type nopReadWriteBucketCloser struct {
+ ReadWriteBucket
+}
+
+func (nopReadWriteBucketCloser) Close() error {
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/copy.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/copy.go
new file mode 100644
index 000000000..b8813270d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/copy.go
@@ -0,0 +1,174 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "context"
+ "io"
+ "sync"
+
+ "github.com/bufbuild/buf/private/pkg/thread"
+ "go.uber.org/multierr"
+)
+
+// Copy copies the bucket at from to the bucket at to.
+//
+// Copies done concurrently.
+// Returns the number of files copied.
+func Copy(
+ ctx context.Context,
+ from ReadBucket,
+ to WriteBucket,
+ options ...CopyOption,
+) (int, error) {
+ copyOptions := newCopyOptions()
+ for _, option := range options {
+ option(copyOptions)
+ }
+ return copyPaths(
+ ctx,
+ from,
+ to,
+ copyOptions.externalPaths,
+ )
+}
+
+// CopyReadObject copies the contents of the ReadObject into the WriteBucket at the path.
+func CopyReadObject(
+ ctx context.Context,
+ writeBucket WriteBucket,
+ readObject ReadObject,
+ options ...CopyOption,
+) (retErr error) {
+ copyOptions := newCopyOptions()
+ for _, option := range options {
+ option(copyOptions)
+ }
+ return copyReadObject(
+ ctx,
+ writeBucket,
+ readObject,
+ copyOptions.externalPaths,
+ )
+}
+
+// CopyReader copies the contents of the Reader into the WriteBucket at the path.
+func CopyReader(
+ ctx context.Context,
+ writeBucket WriteBucket,
+ reader io.Reader,
+ path string,
+) (retErr error) {
+ writeObjectCloser, err := writeBucket.Put(ctx, path)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, writeObjectCloser.Close())
+ }()
+ _, err = io.Copy(writeObjectCloser, reader)
+ return err
+}
+
+// CopyOption is an option for Copy.
+type CopyOption func(*copyOptions)
+
+// CopyWithExternalPaths returns a new CopyOption that says to copy external paths.
+//
+// The to WriteBucket must support setting external paths.
+func CopyWithExternalPaths() CopyOption {
+ return func(copyOptions *copyOptions) {
+ copyOptions.externalPaths = true
+ }
+}
+
+func copyPaths(
+ ctx context.Context,
+ from ReadBucket,
+ to WriteBucket,
+ copyExternalPaths bool,
+) (int, error) {
+ paths, err := AllPaths(ctx, from, "")
+ if err != nil {
+ return 0, err
+ }
+ var count int
+ var lock sync.Mutex
+ jobs := make([]func(context.Context) error, len(paths))
+ for i, path := range paths {
+ path := path
+ jobs[i] = func(ctx context.Context) error {
+ if err := copyPath(ctx, from, to, path, copyExternalPaths); err != nil {
+ return err
+ }
+ lock.Lock()
+ count++
+ lock.Unlock()
+ return nil
+ }
+ }
+ err = thread.Parallelize(ctx, jobs)
+ return count, err
+}
+
+// copyPath copies the path from the bucket at from to the bucket at to using the given paths.
+//
+// Paths will be normalized within this function.
+func copyPath(
+ ctx context.Context,
+ from ReadBucket,
+ to WriteBucket,
+ path string,
+ copyExternalPaths bool,
+) (retErr error) {
+ readObjectCloser, err := from.Get(ctx, path)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(err, readObjectCloser.Close())
+ }()
+ return copyReadObject(ctx, to, readObjectCloser, copyExternalPaths)
+}
+
+func copyReadObject(
+ ctx context.Context,
+ writeBucket WriteBucket,
+ readObject ReadObject,
+ copyExternalPaths bool,
+) (retErr error) {
+ writeObjectCloser, err := writeBucket.Put(ctx, readObject.Path())
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, writeObjectCloser.Close())
+ }()
+ if copyExternalPaths {
+ if err := writeObjectCloser.SetExternalPath(readObject.ExternalPath()); err != nil {
+ return err
+ }
+ }
+ _, err = io.Copy(writeObjectCloser, readObject)
+ return err
+}
+
+type copyOptions struct {
+ externalPaths bool
+}
+
+func newCopyOptions() *copyOptions {
+ return ©Options{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/diff.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/diff.go
new file mode 100644
index 000000000..d29bdd342
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/diff.go
@@ -0,0 +1,317 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "io"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/command"
+ "github.com/bufbuild/buf/private/pkg/diff"
+)
+
+// DiffOption is an option for Diff.
+type DiffOption func(*diffOptions)
+
+// DiffWithSuppressCommands returns a new DiffOption that suppresses printing of commands.
+func DiffWithSuppressCommands() DiffOption {
+ return func(diffOptions *diffOptions) {
+ diffOptions.suppressCommands = true
+ }
+}
+
+// DiffWithSuppressCommands returns a new DiffOption that suppresses printing of timestamps.
+func DiffWithSuppressTimestamps() DiffOption {
+ return func(diffOptions *diffOptions) {
+ diffOptions.suppressTimestamps = true
+ }
+}
+
+// DiffWithExternalPaths returns a new DiffOption that prints diffs with external paths
+// instead of paths.
+func DiffWithExternalPaths() DiffOption {
+ return func(diffOptions *diffOptions) {
+ diffOptions.externalPaths = true
+ }
+}
+
+// DiffWithExternalPathPrefixes returns a new DiffOption that sets the external path prefixes for the buckets.
+//
+// If a file is in one bucket but not the other, it will be assumed that the file begins
+// with the given prefix, and this prefix should be substituted for the other prefix.
+//
+// For example, if diffing the directories "test/a" and "test/b", use "test/a/" and "test/b/",
+// and a file that is in one with path "test/a/foo.txt" will be shown as not
+// existing as "test/b/foo.txt" in two.
+//
+// Note that the prefixes are directly concatenated, so "/" should be included generally.
+//
+// This option has no effect if DiffWithExternalPaths is not set.
+// This option is not required if the prefixes are equal.
+func DiffWithExternalPathPrefixes(
+ oneExternalPathPrefix string,
+ twoExternalPathPrefix string,
+) DiffOption {
+ return func(diffOptions *diffOptions) {
+ if oneExternalPathPrefix != twoExternalPathPrefix {
+ // we don't know if external paths are file paths or not
+ // so we just operate on pure string-prefix paths
+ // this comes up with for example s3://
+ diffOptions.oneExternalPathPrefix = oneExternalPathPrefix
+ diffOptions.twoExternalPathPrefix = twoExternalPathPrefix
+ }
+ }
+}
+
+// DiffWithTransform returns a DiffOption that adds a transform function. The transform function will be run on each
+// file being compared before it is diffed. transform takes the arguments:
+//
+// side: one or two whether it is the first or second item in the diff
+// filename: the filename including path
+// content: the file content.
+//
+// transform returns a string that is the transformed content of filename.
+func DiffWithTransform(
+ transform func(side string, filename string, content []byte) []byte,
+) DiffOption {
+ return func(diffOptions *diffOptions) {
+ diffOptions.transforms = append(diffOptions.transforms, transform)
+ }
+}
+
+// DiffBytes does a diff of the ReadBuckets.
+func DiffBytes(
+ ctx context.Context,
+ runner command.Runner,
+ one ReadBucket,
+ two ReadBucket,
+ options ...DiffOption,
+) ([]byte, error) {
+ buffer := bytes.NewBuffer(nil)
+ if err := Diff(ctx, runner, buffer, one, two, options...); err != nil {
+ return nil, err
+ }
+ return buffer.Bytes(), nil
+}
+
+// Diff writes a diff of the ReadBuckets to the Writer.
+func Diff(
+ ctx context.Context,
+ runner command.Runner,
+ writer io.Writer,
+ one ReadBucket,
+ two ReadBucket,
+ options ...DiffOption,
+) error {
+ diffOptions := newDiffOptions()
+ for _, option := range options {
+ option(diffOptions)
+ }
+ externalPaths := diffOptions.externalPaths
+ oneExternalPathPrefix := diffOptions.oneExternalPathPrefix
+ twoExternalPathPrefix := diffOptions.twoExternalPathPrefix
+
+ oneObjectInfos, err := allObjectInfos(ctx, one, "")
+ if err != nil {
+ return err
+ }
+ twoObjectInfos, err := allObjectInfos(ctx, two, "")
+ if err != nil {
+ return err
+ }
+ sortObjectInfos(oneObjectInfos)
+ sortObjectInfos(twoObjectInfos)
+ onePathToObjectInfo := pathToObjectInfo(oneObjectInfos)
+ twoPathToObjectInfo := pathToObjectInfo(twoObjectInfos)
+
+ for _, oneObjectInfo := range oneObjectInfos {
+ path := oneObjectInfo.Path()
+ oneDiffPath, err := getDiffPathForObjectInfo(
+ oneObjectInfo,
+ externalPaths,
+ oneExternalPathPrefix,
+ )
+ if err != nil {
+ return err
+ }
+ oneData, err := ReadPath(ctx, one, path)
+ if err != nil {
+ return err
+ }
+ var twoData []byte
+ var twoDiffPath string
+ if twoObjectInfo, ok := twoPathToObjectInfo[path]; ok {
+ twoData, err = ReadPath(ctx, two, path)
+ if err != nil {
+ return err
+ }
+ twoDiffPath, err = getDiffPathForObjectInfo(
+ twoObjectInfo,
+ externalPaths,
+ twoExternalPathPrefix,
+ )
+ if err != nil {
+ return err
+ }
+ } else {
+ twoDiffPath, err = getDiffPathForNotFound(
+ oneObjectInfo,
+ externalPaths,
+ oneExternalPathPrefix,
+ twoExternalPathPrefix,
+ )
+ if err != nil {
+ return err
+ }
+ }
+ for _, transform := range diffOptions.transforms {
+ oneData = transform("one", oneDiffPath, oneData)
+ twoData = transform("two", twoDiffPath, twoData)
+ }
+ diffData, err := diff.Diff(
+ ctx,
+ runner,
+ oneData,
+ twoData,
+ oneDiffPath,
+ twoDiffPath,
+ diffOptions.toDiffPackageOptions()...,
+ )
+ if err != nil {
+ return err
+ }
+ if len(diffData) > 0 {
+ if _, err := writer.Write(diffData); err != nil {
+ return err
+ }
+ }
+ }
+ for _, twoObjectInfo := range twoObjectInfos {
+ path := twoObjectInfo.Path()
+ if _, ok := onePathToObjectInfo[path]; !ok {
+ twoData, err := ReadPath(ctx, two, path)
+ if err != nil {
+ return err
+ }
+ oneDiffPath, err := getDiffPathForNotFound(
+ twoObjectInfo,
+ externalPaths,
+ twoExternalPathPrefix,
+ oneExternalPathPrefix,
+ )
+ if err != nil {
+ return err
+ }
+ twoDiffPath, err := getDiffPathForObjectInfo(
+ twoObjectInfo,
+ externalPaths,
+ twoExternalPathPrefix,
+ )
+ if err != nil {
+ return err
+ }
+ diffData, err := diff.Diff(
+ ctx,
+ runner,
+ nil,
+ twoData,
+ oneDiffPath,
+ twoDiffPath,
+ diffOptions.toDiffPackageOptions()...,
+ )
+ if err != nil {
+ return err
+ }
+ if len(diffData) > 0 {
+ if _, err := writer.Write(diffData); err != nil {
+ return err
+ }
+ }
+ }
+ }
+ return nil
+}
+
+func getDiffPathForObjectInfo(
+ objectInfo ObjectInfo,
+ externalPaths bool,
+ externalPathPrefix string,
+) (string, error) {
+ if !externalPaths {
+ return objectInfo.Path(), nil
+ }
+ externalPath := objectInfo.ExternalPath()
+ if externalPathPrefix == "" {
+ return externalPath, nil
+ }
+ if !strings.HasPrefix(externalPath, externalPathPrefix) {
+ return "", fmt.Errorf("diff: expected %s to have prefix %s", externalPath, externalPathPrefix)
+ }
+ return externalPath, nil
+}
+
+func getDiffPathForNotFound(
+ foundObjectInfo ObjectInfo,
+ externalPaths bool,
+ foundExternalPathPrefix string,
+ notFoundExternalPathPrefix string,
+) (string, error) {
+ if !externalPaths {
+ return foundObjectInfo.Path(), nil
+ }
+ externalPath := foundObjectInfo.ExternalPath()
+ switch {
+ case foundExternalPathPrefix == "" && notFoundExternalPathPrefix == "":
+ // no prefix, just return external path
+ return externalPath, nil
+ case foundExternalPathPrefix == "" && notFoundExternalPathPrefix != "":
+ // the not-found side has a prefix, append the external path to this prefix, and we're done
+ return notFoundExternalPathPrefix + externalPath, nil
+ default:
+ //foundExternalPathPrefix != "" && notFoundExternalPathPrefix == ""
+ //foundExternalPathPrefix != "" && notFoundExternalPathPrefix != ""
+ if !strings.HasPrefix(externalPath, foundExternalPathPrefix) {
+ return "", fmt.Errorf("diff: expected %s to have prefix %s", externalPath, foundExternalPathPrefix)
+ }
+ return notFoundExternalPathPrefix + strings.TrimPrefix(externalPath, foundExternalPathPrefix), nil
+ }
+}
+
+type diffOptions struct {
+ suppressCommands bool
+ suppressTimestamps bool
+ externalPaths bool
+ oneExternalPathPrefix string
+ twoExternalPathPrefix string
+ transforms []func(side string, filename string, content []byte) []byte
+}
+
+func newDiffOptions() *diffOptions {
+ return &diffOptions{}
+}
+
+func (d *diffOptions) toDiffPackageOptions() []diff.DiffOption {
+ var diffPackageOptions []diff.DiffOption
+ if d.suppressCommands {
+ diffPackageOptions = append(diffPackageOptions, diff.DiffWithSuppressCommands())
+ }
+ if d.suppressTimestamps {
+ diffPackageOptions = append(diffPackageOptions, diff.DiffWithSuppressTimestamps())
+ }
+ return diffPackageOptions
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/errors.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/errors.go
new file mode 100644
index 000000000..566ad20bf
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/errors.go
@@ -0,0 +1,93 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "errors"
+ "fmt"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+var (
+ // ErrClosed is the error returned if a bucket or object is already closed.
+ ErrClosed = errors.New("already closed")
+ // ErrSetExternalPathUnsupported is the error returned if a bucket does not support SetExternalPath.
+ ErrSetExternalPathUnsupported = errors.New("setting the external path is unsupported for this bucket")
+
+ // errNotExist is the error returned if a path does not exist.
+ errNotExist = errors.New("does not exist")
+)
+
+// NewErrNotExist returns a new error for a path not existing.
+func NewErrNotExist(path string) error {
+ return normalpath.NewError(path, errNotExist)
+}
+
+// IsNotExist returns true for a error that is for a path not existing.
+func IsNotExist(err error) bool {
+ return errors.Is(err, errNotExist)
+}
+
+// NewErrExistsMultipleLocations returns a new error if a path exists in multiple locations.
+func NewErrExistsMultipleLocations(path string, externalPaths ...string) error {
+ return &errorExistsMultipleLocations{
+ Path: path,
+ ExternalPaths: externalPaths,
+ }
+}
+
+// IsExistsMultipleLocations returns true if the error is for a path existing in multiple locations.
+func IsExistsMultipleLocations(err error) bool {
+ if err == nil {
+ return false
+ }
+ asErr := &errorExistsMultipleLocations{}
+ return errors.As(err, &asErr)
+}
+
+// IsWriteLimitReached returns true if the error is of writes exceeding the limit of the bucket.
+func IsWriteLimitReached(err error) bool {
+ if err == nil {
+ return false
+ }
+ asErr := &errWriteLimitReached{}
+ return errors.As(err, &asErr)
+}
+
+// errorExistsMultipleLocations is the error returned if a path exists in multiple locations.
+type errorExistsMultipleLocations struct {
+ Path string
+ ExternalPaths []string
+}
+
+// Error implements error.
+func (e *errorExistsMultipleLocations) Error() string {
+ return e.Path + " exists in multiple locations: " + strings.Join(e.ExternalPaths, " ")
+}
+
+// errWriteLimitReached is the error returned if the write limit is reached.
+//
+// See [LimitWriteBucket].
+type errWriteLimitReached struct {
+ Limit int64
+ ExceedingBy int64
+}
+
+// Error implements error.
+func (e *errWriteLimitReached) Error() string {
+ return fmt.Sprintf("write limit reached: limit: %d, exceeding by: %d", e.Limit, e.ExceedingBy)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/external_paths.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/external_paths.go
new file mode 100644
index 000000000..61ed3f73f
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/external_paths.go
@@ -0,0 +1,79 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/pkg/storage/storageutil"
+)
+
+// NoExternalPathReadBucket disables the external paths for the ReadBucket.
+//
+// This results in ExternalPath just calling Path.
+func NoExternalPathReadBucket(readBucket ReadBucket) ReadBucket {
+ return newNoExternalPathReadBucket(readBucket)
+}
+
+type noExternalPathReadBucket struct {
+ delegate ReadBucket
+}
+
+func newNoExternalPathReadBucket(
+ delegate ReadBucket,
+) *noExternalPathReadBucket {
+ return &noExternalPathReadBucket{
+ delegate: delegate,
+ }
+}
+
+func (r *noExternalPathReadBucket) Get(ctx context.Context, path string) (ReadObjectCloser, error) {
+ readObjectCloser, err := r.delegate.Get(ctx, path)
+ // TODO: if this is a path error, we should replace the path
+ if err != nil {
+ return nil, err
+ }
+ return disableReadObjectCloserExternalPath(readObjectCloser), nil
+}
+
+func (r *noExternalPathReadBucket) Stat(ctx context.Context, path string) (ObjectInfo, error) {
+ objectInfo, err := r.delegate.Stat(ctx, path)
+ // TODO: if this is a path error, we should replace the path
+ if err != nil {
+ return nil, err
+ }
+ return disableObjectInfoExternalPath(objectInfo), nil
+}
+
+func (r *noExternalPathReadBucket) Walk(ctx context.Context, prefix string, f func(ObjectInfo) error) error {
+ return r.delegate.Walk(
+ ctx,
+ prefix,
+ func(objectInfo ObjectInfo) error {
+ return f(disableObjectInfoExternalPath(objectInfo))
+ },
+ )
+}
+
+func disableObjectInfoExternalPath(objectInfo ObjectInfo) ObjectInfo {
+ return storageutil.NewObjectInfo(
+ objectInfo.Path(),
+ objectInfo.Path(),
+ )
+}
+
+func disableReadObjectCloserExternalPath(readObjectCloser ReadObjectCloser) ReadObjectCloser {
+ return compositeReadObjectCloser{disableObjectInfoExternalPath(readObjectCloser), readObjectCloser}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/limit.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/limit.go
new file mode 100644
index 000000000..0c2073140
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/limit.go
@@ -0,0 +1,92 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "context"
+
+ "go.uber.org/atomic"
+)
+
+// LimitWriteBucket returns a [WriteBucket] that writes to [writeBucket]
+// but stops with an error after [limit] bytes are written.
+//
+// The error can be checked using [IsWriteLimitReached].
+//
+// A negative [limit] is same as 0 limit.
+func LimitWriteBucket(writeBucket WriteBucket, limit int) WriteBucket {
+ if limit < 0 {
+ limit = 0
+ }
+ return newLimitedWriteBucket(writeBucket, int64(limit))
+}
+
+type limitedWriteBucket struct {
+ WriteBucket
+ currentSize *atomic.Int64
+ limit int64
+}
+
+func newLimitedWriteBucket(bucket WriteBucket, limit int64) *limitedWriteBucket {
+ return &limitedWriteBucket{
+ WriteBucket: bucket,
+ currentSize: atomic.NewInt64(0),
+ limit: limit,
+ }
+}
+
+func (w *limitedWriteBucket) Put(ctx context.Context, path string) (WriteObjectCloser, error) {
+ writeObjectCloser, err := w.WriteBucket.Put(ctx, path)
+ if err != nil {
+ return nil, err
+ }
+ return newLimitedWriteObjectCloser(writeObjectCloser, w.currentSize, w.limit), nil
+}
+
+type limitedWriteObjectCloser struct {
+ WriteObjectCloser
+
+ bucketSize *atomic.Int64
+ limit int64
+}
+
+func newLimitedWriteObjectCloser(
+ writeObjectCloser WriteObjectCloser,
+ bucketSize *atomic.Int64,
+ limit int64,
+) *limitedWriteObjectCloser {
+ return &limitedWriteObjectCloser{
+ WriteObjectCloser: writeObjectCloser,
+ bucketSize: bucketSize,
+ limit: limit,
+ }
+}
+
+func (o *limitedWriteObjectCloser) Write(p []byte) (int, error) {
+ writeSize := int64(len(p))
+ newBucketSize := o.bucketSize.Add(writeSize)
+ if newBucketSize > o.limit {
+ o.bucketSize.Sub(writeSize)
+ return 0, &errWriteLimitReached{
+ Limit: o.limit,
+ ExceedingBy: newBucketSize - o.limit,
+ }
+ }
+ writtenSize, err := o.WriteObjectCloser.Write(p)
+ if int64(writtenSize) < writeSize {
+ o.bucketSize.Sub(writeSize - int64(writtenSize))
+ }
+ return writtenSize, err
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/map.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/map.go
new file mode 100644
index 000000000..6f19711bf
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/map.go
@@ -0,0 +1,253 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage/storageutil"
+)
+
+// MapReadBucket maps the ReadBucket.
+//
+// If the Mappers are empty, the original ReadBucket is returned.
+// If there is more than one Mapper, the Mappers are called in order
+// for UnmapFullPath, with the order reversed for MapPath and MapPrefix.
+//
+// That is, order these assuming you are starting with a full path and
+// working to a path.
+func MapReadBucket(readBucket ReadBucket, mappers ...Mapper) ReadBucket {
+ if len(mappers) == 0 {
+ return readBucket
+ }
+ return newMapReadBucket(readBucket, MapChain(mappers...))
+}
+
+// MapWriteBucket maps the WriteBucket.
+//
+// If the Mappers are empty, the original WriteBucket is returned.
+// If there is more than one Mapper, the Mappers are called in order
+// for UnmapFullPath, with the order reversed for MapPath and MapPrefix.
+//
+// That is, order these assuming you are starting with a full path and
+// working to a path.
+//
+// If a path that does not match is called for Put, an error is returned.
+func MapWriteBucket(writeBucket WriteBucket, mappers ...Mapper) WriteBucket {
+ if len(mappers) == 0 {
+ return writeBucket
+ }
+ return newMapWriteBucket(writeBucket, MapChain(mappers...))
+}
+
+// MapReadWriteBucket maps the ReadWriteBucket.
+//
+// If the Mappers are empty, the original ReadWriteBucket is returned.
+// If there is more than one Mapper, the Mappers are called in order
+// for UnmapFullPath, with the order reversed for MapPath and MapPrefix.
+//
+// That is, order these assuming you are starting with a full path and
+// working to a path.
+func MapReadWriteBucket(readWriteBucket ReadWriteBucket, mappers ...Mapper) ReadWriteBucket {
+ if len(mappers) == 0 {
+ return readWriteBucket
+ }
+ mapper := MapChain(mappers...)
+ return compositeReadWriteBucket{
+ newMapReadBucket(readWriteBucket, mapper),
+ newMapWriteBucket(readWriteBucket, mapper),
+ }
+}
+
+type mapReadBucket struct {
+ delegate ReadBucket
+ mapper Mapper
+}
+
+func newMapReadBucket(
+ delegate ReadBucket,
+ mapper Mapper,
+) *mapReadBucket {
+ return &mapReadBucket{
+ delegate: delegate,
+ mapper: mapper,
+ }
+}
+
+func (r *mapReadBucket) Get(ctx context.Context, path string) (ReadObjectCloser, error) {
+ fullPath, err := r.getFullPath(path)
+ if err != nil {
+ return nil, err
+ }
+ readObjectCloser, err := r.delegate.Get(ctx, fullPath)
+ // TODO: if this is a path error, we should replace the path
+ if err != nil {
+ return nil, err
+ }
+ return replaceReadObjectCloserPath(readObjectCloser, path), nil
+}
+
+func (r *mapReadBucket) Stat(ctx context.Context, path string) (ObjectInfo, error) {
+ fullPath, err := r.getFullPath(path)
+ if err != nil {
+ return nil, err
+ }
+ objectInfo, err := r.delegate.Stat(ctx, fullPath)
+ // TODO: if this is a path error, we should replace the path
+ if err != nil {
+ return nil, err
+ }
+ return replaceObjectInfoPath(objectInfo, path), nil
+}
+
+func (r *mapReadBucket) Walk(ctx context.Context, prefix string, f func(ObjectInfo) error) error {
+ prefix, err := normalpath.NormalizeAndValidate(prefix)
+ if err != nil {
+ return err
+ }
+ fullPrefix, matches := r.mapper.MapPrefix(prefix)
+ if !matches {
+ return nil
+ }
+ return r.delegate.Walk(
+ ctx,
+ fullPrefix,
+ func(objectInfo ObjectInfo) error {
+ path, matches, err := r.mapper.UnmapFullPath(objectInfo.Path())
+ if err != nil {
+ return err
+ }
+ if !matches {
+ return nil
+ }
+ return f(replaceObjectInfoPath(objectInfo, path))
+ },
+ )
+}
+
+func (r *mapReadBucket) getFullPath(path string) (string, error) {
+ path, err := normalpath.NormalizeAndValidate(path)
+ if err != nil {
+ return "", err
+ }
+ if path == "." {
+ return "", errors.New("cannot get root")
+ }
+ fullPath, matches := r.mapper.MapPath(path)
+ if !matches {
+ return "", NewErrNotExist(path)
+ }
+ return fullPath, nil
+}
+
+type mapWriteBucket struct {
+ delegate WriteBucket
+ mapper Mapper
+}
+
+func newMapWriteBucket(
+ delegate WriteBucket,
+ mapper Mapper,
+) *mapWriteBucket {
+ return &mapWriteBucket{
+ delegate: delegate,
+ mapper: mapper,
+ }
+}
+
+func (w *mapWriteBucket) Put(ctx context.Context, path string) (WriteObjectCloser, error) {
+ fullPath, err := w.getFullPath(path)
+ if err != nil {
+ return nil, err
+ }
+ writeObjectCloser, err := w.delegate.Put(ctx, fullPath)
+ // TODO: if this is a path error, we should replace the path
+ if err != nil {
+ return nil, err
+ }
+ return replaceWriteObjectCloserExternalPathNotSupported(writeObjectCloser), nil
+}
+
+func (w *mapWriteBucket) Delete(ctx context.Context, path string) error {
+ fullPath, err := w.getFullPath(path)
+ if err != nil {
+ return err
+ }
+ return w.delegate.Delete(ctx, fullPath)
+}
+
+func (w *mapWriteBucket) DeleteAll(ctx context.Context, prefix string) error {
+ prefix, err := normalpath.NormalizeAndValidate(prefix)
+ if err != nil {
+ return err
+ }
+ fullPrefix, matches := w.mapper.MapPrefix(prefix)
+ if !matches {
+ return nil
+ }
+ return w.delegate.DeleteAll(ctx, fullPrefix)
+}
+
+func (*mapWriteBucket) SetExternalPathSupported() bool {
+ return false
+}
+
+func (w *mapWriteBucket) getFullPath(path string) (string, error) {
+ path, err := normalpath.NormalizeAndValidate(path)
+ if err != nil {
+ return "", err
+ }
+ if path == "." {
+ return "", errors.New("cannot get root")
+ }
+ fullPath, matches := w.mapper.MapPath(path)
+ if !matches {
+ return "", fmt.Errorf("path does not match: %s", path)
+ }
+ return fullPath, nil
+}
+
+func replaceObjectInfoPath(objectInfo ObjectInfo, path string) ObjectInfo {
+ if objectInfo.Path() == path {
+ return objectInfo
+ }
+ return storageutil.NewObjectInfo(
+ path,
+ objectInfo.ExternalPath(),
+ )
+}
+
+func replaceReadObjectCloserPath(readObjectCloser ReadObjectCloser, path string) ReadObjectCloser {
+ if readObjectCloser.Path() == path {
+ return readObjectCloser
+ }
+ return compositeReadObjectCloser{replaceObjectInfoPath(readObjectCloser, path), readObjectCloser}
+}
+
+func replaceWriteObjectCloserExternalPathNotSupported(writeObjectCloser WriteObjectCloser) WriteObjectCloser {
+ return writeObjectCloserExternalPathNotSuppoted{writeObjectCloser}
+}
+
+type writeObjectCloserExternalPathNotSuppoted struct {
+ io.WriteCloser
+}
+
+func (writeObjectCloserExternalPathNotSuppoted) SetExternalPath(string) error {
+ return ErrSetExternalPathUnsupported
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/mapper.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/mapper.go
new file mode 100644
index 000000000..2407f2308
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/mapper.go
@@ -0,0 +1,163 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+// Mapper is a path mapper.
+//
+// This will cause a Bucket to operate as if the Mapper has all paths mapped.
+type Mapper interface {
+ // Map maps the path to the full path.
+ //
+ // The path is expected to be normalized and validated.
+ // The returned path is expected to be normalized and validated.
+ // If the path cannot be mapped, this returns false.
+ MapPath(path string) (string, bool)
+ // Map maps the prefix to the full prefix.
+ //
+ // The path is expected to be normalized and validated.
+ // The returned path is expected to be normalized and validated.
+ // If the path cannot be mapped, this returns false.
+ MapPrefix(prefix string) (string, bool)
+ // UnmapFullPath maps the full path to the path.
+ //
+ // Returns false if the full path does not apply.
+ // The path is expected to be normalized and validated.
+ // The returned path is expected to be normalized and validated.
+ UnmapFullPath(fullPath string) (string, bool, error)
+ isMapper()
+}
+
+// MapOnPrefix returns a Mapper that will map the Bucket as if it was created on the given prefix.
+//
+// The prefix is expected to be normalized and validated.
+func MapOnPrefix(prefix string) Mapper {
+ return prefixMapper{prefix}
+}
+
+// MapChain chains the mappers.
+//
+// If any mapper does not match, this stops checking Mappers and returns
+// an empty path and false. This is as opposed to MatchAnd, that runs
+// every Matcher and returns the path regardless.
+//
+// If the Mappers are empty, a no-op Mapper is returned.
+// If there is more than one Mapper, the Mappers are called in order
+// for UnmapFullPath, with the order reversed for MapPath and MapPrefix.
+//
+// That is, order these assuming you are starting with a full path and
+// working to a path.
+func MapChain(mappers ...Mapper) Mapper {
+ switch len(mappers) {
+ case 0:
+ return nopMapper{}
+ case 1:
+ return mappers[0]
+ default:
+ return chainMapper{mappers}
+ }
+}
+
+// ***** private *****
+
+type prefixMapper struct {
+ prefix string
+}
+
+func (p prefixMapper) MapPath(path string) (string, bool) {
+ return normalpath.Join(p.prefix, path), true
+}
+
+func (p prefixMapper) MapPrefix(prefix string) (string, bool) {
+ return normalpath.Join(p.prefix, prefix), true
+}
+
+func (p prefixMapper) UnmapFullPath(fullPath string) (string, bool, error) {
+ if !normalpath.EqualsOrContainsPath(p.prefix, fullPath, normalpath.Relative) {
+ return "", false, nil
+ }
+ path, err := normalpath.Rel(p.prefix, fullPath)
+ if err != nil {
+ return "", false, err
+ }
+ return path, true, nil
+}
+
+func (prefixMapper) isMapper() {}
+
+type chainMapper struct {
+ mappers []Mapper
+}
+
+func (c chainMapper) MapPath(path string) (string, bool) {
+ return c.mapFunc(path, Mapper.MapPath)
+}
+
+func (c chainMapper) MapPrefix(prefix string) (string, bool) {
+ return c.mapFunc(prefix, Mapper.MapPrefix)
+}
+
+func (c chainMapper) UnmapFullPath(fullPath string) (string, bool, error) {
+ path := fullPath
+ var matches bool
+ var err error
+ for _, mapper := range c.mappers {
+ path, matches, err = mapper.UnmapFullPath(path)
+ if err != nil {
+ return "", false, err
+ }
+ if !matches {
+ return "", false, nil
+ }
+ }
+ return path, true, nil
+}
+
+func (c chainMapper) mapFunc(
+ pathOrPrefix string,
+ f func(Mapper, string) (string, bool),
+) (string, bool) {
+ fullPathOrPrefix := pathOrPrefix
+ var matches bool
+ for i := len(c.mappers) - 1; i >= 0; i-- {
+ mapper := c.mappers[i]
+ fullPathOrPrefix, matches = f(mapper, fullPathOrPrefix)
+ if !matches {
+ return "", false
+ }
+ }
+ return fullPathOrPrefix, true
+}
+
+func (chainMapper) isMapper() {}
+
+type nopMapper struct{}
+
+func (n nopMapper) MapPath(path string) (string, bool) {
+ return path, true
+}
+
+func (n nopMapper) MapPrefix(prefix string) (string, bool) {
+ return prefix, true
+}
+
+func (nopMapper) UnmapFullPath(fullPath string) (string, bool, error) {
+ return fullPath, true, nil
+}
+
+func (nopMapper) isMapper() {}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/matcher.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/matcher.go
new file mode 100644
index 000000000..dda4d2e57
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/matcher.go
@@ -0,0 +1,204 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+// Matcher is a path matcher.
+//
+// This will cause a Bucket to operate as if it only contains matching paths.
+type Matcher interface {
+ Mapper
+ isMatcher()
+}
+
+// MatchPathExt returns a Matcher for the extension.
+func MatchPathExt(ext string) Matcher {
+ return pathMatcherFunc(func(path string) bool {
+ return normalpath.Ext(path) == ext
+ })
+}
+
+// MatchPathBase returns a Matcher for the base.
+func MatchPathBase(base string) Matcher {
+ return pathMatcherFunc(func(path string) bool {
+ return normalpath.Base(path) == base
+ })
+}
+
+// MatchPathEqual returns a Matcher for the path.
+func MatchPathEqual(equalPath string) Matcher {
+ return pathMatcherFunc(func(path string) bool {
+ return path == equalPath
+ })
+}
+
+// MatchPathEqualOrContained returns a Matcher for the path that matches
+// on paths equal or contained by equalOrContainingPath.
+func MatchPathEqualOrContained(equalOrContainingPath string) Matcher {
+ return pathMatcherFunc(func(path string) bool {
+ return normalpath.EqualsOrContainsPath(equalOrContainingPath, path, normalpath.Relative)
+ })
+}
+
+// MatchPathContained returns a Matcher for the directory that matches
+// on paths by contained by containingDir.
+func MatchPathContained(containingDir string) Matcher {
+ return pathMatcherFunc(func(path string) bool {
+ return normalpath.ContainsPath(containingDir, path, normalpath.Relative)
+ })
+}
+
+// MatchOr returns an Or of the Matchers.
+func MatchOr(matchers ...Matcher) Matcher {
+ return orMatcher(matchers)
+}
+
+// MatchAnd returns an And of the Matchers.
+func MatchAnd(matchers ...Matcher) Matcher {
+ return andMatcher(matchers)
+}
+
+// MatchNot returns an Not of the Matcher.
+func MatchNot(matcher Matcher) Matcher {
+ return notMatcher{matcher}
+}
+
+// ***** private *****
+
+// We limit or/and/not to Matchers as composite logic must assume
+// the the input path is not modified, so that we can always return it
+//
+// We might want to just remove Matcher implementing Mapper for simplification,
+// and just have a Matches function, then handle chaining them separately.
+
+type pathMatcherFunc func(string) bool
+
+func (f pathMatcherFunc) MapPath(path string) (string, bool) {
+ matches := f(path)
+ return path, matches
+}
+
+func (f pathMatcherFunc) MapPrefix(prefix string) (string, bool) {
+ // always returns true, path matchers do not check prefixes
+ return prefix, true
+}
+
+func (f pathMatcherFunc) UnmapFullPath(fullPath string) (string, bool, error) {
+ matches := f(fullPath)
+ return fullPath, matches, nil
+}
+
+func (pathMatcherFunc) isMatcher() {}
+func (pathMatcherFunc) isMapper() {}
+
+type orMatcher []Matcher
+
+func (o orMatcher) MapPath(path string) (string, bool) {
+ for _, matcher := range o {
+ if _, matches := matcher.MapPath(path); matches {
+ return path, true
+ }
+ }
+ return "", false
+}
+
+func (o orMatcher) MapPrefix(prefix string) (string, bool) {
+ for _, matcher := range o {
+ if _, matches := matcher.MapPrefix(prefix); matches {
+ return prefix, true
+ }
+ }
+ return "", false
+}
+
+func (o orMatcher) UnmapFullPath(fullPath string) (string, bool, error) {
+ for _, matcher := range o {
+ _, matches, err := matcher.UnmapFullPath(fullPath)
+ if err != nil {
+ return "", false, err
+ }
+ if matches {
+ return fullPath, true, nil
+ }
+ }
+ return fullPath, false, nil
+}
+
+func (orMatcher) isMatcher() {}
+func (orMatcher) isMapper() {}
+
+type andMatcher []Matcher
+
+func (a andMatcher) MapPath(path string) (string, bool) {
+ for _, matcher := range a {
+ if _, matches := matcher.MapPath(path); !matches {
+ return path, false
+ }
+ }
+ return path, true
+}
+
+func (a andMatcher) MapPrefix(prefix string) (string, bool) {
+ for _, matcher := range a {
+ if _, matches := matcher.MapPrefix(prefix); !matches {
+ return prefix, false
+ }
+ }
+ return prefix, true
+}
+
+func (a andMatcher) UnmapFullPath(fullPath string) (string, bool, error) {
+ for _, matcher := range a {
+ _, matches, err := matcher.UnmapFullPath(fullPath)
+ if err != nil {
+ return "", false, err
+ }
+ if !matches {
+ return fullPath, false, nil
+ }
+ }
+ return fullPath, true, nil
+}
+
+func (andMatcher) isMatcher() {}
+func (andMatcher) isMapper() {}
+
+type notMatcher struct {
+ delegate Matcher
+}
+
+func (n notMatcher) MapPath(path string) (string, bool) {
+ _, matches := n.delegate.MapPath(path)
+ return path, !matches
+}
+
+func (n notMatcher) MapPrefix(prefix string) (string, bool) {
+ _, matches := n.delegate.MapPath(prefix)
+ return prefix, !matches
+}
+
+func (n notMatcher) UnmapFullPath(fullPath string) (string, bool, error) {
+ _, matches, err := n.delegate.UnmapFullPath(fullPath)
+ if err != nil {
+ return "", false, err
+ }
+ return fullPath, !matches, nil
+}
+
+func (notMatcher) isMatcher() {}
+func (notMatcher) isMapper() {}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/multi.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/multi.go
new file mode 100644
index 000000000..ed77ba66a
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/multi.go
@@ -0,0 +1,173 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "context"
+
+ "github.com/bufbuild/buf/private/pkg/storage/storageutil"
+)
+
+// MultiReadBucket takes the union of the ReadBuckets.
+//
+// If no readBuckets are given, this returns a no-op ReadBucket.
+// If one readBucket is given, this returns the original ReadBucket.
+// Otherwise, this returns a ReadBucket that will get from all buckets.
+//
+// This expects and validates that no paths overlap between the ReadBuckets.
+// This assumes that buckets are logically unique.
+func MultiReadBucket(readBuckets ...ReadBucket) ReadBucket {
+ switch len(readBuckets) {
+ case 0:
+ return nopReadBucket{}
+ case 1:
+ return readBuckets[0]
+ default:
+ return newMultiReadBucket(readBuckets, false)
+ }
+}
+
+// MultiReadBucketSkipMultipleLocations takes the union of the ReadBuckets.
+//
+// If no readBuckets are given, this returns a no-op ReadBucket.
+// If one readBucket is given, this returns the original ReadBucket.
+// Otherwise, this returns a ReadBucket that will get from all buckets.
+//
+// This allows overlap between the ReadBuckets. If there are overlapping paths,
+// the first ReadBucket given with the path is used.
+func MultiReadBucketSkipMultipleLocations(readBuckets ...ReadBucket) ReadBucket {
+ switch len(readBuckets) {
+ case 0:
+ return nopReadBucket{}
+ case 1:
+ return readBuckets[0]
+ default:
+ return newMultiReadBucket(readBuckets, true)
+ }
+}
+
+type multiReadBucket struct {
+ delegates []ReadBucket
+ skipMultipleLocations bool
+}
+
+func newMultiReadBucket(
+ delegates []ReadBucket,
+ skipMultipleLocations bool,
+) *multiReadBucket {
+ return &multiReadBucket{
+ delegates: delegates,
+ skipMultipleLocations: skipMultipleLocations,
+ }
+}
+
+func (m *multiReadBucket) Get(ctx context.Context, path string) (ReadObjectCloser, error) {
+ _, delegateIndex, err := m.getObjectInfoAndDelegateIndex(ctx, path)
+ if err != nil {
+ return nil, err
+ }
+ return m.delegates[delegateIndex].Get(ctx, path)
+}
+
+func (m *multiReadBucket) Stat(ctx context.Context, path string) (ObjectInfo, error) {
+ objectInfo, _, err := m.getObjectInfoAndDelegateIndex(ctx, path)
+ return objectInfo, err
+}
+
+func (m *multiReadBucket) Walk(ctx context.Context, prefix string, f func(ObjectInfo) error) error {
+ seenPathToExternalPath := make(map[string]string)
+ for _, delegate := range m.delegates {
+ if err := delegate.Walk(
+ ctx,
+ prefix,
+ func(objectInfo ObjectInfo) error {
+ path := objectInfo.Path()
+ externalPath := objectInfo.ExternalPath()
+ if existingExternalPath, ok := seenPathToExternalPath[path]; ok {
+ // if we explicitly say to skip, do so
+ if m.skipMultipleLocations {
+ return nil
+ }
+ // this does not return all paths that are matching, unlike Get and Stat
+ // we do not want to continue iterating, as calling Walk on the same path could cause errors downstream
+ // as callers expect a single call per path.
+ return NewErrExistsMultipleLocations(path, existingExternalPath, externalPath)
+ }
+ seenPathToExternalPath[path] = externalPath
+ return f(objectInfo)
+ },
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (m *multiReadBucket) getObjectInfoAndDelegateIndex(
+ ctx context.Context,
+ path string,
+) (ObjectInfo, int, error) {
+ var objectInfos []ObjectInfo
+ var delegateIndices []int
+ for i, delegate := range m.delegates {
+ objectInfo, err := delegate.Stat(ctx, path)
+ if err != nil {
+ if IsNotExist(err) {
+ continue
+ }
+ return nil, 0, err
+ }
+ objectInfos = append(objectInfos, objectInfo)
+ delegateIndices = append(delegateIndices, i)
+ }
+ switch len(objectInfos) {
+ case 0:
+ return nil, 0, NewErrNotExist(path)
+ case 1:
+ return objectInfos[0], delegateIndices[0], nil
+ default:
+ if m.skipMultipleLocations {
+ return objectInfos[0], delegateIndices[0], nil
+ }
+ externalPaths := make([]string, len(objectInfos))
+ for i, objectInfo := range objectInfos {
+ externalPaths[i] = objectInfo.ExternalPath()
+ }
+ return nil, 0, NewErrExistsMultipleLocations(path, externalPaths...)
+ }
+}
+
+type nopReadBucket struct{}
+
+func (nopReadBucket) Get(ctx context.Context, path string) (ReadObjectCloser, error) {
+ return nil, nopGetStat(path)
+}
+
+func (nopReadBucket) Stat(ctx context.Context, path string) (ObjectInfo, error) {
+ return nil, nopGetStat(path)
+}
+
+func (nopReadBucket) Walk(ctx context.Context, prefix string, f func(ObjectInfo) error) error {
+ _, err := storageutil.ValidatePrefix(prefix)
+ return err
+}
+
+func nopGetStat(path string) error {
+ path, err := storageutil.ValidatePath(path)
+ if err != nil {
+ return err
+ }
+ return NewErrNotExist(path)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storage.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storage.go
new file mode 100644
index 000000000..58fa31ed4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storage.go
@@ -0,0 +1,21 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage implements a simple storage abstraction.
+//
+// This is meant to abstract filesystem calls, as well as be a wrapper
+// for in-memory or remote storage. It also provides a smaller attack
+// vector as implementations can do verifications as to what is accessed
+// and what is not.
+package storage
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storagearchive/storagearchive.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagearchive/storagearchive.go
new file mode 100644
index 000000000..e03b6b7a1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagearchive/storagearchive.go
@@ -0,0 +1,261 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storagearchive implements archive utilities.
+package storagearchive
+
+import (
+ "archive/tar"
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "math"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageutil"
+ "github.com/klauspost/compress/zip"
+ "go.uber.org/multierr"
+)
+
+var (
+ // ErrFileSizeLimit is returned when file read limit is reached.
+ //
+ // See [WithMaxFileSizeUntarOption]
+ ErrFileSizeLimit = errors.New("file size exceeded read limit")
+)
+
+// Tar tars the given bucket to the writer.
+//
+// Only regular files are added to the writer.
+// All files are written as 0644.
+func Tar(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ writer io.Writer,
+) (retErr error) {
+ tarWriter := tar.NewWriter(writer)
+ defer func() {
+ retErr = multierr.Append(retErr, tarWriter.Close())
+ }()
+ return storage.WalkReadObjects(
+ ctx,
+ readBucket,
+ "",
+ func(readObject storage.ReadObject) error {
+ data, err := io.ReadAll(readObject)
+ if err != nil {
+ return err
+ }
+ if err := tarWriter.WriteHeader(
+ &tar.Header{
+ Typeflag: tar.TypeReg,
+ Name: readObject.Path(),
+ Size: int64(len(data)),
+ // If we ever use this outside of testing, we will want to do something about this
+ Mode: 0644,
+ },
+ ); err != nil {
+ return err
+ }
+ _, err = tarWriter.Write(data)
+ return err
+ },
+ )
+}
+
+// Untar untars the given tar archive from the reader into the bucket.
+//
+// Only regular files are added to the bucket.
+//
+// Paths from the tar archive will be mapped before adding to the bucket.
+// Mapper can be nil.
+// StripComponents happens before the mapper.
+func Untar(
+ ctx context.Context,
+ reader io.Reader,
+ writeBucket storage.WriteBucket,
+ mapper storage.Mapper,
+ stripComponentCount uint32,
+ opts ...UntarOption,
+) error {
+ options := &untarOptions{
+ maxFileSize: math.MaxInt64,
+ }
+ for _, opt := range opts {
+ opt.applyUntar(options)
+ }
+ tarReader := tar.NewReader(reader)
+ walkChecker := storageutil.NewWalkChecker()
+ for tarHeader, err := tarReader.Next(); err != io.EOF; tarHeader, err = tarReader.Next() {
+ if err != nil {
+ return err
+ }
+ if err := walkChecker.Check(ctx); err != nil {
+ return err
+ }
+ if tarHeader.Size < 0 {
+ return fmt.Errorf("invalid size for tar file %s: %d", tarHeader.Name, tarHeader.Size)
+ }
+ if tarHeader.Size > options.maxFileSize {
+ return fmt.Errorf("%w %s:%d", ErrFileSizeLimit, tarHeader.Name, tarHeader.Size)
+ }
+ path, ok, err := unmapArchivePath(tarHeader.Name, mapper, stripComponentCount)
+ if err != nil {
+ return err
+ }
+ if !ok || !tarHeader.FileInfo().Mode().IsRegular() {
+ continue
+ }
+ if err := storage.CopyReader(ctx, writeBucket, tarReader, path); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// UntarOption is an option for [Untar].
+type UntarOption interface {
+ applyUntar(*untarOptions)
+}
+
+// WithMaxFileSizeUntarOption returns an option that limits the maximum size
+func WithMaxFileSizeUntarOption(size int) UntarOption {
+ return &withMaxFileSizeUntarOption{maxFileSize: int64(size)}
+}
+
+// Zip zips the given bucket to the writer.
+//
+// Only regular files are added to the writer.
+func Zip(
+ ctx context.Context,
+ readBucket storage.ReadBucket,
+ writer io.Writer,
+ compressed bool,
+) (retErr error) {
+ zipWriter := zip.NewWriter(writer)
+ defer func() {
+ retErr = multierr.Append(retErr, zipWriter.Close())
+ }()
+ return storage.WalkReadObjects(
+ ctx,
+ readBucket,
+ "",
+ func(readObject storage.ReadObject) error {
+ method := zip.Store
+ if compressed {
+ method = zip.Deflate
+ }
+ header := &zip.FileHeader{
+ Name: readObject.Path(),
+ Method: method,
+ }
+ writer, err := zipWriter.CreateHeader(header)
+ if err != nil {
+ return err
+ }
+ _, err = io.Copy(writer, readObject)
+ return err
+ },
+ )
+}
+
+// Unzip unzips the given zip archive from the reader into the bucket.
+//
+// Only regular files are added to the bucket.
+//
+// Paths from the zip archive will be mapped before adding to the bucket.
+// Mapper can be nil.
+// StripComponents happens before the mapper.
+func Unzip(
+ ctx context.Context,
+ readerAt io.ReaderAt,
+ size int64,
+ writeBucket storage.WriteBucket,
+ mapper storage.Mapper,
+ stripComponentCount uint32,
+) error {
+ if size < 0 {
+ return fmt.Errorf("unknown size to unzip: %d", int(size))
+ }
+ if size == 0 {
+ return nil
+ }
+ zipReader, err := zip.NewReader(readerAt, size)
+ if err != nil {
+ return err
+ }
+ walkChecker := storageutil.NewWalkChecker()
+ // reads can be done concurrently in the future
+ for _, zipFile := range zipReader.File {
+ if err := walkChecker.Check(ctx); err != nil {
+ return err
+ }
+ path, ok, err := unmapArchivePath(zipFile.Name, mapper, stripComponentCount)
+ if err != nil {
+ return err
+ }
+ if !ok {
+ continue
+ }
+ if zipFile.FileInfo().Mode().IsRegular() {
+ if err := copyZipFile(ctx, writeBucket, zipFile, path); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func copyZipFile(
+ ctx context.Context,
+ writeBucket storage.WriteBucket,
+ zipFile *zip.File,
+ path string,
+) (retErr error) {
+ readCloser, err := zipFile.Open()
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, readCloser.Close())
+ }()
+ return storage.CopyReader(ctx, writeBucket, readCloser, path)
+}
+
+func unmapArchivePath(
+ archivePath string,
+ mapper storage.Mapper,
+ stripComponentCount uint32,
+) (string, bool, error) {
+ if archivePath == "" {
+ return "", false, errors.New("empty archive file name")
+ }
+ fullPath, err := normalpath.NormalizeAndValidate(archivePath)
+ if err != nil {
+ return "", false, err
+ }
+ if fullPath == "." {
+ return "", false, nil
+ }
+ fullPath, ok := normalpath.StripComponents(fullPath, stripComponentCount)
+ if !ok {
+ return "", false, nil
+ }
+ if mapper != nil {
+ return mapper.UnmapFullPath(fullPath)
+ }
+ return fullPath, true, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storagearchive/untar_options.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagearchive/untar_options.go
new file mode 100644
index 000000000..b3f07d0fc
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagearchive/untar_options.go
@@ -0,0 +1,27 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storagearchive
+
+type untarOptions struct {
+ maxFileSize int64
+}
+
+type withMaxFileSizeUntarOption struct {
+ maxFileSize int64
+}
+
+func (o *withMaxFileSizeUntarOption) applyUntar(options *untarOptions) {
+ options.maxFileSize = o.maxFileSize
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storagearchive/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagearchive/usage.gen.go
new file mode 100644
index 000000000..31aa07fc4
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagearchive/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package storagearchive
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/bucket.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/bucket.go
new file mode 100644
index 000000000..958bc0548
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/bucket.go
@@ -0,0 +1,158 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storagemem
+
+import (
+ "context"
+ "fmt"
+ "sort"
+ "sync"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem/internal"
+ "github.com/bufbuild/buf/private/pkg/storage/storageutil"
+)
+
+type bucket struct {
+ pathToImmutableObject map[string]*internal.ImmutableObject
+ lock sync.RWMutex
+}
+
+func newBucket(pathToImmutableObject map[string]*internal.ImmutableObject) *bucket {
+ if pathToImmutableObject == nil {
+ pathToImmutableObject = make(map[string]*internal.ImmutableObject)
+ }
+ return &bucket{
+ pathToImmutableObject: pathToImmutableObject,
+ }
+}
+
+func (b *bucket) Get(ctx context.Context, path string) (storage.ReadObjectCloser, error) {
+ immutableObject, err := b.readLockAndGetImmutableObject(ctx, path)
+ if err != nil {
+ return nil, err
+ }
+ return newReadObjectCloser(immutableObject), nil
+}
+
+func (b *bucket) Stat(ctx context.Context, path string) (storage.ObjectInfo, error) {
+ return b.readLockAndGetImmutableObject(ctx, path)
+}
+
+func (b *bucket) Walk(ctx context.Context, prefix string, f func(storage.ObjectInfo) error) error {
+ prefix, err := storageutil.ValidatePrefix(prefix)
+ if err != nil {
+ return err
+ }
+ walkChecker := storageutil.NewWalkChecker()
+ b.lock.RLock()
+ defer b.lock.RUnlock()
+ // To ensure same iteration order.
+ // We could create this in-place during puts with an insertion sort if this
+ // gets to be time prohibitive.
+ paths := make([]string, 0, len(b.pathToImmutableObject))
+ for path := range b.pathToImmutableObject {
+ paths = append(paths, path)
+ }
+ sort.Strings(paths)
+ for _, path := range paths {
+ immutableObject, ok := b.pathToImmutableObject[path]
+ if !ok {
+ // this is a system error
+ return fmt.Errorf("path %q not in pathToObject", path)
+ }
+ if err := walkChecker.Check(ctx); err != nil {
+ return err
+ }
+ if !normalpath.EqualsOrContainsPath(prefix, path, normalpath.Relative) {
+ continue
+ }
+ if err := f(immutableObject); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (b *bucket) Put(ctx context.Context, path string) (storage.WriteObjectCloser, error) {
+ // No need to lock as we do no modifications until close
+ path, err := storageutil.ValidatePath(path)
+ if err != nil {
+ return nil, err
+ }
+ return newWriteObjectCloser(b, path), nil
+}
+
+func (b *bucket) Delete(ctx context.Context, path string) error {
+ path, err := storageutil.ValidatePath(path)
+ if err != nil {
+ return err
+ }
+ b.lock.Lock()
+ defer b.lock.Unlock()
+ if _, ok := b.pathToImmutableObject[path]; !ok {
+ return storage.NewErrNotExist(path)
+ }
+ // Note that if there is an existing reader for an object of the same path,
+ // that reader will continue to read the original file, but we accept this
+ // as no less consistent than os mechanics.
+ delete(b.pathToImmutableObject, path)
+ return nil
+}
+
+func (b *bucket) DeleteAll(ctx context.Context, prefix string) error {
+ prefix, err := storageutil.ValidatePrefix(prefix)
+ if err != nil {
+ return err
+ }
+ b.lock.Lock()
+ defer b.lock.Unlock()
+ for path := range b.pathToImmutableObject {
+ if normalpath.EqualsOrContainsPath(prefix, path, normalpath.Relative) {
+ // Note that if there is an existing reader for an object of the same path,
+ // that reader will continue to read the original file, but we accept this
+ // as no less consistent than os mechanics.
+ delete(b.pathToImmutableObject, path)
+ }
+ }
+ return nil
+}
+
+func (*bucket) SetExternalPathSupported() bool {
+ return true
+}
+
+func (b *bucket) ToReadBucket() (storage.ReadBucket, error) {
+ return b, nil
+}
+
+func (b *bucket) readLockAndGetImmutableObject(ctx context.Context, path string) (*internal.ImmutableObject, error) {
+ path, err := storageutil.ValidatePath(path)
+ if err != nil {
+ return nil, err
+ }
+ b.lock.RLock()
+ defer b.lock.RUnlock()
+ immutableObject, ok := b.pathToImmutableObject[path]
+ if !ok {
+ // it would be nice if this was external path for every bucket
+ // the issue is here: we don't know the external path for memory buckets
+ // because we store external paths individually, so if we do not have
+ // an object, we do not have an external path
+ return nil, storage.NewErrNotExist(path)
+ }
+ return immutableObject, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/internal/immutable_object.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/internal/immutable_object.go
new file mode 100644
index 000000000..63ff12033
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/internal/immutable_object.go
@@ -0,0 +1,57 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+// Package internal splits out ImmutableObject into a separate package from storagemem
+// to make it impossible to modify ImmutableObject via direct field access.
+package internal
+
+import (
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage/storageutil"
+)
+
+// ImmutableObject is an object that contains a path, external path,
+// and data that is never modified.
+//
+// We make this a struct so there is no weirdness with returning a nil interface.
+type ImmutableObject struct {
+ storageutil.ObjectInfo
+
+ data []byte
+}
+
+// NewImmutableObject returns a new ImmutableObject.
+//
+// path is expected to always be non-empty.
+// If externalPath is empty, normalpath.Unnormalize(path) is used.
+func NewImmutableObject(
+ path string,
+ externalPath string,
+ data []byte,
+) *ImmutableObject {
+ if externalPath == "" {
+ externalPath = normalpath.Unnormalize(path)
+ }
+ return &ImmutableObject{
+ ObjectInfo: storageutil.NewObjectInfo(path, externalPath),
+ data: data,
+ }
+}
+
+// Data returns the data.
+//
+// DO NOT MODIFY.
+func (i *ImmutableObject) Data() []byte {
+ return i.data
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/internal/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/internal/usage.gen.go
new file mode 100644
index 000000000..edcedfbef
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/internal/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package internal
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/read_object_closer.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/read_object_closer.go
new file mode 100644
index 000000000..3dd56787d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/read_object_closer.go
@@ -0,0 +1,52 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storagemem
+
+import (
+ "bytes"
+
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem/internal"
+ "github.com/bufbuild/buf/private/pkg/storage/storageutil"
+)
+
+type readObjectCloser struct {
+ storageutil.ObjectInfo
+
+ reader *bytes.Reader
+ closed bool
+}
+
+func newReadObjectCloser(immutableObject *internal.ImmutableObject) *readObjectCloser {
+ return &readObjectCloser{
+ ObjectInfo: immutableObject.ObjectInfo,
+ reader: bytes.NewReader(immutableObject.Data()),
+ }
+}
+
+func (r *readObjectCloser) Read(p []byte) (int, error) {
+ if r.closed {
+ return 0, storage.ErrClosed
+ }
+ return r.reader.Read(p)
+}
+
+func (r *readObjectCloser) Close() error {
+ if r.closed {
+ return storage.ErrClosed
+ }
+ r.closed = true
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/storagemem.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/storagemem.go
new file mode 100644
index 000000000..2b0b1a95e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/storagemem.go
@@ -0,0 +1,80 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storagemem implements an in-memory storage Bucket.
+package storagemem
+
+import (
+ "errors"
+
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem/internal"
+ "github.com/bufbuild/buf/private/pkg/storage/storageutil"
+)
+
+var errDuplicatePath = errors.New("duplicate path")
+
+type options struct {
+ pathToData map[string][]byte
+}
+
+// Option is provided by NewReadWriteBucketWithOptions options.
+type Option interface {
+ apply(*options)
+}
+
+type pathData map[string][]byte
+
+func (pd pathData) apply(opts *options) {
+ opts.pathToData = pd
+}
+
+// WithFiles adds files by path to their content into the bucket.
+func WithFiles(pathToData map[string][]byte) Option {
+ return (pathData)(pathToData)
+}
+
+// NewReadWriteBucket returns a new in-memory ReadWriteBucket.
+// Deprecated: Use NewReadWriteBucketWithOptions without any options.
+func NewReadWriteBucket() storage.ReadWriteBucket {
+ return newBucket(nil)
+}
+
+// NewReadWriteBucketWithOptions returns a new in-memory ReadWriteBucket.
+// Errors are returned with invalid options.
+func NewReadWriteBucketWithOptions(opts ...Option) (storage.ReadWriteBucket, error) {
+ opt := options{}
+ for _, o := range opts {
+ o.apply(&opt)
+ }
+
+ pathToImmutableObject := make(map[string]*internal.ImmutableObject, len(opt.pathToData))
+ for path, data := range opt.pathToData {
+ path, err := storageutil.ValidatePath(path)
+ if err != nil {
+ return nil, err
+ }
+ // This could happen if two paths normalize to the same path.
+ if _, ok := pathToImmutableObject[path]; ok {
+ return nil, errDuplicatePath
+ }
+ pathToImmutableObject[path] = internal.NewImmutableObject(path, "", data)
+ }
+ return newBucket(pathToImmutableObject), nil
+}
+
+// NewReadBucket returns a new ReadBucket.
+func NewReadBucket(pathToData map[string][]byte) (storage.ReadBucket, error) {
+ return NewReadWriteBucketWithOptions(WithFiles(pathToData))
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/usage.gen.go
new file mode 100644
index 000000000..85e576fa2
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package storagemem
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/write_object_closer.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/write_object_closer.go
new file mode 100644
index 000000000..68cfd6fce
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storagemem/write_object_closer.go
@@ -0,0 +1,77 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storagemem
+
+import (
+ "bytes"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storagemem/internal"
+)
+
+type writeObjectCloser struct {
+ bucket *bucket
+ path string
+ externalPath string
+ buffer *bytes.Buffer
+ closed bool
+}
+
+func newWriteObjectCloser(
+ bucket *bucket,
+ path string,
+) *writeObjectCloser {
+ return &writeObjectCloser{
+ bucket: bucket,
+ path: path,
+ buffer: bytes.NewBuffer(nil),
+ }
+}
+
+func (w *writeObjectCloser) Write(p []byte) (int, error) {
+ if w.closed {
+ return 0, storage.ErrClosed
+ }
+ return w.buffer.Write(p)
+}
+
+func (w *writeObjectCloser) SetExternalPath(externalPath string) error {
+ if w.externalPath != "" {
+ return fmt.Errorf("external path already set: %q", w.externalPath)
+ }
+ w.externalPath = externalPath
+ return nil
+}
+
+func (w *writeObjectCloser) Close() error {
+ if w.closed {
+ return storage.ErrClosed
+ }
+ w.closed = true
+ // overwrites anything existing
+ // this is the same behavior as storageos
+ w.bucket.lock.Lock()
+ defer w.bucket.lock.Unlock()
+ // Note that if there is an existing reader for an object of the same path,
+ // that reader will continue to read the original file, but we accept this
+ // as no less consistent than os mechanics.
+ w.bucket.pathToImmutableObject[w.path] = internal.NewImmutableObject(
+ w.path,
+ w.externalPath,
+ w.buffer.Bytes(),
+ )
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/bucket.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/bucket.go
new file mode 100644
index 000000000..499d80cde
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/bucket.go
@@ -0,0 +1,402 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storageos
+
+import (
+ "context"
+ "errors"
+ "os"
+ "path/filepath"
+ "strings"
+
+ "github.com/bufbuild/buf/private/pkg/filepathextended"
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+ "github.com/bufbuild/buf/private/pkg/storage"
+ "github.com/bufbuild/buf/private/pkg/storage/storageutil"
+)
+
+// errNotDir is the error returned if a path is not a directory.
+var errNotDir = errors.New("not a directory")
+
+type bucket struct {
+ rootPath string
+ absoluteRootPath string
+ symlinks bool
+}
+
+func newBucket(rootPath string, symlinks bool) (*bucket, error) {
+ rootPath = normalpath.Unnormalize(rootPath)
+ if err := validateDirPathExists(rootPath, symlinks); err != nil {
+ return nil, err
+ }
+ absoluteRootPath, err := filepath.Abs(rootPath)
+ if err != nil {
+ return nil, err
+ }
+ // do not validate - allow anything with OS buckets including
+ // absolute paths and jumping context
+ rootPath = normalpath.Normalize(rootPath)
+ return &bucket{
+ rootPath: rootPath,
+ absoluteRootPath: absoluteRootPath,
+ symlinks: symlinks,
+ }, nil
+}
+
+func (b *bucket) Get(ctx context.Context, path string) (storage.ReadObjectCloser, error) {
+ externalPath, err := b.getExternalPath(path)
+ if err != nil {
+ return nil, err
+ }
+ if err := b.validateExternalPath(path, externalPath); err != nil {
+ return nil, err
+ }
+ resolvedPath := externalPath
+ if b.symlinks {
+ resolvedPath, err = filepath.EvalSymlinks(externalPath)
+ if err != nil {
+ return nil, err
+ }
+ }
+ file, err := os.Open(resolvedPath)
+ if err != nil {
+ return nil, err
+ }
+ // we could use fileInfo.Name() however we might as well use the externalPath
+ return newReadObjectCloser(
+ path,
+ externalPath,
+ file,
+ ), nil
+}
+
+func (b *bucket) Stat(ctx context.Context, path string) (storage.ObjectInfo, error) {
+ externalPath, err := b.getExternalPath(path)
+ if err != nil {
+ return nil, err
+ }
+ if err := b.validateExternalPath(path, externalPath); err != nil {
+ return nil, err
+ }
+ // we could use fileInfo.Name() however we might as well use the externalPath
+ return storageutil.NewObjectInfo(
+ path,
+ externalPath,
+ ), nil
+}
+
+func (b *bucket) Walk(
+ ctx context.Context,
+ prefix string,
+ f func(storage.ObjectInfo) error,
+) error {
+ externalPrefix, err := b.getExternalPrefix(prefix)
+ if err != nil {
+ return err
+ }
+ walkChecker := storageutil.NewWalkChecker()
+ var walkOptions []filepathextended.WalkOption
+ if b.symlinks {
+ walkOptions = append(walkOptions, filepathextended.WalkWithSymlinks())
+ }
+ if err := filepathextended.Walk(
+ externalPrefix,
+ func(externalPath string, fileInfo os.FileInfo, err error) error {
+ if err != nil {
+ // this can happen if a symlink is broken
+ // in this case, we just want to continue the walk
+ if b.symlinks && os.IsNotExist(err) {
+ return nil
+ }
+ return err
+ }
+ if err := walkChecker.Check(ctx); err != nil {
+ return err
+ }
+ absoluteExternalPath, err := filepath.Abs(externalPath)
+ if err != nil {
+ return err
+ }
+ if fileInfo.Mode().IsRegular() {
+ path, err := normalpath.Rel(b.absoluteRootPath, absoluteExternalPath)
+ if err != nil {
+ return err
+ }
+ // just in case
+ path, err = normalpath.NormalizeAndValidate(path)
+ if err != nil {
+ return err
+ }
+ if err := f(
+ storageutil.NewObjectInfo(
+ path,
+ externalPath,
+ ),
+ ); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ walkOptions...,
+ ); err != nil {
+ if os.IsNotExist(err) {
+ // Should be a no-op according to the spec.
+ return nil
+ }
+ return err
+ }
+ return nil
+}
+
+func (b *bucket) Put(ctx context.Context, path string) (storage.WriteObjectCloser, error) {
+ externalPath, err := b.getExternalPath(path)
+ if err != nil {
+ return nil, err
+ }
+ externalDir := filepath.Dir(externalPath)
+ var fileInfo os.FileInfo
+ if b.symlinks {
+ fileInfo, err = os.Stat(externalDir)
+ } else {
+ fileInfo, err = os.Lstat(externalDir)
+ }
+ if err != nil {
+ if os.IsNotExist(err) {
+ if err := os.MkdirAll(externalDir, 0755); err != nil {
+ return nil, err
+ }
+ } else {
+ return nil, err
+ }
+ } else if !fileInfo.IsDir() {
+ return nil, newErrNotDir(externalDir)
+ }
+ file, err := os.Create(externalPath)
+ if err != nil {
+ return nil, err
+ }
+ return newWriteObjectCloser(
+ file,
+ ), nil
+}
+
+func (b *bucket) Delete(ctx context.Context, path string) error {
+ externalPath, err := b.getExternalPath(path)
+ if err != nil {
+ return err
+ }
+ // Note: this deletes the file at the path, but it may
+ // leave orphan parent directories around that were
+ // created by the MkdirAll in Put.
+ if err := os.Remove(externalPath); err != nil {
+ if os.IsNotExist(err) {
+ return storage.NewErrNotExist(path)
+ }
+ return err
+ }
+ return nil
+}
+
+func (b *bucket) DeleteAll(ctx context.Context, prefix string) error {
+ externalPrefix, err := b.getExternalPrefix(prefix)
+ if err != nil {
+ return err
+ }
+ if err := os.RemoveAll(externalPrefix); err != nil {
+ // this is a no-nop per the documentation
+ if os.IsNotExist(err) {
+ return nil
+ }
+ return err
+ }
+ return nil
+}
+
+func (*bucket) SetExternalPathSupported() bool {
+ return false
+}
+
+func (b *bucket) getExternalPath(path string) (string, error) {
+ path, err := storageutil.ValidatePath(path)
+ if err != nil {
+ return "", err
+ }
+ realClean, err := filepathextended.RealClean(normalpath.Join(b.rootPath, path))
+ if err != nil {
+ return "", err
+ }
+ return normalpath.Unnormalize(realClean), nil
+}
+
+func (b *bucket) validateExternalPath(path string, externalPath string) error {
+ // this is potentially introducing two calls to a file
+ // instead of one, ie we do both Stat and Open as opposed to just Open
+ // we do this to make sure we are only reading regular files
+ var fileInfo os.FileInfo
+ var err error
+ if b.symlinks {
+ fileInfo, err = os.Stat(externalPath)
+ } else {
+ fileInfo, err = os.Lstat(externalPath)
+ }
+ if err != nil {
+ if os.IsNotExist(err) {
+ return storage.NewErrNotExist(path)
+ }
+ // The path might have a regular file in one of its
+ // elements (e.g. 'foo/bar/baz.proto' where 'bar' is a
+ // regular file).
+ //
+ // In this case, the standard library will return an
+ // os.PathError, but there isn't an exported error value
+ // to check against (i.e. os.Is*). But we can still discover
+ // whether or not this is the case by checking if any of the
+ // path components represents a regular file (e.g. 'foo/bar').
+ //
+ // It's important that we detect these cases so that
+ // multi buckets don't unnecessarily fail when one of
+ // its delegates actually defines the path.
+ elements := strings.Split(normalpath.Normalize(externalPath), "/")
+ if len(elements) == 1 {
+ // The path is a single element, so there aren't
+ // any other files to check.
+ return err
+ }
+ for i := len(elements) - 1; i >= 0; i-- {
+ parentFileInfo, err := os.Stat(filepath.Join(elements[:i]...))
+ if err != nil {
+ continue
+ }
+ if parentFileInfo.Mode().IsRegular() {
+ // This error primarily serves as a sentinel error,
+ // but we preserve the original path argument so that
+ // the error still makes sense to the user.
+ return storage.NewErrNotExist(path)
+ }
+ }
+ return err
+ }
+ if !fileInfo.Mode().IsRegular() {
+ // making this a user error as any access means this was generally requested
+ // by the user, since we only call the function for Walk on regular files
+ return storage.NewErrNotExist(path)
+ }
+ return nil
+}
+
+func (b *bucket) getExternalPrefix(prefix string) (string, error) {
+ prefix, err := storageutil.ValidatePrefix(prefix)
+ if err != nil {
+ return "", err
+ }
+ realClean, err := filepathextended.RealClean(normalpath.Join(b.rootPath, prefix))
+ if err != nil {
+ return "", err
+ }
+ return normalpath.Unnormalize(realClean), nil
+}
+
+type readObjectCloser struct {
+ // we use ObjectInfo for Path, ExternalPath, etc to make sure this is static
+ // we put ObjectInfos in maps in other places so we do not want this to change
+ // this could be a problem if the underlying file is concurrently moved or resized however
+ storageutil.ObjectInfo
+
+ file *os.File
+}
+
+func newReadObjectCloser(
+ path string,
+ externalPath string,
+ file *os.File,
+) *readObjectCloser {
+ return &readObjectCloser{
+ ObjectInfo: storageutil.NewObjectInfo(
+ path,
+ externalPath,
+ ),
+ file: file,
+ }
+}
+
+func (r *readObjectCloser) Read(p []byte) (int, error) {
+ n, err := r.file.Read(p)
+ return n, toStorageError(err)
+}
+
+func (r *readObjectCloser) Close() error {
+ return toStorageError(r.file.Close())
+}
+
+type writeObjectCloser struct {
+ file *os.File
+}
+
+func newWriteObjectCloser(
+ file *os.File,
+) *writeObjectCloser {
+ return &writeObjectCloser{
+ file: file,
+ }
+}
+
+func (w *writeObjectCloser) Write(p []byte) (int, error) {
+ n, err := w.file.Write(p)
+ return n, toStorageError(err)
+}
+
+func (w *writeObjectCloser) SetExternalPath(string) error {
+ return storage.ErrSetExternalPathUnsupported
+}
+
+func (w *writeObjectCloser) Close() error {
+ err := toStorageError(w.file.Close())
+ return err
+}
+
+// newErrNotDir returns a new Error for a path not being a directory.
+func newErrNotDir(path string) *normalpath.Error {
+ return normalpath.NewError(path, errNotDir)
+}
+
+func toStorageError(err error) error {
+ if err == os.ErrClosed {
+ return storage.ErrClosed
+ }
+ return err
+}
+
+// validateDirPathExists returns a non-nil error if the given dirPath
+// is not a valid directory path.
+func validateDirPathExists(dirPath string, symlinks bool) error {
+ var fileInfo os.FileInfo
+ var err error
+ if symlinks {
+ fileInfo, err = os.Stat(dirPath)
+ } else {
+ fileInfo, err = os.Lstat(dirPath)
+ }
+ if err != nil {
+ if os.IsNotExist(err) {
+ return storage.NewErrNotExist(dirPath)
+ }
+ return err
+ }
+ if !fileInfo.IsDir() {
+ return newErrNotDir(dirPath)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/provider.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/provider.go
new file mode 100644
index 000000000..8382703f5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/provider.go
@@ -0,0 +1,52 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storageos
+
+import "github.com/bufbuild/buf/private/pkg/storage"
+
+type provider struct {
+ symlinks bool
+}
+
+func newProvider(options ...ProviderOption) *provider {
+ provider := &provider{}
+ for _, option := range options {
+ option(provider)
+ }
+ return provider
+}
+
+func (p *provider) NewReadWriteBucket(rootPath string, options ...ReadWriteBucketOption) (storage.ReadWriteBucket, error) {
+ readWriteBucketOptions := newReadWriteBucketOptions()
+ for _, option := range options {
+ option(readWriteBucketOptions)
+ }
+ // need both options for symlinks to be enabled
+ return newBucket(
+ rootPath,
+ p.symlinks && readWriteBucketOptions.symlinksIfSupported,
+ )
+}
+
+// doing this as a separate struct so that it's clear this is resolved
+// as a combination of the provider options and read write bucket options
+// so there's no potential issues in newBucket
+type readWriteBucketOptions struct {
+ symlinksIfSupported bool
+}
+
+func newReadWriteBucketOptions() *readWriteBucketOptions {
+ return &readWriteBucketOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/storageos.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/storageos.go
new file mode 100644
index 000000000..98cc180f1
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/storageos.go
@@ -0,0 +1,65 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storageos implements an os-backed storage Bucket.
+package storageos
+
+import (
+ "github.com/bufbuild/buf/private/pkg/storage"
+)
+
+// Provider provides new ReadWriteBuckets.
+type Provider interface {
+ // NewReadWriteBucket returns a new OS bucket.
+ //
+ // Only regular files are handled, that is Exists should only be called
+ // for regular files, Get and Put only work for regular files, Put
+ // automatically calls Mkdir, and Walk only calls f on regular files.
+ //
+ // The root path is expected to be normalized, however the root path
+ // can be absolute or jump context.
+ //
+ // Not thread-safe.
+ NewReadWriteBucket(rootPath string, options ...ReadWriteBucketOption) (storage.ReadWriteBucket, error)
+}
+
+// NewProvider returns a new Provider.
+func NewProvider(options ...ProviderOption) Provider {
+ return newProvider(options...)
+}
+
+// ProviderOption is an option for a new Provider.
+type ProviderOption func(*provider)
+
+// ReadWriteBucketOption is an option for a new ReadWriteBucket.
+type ReadWriteBucketOption func(*readWriteBucketOptions)
+
+// ReadWriteBucketWithSymlinksIfSupported returns a ReadWriteBucketOption that results
+// in symlink support being enabled for this bucket. If the Provider did not have symlink
+// support, this is a no-op.
+func ReadWriteBucketWithSymlinksIfSupported() ReadWriteBucketOption {
+ return func(readWriteBucketOptions *readWriteBucketOptions) {
+ readWriteBucketOptions.symlinksIfSupported = true
+ }
+}
+
+// ProviderWithSymlinks returns a ProviderOption that results in symlink support.
+//
+// Note that ReadWriteBucketWithSymlinksEnabled still needs to be passed for a given
+// ReadWriteBucket to have symlinks followed.
+func ProviderWithSymlinks() ProviderOption {
+ return func(provider *provider) {
+ provider.symlinks = true
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/usage.gen.go
new file mode 100644
index 000000000..6ce9d1eaa
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageos/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package storageos
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storageutil/storageutil.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageutil/storageutil.go
new file mode 100644
index 000000000..6975c3e5c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageutil/storageutil.go
@@ -0,0 +1,99 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storageutil provides helpers for storage implementations.
+package storageutil
+
+import (
+ "context"
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/buf/private/pkg/normalpath"
+)
+
+// ObjectInfo is an embeddable ObjectInfo.
+//
+// This is intentially static and should not be modifiable.
+// If constructing an object, do not use an ObjectInfo to build it.
+type ObjectInfo struct {
+ path string
+ externalPath string
+}
+
+// NewObjectInfo returns a new ObjectInfo.
+func NewObjectInfo(
+ path string,
+ externalPath string,
+) ObjectInfo {
+ return ObjectInfo{
+ path: path,
+ externalPath: externalPath,
+ }
+}
+
+// Path implements ObjectInfo.
+func (o ObjectInfo) Path() string {
+ return o.path
+}
+
+// ExternalPath implements ObjectInfo.
+func (o ObjectInfo) ExternalPath() string {
+ return o.externalPath
+}
+
+// ValidatePath validates a path.
+func ValidatePath(path string) (string, error) {
+ path, err := normalpath.NormalizeAndValidate(path)
+ if err != nil {
+ return "", err
+ }
+ if path == "." {
+ return "", errors.New("cannot use root")
+ }
+ return path, nil
+}
+
+// ValidatePrefix validates a prefix.
+func ValidatePrefix(prefix string) (string, error) {
+ return normalpath.NormalizeAndValidate(prefix)
+}
+
+// WalkChecker does validation for every step of a walk.
+type WalkChecker interface {
+ Check(ctx context.Context) error
+}
+
+// NewWalkChecker returns a new WalkChecker.
+func NewWalkChecker() WalkChecker {
+ return &walkChecker{}
+}
+
+type walkChecker struct {
+ count int
+}
+
+func (w *walkChecker) Check(ctx context.Context) error {
+ w.count++
+ select {
+ case <-ctx.Done():
+ err := ctx.Err()
+ if err == context.DeadlineExceeded {
+ return fmt.Errorf("timed out after %d files: %v", w.count, err)
+ }
+ return err
+ default:
+ return nil
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/storageutil/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageutil/usage.gen.go
new file mode 100644
index 000000000..c23adf541
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/storageutil/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package storageutil
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/usage.gen.go
new file mode 100644
index 000000000..fceb3b25e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package storage
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/storage/util.go b/vendor/github.com/bufbuild/buf/private/pkg/storage/util.go
new file mode 100644
index 000000000..8c2bb100c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/storage/util.go
@@ -0,0 +1,171 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 storage
+
+import (
+ "context"
+ "errors"
+ "io"
+ "sort"
+
+ "go.uber.org/multierr"
+)
+
+// errIsNotEmpty is used to break out of the Walk function early in IsEmpty.
+//
+// If errors.Is(err, errIsNotEmpty), the Walk function found a file.
+var errIsNotEmpty = errors.New("__is_not_empty__")
+
+// ReadPath is analogous to os.ReadFile.
+//
+// Returns an error that fufills IsNotExist if the path does not exist.
+func ReadPath(ctx context.Context, readBucket ReadBucket, path string) (_ []byte, retErr error) {
+ readObject, err := readBucket.Get(ctx, path)
+ if err != nil {
+ return nil, err
+ }
+ defer func() {
+ if err := readObject.Close(); err != nil && retErr == nil {
+ retErr = err
+ }
+ }()
+ return io.ReadAll(readObject)
+}
+
+// PutPath puts the data at the path.
+func PutPath(ctx context.Context, writeBucket WriteBucket, path string, data []byte) (retErr error) {
+ writeObject, err := writeBucket.Put(ctx, path)
+ if err != nil {
+ return err
+ }
+ defer func() {
+ retErr = multierr.Append(retErr, writeObject.Close())
+ }()
+ _, err = writeObject.Write(data)
+ return err
+}
+
+// WalkReadObjects walks the bucket and calls get on each, closing the resulting ReadObjectCloser
+// when done.
+func WalkReadObjects(
+ ctx context.Context,
+ readBucket ReadBucket,
+ prefix string,
+ f func(ReadObject) error,
+) error {
+ return readBucket.Walk(
+ ctx,
+ prefix,
+ func(objectInfo ObjectInfo) error {
+ readObjectCloser, err := readBucket.Get(ctx, objectInfo.Path())
+ if err != nil {
+ return err
+ }
+ return multierr.Append(f(readObjectCloser), readObjectCloser.Close())
+ },
+ )
+}
+
+// AllPaths walks the bucket and gets all the paths.
+func AllPaths(ctx context.Context, readBucket ReadBucket, prefix string) ([]string, error) {
+ var allPaths []string
+ if err := readBucket.Walk(
+ ctx,
+ prefix,
+ func(objectInfo ObjectInfo) error {
+ allPaths = append(allPaths, objectInfo.Path())
+ return nil
+ },
+ ); err != nil {
+ return nil, err
+ }
+ return allPaths, nil
+}
+
+// Exists returns true if the path exists, false otherwise.
+//
+// Returns error on system error.
+func Exists(ctx context.Context, readBucket ReadBucket, path string) (bool, error) {
+ _, err := readBucket.Stat(ctx, path)
+ if err != nil {
+ if IsNotExist(err) {
+ return false, nil
+ }
+ return false, err
+ }
+ return true, nil
+}
+
+// IsEmpty returns true if the bucket is empty under the prefix.
+//
+// A prefix of "" or "." will check if the entire bucket is empty.
+func IsEmpty(ctx context.Context, readBucket ReadBucket, prefix string) (bool, error) {
+ if err := readBucket.Walk(
+ ctx,
+ prefix,
+ func(ObjectInfo) error {
+ return errIsNotEmpty
+ },
+ ); err != nil {
+ if errors.Is(err, errIsNotEmpty) {
+ return false, nil
+ }
+ return false, err
+ }
+ return true, nil
+}
+
+// allObjectInfos walks the bucket and gets all the ObjectInfos.
+func allObjectInfos(ctx context.Context, readBucket ReadBucket, prefix string) ([]ObjectInfo, error) {
+ var allObjectInfos []ObjectInfo
+ if err := readBucket.Walk(
+ ctx,
+ prefix,
+ func(objectInfo ObjectInfo) error {
+ allObjectInfos = append(allObjectInfos, objectInfo)
+ return nil
+ },
+ ); err != nil {
+ return nil, err
+ }
+ return allObjectInfos, nil
+}
+
+func pathToObjectInfo(objectInfos []ObjectInfo) map[string]ObjectInfo {
+ m := make(map[string]ObjectInfo, len(objectInfos))
+ for _, objectInfo := range objectInfos {
+ m[objectInfo.Path()] = objectInfo
+ }
+ return m
+}
+
+func sortObjectInfos(objectInfos []ObjectInfo) {
+ sort.Slice(
+ objectInfos,
+ func(i int, j int) bool {
+ return objectInfos[i].Path() < objectInfos[j].Path()
+ },
+ )
+}
+
+type compositeReadObjectCloser struct {
+ ObjectInfo
+ io.ReadCloser
+}
+
+type compositeReadWriteBucket struct {
+ ReadBucket
+ WriteBucket
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/stringutil/stringutil.go b/vendor/github.com/bufbuild/buf/private/pkg/stringutil/stringutil.go
new file mode 100644
index 000000000..8303cf078
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/stringutil/stringutil.go
@@ -0,0 +1,304 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 stringutil implements string utilities.
+package stringutil
+
+import (
+ "sort"
+ "strings"
+ "unicode"
+)
+
+// TrimLines splits the output into individual lines and trims the spaces from each line.
+//
+// This also trims the start and end spaces from the original output.
+func TrimLines(output string) string {
+ return strings.TrimSpace(strings.Join(SplitTrimLines(output), "\n"))
+}
+
+// SplitTrimLines splits the output into individual lines and trims the spaces from each line.
+func SplitTrimLines(output string) []string {
+ // this should work for windows as well as \r will be trimmed
+ split := strings.Split(output, "\n")
+ lines := make([]string, len(split))
+ for i, line := range split {
+ lines[i] = strings.TrimSpace(line)
+ }
+ return lines
+}
+
+// SplitTrimLinesNoEmpty splits the output into individual lines and trims the spaces from each line.
+//
+// This removes any empty lines.
+func SplitTrimLinesNoEmpty(output string) []string {
+ // this should work for windows as well as \r will be trimmed
+ split := strings.Split(output, "\n")
+ lines := make([]string, 0, len(split))
+ for _, line := range split {
+ line = strings.TrimSpace(line)
+ if line != "" {
+ lines = append(lines, line)
+ }
+ }
+ return lines
+}
+
+// MapToSortedSlice transforms m to a sorted slice.
+func MapToSortedSlice(m map[string]struct{}) []string {
+ s := MapToSlice(m)
+ sort.Strings(s)
+ return s
+}
+
+// MapToSlice transforms m to a slice.
+func MapToSlice(m map[string]struct{}) []string {
+ s := make([]string, 0, len(m))
+ for e := range m {
+ s = append(s, e)
+ }
+ return s
+}
+
+// SliceToMap transforms s to a map.
+func SliceToMap(s []string) map[string]struct{} {
+ m := make(map[string]struct{}, len(s))
+ for _, e := range s {
+ m[e] = struct{}{}
+ }
+ return m
+}
+
+// SliceToUniqueSortedSlice returns a sorted copy of s with no duplicates.
+func SliceToUniqueSortedSlice(s []string) []string {
+ return MapToSortedSlice(SliceToMap(s))
+}
+
+// SliceToUniqueSortedSliceFilterEmptyStrings returns a sorted copy of s with no duplicates and no empty strings.
+//
+// Strings with only spaces are considered empty.
+func SliceToUniqueSortedSliceFilterEmptyStrings(s []string) []string {
+ m := SliceToMap(s)
+ for key := range m {
+ if strings.TrimSpace(key) == "" {
+ delete(m, key)
+ }
+ }
+ return MapToSortedSlice(m)
+}
+
+// SliceToChunks splits s into chunks of the given chunk size.
+//
+// If s is nil or empty, returns empty.
+// If chunkSize is <=0, returns [][]string{s}.
+func SliceToChunks(s []string, chunkSize int) [][]string {
+ var chunks [][]string
+ if len(s) == 0 {
+ return chunks
+ }
+ if chunkSize <= 0 {
+ return [][]string{s}
+ }
+ c := make([]string, len(s))
+ copy(c, s)
+ // https://github.com/golang/go/wiki/SliceTricks#batching-with-minimal-allocation
+ for chunkSize < len(c) {
+ c, chunks = c[chunkSize:], append(chunks, c[0:chunkSize:chunkSize])
+ }
+ return append(chunks, c)
+}
+
+// SliceElementsEqual returns true if the two slices have equal elements.
+//
+// Nil and empty slices are treated as equals.
+func SliceElementsEqual(one []string, two []string) bool {
+ if len(one) != len(two) {
+ return false
+ }
+ for i, elem := range one {
+ if two[i] != elem {
+ return false
+ }
+ }
+ return true
+}
+
+// SliceElementsContained returns true if superset contains subset.
+//
+// Nil and empty slices are treated as equals.
+func SliceElementsContained(superset []string, subset []string) bool {
+ m := SliceToMap(superset)
+ for _, elem := range subset {
+ if _, ok := m[elem]; !ok {
+ return false
+ }
+ }
+ return true
+}
+
+// JoinSliceQuoted joins the slice with quotes.
+func JoinSliceQuoted(s []string, sep string) string {
+ if len(s) == 0 {
+ return ""
+ }
+ return `"` + strings.Join(s, `"`+sep+`"`) + `"`
+}
+
+// SliceToString prints the slice as [e1,e2].
+func SliceToString(s []string) string {
+ if len(s) == 0 {
+ return ""
+ }
+ return "[" + strings.Join(s, ",") + "]"
+}
+
+// SliceToHumanString prints the slice as "e1, e2, and e3".
+func SliceToHumanString(s []string) string {
+ switch len(s) {
+ case 0:
+ return ""
+ case 1:
+ return s[0]
+ case 2:
+ return s[0] + " and " + s[1]
+ default:
+ return strings.Join(s[:len(s)-1], ", ") + ", and " + s[len(s)-1]
+ }
+}
+
+// SliceToHumanStringQuoted prints the slice as `"e1", "e2", and "e3"`.
+func SliceToHumanStringQuoted(s []string) string {
+ switch len(s) {
+ case 0:
+ return ""
+ case 1:
+ return `"` + s[0] + `"`
+ case 2:
+ return `"` + s[0] + `" and "` + s[1] + `"`
+ default:
+ return `"` + strings.Join(s[:len(s)-1], `", "`) + `", and "` + s[len(s)-1] + `"`
+ }
+}
+
+// SnakeCaseOption is an option for snake_case conversions.
+type SnakeCaseOption func(*snakeCaseOptions)
+
+// SnakeCaseWithNewWordOnDigits is a SnakeCaseOption that signifies
+// to split on digits, ie foo_bar_1 instead of foo_bar1.
+func SnakeCaseWithNewWordOnDigits() SnakeCaseOption {
+ return func(snakeCaseOptions *snakeCaseOptions) {
+ snakeCaseOptions.newWordOnDigits = true
+ }
+}
+
+// ToLowerSnakeCase transforms s to lower_snake_case.
+func ToLowerSnakeCase(s string, options ...SnakeCaseOption) string {
+ return strings.ToLower(toSnakeCase(s, options...))
+}
+
+// ToUpperSnakeCase transforms s to UPPER_SNAKE_CASE.
+func ToUpperSnakeCase(s string, options ...SnakeCaseOption) string {
+ return strings.ToUpper(toSnakeCase(s, options...))
+}
+
+// ToPascalCase converts s to PascalCase.
+//
+// Splits on '-', '_', ' ', '\t', '\n', '\r'.
+// Uppercase letters will stay uppercase,
+func ToPascalCase(s string) string {
+ output := ""
+ var previous rune
+ for i, c := range strings.TrimSpace(s) {
+ if !isDelimiter(c) {
+ if i == 0 || isDelimiter(previous) || unicode.IsUpper(c) {
+ output += string(unicode.ToUpper(c))
+ } else {
+ output += string(unicode.ToLower(c))
+ }
+ }
+ previous = c
+ }
+ return output
+}
+
+// IsAlphanumeric returns true for [0-9a-zA-Z].
+func IsAlphanumeric(r rune) bool {
+ return IsNumeric(r) || IsAlpha(r)
+}
+
+// IsAlpha returns true for [a-zA-Z].
+func IsAlpha(r rune) bool {
+ return IsLowerAlpha(r) || IsUpperAlpha(r)
+}
+
+// IsLowerAlpha returns true for [a-z].
+func IsLowerAlpha(r rune) bool {
+ return 'a' <= r && r <= 'z'
+}
+
+// IsUpperAlpha returns true for [A-Z].
+func IsUpperAlpha(r rune) bool {
+ return 'A' <= r && r <= 'Z'
+}
+
+// IsNumeric returns true for [0-9].
+func IsNumeric(r rune) bool {
+ return '0' <= r && r <= '9'
+}
+
+// IsLowerAlphanumeric returns true for [0-9a-z].
+func IsLowerAlphanumeric(r rune) bool {
+ return IsNumeric(r) || IsLowerAlpha(r)
+}
+
+func toSnakeCase(s string, options ...SnakeCaseOption) string {
+ snakeCaseOptions := &snakeCaseOptions{}
+ for _, option := range options {
+ option(snakeCaseOptions)
+ }
+ output := ""
+ s = strings.TrimFunc(s, isDelimiter)
+ for i, c := range s {
+ if isDelimiter(c) {
+ c = '_'
+ }
+ if i == 0 {
+ output += string(c)
+ } else if isSnakeCaseNewWord(c, snakeCaseOptions.newWordOnDigits) &&
+ output[len(output)-1] != '_' &&
+ ((i < len(s)-1 && !isSnakeCaseNewWord(rune(s[i+1]), true) && !isDelimiter(rune(s[i+1]))) ||
+ (snakeCaseOptions.newWordOnDigits && unicode.IsDigit(c)) ||
+ (unicode.IsLower(rune(s[i-1])))) {
+ output += "_" + string(c)
+ } else if !(isDelimiter(c) && output[len(output)-1] == '_') {
+ output += string(c)
+ }
+ }
+ return output
+}
+
+func isSnakeCaseNewWord(r rune, newWordOnDigits bool) bool {
+ if newWordOnDigits {
+ return unicode.IsUpper(r) || unicode.IsDigit(r)
+ }
+ return unicode.IsUpper(r)
+}
+
+func isDelimiter(r rune) bool {
+ return r == '.' || r == '-' || r == '_' || r == ' ' || r == '\t' || r == '\n' || r == '\r'
+}
+
+type snakeCaseOptions struct {
+ newWordOnDigits bool
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/stringutil/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/stringutil/usage.gen.go
new file mode 100644
index 000000000..1f7e553f0
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/stringutil/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package stringutil
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/tagrangeutil/tagrangeutil.go b/vendor/github.com/bufbuild/buf/private/pkg/tagrangeutil/tagrangeutil.go
new file mode 100644
index 000000000..1ef3a4a46
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/tagrangeutil/tagrangeutil.go
@@ -0,0 +1,111 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 tagrangeutil
+
+import (
+ "sort"
+
+ "github.com/bufbuild/buf/private/pkg/protosource"
+)
+
+type tagRangeGroup struct {
+ ranges []protosource.TagRange
+ start int
+ end int
+}
+
+// sortTagRanges sorts tag ranges by their start, end components.
+func sortTagRanges(ranges []protosource.TagRange) []protosource.TagRange {
+ rangesCopy := make([]protosource.TagRange, len(ranges))
+ copy(rangesCopy, ranges)
+
+ sort.Slice(rangesCopy, func(i, j int) bool {
+ return rangesCopy[i].Start() < rangesCopy[j].Start() ||
+ (rangesCopy[i].Start() == rangesCopy[j].Start() &&
+ rangesCopy[i].End() < rangesCopy[j].End())
+ })
+
+ return rangesCopy
+}
+
+// groupAdjacentTagRanges sorts and groups adjacent tag ranges.
+func groupAdjacentTagRanges(ranges []protosource.TagRange) []tagRangeGroup {
+ if len(ranges) == 0 {
+ return []tagRangeGroup{}
+ }
+
+ sortedTagRanges := sortTagRanges(ranges)
+
+ j := 0
+ groupedTagRanges := make([]tagRangeGroup, 1, len(ranges))
+ groupedTagRanges[j] = tagRangeGroup{
+ ranges: sortedTagRanges[0:1],
+ start: sortedTagRanges[0].Start(),
+ end: sortedTagRanges[0].End(),
+ }
+
+ for i := 1; i < len(sortedTagRanges); i++ {
+ if sortedTagRanges[i].Start() <= sortedTagRanges[i-1].End()+1 {
+ if sortedTagRanges[i].End() > groupedTagRanges[j].end {
+ groupedTagRanges[j].end = sortedTagRanges[i].End()
+ }
+ groupedTagRanges[j].ranges = groupedTagRanges[j].ranges[0 : len(groupedTagRanges[j].ranges)+1]
+ } else {
+ groupedTagRanges = append(groupedTagRanges, tagRangeGroup{
+ ranges: sortedTagRanges[i : i+1],
+ start: sortedTagRanges[i].Start(),
+ end: sortedTagRanges[i].End(),
+ })
+ j++
+ }
+ }
+
+ return groupedTagRanges
+}
+
+// CheckIsSubset checks if supersetRanges is a superset of subsetRanges.
+// If so, it returns true and nil. If not, it returns false with a slice of failing ranges from subsetRanges.
+func CheckIsSubset(supersetRanges []protosource.TagRange, subsetRanges []protosource.TagRange) (bool, []protosource.TagRange) {
+ if len(subsetRanges) == 0 {
+ return true, nil
+ }
+
+ if len(supersetRanges) == 0 {
+ return false, subsetRanges
+ }
+
+ supersetTagRangeGroups := groupAdjacentTagRanges(supersetRanges)
+ subsetTagRanges := sortTagRanges(subsetRanges)
+ missingTagRanges := []protosource.TagRange{}
+
+ for i, j := 0, 0; j < len(subsetTagRanges); j++ {
+ for supersetTagRangeGroups[i].end < subsetTagRanges[j].Start() {
+ if i++; i == len(supersetTagRangeGroups) {
+ missingTagRanges = append(missingTagRanges, subsetTagRanges[j:]...)
+ return false, missingTagRanges
+ }
+ }
+ if supersetTagRangeGroups[i].start > subsetTagRanges[j].Start() ||
+ supersetTagRangeGroups[i].end < subsetTagRanges[j].End() {
+ missingTagRanges = append(missingTagRanges, subsetTagRanges[j])
+ }
+ }
+
+ if len(missingTagRanges) != 0 {
+ return false, missingTagRanges
+ }
+
+ return true, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/tagrangeutil/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/tagrangeutil/usage.gen.go
new file mode 100644
index 000000000..2b18e969c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/tagrangeutil/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package tagrangeutil
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/thread/thread.go b/vendor/github.com/bufbuild/buf/private/pkg/thread/thread.go
new file mode 100644
index 000000000..49d6c1aea
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/thread/thread.go
@@ -0,0 +1,145 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 thread
+
+import (
+ "context"
+ "runtime"
+ "sync"
+
+ "go.uber.org/multierr"
+)
+
+var (
+ globalParallelism = runtime.GOMAXPROCS(0)
+ globalLock sync.RWMutex
+)
+
+// Parallelism returns the current parellism.
+//
+// This defaults to the number of CPUs.
+func Parallelism() int {
+ globalLock.RLock()
+ parallelism := globalParallelism
+ globalLock.RUnlock()
+ return parallelism
+}
+
+// SetParallelism sets the parallelism.
+//
+// If parallelism < 1, this sets the parallelism to 1.
+func SetParallelism(parallelism int) {
+ if parallelism < 1 {
+ parallelism = 1
+ }
+ globalLock.Lock()
+ globalParallelism = parallelism
+ globalLock.Unlock()
+}
+
+// Parallelize runs the jobs in parallel.
+//
+// A max of Parallelism jobs will be run at once.
+// Returns the combined error from the jobs.
+func Parallelize(ctx context.Context, jobs []func(context.Context) error, options ...ParallelizeOption) error {
+ parallelizeOptions := newParallelizeOptions()
+ for _, option := range options {
+ option(parallelizeOptions)
+ }
+ switch len(jobs) {
+ case 0:
+ return nil
+ case 1:
+ return jobs[0](ctx)
+ }
+ multiplier := parallelizeOptions.multiplier
+ if multiplier < 1 {
+ multiplier = 1
+ }
+ semaphoreC := make(chan struct{}, Parallelism()*multiplier)
+ var retErr error
+ var wg sync.WaitGroup
+ var lock sync.Mutex
+ var stop bool
+ for _, job := range jobs {
+ if stop {
+ break
+ }
+ job := job
+ // We always want context cancellation/deadline expiration to take
+ // precedence over the semaphore unblocking, but select statements choose
+ // among the unblocked non-default cases pseudorandomly. To correctly
+ // enforce precedence, use a similar pattern to the check-lock-check
+ // pattern common with sync.RWMutex: check the context twice, and only do
+ // the semaphore-protected work in the innermost default case.
+ select {
+ case <-ctx.Done():
+ stop = true
+ case semaphoreC <- struct{}{}:
+ select {
+ case <-ctx.Done():
+ stop = true
+ default:
+ wg.Add(1)
+ go func() {
+ if err := job(ctx); err != nil {
+ lock.Lock()
+ retErr = multierr.Append(retErr, err)
+ lock.Unlock()
+ if parallelizeOptions.cancel != nil {
+ parallelizeOptions.cancel()
+ }
+ }
+ // This will never block.
+ <-semaphoreC
+ wg.Done()
+ }()
+ }
+ }
+ }
+ wg.Wait()
+ return retErr
+}
+
+// ParallelizeOption is an option to Parallelize.
+type ParallelizeOption func(*parallelizeOptions)
+
+// ParallelizeWithMultiplier returns a new ParallelizeOption that will use a multiple
+// of Parallelism() for the number of jobs that can be run at once.
+//
+// The default is to only do Parallelism() number of jobs.
+// A multiplier of <1 has no meaning.
+func ParallelizeWithMultiplier(multiplier int) ParallelizeOption {
+ return func(parallelizeOptions *parallelizeOptions) {
+ parallelizeOptions.multiplier = multiplier
+ }
+}
+
+// ParallelizeWithCancel returns a new ParallelizeOption that will call the
+// given context.CancelFunc if any job fails.
+func ParallelizeWithCancel(cancel context.CancelFunc) ParallelizeOption {
+ return func(parallelizeOptions *parallelizeOptions) {
+ parallelizeOptions.cancel = cancel
+ }
+}
+
+type parallelizeOptions struct {
+ multiplier int
+ cancel context.CancelFunc
+}
+
+func newParallelizeOptions() *parallelizeOptions {
+ return ¶llelizeOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/thread/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/thread/usage.gen.go
new file mode 100644
index 000000000..975b62b47
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/thread/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package thread
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/tmp/tmp.go b/vendor/github.com/bufbuild/buf/private/pkg/tmp/tmp.go
new file mode 100644
index 000000000..b5ac92c99
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/tmp/tmp.go
@@ -0,0 +1,179 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 tmp provides temporary files and directories.
+//
+// Usage of this package requires eng approval - ask before using.
+package tmp
+
+import (
+ "io"
+ "os"
+ "path/filepath"
+
+ "github.com/bufbuild/buf/private/pkg/interrupt"
+ "github.com/bufbuild/buf/private/pkg/uuidutil"
+ "go.uber.org/multierr"
+)
+
+// File is a temporary file
+//
+// It must be closed when done.
+type File interface {
+ io.Closer
+
+ AbsPath() string
+}
+
+// NewFileWithData returns a new temporary file with the given data.
+//
+// It must be closed when done.
+// This file will be deleted on interrupt signals.
+//
+// Usage of this function requires eng approval - ask before using.
+func NewFileWithData(data []byte) (File, error) {
+ id, err := uuidutil.New()
+ if err != nil {
+ return nil, err
+ }
+ file, err := os.CreateTemp("", id.String())
+ if err != nil {
+ return nil, err
+ }
+ path := file.Name()
+ // just in case
+ absPath, err := filepath.Abs(filepath.Clean(path))
+ if err != nil {
+ return nil, err
+ }
+ signalC, closer := interrupt.NewSignalChannel()
+ go func() {
+ <-signalC
+ _ = os.Remove(absPath)
+ }()
+ _, err = file.Write(data)
+ err = multierr.Append(err, file.Close())
+ if err != nil {
+ err = multierr.Append(err, os.Remove(absPath))
+ closer()
+ return nil, err
+ }
+ return newFile(absPath, closer), nil
+}
+
+// Dir is a temporary directory.
+//
+// It must be closed when done.
+type Dir interface {
+ io.Closer
+
+ AbsPath() string
+}
+
+// NewDir returns a new temporary directory.
+//
+// It must be closed when done.
+// This file will be deleted on interrupt signals.
+//
+// Usage of this function requires eng approval - ask before using.
+func NewDir(options ...DirOption) (Dir, error) {
+ dirOptions := newDirOptions()
+ for _, option := range options {
+ option(dirOptions)
+ }
+ id, err := uuidutil.New()
+ if err != nil {
+ return nil, err
+ }
+ path, err := os.MkdirTemp(dirOptions.basePath, id.String())
+ if err != nil {
+ return nil, err
+ }
+ // just in case
+ absPath, err := filepath.Abs(filepath.Clean(path))
+ if err != nil {
+ return nil, err
+ }
+ signalC, closer := interrupt.NewSignalChannel()
+ go func() {
+ <-signalC
+ _ = os.RemoveAll(absPath)
+ }()
+ return newDir(absPath, closer), nil
+}
+
+// DirOption is an option for NewDir.
+type DirOption func(*dirOptions)
+
+// DirWithBasePath returns a new DirOption that sets the base path to create
+// the temporary directory in.
+//
+// The default is to use os.TempDir().
+func DirWithBasePath(basePath string) DirOption {
+ return func(dirOptions *dirOptions) {
+ dirOptions.basePath = basePath
+ }
+}
+
+type file struct {
+ absPath string
+ closer func()
+}
+
+func newFile(absPath string, closer func()) *file {
+ return &file{
+ absPath: absPath,
+ closer: closer,
+ }
+}
+
+func (f *file) AbsPath() string {
+ return f.absPath
+}
+
+func (f *file) Close() error {
+ err := os.Remove(f.absPath)
+ f.closer()
+ return err
+}
+
+type dir struct {
+ absPath string
+ closer func()
+}
+
+func newDir(absPath string, closer func()) *dir {
+ return &dir{
+ absPath: absPath,
+ closer: closer,
+ }
+}
+
+func (d *dir) AbsPath() string {
+ return d.absPath
+}
+
+func (d *dir) Close() error {
+ err := os.RemoveAll(d.absPath)
+ d.closer()
+ return err
+}
+
+type dirOptions struct {
+ basePath string
+}
+
+func newDirOptions() *dirOptions {
+ return &dirOptions{}
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/tmp/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/tmp/usage.gen.go
new file mode 100644
index 000000000..2b41f0846
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/tmp/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package tmp
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpclient/client.go b/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpclient/client.go
new file mode 100644
index 000000000..88d626633
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpclient/client.go
@@ -0,0 +1,73 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 httpclient
+
+import (
+ "crypto/tls"
+ "net"
+ "net/http"
+
+ "github.com/bufbuild/buf/private/pkg/observability"
+ "go.opencensus.io/tag"
+ "golang.org/x/net/http2"
+)
+
+type clientOptions struct {
+ tlsConfig *tls.Config
+ observability bool
+ observabilityTags []tag.Mutator
+ proxy Proxy
+ interceptorFunc ClientInterceptorFunc
+ h2c bool
+}
+
+func newClient(options ...ClientOption) *http.Client {
+ opts := &clientOptions{
+ proxy: http.ProxyFromEnvironment,
+ }
+ for _, opt := range options {
+ opt(opts)
+ }
+ var roundTripper http.RoundTripper
+ if opts.h2c {
+ roundTripper = &http2.Transport{
+ AllowHTTP: true,
+ TLSClientConfig: opts.tlsConfig,
+ DialTLS: func(netw, addr string, cfg *tls.Config) (net.Conn, error) {
+ return net.Dial(netw, addr)
+ },
+ }
+ } else {
+ roundTripper = &http.Transport{
+ TLSClientConfig: opts.tlsConfig,
+ Proxy: opts.proxy,
+ }
+ }
+ if opts.interceptorFunc != nil {
+ roundTripper = opts.interceptorFunc(roundTripper)
+ }
+ if opts.observability {
+ roundTripper = observability.NewHTTPTransport(roundTripper, opts.observabilityTags...)
+ }
+ return &http.Client{
+ Transport: roundTripper,
+ }
+}
+
+func newClientWithTransport(transport http.RoundTripper) *http.Client {
+ return &http.Client{
+ Transport: transport,
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpclient/httpclient.go b/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpclient/httpclient.go
new file mode 100644
index 000000000..78ac44f9d
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpclient/httpclient.go
@@ -0,0 +1,92 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 httpclient
+
+import (
+ "crypto/tls"
+ "net/http"
+ "net/url"
+
+ "go.opencensus.io/tag"
+)
+
+// NewClient returns a new Client.
+func NewClient(options ...ClientOption) *http.Client {
+ return newClient(options...)
+}
+
+// ClientOption is an option for a new Client.
+type ClientOption func(*clientOptions)
+
+// ClientInterceptorFunc is a function that wraps a RoundTripper with any interceptors
+type ClientInterceptorFunc func(http.RoundTripper) http.RoundTripper
+
+// WithTLSConfig returns a new ClientOption to use the tls.Config.
+//
+// The default is to use no TLS.
+func WithTLSConfig(tlsConfig *tls.Config) ClientOption {
+ return func(opts *clientOptions) {
+ opts.tlsConfig = tlsConfig
+ }
+}
+
+// WithObservability returns a new ClientOption to use
+// OpenCensus tracing and metrics.
+//
+// The default is to use no observability.
+func WithObservability(tags ...tag.Mutator) ClientOption {
+ return func(opts *clientOptions) {
+ opts.observability = true
+ opts.observabilityTags = tags
+ }
+}
+
+// WithH2C returns a new ClientOption that allows dialing
+// h2c (cleartext) servers.
+func WithH2C() ClientOption {
+ return func(opts *clientOptions) {
+ opts.h2c = true
+ }
+}
+
+// WithProxy returns a new ClientOption to use
+// a proxy.
+//
+// The default is to use http.ProxyFromEnvironment
+func WithProxy(proxyFunc Proxy) ClientOption {
+ return func(opts *clientOptions) {
+ opts.proxy = proxyFunc
+ }
+}
+
+// WithInterceptorFunc returns a new ClientOption to use a given interceptor.
+func WithInterceptorFunc(interceptorFunc ClientInterceptorFunc) ClientOption {
+ return func(opts *clientOptions) {
+ opts.interceptorFunc = interceptorFunc
+ }
+}
+
+// Proxy specifies a function to return a proxy for a given
+// Request. If the function returns a non-nil error, the
+// request is aborted with the provided error.
+type Proxy func(req *http.Request) (*url.URL, error)
+
+// NewClientWithTransport returns a new Client with the
+// given transport. This is a separate constructor so
+// that it's clear it cannot be used in combination
+// with other ClientOptions.
+func NewClientWithTransport(transport http.RoundTripper) *http.Client {
+ return newClientWithTransport(transport)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpclient/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpclient/usage.gen.go
new file mode 100644
index 000000000..1c2055331
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpclient/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package httpclient
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpserver/httpserver.go b/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpserver/httpserver.go
new file mode 100644
index 000000000..f6bf69710
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpserver/httpserver.go
@@ -0,0 +1,168 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 httpserver
+
+import (
+ "context"
+ "crypto/tls"
+ "net"
+ "net/http"
+ "time"
+
+ "github.com/go-chi/chi/v5"
+ "go.uber.org/zap"
+ "golang.org/x/net/http2"
+ "golang.org/x/net/http2/h2c"
+ "golang.org/x/sync/errgroup"
+)
+
+const (
+ // DefaultShutdownTimeout is the default shutdown timeout.
+ DefaultShutdownTimeout = 10 * time.Second
+ // DefaultReadHeaderTimeout is the default read header timeout.
+ DefaultReadHeaderTimeout = 30 * time.Second
+ // DefaultIdleTimeout is the amount of time an HTTP/2 connection can be idle.
+ DefaultIdleTimeout = 3 * time.Minute
+)
+
+type runner struct {
+ shutdownTimeout time.Duration
+ readHeaderTimeout time.Duration
+ tlsConfig *tls.Config
+ walkFunc chi.WalkFunc
+}
+
+// RunOption is an option for a new Run.
+type RunOption func(*runner)
+
+// RunWithShutdownTimeout returns a new RunOption that uses the given shutdown timeout.
+//
+// The default is to use DefaultShutdownTimeout.
+// If shutdownTimeout is 0, no graceful shutdown will be performed.
+func RunWithShutdownTimeout(shutdownTimeout time.Duration) RunOption {
+ return func(runner *runner) {
+ runner.shutdownTimeout = shutdownTimeout
+ }
+}
+
+// RunWithReadHeaderTimeout returns a new RunOption that uses the given read header timeout.
+//
+// The default is to use DefaultReadHeaderTimeout.
+// If readHeaderTimeout is 0, no read header timeout will be used.
+func RunWithReadHeaderTimeout(readHeaderTimeout time.Duration) RunOption {
+ return func(runner *runner) {
+ runner.readHeaderTimeout = readHeaderTimeout
+ }
+}
+
+// RunWithTLSConfig returns a new RunOption that uses the given tls.Config.
+//
+// The default is to use no TLS.
+func RunWithTLSConfig(tlsConfig *tls.Config) RunOption {
+ return func(runner *runner) {
+ runner.tlsConfig = tlsConfig
+ }
+}
+
+// RunWithWalkFunc returns a new RunOption that runs chi.Walk to walk the
+// handler after all middlewares and routes have been mounted, but before the
+// server is started.
+// The walkFunc will only be called if the handler passed to Run is a
+// chi.Routes.
+func RunWithWalkFunc(walkFunc chi.WalkFunc) RunOption {
+ return func(runner *runner) {
+ runner.walkFunc = walkFunc
+ }
+}
+
+// Run will start a HTTP server listening on the provided listener and
+// serving the provided handler. This call is blocking and the run
+// is cancelled when the input context is cancelled, the listener is
+// closed upon return.
+//
+// The Run function can be configured further by passing a variety of options.
+func Run(
+ ctx context.Context,
+ logger *zap.Logger,
+ listener net.Listener,
+ handler http.Handler,
+ options ...RunOption,
+) error {
+ s := &runner{
+ shutdownTimeout: DefaultShutdownTimeout,
+ readHeaderTimeout: DefaultReadHeaderTimeout,
+ }
+ for _, option := range options {
+ option(s)
+ }
+ stdLogger, err := zap.NewStdLogAt(logger.Named("httpserver"), zap.ErrorLevel)
+ if err != nil {
+ return err
+ }
+ httpServer := &http.Server{
+ Handler: handler,
+ ReadHeaderTimeout: s.readHeaderTimeout,
+ ErrorLog: stdLogger,
+ TLSConfig: s.tlsConfig,
+ }
+ if s.tlsConfig == nil {
+ httpServer.Handler = h2c.NewHandler(handler, &http2.Server{
+ IdleTimeout: DefaultIdleTimeout,
+ })
+ }
+ if s.walkFunc != nil {
+ routes, ok := handler.(chi.Routes)
+ if ok {
+ if err := chi.Walk(routes, s.walkFunc); err != nil {
+ return err
+ }
+ }
+ }
+
+ eg, ctx := errgroup.WithContext(ctx)
+ eg.Go(func() error {
+ return httpServe(httpServer, listener)
+ })
+ eg.Go(func() error {
+ <-ctx.Done()
+ start := time.Now()
+ logger.Info("shutdown_starting", zap.Duration("shutdown_timeout", s.shutdownTimeout))
+ defer logger.Info("shutdown_finished", zap.Duration("duration", time.Since(start)))
+ if s.shutdownTimeout != 0 {
+ ctx, cancel := context.WithTimeout(context.Background(), s.shutdownTimeout)
+ defer cancel()
+ return httpServer.Shutdown(ctx)
+ }
+ return httpServer.Close()
+ })
+
+ logger.Info(
+ "starting",
+ zap.String("address", listener.Addr().String()),
+ zap.Duration("shutdown_timeout", s.shutdownTimeout),
+ zap.Bool("tls", s.tlsConfig != nil),
+ )
+ if err := eg.Wait(); err != http.ErrServerClosed {
+ return err
+ }
+ return nil
+}
+
+func httpServe(httpServer *http.Server, listener net.Listener) error {
+ if httpServer.TLSConfig != nil {
+ return httpServer.ServeTLS(listener, "", "")
+ }
+ return httpServer.Serve(listener)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpserver/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpserver/usage.gen.go
new file mode 100644
index 000000000..d09a6d2a5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/transport/http/httpserver/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package httpserver
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/uuidutil/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/uuidutil/usage.gen.go
new file mode 100644
index 000000000..2e2beb180
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/uuidutil/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package uuidutil
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/uuidutil/uuidutil.go b/vendor/github.com/bufbuild/buf/private/pkg/uuidutil/uuidutil.go
new file mode 100644
index 000000000..d0e8a535c
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/uuidutil/uuidutil.go
@@ -0,0 +1,95 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 uuidutil
+
+import (
+ "fmt"
+
+ "github.com/gofrs/uuid"
+)
+
+// New returns a new random UUIDv4.
+func New() (uuid.UUID, error) {
+ id, err := uuid.NewV4()
+ if err != nil {
+ return uuid.Nil, err
+ }
+ return id, nil
+}
+
+// ToDashless returns the uuid without dashes.
+func ToDashless(id uuid.UUID) (string, error) {
+ s := id.String()
+ if s[8] != '-' {
+ return "", fmt.Errorf("expected - at char 9: %q", s)
+ }
+ if s[13] != '-' {
+ return "", fmt.Errorf("expected - at char 14: %q", s)
+ }
+ if s[18] != '-' {
+ return "", fmt.Errorf("expected - at char 19: %q", s)
+ }
+ if s[23] != '-' {
+ return "", fmt.Errorf("expected - at char 24: %q", s)
+ }
+ return s[0:8] + s[9:13] + s[14:18] + s[19:23] + s[24:], nil
+}
+
+// FromString returns the uuid from the string.
+//
+// As opposed to uuid.FromString, this only accepts uuids with dashes.
+// Always use this instead of uuid.FromString.
+func FromString(s string) (uuid.UUID, error) {
+ if len(s) != 36 {
+ return uuid.Nil, fmt.Errorf("expected uuid to be of length 36 but was %d: %s", len(s), s)
+ }
+ return uuid.FromString(s)
+}
+
+// FromDashless returns the dashless uuid with dashes.
+func FromDashless(dashless string) (uuid.UUID, error) {
+ if len(dashless) != 32 {
+ return uuid.Nil, fmt.Errorf("expected dashless uuid to be of length 32 but was %d: %s", len(dashless), dashless)
+ }
+ // FromString accepts both dashless and regular, we do this because we need to add our own FromString that does not accept dashless
+ return FromString(dashless[0:8] + "-" + dashless[8:12] + "-" + dashless[12:16] + "-" + dashless[16:20] + "-" + dashless[20:])
+}
+
+// Validate determines if the given UUID string is valid.
+func Validate(s string) error {
+ _, err := FromString(s)
+ return err
+}
+
+// ValidateDashless validates the dashless uuid is valid.
+func ValidateDashless(dashless string) error {
+ _, err := FromDashless(dashless)
+ return err
+}
+
+// FromStringSlice returns a slice of uuids from the string slice.
+//
+// This only accepts uuids with dashes.
+func FromStringSlice(s []string) ([]uuid.UUID, error) {
+ var parsedUUIDS []uuid.UUID
+ for _, stringID := range s {
+ parsed, err := FromString(stringID)
+ if err != nil {
+ return nil, err
+ }
+ parsedUUIDS = append(parsedUUIDS, parsed)
+ }
+ return parsedUUIDS, nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/verbose/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/verbose/usage.gen.go
new file mode 100644
index 000000000..f895e3db5
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/verbose/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package verbose
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/verbose/verbose.go b/vendor/github.com/bufbuild/buf/private/pkg/verbose/verbose.go
new file mode 100644
index 000000000..15a0daadb
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/verbose/verbose.go
@@ -0,0 +1,75 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 verbose
+
+import (
+ "fmt"
+ "io"
+ "strings"
+)
+
+var (
+ // NopPrinter is a no-op printer.
+ //
+ // This generally aligns with the --verbose flag not being set.
+ NopPrinter = nopPrinter{}
+)
+
+// Printer prints verbose messages.
+type Printer interface {
+ // Printf prints a new verbose message.
+ //
+ // Leading and trailing newlines are not respected.
+ //
+ // Callers should not rely on the print calls being reliable, i.e. errors to
+ // a backing Writer will be ignored.
+ Printf(format string, args ...interface{})
+}
+
+// NewWritePrinter returns a new Printer using the given Writer.
+//
+// The trimmed prefix is printed with a : before each line.
+//
+// This generally aligns with the --verbose flag being set and writer being stderr.
+func NewWritePrinter(writer io.Writer, prefix string) Printer {
+ return newWritePrinter(writer, prefix)
+}
+
+type nopPrinter struct{}
+
+func (nopPrinter) Printf(string, ...interface{}) {}
+
+type writePrinter struct {
+ writer io.Writer
+ prefix string
+}
+
+func newWritePrinter(writer io.Writer, prefix string) *writePrinter {
+ prefix = strings.TrimSpace(prefix)
+ if prefix != "" {
+ prefix = prefix + ": "
+ }
+ return &writePrinter{
+ writer: writer,
+ prefix: prefix,
+ }
+}
+
+func (w *writePrinter) Printf(format string, args ...interface{}) {
+ if value := strings.TrimSpace(fmt.Sprintf(format, args...)); value != "" {
+ // Errors are ignored per the interface spec.
+ _, _ = w.writer.Write([]byte(w.prefix + value + "\n"))
+ }
+}
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/zaputil/usage.gen.go b/vendor/github.com/bufbuild/buf/private/pkg/zaputil/usage.gen.go
new file mode 100644
index 000000000..402a913f8
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/zaputil/usage.gen.go
@@ -0,0 +1,19 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Generated. DO NOT EDIT.
+
+package zaputil
+
+import _ "github.com/bufbuild/buf/private/usage"
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/zaputil/vars.go b/vendor/github.com/bufbuild/buf/private/pkg/zaputil/vars.go
new file mode 100644
index 000000000..6467f6998
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/zaputil/vars.go
@@ -0,0 +1,66 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 zaputil
+
+import (
+ "go.uber.org/zap/zapcore"
+)
+
+var (
+ textEncoderConfig = zapcore.EncoderConfig{
+ MessageKey: "M",
+ LevelKey: "L",
+ //TimeKey: "T",
+ NameKey: "N",
+ CallerKey: "C",
+ StacktraceKey: "S",
+ LineEnding: zapcore.DefaultLineEnding,
+ EncodeLevel: zapcore.CapitalLevelEncoder,
+ //EncodeTime: zapcore.ISO8601TimeEncoder,
+ EncodeDuration: zapcore.StringDurationEncoder,
+ EncodeCaller: zapcore.ShortCallerEncoder,
+ EncodeName: zapcore.FullNameEncoder,
+ }
+
+ colortextEncoderConfig = zapcore.EncoderConfig{
+ MessageKey: "M",
+ LevelKey: "L",
+ //TimeKey: "T",
+ NameKey: "N",
+ CallerKey: "C",
+ StacktraceKey: "S",
+ LineEnding: zapcore.DefaultLineEnding,
+ EncodeLevel: zapcore.CapitalColorLevelEncoder,
+ //EncodeTime: zapcore.ISO8601TimeEncoder,
+ EncodeDuration: zapcore.StringDurationEncoder,
+ EncodeCaller: zapcore.ShortCallerEncoder,
+ EncodeName: zapcore.FullNameEncoder,
+ }
+
+ jsonEncoderConfig = zapcore.EncoderConfig{
+ MessageKey: "message",
+ LevelKey: "level",
+ TimeKey: "time",
+ NameKey: "logger",
+ CallerKey: "caller",
+ StacktraceKey: "stacktrace",
+ LineEnding: zapcore.DefaultLineEnding,
+ EncodeLevel: zapcore.LowercaseLevelEncoder,
+ EncodeTime: zapcore.ISO8601TimeEncoder,
+ EncodeDuration: zapcore.SecondsDurationEncoder,
+ EncodeCaller: zapcore.ShortCallerEncoder,
+ EncodeName: zapcore.FullNameEncoder,
+ }
+)
diff --git a/vendor/github.com/bufbuild/buf/private/pkg/zaputil/zaputil.go b/vendor/github.com/bufbuild/buf/private/pkg/zaputil/zaputil.go
new file mode 100644
index 000000000..a02fe769e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/pkg/zaputil/zaputil.go
@@ -0,0 +1,53 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 zaputil implements utilities for zap.
+package zaputil
+
+import (
+ "io"
+
+ "go.uber.org/zap"
+ "go.uber.org/zap/zapcore"
+)
+
+// NewLogger returns a new Logger.
+func NewLogger(
+ writer io.Writer,
+ level zapcore.Level,
+ encoder zapcore.Encoder,
+) *zap.Logger {
+ return zap.New(
+ zapcore.NewCore(
+ encoder,
+ zapcore.Lock(zapcore.AddSync(writer)),
+ zap.NewAtomicLevelAt(level),
+ ),
+ )
+}
+
+// NewTextEncoder returns a new text Encoder.
+func NewTextEncoder() zapcore.Encoder {
+ return zapcore.NewConsoleEncoder(textEncoderConfig)
+}
+
+// NewColortextEncoder returns a new colortext Encoder.
+func NewColortextEncoder() zapcore.Encoder {
+ return zapcore.NewConsoleEncoder(colortextEncoderConfig)
+}
+
+// NewJSONEncoder returns a new JSON encoder.
+func NewJSONEncoder() zapcore.Encoder {
+ return zapcore.NewJSONEncoder(jsonEncoderConfig)
+}
diff --git a/vendor/github.com/bufbuild/buf/private/usage/usage.go b/vendor/github.com/bufbuild/buf/private/usage/usage.go
new file mode 100644
index 000000000..7ea8e9250
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/usage/usage.go
@@ -0,0 +1,47 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 usage
+
+import (
+ "errors"
+ "fmt"
+ "os"
+ "path/filepath"
+ "runtime/debug"
+ "strings"
+)
+
+const debugBinPrefix = "__debug_bin"
+
+func init() {
+ if err := check(); err != nil {
+ panic(err.Error())
+ }
+}
+
+func check() error {
+ buildInfo, ok := debug.ReadBuildInfo()
+ if !ok || buildInfo.Main.Path == "" {
+ // Detect and allow *.test and __debug_bin* files.
+ if !strings.HasSuffix(os.Args[0], testSuffix) && !strings.HasPrefix(filepath.Base(os.Args[0]), debugBinPrefix) {
+ return errors.New("github.com/bufbuild/buf/private code must only be imported by github.com/bufbuild projects")
+ }
+ return nil
+ }
+ if !strings.HasPrefix(buildInfo.Main.Path, "github.com/bufbuild") {
+ return fmt.Errorf("github.com/bufbuild/buf/private code must only be imported by github.com/bufbuild projects but was used in %s", buildInfo.Main.Path)
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/buf/private/usage/usage_unix.go b/vendor/github.com/bufbuild/buf/private/usage/usage_unix.go
new file mode 100644
index 000000000..5447e5328
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/usage/usage_unix.go
@@ -0,0 +1,20 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 aix || darwin || dragonfly || freebsd || (js && wasm) || linux || netbsd || openbsd || solaris
+// +build aix darwin dragonfly freebsd js,wasm linux netbsd openbsd solaris
+
+package usage
+
+const testSuffix = ".test"
diff --git a/vendor/github.com/bufbuild/buf/private/usage/usage_windows.go b/vendor/github.com/bufbuild/buf/private/usage/usage_windows.go
new file mode 100644
index 000000000..2915d378e
--- /dev/null
+++ b/vendor/github.com/bufbuild/buf/private/usage/usage_windows.go
@@ -0,0 +1,20 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 usage
+
+const testSuffix = ".test.exe"
diff --git a/vendor/github.com/bufbuild/connect-go/.gitignore b/vendor/github.com/bufbuild/connect-go/.gitignore
new file mode 100644
index 000000000..b300197a2
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/.gitignore
@@ -0,0 +1,5 @@
+# Autogenerated by makego. DO NOT EDIT.
+/.tmp/
+*.pprof
+*.svg
+cover.out
diff --git a/vendor/github.com/bufbuild/connect-go/.golangci.yml b/vendor/github.com/bufbuild/connect-go/.golangci.yml
new file mode 100644
index 000000000..e70e67739
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/.golangci.yml
@@ -0,0 +1,93 @@
+run:
+ skip-dirs-use-default: false
+linters-settings:
+ errcheck:
+ check-type-assertions: true
+ exhaustruct:
+ include:
+ # No zero values for param structs.
+ - 'github\.com/bufbuild/connect-go\..*[pP]arams'
+ # No zero values for ClientStream, ServerStream, and friends.
+ - 'github\.com/bufbuild/connect-go\.ClientStream.*'
+ - 'github\.com/bufbuild/connect-go\.ServerStream.*'
+ - 'github\.com/bufbuild/connect-go\.BidiStream.*'
+ forbidigo:
+ forbid:
+ - '^fmt\.Print'
+ - '^log\.'
+ - '^print$'
+ - '^println$'
+ - '^panic$'
+ godox:
+ # TODO, OPT, etc. comments are fine to commit. Use FIXME comments for
+ # temporary hacks, and use godox to prevent committing them.
+ keywords: [FIXME]
+ varnamelen:
+ ignore-decls:
+ - T any
+ - i int
+ - wg sync.WaitGroup
+linters:
+ enable-all: true
+ disable:
+ - cyclop # covered by gocyclo
+ - deadcode # abandoned
+ - exhaustivestruct # replaced by exhaustruct
+ - funlen # rely on code review to limit function length
+ - gocognit # dubious "cognitive overhead" quantification
+ - gofumpt # prefer standard gofmt
+ - goimports # rely on gci instead
+ - golint # deprecated by Go team
+ - gomnd # some unnamed constants are okay
+ - ifshort # deprecated by author
+ - interfacer # deprecated by author
+ - ireturn # "accept interfaces, return structs" isn't ironclad
+ - lll # don't want hard limits for line length
+ - maintidx # covered by gocyclo
+ - maligned # readability trumps efficient struct packing
+ - nlreturn # generous whitespace violates house style
+ - nosnakecase # deprecated in https://github.com/golangci/golangci-lint/pull/3065
+ - scopelint # deprecated by author
+ - structcheck # abandoned
+ - testpackage # internal tests are fine
+ - varcheck # abandoned
+ - wrapcheck # don't _always_ need to wrap errors
+ - wsl # generous whitespace violates house style
+issues:
+ exclude:
+ # Don't ban use of fmt.Errorf to create new errors, but the remaining
+ # checks from err113 are useful.
+ - "err113: do not define dynamic errors.*"
+
+ exclude-rules:
+ # If future reflect.Kinds are nil-able, we'll find out when a test fails.
+ - linters: [exhaustive]
+ path: internal/assert/assert.go
+ # We need our duplex HTTP call to have access to the context.
+ - linters: [containedctx]
+ path: duplex_http_call.go
+ # We need to init a global in-mem HTTP server for testable examples.
+ - linters: [gochecknoinits, gochecknoglobals]
+ path: example_init_test.go
+ # We need to initialize a global map from a slice.
+ - linters: [gochecknoinits, gochecknoglobals]
+ path: protocol_grpc.go
+ # We purposefully do an ineffectual assignment for an example.
+ - linters: [ineffassign]
+ path: client_example_test.go
+ # The generated file is effectively a global receiver.
+ - linters: [varnamelen]
+ path: cmd/protoc-gen-connect-go
+ text: "parameter name 'g' is too short"
+ # Thorough error logging and timeout config make this example unreadably long.
+ - linters: [errcheck, gosec]
+ path: error_writer_example_test.go
+ # It should be crystal clear that Connect uses plain *http.Clients.
+ - linters: [revive, stylecheck]
+ path: client_example_test.go
+ # Don't complain about timeout management or lack of output assertions in examples.
+ - linters: [gosec, testableexamples]
+ path: handler_example_test.go
+ # No output assertions needed for these examples.
+ - linters: [testableexamples]
+ path: error_writer_example_test.go
diff --git a/vendor/github.com/bufbuild/connect-go/LICENSE b/vendor/github.com/bufbuild/connect-go/LICENSE
new file mode 100644
index 000000000..a037229e2
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/LICENSE
@@ -0,0 +1,201 @@
+ 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 2021-2022 Buf Technologies, Inc.
+
+ 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/bufbuild/connect-go/Makefile b/vendor/github.com/bufbuild/connect-go/Makefile
new file mode 100644
index 000000000..ea1d4c6a8
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/Makefile
@@ -0,0 +1,102 @@
+# See https://tech.davis-hansson.com/p/make/
+SHELL := bash
+.DELETE_ON_ERROR:
+.SHELLFLAGS := -eu -o pipefail -c
+.DEFAULT_GOAL := all
+MAKEFLAGS += --warn-undefined-variables
+MAKEFLAGS += --no-builtin-rules
+MAKEFLAGS += --no-print-directory
+BIN := .tmp/bin
+COPYRIGHT_YEARS := 2021-2022
+LICENSE_IGNORE := -e /testdata/
+# Set to use a different compiler. For example, `GO=go1.18rc1 make test`.
+GO ?= go
+
+.PHONY: help
+help: ## Describe useful make targets
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%-30s %s\n", $$1, $$2}'
+
+.PHONY: all
+all: ## Build, test, and lint (default)
+ $(MAKE) test
+ $(MAKE) lint
+
+.PHONY: clean
+clean: ## Delete intermediate build artifacts
+ @# -X only removes untracked files, -d recurses into directories, -f actually removes files/dirs
+ git clean -Xdf
+
+.PHONY: test
+test: build ## Run unit tests
+ $(GO) test -vet=off -race -cover ./...
+
+.PHONY: build
+build: generate ## Build all packages
+ $(GO) build ./...
+
+.PHONY: install
+install: ## Install all binaries
+ $(GO) install ./...
+
+.PHONY: lint
+lint: $(BIN)/golangci-lint $(BIN)/buf ## Lint Go and protobuf
+ test -z "$$($(BIN)/buf format -d . | tee /dev/stderr)"
+ $(GO) vet ./...
+ $(BIN)/golangci-lint run
+ $(BIN)/buf lint
+
+.PHONY: lintfix
+lintfix: $(BIN)/golangci-lint $(BIN)/buf ## Automatically fix some lint errors
+ $(BIN)/golangci-lint run --fix
+ $(BIN)/buf format -w .
+
+.PHONY: generate
+generate: $(BIN)/buf $(BIN)/protoc-gen-go $(BIN)/protoc-gen-connect-go $(BIN)/license-header ## Regenerate code and licenses
+ rm -rf internal/gen
+ PATH=$(abspath $(BIN)) $(BIN)/buf generate
+ @# We want to operate on a list of modified and new files, excluding
+ @# deleted and ignored files. git-ls-files can't do this alone. comm -23 takes
+ @# two files and prints the union, dropping lines common to both (-3) and
+ @# those only in the second file (-2). We make one git-ls-files call for
+ @# the modified, cached, and new (--others) files, and a second for the
+ @# deleted files.
+ comm -23 \
+ <(git ls-files --cached --modified --others --no-empty-directory --exclude-standard | sort -u | grep -v $(LICENSE_IGNORE) ) \
+ <(git ls-files --deleted | sort -u) | \
+ xargs $(BIN)/license-header \
+ --license-type apache \
+ --copyright-holder "Buf Technologies, Inc." \
+ --year-range "$(COPYRIGHT_YEARS)"
+
+.PHONY: upgrade
+upgrade: ## Upgrade dependencies
+ go get -u -t ./... && go mod tidy -v
+
+.PHONY: checkgenerate
+checkgenerate:
+ @# Used in CI to verify that `make generate` doesn't produce a diff.
+ test -z "$$(git status --porcelain | tee /dev/stderr)"
+
+.PHONY: $(BIN)/protoc-gen-connect-go
+$(BIN)/protoc-gen-connect-go:
+ @mkdir -p $(@D)
+ $(GO) build -o $(@) ./cmd/protoc-gen-connect-go
+
+$(BIN)/buf: Makefile
+ @mkdir -p $(@D)
+ GOBIN=$(abspath $(@D)) $(GO) install github.com/bufbuild/buf/cmd/buf@v1.9.0
+
+$(BIN)/license-header: Makefile
+ @mkdir -p $(@D)
+ GOBIN=$(abspath $(@D)) $(GO) install \
+ github.com/bufbuild/buf/private/pkg/licenseheader/cmd/license-header@v1.9.0
+
+$(BIN)/golangci-lint: Makefile
+ @mkdir -p $(@D)
+ GOBIN=$(abspath $(@D)) $(GO) install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.50.0
+
+$(BIN)/protoc-gen-go: Makefile go.mod
+ @mkdir -p $(@D)
+ @# The version of protoc-gen-go is determined by the version in go.mod
+ GOBIN=$(abspath $(@D)) $(GO) install google.golang.org/protobuf/cmd/protoc-gen-go
+
diff --git a/vendor/github.com/bufbuild/connect-go/README.md b/vendor/github.com/bufbuild/connect-go/README.md
new file mode 100644
index 000000000..38d0dc5ef
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/README.md
@@ -0,0 +1,186 @@
+Connect
+=======
+
+[](https://github.com/bufbuild/connect-go/actions/workflows/ci.yaml)
+[](https://goreportcard.com/report/github.com/bufbuild/connect-go)
+[](https://pkg.go.dev/github.com/bufbuild/connect-go)
+
+Connect is a slim library for building browser and gRPC-compatible HTTP APIs.
+You write a short [Protocol Buffer][protobuf] schema and implement your
+application logic, and Connect generates code to handle marshaling, routing,
+compression, and content type negotiation. It also generates an idiomatic,
+type-safe client. Handlers and clients support three protocols: gRPC, gRPC-Web,
+and Connect's own protocol.
+
+The [Connect protocol][protocol] is a simple, POST-only protocol that works
+over HTTP/1.1 or HTTP/2. It takes the best portions of gRPC and gRPC-Web,
+including streaming, and packages them into a protocol that works equally well
+in browsers, monoliths, and microservices. Calling a Connect API is as easy as
+using `curl`. Try it with our live demo:
+
+```
+curl \
+ --header "Content-Type: application/json" \
+ --data '{"sentence": "I feel happy."}' \
+ https://demo.connect.build/buf.connect.demo.eliza.v1.ElizaService/Say
+```
+
+Handlers and clients also support the gRPC and gRPC-Web protocols, including
+streaming, headers, trailers, and error details. gRPC-compatible [server
+reflection][] and [health checks][] are available as standalone packages.
+Instead of cURL, we could call our API with `grpcurl`:
+
+```
+go install github.com/fullstorydev/grpcurl/cmd/grpcurl@latest
+grpcurl \
+ -d '{"sentence": "I feel happy."}' \
+ demo.connect.build:443 \
+ buf.connect.demo.eliza.v1.ElizaService/Say
+```
+
+Under the hood, Connect is just [Protocol Buffers][protobuf] and the standard
+library: no custom HTTP implementation, no new name resolution or load
+balancing APIs, and no surprises. Everything you already know about `net/http`
+still applies, and any package that works with an `http.Server`, `http.Client`,
+or `http.Handler` also works with Connect.
+
+For more on Connect, see the [announcement blog post][blog], the documentation
+on [connect.build][docs] (especially the [Getting Started] guide for Go), the
+[demo service][demo], or the [protocol specification][protocol].
+
+## A small example
+
+Curious what all this looks like in practice? From a [Protobuf
+schema](internal/proto/connect/ping/v1/ping.proto), we generate [a small RPC
+package](internal/gen/connect/ping/v1/pingv1connect/ping.connect.go). Using that
+package, we can build a server:
+
+```go
+package main
+
+import (
+ "context"
+ "log"
+ "net/http"
+
+ "github.com/bufbuild/connect-go"
+ pingv1 "github.com/bufbuild/connect-go/internal/gen/connect/ping/v1"
+ "github.com/bufbuild/connect-go/internal/gen/connect/ping/v1/pingv1connect"
+ "golang.org/x/net/http2"
+ "golang.org/x/net/http2/h2c"
+)
+
+type PingServer struct {
+ pingv1connect.UnimplementedPingServiceHandler // returns errors from all methods
+}
+
+func (ps *PingServer) Ping(
+ ctx context.Context,
+ req *connect.Request[pingv1.PingRequest],
+) (*connect.Response[pingv1.PingResponse], error) {
+ // connect.Request and connect.Response give you direct access to headers and
+ // trailers. No context-based nonsense!
+ log.Println(req.Header().Get("Some-Header"))
+ res := connect.NewResponse(&pingv1.PingResponse{
+ // req.Msg is a strongly-typed *pingv1.PingRequest, so we can access its
+ // fields without type assertions.
+ Number: req.Msg.Number,
+ })
+ res.Header().Set("Some-Other-Header", "hello!")
+ return res, nil
+}
+
+func main() {
+ mux := http.NewServeMux()
+ // The generated constructors return a path and a plain net/http
+ // handler.
+ mux.Handle(pingv1connect.NewPingServiceHandler(&PingServer{}))
+ err := http.ListenAndServe(
+ "localhost:8080",
+ // For gRPC clients, it's convenient to support HTTP/2 without TLS. You can
+ // avoid x/net/http2 by using http.ListenAndServeTLS.
+ h2c.NewHandler(mux, &http2.Server{}),
+ )
+ log.Fatalf("listen failed: %v", err)
+}
+```
+
+With that server running, you can make requests with any gRPC or Connect
+client. To write a client using `connect-go`,
+
+```go
+package main
+
+import (
+ "context"
+ "log"
+ "net/http"
+
+ "github.com/bufbuild/connect-go"
+ pingv1 "github.com/bufbuild/connect-go/internal/gen/connect/ping/v1"
+ "github.com/bufbuild/connect-go/internal/gen/connect/ping/v1/pingv1connect"
+)
+
+func main() {
+ client := pingv1connect.NewPingServiceClient(
+ http.DefaultClient,
+ "http://localhost:8080/",
+ )
+ req := connect.NewRequest(&pingv1.PingRequest{
+ Number: 42,
+ })
+ req.Header().Set("Some-Header", "hello from connect")
+ res, err := client.Ping(context.Background(), req)
+ if err != nil {
+ log.Fatalln(err)
+ }
+ log.Println(res.Msg)
+ log.Println(res.Header().Get("Some-Other-Header"))
+}
+```
+
+Of course, `http.ListenAndServe` and `http.DefaultClient` aren't fit for
+production use! See Connect's [deployment docs][docs-deployment] for a guide to
+configuring timeouts, connection pools, observability, and h2c.
+
+## Ecosystem
+
+* [connect-grpchealth-go]: gRPC-compatible health checks
+* [connect-grpcreflect-go]: gRPC-compatible server reflection
+* [connect-demo]: service powering demo.connect.build, including bidi streaming
+* [connect-web]: TypeScript clients for web browsers
+* [Buf Studio]: web UI for ad-hoc RPCs
+* [connect-crosstest]: gRPC and gRPC-Web interoperability tests
+
+## Status: Stable
+
+This module is stable. It supports:
+
+* The [two most recent major releases][go-support-policy] of Go.
+* [APIv2] of Protocol Buffers in Go (`google.golang.org/protobuf`).
+
+Within those parameters, `connect-go` follows semantic versioning. We will
+_not_ make breaking changes in the 1.x series of releases.
+
+## Legal
+
+Offered under the [Apache 2 license][license].
+
+[APIv2]: https://blog.golang.org/protobuf-apiv2
+[Buf Studio]: https://studio.buf.build/
+[Getting Started]: https://connect.build/docs/go/getting-started
+[blog]: https://buf.build/blog/connect-a-better-grpc
+[connect-crosstest]: https://github.com/bufbuild/connect-crosstest
+[connect-demo]: https://github.com/bufbuild/connect-demo
+[connect-grpchealth-go]: https://github.com/bufbuild/connect-grpchealth-go
+[connect-grpcreflect-go]: https://github.com/bufbuild/connect-grpcreflect-go
+[connect-web]: https://www.npmjs.com/package/@bufbuild/connect-web
+[demo]: https://github.com/bufbuild/connect-demo
+[docs-deployment]: https://connect.build/docs/go/deployment
+[docs]: https://connect.build
+[go-support-policy]: https://golang.org/doc/devel/release#policy
+[health checks]: https://github.com/bufbuild/connect-grpchealth-go
+[license]: https://github.com/bufbuild/connect-go/blob/main/LICENSE
+[protobuf]: https://developers.google.com/protocol-buffers
+[protocol]: https://connect.build/docs/protocol
+[server reflection]: https://github.com/bufbuild/connect-grpcreflect-go
diff --git a/vendor/github.com/bufbuild/connect-go/buf.gen.yaml b/vendor/github.com/bufbuild/connect-go/buf.gen.yaml
new file mode 100644
index 000000000..757746fa9
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/buf.gen.yaml
@@ -0,0 +1,12 @@
+version: v1
+managed:
+ enabled: true
+ go_package_prefix:
+ default: github.com/bufbuild/connect-go/internal/gen
+plugins:
+ - name: go
+ out: internal/gen
+ opt: paths=source_relative
+ - name: connect-go
+ out: internal/gen
+ opt: paths=source_relative
diff --git a/vendor/github.com/bufbuild/connect-go/buf.work.yaml b/vendor/github.com/bufbuild/connect-go/buf.work.yaml
new file mode 100644
index 000000000..30f1e1ff0
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/buf.work.yaml
@@ -0,0 +1,3 @@
+version: v1
+directories:
+ - internal/proto
diff --git a/vendor/github.com/bufbuild/connect-go/buffer_pool.go b/vendor/github.com/bufbuild/connect-go/buffer_pool.go
new file mode 100644
index 000000000..13f8a9e8a
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/buffer_pool.go
@@ -0,0 +1,54 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "bytes"
+ "sync"
+)
+
+const (
+ initialBufferSize = 512
+ maxRecycleBufferSize = 8 * 1024 * 1024 // if >8MiB, don't hold onto a buffer
+)
+
+type bufferPool struct {
+ sync.Pool
+}
+
+func newBufferPool() *bufferPool {
+ return &bufferPool{
+ Pool: sync.Pool{
+ New: func() any {
+ return bytes.NewBuffer(make([]byte, 0, initialBufferSize))
+ },
+ },
+ }
+}
+
+func (b *bufferPool) Get() *bytes.Buffer {
+ if buf, ok := b.Pool.Get().(*bytes.Buffer); ok {
+ return buf
+ }
+ return bytes.NewBuffer(make([]byte, 0, initialBufferSize))
+}
+
+func (b *bufferPool) Put(buffer *bytes.Buffer) {
+ if buffer.Cap() > maxRecycleBufferSize {
+ return
+ }
+ buffer.Reset()
+ b.Pool.Put(buffer)
+}
diff --git a/vendor/github.com/bufbuild/connect-go/client.go b/vendor/github.com/bufbuild/connect-go/client.go
new file mode 100644
index 000000000..ad2230407
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/client.go
@@ -0,0 +1,231 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "context"
+ "errors"
+ "io"
+ "net/http"
+)
+
+// Client is a reusable, concurrency-safe client for a single procedure.
+// Depending on the procedure's type, use the CallUnary, CallClientStream,
+// CallServerStream, or CallBidiStream method.
+//
+// By default, clients use the Connect protocol with the binary Protobuf Codec,
+// ask for gzipped responses, and send uncompressed requests. To use the gRPC
+// or gRPC-Web protocols, use the [WithGRPC] or [WithGRPCWeb] options.
+type Client[Req, Res any] struct {
+ config *clientConfig
+ callUnary func(context.Context, *Request[Req]) (*Response[Res], error)
+ protocolClient protocolClient
+ err error
+}
+
+// NewClient constructs a new Client.
+func NewClient[Req, Res any](httpClient HTTPClient, url string, options ...ClientOption) *Client[Req, Res] {
+ client := &Client[Req, Res]{}
+ config, err := newClientConfig(url, options)
+ if err != nil {
+ client.err = err
+ return client
+ }
+ client.config = config
+ protocolClient, protocolErr := client.config.Protocol.NewClient(
+ &protocolClientParams{
+ CompressionName: config.RequestCompressionName,
+ CompressionPools: newReadOnlyCompressionPools(
+ config.CompressionPools,
+ config.CompressionNames,
+ ),
+ Codec: config.Codec,
+ Protobuf: config.protobuf(),
+ CompressMinBytes: config.CompressMinBytes,
+ HTTPClient: httpClient,
+ URL: url,
+ BufferPool: config.BufferPool,
+ ReadMaxBytes: config.ReadMaxBytes,
+ SendMaxBytes: config.SendMaxBytes,
+ },
+ )
+ if protocolErr != nil {
+ client.err = protocolErr
+ return client
+ }
+ client.protocolClient = protocolClient
+ // Rather than applying unary interceptors along the hot path, we can do it
+ // once at client creation.
+ unarySpec := config.newSpec(StreamTypeUnary)
+ unaryFunc := UnaryFunc(func(ctx context.Context, request AnyRequest) (AnyResponse, error) {
+ conn := client.protocolClient.NewConn(ctx, unarySpec, request.Header())
+ // Send always returns an io.EOF unless the error is from the client-side.
+ // We want the user to continue to call Receive in those cases to get the
+ // full error from the server-side.
+ if err := conn.Send(request.Any()); err != nil && !errors.Is(err, io.EOF) {
+ _ = conn.CloseRequest()
+ _ = conn.CloseResponse()
+ return nil, err
+ }
+ if err := conn.CloseRequest(); err != nil {
+ _ = conn.CloseResponse()
+ return nil, err
+ }
+ response, err := receiveUnaryResponse[Res](conn)
+ if err != nil {
+ _ = conn.CloseResponse()
+ return nil, err
+ }
+ return response, conn.CloseResponse()
+ })
+ if interceptor := config.Interceptor; interceptor != nil {
+ unaryFunc = interceptor.WrapUnary(unaryFunc)
+ }
+ client.callUnary = func(ctx context.Context, request *Request[Req]) (*Response[Res], error) {
+ // To make the specification, peer, and RPC headers visible to the full
+ // interceptor chain (as though they were supplied by the caller), we'll
+ // add them here.
+ request.spec = unarySpec
+ request.peer = client.protocolClient.Peer()
+ protocolClient.WriteRequestHeader(StreamTypeUnary, request.Header())
+ response, err := unaryFunc(ctx, request)
+ if err != nil {
+ return nil, err
+ }
+ typed, ok := response.(*Response[Res])
+ if !ok {
+ return nil, errorf(CodeInternal, "unexpected client response type %T", response)
+ }
+ return typed, nil
+ }
+ return client
+}
+
+// CallUnary calls a request-response procedure.
+func (c *Client[Req, Res]) CallUnary(ctx context.Context, request *Request[Req]) (*Response[Res], error) {
+ if c.err != nil {
+ return nil, c.err
+ }
+ return c.callUnary(ctx, request)
+}
+
+// CallClientStream calls a client streaming procedure.
+func (c *Client[Req, Res]) CallClientStream(ctx context.Context) *ClientStreamForClient[Req, Res] {
+ if c.err != nil {
+ return &ClientStreamForClient[Req, Res]{err: c.err}
+ }
+ return &ClientStreamForClient[Req, Res]{conn: c.newConn(ctx, StreamTypeClient)}
+}
+
+// CallServerStream calls a server streaming procedure.
+func (c *Client[Req, Res]) CallServerStream(ctx context.Context, request *Request[Req]) (*ServerStreamForClient[Res], error) {
+ if c.err != nil {
+ return nil, c.err
+ }
+ conn := c.newConn(ctx, StreamTypeServer)
+ mergeHeaders(conn.RequestHeader(), request.header)
+ // Send always returns an io.EOF unless the error is from the client-side.
+ // We want the user to continue to call Receive in those cases to get the
+ // full error from the server-side.
+ if err := conn.Send(request.Msg); err != nil && !errors.Is(err, io.EOF) {
+ _ = conn.CloseRequest()
+ _ = conn.CloseResponse()
+ return nil, err
+ }
+ if err := conn.CloseRequest(); err != nil {
+ return nil, err
+ }
+ return &ServerStreamForClient[Res]{conn: conn}, nil
+}
+
+// CallBidiStream calls a bidirectional streaming procedure.
+func (c *Client[Req, Res]) CallBidiStream(ctx context.Context) *BidiStreamForClient[Req, Res] {
+ if c.err != nil {
+ return &BidiStreamForClient[Req, Res]{err: c.err}
+ }
+ return &BidiStreamForClient[Req, Res]{conn: c.newConn(ctx, StreamTypeBidi)}
+}
+
+func (c *Client[Req, Res]) newConn(ctx context.Context, streamType StreamType) StreamingClientConn {
+ newConn := func(ctx context.Context, spec Spec) StreamingClientConn {
+ header := make(http.Header, 8) // arbitrary power of two, prevent immediate resizing
+ c.protocolClient.WriteRequestHeader(streamType, header)
+ return c.protocolClient.NewConn(ctx, spec, header)
+ }
+ if interceptor := c.config.Interceptor; interceptor != nil {
+ newConn = interceptor.WrapStreamingClient(newConn)
+ }
+ return newConn(ctx, c.config.newSpec(streamType))
+}
+
+type clientConfig struct {
+ Protocol protocol
+ Procedure string
+ CompressMinBytes int
+ Interceptor Interceptor
+ CompressionPools map[string]*compressionPool
+ CompressionNames []string
+ Codec Codec
+ RequestCompressionName string
+ BufferPool *bufferPool
+ ReadMaxBytes int
+ SendMaxBytes int
+}
+
+func newClientConfig(url string, options []ClientOption) (*clientConfig, *Error) {
+ protoPath := extractProtoPath(url)
+ config := clientConfig{
+ Protocol: &protocolConnect{},
+ Procedure: protoPath,
+ CompressionPools: make(map[string]*compressionPool),
+ BufferPool: newBufferPool(),
+ }
+ withProtoBinaryCodec().applyToClient(&config)
+ withGzip().applyToClient(&config)
+ for _, opt := range options {
+ opt.applyToClient(&config)
+ }
+ if err := config.validate(); err != nil {
+ return nil, err
+ }
+ return &config, nil
+}
+
+func (c *clientConfig) validate() *Error {
+ if c.Codec == nil || c.Codec.Name() == "" {
+ return errorf(CodeUnknown, "no codec configured")
+ }
+ if c.RequestCompressionName != "" && c.RequestCompressionName != compressionIdentity {
+ if _, ok := c.CompressionPools[c.RequestCompressionName]; !ok {
+ return errorf(CodeUnknown, "unknown compression %q", c.RequestCompressionName)
+ }
+ }
+ return nil
+}
+
+func (c *clientConfig) protobuf() Codec {
+ if c.Codec.Name() == codecNameProto {
+ return c.Codec
+ }
+ return &protoBinaryCodec{}
+}
+
+func (c *clientConfig) newSpec(t StreamType) Spec {
+ return Spec{
+ StreamType: t,
+ Procedure: c.Procedure,
+ IsClient: true,
+ }
+}
diff --git a/vendor/github.com/bufbuild/connect-go/client_stream.go b/vendor/github.com/bufbuild/connect-go/client_stream.go
new file mode 100644
index 000000000..c7557afa4
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/client_stream.go
@@ -0,0 +1,267 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "errors"
+ "io"
+ "net/http"
+)
+
+// ClientStreamForClient is the client's view of a client streaming RPC.
+//
+// It's returned from [Client].CallClientStream, but doesn't currently have an
+// exported constructor function.
+type ClientStreamForClient[Req, Res any] struct {
+ conn StreamingClientConn
+ // Error from client construction. If non-nil, return for all calls.
+ err error
+}
+
+// Spec returns the specification for the RPC.
+func (c *ClientStreamForClient[_, _]) Spec() Spec {
+ return c.conn.Spec()
+}
+
+// Peer describes the server for the RPC.
+func (c *ClientStreamForClient[_, _]) Peer() Peer {
+ return c.conn.Peer()
+}
+
+// RequestHeader returns the request headers. Headers are sent to the server with the
+// first call to Send.
+func (c *ClientStreamForClient[Req, Res]) RequestHeader() http.Header {
+ if c.err != nil {
+ return http.Header{}
+ }
+ return c.conn.RequestHeader()
+}
+
+// Send a message to the server. The first call to Send also sends the request
+// headers.
+//
+// If the server returns an error, Send returns an error that wraps [io.EOF].
+// Clients should check for case using the standard library's [errors.Is] and
+// unmarshal the error using CloseAndReceive.
+func (c *ClientStreamForClient[Req, Res]) Send(request *Req) error {
+ if c.err != nil {
+ return c.err
+ }
+ if request == nil {
+ return c.conn.Send(nil)
+ }
+ return c.conn.Send(request)
+}
+
+// CloseAndReceive closes the send side of the stream and waits for the
+// response.
+func (c *ClientStreamForClient[Req, Res]) CloseAndReceive() (*Response[Res], error) {
+ if c.err != nil {
+ return nil, c.err
+ }
+ if err := c.conn.CloseRequest(); err != nil {
+ _ = c.conn.CloseResponse()
+ return nil, err
+ }
+ response, err := receiveUnaryResponse[Res](c.conn)
+ if err != nil {
+ _ = c.conn.CloseResponse()
+ return nil, err
+ }
+ return response, c.conn.CloseResponse()
+}
+
+// Conn exposes the underlying StreamingClientConn. This may be useful if
+// you'd prefer to wrap the connection in a different high-level API.
+func (c *ClientStreamForClient[Req, Res]) Conn() (StreamingClientConn, error) {
+ return c.conn, c.err
+}
+
+// ServerStreamForClient is the client's view of a server streaming RPC.
+//
+// It's returned from [Client].CallServerStream, but doesn't currently have an
+// exported constructor function.
+type ServerStreamForClient[Res any] struct {
+ conn StreamingClientConn
+ msg *Res
+ // Error from client construction. If non-nil, return for all calls.
+ constructErr error
+ // Error from conn.Receive().
+ receiveErr error
+}
+
+// Receive advances the stream to the next message, which will then be
+// available through the Msg method. It returns false when the stream stops,
+// either by reaching the end or by encountering an unexpected error. After
+// Receive returns false, the Err method will return any unexpected error
+// encountered.
+func (s *ServerStreamForClient[Res]) Receive() bool {
+ if s.constructErr != nil || s.receiveErr != nil {
+ return false
+ }
+ s.msg = new(Res)
+ s.receiveErr = s.conn.Receive(s.msg)
+ return s.receiveErr == nil
+}
+
+// Msg returns the most recent message unmarshaled by a call to Receive.
+func (s *ServerStreamForClient[Res]) Msg() *Res {
+ if s.msg == nil {
+ s.msg = new(Res)
+ }
+ return s.msg
+}
+
+// Err returns the first non-EOF error that was encountered by Receive.
+func (s *ServerStreamForClient[Res]) Err() error {
+ if s.constructErr != nil {
+ return s.constructErr
+ }
+ if s.receiveErr != nil && !errors.Is(s.receiveErr, io.EOF) {
+ return s.receiveErr
+ }
+ return nil
+}
+
+// ResponseHeader returns the headers received from the server. It blocks until
+// the first call to Receive returns.
+func (s *ServerStreamForClient[Res]) ResponseHeader() http.Header {
+ if s.constructErr != nil {
+ return http.Header{}
+ }
+ return s.conn.ResponseHeader()
+}
+
+// ResponseTrailer returns the trailers received from the server. Trailers
+// aren't fully populated until Receive() returns an error wrapping io.EOF.
+func (s *ServerStreamForClient[Res]) ResponseTrailer() http.Header {
+ if s.constructErr != nil {
+ return http.Header{}
+ }
+ return s.conn.ResponseTrailer()
+}
+
+// Close the receive side of the stream.
+func (s *ServerStreamForClient[Res]) Close() error {
+ if s.constructErr != nil {
+ return s.constructErr
+ }
+ return s.conn.CloseResponse()
+}
+
+// Conn exposes the underlying StreamingClientConn. This may be useful if
+// you'd prefer to wrap the connection in a different high-level API.
+func (s *ServerStreamForClient[Res]) Conn() (StreamingClientConn, error) {
+ return s.conn, s.constructErr
+}
+
+// BidiStreamForClient is the client's view of a bidirectional streaming RPC.
+//
+// It's returned from [Client].CallBidiStream, but doesn't currently have an
+// exported constructor function.
+type BidiStreamForClient[Req, Res any] struct {
+ conn StreamingClientConn
+ // Error from client construction. If non-nil, return for all calls.
+ err error
+}
+
+// Spec returns the specification for the RPC.
+func (b *BidiStreamForClient[_, _]) Spec() Spec {
+ return b.conn.Spec()
+}
+
+// Peer describes the server for the RPC.
+func (b *BidiStreamForClient[_, _]) Peer() Peer {
+ return b.conn.Peer()
+}
+
+// RequestHeader returns the request headers. Headers are sent with the first
+// call to Send.
+func (b *BidiStreamForClient[Req, Res]) RequestHeader() http.Header {
+ if b.err != nil {
+ return http.Header{}
+ }
+ return b.conn.RequestHeader()
+}
+
+// Send a message to the server. The first call to Send also sends the request
+// headers. To send just the request headers, without a body, call Send with a
+// nil pointer.
+//
+// If the server returns an error, Send returns an error that wraps [io.EOF].
+// Clients should check for EOF using the standard library's [errors.Is] and
+// call Receive to retrieve the error.
+func (b *BidiStreamForClient[Req, Res]) Send(msg *Req) error {
+ if b.err != nil {
+ return b.err
+ }
+ if msg == nil {
+ return b.conn.Send(nil)
+ }
+ return b.conn.Send(msg)
+}
+
+// CloseRequest closes the send side of the stream.
+func (b *BidiStreamForClient[Req, Res]) CloseRequest() error {
+ if b.err != nil {
+ return b.err
+ }
+ return b.conn.CloseRequest()
+}
+
+// Receive a message. When the server is done sending messages and no other
+// errors have occurred, Receive will return an error that wraps [io.EOF].
+func (b *BidiStreamForClient[Req, Res]) Receive() (*Res, error) {
+ if b.err != nil {
+ return nil, b.err
+ }
+ var msg Res
+ if err := b.conn.Receive(&msg); err != nil {
+ return nil, err
+ }
+ return &msg, nil
+}
+
+// CloseResponse closes the receive side of the stream.
+func (b *BidiStreamForClient[Req, Res]) CloseResponse() error {
+ if b.err != nil {
+ return b.err
+ }
+ return b.conn.CloseResponse()
+}
+
+// ResponseHeader returns the headers received from the server. It blocks until
+// the first call to Receive returns.
+func (b *BidiStreamForClient[Req, Res]) ResponseHeader() http.Header {
+ if b.err != nil {
+ return http.Header{}
+ }
+ return b.conn.ResponseHeader()
+}
+
+// ResponseTrailer returns the trailers received from the server. Trailers
+// aren't fully populated until Receive() returns an error wrapping [io.EOF].
+func (b *BidiStreamForClient[Req, Res]) ResponseTrailer() http.Header {
+ if b.err != nil {
+ return http.Header{}
+ }
+ return b.conn.ResponseTrailer()
+}
+
+// Conn exposes the underlying StreamingClientConn. This may be useful if
+// you'd prefer to wrap the connection in a different high-level API.
+func (b *BidiStreamForClient[Req, Res]) Conn() (StreamingClientConn, error) {
+ return b.conn, b.err
+}
diff --git a/vendor/github.com/bufbuild/connect-go/code.go b/vendor/github.com/bufbuild/connect-go/code.go
new file mode 100644
index 000000000..557c38051
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/code.go
@@ -0,0 +1,226 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "fmt"
+ "strconv"
+ "strings"
+)
+
+// A Code is one of the Connect protocol's error codes. There are no user-defined
+// codes, so only the codes enumerated below are valid. In both name and
+// semantics, these codes match the gRPC status codes.
+//
+// The descriptions below are optimized for brevity rather than completeness.
+// See the [Connect protocol specification] for detailed descriptions of each
+// code and example usage.
+//
+// [Connect protocol specification]: https://connect.build/docs/protocol
+type Code uint32
+
+const (
+ // The zero code in gRPC is OK, which indicates that the operation was a
+ // success. We don't define a constant for it because it overlaps awkwardly
+ // with Go's error semantics: what does it mean to have a non-nil error with
+ // an OK status? (Also, the Connect protocol doesn't use a code for
+ // successes.)
+
+ // CodeCanceled indicates that the operation was canceled, typically by the
+ // caller.
+ CodeCanceled Code = 1
+
+ // CodeUnknown indicates that the operation failed for an unknown reason.
+ CodeUnknown Code = 2
+
+ // CodeInvalidArgument indicates that client supplied an invalid argument.
+ CodeInvalidArgument Code = 3
+
+ // CodeDeadlineExceeded indicates that deadline expired before the operation
+ // could complete.
+ CodeDeadlineExceeded Code = 4
+
+ // CodeNotFound indicates that some requested entity (for example, a file or
+ // directory) was not found.
+ CodeNotFound Code = 5
+
+ // CodeAlreadyExists indicates that client attempted to create an entity (for
+ // example, a file or directory) that already exists.
+ CodeAlreadyExists Code = 6
+
+ // CodePermissionDenied indicates that the caller doesn't have permission to
+ // execute the specified operation.
+ CodePermissionDenied Code = 7
+
+ // CodeResourceExhausted indicates that some resource has been exhausted. For
+ // example, a per-user quota may be exhausted or the entire file system may
+ // be full.
+ CodeResourceExhausted Code = 8
+
+ // CodeFailedPrecondition indicates that the system is not in a state
+ // required for the operation's execution.
+ CodeFailedPrecondition Code = 9
+
+ // CodeAborted indicates that operation was aborted by the system, usually
+ // because of a concurrency issue such as a sequencer check failure or
+ // transaction abort.
+ CodeAborted Code = 10
+
+ // CodeOutOfRange indicates that the operation was attempted past the valid
+ // range (for example, seeking past end-of-file).
+ CodeOutOfRange Code = 11
+
+ // CodeUnimplemented indicates that the operation isn't implemented,
+ // supported, or enabled in this service.
+ CodeUnimplemented Code = 12
+
+ // CodeInternal indicates that some invariants expected by the underlying
+ // system have been broken. This code is reserved for serious errors.
+ CodeInternal Code = 13
+
+ // CodeUnavailable indicates that the service is currently unavailable. This
+ // is usually temporary, so clients can back off and retry idempotent
+ // operations.
+ CodeUnavailable Code = 14
+
+ // CodeDataLoss indicates that the operation has resulted in unrecoverable
+ // data loss or corruption.
+ CodeDataLoss Code = 15
+
+ // CodeUnauthenticated indicates that the request does not have valid
+ // authentication credentials for the operation.
+ CodeUnauthenticated Code = 16
+
+ minCode = CodeCanceled
+ maxCode = CodeUnauthenticated
+)
+
+func (c Code) String() string {
+ switch c {
+ case CodeCanceled:
+ return "canceled"
+ case CodeUnknown:
+ return "unknown"
+ case CodeInvalidArgument:
+ return "invalid_argument"
+ case CodeDeadlineExceeded:
+ return "deadline_exceeded"
+ case CodeNotFound:
+ return "not_found"
+ case CodeAlreadyExists:
+ return "already_exists"
+ case CodePermissionDenied:
+ return "permission_denied"
+ case CodeResourceExhausted:
+ return "resource_exhausted"
+ case CodeFailedPrecondition:
+ return "failed_precondition"
+ case CodeAborted:
+ return "aborted"
+ case CodeOutOfRange:
+ return "out_of_range"
+ case CodeUnimplemented:
+ return "unimplemented"
+ case CodeInternal:
+ return "internal"
+ case CodeUnavailable:
+ return "unavailable"
+ case CodeDataLoss:
+ return "data_loss"
+ case CodeUnauthenticated:
+ return "unauthenticated"
+ }
+ return fmt.Sprintf("code_%d", c)
+}
+
+// MarshalText implements [encoding.TextMarshaler].
+func (c Code) MarshalText() ([]byte, error) {
+ return []byte(c.String()), nil
+}
+
+// UnmarshalText implements [encoding.TextUnmarshaler].
+func (c *Code) UnmarshalText(data []byte) error {
+ dataStr := string(data)
+ switch dataStr {
+ case "canceled":
+ *c = CodeCanceled
+ return nil
+ case "unknown":
+ *c = CodeUnknown
+ return nil
+ case "invalid_argument":
+ *c = CodeInvalidArgument
+ return nil
+ case "deadline_exceeded":
+ *c = CodeDeadlineExceeded
+ return nil
+ case "not_found":
+ *c = CodeNotFound
+ return nil
+ case "already_exists":
+ *c = CodeAlreadyExists
+ return nil
+ case "permission_denied":
+ *c = CodePermissionDenied
+ return nil
+ case "resource_exhausted":
+ *c = CodeResourceExhausted
+ return nil
+ case "failed_precondition":
+ *c = CodeFailedPrecondition
+ return nil
+ case "aborted":
+ *c = CodeAborted
+ return nil
+ case "out_of_range":
+ *c = CodeOutOfRange
+ return nil
+ case "unimplemented":
+ *c = CodeUnimplemented
+ return nil
+ case "internal":
+ *c = CodeInternal
+ return nil
+ case "unavailable":
+ *c = CodeUnavailable
+ return nil
+ case "data_loss":
+ *c = CodeDataLoss
+ return nil
+ case "unauthenticated":
+ *c = CodeUnauthenticated
+ return nil
+ }
+ // Ensure that non-canonical codes round-trip through MarshalText and
+ // UnmarshalText.
+ if strings.HasPrefix(dataStr, "code_") {
+ dataStr = strings.TrimPrefix(dataStr, "code_")
+ code, err := strconv.ParseInt(dataStr, 10 /* base */, 64 /* bitsize */)
+ if err == nil && (code < int64(minCode) || code > int64(maxCode)) {
+ *c = Code(code)
+ return nil
+ }
+ }
+ return fmt.Errorf("invalid code %q", dataStr)
+}
+
+// CodeOf returns the error's status code if it is or wraps an [*Error] and
+// [CodeUnknown] otherwise.
+func CodeOf(err error) Code {
+ if connectErr, ok := asError(err); ok {
+ return connectErr.Code()
+ }
+ return CodeUnknown
+}
diff --git a/vendor/github.com/bufbuild/connect-go/codec.go b/vendor/github.com/bufbuild/connect-go/codec.go
new file mode 100644
index 000000000..5d3f19b32
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/codec.go
@@ -0,0 +1,147 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "fmt"
+
+ "google.golang.org/protobuf/encoding/protojson"
+ "google.golang.org/protobuf/proto"
+)
+
+const (
+ codecNameProto = "proto"
+ codecNameJSON = "json"
+ codecNameJSONCharsetUTF8 = codecNameJSON + "; charset=utf-8"
+)
+
+// Codec marshals structs (typically generated from a schema) to and from bytes.
+type Codec interface {
+ // Name returns the name of the Codec.
+ //
+ // This may be used as part of the Content-Type within HTTP. For example,
+ // with gRPC this is the content subtype, so "application/grpc+proto" will
+ // map to the Codec with name "proto".
+ //
+ // Names must not be empty.
+ Name() string
+ // Marshal marshals the given message.
+ //
+ // Marshal may expect a specific type of message, and will error if this type
+ // is not given.
+ Marshal(any) ([]byte, error)
+ // Unmarshal unmarshals the given message.
+ //
+ // Unmarshal may expect a specific type of message, and will error if this
+ // type is not given.
+ Unmarshal([]byte, any) error
+}
+
+type protoBinaryCodec struct{}
+
+var _ Codec = (*protoBinaryCodec)(nil)
+
+func (c *protoBinaryCodec) Name() string { return codecNameProto }
+
+func (c *protoBinaryCodec) Marshal(message any) ([]byte, error) {
+ protoMessage, ok := message.(proto.Message)
+ if !ok {
+ return nil, errNotProto(message)
+ }
+ return proto.Marshal(protoMessage)
+}
+
+func (c *protoBinaryCodec) Unmarshal(data []byte, message any) error {
+ protoMessage, ok := message.(proto.Message)
+ if !ok {
+ return errNotProto(message)
+ }
+ return proto.Unmarshal(data, protoMessage)
+}
+
+type protoJSONCodec struct {
+ name string
+}
+
+var _ Codec = (*protoJSONCodec)(nil)
+
+func (c *protoJSONCodec) Name() string { return c.name }
+
+func (c *protoJSONCodec) Marshal(message any) ([]byte, error) {
+ protoMessage, ok := message.(proto.Message)
+ if !ok {
+ return nil, errNotProto(message)
+ }
+ var options protojson.MarshalOptions
+ return options.Marshal(protoMessage)
+}
+
+func (c *protoJSONCodec) Unmarshal(binary []byte, message any) error {
+ protoMessage, ok := message.(proto.Message)
+ if !ok {
+ return errNotProto(message)
+ }
+ var options protojson.UnmarshalOptions
+ return options.Unmarshal(binary, protoMessage)
+}
+
+// readOnlyCodecs is a read-only interface to a map of named codecs.
+type readOnlyCodecs interface {
+ // Get gets the Codec with the given name.
+ Get(string) Codec
+ // Protobuf gets the user-supplied protobuf codec, falling back to the default
+ // implementation if necessary.
+ //
+ // This is helpful in the gRPC protocol, where the wire protocol requires
+ // marshaling protobuf structs to binary even if the RPC procedures were
+ // generated from a different IDL.
+ Protobuf() Codec
+ // Names returns a copy of the registered codec names. The returned slice is
+ // safe for the caller to mutate.
+ Names() []string
+}
+
+func newReadOnlyCodecs(nameToCodec map[string]Codec) readOnlyCodecs {
+ return &codecMap{
+ nameToCodec: nameToCodec,
+ }
+}
+
+type codecMap struct {
+ nameToCodec map[string]Codec
+}
+
+func (m *codecMap) Get(name string) Codec {
+ return m.nameToCodec[name]
+}
+
+func (m *codecMap) Protobuf() Codec {
+ if pb, ok := m.nameToCodec[codecNameProto]; ok {
+ return pb
+ }
+ return &protoBinaryCodec{}
+}
+
+func (m *codecMap) Names() []string {
+ names := make([]string, 0, len(m.nameToCodec))
+ for name := range m.nameToCodec {
+ names = append(names, name)
+ }
+ return names
+}
+
+func errNotProto(message any) error {
+ return fmt.Errorf("%T doesn't implement proto.Message", message)
+}
diff --git a/vendor/github.com/bufbuild/connect-go/compression.go b/vendor/github.com/bufbuild/connect-go/compression.go
new file mode 100644
index 000000000..4e7c23a5c
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/compression.go
@@ -0,0 +1,212 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "bytes"
+ "errors"
+ "io"
+ "math"
+ "strings"
+ "sync"
+)
+
+const (
+ compressionGzip = "gzip"
+ compressionIdentity = "identity"
+)
+
+// A Decompressor is a reusable wrapper that decompresses an underlying data
+// source. The standard library's [*gzip.Reader] implements Decompressor.
+type Decompressor interface {
+ io.Reader
+
+ // Close closes the Decompressor, but not the underlying data source. It may
+ // return an error if the Decompressor wasn't read to EOF.
+ Close() error
+
+ // Reset discards the Decompressor's internal state, if any, and prepares it
+ // to read from a new source of compressed data.
+ Reset(io.Reader) error
+}
+
+// A Compressor is a reusable wrapper that compresses data written to an
+// underlying sink. The standard library's [*gzip.Writer] implements Compressor.
+type Compressor interface {
+ io.Writer
+
+ // Close flushes any buffered data to the underlying sink, then closes the
+ // Compressor. It must not close the underlying sink.
+ Close() error
+
+ // Reset discards the Compressor's internal state, if any, and prepares it to
+ // write compressed data to a new sink.
+ Reset(io.Writer)
+}
+
+type compressionPool struct {
+ decompressors sync.Pool
+ compressors sync.Pool
+}
+
+func newCompressionPool(
+ newDecompressor func() Decompressor,
+ newCompressor func() Compressor,
+) *compressionPool {
+ return &compressionPool{
+ decompressors: sync.Pool{
+ New: func() any { return newDecompressor() },
+ },
+ compressors: sync.Pool{
+ New: func() any { return newCompressor() },
+ },
+ }
+}
+
+func (c *compressionPool) Decompress(dst *bytes.Buffer, src *bytes.Buffer, readMaxBytes int64) *Error {
+ decompressor, err := c.getDecompressor(src)
+ if err != nil {
+ return errorf(CodeInvalidArgument, "get decompressor: %w", err)
+ }
+ reader := io.Reader(decompressor)
+ if readMaxBytes > 0 && readMaxBytes < math.MaxInt64 {
+ reader = io.LimitReader(decompressor, readMaxBytes+1)
+ }
+ bytesRead, err := dst.ReadFrom(reader)
+ if err != nil {
+ _ = c.putDecompressor(decompressor)
+ return errorf(CodeInvalidArgument, "decompress: %w", err)
+ }
+ if readMaxBytes > 0 && bytesRead > readMaxBytes {
+ discardedBytes, err := io.Copy(io.Discard, decompressor)
+ _ = c.putDecompressor(decompressor)
+ if err != nil {
+ return errorf(CodeResourceExhausted, "message is larger than configured max %d - unable to determine message size: %w", readMaxBytes, err)
+ }
+ return errorf(CodeResourceExhausted, "message size %d is larger than configured max %d", bytesRead+discardedBytes, readMaxBytes)
+ }
+ if err := c.putDecompressor(decompressor); err != nil {
+ return errorf(CodeUnknown, "recycle decompressor: %w", err)
+ }
+ return nil
+}
+
+func (c *compressionPool) Compress(dst *bytes.Buffer, src *bytes.Buffer) *Error {
+ compressor, err := c.getCompressor(dst)
+ if err != nil {
+ return errorf(CodeUnknown, "get compressor: %w", err)
+ }
+ if _, err := io.Copy(compressor, src); err != nil {
+ _ = c.putCompressor(compressor)
+ return errorf(CodeInternal, "compress: %w", err)
+ }
+ if err := c.putCompressor(compressor); err != nil {
+ return errorf(CodeInternal, "recycle compressor: %w", err)
+ }
+ return nil
+}
+
+func (c *compressionPool) getDecompressor(reader io.Reader) (Decompressor, error) {
+ decompressor, ok := c.decompressors.Get().(Decompressor)
+ if !ok {
+ return nil, errors.New("expected Decompressor, got incorrect type from pool")
+ }
+ return decompressor, decompressor.Reset(reader)
+}
+
+func (c *compressionPool) putDecompressor(decompressor Decompressor) error {
+ if err := decompressor.Close(); err != nil {
+ return err
+ }
+ // While it's in the pool, we don't want the decompressor to retain a
+ // reference to the underlying reader. However, most decompressors attempt to
+ // read some header data from the new data source when Reset; since we don't
+ // know the compression format, we can't provide a valid header. Since we
+ // also reset the decompressor when it's pulled out of the pool, we can
+ // ignore errors here.
+ _ = decompressor.Reset(strings.NewReader(""))
+ c.decompressors.Put(decompressor)
+ return nil
+}
+
+func (c *compressionPool) getCompressor(writer io.Writer) (Compressor, error) {
+ compressor, ok := c.compressors.Get().(Compressor)
+ if !ok {
+ return nil, errors.New("expected Compressor, got incorrect type from pool")
+ }
+ compressor.Reset(writer)
+ return compressor, nil
+}
+
+func (c *compressionPool) putCompressor(compressor Compressor) error {
+ if err := compressor.Close(); err != nil {
+ return err
+ }
+ compressor.Reset(io.Discard) // don't keep references
+ c.compressors.Put(compressor)
+ return nil
+}
+
+// readOnlyCompressionPools is a read-only interface to a map of named
+// compressionPools.
+type readOnlyCompressionPools interface {
+ Get(string) *compressionPool
+ Contains(string) bool
+ // Wordy, but clarifies how this is different from readOnlyCodecs.Names().
+ CommaSeparatedNames() string
+}
+
+func newReadOnlyCompressionPools(
+ nameToPool map[string]*compressionPool,
+ reversedNames []string,
+) readOnlyCompressionPools {
+ // Client and handler configs keep compression names in registration order,
+ // but we want the last registered to be the most preferred.
+ names := make([]string, 0, len(reversedNames))
+ seen := make(map[string]struct{}, len(reversedNames))
+ for i := len(reversedNames) - 1; i >= 0; i-- {
+ name := reversedNames[i]
+ if _, ok := seen[name]; ok {
+ continue
+ }
+ seen[name] = struct{}{}
+ names = append(names, name)
+ }
+ return &namedCompressionPools{
+ nameToPool: nameToPool,
+ commaSeparatedNames: strings.Join(names, ","),
+ }
+}
+
+type namedCompressionPools struct {
+ nameToPool map[string]*compressionPool
+ commaSeparatedNames string
+}
+
+func (m *namedCompressionPools) Get(name string) *compressionPool {
+ if name == "" || name == compressionIdentity {
+ return nil
+ }
+ return m.nameToPool[name]
+}
+
+func (m *namedCompressionPools) Contains(name string) bool {
+ _, ok := m.nameToPool[name]
+ return ok
+}
+
+func (m *namedCompressionPools) CommaSeparatedNames() string {
+ return m.commaSeparatedNames
+}
diff --git a/vendor/github.com/bufbuild/connect-go/connect.go b/vendor/github.com/bufbuild/connect-go/connect.go
new file mode 100644
index 000000000..d04408e87
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/connect.go
@@ -0,0 +1,308 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect is a slim RPC framework built on Protocol Buffers and
+// [net/http]. In addition to supporting its own protocol, Connect handlers and
+// clients are wire-compatible with gRPC and gRPC-Web, including streaming.
+//
+// This documentation is intended to explain each type and function in
+// isolation. Walkthroughs, FAQs, and other narrative docs are available on the
+// [Connect website], and there's a working [demonstration service] on Github.
+//
+// [Connect website]: https://connect.build
+// [demonstration service]: https://github.com/bufbuild/connect-demo
+package connect
+
+import (
+ "errors"
+ "io"
+ "net/http"
+ "net/url"
+)
+
+// Version is the semantic version of the connect module.
+const Version = "1.2.0-dev"
+
+// These constants are used in compile-time handshakes with connect's generated
+// code.
+const (
+ IsAtLeastVersion0_0_1 = true
+ IsAtLeastVersion0_1_0 = true
+)
+
+// StreamType describes whether the client, server, neither, or both is
+// streaming.
+type StreamType uint8
+
+const (
+ StreamTypeUnary StreamType = 0b00
+ StreamTypeClient = 0b01
+ StreamTypeServer = 0b10
+ StreamTypeBidi = StreamTypeClient | StreamTypeServer
+)
+
+// StreamingHandlerConn is the server's view of a bidirectional message
+// exchange. Interceptors for streaming RPCs may wrap StreamingHandlerConns.
+//
+// Like the standard library's [http.ResponseWriter], StreamingHandlerConns write
+// response headers to the network with the first call to Send. Any subsequent
+// mutations are effectively no-ops. Handlers may mutate response trailers at
+// any time before returning. When the client has finished sending data,
+// Receive returns an error wrapping [io.EOF]. Handlers should check for this
+// using the standard library's [errors.Is].
+//
+// StreamingHandlerConn implementations provided by this module guarantee that
+// all returned errors can be cast to [*Error] using the standard library's
+// [errors.As].
+//
+// StreamingHandlerConn implementations do not need to be safe for concurrent use.
+type StreamingHandlerConn interface {
+ Spec() Spec
+ Peer() Peer
+
+ Receive(any) error
+ RequestHeader() http.Header
+
+ Send(any) error
+ ResponseHeader() http.Header
+ ResponseTrailer() http.Header
+}
+
+// StreamingClientConn is the client's view of a bidirectional message exchange.
+// Interceptors for streaming RPCs may wrap StreamingClientConns.
+//
+// StreamingClientConns write request headers to the network with the first
+// call to Send. Any subsequent mutations are effectively no-ops. When the
+// server is done sending data, the StreamingClientConn's Receive method
+// returns an error wrapping [io.EOF]. Clients should check for this using the
+// standard library's [errors.Is]. If the server encounters an error during
+// processing, subsequent calls to the StreamingClientConn's Send method will
+// return an error wrapping [io.EOF]; clients may then call Receive to unmarshal
+// the error.
+//
+// StreamingClientConn implementations provided by this module guarantee that
+// all returned errors can be cast to [*Error] using the standard library's
+// [errors.As].
+//
+// In order to support bidirectional streaming RPCs, all StreamingClientConn
+// implementations must support limited concurrent use. See the comments on
+// each group of methods for details.
+type StreamingClientConn interface {
+ // Spec and Peer must be safe to call concurrently with all other methods.
+ Spec() Spec
+ Peer() Peer
+
+ // Send, RequestHeader, and CloseRequest may race with each other, but must
+ // be safe to call concurrently with all other methods.
+ Send(any) error
+ RequestHeader() http.Header
+ CloseRequest() error
+
+ // Receive, ResponseHeader, ResponseTrailer, and CloseResponse may race with
+ // each other, but must be safe to call concurrently with all other methods.
+ Receive(any) error
+ ResponseHeader() http.Header
+ ResponseTrailer() http.Header
+ CloseResponse() error
+}
+
+// Request is a wrapper around a generated request message. It provides
+// access to metadata like headers and the RPC specification, as well as
+// strongly-typed access to the message itself.
+type Request[T any] struct {
+ Msg *T
+
+ spec Spec
+ peer Peer
+ header http.Header
+}
+
+// NewRequest wraps a generated request message.
+func NewRequest[T any](message *T) *Request[T] {
+ return &Request[T]{
+ Msg: message,
+ // Initialized lazily so we don't allocate unnecessarily.
+ header: nil,
+ }
+}
+
+// Any returns the concrete request message as an empty interface, so that
+// *Request implements the [AnyRequest] interface.
+func (r *Request[_]) Any() any {
+ return r.Msg
+}
+
+// Spec returns a description of this RPC.
+func (r *Request[_]) Spec() Spec {
+ return r.spec
+}
+
+// Peer describes the other party for this RPC.
+func (r *Request[_]) Peer() Peer {
+ return r.peer
+}
+
+// Header returns the HTTP headers for this request.
+func (r *Request[_]) Header() http.Header {
+ if r.header == nil {
+ r.header = make(http.Header)
+ }
+ return r.header
+}
+
+// internalOnly implements AnyRequest.
+func (r *Request[_]) internalOnly() {}
+
+// AnyRequest is the common method set of every [Request], regardless of type
+// parameter. It's used in unary interceptors.
+//
+// To preserve our ability to add methods to this interface without breaking
+// backward compatibility, only types defined in this package can implement
+// AnyRequest.
+type AnyRequest interface {
+ Any() any
+ Spec() Spec
+ Peer() Peer
+ Header() http.Header
+
+ internalOnly()
+}
+
+// Response is a wrapper around a generated response message. It provides
+// access to metadata like headers and trailers, as well as strongly-typed
+// access to the message itself.
+type Response[T any] struct {
+ Msg *T
+
+ header http.Header
+ trailer http.Header
+}
+
+// NewResponse wraps a generated response message.
+func NewResponse[T any](message *T) *Response[T] {
+ return &Response[T]{
+ Msg: message,
+ // Initialized lazily so we don't allocate unnecessarily.
+ header: nil,
+ trailer: nil,
+ }
+}
+
+// Any returns the concrete response message as an empty interface, so that
+// *Response implements the [AnyResponse] interface.
+func (r *Response[_]) Any() any {
+ return r.Msg
+}
+
+// Header returns the HTTP headers for this response.
+func (r *Response[_]) Header() http.Header {
+ if r.header == nil {
+ r.header = make(http.Header)
+ }
+ return r.header
+}
+
+// Trailer returns the trailers for this response. Depending on the underlying
+// RPC protocol, trailers may be sent as HTTP trailers or a protocol-specific
+// block of in-body metadata.
+func (r *Response[_]) Trailer() http.Header {
+ if r.trailer == nil {
+ r.trailer = make(http.Header)
+ }
+ return r.trailer
+}
+
+// internalOnly implements AnyResponse.
+func (r *Response[_]) internalOnly() {}
+
+// AnyResponse is the common method set of every [Response], regardless of type
+// parameter. It's used in unary interceptors.
+//
+// To preserve our ability to add methods to this interface without breaking
+// backward compatibility, only types defined in this package can implement
+// AnyResponse.
+type AnyResponse interface {
+ Any() any
+ Header() http.Header
+ Trailer() http.Header
+
+ internalOnly()
+}
+
+// HTTPClient is the interface connect expects HTTP clients to implement. The
+// standard library's *http.Client implements HTTPClient.
+type HTTPClient interface {
+ Do(*http.Request) (*http.Response, error)
+}
+
+// Spec is a description of a client call or a handler invocation.
+type Spec struct {
+ StreamType StreamType
+ Procedure string // for example, "/acme.foo.v1.FooService/Bar"
+ IsClient bool // otherwise we're in a handler
+}
+
+// Peer describes the other party to an RPC.
+//
+// When accessed client-side, Addr contains the host or host:port from the
+// server's URL. When accessed server-side, Addr contains the client's address
+// in IP:port format.
+//
+// On both the client and the server, Protocol is the RPC protocol in use.
+// Currently, it's either [ProtocolConnect], [ProtocolGRPC], or
+// [ProtocolGRPCWeb], but additional protocols may be added in the future.
+type Peer struct {
+ Addr string
+ Protocol string
+}
+
+func newPeerFromURL(urlString, protocol string) Peer {
+ peer := Peer{Protocol: protocol}
+ if u, err := url.Parse(urlString); err == nil {
+ peer.Addr = u.Host
+ }
+ return peer
+}
+
+// handlerConnCloser extends HandlerConn with a method for handlers to
+// terminate the message exchange (and optionally send an error to the client).
+type handlerConnCloser interface {
+ StreamingHandlerConn
+
+ Close(error) error
+}
+
+// receiveUnaryResponse unmarshals a message from a StreamingClientConn, then
+// envelopes the message and attaches headers and trailers. It attempts to
+// consume the response stream and isn't appropriate when receiving multiple
+// messages.
+func receiveUnaryResponse[T any](conn StreamingClientConn) (*Response[T], error) {
+ var msg T
+ if err := conn.Receive(&msg); err != nil {
+ return nil, err
+ }
+ // In a well-formed stream, the response message may be followed by a block
+ // of in-stream trailers or HTTP trailers. To ensure that we receive the
+ // trailers, try to read another message from the stream.
+ if err := conn.Receive(new(T)); err == nil {
+ return nil, NewError(CodeUnknown, errors.New("unary stream has multiple messages"))
+ } else if err != nil && !errors.Is(err, io.EOF) {
+ return nil, NewError(CodeUnknown, err)
+ }
+ return &Response[T]{
+ Msg: &msg,
+ header: conn.ResponseHeader(),
+ trailer: conn.ResponseTrailer(),
+ }, nil
+}
diff --git a/vendor/github.com/bufbuild/connect-go/duplex_http_call.go b/vendor/github.com/bufbuild/connect-go/duplex_http_call.go
new file mode 100644
index 000000000..c365f34db
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/duplex_http_call.go
@@ -0,0 +1,278 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "net/http"
+ "sync"
+)
+
+// duplexHTTPCall is a full-duplex stream between the client and server. The
+// request body is the stream from client to server, and the response body is
+// the reverse.
+//
+// Be warned: we need to use some lesser-known APIs to do this with net/http.
+type duplexHTTPCall struct {
+ ctx context.Context
+ httpClient HTTPClient
+ streamType StreamType
+ validateResponse func(*http.Response) *Error
+
+ // We'll use a pipe as the request body. We hand the read side of the pipe to
+ // net/http, and we write to the write side (naturally). The two ends are
+ // safe to use concurrently.
+ requestBodyReader *io.PipeReader
+ requestBodyWriter *io.PipeWriter
+
+ sendRequestOnce sync.Once
+ responseReady chan struct{}
+ request *http.Request
+ response *http.Response
+
+ errMu sync.Mutex
+ err error
+}
+
+func newDuplexHTTPCall(
+ ctx context.Context,
+ httpClient HTTPClient,
+ url string,
+ spec Spec,
+ header http.Header,
+) *duplexHTTPCall {
+ pipeReader, pipeWriter := io.Pipe()
+ request, err := http.NewRequestWithContext(
+ ctx,
+ http.MethodPost,
+ url,
+ pipeReader,
+ )
+ request.Header = header
+ client := &duplexHTTPCall{
+ ctx: ctx,
+ httpClient: httpClient,
+ streamType: spec.StreamType,
+ requestBodyReader: pipeReader,
+ requestBodyWriter: pipeWriter,
+ request: request,
+ responseReady: make(chan struct{}),
+ }
+ if err != nil {
+ // We can't construct a request, so we definitely can't send it over the
+ // network. Exhaust the sync.Once immediately and short-circuit Read and
+ // Write by setting an error.
+ client.sendRequestOnce.Do(func() {})
+ connectErr := errorf(CodeUnavailable, "construct *http.Request: %w", err)
+ client.SetError(connectErr)
+ }
+ return client
+}
+
+// Write to the request body. Returns an error wrapping io.EOF after SetError
+// is called.
+func (d *duplexHTTPCall) Write(data []byte) (int, error) {
+ d.ensureRequestMade()
+ // Before we send any data, check if the context has been canceled.
+ if err := d.ctx.Err(); err != nil {
+ d.SetError(err)
+ return 0, wrapIfContextError(err)
+ }
+ // It's safe to write to this side of the pipe while net/http concurrently
+ // reads from the other side.
+ bytesWritten, err := d.requestBodyWriter.Write(data)
+ if err != nil && errors.Is(err, io.ErrClosedPipe) {
+ // Signal that the stream is closed with the more-typical io.EOF instead of
+ // io.ErrClosedPipe. This makes it easier for protocol-specific wrappers to
+ // match grpc-go's behavior.
+ return bytesWritten, io.EOF
+ }
+ return bytesWritten, err
+}
+
+// Close the request body. Callers *must* call CloseWrite before Read when
+// using HTTP/1.x.
+func (d *duplexHTTPCall) CloseWrite() error {
+ // Even if Write was never called, we need to make an HTTP request. This
+ // ensures that we've sent any headers to the server and that we have an HTTP
+ // response to read from.
+ d.ensureRequestMade()
+ // The user calls CloseWrite to indicate that they're done sending data. It's
+ // safe to close the write side of the pipe while net/http is reading from
+ // it.
+ //
+ // Because connect also supports some RPC types over HTTP/1.1, we need to be
+ // careful how we expose this method to users. HTTP/1.1 doesn't support
+ // bidirectional streaming - the write side of the stream (aka request body)
+ // must be closed before we start reading the response or we'll just block
+ // forever. To make sure users don't have to worry about this, the generated
+ // code for unary, client streaming, and server streaming RPCs must call
+ // CloseWrite automatically rather than requiring the user to do it.
+ return d.requestBodyWriter.Close()
+}
+
+// Header returns the HTTP request headers.
+func (d *duplexHTTPCall) Header() http.Header {
+ return d.request.Header
+}
+
+// Trailer returns the HTTP request trailers.
+func (d *duplexHTTPCall) Trailer() http.Header {
+ return d.request.Trailer
+}
+
+// Read from the response body. Returns the first error passed to SetError.
+func (d *duplexHTTPCall) Read(data []byte) (int, error) {
+ // First, we wait until we've gotten the response headers and established the
+ // server-to-client side of the stream.
+ d.BlockUntilResponseReady()
+ if err := d.getError(); err != nil {
+ // The stream is already closed or corrupted.
+ return 0, err
+ }
+ // Before we read, check if the context has been canceled.
+ if err := d.ctx.Err(); err != nil {
+ d.SetError(err)
+ return 0, wrapIfContextError(err)
+ }
+ if d.response == nil {
+ return 0, fmt.Errorf("nil response from %v", d.request.URL)
+ }
+ n, err := d.response.Body.Read(data)
+ return n, wrapIfRSTError(err)
+}
+
+func (d *duplexHTTPCall) CloseRead() error {
+ d.BlockUntilResponseReady()
+ if d.response == nil {
+ return nil
+ }
+ if err := discard(d.response.Body); err != nil {
+ return wrapIfRSTError(err)
+ }
+ return wrapIfRSTError(d.response.Body.Close())
+}
+
+// ResponseStatusCode is the response's HTTP status code.
+func (d *duplexHTTPCall) ResponseStatusCode() (int, error) {
+ d.BlockUntilResponseReady()
+ if d.response == nil {
+ return 0, fmt.Errorf("nil response from %v", d.request.URL)
+ }
+ return d.response.StatusCode, nil
+}
+
+// ResponseHeader returns the response HTTP headers.
+func (d *duplexHTTPCall) ResponseHeader() http.Header {
+ d.BlockUntilResponseReady()
+ if d.response != nil {
+ return d.response.Header
+ }
+ return make(http.Header)
+}
+
+// ResponseTrailer returns the response HTTP trailers.
+func (d *duplexHTTPCall) ResponseTrailer() http.Header {
+ d.BlockUntilResponseReady()
+ if d.response != nil {
+ return d.response.Trailer
+ }
+ return make(http.Header)
+}
+
+// SetError stores any error encountered processing the response. All
+// subsequent calls to Read return this error, and all subsequent calls to
+// Write return an error wrapping io.EOF. It's safe to call concurrently with
+// any other method.
+func (d *duplexHTTPCall) SetError(err error) {
+ d.errMu.Lock()
+ if d.err == nil {
+ d.err = wrapIfContextError(err)
+ }
+ // Closing the read side of the request body pipe acquires an internal lock,
+ // so we want to scope errMu's usage narrowly and avoid defer.
+ d.errMu.Unlock()
+
+ // We've already hit an error, so we should stop writing to the request body.
+ // It's safe to call Close more than once and/or concurrently (calls after
+ // the first are no-ops), so it's okay for us to call this even though
+ // net/http sometimes closes the reader too.
+ //
+ // It's safe to ignore the returned error here. Under the hood, Close calls
+ // CloseWithError, which is documented to always return nil.
+ _ = d.requestBodyReader.Close()
+}
+
+// SetValidateResponse sets the response validation function. The function runs
+// in a background goroutine.
+func (d *duplexHTTPCall) SetValidateResponse(validate func(*http.Response) *Error) {
+ d.validateResponse = validate
+}
+
+func (d *duplexHTTPCall) BlockUntilResponseReady() {
+ <-d.responseReady
+}
+
+func (d *duplexHTTPCall) ensureRequestMade() {
+ d.sendRequestOnce.Do(func() {
+ go d.makeRequest()
+ })
+}
+
+func (d *duplexHTTPCall) makeRequest() {
+ // This runs concurrently with Write and CloseWrite. Read and CloseRead wait
+ // on d.responseReady, so we can't race with them.
+ defer close(d.responseReady)
+
+ // Once we send a message to the server, they send a message back and
+ // establish the receive side of the stream.
+ response, err := d.httpClient.Do(d.request) //nolint:bodyclose
+ if err != nil {
+ err = wrapIfContextError(err)
+ err = wrapIfLikelyH2CNotConfiguredError(d.request, err)
+ err = wrapIfLikelyWithGRPCNotUsedError(err)
+ err = wrapIfRSTError(err)
+ if _, ok := asError(err); !ok {
+ err = NewError(CodeUnavailable, err)
+ }
+ d.SetError(err)
+ return
+ }
+ d.response = response
+ if err := d.validateResponse(response); err != nil {
+ d.SetError(err)
+ return
+ }
+ if (d.streamType&StreamTypeBidi) == StreamTypeBidi && response.ProtoMajor < 2 {
+ // If we somehow dialed an HTTP/1.x server, fail with an explicit message
+ // rather than returning a more cryptic error later on.
+ d.SetError(errorf(
+ CodeUnimplemented,
+ "response from %v is HTTP/%d.%d: bidi streams require at least HTTP/2",
+ d.request.URL,
+ response.ProtoMajor,
+ response.ProtoMinor,
+ ))
+ }
+}
+
+func (d *duplexHTTPCall) getError() error {
+ d.errMu.Lock()
+ defer d.errMu.Unlock()
+ return d.err
+}
diff --git a/vendor/github.com/bufbuild/connect-go/envelope.go b/vendor/github.com/bufbuild/connect-go/envelope.go
new file mode 100644
index 000000000..ecde9570e
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/envelope.go
@@ -0,0 +1,273 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "bytes"
+ "encoding/binary"
+ "errors"
+ "io"
+)
+
+// flagEnvelopeCompressed indicates that the data is compressed. It has the
+// same meaning in the gRPC-Web, gRPC-HTTP2, and Connect protocols.
+const flagEnvelopeCompressed = 0b00000001
+
+var errSpecialEnvelope = errorf(
+ CodeUnknown,
+ "final message has protocol-specific flags: %w",
+ // User code checks for end of stream with errors.Is(err, io.EOF).
+ io.EOF,
+)
+
+// envelope is a block of arbitrary bytes wrapped in gRPC and Connect's framing
+// protocol.
+//
+// Each message is preceded by a 5-byte prefix. The first byte is a uint8 used
+// as a set of bitwise flags, and the remainder is a uint32 indicating the
+// message length. gRPC and Connect interpret the bitwise flags differently, so
+// envelope leaves their interpretation up to the caller.
+type envelope struct {
+ Data *bytes.Buffer
+ Flags uint8
+}
+
+func (e *envelope) IsSet(flag uint8) bool {
+ return e.Flags&flag == flag
+}
+
+type envelopeWriter struct {
+ writer io.Writer
+ codec Codec
+ compressMinBytes int
+ compressionPool *compressionPool
+ bufferPool *bufferPool
+ sendMaxBytes int
+}
+
+func (w *envelopeWriter) Marshal(message any) *Error {
+ if message == nil {
+ if _, err := w.writer.Write(nil); err != nil {
+ if connectErr, ok := asError(err); ok {
+ return connectErr
+ }
+ return NewError(CodeUnknown, err)
+ }
+ return nil
+ }
+ raw, err := w.codec.Marshal(message)
+ if err != nil {
+ return errorf(CodeInternal, "marshal message: %w", err)
+ }
+ // We can't avoid allocating the byte slice, so we may as well reuse it once
+ // we're done with it.
+ buffer := bytes.NewBuffer(raw)
+ defer w.bufferPool.Put(buffer)
+ envelope := &envelope{Data: buffer}
+ return w.Write(envelope)
+}
+
+// Write writes the enveloped message, compressing as necessary. It doesn't
+// retain any references to the supplied envelope or its underlying data.
+func (w *envelopeWriter) Write(env *envelope) *Error {
+ if env.IsSet(flagEnvelopeCompressed) ||
+ w.compressionPool == nil ||
+ env.Data.Len() < w.compressMinBytes {
+ if w.sendMaxBytes > 0 && env.Data.Len() > w.sendMaxBytes {
+ return errorf(CodeResourceExhausted, "message size %d exceeds sendMaxBytes %d", env.Data.Len(), w.sendMaxBytes)
+ }
+ return w.write(env)
+ }
+ data := w.bufferPool.Get()
+ defer w.bufferPool.Put(data)
+ if err := w.compressionPool.Compress(data, env.Data); err != nil {
+ return err
+ }
+ if w.sendMaxBytes > 0 && data.Len() > w.sendMaxBytes {
+ return errorf(CodeResourceExhausted, "compressed message size %d exceeds sendMaxBytes %d", data.Len(), w.sendMaxBytes)
+ }
+ return w.write(&envelope{
+ Data: data,
+ Flags: env.Flags | flagEnvelopeCompressed,
+ })
+}
+
+func (w *envelopeWriter) write(env *envelope) *Error {
+ prefix := [5]byte{}
+ prefix[0] = env.Flags
+ binary.BigEndian.PutUint32(prefix[1:5], uint32(env.Data.Len()))
+ if _, err := w.writer.Write(prefix[:]); err != nil {
+ if connectErr, ok := asError(err); ok {
+ return connectErr
+ }
+ return errorf(CodeUnknown, "write envelope: %w", err)
+ }
+ if _, err := io.Copy(w.writer, env.Data); err != nil {
+ return errorf(CodeUnknown, "write message: %w", err)
+ }
+ return nil
+}
+
+type envelopeReader struct {
+ reader io.Reader
+ codec Codec
+ last envelope
+ compressionPool *compressionPool
+ bufferPool *bufferPool
+ readMaxBytes int
+}
+
+func (r *envelopeReader) Unmarshal(message any) *Error {
+ buffer := r.bufferPool.Get()
+ defer r.bufferPool.Put(buffer)
+
+ env := &envelope{Data: buffer}
+ err := r.Read(env)
+ switch {
+ case err == nil &&
+ (env.Flags == 0 || env.Flags == flagEnvelopeCompressed) &&
+ env.Data.Len() == 0:
+ // This is a standard message (because none of the top 7 bits are set) and
+ // there's no data, so the zero value of the message is correct.
+ return nil
+ case err != nil && errors.Is(err, io.EOF):
+ // The stream has ended. Propagate the EOF to the caller.
+ return err
+ case err != nil:
+ // Something's wrong.
+ return err
+ }
+
+ data := env.Data
+ if data.Len() > 0 && env.IsSet(flagEnvelopeCompressed) {
+ if r.compressionPool == nil {
+ return errorf(
+ CodeInvalidArgument,
+ "gRPC protocol error: sent compressed message without Grpc-Encoding header",
+ )
+ }
+ decompressed := r.bufferPool.Get()
+ defer r.bufferPool.Put(decompressed)
+ if err := r.compressionPool.Decompress(decompressed, data, int64(r.readMaxBytes)); err != nil {
+ return err
+ }
+ data = decompressed
+ }
+
+ if env.Flags != 0 && env.Flags != flagEnvelopeCompressed {
+ // One of the protocol-specific flags are set, so this is the end of the
+ // stream. Save the message for protocol-specific code to process and
+ // return a sentinel error. Since we've deferred functions to return env's
+ // underlying buffer to a pool, we need to keep a copy.
+ r.last = envelope{
+ Data: r.bufferPool.Get(),
+ Flags: env.Flags,
+ }
+ // Don't return last to the pool! We're going to reference the data
+ // elsewhere.
+ if _, err := r.last.Data.ReadFrom(data); err != nil {
+ return errorf(CodeUnknown, "copy final envelope: %w", err)
+ }
+ return errSpecialEnvelope
+ }
+
+ if err := r.codec.Unmarshal(data.Bytes(), message); err != nil {
+ return errorf(CodeInvalidArgument, "unmarshal into %T: %w", message, err)
+ }
+ return nil
+}
+
+func (r *envelopeReader) Read(env *envelope) *Error {
+ prefixes := [5]byte{}
+ prefixBytesRead, err := r.reader.Read(prefixes[:])
+
+ switch {
+ case (err == nil || errors.Is(err, io.EOF)) &&
+ prefixBytesRead == 5 &&
+ isSizeZeroPrefix(prefixes):
+ // Successfully read prefix and expect no additional data.
+ env.Flags = prefixes[0]
+ return nil
+ case err != nil && errors.Is(err, io.EOF) && prefixBytesRead == 0:
+ // The stream ended cleanly. That's expected, but we need to propagate them
+ // to the user so that they know that the stream has ended. We shouldn't
+ // add any alarming text about protocol errors, though.
+ return NewError(CodeUnknown, err)
+ case err != nil || prefixBytesRead < 5:
+ // Something else has gone wrong - the stream didn't end cleanly.
+ if connectErr, ok := asError(err); ok {
+ return connectErr
+ }
+ if maxBytesErr := asMaxBytesError(err, "read 5 byte message prefix"); maxBytesErr != nil {
+ // We're reading from an http.MaxBytesHandler, and we've exceeded the read limit.
+ return maxBytesErr
+ }
+ return errorf(
+ CodeInvalidArgument,
+ "protocol error: incomplete envelope: %w", err,
+ )
+ }
+ size := int(binary.BigEndian.Uint32(prefixes[1:5]))
+ if size < 0 {
+ return errorf(CodeInvalidArgument, "message size %d overflowed uint32", size)
+ }
+ if r.readMaxBytes > 0 && size > r.readMaxBytes {
+ _, err := io.CopyN(io.Discard, r.reader, int64(size))
+ if err != nil && !errors.Is(err, io.EOF) {
+ return errorf(CodeUnknown, "read enveloped message: %w", err)
+ }
+ return errorf(CodeResourceExhausted, "message size %d is larger than configured max %d", size, r.readMaxBytes)
+ }
+ if size > 0 {
+ env.Data.Grow(size)
+ // At layer 7, we don't know exactly what's happening down in L4. Large
+ // length-prefixed messages may arrive in chunks, so we may need to read
+ // the request body past EOF. We also need to take care that we don't retry
+ // forever if the message is malformed.
+ remaining := int64(size)
+ for remaining > 0 {
+ bytesRead, err := io.CopyN(env.Data, r.reader, remaining)
+ if err != nil && !errors.Is(err, io.EOF) {
+ if maxBytesErr := asMaxBytesError(err, "read %d byte message", size); maxBytesErr != nil {
+ // We're reading from an http.MaxBytesHandler, and we've exceeded the read limit.
+ return maxBytesErr
+ }
+ return errorf(CodeUnknown, "read enveloped message: %w", err)
+ }
+ if errors.Is(err, io.EOF) && bytesRead == 0 {
+ // We've gotten zero-length chunk of data. Message is likely malformed,
+ // don't wait for additional chunks.
+ return errorf(
+ CodeInvalidArgument,
+ "protocol error: promised %d bytes in enveloped message, got %d bytes",
+ size,
+ int64(size)-remaining,
+ )
+ }
+ remaining -= bytesRead
+ }
+ }
+ env.Flags = prefixes[0]
+ return nil
+}
+
+func isSizeZeroPrefix(prefix [5]byte) bool {
+ for i := 1; i < 5; i++ {
+ if prefix[i] != 0 {
+ return false
+ }
+ }
+ return true
+}
diff --git a/vendor/github.com/bufbuild/connect-go/error.go b/vendor/github.com/bufbuild/connect-go/error.go
new file mode 100644
index 000000000..a4cd72b9c
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/error.go
@@ -0,0 +1,349 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "net/http"
+ "net/url"
+ "strings"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+const (
+ commonErrorsURL = "https://connect.build/docs/go/common-errors"
+ defaultAnyResolverPrefix = "type.googleapis.com/"
+)
+
+// An ErrorDetail is a self-describing Protobuf message attached to an [*Error].
+// Error details are sent over the network to clients, which can then work with
+// strongly-typed data rather than trying to parse a complex error message. For
+// example, you might use details to send a localized error message or retry
+// parameters to the client.
+//
+// The [google.golang.org/genproto/googleapis/rpc/errdetails] package contains a
+// variety of Protobuf messages commonly used as error details.
+type ErrorDetail struct {
+ pb *anypb.Any
+ wireJSON string // preserve human-readable JSON
+}
+
+// NewErrorDetail constructs a new error detail. If msg is an *[anypb.Any] then
+// it is used as is. Otherwise, it is first marshalled into an *[anypb.Any]
+// value. This returns an error if msg cannot be marshalled.
+func NewErrorDetail(msg proto.Message) (*ErrorDetail, error) {
+ // If it's already an Any, don't wrap it inside another.
+ if pb, ok := msg.(*anypb.Any); ok {
+ return &ErrorDetail{pb: pb}, nil
+ }
+ pb, err := anypb.New(msg)
+ if err != nil {
+ return nil, err
+ }
+ return &ErrorDetail{pb: pb}, nil
+}
+
+// Type is the fully-qualified name of the detail's Protobuf message (for
+// example, acme.foo.v1.FooDetail).
+func (d *ErrorDetail) Type() string {
+ // proto.Any tries to make messages self-describing by using type URLs rather
+ // than plain type names, but there aren't any descriptor registries
+ // deployed. With the current state of the `Any` code, it's not possible to
+ // build a useful type registry either. To hide this from users, we should
+ // trim the static hostname that `Any` adds to the type name.
+ //
+ // If we ever want to support remote registries, we can add an explicit
+ // `TypeURL` method.
+ return strings.TrimPrefix(d.pb.TypeUrl, defaultAnyResolverPrefix)
+}
+
+// Bytes returns a copy of the Protobuf-serialized detail.
+func (d *ErrorDetail) Bytes() []byte {
+ out := make([]byte, len(d.pb.Value))
+ copy(out, d.pb.Value)
+ return out
+}
+
+// Value uses the Protobuf runtime's package-global registry to unmarshal the
+// Detail into a strongly-typed message. Typically, clients use Go type
+// assertions to cast from the proto.Message interface to concrete types.
+func (d *ErrorDetail) Value() (proto.Message, error) {
+ return d.pb.UnmarshalNew()
+}
+
+// An Error captures four key pieces of information: a [Code], an underlying Go
+// error, a map of metadata, and an optional collection of arbitrary Protobuf
+// messages called "details" (more on those below). Servers send the code, the
+// underlying error's Error() output, the metadata, and details over the wire
+// to clients. Remember that the underlying error's message will be sent to
+// clients - take care not to leak sensitive information from public APIs!
+//
+// Service implementations and interceptors should return errors that can be
+// cast to an [*Error] (using the standard library's [errors.As]). If the returned
+// error can't be cast to an [*Error], connect will use [CodeUnknown] and the
+// returned error's message.
+//
+// Error details are an optional mechanism for servers, interceptors, and
+// proxies to attach arbitrary Protobuf messages to the error code and message.
+// They're a clearer and more performant alternative to HTTP header
+// microformats. See [the documentation on errors] for more details.
+//
+// [the documentation on errors]: https://connect.build/docs/go/errors
+type Error struct {
+ code Code
+ err error
+ details []*ErrorDetail
+ meta http.Header
+ wireErr bool
+}
+
+// NewError annotates any Go error with a status code.
+func NewError(c Code, underlying error) *Error {
+ return &Error{code: c, err: underlying}
+}
+
+// IsWireError checks whether the error was returned by the server, as opposed
+// to being synthesized by the client.
+//
+// Clients may find this useful when deciding how to propagate errors. For
+// example, an RPC-to-HTTP proxy might expose a server-sent CodeUnknown as an
+// HTTP 500 but a client-synthesized CodeUnknown as a 503.
+func IsWireError(err error) bool {
+ se := new(Error)
+ if !errors.As(err, &se) {
+ return false
+ }
+ return se.wireErr
+}
+
+func (e *Error) Error() string {
+ message := e.Message()
+ if message == "" {
+ return e.code.String()
+ }
+ return e.code.String() + ": " + message
+}
+
+// Message returns the underlying error message. It may be empty if the
+// original error was created with a status code and a nil error.
+func (e *Error) Message() string {
+ if e.err != nil {
+ return e.err.Error()
+ }
+ return ""
+}
+
+// Unwrap allows [errors.Is] and [errors.As] access to the underlying error.
+func (e *Error) Unwrap() error {
+ return e.err
+}
+
+// Code returns the error's status code.
+func (e *Error) Code() Code {
+ return e.code
+}
+
+// Details returns the error's details.
+func (e *Error) Details() []*ErrorDetail {
+ return e.details
+}
+
+// AddDetail appends to the error's details.
+func (e *Error) AddDetail(d *ErrorDetail) {
+ e.details = append(e.details, d)
+}
+
+// Meta allows the error to carry additional information as key-value pairs.
+//
+// Metadata attached to errors returned by unary handlers is always sent as
+// HTTP headers, regardless of the protocol. Metadata attached to errors
+// returned by streaming handlers may be sent as HTTP headers, HTTP trailers,
+// or a block of in-body metadata, depending on the protocol in use and whether
+// or not the handler has already written messages to the stream.
+//
+// When clients receive errors, the metadata contains the union of the HTTP
+// headers and the protocol-specific trailers (either HTTP trailers or in-body
+// metadata).
+func (e *Error) Meta() http.Header {
+ if e.meta == nil {
+ e.meta = make(http.Header)
+ }
+ return e.meta
+}
+
+func (e *Error) detailsAsAny() []*anypb.Any {
+ anys := make([]*anypb.Any, 0, len(e.details))
+ for _, detail := range e.details {
+ anys = append(anys, detail.pb)
+ }
+ return anys
+}
+
+// errorf calls fmt.Errorf with the supplied template and arguments, then wraps
+// the resulting error.
+func errorf(c Code, template string, args ...any) *Error {
+ return NewError(c, fmt.Errorf(template, args...))
+}
+
+// asError uses errors.As to unwrap any error and look for a connect *Error.
+func asError(err error) (*Error, bool) {
+ var connectErr *Error
+ ok := errors.As(err, &connectErr)
+ return connectErr, ok
+}
+
+// wrapIfUncoded ensures that all errors are wrapped. It leaves already-wrapped
+// errors unchanged, uses wrapIfContextError to apply codes to context.Canceled
+// and context.DeadlineExceeded, and falls back to wrapping other errors with
+// CodeUnknown.
+func wrapIfUncoded(err error) error {
+ if err == nil {
+ return nil
+ }
+ maybeCodedErr := wrapIfContextError(err)
+ if _, ok := asError(maybeCodedErr); ok {
+ return maybeCodedErr
+ }
+ return NewError(CodeUnknown, maybeCodedErr)
+}
+
+// wrapIfContextError applies CodeCanceled or CodeDeadlineExceeded to Go's
+// context.Canceled and context.DeadlineExceeded errors, but only if they
+// haven't already been wrapped.
+func wrapIfContextError(err error) error {
+ if err == nil {
+ return nil
+ }
+ if _, ok := asError(err); ok {
+ return err
+ }
+ if errors.Is(err, context.Canceled) {
+ return NewError(CodeCanceled, err)
+ }
+ if errors.Is(err, context.DeadlineExceeded) {
+ return NewError(CodeDeadlineExceeded, err)
+ }
+ return err
+}
+
+// wrapIfLikelyWithGRPCNotUsedError adds a wrapping error that has a message
+// telling the caller that they likely need to use h2c but are using a raw http.Client{}.
+//
+// This happens when running a gRPC-only server.
+// This is fragile and may break over time, and this should be considered a best-effort.
+func wrapIfLikelyH2CNotConfiguredError(request *http.Request, err error) error {
+ if err == nil {
+ return nil
+ }
+ if _, ok := asError(err); ok {
+ return err
+ }
+ if url := request.URL; url != nil && url.Scheme != "http" {
+ // If the scheme is not http, we definitely do not have an h2c error, so just return.
+ return err
+ }
+ // net/http code has been investigated and there is no typing of any of these errors
+ // they are all created with fmt.Errorf
+ // grpc-go returns the first error 2/3-3/4 of the time, and the second error 1/4-1/3 of the time
+ if errString := err.Error(); strings.HasPrefix(errString, `Post "`) &&
+ (strings.Contains(errString, `net/http: HTTP/1.x transport connection broken: malformed HTTP response`) ||
+ strings.HasSuffix(errString, `write: broken pipe`)) {
+ return fmt.Errorf("possible h2c configuration issue when talking to gRPC server, see %s: %w", commonErrorsURL, err)
+ }
+ return err
+}
+
+// wrapIfLikelyWithGRPCNotUsedError adds a wrapping error that has a message
+// telling the caller that they likely forgot to use connect.WithGRPC().
+//
+// This happens when running a gRPC-only server.
+// This is fragile and may break over time, and this should be considered a best-effort.
+func wrapIfLikelyWithGRPCNotUsedError(err error) error {
+ if err == nil {
+ return nil
+ }
+ if _, ok := asError(err); ok {
+ return err
+ }
+ // golang.org/x/net code has been investigated and there is no typing of this error
+ // it is created with fmt.Errorf
+ // http2/transport.go:573: return nil, fmt.Errorf("http2: Transport: cannot retry err [%v] after Request.Body was written; define Request.GetBody to avoid this error", err)
+ if errString := err.Error(); strings.HasPrefix(errString, `Post "`) &&
+ strings.Contains(errString, `http2: Transport: cannot retry err`) &&
+ strings.HasSuffix(errString, `after Request.Body was written; define Request.GetBody to avoid this error`) {
+ return fmt.Errorf("possible missing connect.WithGPRC() client option when talking to gRPC server, see %s: %w", commonErrorsURL, err)
+ }
+ return err
+}
+
+// HTTP/2 has its own set of error codes, which it sends in RST_STREAM frames.
+// When the server sends one of these errors, we should map it back into our
+// RPC error codes following
+// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#http2-transport-mapping.
+//
+// This would be vastly simpler if we were using x/net/http2 directly, since
+// the StreamError type is exported. When x/net/http2 gets vendored into
+// net/http, though, all these types become unexported...so we're left with
+// string munging.
+func wrapIfRSTError(err error) error {
+ const (
+ streamErrPrefix = "stream error: "
+ fromPeerSuffix = "; received from peer"
+ )
+ if err == nil {
+ return nil
+ }
+ if _, ok := asError(err); ok {
+ return err
+ }
+ if urlErr := new(url.Error); errors.As(err, &urlErr) {
+ // If we get an RST_STREAM error from http.Client.Do, it's wrapped in a
+ // *url.Error.
+ err = urlErr.Unwrap()
+ }
+ msg := err.Error()
+ if !strings.HasPrefix(msg, streamErrPrefix) {
+ return err
+ }
+ if !strings.HasSuffix(msg, fromPeerSuffix) {
+ return err
+ }
+ msg = strings.TrimSuffix(msg, fromPeerSuffix)
+ i := strings.LastIndex(msg, ";")
+ if i < 0 || i >= len(msg)-1 {
+ return err
+ }
+ msg = msg[i+1:]
+ msg = strings.TrimSpace(msg)
+ switch msg {
+ case "NO_ERROR", "PROTOCOL_ERROR", "INTERNAL_ERROR", "FLOW_CONTROL_ERROR",
+ "SETTINGS_TIMEOUT", "FRAME_SIZE_ERROR", "COMPRESSION_ERROR", "CONNECT_ERROR":
+ return NewError(CodeInternal, err)
+ case "REFUSED_STREAM":
+ return NewError(CodeUnavailable, err)
+ case "CANCEL":
+ return NewError(CodeCanceled, err)
+ case "ENHANCE_YOUR_CALM":
+ return NewError(CodeResourceExhausted, fmt.Errorf("bandwidth exhausted: %w", err))
+ case "INADEQUATE_SECURITY":
+ return NewError(CodePermissionDenied, fmt.Errorf("transport protocol insecure: %w", err))
+ default:
+ return err
+ }
+}
diff --git a/vendor/github.com/bufbuild/connect-go/error_writer.go b/vendor/github.com/bufbuild/connect-go/error_writer.go
new file mode 100644
index 000000000..1c62760f3
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/error_writer.go
@@ -0,0 +1,168 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "encoding/json"
+ "fmt"
+ "net/http"
+ "strings"
+)
+
+// An ErrorWriter writes errors to an [http.ResponseWriter] in the format
+// expected by an RPC client. This is especially useful in server-side net/http
+// middleware, where you may wish to handle requests from RPC and non-RPC
+// clients with the same code.
+//
+// ErrorWriters are safe to use concurrently.
+type ErrorWriter struct {
+ bufferPool *bufferPool
+ protobuf Codec
+ allContentTypes map[string]struct{}
+ grpcContentTypes map[string]struct{}
+ grpcWebContentTypes map[string]struct{}
+ unaryConnectContentTypes map[string]struct{}
+ streamingConnectContentTypes map[string]struct{}
+}
+
+// NewErrorWriter constructs an ErrorWriter. To properly recognize supported
+// RPC Content-Types in net/http middleware, you must pass the same
+// HandlerOptions to NewErrorWriter and any wrapped Connect handlers.
+func NewErrorWriter(opts ...HandlerOption) *ErrorWriter {
+ config := newHandlerConfig("", opts)
+ writer := &ErrorWriter{
+ bufferPool: config.BufferPool,
+ protobuf: newReadOnlyCodecs(config.Codecs).Protobuf(),
+ allContentTypes: make(map[string]struct{}),
+ grpcContentTypes: make(map[string]struct{}),
+ grpcWebContentTypes: make(map[string]struct{}),
+ unaryConnectContentTypes: make(map[string]struct{}),
+ streamingConnectContentTypes: make(map[string]struct{}),
+ }
+ for name := range config.Codecs {
+ unary := connectContentTypeFromCodecName(StreamTypeUnary, name)
+ writer.allContentTypes[unary] = struct{}{}
+ writer.unaryConnectContentTypes[unary] = struct{}{}
+ streaming := connectContentTypeFromCodecName(StreamTypeBidi, name)
+ writer.streamingConnectContentTypes[streaming] = struct{}{}
+ writer.allContentTypes[streaming] = struct{}{}
+ }
+ if config.HandleGRPC {
+ writer.grpcContentTypes[grpcContentTypeDefault] = struct{}{}
+ writer.allContentTypes[grpcContentTypeDefault] = struct{}{}
+ for name := range config.Codecs {
+ ct := grpcContentTypeFromCodecName(false /* web */, name)
+ writer.grpcContentTypes[ct] = struct{}{}
+ writer.allContentTypes[ct] = struct{}{}
+ }
+ }
+ if config.HandleGRPCWeb {
+ writer.grpcWebContentTypes[grpcWebContentTypeDefault] = struct{}{}
+ writer.allContentTypes[grpcWebContentTypeDefault] = struct{}{}
+ for name := range config.Codecs {
+ ct := grpcContentTypeFromCodecName(true /* web */, name)
+ writer.grpcWebContentTypes[ct] = struct{}{}
+ writer.allContentTypes[ct] = struct{}{}
+ }
+ }
+ return writer
+}
+
+// IsSupported checks whether a request is using one of the ErrorWriter's
+// supported RPC protocols.
+func (w *ErrorWriter) IsSupported(request *http.Request) bool {
+ ctype := canonicalizeContentType(request.Header.Get(headerContentType))
+ _, ok := w.allContentTypes[ctype]
+ return ok
+}
+
+// Write an error, using the format appropriate for the RPC protocol in use.
+// Callers should first use IsSupported to verify that the request is using one
+// of the ErrorWriter's supported RPC protocols.
+//
+// Write does not read or close the request body.
+func (w *ErrorWriter) Write(response http.ResponseWriter, request *http.Request, err error) error {
+ ctype := canonicalizeContentType(request.Header.Get(headerContentType))
+ if _, ok := w.unaryConnectContentTypes[ctype]; ok {
+ // Unary errors are always JSON.
+ response.Header().Set(headerContentType, connectUnaryContentTypeJSON)
+ return w.writeConnectUnary(response, err)
+ }
+ if _, ok := w.streamingConnectContentTypes[ctype]; ok {
+ response.Header().Set(headerContentType, ctype)
+ return w.writeConnectStreaming(response, err)
+ }
+ if _, ok := w.grpcContentTypes[ctype]; ok {
+ response.Header().Set(headerContentType, ctype)
+ return w.writeGRPC(response, err)
+ }
+ if _, ok := w.grpcWebContentTypes[ctype]; ok {
+ response.Header().Set(headerContentType, ctype)
+ return w.writeGRPCWeb(response, err)
+ }
+ return fmt.Errorf("unsupported Content-Type %q", ctype)
+}
+
+func (w *ErrorWriter) writeConnectUnary(response http.ResponseWriter, err error) error {
+ if connectErr, ok := asError(err); ok {
+ mergeHeaders(response.Header(), connectErr.meta)
+ }
+ response.WriteHeader(connectCodeToHTTP(CodeOf(err)))
+ data, marshalErr := json.Marshal(newConnectWireError(err))
+ if marshalErr != nil {
+ return fmt.Errorf("marshal error: %w", marshalErr)
+ }
+ _, writeErr := response.Write(data)
+ return writeErr
+}
+
+func (w *ErrorWriter) writeConnectStreaming(response http.ResponseWriter, err error) error {
+ response.WriteHeader(http.StatusOK)
+ marshaler := &connectStreamingMarshaler{
+ envelopeWriter: envelopeWriter{
+ writer: response,
+ bufferPool: w.bufferPool,
+ },
+ }
+ // MarshalEndStream returns *Error: check return value to avoid typed nils.
+ if marshalErr := marshaler.MarshalEndStream(err, make(http.Header)); marshalErr != nil {
+ return marshalErr
+ }
+ return nil
+}
+
+func (w *ErrorWriter) writeGRPC(response http.ResponseWriter, err error) error {
+ trailers := make(http.Header, 2) // need space for at least code & message
+ grpcErrorToTrailer(w.bufferPool, trailers, w.protobuf, err)
+ // To make net/http reliably send trailers without a body, we must set the
+ // Trailers header rather than using http.TrailerPrefix. See
+ // https://github.com/golang/go/issues/54723.
+ keys := make([]string, 0, len(trailers))
+ for k := range trailers {
+ keys = append(keys, k)
+ }
+ response.Header().Set("Trailer", strings.Join(keys, ","))
+ response.WriteHeader(http.StatusOK)
+ mergeHeaders(response.Header(), trailers)
+ return nil
+}
+
+func (w *ErrorWriter) writeGRPCWeb(response http.ResponseWriter, err error) error {
+ // This is a trailers-only response. To match the behavior of Envoy and
+ // protocol_grpc.go, put the trailers in the HTTP headers.
+ grpcErrorToTrailer(w.bufferPool, response.Header(), w.protobuf, err)
+ response.WriteHeader(http.StatusOK)
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/connect-go/handler.go b/vendor/github.com/bufbuild/connect-go/handler.go
new file mode 100644
index 000000000..0560e9339
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/handler.go
@@ -0,0 +1,319 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "context"
+ "fmt"
+ "net/http"
+)
+
+// A Handler is the server-side implementation of a single RPC defined by a
+// service schema.
+//
+// By default, Handlers support the Connect, gRPC, and gRPC-Web protocols with
+// the binary Protobuf and JSON codecs. They support gzip compression using the
+// standard library's [compress/gzip].
+type Handler struct {
+ spec Spec
+ implementation StreamingHandlerFunc
+ protocolHandlers []protocolHandler
+ acceptPost string // Accept-Post header
+}
+
+// NewUnaryHandler constructs a [Handler] for a request-response procedure.
+func NewUnaryHandler[Req, Res any](
+ procedure string,
+ unary func(context.Context, *Request[Req]) (*Response[Res], error),
+ options ...HandlerOption,
+) *Handler {
+ // Wrap the strongly-typed implementation so we can apply interceptors.
+ untyped := UnaryFunc(func(ctx context.Context, request AnyRequest) (AnyResponse, error) {
+ if err := ctx.Err(); err != nil {
+ return nil, err
+ }
+ typed, ok := request.(*Request[Req])
+ if !ok {
+ return nil, errorf(CodeInternal, "unexpected handler request type %T", request)
+ }
+ res, err := unary(ctx, typed)
+ if res == nil && err == nil {
+ // This is going to panic during serialization. Debugging is much easier
+ // if we panic here instead, so we can include the procedure name.
+ panic(fmt.Sprintf("%s returned nil *connect.Response and nil error", procedure)) //nolint: forbidigo
+ }
+ return res, err
+ })
+ config := newHandlerConfig(procedure, options)
+ if interceptor := config.Interceptor; interceptor != nil {
+ untyped = interceptor.WrapUnary(untyped)
+ }
+ // Given a stream, how should we call the unary function?
+ implementation := func(ctx context.Context, conn StreamingHandlerConn) error {
+ var msg Req
+ if err := conn.Receive(&msg); err != nil {
+ return err
+ }
+ request := &Request[Req]{
+ Msg: &msg,
+ spec: conn.Spec(),
+ peer: conn.Peer(),
+ header: conn.RequestHeader(),
+ }
+ response, err := untyped(ctx, request)
+ if err != nil {
+ return err
+ }
+ mergeHeaders(conn.ResponseHeader(), response.Header())
+ mergeHeaders(conn.ResponseTrailer(), response.Trailer())
+ return conn.Send(response.Any())
+ }
+
+ protocolHandlers := config.newProtocolHandlers(StreamTypeUnary)
+ return &Handler{
+ spec: config.newSpec(StreamTypeUnary),
+ implementation: implementation,
+ protocolHandlers: protocolHandlers,
+ acceptPost: sortedAcceptPostValue(protocolHandlers),
+ }
+}
+
+// NewClientStreamHandler constructs a [Handler] for a client streaming procedure.
+func NewClientStreamHandler[Req, Res any](
+ procedure string,
+ implementation func(context.Context, *ClientStream[Req]) (*Response[Res], error),
+ options ...HandlerOption,
+) *Handler {
+ return newStreamHandler(
+ procedure,
+ StreamTypeClient,
+ func(ctx context.Context, conn StreamingHandlerConn) error {
+ stream := &ClientStream[Req]{conn: conn}
+ res, err := implementation(ctx, stream)
+ if err != nil {
+ return err
+ }
+ if res == nil {
+ // This is going to panic during serialization. Debugging is much easier
+ // if we panic here instead, so we can include the procedure name.
+ panic(fmt.Sprintf("%s returned nil *connect.Response and nil error", procedure)) //nolint: forbidigo
+ }
+ mergeHeaders(conn.ResponseHeader(), res.header)
+ mergeHeaders(conn.ResponseTrailer(), res.trailer)
+ return conn.Send(res.Msg)
+ },
+ options...,
+ )
+}
+
+// NewServerStreamHandler constructs a [Handler] for a server streaming procedure.
+func NewServerStreamHandler[Req, Res any](
+ procedure string,
+ implementation func(context.Context, *Request[Req], *ServerStream[Res]) error,
+ options ...HandlerOption,
+) *Handler {
+ return newStreamHandler(
+ procedure,
+ StreamTypeServer,
+ func(ctx context.Context, conn StreamingHandlerConn) error {
+ var msg Req
+ if err := conn.Receive(&msg); err != nil {
+ return err
+ }
+ return implementation(
+ ctx,
+ &Request[Req]{
+ Msg: &msg,
+ spec: conn.Spec(),
+ peer: conn.Peer(),
+ header: conn.RequestHeader(),
+ },
+ &ServerStream[Res]{conn: conn},
+ )
+ },
+ options...,
+ )
+}
+
+// NewBidiStreamHandler constructs a [Handler] for a bidirectional streaming procedure.
+func NewBidiStreamHandler[Req, Res any](
+ procedure string,
+ implementation func(context.Context, *BidiStream[Req, Res]) error,
+ options ...HandlerOption,
+) *Handler {
+ return newStreamHandler(
+ procedure,
+ StreamTypeBidi,
+ func(ctx context.Context, conn StreamingHandlerConn) error {
+ return implementation(
+ ctx,
+ &BidiStream[Req, Res]{conn: conn},
+ )
+ },
+ options...,
+ )
+}
+
+// ServeHTTP implements [http.Handler].
+func (h *Handler) ServeHTTP(responseWriter http.ResponseWriter, request *http.Request) {
+ // We don't need to defer functions to close the request body or read to
+ // EOF: the stream we construct later on already does that, and we only
+ // return early when dealing with misbehaving clients. In those cases, it's
+ // okay if we can't re-use the connection.
+ isBidi := (h.spec.StreamType & StreamTypeBidi) == StreamTypeBidi
+ if isBidi && request.ProtoMajor < 2 {
+ // Clients coded to expect full-duplex connections may hang if they've
+ // mistakenly negotiated HTTP/1.1. To unblock them, we must close the
+ // underlying TCP connection.
+ responseWriter.Header().Set("Connection", "close")
+ responseWriter.WriteHeader(http.StatusHTTPVersionNotSupported)
+ return
+ }
+
+ // The gRPC-HTTP2, gRPC-Web, and Connect protocols are all POST-only.
+ if request.Method != http.MethodPost {
+ responseWriter.Header().Set("Allow", http.MethodPost)
+ responseWriter.WriteHeader(http.StatusMethodNotAllowed)
+ return
+ }
+
+ // Find our implementation of the RPC protocol in use.
+ contentType := canonicalizeContentType(request.Header.Get("Content-Type"))
+ var protocolHandler protocolHandler
+ for _, handler := range h.protocolHandlers {
+ if _, ok := handler.ContentTypes()[contentType]; ok {
+ protocolHandler = handler
+ break
+ }
+ }
+ if protocolHandler == nil {
+ responseWriter.Header().Set("Accept-Post", h.acceptPost)
+ responseWriter.WriteHeader(http.StatusUnsupportedMediaType)
+ return
+ }
+
+ // Establish a stream and serve the RPC.
+ request.Header.Set("Content-Type", contentType) // prefer canonicalized value
+ ctx, cancel, timeoutErr := protocolHandler.SetTimeout(request) //nolint: contextcheck
+ if timeoutErr != nil {
+ ctx = request.Context()
+ }
+ if cancel != nil {
+ defer cancel()
+ }
+ connCloser, ok := protocolHandler.NewConn(
+ responseWriter,
+ request.WithContext(ctx),
+ )
+ if !ok {
+ // Failed to create stream, usually because client used an unknown
+ // compression algorithm. Nothing further to do.
+ return
+ }
+ if timeoutErr != nil {
+ _ = connCloser.Close(timeoutErr)
+ return
+ }
+ _ = connCloser.Close(h.implementation(ctx, connCloser))
+}
+
+type handlerConfig struct {
+ CompressionPools map[string]*compressionPool
+ CompressionNames []string
+ Codecs map[string]Codec
+ CompressMinBytes int
+ Interceptor Interceptor
+ Procedure string
+ HandleGRPC bool
+ HandleGRPCWeb bool
+ RequireConnectProtocolHeader bool
+ BufferPool *bufferPool
+ ReadMaxBytes int
+ SendMaxBytes int
+}
+
+func newHandlerConfig(procedure string, options []HandlerOption) *handlerConfig {
+ protoPath := extractProtoPath(procedure)
+ config := handlerConfig{
+ Procedure: protoPath,
+ CompressionPools: make(map[string]*compressionPool),
+ Codecs: make(map[string]Codec),
+ HandleGRPC: true,
+ HandleGRPCWeb: true,
+ BufferPool: newBufferPool(),
+ }
+ withProtoBinaryCodec().applyToHandler(&config)
+ withProtoJSONCodecs().applyToHandler(&config)
+ withGzip().applyToHandler(&config)
+ for _, opt := range options {
+ opt.applyToHandler(&config)
+ }
+ return &config
+}
+
+func (c *handlerConfig) newSpec(streamType StreamType) Spec {
+ return Spec{
+ Procedure: c.Procedure,
+ StreamType: streamType,
+ }
+}
+
+func (c *handlerConfig) newProtocolHandlers(streamType StreamType) []protocolHandler {
+ protocols := []protocol{&protocolConnect{}}
+ if c.HandleGRPC {
+ protocols = append(protocols, &protocolGRPC{web: false})
+ }
+ if c.HandleGRPCWeb {
+ protocols = append(protocols, &protocolGRPC{web: true})
+ }
+ handlers := make([]protocolHandler, 0, len(protocols))
+ codecs := newReadOnlyCodecs(c.Codecs)
+ compressors := newReadOnlyCompressionPools(
+ c.CompressionPools,
+ c.CompressionNames,
+ )
+ for _, protocol := range protocols {
+ handlers = append(handlers, protocol.NewHandler(&protocolHandlerParams{
+ Spec: c.newSpec(streamType),
+ Codecs: codecs,
+ CompressionPools: compressors,
+ CompressMinBytes: c.CompressMinBytes,
+ BufferPool: c.BufferPool,
+ ReadMaxBytes: c.ReadMaxBytes,
+ SendMaxBytes: c.SendMaxBytes,
+ RequireConnectProtocolHeader: c.RequireConnectProtocolHeader,
+ }))
+ }
+ return handlers
+}
+
+func newStreamHandler(
+ procedure string,
+ streamType StreamType,
+ implementation StreamingHandlerFunc,
+ options ...HandlerOption,
+) *Handler {
+ config := newHandlerConfig(procedure, options)
+ if ic := config.Interceptor; ic != nil {
+ implementation = ic.WrapStreamingHandler(implementation)
+ }
+ protocolHandlers := config.newProtocolHandlers(streamType)
+ return &Handler{
+ spec: config.newSpec(streamType),
+ implementation: implementation,
+ protocolHandlers: protocolHandlers,
+ acceptPost: sortedAcceptPostValue(protocolHandlers),
+ }
+}
diff --git a/vendor/github.com/bufbuild/connect-go/handler_stream.go b/vendor/github.com/bufbuild/connect-go/handler_stream.go
new file mode 100644
index 000000000..5eb7a9530
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/handler_stream.go
@@ -0,0 +1,177 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "errors"
+ "io"
+ "net/http"
+)
+
+// ClientStream is the handler's view of a client streaming RPC.
+//
+// It's constructed as part of [Handler] invocation, but doesn't currently have
+// an exported constructor.
+type ClientStream[Req any] struct {
+ conn StreamingHandlerConn
+ msg *Req
+ err error
+}
+
+// Spec returns the specification for the RPC.
+func (c *ClientStream[_]) Spec() Spec {
+ return c.conn.Spec()
+}
+
+// Peer describes the client for this RPC.
+func (c *ClientStream[_]) Peer() Peer {
+ return c.conn.Peer()
+}
+
+// RequestHeader returns the headers received from the client.
+func (c *ClientStream[Req]) RequestHeader() http.Header {
+ return c.conn.RequestHeader()
+}
+
+// Receive advances the stream to the next message, which will then be
+// available through the Msg method. It returns false when the stream stops,
+// either by reaching the end or by encountering an unexpected error. After
+// Receive returns false, the Err method will return any unexpected error
+// encountered.
+func (c *ClientStream[Req]) Receive() bool {
+ if c.err != nil {
+ return false
+ }
+ c.msg = new(Req)
+ c.err = c.conn.Receive(c.msg)
+ return c.err == nil
+}
+
+// Msg returns the most recent message unmarshaled by a call to Receive.
+func (c *ClientStream[Req]) Msg() *Req {
+ if c.msg == nil {
+ c.msg = new(Req)
+ }
+ return c.msg
+}
+
+// Err returns the first non-EOF error that was encountered by Receive.
+func (c *ClientStream[Req]) Err() error {
+ if c.err == nil || errors.Is(c.err, io.EOF) {
+ return nil
+ }
+ return c.err
+}
+
+// Conn exposes the underlying StreamingHandlerConn. This may be useful if
+// you'd prefer to wrap the connection in a different high-level API.
+func (c *ClientStream[Req]) Conn() StreamingHandlerConn {
+ return c.conn
+}
+
+// ServerStream is the handler's view of a server streaming RPC.
+//
+// It's constructed as part of [Handler] invocation, but doesn't currently have
+// an exported constructor.
+type ServerStream[Res any] struct {
+ conn StreamingHandlerConn
+}
+
+// ResponseHeader returns the response headers. Headers are sent with the first
+// call to Send.
+func (s *ServerStream[Res]) ResponseHeader() http.Header {
+ return s.conn.ResponseHeader()
+}
+
+// ResponseTrailer returns the response trailers. Handlers may write to the
+// response trailers at any time before returning.
+func (s *ServerStream[Res]) ResponseTrailer() http.Header {
+ return s.conn.ResponseTrailer()
+}
+
+// Send a message to the client. The first call to Send also sends the response
+// headers.
+func (s *ServerStream[Res]) Send(msg *Res) error {
+ if msg == nil {
+ return s.conn.Send(nil)
+ }
+ return s.conn.Send(msg)
+}
+
+// Conn exposes the underlying StreamingHandlerConn. This may be useful if
+// you'd prefer to wrap the connection in a different high-level API.
+func (s *ServerStream[Res]) Conn() StreamingHandlerConn {
+ return s.conn
+}
+
+// BidiStream is the handler's view of a bidirectional streaming RPC.
+//
+// It's constructed as part of [Handler] invocation, but doesn't currently have
+// an exported constructor.
+type BidiStream[Req, Res any] struct {
+ conn StreamingHandlerConn
+}
+
+// Spec returns the specification for the RPC.
+func (b *BidiStream[_, _]) Spec() Spec {
+ return b.conn.Spec()
+}
+
+// Peer describes the client for this RPC.
+func (b *BidiStream[_, _]) Peer() Peer {
+ return b.conn.Peer()
+}
+
+// RequestHeader returns the headers received from the client.
+func (b *BidiStream[Req, Res]) RequestHeader() http.Header {
+ return b.conn.RequestHeader()
+}
+
+// Receive a message. When the client is done sending messages, Receive will
+// return an error that wraps [io.EOF].
+func (b *BidiStream[Req, Res]) Receive() (*Req, error) {
+ var req Req
+ if err := b.conn.Receive(&req); err != nil {
+ return nil, err
+ }
+ return &req, nil
+}
+
+// ResponseHeader returns the response headers. Headers are sent with the first
+// call to Send.
+func (b *BidiStream[Req, Res]) ResponseHeader() http.Header {
+ return b.conn.ResponseHeader()
+}
+
+// ResponseTrailer returns the response trailers. Handlers may write to the
+// response trailers at any time before returning.
+func (b *BidiStream[Req, Res]) ResponseTrailer() http.Header {
+ return b.conn.ResponseTrailer()
+}
+
+// Send a message to the client. The first call to Send also sends the response
+// headers.
+func (b *BidiStream[Req, Res]) Send(msg *Res) error {
+ if msg == nil {
+ return b.conn.Send(nil)
+ }
+ return b.conn.Send(msg)
+}
+
+// Conn exposes the underlying StreamingHandlerConn. This may be useful if
+// you'd prefer to wrap the connection in a different high-level API.
+func (b *BidiStream[Req, Res]) Conn() StreamingHandlerConn {
+ return b.conn
+}
diff --git a/vendor/github.com/bufbuild/connect-go/header.go b/vendor/github.com/bufbuild/connect-go/header.go
new file mode 100644
index 000000000..d0ca7f51c
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/header.go
@@ -0,0 +1,52 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "encoding/base64"
+ "net/http"
+)
+
+// EncodeBinaryHeader base64-encodes the data. It always emits unpadded values.
+//
+// In the Connect, gRPC, and gRPC-Web protocols, binary headers must have keys
+// ending in "-Bin".
+func EncodeBinaryHeader(data []byte) string {
+ // gRPC specification says that implementations should emit unpadded values.
+ return base64.RawStdEncoding.EncodeToString(data)
+}
+
+// DecodeBinaryHeader base64-decodes the data. It can decode padded or unpadded
+// values. Following usual HTTP semantics, multiple base64-encoded values may
+// be joined with a comma. When receiving such comma-separated values, split
+// them with [strings.Split] before calling DecodeBinaryHeader.
+//
+// Binary headers sent using the Connect, gRPC, and gRPC-Web protocols have
+// keys ending in "-Bin".
+func DecodeBinaryHeader(data string) ([]byte, error) {
+ if len(data)%4 != 0 {
+ // Data definitely isn't padded.
+ return base64.RawStdEncoding.DecodeString(data)
+ }
+ // Either the data was padded, or padding wasn't necessary. In both cases,
+ // the padding-aware decoder works.
+ return base64.StdEncoding.DecodeString(data)
+}
+
+func mergeHeaders(into, from http.Header) {
+ for k, vals := range from {
+ into[k] = append(into[k], vals...)
+ }
+}
diff --git a/vendor/github.com/bufbuild/connect-go/interceptor.go b/vendor/github.com/bufbuild/connect-go/interceptor.go
new file mode 100644
index 000000000..b9373683c
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/interceptor.go
@@ -0,0 +1,105 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "context"
+)
+
+// UnaryFunc is the generic signature of a unary RPC. Interceptors may wrap
+// Funcs.
+//
+// The type of the request and response structs depend on the codec being used.
+// When using Protobuf, request.Any() and response.Any() will always be
+// [proto.Message] implementations.
+type UnaryFunc func(context.Context, AnyRequest) (AnyResponse, error)
+
+// StreamingClientFunc is the generic signature of a streaming RPC from the client's
+// perspective. Interceptors may wrap StreamingClientFuncs.
+type StreamingClientFunc func(context.Context, Spec) StreamingClientConn
+
+// StreamingHandlerFunc is the generic signature of a streaming RPC from the
+// handler's perspective. Interceptors may wrap StreamingHandlerFuncs.
+type StreamingHandlerFunc func(context.Context, StreamingHandlerConn) error
+
+// An Interceptor adds logic to a generated handler or client, like the
+// decorators or middleware you may have seen in other libraries. Interceptors
+// may replace the context, mutate requests and responses, handle errors,
+// retry, recover from panics, emit logs and metrics, or do nearly anything
+// else.
+//
+// The returned functions must be safe to call concurrently.
+type Interceptor interface {
+ WrapUnary(UnaryFunc) UnaryFunc
+ WrapStreamingClient(StreamingClientFunc) StreamingClientFunc
+ WrapStreamingHandler(StreamingHandlerFunc) StreamingHandlerFunc
+}
+
+// UnaryInterceptorFunc is a simple Interceptor implementation that only
+// wraps unary RPCs. It has no effect on streaming RPCs.
+type UnaryInterceptorFunc func(UnaryFunc) UnaryFunc
+
+// WrapUnary implements [Interceptor] by applying the interceptor function.
+func (f UnaryInterceptorFunc) WrapUnary(next UnaryFunc) UnaryFunc { return f(next) }
+
+// WrapStreamingClient implements [Interceptor] with a no-op.
+func (f UnaryInterceptorFunc) WrapStreamingClient(next StreamingClientFunc) StreamingClientFunc {
+ return next
+}
+
+// WrapStreamingHandler implements [Interceptor] with a no-op.
+func (f UnaryInterceptorFunc) WrapStreamingHandler(next StreamingHandlerFunc) StreamingHandlerFunc {
+ return next
+}
+
+// A chain composes multiple interceptors into one.
+type chain struct {
+ interceptors []Interceptor
+}
+
+// newChain composes multiple interceptors into one.
+func newChain(interceptors []Interceptor) *chain {
+ // We usually wrap in reverse order to have the first interceptor from
+ // the slice act first. Rather than doing this dance repeatedly, reverse the
+ // interceptor order now.
+ var chain chain
+ for i := len(interceptors) - 1; i >= 0; i-- {
+ if interceptor := interceptors[i]; interceptor != nil {
+ chain.interceptors = append(chain.interceptors, interceptor)
+ }
+ }
+ return &chain
+}
+
+func (c *chain) WrapUnary(next UnaryFunc) UnaryFunc {
+ for _, interceptor := range c.interceptors {
+ next = interceptor.WrapUnary(next)
+ }
+ return next
+}
+
+func (c *chain) WrapStreamingClient(next StreamingClientFunc) StreamingClientFunc {
+ for _, interceptor := range c.interceptors {
+ next = interceptor.WrapStreamingClient(next)
+ }
+ return next
+}
+
+func (c *chain) WrapStreamingHandler(next StreamingHandlerFunc) StreamingHandlerFunc {
+ for _, interceptor := range c.interceptors {
+ next = interceptor.WrapStreamingHandler(next)
+ }
+ return next
+}
diff --git a/vendor/github.com/bufbuild/connect-go/internal/gen/connectext/grpc/status/v1/status.pb.go b/vendor/github.com/bufbuild/connect-go/internal/gen/connectext/grpc/status/v1/status.pb.go
new file mode 100644
index 000000000..39708334e
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/internal/gen/connectext/grpc/status/v1/status.pb.go
@@ -0,0 +1,202 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by protoc-gen-go. DO NOT EDIT.
+// versions:
+// protoc-gen-go v1.28.1
+// protoc (unknown)
+// source: connectext/grpc/status/v1/status.proto
+
+// This package is for internal use by Connect, and provides no backward
+// compatibility guarantees whatsoever.
+
+package statusv1
+
+import (
+ protoreflect "google.golang.org/protobuf/reflect/protoreflect"
+ protoimpl "google.golang.org/protobuf/runtime/protoimpl"
+ anypb "google.golang.org/protobuf/types/known/anypb"
+ reflect "reflect"
+ sync "sync"
+)
+
+const (
+ // Verify that this generated code is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
+ // Verify that runtime/protoimpl is sufficiently up-to-date.
+ _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
+)
+
+// See https://cloud.google.com/apis/design/errors.
+//
+// This struct must remain binary-compatible with
+// https://github.com/googleapis/googleapis/blob/master/google/rpc/status.proto.
+type Status struct {
+ state protoimpl.MessageState
+ sizeCache protoimpl.SizeCache
+ unknownFields protoimpl.UnknownFields
+
+ Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` // a google.rpc.Code
+ Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"` // developer-facing, English (localize in details or client-side)
+ Details []*anypb.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"`
+}
+
+func (x *Status) Reset() {
+ *x = Status{}
+ if protoimpl.UnsafeEnabled {
+ mi := &file_connectext_grpc_status_v1_status_proto_msgTypes[0]
+ ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+ ms.StoreMessageInfo(mi)
+ }
+}
+
+func (x *Status) String() string {
+ return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Status) ProtoMessage() {}
+
+func (x *Status) ProtoReflect() protoreflect.Message {
+ mi := &file_connectext_grpc_status_v1_status_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 Status.ProtoReflect.Descriptor instead.
+func (*Status) Descriptor() ([]byte, []int) {
+ return file_connectext_grpc_status_v1_status_proto_rawDescGZIP(), []int{0}
+}
+
+func (x *Status) GetCode() int32 {
+ if x != nil {
+ return x.Code
+ }
+ return 0
+}
+
+func (x *Status) GetMessage() string {
+ if x != nil {
+ return x.Message
+ }
+ return ""
+}
+
+func (x *Status) GetDetails() []*anypb.Any {
+ if x != nil {
+ return x.Details
+ }
+ return nil
+}
+
+var File_connectext_grpc_status_v1_status_proto protoreflect.FileDescriptor
+
+var file_connectext_grpc_status_v1_status_proto_rawDesc = []byte{
+ 0x0a, 0x26, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x67, 0x72, 0x70,
+ 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x74, 0x61, 0x74,
+ 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x76, 0x31, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
+ 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72,
+ 0x6f, 0x74, 0x6f, 0x22, 0x66, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a,
+ 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64,
+ 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01,
+ 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x64,
+ 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67,
+ 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41,
+ 0x6e, 0x79, 0x52, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0xcb, 0x01, 0x0a, 0x12,
+ 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e,
+ 0x76, 0x31, 0x42, 0x0b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50,
+ 0x01, 0x5a, 0x4e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x62, 0x75,
+ 0x66, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x63, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x2d, 0x67,
+ 0x6f, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x67, 0x65, 0x6e, 0x2f, 0x63,
+ 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x65, 0x78, 0x74, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x2f, 0x73,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x2f, 0x76, 0x31, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x76,
+ 0x31, 0xa2, 0x02, 0x03, 0x47, 0x53, 0x58, 0xaa, 0x02, 0x0e, 0x47, 0x72, 0x70, 0x63, 0x2e, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x56, 0x31, 0xca, 0x02, 0x0e, 0x47, 0x72, 0x70, 0x63, 0x5c,
+ 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5c, 0x56, 0x31, 0xe2, 0x02, 0x1a, 0x47, 0x72, 0x70, 0x63,
+ 0x5c, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x5c, 0x56, 0x31, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65,
+ 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x10, 0x47, 0x72, 0x70, 0x63, 0x3a, 0x3a, 0x53,
+ 0x74, 0x61, 0x74, 0x75, 0x73, 0x3a, 0x3a, 0x56, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
+ 0x33,
+}
+
+var (
+ file_connectext_grpc_status_v1_status_proto_rawDescOnce sync.Once
+ file_connectext_grpc_status_v1_status_proto_rawDescData = file_connectext_grpc_status_v1_status_proto_rawDesc
+)
+
+func file_connectext_grpc_status_v1_status_proto_rawDescGZIP() []byte {
+ file_connectext_grpc_status_v1_status_proto_rawDescOnce.Do(func() {
+ file_connectext_grpc_status_v1_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_connectext_grpc_status_v1_status_proto_rawDescData)
+ })
+ return file_connectext_grpc_status_v1_status_proto_rawDescData
+}
+
+var file_connectext_grpc_status_v1_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
+var file_connectext_grpc_status_v1_status_proto_goTypes = []interface{}{
+ (*Status)(nil), // 0: grpc.status.v1.Status
+ (*anypb.Any)(nil), // 1: google.protobuf.Any
+}
+var file_connectext_grpc_status_v1_status_proto_depIdxs = []int32{
+ 1, // 0: grpc.status.v1.Status.details:type_name -> google.protobuf.Any
+ 1, // [1:1] is the sub-list for method output_type
+ 1, // [1:1] is the sub-list for method input_type
+ 1, // [1:1] is the sub-list for extension type_name
+ 1, // [1:1] is the sub-list for extension extendee
+ 0, // [0:1] is the sub-list for field type_name
+}
+
+func init() { file_connectext_grpc_status_v1_status_proto_init() }
+func file_connectext_grpc_status_v1_status_proto_init() {
+ if File_connectext_grpc_status_v1_status_proto != nil {
+ return
+ }
+ if !protoimpl.UnsafeEnabled {
+ file_connectext_grpc_status_v1_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+ switch v := v.(*Status); 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_connectext_grpc_status_v1_status_proto_rawDesc,
+ NumEnums: 0,
+ NumMessages: 1,
+ NumExtensions: 0,
+ NumServices: 0,
+ },
+ GoTypes: file_connectext_grpc_status_v1_status_proto_goTypes,
+ DependencyIndexes: file_connectext_grpc_status_v1_status_proto_depIdxs,
+ MessageInfos: file_connectext_grpc_status_v1_status_proto_msgTypes,
+ }.Build()
+ File_connectext_grpc_status_v1_status_proto = out.File
+ file_connectext_grpc_status_v1_status_proto_rawDesc = nil
+ file_connectext_grpc_status_v1_status_proto_goTypes = nil
+ file_connectext_grpc_status_v1_status_proto_depIdxs = nil
+}
diff --git a/vendor/github.com/bufbuild/connect-go/maxbytes.go b/vendor/github.com/bufbuild/connect-go/maxbytes.go
new file mode 100644
index 000000000..455dba2ba
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/maxbytes.go
@@ -0,0 +1,32 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 go1.19
+
+package connect
+
+import (
+ "errors"
+ "fmt"
+ "net/http"
+)
+
+func asMaxBytesError(err error, tmpl string, args ...any) *Error {
+ var maxBytesErr *http.MaxBytesError
+ if ok := errors.As(err, &maxBytesErr); !ok {
+ return nil
+ }
+ prefix := fmt.Sprintf(tmpl, args...)
+ return errorf(CodeResourceExhausted, "%s: exceeded %d byte http.MaxBytesReader limit", prefix, maxBytesErr.Limit)
+}
diff --git a/vendor/github.com/bufbuild/connect-go/maxbytes_go118.go b/vendor/github.com/bufbuild/connect-go/maxbytes_go118.go
new file mode 100644
index 000000000..32a3e0228
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/maxbytes_go118.go
@@ -0,0 +1,32 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 !go1.19
+
+package connect
+
+import (
+ "fmt"
+ "strings"
+)
+
+func asMaxBytesError(err error, tmpl string, args ...any) *Error {
+ const expect = "http: request body too large"
+ text := err.Error()
+ if text != expect && !strings.HasSuffix(text, ": "+expect) {
+ return nil
+ }
+ prefix := fmt.Sprintf(tmpl, args...)
+ return errorf(CodeResourceExhausted, "%s: exceeded http.MaxBytesReader limit", prefix)
+}
diff --git a/vendor/github.com/bufbuild/connect-go/option.go b/vendor/github.com/bufbuild/connect-go/option.go
new file mode 100644
index 000000000..7fd2e8ad5
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/option.go
@@ -0,0 +1,478 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "compress/gzip"
+ "context"
+ "io"
+ "net/http"
+)
+
+// A ClientOption configures a [Client].
+//
+// In addition to any options grouped in the documentation below, remember that
+// any [Option] is also a valid ClientOption.
+type ClientOption interface {
+ applyToClient(*clientConfig)
+}
+
+// WithAcceptCompression makes a compression algorithm available to a client.
+// Clients ask servers to compress responses using any of the registered
+// algorithms. The first registered algorithm is treated as the least
+// preferred, and the last registered algorithm is the most preferred.
+//
+// It's safe to use this option liberally: servers will ignore any
+// compression algorithms they don't support. To compress requests, pair this
+// option with [WithSendCompression]. To remove support for a
+// previously-registered compression algorithm, use WithAcceptCompression with
+// nil decompressor and compressor constructors.
+//
+// Clients accept gzipped responses by default, using a compressor backed by the
+// standard library's [gzip] package with the default compression level. Use
+// [WithSendGzip] to compress requests with gzip.
+func WithAcceptCompression(
+ name string,
+ newDecompressor func() Decompressor,
+ newCompressor func() Compressor,
+) ClientOption {
+ if newDecompressor == nil && newCompressor == nil {
+ return &compressionOption{Name: name}
+ }
+ return &compressionOption{
+ Name: name,
+ CompressionPool: newCompressionPool(newDecompressor, newCompressor),
+ }
+}
+
+// WithClientOptions composes multiple ClientOptions into one.
+func WithClientOptions(options ...ClientOption) ClientOption {
+ return &clientOptionsOption{options}
+}
+
+// WithGRPC configures clients to use the HTTP/2 gRPC protocol.
+func WithGRPC() ClientOption {
+ return &grpcOption{web: false}
+}
+
+// WithGRPCWeb configures clients to use the gRPC-Web protocol.
+func WithGRPCWeb() ClientOption {
+ return &grpcOption{web: true}
+}
+
+// WithProtoJSON configures a client to send JSON-encoded data instead of
+// binary Protobuf. It uses the standard Protobuf JSON mapping as implemented
+// by [google.golang.org/protobuf/encoding/protojson]: fields are named using
+// lowerCamelCase, zero values are omitted, missing required fields are errors,
+// enums are emitted as strings, etc.
+func WithProtoJSON() ClientOption {
+ return WithCodec(&protoJSONCodec{codecNameJSON})
+}
+
+// WithSendCompression configures the client to use the specified algorithm to
+// compress request messages. If the algorithm has not been registered using
+// [WithAcceptCompression], the client will return errors at runtime.
+//
+// Because some servers don't support compression, clients default to sending
+// uncompressed requests.
+func WithSendCompression(name string) ClientOption {
+ return &sendCompressionOption{Name: name}
+}
+
+// WithSendGzip configures the client to gzip requests. Since clients have
+// access to a gzip compressor by default, WithSendGzip doesn't require
+// [WithSendCompresion].
+//
+// Some servers don't support gzip, so clients default to sending uncompressed
+// requests.
+func WithSendGzip() ClientOption {
+ return WithSendCompression(compressionGzip)
+}
+
+// A HandlerOption configures a [Handler].
+//
+// In addition to any options grouped in the documentation below, remember that
+// any [Option] is also a HandlerOption.
+type HandlerOption interface {
+ applyToHandler(*handlerConfig)
+}
+
+// WithCompression configures handlers to support a compression algorithm.
+// Clients may send messages compressed with that algorithm and/or request
+// compressed responses. The [Compressor] and [Decompressor] produced by the
+// supplied constructors must use the same algorithm. Internally, Connect pools
+// compressors and decompressors.
+//
+// By default, handlers support gzip using the standard library's
+// [compress/gzip] package at the default compression level.
+//
+// Calling WithCompression with an empty name or nil constructors is a no-op.
+func WithCompression(
+ name string,
+ newDecompressor func() Decompressor,
+ newCompressor func() Compressor,
+) HandlerOption {
+ return &compressionOption{
+ Name: name,
+ CompressionPool: newCompressionPool(newDecompressor, newCompressor),
+ }
+}
+
+// WithHandlerOptions composes multiple HandlerOptions into one.
+func WithHandlerOptions(options ...HandlerOption) HandlerOption {
+ return &handlerOptionsOption{options}
+}
+
+// WithRecover adds an interceptor that recovers from panics. The supplied
+// function receives the context, [Spec], request headers, and the recovered
+// value (which may be nil). It must return an error to send back to the
+// client. It may also log the panic, emit metrics, or execute other
+// error-handling logic. Handler functions must be safe to call concurrently.
+//
+// To preserve compatibility with [net/http]'s semantics, this interceptor
+// doesn't handle panics with [http.ErrAbortHandler].
+//
+// By default, handlers don't recover from panics. Because the standard
+// library's [http.Server] recovers from panics by default, this option isn't
+// usually necessary to prevent crashes. Instead, it helps servers collect
+// RPC-specific data during panics and send a more detailed error to
+// clients.
+func WithRecover(handle func(context.Context, Spec, http.Header, any) error) HandlerOption {
+ return WithInterceptors(&recoverHandlerInterceptor{handle: handle})
+}
+
+// WithRequireConnectProtocolHeader configures the Handler to require requests
+// using the Connect RPC protocol to include the Connect-Protocol-Version
+// header. This ensures that HTTP proxies and net/http middleware can easily
+// identify valid Connect requests, even if they use a common Content-Type like
+// application/json. However, it makes ad-hoc requests with tools like cURL
+// more laborious.
+//
+// This option has no effect if the client uses the gRPC or gRPC-Web protocols.
+func WithRequireConnectProtocolHeader() HandlerOption {
+ return &requireConnectProtocolHeaderOption{}
+}
+
+// Option implements both [ClientOption] and [HandlerOption], so it can be
+// applied both client-side and server-side.
+type Option interface {
+ ClientOption
+ HandlerOption
+}
+
+// WithCodec registers a serialization method with a client or handler.
+// Handlers may have multiple codecs registered, and use whichever the client
+// chooses. Clients may only have a single codec.
+//
+// By default, handlers and clients support binary Protocol Buffer data using
+// [google.golang.org/protobuf/proto]. Handlers also support JSON by default,
+// using the standard Protobuf JSON mapping. Users with more specialized needs
+// may override the default codecs by registering a new codec under the "proto"
+// or "json" names. When supplying a custom "proto" codec, keep in mind that
+// some unexported, protocol-specific messages are serialized using Protobuf -
+// take care to fall back to the standard Protobuf implementation if
+// necessary.
+//
+// Registering a codec with an empty name is a no-op.
+func WithCodec(codec Codec) Option {
+ return &codecOption{Codec: codec}
+}
+
+// WithCompressMinBytes sets a minimum size threshold for compression:
+// regardless of compressor configuration, messages smaller than the configured
+// minimum are sent uncompressed.
+//
+// The default minimum is zero. Setting a minimum compression threshold may
+// improve overall performance, because the CPU cost of compressing very small
+// messages usually isn't worth the small reduction in network I/O.
+func WithCompressMinBytes(min int) Option {
+ return &compressMinBytesOption{Min: min}
+}
+
+// WithReadMaxBytes limits the performance impact of pathologically large
+// messages sent by the other party. For handlers, WithReadMaxBytes limits the size
+// of a message that the client can send. For clients, WithReadMaxBytes limits the
+// size of a message that the server can respond with. Limits apply to each Protobuf
+// message, not to the stream as a whole.
+//
+// Setting WithReadMaxBytes to zero allows any message size. Both clients and
+// handlers default to allowing any request size.
+//
+// Handlers may also use [http.MaxBytesHandler] to limit the total size of the
+// HTTP request stream (rather than the per-message size). Connect handles
+// [http.MaxBytesError] specially, so clients still receive errors with the
+// appropriate error code and informative messages.
+func WithReadMaxBytes(max int) Option {
+ return &readMaxBytesOption{Max: max}
+}
+
+// WithSendMaxBytes prevents sending messages too large for the client/handler
+// to handle without significant performance overhead. For handlers, WithSendMaxBytes
+// limits the size of a message that the handler can respond with. For clients,
+// WithSendMaxBytes limits the size of a message that the client can send. Limits
+// apply to each message, not to the stream as a whole.
+//
+// Setting WithSendMaxBytes to zero allows any message size. Both clients and
+// handlers default to allowing any message size.
+func WithSendMaxBytes(max int) Option {
+ return &sendMaxBytesOption{Max: max}
+}
+
+// WithInterceptors configures a client or handler's interceptor stack. Repeated
+// WithInterceptors options are applied in order, so
+//
+// WithInterceptors(A) + WithInterceptors(B, C) == WithInterceptors(A, B, C)
+//
+// Unary interceptors compose like an onion. The first interceptor provided is
+// the outermost layer of the onion: it acts first on the context and request,
+// and last on the response and error.
+//
+// Stream interceptors also behave like an onion: the first interceptor
+// provided is the outermost wrapper for the [StreamingClientConn] or
+// [StreamingHandlerConn]. It's the first to see sent messages and the last to
+// see received messages.
+//
+// Applied to client and handler, WithInterceptors(A, B, ..., Y, Z) produces:
+//
+// client.Send() client.Receive()
+// | ^
+// v |
+// A --- --- A
+// B --- --- B
+// : ... ... :
+// Y --- --- Y
+// Z --- --- Z
+// | ^
+// v |
+// = = = = = = = = = = = = = = = =
+// network
+// = = = = = = = = = = = = = = = =
+// | ^
+// v |
+// A --- --- A
+// B --- --- B
+// : ... ... :
+// Y --- --- Y
+// Z --- --- Z
+// | ^
+// v |
+// handler.Receive() handler.Send()
+// | ^
+// | |
+// '-> handler logic >-'
+//
+// Note that in clients, Send handles the request message(s) and Receive
+// handles the response message(s). For handlers, it's the reverse. Depending
+// on your interceptor's logic, you may need to wrap one method in clients and
+// the other in handlers.
+func WithInterceptors(interceptors ...Interceptor) Option {
+ return &interceptorsOption{interceptors}
+}
+
+// WithOptions composes multiple Options into one.
+func WithOptions(options ...Option) Option {
+ return &optionsOption{options}
+}
+
+type clientOptionsOption struct {
+ options []ClientOption
+}
+
+func (o *clientOptionsOption) applyToClient(config *clientConfig) {
+ for _, option := range o.options {
+ option.applyToClient(config)
+ }
+}
+
+type codecOption struct {
+ Codec Codec
+}
+
+func (o *codecOption) applyToClient(config *clientConfig) {
+ if o.Codec == nil || o.Codec.Name() == "" {
+ return
+ }
+ config.Codec = o.Codec
+}
+
+func (o *codecOption) applyToHandler(config *handlerConfig) {
+ if o.Codec == nil || o.Codec.Name() == "" {
+ return
+ }
+ config.Codecs[o.Codec.Name()] = o.Codec
+}
+
+type compressionOption struct {
+ Name string
+ CompressionPool *compressionPool
+}
+
+func (o *compressionOption) applyToClient(config *clientConfig) {
+ if o.Name == "" {
+ return
+ }
+ if o.CompressionPool == nil {
+ delete(config.CompressionPools, o.Name)
+ var names []string
+ for _, name := range config.CompressionNames {
+ if name == o.Name {
+ continue
+ }
+ names = append(names, name)
+ }
+ config.CompressionNames = names
+ return
+ }
+ config.CompressionPools[o.Name] = o.CompressionPool
+ config.CompressionNames = append(config.CompressionNames, o.Name)
+}
+
+func (o *compressionOption) applyToHandler(config *handlerConfig) {
+ if o.Name == "" || o.CompressionPool == nil {
+ return
+ }
+ config.CompressionPools[o.Name] = o.CompressionPool
+ config.CompressionNames = append(config.CompressionNames, o.Name)
+}
+
+type compressMinBytesOption struct {
+ Min int
+}
+
+func (o *compressMinBytesOption) applyToClient(config *clientConfig) {
+ config.CompressMinBytes = o.Min
+}
+
+func (o *compressMinBytesOption) applyToHandler(config *handlerConfig) {
+ config.CompressMinBytes = o.Min
+}
+
+type readMaxBytesOption struct {
+ Max int
+}
+
+func (o *readMaxBytesOption) applyToClient(config *clientConfig) {
+ config.ReadMaxBytes = o.Max
+}
+
+func (o *readMaxBytesOption) applyToHandler(config *handlerConfig) {
+ config.ReadMaxBytes = o.Max
+}
+
+type sendMaxBytesOption struct {
+ Max int
+}
+
+func (o *sendMaxBytesOption) applyToClient(config *clientConfig) {
+ config.SendMaxBytes = o.Max
+}
+
+func (o *sendMaxBytesOption) applyToHandler(config *handlerConfig) {
+ config.SendMaxBytes = o.Max
+}
+
+type handlerOptionsOption struct {
+ options []HandlerOption
+}
+
+func (o *handlerOptionsOption) applyToHandler(config *handlerConfig) {
+ for _, option := range o.options {
+ option.applyToHandler(config)
+ }
+}
+
+type requireConnectProtocolHeaderOption struct{}
+
+func (o *requireConnectProtocolHeaderOption) applyToHandler(config *handlerConfig) {
+ config.RequireConnectProtocolHeader = true
+}
+
+type grpcOption struct {
+ web bool
+}
+
+func (o *grpcOption) applyToClient(config *clientConfig) {
+ config.Protocol = &protocolGRPC{web: o.web}
+}
+
+type interceptorsOption struct {
+ Interceptors []Interceptor
+}
+
+func (o *interceptorsOption) applyToClient(config *clientConfig) {
+ config.Interceptor = o.chainWith(config.Interceptor)
+}
+
+func (o *interceptorsOption) applyToHandler(config *handlerConfig) {
+ config.Interceptor = o.chainWith(config.Interceptor)
+}
+
+func (o *interceptorsOption) chainWith(current Interceptor) Interceptor {
+ if len(o.Interceptors) == 0 {
+ return current
+ }
+ if current == nil && len(o.Interceptors) == 1 {
+ return o.Interceptors[0]
+ }
+ if current == nil && len(o.Interceptors) > 1 {
+ return newChain(o.Interceptors)
+ }
+ return newChain(append([]Interceptor{current}, o.Interceptors...))
+}
+
+type optionsOption struct {
+ options []Option
+}
+
+func (o *optionsOption) applyToClient(config *clientConfig) {
+ for _, option := range o.options {
+ option.applyToClient(config)
+ }
+}
+
+func (o *optionsOption) applyToHandler(config *handlerConfig) {
+ for _, option := range o.options {
+ option.applyToHandler(config)
+ }
+}
+
+type sendCompressionOption struct {
+ Name string
+}
+
+func (o *sendCompressionOption) applyToClient(config *clientConfig) {
+ config.RequestCompressionName = o.Name
+}
+
+func withGzip() Option {
+ return &compressionOption{
+ Name: compressionGzip,
+ CompressionPool: newCompressionPool(
+ func() Decompressor { return &gzip.Reader{} },
+ func() Compressor { return gzip.NewWriter(io.Discard) },
+ ),
+ }
+}
+
+func withProtoBinaryCodec() Option {
+ return WithCodec(&protoBinaryCodec{})
+}
+
+func withProtoJSONCodecs() HandlerOption {
+ return WithHandlerOptions(
+ WithCodec(&protoJSONCodec{codecNameJSON}),
+ WithCodec(&protoJSONCodec{codecNameJSONCharsetUTF8}),
+ )
+}
diff --git a/vendor/github.com/bufbuild/connect-go/protobuf_util.go b/vendor/github.com/bufbuild/connect-go/protobuf_util.go
new file mode 100644
index 000000000..b98937b4b
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/protobuf_util.go
@@ -0,0 +1,42 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "strings"
+)
+
+// extractProtoPath returns the trailing portion of the URL's path,
+// corresponding to the Protobuf package, service, and method. It always starts
+// with a slash. Within connect, we use this as (1) Spec.Procedure and (2) the
+// path when mounting handlers on muxes.
+func extractProtoPath(url string) string {
+ segments := strings.Split(url, "/")
+ var pkg, method string
+ if len(segments) > 0 {
+ pkg = segments[0]
+ }
+ if len(segments) > 1 {
+ pkg = segments[len(segments)-2]
+ method = segments[len(segments)-1]
+ }
+ if pkg == "" {
+ return "/"
+ }
+ if method == "" {
+ return "/" + pkg
+ }
+ return "/" + pkg + "/" + method
+}
diff --git a/vendor/github.com/bufbuild/connect-go/protocol.go b/vendor/github.com/bufbuild/connect-go/protocol.go
new file mode 100644
index 000000000..5d2918093
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/protocol.go
@@ -0,0 +1,324 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "mime"
+ "net/http"
+ "net/url"
+ "sort"
+ "strings"
+)
+
+// The names of the Connect, gRPC, and gRPC-Web protocols (as exposed by
+// [Peer.Protocol]). Additional protocols may be added in the future.
+const (
+ ProtocolConnect = "connect"
+ ProtocolGRPC = "grpc"
+ ProtocolGRPCWeb = "grpcweb"
+)
+
+const (
+ headerContentType = "Content-Type"
+ headerUserAgent = "User-Agent"
+
+ discardLimit = 1024 * 1024 * 4 // 4MiB
+)
+
+var errNoTimeout = errors.New("no timeout")
+
+// A Protocol defines the HTTP semantics to use when sending and receiving
+// messages. It ties together codecs, compressors, and net/http to produce
+// Senders and Receivers.
+//
+// For example, connect supports the gRPC protocol using this abstraction. Among
+// many other things, the protocol implementation is responsible for
+// translating timeouts from Go contexts to HTTP and vice versa. For gRPC, it
+// converts timeouts to and from strings (for example, 10*time.Second <->
+// "10S"), and puts those strings into the "Grpc-Timeout" HTTP header. Other
+// protocols might encode durations differently, put them into a different HTTP
+// header, or ignore them entirely.
+//
+// We don't have any short-term plans to export this interface; it's just here
+// to separate the protocol-specific portions of connect from the
+// protocol-agnostic plumbing.
+type protocol interface {
+ NewHandler(*protocolHandlerParams) protocolHandler
+ NewClient(*protocolClientParams) (protocolClient, error)
+}
+
+// HandlerParams are the arguments provided to a Protocol's NewHandler
+// method, bundled into a struct to allow backward-compatible argument
+// additions. Protocol implementations should take care to use the supplied
+// Spec rather than constructing their own, since new fields may have been
+// added.
+type protocolHandlerParams struct {
+ Spec Spec
+ Codecs readOnlyCodecs
+ CompressionPools readOnlyCompressionPools
+ CompressMinBytes int
+ BufferPool *bufferPool
+ ReadMaxBytes int
+ SendMaxBytes int
+ RequireConnectProtocolHeader bool
+}
+
+// Handler is the server side of a protocol. HTTP handlers typically support
+// multiple protocols, codecs, and compressors.
+type protocolHandler interface {
+ // ContentTypes is the set of HTTP Content-Types that the protocol can
+ // handle.
+ ContentTypes() map[string]struct{}
+
+ // SetTimeout runs before NewStream. Implementations may inspect the HTTP
+ // request, parse any timeout set by the client, and return a modified
+ // context and cancellation function.
+ //
+ // If the client didn't send a timeout, SetTimeout should return the
+ // request's context, a nil cancellation function, and a nil error.
+ SetTimeout(*http.Request) (context.Context, context.CancelFunc, error)
+
+ // NewConn constructs a HandlerConn for the message exchange.
+ NewConn(http.ResponseWriter, *http.Request) (handlerConnCloser, bool)
+}
+
+// ClientParams are the arguments provided to a Protocol's NewClient method,
+// bundled into a struct to allow backward-compatible argument additions.
+// Protocol implementations should take care to use the supplied Spec rather
+// than constructing their own, since new fields may have been added.
+type protocolClientParams struct {
+ CompressionName string
+ CompressionPools readOnlyCompressionPools
+ Codec Codec
+ CompressMinBytes int
+ HTTPClient HTTPClient
+ URL string
+ BufferPool *bufferPool
+ ReadMaxBytes int
+ SendMaxBytes int
+ // The gRPC family of protocols always needs access to a Protobuf codec to
+ // marshal and unmarshal errors.
+ Protobuf Codec
+}
+
+// Client is the client side of a protocol. HTTP clients typically use a single
+// protocol, codec, and compressor to send requests.
+type protocolClient interface {
+ // Peer describes the server for the RPC.
+ Peer() Peer
+
+ // WriteRequestHeader writes any protocol-specific request headers.
+ WriteRequestHeader(StreamType, http.Header)
+
+ // NewConn constructs a StreamingClientConn for the message exchange.
+ //
+ // Implementations should assume that the supplied HTTP headers have already
+ // been populated by WriteRequestHeader. When constructing a stream for a
+ // unary call, implementations may assume that the Sender's Send and Close
+ // methods return before the Receiver's Receive or Close methods are called.
+ NewConn(context.Context, Spec, http.Header) StreamingClientConn
+}
+
+// errorTranslatingHandlerConnCloser wraps a handlerConnCloser to ensure that
+// we always return coded errors to users and write coded errors to the
+// network.
+//
+// It's used in protocol implementations.
+type errorTranslatingHandlerConnCloser struct {
+ handlerConnCloser
+
+ toWire func(error) error
+ fromWire func(error) error
+}
+
+func (hc *errorTranslatingHandlerConnCloser) Send(msg any) error {
+ return hc.fromWire(hc.handlerConnCloser.Send(msg))
+}
+
+func (hc *errorTranslatingHandlerConnCloser) Receive(msg any) error {
+ return hc.fromWire(hc.handlerConnCloser.Receive(msg))
+}
+
+func (hc *errorTranslatingHandlerConnCloser) Close(err error) error {
+ closeErr := hc.handlerConnCloser.Close(hc.toWire(err))
+ return hc.fromWire(closeErr)
+}
+
+// errorTranslatingClientConn wraps a StreamingClientConn to make sure that we always
+// return coded errors from clients.
+//
+// It's used in protocol implementations.
+type errorTranslatingClientConn struct {
+ StreamingClientConn
+
+ fromWire func(error) error
+}
+
+func (cc *errorTranslatingClientConn) Send(msg any) error {
+ return cc.fromWire(cc.StreamingClientConn.Send(msg))
+}
+
+func (cc *errorTranslatingClientConn) Receive(msg any) error {
+ return cc.fromWire(cc.StreamingClientConn.Receive(msg))
+}
+
+func (cc *errorTranslatingClientConn) CloseRequest() error {
+ return cc.fromWire(cc.StreamingClientConn.CloseRequest())
+}
+
+func (cc *errorTranslatingClientConn) CloseResponse() error {
+ return cc.fromWire(cc.StreamingClientConn.CloseResponse())
+}
+
+// wrapHandlerConnWithCodedErrors ensures that we (1) automatically code
+// context-related errors correctly when writing them to the network, and (2)
+// return *Errors from all exported APIs.
+func wrapHandlerConnWithCodedErrors(conn handlerConnCloser) handlerConnCloser {
+ return &errorTranslatingHandlerConnCloser{
+ handlerConnCloser: conn,
+ toWire: wrapIfContextError,
+ fromWire: wrapIfUncoded,
+ }
+}
+
+// wrapClientConnWithCodedErrors ensures that we always return *Errors from
+// public APIs.
+func wrapClientConnWithCodedErrors(conn StreamingClientConn) StreamingClientConn {
+ return &errorTranslatingClientConn{
+ StreamingClientConn: conn,
+ fromWire: wrapIfUncoded,
+ }
+}
+
+func sortedAcceptPostValue(handlers []protocolHandler) string {
+ contentTypes := make(map[string]struct{})
+ for _, handler := range handlers {
+ for contentType := range handler.ContentTypes() {
+ contentTypes[contentType] = struct{}{}
+ }
+ }
+ accept := make([]string, 0, len(contentTypes))
+ for ct := range contentTypes {
+ accept = append(accept, ct)
+ }
+ sort.Strings(accept)
+ return strings.Join(accept, ", ")
+}
+
+func isCommaOrSpace(c rune) bool {
+ return c == ',' || c == ' '
+}
+
+func discard(reader io.Reader) error {
+ if lr, ok := reader.(*io.LimitedReader); ok {
+ _, err := io.Copy(io.Discard, lr)
+ return err
+ }
+ // We don't want to get stuck throwing data away forever, so limit how much
+ // we're willing to do here.
+ lr := &io.LimitedReader{R: reader, N: discardLimit}
+ _, err := io.Copy(io.Discard, lr)
+ return err
+}
+
+func validateRequestURL(uri string) *Error {
+ _, err := url.ParseRequestURI(uri)
+ if err == nil {
+ return nil
+ }
+ if !strings.Contains(uri, "://") {
+ // URL doesn't have a scheme, so the user is likely accustomed to
+ // grpc-go's APIs.
+ err = fmt.Errorf(
+ "URL %q missing scheme: use http:// or https:// (unlike grpc-go)",
+ uri,
+ )
+ }
+ return NewError(CodeUnavailable, err)
+}
+
+// negotiateCompression determines and validates the request compression and
+// response compression using the available compressors and protocol-specific
+// Content-Encoding and Accept-Encoding headers.
+func negotiateCompression( //nolint:nonamedreturns
+ availableCompressors readOnlyCompressionPools,
+ sent, accept string,
+) (requestCompression, responseCompression string, clientVisibleErr *Error) {
+ requestCompression = compressionIdentity
+ if sent != "" && sent != compressionIdentity {
+ // We default to identity, so we only care if the client sends something
+ // other than the empty string or compressIdentity.
+ if availableCompressors.Contains(sent) {
+ requestCompression = sent
+ } else {
+ // To comply with
+ // https://github.com/grpc/grpc/blob/master/doc/compression.md and the
+ // Connect protocol, we should return CodeUnimplemented and specify
+ // acceptable compression(s) (in addition to setting the a
+ // protocol-specific accept-encoding header).
+ return "", "", errorf(
+ CodeUnimplemented,
+ "unknown compression %q: supported encodings are %v",
+ sent, availableCompressors.CommaSeparatedNames(),
+ )
+ }
+ }
+ // Support asymmetric compression. This logic follows
+ // https://github.com/grpc/grpc/blob/master/doc/compression.md and common
+ // sense.
+ responseCompression = requestCompression
+ // If we're not already planning to compress the response, check whether the
+ // client requested a compression algorithm we support.
+ if responseCompression == compressionIdentity && accept != "" {
+ for _, name := range strings.FieldsFunc(accept, isCommaOrSpace) {
+ if availableCompressors.Contains(name) {
+ // We found a mutually supported compression algorithm. Unlike standard
+ // HTTP, there's no preference weighting, so can bail out immediately.
+ responseCompression = name
+ break
+ }
+ }
+ }
+ return requestCompression, responseCompression, nil
+}
+
+// checkServerStreamsCanFlush ensures that bidi and server streaming handlers
+// have received an http.ResponseWriter that implements http.Flusher, since
+// they must flush data after sending each message.
+func checkServerStreamsCanFlush(spec Spec, responseWriter http.ResponseWriter) *Error {
+ requiresFlusher := (spec.StreamType & StreamTypeServer) == StreamTypeServer
+ if _, flushable := responseWriter.(http.Flusher); requiresFlusher && !flushable {
+ return NewError(CodeInternal, fmt.Errorf("%T does not implement http.Flusher", responseWriter))
+ }
+ return nil
+}
+
+func flushResponseWriter(w http.ResponseWriter) {
+ if f, ok := w.(http.Flusher); ok {
+ f.Flush()
+ }
+}
+
+func canonicalizeContentType(ct string) string {
+ base, params, err := mime.ParseMediaType(ct)
+ if err != nil {
+ return ct
+ }
+ return mime.FormatMediaType(base, params)
+}
diff --git a/vendor/github.com/bufbuild/connect-go/protocol_connect.go b/vendor/github.com/bufbuild/connect-go/protocol_connect.go
new file mode 100644
index 000000000..fd2e1c12f
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/protocol_connect.go
@@ -0,0 +1,1047 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "bytes"
+ "context"
+ "encoding/base64"
+ "encoding/json"
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "net/http"
+ "runtime"
+ "strconv"
+ "strings"
+ "time"
+
+ "google.golang.org/protobuf/types/known/anypb"
+)
+
+const (
+ connectUnaryHeaderCompression = "Content-Encoding"
+ connectUnaryHeaderAcceptCompression = "Accept-Encoding"
+ connectUnaryTrailerPrefix = "Trailer-"
+ connectStreamingHeaderCompression = "Connect-Content-Encoding"
+ connectStreamingHeaderAcceptCompression = "Connect-Accept-Encoding"
+ connectHeaderTimeout = "Connect-Timeout-Ms"
+ connectHeaderProtocolVersion = "Connect-Protocol-Version"
+ connectProtocolVersion = "1"
+
+ connectFlagEnvelopeEndStream = 0b00000010
+
+ connectUnaryContentTypePrefix = "application/"
+ connectUnaryContentTypeJSON = connectUnaryContentTypePrefix + "json"
+ connectStreamingContentTypePrefix = "application/connect+"
+)
+
+type protocolConnect struct{}
+
+// NewHandler implements protocol, so it must return an interface.
+func (*protocolConnect) NewHandler(params *protocolHandlerParams) protocolHandler {
+ contentTypes := make(map[string]struct{})
+ for _, name := range params.Codecs.Names() {
+ if params.Spec.StreamType == StreamTypeUnary {
+ contentTypes[connectUnaryContentTypePrefix+name] = struct{}{}
+ continue
+ }
+ contentTypes[connectStreamingContentTypePrefix+name] = struct{}{}
+ }
+ return &connectHandler{
+ protocolHandlerParams: *params,
+ accept: contentTypes,
+ }
+}
+
+// NewClient implements protocol, so it must return an interface.
+func (*protocolConnect) NewClient(params *protocolClientParams) (protocolClient, error) {
+ if err := validateRequestURL(params.URL); err != nil {
+ return nil, err
+ }
+ return &connectClient{protocolClientParams: *params}, nil
+}
+
+type connectHandler struct {
+ protocolHandlerParams
+
+ accept map[string]struct{}
+}
+
+func (h *connectHandler) ContentTypes() map[string]struct{} {
+ return h.accept
+}
+
+func (*connectHandler) SetTimeout(request *http.Request) (context.Context, context.CancelFunc, error) {
+ timeout := request.Header.Get(connectHeaderTimeout)
+ if timeout == "" {
+ return request.Context(), nil, nil
+ }
+ if len(timeout) > 10 {
+ return nil, nil, errorf(CodeInvalidArgument, "parse timeout: %q has >10 digits", timeout)
+ }
+ millis, err := strconv.ParseInt(timeout, 10 /* base */, 64 /* bitsize */)
+ if err != nil {
+ return nil, nil, errorf(CodeInvalidArgument, "parse timeout: %w", err)
+ }
+ ctx, cancel := context.WithTimeout(
+ request.Context(),
+ time.Duration(millis)*time.Millisecond,
+ )
+ return ctx, cancel, nil
+}
+
+func (h *connectHandler) NewConn(
+ responseWriter http.ResponseWriter,
+ request *http.Request,
+) (handlerConnCloser, bool) {
+ // We need to parse metadata before entering the interceptor stack; we'll
+ // send the error to the client later on.
+ var contentEncoding, acceptEncoding string
+ if h.Spec.StreamType == StreamTypeUnary {
+ contentEncoding = request.Header.Get(connectUnaryHeaderCompression)
+ acceptEncoding = request.Header.Get(connectUnaryHeaderAcceptCompression)
+ } else {
+ contentEncoding = request.Header.Get(connectStreamingHeaderCompression)
+ acceptEncoding = request.Header.Get(connectStreamingHeaderAcceptCompression)
+ }
+ requestCompression, responseCompression, failed := negotiateCompression(
+ h.CompressionPools,
+ contentEncoding,
+ acceptEncoding,
+ )
+ if failed == nil {
+ failed = checkServerStreamsCanFlush(h.Spec, responseWriter)
+ }
+ if failed == nil {
+ version := request.Header.Get(connectHeaderProtocolVersion)
+ if version == "" && h.RequireConnectProtocolHeader {
+ failed = errorf(CodeInvalidArgument, "missing required header: set %s to %q", connectHeaderProtocolVersion, connectProtocolVersion)
+ } else if version != "" && version != connectProtocolVersion {
+ failed = errorf(CodeInvalidArgument, "%s must be %q: got %q", connectHeaderProtocolVersion, connectProtocolVersion, version)
+ }
+ }
+
+ // Write any remaining headers here:
+ // (1) any writes to the stream will implicitly send the headers, so we
+ // should get all of gRPC's required response headers ready.
+ // (2) interceptors should be able to see these headers.
+ //
+ // Since we know that these header keys are already in canonical form, we can
+ // skip the normalization in Header.Set.
+ header := responseWriter.Header()
+ header[headerContentType] = []string{request.Header.Get(headerContentType)}
+ acceptCompressionHeader := connectUnaryHeaderAcceptCompression
+ if h.Spec.StreamType != StreamTypeUnary {
+ acceptCompressionHeader = connectStreamingHeaderAcceptCompression
+ // We only write the request encoding header here for streaming calls,
+ // since the streaming envelope lets us choose whether to compress each
+ // message individually. For unary, we won't know whether we're compressing
+ // the request until we see how large the payload is.
+ if responseCompression != compressionIdentity {
+ header[connectStreamingHeaderCompression] = []string{responseCompression}
+ }
+ }
+ header[acceptCompressionHeader] = []string{h.CompressionPools.CommaSeparatedNames()}
+
+ codecName := connectCodecFromContentType(
+ h.Spec.StreamType,
+ request.Header.Get(headerContentType),
+ )
+ codec := h.Codecs.Get(codecName) // handler.go guarantees this is not nil
+
+ var conn handlerConnCloser
+ peer := Peer{
+ Addr: request.RemoteAddr,
+ Protocol: ProtocolConnect,
+ }
+ if h.Spec.StreamType == StreamTypeUnary {
+ conn = &connectUnaryHandlerConn{
+ spec: h.Spec,
+ peer: peer,
+ request: request,
+ responseWriter: responseWriter,
+ marshaler: connectUnaryMarshaler{
+ writer: responseWriter,
+ codec: codec,
+ compressMinBytes: h.CompressMinBytes,
+ compressionName: responseCompression,
+ compressionPool: h.CompressionPools.Get(responseCompression),
+ bufferPool: h.BufferPool,
+ header: responseWriter.Header(),
+ sendMaxBytes: h.SendMaxBytes,
+ },
+ unmarshaler: connectUnaryUnmarshaler{
+ reader: request.Body,
+ codec: codec,
+ compressionPool: h.CompressionPools.Get(requestCompression),
+ bufferPool: h.BufferPool,
+ readMaxBytes: h.ReadMaxBytes,
+ },
+ responseTrailer: make(http.Header),
+ }
+ } else {
+ conn = &connectStreamingHandlerConn{
+ spec: h.Spec,
+ peer: peer,
+ request: request,
+ responseWriter: responseWriter,
+ marshaler: connectStreamingMarshaler{
+ envelopeWriter: envelopeWriter{
+ writer: responseWriter,
+ codec: codec,
+ compressMinBytes: h.CompressMinBytes,
+ compressionPool: h.CompressionPools.Get(responseCompression),
+ bufferPool: h.BufferPool,
+ sendMaxBytes: h.SendMaxBytes,
+ },
+ },
+ unmarshaler: connectStreamingUnmarshaler{
+ envelopeReader: envelopeReader{
+ reader: request.Body,
+ codec: codec,
+ compressionPool: h.CompressionPools.Get(requestCompression),
+ bufferPool: h.BufferPool,
+ readMaxBytes: h.ReadMaxBytes,
+ },
+ },
+ responseTrailer: make(http.Header),
+ }
+ }
+ conn = wrapHandlerConnWithCodedErrors(conn)
+
+ if failed != nil {
+ // Negotiation failed, so we can't establish a stream.
+ _ = conn.Close(failed)
+ return nil, false
+ }
+ return conn, true
+}
+
+type connectClient struct {
+ protocolClientParams
+}
+
+func (c *connectClient) Peer() Peer {
+ return newPeerFromURL(c.URL, ProtocolConnect)
+}
+
+func (c *connectClient) WriteRequestHeader(streamType StreamType, header http.Header) {
+ // We know these header keys are in canonical form, so we can bypass all the
+ // checks in Header.Set.
+ header[headerUserAgent] = []string{connectUserAgent()}
+ header[connectHeaderProtocolVersion] = []string{connectProtocolVersion}
+ header[headerContentType] = []string{
+ connectContentTypeFromCodecName(streamType, c.Codec.Name()),
+ }
+ acceptCompressionHeader := connectUnaryHeaderAcceptCompression
+ if streamType != StreamTypeUnary {
+ // If we don't set Accept-Encoding, by default http.Client will ask the
+ // server to compress the whole stream. Since we're already compressing
+ // each message, this is a waste.
+ header[connectUnaryHeaderAcceptCompression] = []string{compressionIdentity}
+ acceptCompressionHeader = connectStreamingHeaderAcceptCompression
+ // We only write the request encoding header here for streaming calls,
+ // since the streaming envelope lets us choose whether to compress each
+ // message individually. For unary, we won't know whether we're compressing
+ // the request until we see how large the payload is.
+ if c.CompressionName != "" && c.CompressionName != compressionIdentity {
+ header[connectStreamingHeaderCompression] = []string{c.CompressionName}
+ }
+ }
+ if acceptCompression := c.CompressionPools.CommaSeparatedNames(); acceptCompression != "" {
+ header[acceptCompressionHeader] = []string{acceptCompression}
+ }
+}
+
+func (c *connectClient) NewConn(
+ ctx context.Context,
+ spec Spec,
+ header http.Header,
+) StreamingClientConn {
+ if deadline, ok := ctx.Deadline(); ok {
+ millis := int64(time.Until(deadline) / time.Millisecond)
+ if millis > 0 {
+ encoded := strconv.FormatInt(millis, 10 /* base */)
+ if len(encoded) <= 10 {
+ header[connectHeaderTimeout] = []string{encoded}
+ } // else effectively unbounded
+ }
+ }
+ duplexCall := newDuplexHTTPCall(ctx, c.HTTPClient, c.URL, spec, header)
+ var conn StreamingClientConn
+ if spec.StreamType == StreamTypeUnary {
+ unaryConn := &connectUnaryClientConn{
+ spec: spec,
+ peer: c.Peer(),
+ duplexCall: duplexCall,
+ compressionPools: c.CompressionPools,
+ bufferPool: c.BufferPool,
+ marshaler: connectUnaryMarshaler{
+ writer: duplexCall,
+ codec: c.Codec,
+ compressMinBytes: c.CompressMinBytes,
+ compressionName: c.CompressionName,
+ compressionPool: c.CompressionPools.Get(c.CompressionName),
+ bufferPool: c.BufferPool,
+ header: duplexCall.Header(),
+ sendMaxBytes: c.SendMaxBytes,
+ },
+ unmarshaler: connectUnaryUnmarshaler{
+ reader: duplexCall,
+ codec: c.Codec,
+ bufferPool: c.BufferPool,
+ readMaxBytes: c.ReadMaxBytes,
+ },
+ responseHeader: make(http.Header),
+ responseTrailer: make(http.Header),
+ }
+ conn = unaryConn
+ duplexCall.SetValidateResponse(unaryConn.validateResponse)
+ } else {
+ streamingConn := &connectStreamingClientConn{
+ spec: spec,
+ peer: c.Peer(),
+ duplexCall: duplexCall,
+ compressionPools: c.CompressionPools,
+ bufferPool: c.BufferPool,
+ codec: c.Codec,
+ marshaler: connectStreamingMarshaler{
+ envelopeWriter: envelopeWriter{
+ writer: duplexCall,
+ codec: c.Codec,
+ compressMinBytes: c.CompressMinBytes,
+ compressionPool: c.CompressionPools.Get(c.CompressionName),
+ bufferPool: c.BufferPool,
+ sendMaxBytes: c.SendMaxBytes,
+ },
+ },
+ unmarshaler: connectStreamingUnmarshaler{
+ envelopeReader: envelopeReader{
+ reader: duplexCall,
+ codec: c.Codec,
+ bufferPool: c.BufferPool,
+ readMaxBytes: c.ReadMaxBytes,
+ },
+ },
+ responseHeader: make(http.Header),
+ responseTrailer: make(http.Header),
+ }
+ conn = streamingConn
+ duplexCall.SetValidateResponse(streamingConn.validateResponse)
+ }
+ return wrapClientConnWithCodedErrors(conn)
+}
+
+type connectUnaryClientConn struct {
+ spec Spec
+ peer Peer
+ duplexCall *duplexHTTPCall
+ compressionPools readOnlyCompressionPools
+ bufferPool *bufferPool
+ marshaler connectUnaryMarshaler
+ unmarshaler connectUnaryUnmarshaler
+ responseHeader http.Header
+ responseTrailer http.Header
+}
+
+func (cc *connectUnaryClientConn) Spec() Spec {
+ return cc.spec
+}
+
+func (cc *connectUnaryClientConn) Peer() Peer {
+ return cc.peer
+}
+
+func (cc *connectUnaryClientConn) Send(msg any) error {
+ if err := cc.marshaler.Marshal(msg); err != nil {
+ return err
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+func (cc *connectUnaryClientConn) RequestHeader() http.Header {
+ return cc.duplexCall.Header()
+}
+
+func (cc *connectUnaryClientConn) CloseRequest() error {
+ return cc.duplexCall.CloseWrite()
+}
+
+func (cc *connectUnaryClientConn) Receive(msg any) error {
+ cc.duplexCall.BlockUntilResponseReady()
+ if err := cc.unmarshaler.Unmarshal(msg); err != nil {
+ return err
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+func (cc *connectUnaryClientConn) ResponseHeader() http.Header {
+ cc.duplexCall.BlockUntilResponseReady()
+ return cc.responseHeader
+}
+
+func (cc *connectUnaryClientConn) ResponseTrailer() http.Header {
+ cc.duplexCall.BlockUntilResponseReady()
+ return cc.responseTrailer
+}
+
+func (cc *connectUnaryClientConn) CloseResponse() error {
+ return cc.duplexCall.CloseRead()
+}
+
+func (cc *connectUnaryClientConn) validateResponse(response *http.Response) *Error {
+ for k, v := range response.Header {
+ if !strings.HasPrefix(k, connectUnaryTrailerPrefix) {
+ cc.responseHeader[k] = v
+ continue
+ }
+ cc.responseTrailer[strings.TrimPrefix(k, connectUnaryTrailerPrefix)] = v
+ }
+ compression := response.Header.Get(connectUnaryHeaderCompression)
+ if compression != "" &&
+ compression != compressionIdentity &&
+ !cc.compressionPools.Contains(compression) {
+ return errorf(
+ CodeInternal,
+ "unknown encoding %q: accepted encodings are %v",
+ compression,
+ cc.compressionPools.CommaSeparatedNames(),
+ )
+ }
+ if response.StatusCode != http.StatusOK {
+ unmarshaler := connectUnaryUnmarshaler{
+ reader: response.Body,
+ compressionPool: cc.compressionPools.Get(compression),
+ bufferPool: cc.bufferPool,
+ }
+ var wireErr connectWireError
+ if err := unmarshaler.UnmarshalFunc(&wireErr, json.Unmarshal); err != nil {
+ return NewError(
+ connectHTTPToCode(response.StatusCode),
+ errors.New(response.Status),
+ )
+ }
+ serverErr := wireErr.asError()
+ if serverErr == nil {
+ return nil
+ }
+ serverErr.meta = cc.responseHeader.Clone()
+ mergeHeaders(serverErr.meta, cc.responseTrailer)
+ return serverErr
+ }
+ cc.unmarshaler.compressionPool = cc.compressionPools.Get(compression)
+ return nil
+}
+
+type connectStreamingClientConn struct {
+ spec Spec
+ peer Peer
+ duplexCall *duplexHTTPCall
+ compressionPools readOnlyCompressionPools
+ bufferPool *bufferPool
+ codec Codec
+ marshaler connectStreamingMarshaler
+ unmarshaler connectStreamingUnmarshaler
+ responseHeader http.Header
+ responseTrailer http.Header
+}
+
+func (cc *connectStreamingClientConn) Spec() Spec {
+ return cc.spec
+}
+
+func (cc *connectStreamingClientConn) Peer() Peer {
+ return cc.peer
+}
+
+func (cc *connectStreamingClientConn) Send(msg any) error {
+ if err := cc.marshaler.Marshal(msg); err != nil {
+ return err
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+func (cc *connectStreamingClientConn) RequestHeader() http.Header {
+ return cc.duplexCall.Header()
+}
+
+func (cc *connectStreamingClientConn) CloseRequest() error {
+ return cc.duplexCall.CloseWrite()
+}
+
+func (cc *connectStreamingClientConn) Receive(msg any) error {
+ cc.duplexCall.BlockUntilResponseReady()
+ err := cc.unmarshaler.Unmarshal(msg)
+ if err == nil {
+ return nil
+ }
+ // See if the server sent an explicit error in the end-of-stream message.
+ mergeHeaders(cc.responseTrailer, cc.unmarshaler.Trailer())
+ if serverErr := cc.unmarshaler.EndStreamError(); serverErr != nil {
+ // This is expected from a protocol perspective, but receiving an
+ // end-of-stream message means that we're _not_ getting a regular message.
+ // For users to realize that the stream has ended, Receive must return an
+ // error.
+ serverErr.meta = cc.responseHeader.Clone()
+ mergeHeaders(serverErr.meta, cc.responseTrailer)
+ cc.duplexCall.SetError(serverErr)
+ return serverErr
+ }
+ // There's no error in the trailers, so this was probably an error
+ // converting the bytes to a message, an error reading from the network, or
+ // just an EOF. We're going to return it to the user, but we also want to
+ // setResponseError so Send errors out.
+ cc.duplexCall.SetError(err)
+ return err
+}
+
+func (cc *connectStreamingClientConn) ResponseHeader() http.Header {
+ cc.duplexCall.BlockUntilResponseReady()
+ return cc.responseHeader
+}
+
+func (cc *connectStreamingClientConn) ResponseTrailer() http.Header {
+ cc.duplexCall.BlockUntilResponseReady()
+ return cc.responseTrailer
+}
+
+func (cc *connectStreamingClientConn) CloseResponse() error {
+ return cc.duplexCall.CloseRead()
+}
+
+func (cc *connectStreamingClientConn) validateResponse(response *http.Response) *Error {
+ if response.StatusCode != http.StatusOK {
+ return errorf(connectHTTPToCode(response.StatusCode), "HTTP status %v", response.Status)
+ }
+ compression := response.Header.Get(connectStreamingHeaderCompression)
+ if compression != "" &&
+ compression != compressionIdentity &&
+ !cc.compressionPools.Contains(compression) {
+ return errorf(
+ CodeInternal,
+ "unknown encoding %q: accepted encodings are %v",
+ compression,
+ cc.compressionPools.CommaSeparatedNames(),
+ )
+ }
+ cc.unmarshaler.compressionPool = cc.compressionPools.Get(compression)
+ mergeHeaders(cc.responseHeader, response.Header)
+ return nil
+}
+
+type connectUnaryHandlerConn struct {
+ spec Spec
+ peer Peer
+ request *http.Request
+ responseWriter http.ResponseWriter
+ marshaler connectUnaryMarshaler
+ unmarshaler connectUnaryUnmarshaler
+ responseTrailer http.Header
+ wroteBody bool
+}
+
+func (hc *connectUnaryHandlerConn) Spec() Spec {
+ return hc.spec
+}
+
+func (hc *connectUnaryHandlerConn) Peer() Peer {
+ return hc.peer
+}
+
+func (hc *connectUnaryHandlerConn) Receive(msg any) error {
+ if err := hc.unmarshaler.Unmarshal(msg); err != nil {
+ return err
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+func (hc *connectUnaryHandlerConn) RequestHeader() http.Header {
+ return hc.request.Header
+}
+
+func (hc *connectUnaryHandlerConn) Send(msg any) error {
+ hc.wroteBody = true
+ hc.writeResponseHeader(nil /* error */)
+ if err := hc.marshaler.Marshal(msg); err != nil {
+ return err
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+func (hc *connectUnaryHandlerConn) ResponseHeader() http.Header {
+ return hc.responseWriter.Header()
+}
+
+func (hc *connectUnaryHandlerConn) ResponseTrailer() http.Header {
+ return hc.responseTrailer
+}
+
+func (hc *connectUnaryHandlerConn) Close(err error) error {
+ if !hc.wroteBody {
+ hc.writeResponseHeader(err)
+ }
+ if err == nil {
+ return hc.request.Body.Close()
+ }
+ // In unary Connect, errors always use application/json.
+ hc.responseWriter.Header().Set(headerContentType, connectUnaryContentTypeJSON)
+ hc.responseWriter.WriteHeader(connectCodeToHTTP(CodeOf(err)))
+ data, marshalErr := json.Marshal(newConnectWireError(err))
+ if marshalErr != nil {
+ _ = hc.request.Body.Close()
+ return errorf(CodeInternal, "marshal error: %w", err)
+ }
+ if _, writeErr := hc.responseWriter.Write(data); writeErr != nil {
+ _ = hc.request.Body.Close()
+ return writeErr
+ }
+ return hc.request.Body.Close()
+}
+
+func (hc *connectUnaryHandlerConn) writeResponseHeader(err error) {
+ header := hc.responseWriter.Header()
+ if err != nil {
+ if connectErr, ok := asError(err); ok {
+ mergeHeaders(header, connectErr.meta)
+ }
+ }
+ for k, v := range hc.responseTrailer {
+ header[connectUnaryTrailerPrefix+k] = v
+ }
+}
+
+type connectStreamingHandlerConn struct {
+ spec Spec
+ peer Peer
+ request *http.Request
+ responseWriter http.ResponseWriter
+ marshaler connectStreamingMarshaler
+ unmarshaler connectStreamingUnmarshaler
+ responseTrailer http.Header
+}
+
+func (hc *connectStreamingHandlerConn) Spec() Spec {
+ return hc.spec
+}
+
+func (hc *connectStreamingHandlerConn) Peer() Peer {
+ return hc.peer
+}
+
+func (hc *connectStreamingHandlerConn) Receive(msg any) error {
+ if err := hc.unmarshaler.Unmarshal(msg); err != nil {
+ // Clients may not send end-of-stream metadata, so we don't need to handle
+ // errSpecialEnvelope.
+ return err
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+func (hc *connectStreamingHandlerConn) RequestHeader() http.Header {
+ return hc.request.Header
+}
+
+func (hc *connectStreamingHandlerConn) Send(msg any) error {
+ defer flushResponseWriter(hc.responseWriter)
+ if err := hc.marshaler.Marshal(msg); err != nil {
+ return err
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+func (hc *connectStreamingHandlerConn) ResponseHeader() http.Header {
+ return hc.responseWriter.Header()
+}
+
+func (hc *connectStreamingHandlerConn) ResponseTrailer() http.Header {
+ return hc.responseTrailer
+}
+
+func (hc *connectStreamingHandlerConn) Close(err error) error {
+ defer flushResponseWriter(hc.responseWriter)
+ if err := hc.marshaler.MarshalEndStream(err, hc.responseTrailer); err != nil {
+ _ = hc.request.Body.Close()
+ return err
+ }
+ // We don't want to copy unread portions of the body to /dev/null here: if
+ // the client hasn't closed the request body, we'll block until the server
+ // timeout kicks in. This could happen because the client is malicious, but
+ // a well-intentioned client may just not expect the server to be returning
+ // an error for a streaming RPC. Better to accept that we can't always reuse
+ // TCP connections.
+ if err := hc.request.Body.Close(); err != nil {
+ if connectErr, ok := asError(err); ok {
+ return connectErr
+ }
+ return NewError(CodeUnknown, err)
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+type connectStreamingMarshaler struct {
+ envelopeWriter
+}
+
+func (m *connectStreamingMarshaler) MarshalEndStream(err error, trailer http.Header) *Error {
+ end := &connectEndStreamMessage{Trailer: trailer}
+ if err != nil {
+ end.Error = newConnectWireError(err)
+ if connectErr, ok := asError(err); ok {
+ mergeHeaders(end.Trailer, connectErr.meta)
+ }
+ }
+ data, marshalErr := json.Marshal(end)
+ if marshalErr != nil {
+ return errorf(CodeInternal, "marshal end stream: %w", marshalErr)
+ }
+ raw := bytes.NewBuffer(data)
+ defer m.envelopeWriter.bufferPool.Put(raw)
+ return m.Write(&envelope{
+ Data: raw,
+ Flags: connectFlagEnvelopeEndStream,
+ })
+}
+
+type connectStreamingUnmarshaler struct {
+ envelopeReader
+
+ endStreamErr *Error
+ trailer http.Header
+}
+
+func (u *connectStreamingUnmarshaler) Unmarshal(message any) *Error {
+ err := u.envelopeReader.Unmarshal(message)
+ if err == nil {
+ return nil
+ }
+ if !errors.Is(err, errSpecialEnvelope) {
+ return err
+ }
+ env := u.envelopeReader.last
+ if !env.IsSet(connectFlagEnvelopeEndStream) {
+ return errorf(CodeInternal, "protocol error: invalid envelope flags %d", env.Flags)
+ }
+ var end connectEndStreamMessage
+ if err := json.Unmarshal(env.Data.Bytes(), &end); err != nil {
+ return errorf(CodeInternal, "unmarshal end stream message: %w", err)
+ }
+ u.trailer = end.Trailer
+ u.endStreamErr = end.Error.asError()
+ return errSpecialEnvelope
+}
+
+func (u *connectStreamingUnmarshaler) Trailer() http.Header {
+ return u.trailer
+}
+
+func (u *connectStreamingUnmarshaler) EndStreamError() *Error {
+ return u.endStreamErr
+}
+
+type connectUnaryMarshaler struct {
+ writer io.Writer
+ codec Codec
+ compressMinBytes int
+ compressionName string
+ compressionPool *compressionPool
+ bufferPool *bufferPool
+ header http.Header
+ sendMaxBytes int
+}
+
+func (m *connectUnaryMarshaler) Marshal(message any) *Error {
+ if message == nil {
+ return m.write(nil)
+ }
+ data, err := m.codec.Marshal(message)
+ if err != nil {
+ return errorf(CodeInternal, "marshal message: %w", err)
+ }
+ // Can't avoid allocating the slice, but we can reuse it.
+ uncompressed := bytes.NewBuffer(data)
+ defer m.bufferPool.Put(uncompressed)
+ if len(data) < m.compressMinBytes || m.compressionPool == nil {
+ if m.sendMaxBytes > 0 && len(data) > m.sendMaxBytes {
+ return NewError(CodeResourceExhausted, fmt.Errorf("message size %d exceeds sendMaxBytes %d", len(data), m.sendMaxBytes))
+ }
+ return m.write(data)
+ }
+ compressed := m.bufferPool.Get()
+ defer m.bufferPool.Put(compressed)
+ if err := m.compressionPool.Compress(compressed, uncompressed); err != nil {
+ return err
+ }
+ if m.sendMaxBytes > 0 && compressed.Len() > m.sendMaxBytes {
+ return NewError(CodeResourceExhausted, fmt.Errorf("compressed message size %d exceeds sendMaxBytes %d", compressed.Len(), m.sendMaxBytes))
+ }
+ m.header.Set(connectUnaryHeaderCompression, m.compressionName)
+ return m.write(compressed.Bytes())
+}
+
+func (m *connectUnaryMarshaler) write(data []byte) *Error {
+ if _, err := m.writer.Write(data); err != nil {
+ if connectErr, ok := asError(err); ok {
+ return connectErr
+ }
+ return errorf(CodeUnknown, "write message: %w", err)
+ }
+ return nil
+}
+
+type connectUnaryUnmarshaler struct {
+ reader io.Reader
+ codec Codec
+ compressionPool *compressionPool
+ bufferPool *bufferPool
+ alreadyRead bool
+ readMaxBytes int
+}
+
+func (u *connectUnaryUnmarshaler) Unmarshal(message any) *Error {
+ return u.UnmarshalFunc(message, u.codec.Unmarshal)
+}
+
+func (u *connectUnaryUnmarshaler) UnmarshalFunc(message any, unmarshal func([]byte, any) error) *Error {
+ if u.alreadyRead {
+ return NewError(CodeInternal, io.EOF)
+ }
+ u.alreadyRead = true
+ data := u.bufferPool.Get()
+ defer u.bufferPool.Put(data)
+ reader := u.reader
+ if u.readMaxBytes > 0 && int64(u.readMaxBytes) < math.MaxInt64 {
+ reader = io.LimitReader(u.reader, int64(u.readMaxBytes)+1)
+ }
+ // ReadFrom ignores io.EOF, so any error here is real.
+ bytesRead, err := data.ReadFrom(reader)
+ if err != nil {
+ if connectErr, ok := asError(err); ok {
+ return connectErr
+ }
+ if readMaxBytesErr := asMaxBytesError(err, "read first %d bytes of message", bytesRead); readMaxBytesErr != nil {
+ return readMaxBytesErr
+ }
+ return errorf(CodeUnknown, "read message: %w", err)
+ }
+ if u.readMaxBytes > 0 && bytesRead > int64(u.readMaxBytes) {
+ // Attempt to read to end in order to allow connection re-use
+ discardedBytes, err := io.Copy(io.Discard, u.reader)
+ if err != nil {
+ return errorf(CodeResourceExhausted, "message is larger than configured max %d - unable to determine message size: %w", u.readMaxBytes, err)
+ }
+ return errorf(CodeResourceExhausted, "message size %d is larger than configured max %d", bytesRead+discardedBytes, u.readMaxBytes)
+ }
+ if data.Len() > 0 && u.compressionPool != nil {
+ decompressed := u.bufferPool.Get()
+ defer u.bufferPool.Put(decompressed)
+ if err := u.compressionPool.Decompress(decompressed, data, int64(u.readMaxBytes)); err != nil {
+ return err
+ }
+ data = decompressed
+ }
+ if err := unmarshal(data.Bytes(), message); err != nil {
+ return errorf(CodeInvalidArgument, "unmarshal into %T: %w", message, err)
+ }
+ return nil
+}
+
+type connectWireDetail ErrorDetail
+
+func (d *connectWireDetail) MarshalJSON() ([]byte, error) {
+ if d.wireJSON != "" {
+ // If we unmarshaled this detail from JSON, return the original data. This
+ // lets proxies w/o protobuf descriptors preserve human-readable details.
+ return []byte(d.wireJSON), nil
+ }
+ wire := struct {
+ Type string `json:"type"`
+ Value string `json:"value"`
+ Debug json.RawMessage `json:"debug,omitempty"`
+ }{
+ Type: strings.TrimPrefix(d.pb.TypeUrl, defaultAnyResolverPrefix),
+ Value: base64.RawStdEncoding.EncodeToString(d.pb.Value),
+ }
+ // Try to produce debug info, but expect failure when we don't have
+ // descriptors.
+ var codec protoJSONCodec
+ debug, err := codec.Marshal(d.pb)
+ if err == nil && len(debug) > 2 { // don't bother sending `{}`
+ wire.Debug = json.RawMessage(debug)
+ }
+ return json.Marshal(wire)
+}
+
+func (d *connectWireDetail) UnmarshalJSON(data []byte) error {
+ var wire struct {
+ Type string `json:"type"`
+ Value string `json:"value"`
+ }
+ if err := json.Unmarshal(data, &wire); err != nil {
+ return err
+ }
+ if !strings.Contains(wire.Type, "/") {
+ wire.Type = defaultAnyResolverPrefix + wire.Type
+ }
+ decoded, err := DecodeBinaryHeader(wire.Value)
+ if err != nil {
+ return fmt.Errorf("decode base64: %w", err)
+ }
+ *d = connectWireDetail{
+ pb: &anypb.Any{
+ TypeUrl: wire.Type,
+ Value: decoded,
+ },
+ wireJSON: string(data),
+ }
+ return nil
+}
+
+type connectWireError struct {
+ Code Code `json:"code"`
+ Message string `json:"message,omitempty"`
+ Details []*connectWireDetail `json:"details,omitempty"`
+}
+
+func newConnectWireError(err error) *connectWireError {
+ wire := &connectWireError{
+ Code: CodeUnknown,
+ Message: err.Error(),
+ }
+ if connectErr, ok := asError(err); ok {
+ wire.Code = connectErr.Code()
+ wire.Message = connectErr.Message()
+ if len(connectErr.details) > 0 {
+ wire.Details = make([]*connectWireDetail, len(connectErr.details))
+ for i, detail := range connectErr.details {
+ wire.Details[i] = (*connectWireDetail)(detail)
+ }
+ }
+ }
+ return wire
+}
+
+func (e *connectWireError) asError() *Error {
+ if e == nil {
+ return nil
+ }
+ if e.Code < minCode || e.Code > maxCode {
+ e.Code = CodeUnknown
+ }
+ err := NewError(e.Code, errors.New(e.Message))
+ err.wireErr = true
+ if len(e.Details) > 0 {
+ err.details = make([]*ErrorDetail, len(e.Details))
+ for i, detail := range e.Details {
+ err.details[i] = (*ErrorDetail)(detail)
+ }
+ }
+ return err
+}
+
+type connectEndStreamMessage struct {
+ Error *connectWireError `json:"error,omitempty"`
+ Trailer http.Header `json:"metadata,omitempty"`
+}
+
+func connectCodeToHTTP(code Code) int {
+ // Return literals rather than named constants from the HTTP package to make
+ // it easier to compare this function to the Connect specification.
+ switch code {
+ case CodeCanceled:
+ return 408
+ case CodeUnknown:
+ return 500
+ case CodeInvalidArgument:
+ return 400
+ case CodeDeadlineExceeded:
+ return 408
+ case CodeNotFound:
+ return 404
+ case CodeAlreadyExists:
+ return 409
+ case CodePermissionDenied:
+ return 403
+ case CodeResourceExhausted:
+ return 429
+ case CodeFailedPrecondition:
+ return 412
+ case CodeAborted:
+ return 409
+ case CodeOutOfRange:
+ return 400
+ case CodeUnimplemented:
+ return 404
+ case CodeInternal:
+ return 500
+ case CodeUnavailable:
+ return 503
+ case CodeDataLoss:
+ return 500
+ case CodeUnauthenticated:
+ return 401
+ default:
+ return 500 // same as CodeUnknown
+ }
+}
+
+func connectHTTPToCode(httpCode int) Code {
+ // As above, literals are easier to compare to the specificaton (vs named
+ // constants).
+ switch httpCode {
+ case 400:
+ return CodeInvalidArgument
+ case 401:
+ return CodeUnauthenticated
+ case 403:
+ return CodePermissionDenied
+ case 404:
+ return CodeUnimplemented
+ case 408:
+ return CodeDeadlineExceeded
+ case 412:
+ return CodeFailedPrecondition
+ case 413:
+ return CodeResourceExhausted
+ case 429:
+ return CodeUnavailable
+ case 431:
+ return CodeResourceExhausted
+ case 502, 503, 504:
+ return CodeUnavailable
+ default:
+ return CodeUnknown
+ }
+}
+
+// connectUserAgent returns a User-Agent string similar to those used in gRPC.
+func connectUserAgent() string {
+ return fmt.Sprintf("connect-go/%s (%s)", Version, runtime.Version())
+}
+
+func connectCodecFromContentType(streamType StreamType, contentType string) string {
+ if streamType == StreamTypeUnary {
+ return strings.TrimPrefix(contentType, connectUnaryContentTypePrefix)
+ }
+ return strings.TrimPrefix(contentType, connectStreamingContentTypePrefix)
+}
+
+func connectContentTypeFromCodecName(streamType StreamType, name string) string {
+ if streamType == StreamTypeUnary {
+ return connectUnaryContentTypePrefix + name
+ }
+ return connectStreamingContentTypePrefix + name
+}
diff --git a/vendor/github.com/bufbuild/connect-go/protocol_grpc.go b/vendor/github.com/bufbuild/connect-go/protocol_grpc.go
new file mode 100644
index 000000000..ec2c0afda
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/protocol_grpc.go
@@ -0,0 +1,910 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "bufio"
+ "context"
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "net/http"
+ "net/textproto"
+ "runtime"
+ "strconv"
+ "strings"
+ "time"
+ "unicode/utf8"
+
+ statusv1 "github.com/bufbuild/connect-go/internal/gen/connectext/grpc/status/v1"
+)
+
+const (
+ grpcHeaderCompression = "Grpc-Encoding"
+ grpcHeaderAcceptCompression = "Grpc-Accept-Encoding"
+ grpcHeaderTimeout = "Grpc-Timeout"
+ grpcHeaderStatus = "Grpc-Status"
+ grpcHeaderMessage = "Grpc-Message"
+ grpcHeaderDetails = "Grpc-Status-Details-Bin"
+
+ grpcFlagEnvelopeTrailer = 0b10000000
+
+ grpcTimeoutMaxHours = math.MaxInt64 / int64(time.Hour) // how many hours fit into a time.Duration?
+ grpcMaxTimeoutChars = 8 // from gRPC protocol
+
+ grpcContentTypeDefault = "application/grpc"
+ grpcWebContentTypeDefault = "application/grpc-web"
+ grpcContentTypePrefix = grpcContentTypeDefault + "+"
+ grpcWebContentTypePrefix = grpcWebContentTypeDefault + "+"
+)
+
+var (
+ grpcTimeoutUnits = []struct {
+ size time.Duration
+ char byte
+ }{
+ {time.Nanosecond, 'n'},
+ {time.Microsecond, 'u'},
+ {time.Millisecond, 'm'},
+ {time.Second, 'S'},
+ {time.Minute, 'M'},
+ {time.Hour, 'H'},
+ }
+ grpcTimeoutUnitLookup = make(map[byte]time.Duration)
+ errTrailersWithoutGRPCStatus = fmt.Errorf("gRPC protocol error: no %s trailer", grpcHeaderStatus)
+)
+
+func init() {
+ for _, pair := range grpcTimeoutUnits {
+ grpcTimeoutUnitLookup[pair.char] = pair.size
+ }
+}
+
+type protocolGRPC struct {
+ web bool
+}
+
+// NewHandler implements protocol, so it must return an interface.
+func (g *protocolGRPC) NewHandler(params *protocolHandlerParams) protocolHandler {
+ bare, prefix := grpcContentTypeDefault, grpcContentTypePrefix
+ if g.web {
+ bare, prefix = grpcWebContentTypeDefault, grpcWebContentTypePrefix
+ }
+ contentTypes := make(map[string]struct{})
+ for _, name := range params.Codecs.Names() {
+ contentTypes[prefix+name] = struct{}{}
+ }
+ if params.Codecs.Get(codecNameProto) != nil {
+ contentTypes[bare] = struct{}{}
+ }
+ return &grpcHandler{
+ protocolHandlerParams: *params,
+ web: g.web,
+ accept: contentTypes,
+ }
+}
+
+// NewClient implements protocol, so it must return an interface.
+func (g *protocolGRPC) NewClient(params *protocolClientParams) (protocolClient, error) {
+ if err := validateRequestURL(params.URL); err != nil {
+ return nil, err
+ }
+ return &grpcClient{
+ protocolClientParams: *params,
+ web: g.web,
+ }, nil
+}
+
+type grpcHandler struct {
+ protocolHandlerParams
+
+ web bool
+ accept map[string]struct{}
+}
+
+func (g *grpcHandler) ContentTypes() map[string]struct{} {
+ return g.accept
+}
+
+func (*grpcHandler) SetTimeout(request *http.Request) (context.Context, context.CancelFunc, error) {
+ timeout, err := grpcParseTimeout(request.Header.Get(grpcHeaderTimeout))
+ if err != nil && !errors.Is(err, errNoTimeout) {
+ // Errors here indicate that the client sent an invalid timeout header, so
+ // the error text is safe to send back.
+ return nil, nil, NewError(CodeInvalidArgument, err)
+ } else if err != nil {
+ // err wraps errNoTimeout, nothing to do.
+ return request.Context(), nil, nil //nolint:nilerr
+ }
+ ctx, cancel := context.WithTimeout(request.Context(), timeout)
+ return ctx, cancel, nil
+}
+
+func (g *grpcHandler) NewConn(
+ responseWriter http.ResponseWriter,
+ request *http.Request,
+) (handlerConnCloser, bool) {
+ // We need to parse metadata before entering the interceptor stack; we'll
+ // send the error to the client later on.
+ requestCompression, responseCompression, failed := negotiateCompression(
+ g.CompressionPools,
+ request.Header.Get(grpcHeaderCompression),
+ request.Header.Get(grpcHeaderAcceptCompression),
+ )
+ if failed == nil {
+ failed = checkServerStreamsCanFlush(g.Spec, responseWriter)
+ }
+
+ // Write any remaining headers here:
+ // (1) any writes to the stream will implicitly send the headers, so we
+ // should get all of gRPC's required response headers ready.
+ // (2) interceptors should be able to see these headers.
+ //
+ // Since we know that these header keys are already in canonical form, we can
+ // skip the normalization in Header.Set.
+ header := responseWriter.Header()
+ header[headerContentType] = []string{request.Header.Get(headerContentType)}
+ header[grpcHeaderAcceptCompression] = []string{g.CompressionPools.CommaSeparatedNames()}
+ if responseCompression != compressionIdentity {
+ header[grpcHeaderCompression] = []string{responseCompression}
+ }
+
+ codecName := grpcCodecFromContentType(g.web, request.Header.Get(headerContentType))
+ codec := g.Codecs.Get(codecName) // handler.go guarantees this is not nil
+ protocolName := ProtocolGRPC
+ if g.web {
+ protocolName = ProtocolGRPCWeb
+ }
+ conn := wrapHandlerConnWithCodedErrors(&grpcHandlerConn{
+ spec: g.Spec,
+ peer: Peer{
+ Addr: request.RemoteAddr,
+ Protocol: protocolName,
+ },
+ web: g.web,
+ bufferPool: g.BufferPool,
+ protobuf: g.Codecs.Protobuf(), // for errors
+ marshaler: grpcMarshaler{
+ envelopeWriter: envelopeWriter{
+ writer: responseWriter,
+ compressionPool: g.CompressionPools.Get(responseCompression),
+ codec: codec,
+ compressMinBytes: g.CompressMinBytes,
+ bufferPool: g.BufferPool,
+ sendMaxBytes: g.SendMaxBytes,
+ },
+ },
+ responseWriter: responseWriter,
+ responseHeader: make(http.Header),
+ responseTrailer: make(http.Header),
+ request: request,
+ unmarshaler: grpcUnmarshaler{
+ envelopeReader: envelopeReader{
+ reader: request.Body,
+ codec: codec,
+ compressionPool: g.CompressionPools.Get(requestCompression),
+ bufferPool: g.BufferPool,
+ readMaxBytes: g.ReadMaxBytes,
+ },
+ web: g.web,
+ },
+ })
+ if failed != nil {
+ // Negotiation failed, so we can't establish a stream.
+ _ = conn.Close(failed)
+ return nil, false
+ }
+ return conn, true
+}
+
+type grpcClient struct {
+ protocolClientParams
+
+ web bool
+}
+
+func (g *grpcClient) Peer() Peer {
+ if g.web {
+ return newPeerFromURL(g.URL, ProtocolGRPCWeb)
+ }
+ return newPeerFromURL(g.URL, ProtocolGRPC)
+}
+
+func (g *grpcClient) WriteRequestHeader(_ StreamType, header http.Header) {
+ // We know these header keys are in canonical form, so we can bypass all the
+ // checks in Header.Set.
+ header[headerUserAgent] = []string{grpcUserAgent()}
+ header[headerContentType] = []string{grpcContentTypeFromCodecName(g.web, g.Codec.Name())}
+ // gRPC handles compression on a per-message basis, so we don't want to
+ // compress the whole stream. By default, http.Client will ask the server
+ // to gzip the stream if we don't set Accept-Encoding.
+ header["Accept-Encoding"] = []string{compressionIdentity}
+ if g.CompressionName != "" && g.CompressionName != compressionIdentity {
+ header[grpcHeaderCompression] = []string{g.CompressionName}
+ }
+ if acceptCompression := g.CompressionPools.CommaSeparatedNames(); acceptCompression != "" {
+ header[grpcHeaderAcceptCompression] = []string{acceptCompression}
+ }
+ if !g.web {
+ // The gRPC-HTTP2 specification requires this - it flushes out proxies that
+ // don't support HTTP trailers.
+ header["Te"] = []string{"trailers"}
+ }
+}
+
+func (g *grpcClient) NewConn(
+ ctx context.Context,
+ spec Spec,
+ header http.Header,
+) StreamingClientConn {
+ if deadline, ok := ctx.Deadline(); ok {
+ if encodedDeadline, err := grpcEncodeTimeout(time.Until(deadline)); err == nil {
+ // Tests verify that the error in encodeTimeout is unreachable, so we
+ // don't need to handle the error case.
+ header[grpcHeaderTimeout] = []string{encodedDeadline}
+ }
+ }
+ duplexCall := newDuplexHTTPCall(
+ ctx,
+ g.HTTPClient,
+ g.URL,
+ spec,
+ header,
+ )
+ conn := &grpcClientConn{
+ spec: spec,
+ peer: g.Peer(),
+ duplexCall: duplexCall,
+ compressionPools: g.CompressionPools,
+ bufferPool: g.BufferPool,
+ protobuf: g.Protobuf,
+ marshaler: grpcMarshaler{
+ envelopeWriter: envelopeWriter{
+ writer: duplexCall,
+ compressionPool: g.CompressionPools.Get(g.CompressionName),
+ codec: g.Codec,
+ compressMinBytes: g.CompressMinBytes,
+ bufferPool: g.BufferPool,
+ sendMaxBytes: g.SendMaxBytes,
+ },
+ },
+ unmarshaler: grpcUnmarshaler{
+ envelopeReader: envelopeReader{
+ reader: duplexCall,
+ codec: g.Codec,
+ bufferPool: g.BufferPool,
+ readMaxBytes: g.ReadMaxBytes,
+ },
+ },
+ responseHeader: make(http.Header),
+ responseTrailer: make(http.Header),
+ }
+ duplexCall.SetValidateResponse(conn.validateResponse)
+ if g.web {
+ conn.unmarshaler.web = true
+ conn.readTrailers = func(unmarshaler *grpcUnmarshaler, _ *duplexHTTPCall) http.Header {
+ return unmarshaler.WebTrailer()
+ }
+ } else {
+ conn.readTrailers = func(_ *grpcUnmarshaler, call *duplexHTTPCall) http.Header {
+ // To access HTTP trailers, we need to read the body to EOF.
+ _ = discard(call)
+ return call.ResponseTrailer()
+ }
+ }
+ return wrapClientConnWithCodedErrors(conn)
+}
+
+// grpcClientConn works for both gRPC and gRPC-Web.
+type grpcClientConn struct {
+ spec Spec
+ peer Peer
+ duplexCall *duplexHTTPCall
+ compressionPools readOnlyCompressionPools
+ bufferPool *bufferPool
+ protobuf Codec // for errors
+ marshaler grpcMarshaler
+ unmarshaler grpcUnmarshaler
+ responseHeader http.Header
+ responseTrailer http.Header
+ readTrailers func(*grpcUnmarshaler, *duplexHTTPCall) http.Header
+}
+
+func (cc *grpcClientConn) Spec() Spec {
+ return cc.spec
+}
+
+func (cc *grpcClientConn) Peer() Peer {
+ return cc.peer
+}
+
+func (cc *grpcClientConn) Send(msg any) error {
+ if err := cc.marshaler.Marshal(msg); err != nil {
+ return err
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+func (cc *grpcClientConn) RequestHeader() http.Header {
+ return cc.duplexCall.Header()
+}
+
+func (cc *grpcClientConn) CloseRequest() error {
+ return cc.duplexCall.CloseWrite()
+}
+
+func (cc *grpcClientConn) Receive(msg any) error {
+ cc.duplexCall.BlockUntilResponseReady()
+ err := cc.unmarshaler.Unmarshal(msg)
+ if err == nil {
+ return nil
+ }
+ if cc.responseHeader.Get(grpcHeaderStatus) != "" {
+ // We got what gRPC calls a trailers-only response, which puts the trailing
+ // metadata (including errors) into HTTP headers. validateResponse has
+ // already extracted the error.
+ return err
+ }
+ // See if the server sent an explicit error in the HTTP or gRPC-Web trailers.
+ mergeHeaders(
+ cc.responseTrailer,
+ cc.readTrailers(&cc.unmarshaler, cc.duplexCall),
+ )
+ serverErr := grpcErrorFromTrailer(cc.bufferPool, cc.protobuf, cc.responseTrailer)
+ if serverErr != nil && (errors.Is(err, io.EOF) || !errors.Is(serverErr, errTrailersWithoutGRPCStatus)) {
+ // We've either:
+ // - Cleanly read until the end of the response body and *not* received
+ // gRPC status trailers, which is a protocol error, or
+ // - Received an explicit error from the server.
+ //
+ // This is expected from a protocol perspective, but receiving trailers
+ // means that we're _not_ getting a message. For users to realize that
+ // the stream has ended, Receive must return an error.
+ serverErr.meta = cc.responseHeader.Clone()
+ mergeHeaders(serverErr.meta, cc.responseTrailer)
+ cc.duplexCall.SetError(serverErr)
+ return serverErr
+ }
+ // This was probably an error converting the bytes to a message or an error
+ // reading from the network. We're going to return it to the
+ // user, but we also want to setResponseError so Send errors out.
+ cc.duplexCall.SetError(err)
+ return err
+}
+
+func (cc *grpcClientConn) ResponseHeader() http.Header {
+ cc.duplexCall.BlockUntilResponseReady()
+ return cc.responseHeader
+}
+
+func (cc *grpcClientConn) ResponseTrailer() http.Header {
+ cc.duplexCall.BlockUntilResponseReady()
+ return cc.responseTrailer
+}
+
+func (cc *grpcClientConn) CloseResponse() error {
+ return cc.duplexCall.CloseRead()
+}
+
+func (cc *grpcClientConn) validateResponse(response *http.Response) *Error {
+ if err := grpcValidateResponse(
+ response,
+ cc.responseHeader,
+ cc.responseTrailer,
+ cc.compressionPools,
+ cc.bufferPool,
+ cc.protobuf,
+ ); err != nil {
+ return err
+ }
+ compression := response.Header.Get(grpcHeaderCompression)
+ cc.unmarshaler.envelopeReader.compressionPool = cc.compressionPools.Get(compression)
+ return nil
+}
+
+type grpcHandlerConn struct {
+ spec Spec
+ peer Peer
+ web bool
+ bufferPool *bufferPool
+ protobuf Codec // for errors
+ marshaler grpcMarshaler
+ responseWriter http.ResponseWriter
+ responseHeader http.Header
+ responseTrailer http.Header
+ wroteToBody bool
+ request *http.Request
+ unmarshaler grpcUnmarshaler
+}
+
+func (hc *grpcHandlerConn) Spec() Spec {
+ return hc.spec
+}
+
+func (hc *grpcHandlerConn) Peer() Peer {
+ return hc.peer
+}
+
+func (hc *grpcHandlerConn) Receive(msg any) error {
+ if err := hc.unmarshaler.Unmarshal(msg); err != nil {
+ return err // already coded
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+func (hc *grpcHandlerConn) RequestHeader() http.Header {
+ return hc.request.Header
+}
+
+func (hc *grpcHandlerConn) Send(msg any) error {
+ defer flushResponseWriter(hc.responseWriter)
+ if !hc.wroteToBody {
+ mergeHeaders(hc.responseWriter.Header(), hc.responseHeader)
+ hc.wroteToBody = true
+ }
+ if err := hc.marshaler.Marshal(msg); err != nil {
+ return err
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+}
+
+func (hc *grpcHandlerConn) ResponseHeader() http.Header {
+ return hc.responseHeader
+}
+
+func (hc *grpcHandlerConn) ResponseTrailer() http.Header {
+ return hc.responseTrailer
+}
+
+func (hc *grpcHandlerConn) Close(err error) (retErr error) {
+ defer func() {
+ // We don't want to copy unread portions of the body to /dev/null here: if
+ // the client hasn't closed the request body, we'll block until the server
+ // timeout kicks in. This could happen because the client is malicious, but
+ // a well-intentioned client may just not expect the server to be returning
+ // an error for a streaming RPC. Better to accept that we can't always reuse
+ // TCP connections.
+ closeErr := hc.request.Body.Close()
+ if retErr == nil {
+ retErr = closeErr
+ }
+ }()
+ defer flushResponseWriter(hc.responseWriter)
+ // If we haven't written the headers yet, do so.
+ if !hc.wroteToBody {
+ mergeHeaders(hc.responseWriter.Header(), hc.responseHeader)
+ }
+ // gRPC always sends the error's code, message, details, and metadata as
+ // trailing metadata. The Connect protocol doesn't do this, so we don't want
+ // to mutate the trailers map that the user sees.
+ mergedTrailers := make(
+ http.Header,
+ len(hc.responseTrailer)+2, // always make space for status & message
+ )
+ mergeHeaders(mergedTrailers, hc.responseTrailer)
+ grpcErrorToTrailer(hc.bufferPool, mergedTrailers, hc.protobuf, err)
+ if hc.web && !hc.wroteToBody {
+ // We're using gRPC-Web and we haven't yet written to the body. Since we're
+ // not sending any response messages, the gRPC specification calls this a
+ // "trailers-only" response. Under those circumstances, the gRPC-Web spec
+ // says that implementations _may_ send trailing metadata as HTTP headers
+ // instead. Envoy is the canonical implementation of the gRPC-Web protocol,
+ // so we emulate Envoy's behavior and put the trailing metadata in the HTTP
+ // headers.
+ mergeHeaders(hc.responseWriter.Header(), mergedTrailers)
+ return nil
+ }
+ if hc.web {
+ // We're using gRPC-Web and we've already sent the headers, so we write
+ // trailing metadata to the HTTP body.
+ if err := hc.marshaler.MarshalWebTrailers(mergedTrailers); err != nil {
+ return err
+ }
+ return nil // must be a literal nil: nil *Error is a non-nil error
+ }
+ // We're using standard gRPC. Even if we haven't written to the body and
+ // we're sending a "trailers-only" response, we must send trailing metadata
+ // as HTTP trailers. (If we had frame-level control of the HTTP/2 layer, we
+ // could send trailers-only responses as a single HEADER frame and no DATA
+ // frames, but net/http doesn't expose APIs that low-level.)
+ if !hc.wroteToBody {
+ // This block works around a bug in x/net/http2. Until Go 1.20, trailers
+ // written using http.TrailerPrefix were only sent if either (1) there's
+ // data in the body, or (2) the innermost http.ResponseWriter is flushed.
+ // To ensure that we always send a valid gRPC response, even if the user
+ // has wrapped the response writer in net/http middleware that doesn't
+ // implement http.Flusher, we must pre-declare our HTTP trailers. We can
+ // remove this when Go 1.21 ships and we drop support for Go 1.19.
+ for key := range mergedTrailers {
+ hc.responseWriter.Header().Add("Trailer", key)
+ }
+ hc.responseWriter.WriteHeader(http.StatusOK)
+ for key, values := range mergedTrailers {
+ for _, value := range values {
+ hc.responseWriter.Header().Add(key, value)
+ }
+ }
+ return nil
+ }
+ // In net/http's ResponseWriter API, we send HTTP trailers by writing to the
+ // headers map with a special prefix. This prefixing is an implementation
+ // detail, so we should hide it and _not_ mutate the user-visible headers.
+ //
+ // Note that this is _very_ finicky and difficult to test with net/http,
+ // since correctness depends on low-level framing details. Breaking this
+ // logic breaks Envoy's gRPC-Web translation.
+ for key, values := range mergedTrailers {
+ for _, value := range values {
+ hc.responseWriter.Header().Add(http.TrailerPrefix+key, value)
+ }
+ }
+ return nil
+}
+
+type grpcMarshaler struct {
+ envelopeWriter
+}
+
+func (m *grpcMarshaler) MarshalWebTrailers(trailer http.Header) *Error {
+ raw := m.envelopeWriter.bufferPool.Get()
+ defer m.envelopeWriter.bufferPool.Put(raw)
+ if err := trailer.Write(raw); err != nil {
+ return errorf(CodeInternal, "format trailers: %w", err)
+ }
+ return m.Write(&envelope{
+ Data: raw,
+ Flags: grpcFlagEnvelopeTrailer,
+ })
+}
+
+type grpcUnmarshaler struct {
+ envelopeReader envelopeReader
+ web bool
+ webTrailer http.Header
+}
+
+func (u *grpcUnmarshaler) Unmarshal(message any) *Error {
+ err := u.envelopeReader.Unmarshal(message)
+ if err == nil {
+ return nil
+ }
+ if !errors.Is(err, errSpecialEnvelope) {
+ return err
+ }
+ env := u.envelopeReader.last
+ if !u.web || !env.IsSet(grpcFlagEnvelopeTrailer) {
+ return errorf(CodeInternal, "protocol error: invalid envelope flags %d", env.Flags)
+ }
+
+ // Per the gRPC-Web specification, trailers should be encoded as an HTTP/1
+ // headers block _without_ the terminating newline. To make the headers
+ // parseable by net/textproto, we need to add the newline.
+ if err := env.Data.WriteByte('\n'); err != nil {
+ return errorf(CodeInternal, "unmarshal web trailers: %w", err)
+ }
+ bufferedReader := bufio.NewReader(env.Data)
+ mimeReader := textproto.NewReader(bufferedReader)
+ mimeHeader, mimeErr := mimeReader.ReadMIMEHeader()
+ if mimeErr != nil {
+ return errorf(
+ CodeInternal,
+ "gRPC-Web protocol error: trailers invalid: %w",
+ mimeErr,
+ )
+ }
+ u.webTrailer = http.Header(mimeHeader)
+ return errSpecialEnvelope
+}
+
+func (u *grpcUnmarshaler) WebTrailer() http.Header {
+ return u.webTrailer
+}
+
+func grpcValidateResponse(
+ response *http.Response,
+ header, trailer http.Header,
+ availableCompressors readOnlyCompressionPools,
+ bufferPool *bufferPool,
+ protobuf Codec,
+) *Error {
+ if response.StatusCode != http.StatusOK {
+ return errorf(grpcHTTPToCode(response.StatusCode), "HTTP status %v", response.Status)
+ }
+ if compression := response.Header.Get(grpcHeaderCompression); compression != "" &&
+ compression != compressionIdentity &&
+ !availableCompressors.Contains(compression) {
+ // Per https://github.com/grpc/grpc/blob/master/doc/compression.md, we
+ // should return CodeInternal and specify acceptable compression(s) (in
+ // addition to setting the Grpc-Accept-Encoding header).
+ return errorf(
+ CodeInternal,
+ "unknown encoding %q: accepted encodings are %v",
+ compression,
+ availableCompressors.CommaSeparatedNames(),
+ )
+ }
+ // When there's no body, gRPC and gRPC-Web servers may send error information
+ // in the HTTP headers.
+ if err := grpcErrorFromTrailer(
+ bufferPool,
+ protobuf,
+ response.Header,
+ ); err != nil && !errors.Is(err, errTrailersWithoutGRPCStatus) {
+ // Per the specification, only the HTTP status code and Content-Type should
+ // be treated as headers. The rest should be treated as trailing metadata.
+ if contentType := response.Header.Get(headerContentType); contentType != "" {
+ header.Set(headerContentType, contentType)
+ }
+ mergeHeaders(trailer, response.Header)
+ trailer.Del(headerContentType)
+ // Also set the error metadata
+ err.meta = header.Clone()
+ mergeHeaders(err.meta, trailer)
+ return err
+ }
+ // The response is valid, so we should expose the headers.
+ mergeHeaders(header, response.Header)
+ return nil
+}
+
+func grpcHTTPToCode(httpCode int) Code {
+ // https://github.com/grpc/grpc/blob/master/doc/http-grpc-status-mapping.md
+ // Note that this is not just the inverse of the gRPC-to-HTTP mapping.
+ switch httpCode {
+ case 400:
+ return CodeInternal
+ case 401:
+ return CodeUnauthenticated
+ case 403:
+ return CodePermissionDenied
+ case 404:
+ return CodeUnimplemented
+ case 429:
+ return CodeUnavailable
+ case 502, 503, 504:
+ return CodeUnavailable
+ default:
+ return CodeUnknown
+ }
+}
+
+// The gRPC wire protocol specifies that errors should be serialized using the
+// binary Protobuf format, even if the messages in the request/response stream
+// use a different codec. Consequently, this function needs a Protobuf codec to
+// unmarshal error information in the headers.
+func grpcErrorFromTrailer(bufferPool *bufferPool, protobuf Codec, trailer http.Header) *Error {
+ codeHeader := trailer.Get(grpcHeaderStatus)
+ if codeHeader == "" {
+ return NewError(CodeInternal, errTrailersWithoutGRPCStatus)
+ }
+ if codeHeader == "0" {
+ return nil
+ }
+
+ code, err := strconv.ParseUint(codeHeader, 10 /* base */, 32 /* bitsize */)
+ if err != nil {
+ return errorf(CodeInternal, "gRPC protocol error: invalid error code %q", codeHeader)
+ }
+ message := grpcPercentDecode(bufferPool, trailer.Get(grpcHeaderMessage))
+ retErr := NewError(Code(code), errors.New(message))
+ retErr.wireErr = true
+
+ detailsBinaryEncoded := trailer.Get(grpcHeaderDetails)
+ if len(detailsBinaryEncoded) > 0 {
+ detailsBinary, err := DecodeBinaryHeader(detailsBinaryEncoded)
+ if err != nil {
+ return errorf(CodeInternal, "server returned invalid grpc-status-details-bin trailer: %w", err)
+ }
+ var status statusv1.Status
+ if err := protobuf.Unmarshal(detailsBinary, &status); err != nil {
+ return errorf(CodeInternal, "server returned invalid protobuf for error details: %w", err)
+ }
+ for _, d := range status.Details {
+ retErr.details = append(retErr.details, &ErrorDetail{pb: d})
+ }
+ // Prefer the Protobuf-encoded data to the headers (grpc-go does this too).
+ retErr.code = Code(status.Code)
+ retErr.err = errors.New(status.Message)
+ }
+
+ return retErr
+}
+
+func grpcParseTimeout(timeout string) (time.Duration, error) {
+ if timeout == "" {
+ return 0, errNoTimeout
+ }
+ unit, ok := grpcTimeoutUnitLookup[timeout[len(timeout)-1]]
+ if !ok {
+ return 0, fmt.Errorf("gRPC protocol error: timeout %q has invalid unit", timeout)
+ }
+ num, err := strconv.ParseInt(timeout[:len(timeout)-1], 10 /* base */, 64 /* bitsize */)
+ if err != nil || num < 0 {
+ return 0, fmt.Errorf("gRPC protocol error: invalid timeout %q", timeout)
+ }
+ if num > 99999999 { // timeout must be ASCII string of at most 8 digits
+ return 0, fmt.Errorf("gRPC protocol error: timeout %q is too long", timeout)
+ }
+ if unit == time.Hour && num > grpcTimeoutMaxHours {
+ // Timeout is effectively unbounded, so ignore it. The grpc-go
+ // implementation does the same thing.
+ return 0, errNoTimeout
+ }
+ return time.Duration(num) * unit, nil
+}
+
+func grpcEncodeTimeout(timeout time.Duration) (string, error) {
+ if timeout <= 0 {
+ return "0n", nil
+ }
+ for _, pair := range grpcTimeoutUnits {
+ digits := strconv.FormatInt(int64(timeout/pair.size), 10 /* base */)
+ if len(digits) < grpcMaxTimeoutChars {
+ return digits + string(pair.char), nil
+ }
+ }
+ // The max time.Duration is smaller than the maximum expressible gRPC
+ // timeout, so we can't reach this case.
+ return "", errNoTimeout
+}
+
+// grpcUserAgent follows
+// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#user-agents:
+//
+// While the protocol does not require a user-agent to function it is recommended
+// that clients provide a structured user-agent string that provides a basic
+// description of the calling library, version & platform to facilitate issue diagnosis
+// in heterogeneous environments. The following structure is recommended to library developers:
+//
+// User-Agent → "grpc-" Language ?("-" Variant) "/" Version ?( " (" *(AdditionalProperty ";") ")" )
+func grpcUserAgent() string {
+ return fmt.Sprintf("grpc-go-connect/%s (%s)", Version, runtime.Version())
+}
+
+func grpcCodecFromContentType(web bool, contentType string) string {
+ if (!web && contentType == grpcContentTypeDefault) || (web && contentType == grpcWebContentTypeDefault) {
+ // implicitly protobuf
+ return codecNameProto
+ }
+ prefix := grpcContentTypePrefix
+ if web {
+ prefix = grpcWebContentTypePrefix
+ }
+ return strings.TrimPrefix(contentType, prefix)
+}
+
+func grpcContentTypeFromCodecName(web bool, name string) string {
+ if web {
+ return grpcWebContentTypePrefix + name
+ }
+ return grpcContentTypePrefix + name
+}
+
+func grpcErrorToTrailer(bufferPool *bufferPool, trailer http.Header, protobuf Codec, err error) {
+ if err == nil {
+ trailer.Set(grpcHeaderStatus, "0") // zero is the gRPC OK status
+ trailer.Set(grpcHeaderMessage, "")
+ return
+ }
+ status := grpcStatusFromError(err)
+ code := strconv.Itoa(int(status.Code))
+ bin, binErr := protobuf.Marshal(status)
+ if binErr != nil {
+ trailer.Set(
+ grpcHeaderStatus,
+ strconv.FormatInt(int64(CodeInternal), 10 /* base */),
+ )
+ trailer.Set(
+ grpcHeaderMessage,
+ grpcPercentEncode(
+ bufferPool,
+ fmt.Sprintf("marshal protobuf status: %v", binErr),
+ ),
+ )
+ return
+ }
+ if connectErr, ok := asError(err); ok {
+ mergeHeaders(trailer, connectErr.meta)
+ }
+ trailer.Set(grpcHeaderStatus, code)
+ trailer.Set(grpcHeaderMessage, grpcPercentEncode(bufferPool, status.Message))
+ trailer.Set(grpcHeaderDetails, EncodeBinaryHeader(bin))
+}
+
+func grpcStatusFromError(err error) *statusv1.Status {
+ status := &statusv1.Status{
+ Code: int32(CodeUnknown),
+ Message: err.Error(),
+ }
+ if connectErr, ok := asError(err); ok {
+ status.Code = int32(connectErr.Code())
+ status.Message = connectErr.Message()
+ status.Details = connectErr.detailsAsAny()
+ }
+ return status
+}
+
+// grpcPercentEncode follows RFC 3986 Section 2.1 and the gRPC HTTP/2 spec.
+// It's a variant of URL-encoding with fewer reserved characters. It's intended
+// to take UTF-8 encoded text and escape non-ASCII bytes so that they're valid
+// HTTP/1 headers, while still maximizing readability of the data on the wire.
+//
+// The grpc-message trailer (used for human-readable error messages) should be
+// percent-encoded.
+//
+// References:
+//
+// https://github.com/grpc/grpc/blob/master/doc/PROTOCOL-HTTP2.md#responses
+// https://datatracker.ietf.org/doc/html/rfc3986#section-2.1
+func grpcPercentEncode(bufferPool *bufferPool, msg string) string {
+ for i := 0; i < len(msg); i++ {
+ // Characters that need to be escaped are defined in gRPC's HTTP/2 spec.
+ // They're different from the generic set defined in RFC 3986.
+ if c := msg[i]; c < ' ' || c > '~' || c == '%' {
+ return grpcPercentEncodeSlow(bufferPool, msg, i)
+ }
+ }
+ return msg
+}
+
+// msg needs some percent-escaping. Bytes before offset don't require
+// percent-encoding, so they can be copied to the output as-is.
+func grpcPercentEncodeSlow(bufferPool *bufferPool, msg string, offset int) string {
+ out := bufferPool.Get()
+ defer bufferPool.Put(out)
+ out.WriteString(msg[:offset])
+ for i := offset; i < len(msg); i++ {
+ c := msg[i]
+ if c < ' ' || c > '~' || c == '%' {
+ out.WriteString(fmt.Sprintf("%%%02X", c))
+ continue
+ }
+ out.WriteByte(c)
+ }
+ return out.String()
+}
+
+func grpcPercentDecode(bufferPool *bufferPool, encoded string) string {
+ for i := 0; i < len(encoded); i++ {
+ if c := encoded[i]; c == '%' && i+2 < len(encoded) {
+ return grpcPercentDecodeSlow(bufferPool, encoded, i)
+ }
+ }
+ return encoded
+}
+
+// Similar to percentEncodeSlow: encoded is percent-encoded, and needs to be
+// decoded byte-by-byte starting at offset.
+func grpcPercentDecodeSlow(bufferPool *bufferPool, encoded string, offset int) string {
+ out := bufferPool.Get()
+ defer bufferPool.Put(out)
+ out.WriteString(encoded[:offset])
+ for i := offset; i < len(encoded); i++ {
+ c := encoded[i]
+ if c != '%' || i+2 >= len(encoded) {
+ out.WriteByte(c)
+ continue
+ }
+ parsed, err := strconv.ParseUint(encoded[i+1:i+3], 16 /* hex */, 8 /* bitsize */)
+ if err != nil {
+ out.WriteRune(utf8.RuneError)
+ } else {
+ out.WriteByte(byte(parsed))
+ }
+ i += 2
+ }
+ return out.String()
+}
diff --git a/vendor/github.com/bufbuild/connect-go/recover.go b/vendor/github.com/bufbuild/connect-go/recover.go
new file mode 100644
index 000000000..c126d36ac
--- /dev/null
+++ b/vendor/github.com/bufbuild/connect-go/recover.go
@@ -0,0 +1,80 @@
+// Copyright 2021-2022 Buf Technologies, Inc.
+//
+// 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 connect
+
+import (
+ "context"
+ "net/http"
+)
+
+// recoverHandlerInterceptor lets handlers trap panics, perform side effects
+// (like emitting logs or metrics), and present a friendlier error message to
+// clients.
+//
+// This interceptor uses a somewhat unusual strategy to recover from panics.
+// The standard recovery idiom:
+//
+// if r := recover(); r != nil { ... }
+//
+// isn't robust in the face of user error, because it doesn't handle
+// panic(nil). This occasionally happens by mistake, and it's a beast to debug
+// without a more robust idiom. See https://github.com/golang/go/issues/25448
+// for details.
+type recoverHandlerInterceptor struct {
+ Interceptor
+
+ handle func(context.Context, Spec, http.Header, any) error
+}
+
+func (i *recoverHandlerInterceptor) WrapUnary(next UnaryFunc) UnaryFunc {
+ return func(ctx context.Context, req AnyRequest) (_ AnyResponse, retErr error) {
+ if req.Spec().IsClient {
+ return next(ctx, req)
+ }
+ panicked := true
+ defer func() {
+ if panicked {
+ r := recover()
+ // net/http checks for ErrAbortHandler with ==, so we should too.
+ if r == http.ErrAbortHandler { //nolint:errorlint,goerr113
+ panic(r) //nolint:forbidigo
+ }
+ retErr = i.handle(ctx, req.Spec(), req.Header(), r)
+ }
+ }()
+ res, err := next(ctx, req)
+ panicked = false
+ return res, err
+ }
+}
+
+func (i *recoverHandlerInterceptor) WrapStreamingHandler(next StreamingHandlerFunc) StreamingHandlerFunc {
+ return func(ctx context.Context, conn StreamingHandlerConn) (retErr error) {
+ panicked := true
+ defer func() {
+ if panicked {
+ r := recover()
+ // net/http checks for ErrAbortHandler with ==, so we should too.
+ if r == http.ErrAbortHandler { //nolint:errorlint,goerr113
+ panic(r) //nolint:forbidigo
+ }
+ retErr = i.handle(ctx, Spec{}, nil, r)
+ }
+ }()
+ err := next(ctx, conn)
+ panicked = false
+ return err
+ }
+}
diff --git a/vendor/github.com/bufbuild/protocompile/.gitignore b/vendor/github.com/bufbuild/protocompile/.gitignore
new file mode 100644
index 000000000..65b3b16c3
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/.gitignore
@@ -0,0 +1,3 @@
+*.iml
+.idea/
+/.tmp/
diff --git a/vendor/github.com/bufbuild/protocompile/.golangci.yml b/vendor/github.com/bufbuild/protocompile/.golangci.yml
new file mode 100644
index 000000000..67377d695
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/.golangci.yml
@@ -0,0 +1,98 @@
+run:
+ skip-dirs-use-default: false
+ skip-files:
+ - ".*\\.y\\.go$"
+linters-settings:
+ errcheck:
+ check-type-assertions: true
+ forbidigo:
+ forbid:
+ - '^fmt\.Print'
+ - '^log\.'
+ - '^print$'
+ - '^println$'
+ - '^panic$'
+ gci:
+ # Section configuration to compare against.
+ # Section names are case-insensitive and may contain parameters in ().
+ # The default order of sections is `standard > default > custom > blank > dot`,
+ # If `custom-order` is `true`, it follows the order of `sections` option.
+ # Default: ["standard", "default"]
+ sections:
+ - standard # Standard section: captures all standard packages.
+ - default # Default section: contains all imports that could not be matched to another section type.
+ - prefix(github.com/bufbuild/protocompile) # Custom section: groups all imports with the specified Prefix.
+ godox:
+ # TODO, OPT, etc. comments are fine to commit. Use FIXME comments for
+ # temporary hacks, and use godox to prevent committing them.
+ keywords: [FIXME]
+ varnamelen:
+ ignore-decls:
+ - T any
+ - i int
+ - wg sync.WaitGroup
+linters:
+ enable-all: true
+ disable:
+ # TODO: TCN-350 - initial exclusions for failing linters.
+ # Should enable all of these.
+ - dupl
+ - errname
+ - errorlint
+ - exhaustive
+ - exhaustruct
+ - forbidigo
+ - forcetypeassert
+ - gochecknoglobals
+ - gochecknoinits
+ - goconst
+ - gocyclo
+ - goerr113
+ - gosec
+ - interfacebloat
+ - nestif
+ - nilerr
+ - nilnil
+ - nonamedreturns
+ - thelper
+ - varnamelen
+ # Other disabled linters
+ - cyclop # covered by gocyclo
+ - deadcode # deprecated by author
+ - exhaustivestruct # replaced by exhaustruct
+ - funlen # rely on code review to limit function length
+ - gocognit # dubious "cognitive overhead" quantification
+ - gofumpt # prefer standard gofmt
+ - golint # deprecated by Go team
+ - gomnd # some unnamed constants are okay
+ - ifshort # deprecated by author
+ - interfacer # deprecated by author
+ - ireturn # "accept interfaces, return structs" isn't ironclad
+ - lll # don't want hard limits for line length
+ - maintidx # covered by gocyclo
+ - maligned # readability trumps efficient struct packing
+ - nlreturn # generous whitespace violates house style
+ - nosnakecase # deprecated in https://github.com/golangci/golangci-lint/pull/3065
+ - rowserrcheck # no SQL code in protocompile
+ - scopelint # deprecated by author
+ - sqlclosecheck # no SQL code in protocompile
+ - structcheck # deprecated by author
+ - testpackage # internal tests are fine
+ - varcheck # deprecated by author
+ - wastedassign # not supported with generics
+ - wrapcheck # don't _always_ need to wrap errors
+ - wsl # generous whitespace violates house style
+issues:
+ exclude:
+ # Don't ban use of fmt.Errorf to create new errors, but the remaining
+ # checks from err113 are useful.
+ - "err113: do not define dynamic errors.*"
+ exclude-rules:
+ # Benchmarks can't be run in parallel
+ - path: benchmark_test\.go
+ linters:
+ - paralleltest
+ # dupword reports several errors in .proto test fixtures
+ - path: _test\.go
+ linters:
+ - dupword
diff --git a/vendor/github.com/bufbuild/protocompile/LICENSE b/vendor/github.com/bufbuild/protocompile/LICENSE
new file mode 100644
index 000000000..261eeb9e9
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/LICENSE
@@ -0,0 +1,201 @@
+ 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/bufbuild/protocompile/Makefile b/vendor/github.com/bufbuild/protocompile/Makefile
new file mode 100644
index 000000000..47d87c7dd
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/Makefile
@@ -0,0 +1,159 @@
+# See https://tech.davis-hansson.com/p/make/
+SHELL := bash
+.DELETE_ON_ERROR:
+.SHELLFLAGS := -eu -o pipefail -c
+.DEFAULT_GOAL := all
+MAKEFLAGS += --warn-undefined-variables
+MAKEFLAGS += --no-builtin-rules
+MAKEFLAGS += --no-print-directory
+BIN := $(abspath .tmp/bin)
+COPYRIGHT_YEARS := 2020-2022
+LICENSE_IGNORE := -e /testdata/
+# Set to use a different compiler. For example, `GO=go1.18rc1 make test`.
+GO ?= go
+TOOLS_MOD_DIR := ./internal/tools
+UNAME_OS := $(shell uname -s)
+UNAME_ARCH := $(shell uname -m)
+
+# NB: this must be kept in sync with constant in internal/benchmarks.
+PROTOC_VERSION ?= 21.7
+PROTOC_DIR := $(abspath ./internal/testdata/protoc/$(PROTOC_VERSION))
+PROTOC := $(PROTOC_DIR)/bin/protoc
+
+ifeq ($(UNAME_OS),Darwin)
+PROTOC_OS := osx
+ifeq ($(UNAME_ARCH),arm64)
+PROTOC_ARCH := aarch_64
+else
+PROTOC_ARCH := x86_64
+endif
+endif
+ifeq ($(UNAME_OS),Linux)
+PROTOC_OS := linux
+PROTOC_ARCH := $(UNAME_ARCH)
+endif
+
+.PHONY: help
+help: ## Describe useful make targets
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "%-30s %s\n", $$1, $$2}'
+
+.PHONY: all
+all: ## Build, test, and lint (default)
+ $(MAKE) test
+ $(MAKE) lint
+
+.PHONY: clean
+clean: ## Delete intermediate build artifacts
+ @# -X only removes untracked files, -d recurses into directories, -f actually removes files/dirs
+ git clean -Xdf
+
+.PHONY: test
+test: build ## Run unit tests
+ $(GO) test -vet=off -race -cover ./...
+
+.PHONY: benchmarks
+benchmarks: build ## Run benchmarks
+ cd internal/benchmarks && $(GO) test -bench=. -benchmem -v ./...
+
+.PHONY: build
+build: generate ## Build all packages
+ $(GO) build ./...
+
+.PHONY: install
+install: ## Install all binaries
+ $(GO) install ./...
+
+.PHONY: lint
+lint: $(BIN)/golangci-lint ## Lint Go
+ $(GO) vet ./... ./internal/benchmarks/...
+ $(BIN)/golangci-lint run
+ cd internal/benchmarks && $(BIN)/golangci-lint run
+
+.PHONY: lintfix
+lintfix: $(BIN)/golangci-lint ## Automatically fix some lint errors
+ $(BIN)/golangci-lint run --fix
+ cd internal/benchmarks && $(BIN)/golangci-lint run --fix
+
+.PHONY: generate
+generate: $(BIN)/license-header $(BIN)/goyacc test-descriptors ## Regenerate code and licenses
+ PATH=$(BIN):$(PATH) $(GO) generate ./...
+ @# We want to operate on a list of modified and new files, excluding
+ @# deleted and ignored files. git-ls-files can't do this alone. comm -23 takes
+ @# two files and prints the union, dropping lines common to both (-3) and
+ @# those only in the second file (-2). We make one git-ls-files call for
+ @# the modified, cached, and new (--others) files, and a second for the
+ @# deleted files.
+ comm -23 \
+ <(git ls-files --cached --modified --others --no-empty-directory --exclude-standard | sort -u | grep -v $(LICENSE_IGNORE) ) \
+ <(git ls-files --deleted | sort -u) | \
+ xargs $(BIN)/license-header \
+ --license-type apache \
+ --copyright-holder "Buf Technologies, Inc." \
+ --year-range "$(COPYRIGHT_YEARS)"
+
+.PHONY: upgrade
+upgrade: ## Upgrade dependencies
+ go get -u -t ./... && go mod tidy -v
+
+.PHONY: checkgenerate
+checkgenerate:
+ @# Used in CI to verify that `make generate` doesn't produce a diff.
+ test -z "$$(git status --porcelain | tee /dev/stderr)"
+
+$(BIN)/license-header: internal/tools/go.mod internal/tools/go.sum
+ @mkdir -p $(@D)
+ cd $(TOOLS_MOD_DIR) && \
+ $(GO) build -o $@ github.com/bufbuild/buf/private/pkg/licenseheader/cmd/license-header
+
+$(BIN)/golangci-lint: internal/tools/go.mod internal/tools/go.sum
+ @mkdir -p $(@D)
+ cd $(TOOLS_MOD_DIR) && \
+ $(GO) build -o $@ github.com/golangci/golangci-lint/cmd/golangci-lint
+
+$(BIN)/goyacc: internal/tools/go.mod internal/tools/go.sum
+ @mkdir -p $(@D)
+ cd $(TOOLS_MOD_DIR) && \
+ $(GO) build -o $@ golang.org/x/tools/cmd/goyacc
+
+internal/testdata/protoc/cache/protoc-$(PROTOC_VERSION).zip:
+ @mkdir -p $(@D)
+ curl -o $@ -fsSL https://github.com/protocolbuffers/protobuf/releases/download/v$(PROTOC_VERSION)/protoc-$(PROTOC_VERSION)-$(PROTOC_OS)-$(PROTOC_ARCH).zip
+
+$(PROTOC): internal/testdata/protoc/cache/protoc-$(PROTOC_VERSION).zip
+ @mkdir -p $(@D)
+ unzip -o -q $< -d $(PROTOC_DIR) && \
+ touch $@
+
+internal/testdata/all.protoset: $(PROTOC) $(sort $(wildcard internal/testdata/*.proto))
+ cd $(@D) && $(PROTOC) --descriptor_set_out=$(@F) --include_imports -I. $(filter-out protoc,$(^F))
+
+internal/testdata/desc_test_complex.protoset: $(PROTOC) internal/testdata/desc_test_complex.proto
+ cd $(@D) && $(PROTOC) --descriptor_set_out=$(@F) --include_imports -I. $(filter-out protoc,$(^F))
+
+internal/testdata/desc_test_defaults.protoset: $(PROTOC) internal/testdata/desc_test_defaults.proto
+ cd $(@D) && $(PROTOC) --descriptor_set_out=$(@F) --include_imports -I. $(filter-out protoc,$(^F))
+
+internal/testdata/desc_test_proto3_optional.protoset: $(PROTOC) internal/testdata/desc_test_proto3_optional.proto
+ cd $(@D) && $(PROTOC) --descriptor_set_out=$(@F) --include_imports -I. $(filter-out protoc,$(^F))
+
+internal/testdata/descriptor_impl_tests.protoset: $(PROTOC) internal/testdata/desc_test2.proto internal/testdata/desc_test_defaults.proto internal/testdata/desc_test_proto3.proto internal/testdata/desc_test_proto3_optional.proto
+ cd $(@D) && $(PROTOC) --descriptor_set_out=$(@F) --include_imports -I. $(filter-out protoc,$(^F))
+
+internal/testdata/source_info.protoset: $(PROTOC) internal/testdata/desc_test_options.proto internal/testdata/desc_test_comments.proto internal/testdata/desc_test_complex.proto
+ cd $(@D) && $(PROTOC) --descriptor_set_out=$(@F) --include_source_info -I. $(filter-out protoc,$(^F))
+
+internal/testdata/options/test.protoset: $(PROTOC) internal/testdata/options/test.proto
+ cd $(@D) && $(PROTOC) --descriptor_set_out=$(@F) -I. $(filter-out protoc,$(^F))
+
+internal/testdata/options/test_proto3.protoset: $(PROTOC) internal/testdata/options/test_proto3.proto
+ cd $(@D) && $(PROTOC) --descriptor_set_out=$(@F) -I. $(filter-out protoc,$(^F))
+
+.PHONY: test-descriptors
+test-descriptors: internal/testdata/all.protoset
+test-descriptors: internal/testdata/desc_test_complex.protoset
+test-descriptors: internal/testdata/desc_test_defaults.protoset
+test-descriptors: internal/testdata/desc_test_proto3_optional.protoset
+test-descriptors: internal/testdata/descriptor_impl_tests.protoset
+test-descriptors: internal/testdata/source_info.protoset
+test-descriptors: internal/testdata/options/test.protoset
+test-descriptors: internal/testdata/options/test_proto3.protoset
diff --git a/vendor/github.com/bufbuild/protocompile/README.md b/vendor/github.com/bufbuild/protocompile/README.md
new file mode 100644
index 000000000..9d8733300
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/README.md
@@ -0,0 +1,91 @@
+
+
+# Protocompile
+
+[](https://github.com/bufbuild/protocompile/actions/workflows/ci.yaml)
+[](https://goreportcard.com/report/github.com/bufbuild/protocompile)
+[](https://pkg.go.dev/github.com/bufbuild/protocompile)
+
+This repo contains a parsing/linking engine for Protocol Buffers, written in pure Go. It is suitable as an alternative
+to `protoc` (Google's official reference compiler for Protocol Buffers). This is the compiler that powers [Buf](https://buf.build)
+and its bevy of tools.
+
+This repo is also the spiritual successor to the [`github.com/jhump/protoreflect/desc/protoparse`](https://godoc.org/github.com/jhump/protoreflect/desc/protoparse)
+package. If you are looking for a newer version of `protoparse` that natively works with the newer Protobuf runtime
+API for Go (`google.golang.org/protobuf`), you have found it!
+
+## Protocol Buffers
+
+If you've come across this repo but don't know what Protocol Buffers are, you might acquaint yourself with the [official
+documentation](https://developers.google.com/protocol-buffers). Protocol Buffers, or Protobuf for short, is an IDL for
+describing APIs and data structures and also a binary encoding format for efficiently transmitting and storing that
+data.
+
+If you want to know more about the language itself, which is what this repo implements, take a look at Buf's
+[Protobuf Guide](https://protobuf.com), which includes a very detailed language specification.
+
+### Descriptors
+
+Descriptors are the "lingua franca" for describing Protobuf data schemas. They are the basis of runtime features like
+reflection and dynamic messages. They are also the output of a Protobuf compiler: a compiler can produce them and write
+them to a file (whose contents are the binary-encoded form of a [`FileDescriptorSet`](https://github.com/protocolbuffers/protobuf/blob/v21.7/src/google/protobuf/descriptor.proto#L55-L59))
+or send them to a [plugin](https://docs.buf.build/reference/images#plugins) to generate code for a particular
+programming language.
+
+Descriptors are similar to nodes in a syntax tree: the contents of a file descriptor correspond closely to the elements
+in the source file from which it was generated. Also, the descriptor model's data structures are themselves defined in
+[Protobuf](https://github.com/protocolbuffers/protobuf/blob/v21.7/src/google/protobuf/descriptor.proto).
+
+## Using This Repo
+
+The primary API of this repo is in this root package: `github.com/bufbuild/protocompile`. This is the suggested entry
+point and provides a type named `Compiler`, for compiling Protobuf source files into descriptors. There are also
+numerous sub-packages, most of which implement various stages of the compiler. Here's an overview (_not_ in alphabetical
+order):
+
+ * [`protocompile`](https://pkg.go.dev/github.com/bufbuild/protocompile):
+ This is the entry point, used to configure and initiate a compilation operation.
+ * [`parser`](https://pkg.go.dev/github.com/bufbuild/protocompile/parser):
+ This is the first stage of the compiler. It parses Protobuf source code and produces an AST. This package can also
+ generate a file descriptor proto from an AST.
+ * [`ast`](https://pkg.go.dev/github.com/bufbuild/protocompile/ast):
+ This package models an Abstract Syntax Tree (AST) for the Protobuf language.
+ * [`linker`](https://pkg.go.dev/github.com/bufbuild/protocompile/linker):
+ This is the second stage of the compiler. The descriptor proto (generated from an AST) is linked, producing a more
+ useful data structure than simple descriptor protos. This step also performs numerous validations on the source,
+ like making sure that all type references are correct and that sources don't try to define two elements with the same
+ name.
+ * [`options`](https://pkg.go.dev/github.com/bufbuild/protocompile/options):
+ This is the next stage of the compiler: interpreting options. The linked data structures that come from the previous
+ stage are used to validate and interpret all options.
+ * [`sourceinfo`](https://pkg.go.dev/github.com/bufbuild/protocompile/sourceinfo):
+ This is the last stage of the compiler: generating source code info. Source code info contains metadata that maps
+ elements in the descriptor to the location in the original source file from which it came. This includes access to
+ comments. In order to provide correct source info for options, it must happen last, after options have been
+ interpreted.
+ * [`reporter`](https://pkg.go.dev/github.com/bufbuild/protocompile/reporter): This package provides error types
+ generated by the compiler and interfaces used by the compiler to report errors and warnings to the calling code.
+ * [`walk`](https://pkg.go.dev/github.com/bufbuild/protocompile/walk):
+ This package provides functions for walking through all of the elements in a descriptor (or descriptor proto)
+ hierarchy.
+ * [`protoutil`](https://pkg.go.dev/github.com/bufbuild/protocompile/protoutil):
+ This package contains some other useful functions for interacting with Protobuf descriptors.
+
+### Migrating from `protoparse`
+
+There are a few differences between this repo and its predecessor, `github.com/jhump/protoreflect/desc/protoparse`.
+
+* If you want to include "standard imports", for the well-known files that are included with `protoc`, you have to do
+ so explicitly. To do this, wrap your resolver using `protocompile.WithStandardImports`.
+* If you used `protoparse.FileContentsFromMap`, in this new repo you'll use a `protocompile.SourceResolver` and then use
+ `protocompile.SourceAccessorFromMap` as its accessor function.
+* If you used `Parser.ParseToAST`, you won't use the `protocompile` package but instead directly use `parser.Parse` in
+ this repo's `parser` sub-package. This returns an AST for the given file contents.
+* If you used `Parser.ParseFilesButDoNotLink`, that is still possible in this repo, but not provided directly via a
+ single function. Instead, you need to take a few steps:
+ 1. Parse the source using `parser.Parse`. Then use `parser.ResultFromAST` to construct a result that contains a file
+ descriptor proto.
+ 2. Interpret whatever options can be interpreted without linking using `options.InterpretUnlinkedOptions`. This may
+ leave some options in the descriptor proto uninterpreted (including all custom options).
+ 3. If you want source code info for the file, finally call `sourceinfo.GenerateSourceInfo` using the index returned
+ from the previous step and store that in the file descriptor proto.
diff --git a/vendor/github.com/bufbuild/protocompile/ast/doc.go b/vendor/github.com/bufbuild/protocompile/ast/doc.go
new file mode 100644
index 000000000..fac65c420
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/doc.go
@@ -0,0 +1,75 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast defines types for modeling the AST (Abstract Syntax
+// Tree) for the Protocol Buffers interface definition language.
+//
+// # Nodes
+//
+// All nodes of the tree implement the [Node] interface. Leaf nodes in the
+// tree implement [TerminalNode], and all others implement [CompositeNode].
+// The root of the tree for a proto source file is a *[FileNode].
+//
+// A [TerminalNode] represents a single lexical element, or [Token]. A
+// [CompositeNode] represents a sub-tree of the AST and range of tokens.
+//
+// Position information is tracked using a *[FileInfo]. The lexer invokes its
+// various Add* methods to add details as the file is tokenized. Storing
+// the position information in the *[FileInfo], instead of in each AST node,
+// allows the AST to have a much more compact representation. To extract
+// detailed position information, you must use the NodeInfo method, available
+// on either the *[FileInfo] which produced the node's items or the *[FileNode]
+// root of the tree that contains the node.
+//
+// # Items, Tokens, and Comments
+//
+// An [Item] represents a lexical item, excluding whitespace. This can be
+// either a [Token] or a [Comment].
+//
+// Comments are not represented as nodes in the tree. Instead, they are
+// attributed to terminal nodes in the tree. So, when lexing, comments
+// are accumulated until the next non-comment token is found. The AST
+// model in this package thus provides access to all comments in the
+// file, regardless of location (unlike the SourceCodeInfo present in
+// descriptor protos, which is lossy). The comments associated with a
+// non-leaf/non-token node (i.e. a CompositeNode) come from the first
+// and last nodes in its sub-tree, for leading and trailing comments
+// respectively.
+//
+// A [Comment] value corresponds to a line ("//") or block ("/*") style
+// comment in the source. These have no bearing on the grammar and are
+// effectively ignored as the parser is determining the shape of the
+// syntax tree.
+//
+// A [Token] value corresponds to a component of the grammar, that is
+// used to produce an AST. They correspond to leaves in the AST (i.e.
+// [TerminalNode]).
+//
+// The *[FileInfo] and *[FileNode] types provide methods for querying
+// and iterating through all the items or tokens in the file. They also
+// include a method for resolving an [Item] into a [Token] or [Comment].
+//
+// # Factory Functions
+//
+// Creation of AST nodes should use the factory functions in this
+// package instead of struct literals. Some factory functions accept
+// optional arguments, which means the arguments can be nil. If nil
+// values are provided for other (non-optional) arguments, the resulting
+// node may be invalid and cause panics later in the program.
+//
+// This package defines numerous interfaces. However, user code should
+// not attempt to implement any of them. Most consumers of an AST will
+// not work correctly if they encounter concrete implementations other
+// than the ones defined in this package.
+package ast
diff --git a/vendor/github.com/bufbuild/protocompile/ast/enum.go b/vendor/github.com/bufbuild/protocompile/ast/enum.go
new file mode 100644
index 000000000..93edbcbdc
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/enum.go
@@ -0,0 +1,165 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import "fmt"
+
+// EnumNode represents an enum declaration. Example:
+//
+// enum Foo { BAR = 0; BAZ = 1 }
+type EnumNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ Name *IdentNode
+ OpenBrace *RuneNode
+ Decls []EnumElement
+ CloseBrace *RuneNode
+}
+
+func (*EnumNode) fileElement() {}
+func (*EnumNode) msgElement() {}
+
+// NewEnumNode creates a new *EnumNode. All arguments must be non-nil. While
+// it is technically allowed for decls to be nil or empty, the resulting node
+// will not be a valid enum, which must have at least one value.
+// - keyword: The token corresponding to the "enum" keyword.
+// - name: The token corresponding to the enum's name.
+// - openBrace: The token corresponding to the "{" rune that starts the body.
+// - decls: All declarations inside the enum body.
+// - closeBrace: The token corresponding to the "}" rune that ends the body.
+func NewEnumNode(keyword *KeywordNode, name *IdentNode, openBrace *RuneNode, decls []EnumElement, closeBrace *RuneNode) *EnumNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if openBrace == nil {
+ panic("openBrace is nil")
+ }
+ if closeBrace == nil {
+ panic("closeBrace is nil")
+ }
+ children := make([]Node, 0, 4+len(decls))
+ children = append(children, keyword, name, openBrace)
+ for _, decl := range decls {
+ switch decl.(type) {
+ case *OptionNode, *EnumValueNode, *ReservedNode, *EmptyDeclNode:
+ default:
+ panic(fmt.Sprintf("invalid EnumElement type: %T", decl))
+ }
+ children = append(children, decl)
+ }
+ children = append(children, closeBrace)
+
+ return &EnumNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Name: name,
+ OpenBrace: openBrace,
+ CloseBrace: closeBrace,
+ Decls: decls,
+ }
+}
+
+// EnumElement is an interface implemented by all AST nodes that can
+// appear in the body of an enum declaration.
+type EnumElement interface {
+ Node
+ enumElement()
+}
+
+var _ EnumElement = (*OptionNode)(nil)
+var _ EnumElement = (*EnumValueNode)(nil)
+var _ EnumElement = (*ReservedNode)(nil)
+var _ EnumElement = (*EmptyDeclNode)(nil)
+
+// EnumValueDeclNode is a placeholder interface for AST nodes that represent
+// enum values. This allows NoSourceNode to be used in place of *EnumValueNode
+// for some usages.
+type EnumValueDeclNode interface {
+ Node
+ GetName() Node
+ GetNumber() Node
+}
+
+var _ EnumValueDeclNode = (*EnumValueNode)(nil)
+var _ EnumValueDeclNode = NoSourceNode{}
+
+// EnumNode represents an enum declaration. Example:
+//
+// UNSET = 0 [deprecated = true];
+type EnumValueNode struct {
+ compositeNode
+ Name *IdentNode
+ Equals *RuneNode
+ Number IntValueNode
+ Options *CompactOptionsNode
+ Semicolon *RuneNode
+}
+
+func (*EnumValueNode) enumElement() {}
+
+// NewEnumValueNode creates a new *EnumValueNode. All arguments must be non-nil
+// except opts which is only non-nil if the declaration included options.
+// - name: The token corresponding to the enum value's name.
+// - equals: The token corresponding to the '=' rune after the name.
+// - number: The token corresponding to the enum value's number.
+// - opts: Optional set of enum value options.
+// - semicolon: The token corresponding to the ";" rune that ends the declaration.
+func NewEnumValueNode(name *IdentNode, equals *RuneNode, number IntValueNode, opts *CompactOptionsNode, semicolon *RuneNode) *EnumValueNode {
+ if name == nil {
+ panic("name is nil")
+ }
+ if equals == nil {
+ panic("equals is nil")
+ }
+ if number == nil {
+ panic("number is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ numChildren := 4
+ if opts != nil {
+ numChildren++
+ }
+ children := make([]Node, 0, numChildren)
+ children = append(children, name, equals, number)
+ if opts != nil {
+ children = append(children, opts)
+ }
+ children = append(children, semicolon)
+ return &EnumValueNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Name: name,
+ Equals: equals,
+ Number: number,
+ Options: opts,
+ Semicolon: semicolon,
+ }
+}
+
+func (e *EnumValueNode) GetName() Node {
+ return e.Name
+}
+
+func (e *EnumValueNode) GetNumber() Node {
+ return e.Number
+}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/field.go b/vendor/github.com/bufbuild/protocompile/ast/field.go
new file mode 100644
index 000000000..d4d3e3924
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/field.go
@@ -0,0 +1,672 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import "fmt"
+
+// FieldDeclNode is a node in the AST that defines a field. This includes
+// normal message fields as well as extensions. There are multiple types
+// of AST nodes that declare fields:
+// - *FieldNode
+// - *GroupNode
+// - *MapFieldNode
+// - *SyntheticMapField
+//
+// This also allows NoSourceNode and SyntheticMapField to be used in place of
+// one of the above for some usages.
+type FieldDeclNode interface {
+ Node
+ FieldLabel() Node
+ FieldName() Node
+ FieldType() Node
+ FieldTag() Node
+ FieldExtendee() Node
+ GetGroupKeyword() Node
+ GetOptions() *CompactOptionsNode
+}
+
+var _ FieldDeclNode = (*FieldNode)(nil)
+var _ FieldDeclNode = (*GroupNode)(nil)
+var _ FieldDeclNode = (*MapFieldNode)(nil)
+var _ FieldDeclNode = (*SyntheticMapField)(nil)
+var _ FieldDeclNode = NoSourceNode{}
+
+// FieldNode represents a normal field declaration (not groups or maps). It
+// can represent extension fields as well as non-extension fields (both inside
+// of messages and inside of one-ofs). Example:
+//
+// optional string foo = 1;
+type FieldNode struct {
+ compositeNode
+ Label FieldLabel
+ FldType IdentValueNode
+ Name *IdentNode
+ Equals *RuneNode
+ Tag *UintLiteralNode
+ Options *CompactOptionsNode
+ Semicolon *RuneNode
+
+ // This is an up-link to the containing *ExtendNode for fields
+ // that are defined inside of "extend" blocks.
+ Extendee *ExtendNode
+}
+
+func (*FieldNode) msgElement() {}
+func (*FieldNode) oneOfElement() {}
+func (*FieldNode) extendElement() {}
+
+// NewFieldNode creates a new *FieldNode. The label and options arguments may be
+// nil but the others must be non-nil.
+// - label: The token corresponding to the label keyword if present ("optional",
+// "required", or "repeated").
+// - fieldType: The token corresponding to the field's type.
+// - name: The token corresponding to the field's name.
+// - equals: The token corresponding to the '=' rune after the name.
+// - tag: The token corresponding to the field's tag number.
+// - opts: Optional set of field options.
+// - semicolon: The token corresponding to the ";" rune that ends the declaration.
+func NewFieldNode(label *KeywordNode, fieldType IdentValueNode, name *IdentNode, equals *RuneNode, tag *UintLiteralNode, opts *CompactOptionsNode, semicolon *RuneNode) *FieldNode {
+ if fieldType == nil {
+ panic("fieldType is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if equals == nil {
+ panic("equals is nil")
+ }
+ if tag == nil {
+ panic("tag is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ numChildren := 5
+ if label != nil {
+ numChildren++
+ }
+ if opts != nil {
+ numChildren++
+ }
+ children := make([]Node, 0, numChildren)
+ if label != nil {
+ children = append(children, label)
+ }
+ children = append(children, fieldType, name, equals, tag)
+ if opts != nil {
+ children = append(children, opts)
+ }
+ children = append(children, semicolon)
+
+ return &FieldNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Label: newFieldLabel(label),
+ FldType: fieldType,
+ Name: name,
+ Equals: equals,
+ Tag: tag,
+ Options: opts,
+ Semicolon: semicolon,
+ }
+}
+
+func (n *FieldNode) FieldLabel() Node {
+ // proto3 fields and fields inside one-ofs will not have a label and we need
+ // this check in order to return a nil node -- otherwise we'd return a
+ // non-nil node that has a nil pointer value in it :/
+ if n.Label.KeywordNode == nil {
+ return nil
+ }
+ return n.Label.KeywordNode
+}
+
+func (n *FieldNode) FieldName() Node {
+ return n.Name
+}
+
+func (n *FieldNode) FieldType() Node {
+ return n.FldType
+}
+
+func (n *FieldNode) FieldTag() Node {
+ return n.Tag
+}
+
+func (n *FieldNode) FieldExtendee() Node {
+ if n.Extendee != nil {
+ return n.Extendee.Extendee
+ }
+ return nil
+}
+
+func (n *FieldNode) GetGroupKeyword() Node {
+ return nil
+}
+
+func (n *FieldNode) GetOptions() *CompactOptionsNode {
+ return n.Options
+}
+
+// FieldLabel represents the label of a field, which indicates its cardinality
+// (i.e. whether it is optional, required, or repeated).
+type FieldLabel struct {
+ *KeywordNode
+ Repeated bool
+ Required bool
+}
+
+func newFieldLabel(lbl *KeywordNode) FieldLabel {
+ repeated, required := false, false
+ if lbl != nil {
+ repeated = lbl.Val == "repeated"
+ required = lbl.Val == "required"
+ }
+ return FieldLabel{
+ KeywordNode: lbl,
+ Repeated: repeated,
+ Required: required,
+ }
+}
+
+// IsPresent returns true if a label keyword was present in the declaration
+// and false if it was absent.
+func (f *FieldLabel) IsPresent() bool {
+ return f.KeywordNode != nil
+}
+
+// GroupNode represents a group declaration, which doubles as a field and inline
+// message declaration. It can represent extension fields as well as
+// non-extension fields (both inside of messages and inside of one-ofs).
+// Example:
+//
+// optional group Key = 4 {
+// optional uint64 id = 1;
+// optional string name = 2;
+// }
+type GroupNode struct {
+ compositeNode
+ Label FieldLabel
+ Keyword *KeywordNode
+ Name *IdentNode
+ Equals *RuneNode
+ Tag *UintLiteralNode
+ Options *CompactOptionsNode
+ MessageBody
+
+ // This is an up-link to the containing *ExtendNode for groups
+ // that are defined inside of "extend" blocks.
+ Extendee *ExtendNode
+}
+
+func (*GroupNode) msgElement() {}
+func (*GroupNode) oneOfElement() {}
+func (*GroupNode) extendElement() {}
+
+// NewGroupNode creates a new *GroupNode. The label and options arguments may be
+// nil but the others must be non-nil.
+// - label: The token corresponding to the label keyword if present ("optional",
+// "required", or "repeated").
+// - keyword: The token corresponding to the "group" keyword.
+// - name: The token corresponding to the field's name.
+// - equals: The token corresponding to the '=' rune after the name.
+// - tag: The token corresponding to the field's tag number.
+// - opts: Optional set of field options.
+// - openBrace: The token corresponding to the "{" rune that starts the body.
+// - decls: All declarations inside the group body.
+// - closeBrace: The token corresponding to the "}" rune that ends the body.
+func NewGroupNode(label *KeywordNode, keyword *KeywordNode, name *IdentNode, equals *RuneNode, tag *UintLiteralNode, opts *CompactOptionsNode, openBrace *RuneNode, decls []MessageElement, closeBrace *RuneNode) *GroupNode {
+ if keyword == nil {
+ panic("fieldType is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if equals == nil {
+ panic("equals is nil")
+ }
+ if tag == nil {
+ panic("tag is nil")
+ }
+ if openBrace == nil {
+ panic("openBrace is nil")
+ }
+ if closeBrace == nil {
+ panic("closeBrace is nil")
+ }
+ numChildren := 6 + len(decls)
+ if label != nil {
+ numChildren++
+ }
+ if opts != nil {
+ numChildren++
+ }
+ children := make([]Node, 0, numChildren)
+ if label != nil {
+ children = append(children, label)
+ }
+ children = append(children, keyword, name, equals, tag)
+ if opts != nil {
+ children = append(children, opts)
+ }
+ children = append(children, openBrace)
+ for _, decl := range decls {
+ children = append(children, decl)
+ }
+ children = append(children, closeBrace)
+
+ ret := &GroupNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Label: newFieldLabel(label),
+ Keyword: keyword,
+ Name: name,
+ Equals: equals,
+ Tag: tag,
+ Options: opts,
+ }
+ populateMessageBody(&ret.MessageBody, openBrace, decls, closeBrace)
+ return ret
+}
+
+func (n *GroupNode) FieldLabel() Node {
+ if n.Label.KeywordNode == nil {
+ // return nil interface to indicate absence, not a typed nil
+ return nil
+ }
+ return n.Label.KeywordNode
+}
+
+func (n *GroupNode) FieldName() Node {
+ return n.Name
+}
+
+func (n *GroupNode) FieldType() Node {
+ return n.Keyword
+}
+
+func (n *GroupNode) FieldTag() Node {
+ return n.Tag
+}
+
+func (n *GroupNode) FieldExtendee() Node {
+ if n.Extendee != nil {
+ return n.Extendee.Extendee
+ }
+ return nil
+}
+
+func (n *GroupNode) GetGroupKeyword() Node {
+ return n.Keyword
+}
+
+func (n *GroupNode) GetOptions() *CompactOptionsNode {
+ return n.Options
+}
+
+func (n *GroupNode) MessageName() Node {
+ return n.Name
+}
+
+// OneOfDeclNode is a node in the AST that defines a oneof. There are
+// multiple types of AST nodes that declare oneofs:
+// - *OneOfNode
+// - *SyntheticOneOf
+//
+// This also allows NoSourceNode to be used in place of one of the above
+// for some usages.
+type OneOfDeclNode interface {
+ Node
+ OneOfName() Node
+}
+
+// OneOfNode represents a one-of declaration. Example:
+//
+// oneof query {
+// string by_name = 2;
+// Type by_type = 3;
+// Address by_address = 4;
+// Labels by_label = 5;
+// }
+type OneOfNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ Name *IdentNode
+ OpenBrace *RuneNode
+ Decls []OneOfElement
+ CloseBrace *RuneNode
+}
+
+func (*OneOfNode) msgElement() {}
+
+// NewOneOfNode creates a new *OneOfNode. All arguments must be non-nil. While
+// it is technically allowed for decls to be nil or empty, the resulting node
+// will not be a valid oneof, which must have at least one field.
+// - keyword: The token corresponding to the "oneof" keyword.
+// - name: The token corresponding to the oneof's name.
+// - openBrace: The token corresponding to the "{" rune that starts the body.
+// - decls: All declarations inside the oneof body.
+// - closeBrace: The token corresponding to the "}" rune that ends the body.
+func NewOneOfNode(keyword *KeywordNode, name *IdentNode, openBrace *RuneNode, decls []OneOfElement, closeBrace *RuneNode) *OneOfNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if openBrace == nil {
+ panic("openBrace is nil")
+ }
+ if closeBrace == nil {
+ panic("closeBrace is nil")
+ }
+ children := make([]Node, 0, 4+len(decls))
+ children = append(children, keyword, name, openBrace)
+ for _, decl := range decls {
+ children = append(children, decl)
+ }
+ children = append(children, closeBrace)
+
+ for _, decl := range decls {
+ switch decl := decl.(type) {
+ case *OptionNode, *FieldNode, *GroupNode, *EmptyDeclNode:
+ default:
+ panic(fmt.Sprintf("invalid OneOfElement type: %T", decl))
+ }
+ }
+
+ return &OneOfNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Name: name,
+ OpenBrace: openBrace,
+ Decls: decls,
+ CloseBrace: closeBrace,
+ }
+}
+
+func (n *OneOfNode) OneOfName() Node {
+ return n.Name
+}
+
+// OneOfElement is an interface implemented by all AST nodes that can
+// appear in the body of a oneof declaration.
+type OneOfElement interface {
+ Node
+ oneOfElement()
+}
+
+var _ OneOfElement = (*OptionNode)(nil)
+var _ OneOfElement = (*FieldNode)(nil)
+var _ OneOfElement = (*GroupNode)(nil)
+var _ OneOfElement = (*EmptyDeclNode)(nil)
+
+// SyntheticOneOf is not an actual node in the AST but a synthetic node
+// that represents the oneof implied by a proto3 optional field.
+type SyntheticOneOf struct {
+ Field *FieldNode
+}
+
+var _ Node = (*SyntheticOneOf)(nil)
+
+// NewSyntheticOneOf creates a new *SyntheticOneOf that corresponds to the
+// given proto3 optional field.
+func NewSyntheticOneOf(field *FieldNode) *SyntheticOneOf {
+ return &SyntheticOneOf{Field: field}
+}
+
+func (n *SyntheticOneOf) Start() Token {
+ return n.Field.Start()
+}
+
+func (n *SyntheticOneOf) End() Token {
+ return n.Field.End()
+}
+
+func (n *SyntheticOneOf) LeadingComments() []Comment {
+ return nil
+}
+
+func (n *SyntheticOneOf) TrailingComments() []Comment {
+ return nil
+}
+
+func (n *SyntheticOneOf) OneOfName() Node {
+ return n.Field.FieldName()
+}
+
+// MapTypeNode represents the type declaration for a map field. It defines
+// both the key and value types for the map. Example:
+//
+// map
+type MapTypeNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ OpenAngle *RuneNode
+ KeyType *IdentNode
+ Comma *RuneNode
+ ValueType IdentValueNode
+ CloseAngle *RuneNode
+}
+
+// NewMapTypeNode creates a new *MapTypeNode. All arguments must be non-nil.
+// - keyword: The token corresponding to the "map" keyword.
+// - openAngle: The token corresponding to the "<" rune after the keyword.
+// - keyType: The token corresponding to the key type for the map.
+// - comma: The token corresponding to the "," rune between key and value types.
+// - valType: The token corresponding to the value type for the map.
+// - closeAngle: The token corresponding to the ">" rune that ends the declaration.
+func NewMapTypeNode(keyword *KeywordNode, openAngle *RuneNode, keyType *IdentNode, comma *RuneNode, valType IdentValueNode, closeAngle *RuneNode) *MapTypeNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if openAngle == nil {
+ panic("openAngle is nil")
+ }
+ if keyType == nil {
+ panic("keyType is nil")
+ }
+ if comma == nil {
+ panic("comma is nil")
+ }
+ if valType == nil {
+ panic("valType is nil")
+ }
+ if closeAngle == nil {
+ panic("closeAngle is nil")
+ }
+ children := []Node{keyword, openAngle, keyType, comma, valType, closeAngle}
+ return &MapTypeNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ OpenAngle: openAngle,
+ KeyType: keyType,
+ Comma: comma,
+ ValueType: valType,
+ CloseAngle: closeAngle,
+ }
+}
+
+// MapFieldNode represents a map field declaration. Example:
+//
+// map replacements = 3 [deprecated = true];
+type MapFieldNode struct {
+ compositeNode
+ MapType *MapTypeNode
+ Name *IdentNode
+ Equals *RuneNode
+ Tag *UintLiteralNode
+ Options *CompactOptionsNode
+ Semicolon *RuneNode
+}
+
+func (*MapFieldNode) msgElement() {}
+
+// NewMapFieldNode creates a new *MapFieldNode. All arguments must be non-nil
+// except opts, which may be nil.
+// - mapType: The token corresponding to the map type.
+// - name: The token corresponding to the field's name.
+// - equals: The token corresponding to the '=' rune after the name.
+// - tag: The token corresponding to the field's tag number.
+// - opts: Optional set of field options.
+// - semicolon: The token corresponding to the ";" rune that ends the declaration.
+func NewMapFieldNode(mapType *MapTypeNode, name *IdentNode, equals *RuneNode, tag *UintLiteralNode, opts *CompactOptionsNode, semicolon *RuneNode) *MapFieldNode {
+ if mapType == nil {
+ panic("mapType is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if equals == nil {
+ panic("equals is nil")
+ }
+ if tag == nil {
+ panic("tag is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ numChildren := 5
+ if opts != nil {
+ numChildren++
+ }
+ children := make([]Node, 0, numChildren)
+ children = append(children, mapType, name, equals, tag)
+ if opts != nil {
+ children = append(children, opts)
+ }
+ children = append(children, semicolon)
+
+ return &MapFieldNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ MapType: mapType,
+ Name: name,
+ Equals: equals,
+ Tag: tag,
+ Options: opts,
+ Semicolon: semicolon,
+ }
+}
+
+func (n *MapFieldNode) FieldLabel() Node {
+ return nil
+}
+
+func (n *MapFieldNode) FieldName() Node {
+ return n.Name
+}
+
+func (n *MapFieldNode) FieldType() Node {
+ return n.MapType
+}
+
+func (n *MapFieldNode) FieldTag() Node {
+ return n.Tag
+}
+
+func (n *MapFieldNode) FieldExtendee() Node {
+ return nil
+}
+
+func (n *MapFieldNode) GetGroupKeyword() Node {
+ return nil
+}
+
+func (n *MapFieldNode) GetOptions() *CompactOptionsNode {
+ return n.Options
+}
+
+func (n *MapFieldNode) MessageName() Node {
+ return n.Name
+}
+
+func (n *MapFieldNode) KeyField() *SyntheticMapField {
+ return NewSyntheticMapField(n.MapType.KeyType, 1)
+}
+
+func (n *MapFieldNode) ValueField() *SyntheticMapField {
+ return NewSyntheticMapField(n.MapType.ValueType, 2)
+}
+
+// SyntheticMapField is not an actual node in the AST but a synthetic node
+// that implements FieldDeclNode. These are used to represent the implicit
+// field declarations of the "key" and "value" fields in a map entry.
+type SyntheticMapField struct {
+ Ident IdentValueNode
+ Tag *UintLiteralNode
+}
+
+// NewSyntheticMapField creates a new *SyntheticMapField for the given
+// identifier (either a key or value type in a map declaration) and tag
+// number (1 for key, 2 for value).
+func NewSyntheticMapField(ident IdentValueNode, tagNum uint64) *SyntheticMapField {
+ tag := &UintLiteralNode{
+ terminalNode: ident.Start().asTerminalNode(),
+ Val: tagNum,
+ }
+ return &SyntheticMapField{Ident: ident, Tag: tag}
+}
+
+func (n *SyntheticMapField) Start() Token {
+ return n.Ident.Start()
+}
+
+func (n *SyntheticMapField) End() Token {
+ return n.Ident.End()
+}
+
+func (n *SyntheticMapField) LeadingComments() []Comment {
+ return nil
+}
+
+func (n *SyntheticMapField) TrailingComments() []Comment {
+ return nil
+}
+
+func (n *SyntheticMapField) FieldLabel() Node {
+ return n.Ident
+}
+
+func (n *SyntheticMapField) FieldName() Node {
+ return n.Ident
+}
+
+func (n *SyntheticMapField) FieldType() Node {
+ return n.Ident
+}
+
+func (n *SyntheticMapField) FieldTag() Node {
+ return n.Tag
+}
+
+func (n *SyntheticMapField) FieldExtendee() Node {
+ return nil
+}
+
+func (n *SyntheticMapField) GetGroupKeyword() Node {
+ return nil
+}
+
+func (n *SyntheticMapField) GetOptions() *CompactOptionsNode {
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/file.go b/vendor/github.com/bufbuild/protocompile/ast/file.go
new file mode 100644
index 000000000..f12cca09e
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/file.go
@@ -0,0 +1,277 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import "fmt"
+
+// FileDeclNode is a placeholder interface for AST nodes that represent files.
+// This allows NoSourceNode to be used in place of *FileNode for some usages.
+type FileDeclNode interface {
+ Node
+ Name() string
+ GetSyntax() Node
+ NodeInfo(n Node) NodeInfo
+}
+
+var _ FileDeclNode = (*FileNode)(nil)
+var _ FileDeclNode = NoSourceNode{}
+
+// FileNode is the root of the AST hierarchy. It represents an entire
+// protobuf source file.
+type FileNode struct {
+ compositeNode
+ fileInfo *FileInfo
+
+ Syntax *SyntaxNode // nil if file has no syntax declaration
+ Decls []FileElement
+
+ // This synthetic node allows access to final comments and whitespace
+ EOF *RuneNode
+}
+
+// NewFileNode creates a new *FileNode. The syntax parameter is optional. If it
+// is absent, it means the file had no syntax declaration.
+//
+// This function panics if the concrete type of any element of decls is not
+// from this package.
+func NewFileNode(info *FileInfo, syntax *SyntaxNode, decls []FileElement, eof Token) *FileNode {
+ numChildren := len(decls) + 1
+ if syntax != nil {
+ numChildren++
+ }
+ children := make([]Node, 0, numChildren)
+ if syntax != nil {
+ children = append(children, syntax)
+ }
+ for _, decl := range decls {
+ switch decl := decl.(type) {
+ case *PackageNode, *ImportNode, *OptionNode, *MessageNode,
+ *EnumNode, *ExtendNode, *ServiceNode, *EmptyDeclNode:
+ default:
+ panic(fmt.Sprintf("invalid FileElement type: %T", decl))
+ }
+ children = append(children, decl)
+ }
+
+ eofNode := NewRuneNode(0, eof)
+ children = append(children, eofNode)
+
+ return &FileNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ fileInfo: info,
+ Syntax: syntax,
+ Decls: decls,
+ EOF: eofNode,
+ }
+}
+
+// NewEmptyFileNode returns an empty AST for a file with the given name.
+func NewEmptyFileNode(filename string) *FileNode {
+ fileInfo := NewFileInfo(filename, []byte{})
+ return NewFileNode(fileInfo, nil, nil, fileInfo.AddToken(0, 0))
+}
+
+func (f *FileNode) GetSyntax() Node {
+ return f.Syntax
+}
+
+func (f *FileNode) Name() string {
+ return f.fileInfo.Name()
+}
+
+func (f *FileNode) NodeInfo(n Node) NodeInfo {
+ return f.fileInfo.NodeInfo(n)
+}
+
+func (f *FileNode) TokenInfo(t Token) NodeInfo {
+ return f.fileInfo.TokenInfo(t)
+}
+
+func (f *FileNode) ItemInfo(i Item) ItemInfo {
+ return f.fileInfo.ItemInfo(i)
+}
+
+func (f *FileNode) GetItem(i Item) (Token, Comment) {
+ return f.fileInfo.GetItem(i)
+}
+
+func (f *FileNode) Items() Sequence[Item] {
+ return f.fileInfo.Items()
+}
+
+func (f *FileNode) Tokens() Sequence[Token] {
+ return f.fileInfo.Tokens()
+}
+
+// FileElement is an interface implemented by all AST nodes that are
+// allowed as top-level declarations in the file.
+type FileElement interface {
+ Node
+ fileElement()
+}
+
+var _ FileElement = (*ImportNode)(nil)
+var _ FileElement = (*PackageNode)(nil)
+var _ FileElement = (*OptionNode)(nil)
+var _ FileElement = (*MessageNode)(nil)
+var _ FileElement = (*EnumNode)(nil)
+var _ FileElement = (*ExtendNode)(nil)
+var _ FileElement = (*ServiceNode)(nil)
+var _ FileElement = (*EmptyDeclNode)(nil)
+
+// SyntaxNode represents a syntax declaration, which if present must be
+// the first non-comment content. Example:
+//
+// syntax = "proto2";
+//
+// Files that don't have a syntax node are assumed to use proto2 syntax.
+type SyntaxNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ Equals *RuneNode
+ Syntax StringValueNode
+ Semicolon *RuneNode
+}
+
+// NewSyntaxNode creates a new *SyntaxNode. All four arguments must be non-nil:
+// - keyword: The token corresponding to the "syntax" keyword.
+// - equals: The token corresponding to the "=" rune.
+// - syntax: The actual syntax value, e.g. "proto2" or "proto3".
+// - semicolon: The token corresponding to the ";" rune that ends the declaration.
+func NewSyntaxNode(keyword *KeywordNode, equals *RuneNode, syntax StringValueNode, semicolon *RuneNode) *SyntaxNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if equals == nil {
+ panic("equals is nil")
+ }
+ if syntax == nil {
+ panic("syntax is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ children := []Node{keyword, equals, syntax, semicolon}
+ return &SyntaxNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Equals: equals,
+ Syntax: syntax,
+ Semicolon: semicolon,
+ }
+}
+
+// ImportNode represents an import statement. Example:
+//
+// import "google/protobuf/empty.proto";
+type ImportNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ // Optional; if present indicates this is a public import
+ Public *KeywordNode
+ // Optional; if present indicates this is a weak import
+ Weak *KeywordNode
+ Name StringValueNode
+ Semicolon *RuneNode
+}
+
+// NewImportNode creates a new *ImportNode. The public and weak arguments are optional
+// and only one or the other (or neither) may be specified, not both. When public is
+// non-nil, it indicates the "public" keyword in the import statement and means this is
+// a public import. When weak is non-nil, it indicates the "weak" keyword in the import
+// statement and means this is a weak import. When both are nil, this is a normal import.
+// The other arguments must be non-nil:
+// - keyword: The token corresponding to the "import" keyword.
+// - public: The token corresponding to the optional "public" keyword.
+// - weak: The token corresponding to the optional "weak" keyword.
+// - name: The actual imported file name.
+// - semicolon: The token corresponding to the ";" rune that ends the declaration.
+func NewImportNode(keyword *KeywordNode, public *KeywordNode, weak *KeywordNode, name StringValueNode, semicolon *RuneNode) *ImportNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ numChildren := 3
+ if public != nil || weak != nil {
+ numChildren++
+ }
+ children := make([]Node, 0, numChildren)
+ children = append(children, keyword)
+ if public != nil {
+ children = append(children, public)
+ } else if weak != nil {
+ children = append(children, weak)
+ }
+ children = append(children, name, semicolon)
+
+ return &ImportNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Public: public,
+ Weak: weak,
+ Name: name,
+ Semicolon: semicolon,
+ }
+}
+
+func (*ImportNode) fileElement() {}
+
+// PackageNode represents a package declaration. Example:
+//
+// package foobar.com;
+type PackageNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ Name IdentValueNode
+ Semicolon *RuneNode
+}
+
+func (*PackageNode) fileElement() {}
+
+// NewPackageNode creates a new *PackageNode. All three arguments must be non-nil:
+// - keyword: The token corresponding to the "package" keyword.
+// - name: The package name declared for the file.
+// - semicolon: The token corresponding to the ";" rune that ends the declaration.
+func NewPackageNode(keyword *KeywordNode, name IdentValueNode, semicolon *RuneNode) *PackageNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ children := []Node{keyword, name, semicolon}
+ return &PackageNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Name: name,
+ Semicolon: semicolon,
+ }
+}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/file_info.go b/vendor/github.com/bufbuild/protocompile/ast/file_info.go
new file mode 100644
index 000000000..1de934577
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/file_info.go
@@ -0,0 +1,676 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import (
+ "fmt"
+ "sort"
+ "unicode/utf8"
+)
+
+// FileInfo contains information about the contents of a source file, including
+// details about comments and items. A lexer accumulates these details as it
+// scans the file contents. This allows efficient representation of things like
+// source positions.
+type FileInfo struct {
+ // The name of the source file.
+ name string
+ // The raw contents of the source file.
+ data []byte
+ // The offsets for each line in the file. The value is the zero-based byte
+ // offset for a given line. The line is given by its index. So the value at
+ // index 0 is the offset for the first line (which is always zero). The
+ // value at index 1 is the offset at which the second line begins. Etc.
+ lines []int
+ // The info for every comment in the file. This is empty if the file has no
+ // comments. The first entry corresponds to the first comment in the file,
+ // and so on.
+ comments []commentInfo
+ // The info for every lexed item in the file. The last item in the slice
+ // corresponds to the EOF, so every file (even an empty one) should have at
+ // least one entry. This includes all terminal symbols (tokens) in the AST
+ // as well as all comments.
+ items []itemSpan
+}
+
+type commentInfo struct {
+ // the index of the item, in the file's items slice, that represents this
+ // comment
+ index int
+ // the index of the token to which this comment is attributed.
+ attributedToIndex int
+}
+
+type itemSpan struct {
+ // the offset into the file of the first character of an item.
+ offset int
+ // the length of the item
+ length int
+}
+
+// NewFileInfo creates a new instance for the given file.
+func NewFileInfo(filename string, contents []byte) *FileInfo {
+ return &FileInfo{
+ name: filename,
+ data: contents,
+ lines: []int{0},
+ }
+}
+
+func (f *FileInfo) Name() string {
+ return f.name
+}
+
+// AddLine adds the offset representing the beginning of the "next" line in the file.
+// The first line always starts at offset 0, the second line starts at offset-of-newline-char+1.
+func (f *FileInfo) AddLine(offset int) {
+ if offset < 0 {
+ panic(fmt.Sprintf("invalid offset: %d must not be negative", offset))
+ }
+ if offset > len(f.data) {
+ panic(fmt.Sprintf("invalid offset: %d is greater than file size %d", offset, len(f.data)))
+ }
+
+ if len(f.lines) > 0 {
+ lastOffset := f.lines[len(f.lines)-1]
+ if offset <= lastOffset {
+ panic(fmt.Sprintf("invalid offset: %d is not greater than previously observed line offset %d", offset, lastOffset))
+ }
+ }
+
+ f.lines = append(f.lines, offset)
+}
+
+// AddToken adds info about a token at the given location to this file. It
+// returns a value that allows access to all of the token's details.
+func (f *FileInfo) AddToken(offset, length int) Token {
+ if offset < 0 {
+ panic(fmt.Sprintf("invalid offset: %d must not be negative", offset))
+ }
+ if length < 0 {
+ panic(fmt.Sprintf("invalid length: %d must not be negative", length))
+ }
+ if offset+length > len(f.data) {
+ panic(fmt.Sprintf("invalid offset+length: %d is greater than file size %d", offset+length, len(f.data)))
+ }
+
+ tokenID := len(f.items)
+ if len(f.items) > 0 {
+ lastToken := f.items[tokenID-1]
+ lastEnd := lastToken.offset + lastToken.length - 1
+ if offset <= lastEnd {
+ panic(fmt.Sprintf("invalid offset: %d is not greater than previously observed token end %d", offset, lastEnd))
+ }
+ }
+
+ f.items = append(f.items, itemSpan{offset: offset, length: length})
+ return Token(tokenID)
+}
+
+// AddComment adds info about a comment to this file. Comments must first be
+// added as items via f.AddToken(). The given comment argument is the Token
+// from that step. The given attributedTo argument indicates another token in the
+// file with which the comment is associated. If comment's offset is before that
+// of attributedTo, then this is a leading comment. Otherwise, it is a trailing
+// comment.
+func (f *FileInfo) AddComment(comment, attributedTo Token) Comment {
+ if len(f.comments) > 0 {
+ lastComment := f.comments[len(f.comments)-1]
+ if int(comment) <= lastComment.index {
+ panic(fmt.Sprintf("invalid index: %d is not greater than previously observed comment index %d", comment, lastComment.index))
+ }
+ if int(attributedTo) < lastComment.attributedToIndex {
+ panic(fmt.Sprintf("invalid attribution: %d is not greater than previously observed comment attribution index %d", attributedTo, lastComment.attributedToIndex))
+ }
+ }
+
+ f.comments = append(f.comments, commentInfo{index: int(comment), attributedToIndex: int(attributedTo)})
+ return Comment{
+ fileInfo: f,
+ index: len(f.comments) - 1,
+ }
+}
+
+// NodeInfo returns details from the original source for the given AST node.
+//
+// If the given n is out of range, this returns an invalid NodeInfo (i.e.
+// nodeInfo.IsValid() returns false). If the given n is not out of range but
+// also from a different file than f, then the result is undefined.
+func (f *FileInfo) NodeInfo(n Node) NodeInfo {
+ return f.nodeInfo(int(n.Start()), int(n.End()))
+}
+
+// TokenInfo returns details from the original source for the given token.
+//
+// If the given t is out of range, this returns an invalid NodeInfo (i.e.
+// nodeInfo.IsValid() returns false). If the given t is not out of range but
+// also from a different file than f, then the result is undefined.
+func (f *FileInfo) TokenInfo(t Token) NodeInfo {
+ return f.nodeInfo(int(t), int(t))
+}
+
+func (f *FileInfo) nodeInfo(start, end int) NodeInfo {
+ if start < 0 || start >= len(f.items) {
+ return NodeInfo{}
+ }
+ if end < 0 || end >= len(f.items) {
+ return NodeInfo{}
+ }
+ return NodeInfo{fileInfo: f, startIndex: start, endIndex: end}
+}
+
+// ItemInfo returns details from the original source for the given item.
+//
+// If the given i is out of range, this returns nil. If the given i is not
+// out of range but also from a different file than f, then the result is
+// undefined.
+func (f *FileInfo) ItemInfo(i Item) ItemInfo {
+ tok, cmt := f.GetItem(i)
+ if tok != TokenError {
+ return f.TokenInfo(tok)
+ }
+ if cmt.IsValid() {
+ return cmt
+ }
+ return nil
+}
+
+// GetItem returns the token or comment represented by the given item. Only one
+// of the return values will be valid. If the item is a token then the returned
+// comment will be a zero value and thus invalid (i.e. comment.IsValid() returns
+// false). If the item is a comment then the returned token will be TokenError.
+//
+// If the given i is out of range, this returns (TokenError, Comment{}). If the
+// given i is not out of range but also from a different file than f, then
+// the result is undefined.
+func (f *FileInfo) GetItem(i Item) (Token, Comment) {
+ if i < 0 || int(i) >= len(f.items) {
+ return TokenError, Comment{}
+ }
+ if !f.isComment(i) {
+ return Token(i), Comment{}
+ }
+ // It's a comment, so find its location in f.comments
+ c := sort.Search(len(f.comments), func(c int) bool {
+ return f.comments[c].index >= int(i)
+ })
+ if c < len(f.comments) && f.comments[c].index == int(i) {
+ return TokenError, Comment{fileInfo: f, index: c}
+ }
+ // f.isComment(i) returned true, but we couldn't find it
+ // in f.comments? Uh oh... that shouldn't be possible.
+ return TokenError, Comment{}
+}
+
+func (f *FileInfo) isDummyFile() bool {
+ return f == nil || f.lines == nil
+}
+
+// Sequence represents a navigable sequence of elements.
+type Sequence[T any] interface {
+ // First returns the first element in the sequence. The bool return
+ // is false if this sequence contains no elements. For example, an
+ // empty file has no items or tokens.
+ First() (T, bool)
+ // Next returns the next element in the sequence that comes after
+ // the given element. The bool returns is false if there is no next
+ // item (i.e. the given element is the last one). It also returns
+ // false if the given element is invalid.
+ Next(T) (T, bool)
+ // Last returns the last element in the sequence. The bool return
+ // is false if this sequence contains no elements. For example, an
+ // empty file has no items or tokens.
+ Last() (T, bool)
+ // Previous returns the previous element in the sequence that comes
+ // before the given element. The bool returns is false if there is no
+ // previous item (i.e. the given element is the first one). It also
+ // returns false if the given element is invalid.
+ Previous(T) (T, bool)
+}
+
+func (f *FileInfo) Items() Sequence[Item] {
+ return items{fileInfo: f}
+}
+
+func (f *FileInfo) Tokens() Sequence[Token] {
+ return tokens{fileInfo: f}
+}
+
+type items struct {
+ fileInfo *FileInfo
+}
+
+func (i items) First() (Item, bool) {
+ if len(i.fileInfo.items) == 0 {
+ return 0, false
+ }
+ return 0, true
+}
+
+func (i items) Next(item Item) (Item, bool) {
+ if item < 0 || int(item) >= len(i.fileInfo.items)-1 {
+ return 0, false
+ }
+ return i.fileInfo.itemForward(item+1, true)
+}
+
+func (i items) Last() (Item, bool) {
+ if len(i.fileInfo.items) == 0 {
+ return 0, false
+ }
+ return Item(len(i.fileInfo.items) - 1), true
+}
+
+func (i items) Previous(item Item) (Item, bool) {
+ if item <= 0 || int(item) >= len(i.fileInfo.items) {
+ return 0, false
+ }
+ return i.fileInfo.itemBackward(item-1, true)
+}
+
+type tokens struct {
+ fileInfo *FileInfo
+}
+
+func (t tokens) First() (Token, bool) {
+ i, ok := t.fileInfo.itemForward(0, false)
+ return Token(i), ok
+}
+
+func (t tokens) Next(tok Token) (Token, bool) {
+ if tok < 0 || int(tok) >= len(t.fileInfo.items)-1 {
+ return 0, false
+ }
+ i, ok := t.fileInfo.itemForward(Item(tok+1), false)
+ return Token(i), ok
+}
+
+func (t tokens) Last() (Token, bool) {
+ i, ok := t.fileInfo.itemBackward(Item(len(t.fileInfo.items))-1, false)
+ return Token(i), ok
+}
+
+func (t tokens) Previous(tok Token) (Token, bool) {
+ if tok <= 0 || int(tok) >= len(t.fileInfo.items) {
+ return 0, false
+ }
+ i, ok := t.fileInfo.itemBackward(Item(tok-1), false)
+ return Token(i), ok
+}
+
+func (f *FileInfo) itemForward(i Item, allowComment bool) (Item, bool) {
+ end := Item(len(f.items))
+ for i < end {
+ if allowComment || !f.isComment(i) {
+ return i, true
+ }
+ i++
+ }
+ return 0, false
+}
+
+func (f *FileInfo) itemBackward(i Item, allowComment bool) (Item, bool) {
+ for i >= 0 {
+ if allowComment || !f.isComment(i) {
+ return i, true
+ }
+ i--
+ }
+ return 0, false
+}
+
+// isComment is comment returns true if i refers to a comment.
+// (If it returns false, i refers to a token.)
+func (f *FileInfo) isComment(i Item) bool {
+ item := f.items[i]
+ if item.length < 2 {
+ return false
+ }
+ // see if item text starts with "//" or "/*"
+ if f.data[item.offset] != '/' {
+ return false
+ }
+ c := f.data[item.offset+1]
+ return c == '/' || c == '*'
+}
+
+func (f *FileInfo) SourcePos(offset int) SourcePos {
+ lineNumber := sort.Search(len(f.lines), func(n int) bool {
+ return f.lines[n] > offset
+ })
+
+ // If it weren't for tabs and multi-byte unicode characters, we
+ // could trivially compute the column just based on offset and the
+ // starting offset of lineNumber :(
+ // Wish this were more efficient... that would require also storing
+ // computed line+column information, which would triple the size of
+ // f's items slice...
+ col := 0
+ for i := f.lines[lineNumber-1]; i < offset; i++ {
+ if f.data[i] == '\t' {
+ nextTabStop := 8 - (col % 8)
+ col += nextTabStop
+ } else if utf8.RuneStart(f.data[i]) {
+ col++
+ }
+ }
+
+ return SourcePos{
+ Filename: f.name,
+ Offset: offset,
+ Line: lineNumber,
+ // Columns are 1-indexed in this AST
+ Col: col + 1,
+ }
+}
+
+// Token represents a single lexed token.
+type Token int
+
+// TokenError indicates an invalid token. It is returned from query
+// functions when no valid token satisfies the request.
+const TokenError = Token(-1)
+
+// AsItem returns the Item that corresponds to t.
+func (t Token) AsItem() Item {
+ return Item(t)
+}
+
+func (t Token) asTerminalNode() terminalNode {
+ return terminalNode(t)
+}
+
+// Item represents an item lexed from source. It represents either
+// a Token or a Comment.
+type Item int
+
+// ItemInfo provides details about an item's location in the source file and
+// its contents.
+type ItemInfo interface {
+ Start() SourcePos
+ End() SourcePos
+ LeadingWhitespace() string
+ RawText() string
+}
+
+// NodeInfo represents the details for a node or token in the source file's AST.
+// It provides access to information about the node's location in the source
+// file. It also provides access to the original text in the source file (with
+// all the original formatting intact) and also provides access to surrounding
+// comments.
+type NodeInfo struct {
+ fileInfo *FileInfo
+ startIndex, endIndex int
+}
+
+var _ ItemInfo = NodeInfo{}
+
+// IsValid returns true if this node info is valid. If n is a zero-value struct,
+// it is not valid.
+func (n NodeInfo) IsValid() bool {
+ return n.fileInfo != nil
+}
+
+// Start returns the starting position of the element. This is the first
+// character of the node or token.
+func (n NodeInfo) Start() SourcePos {
+ if n.fileInfo.isDummyFile() {
+ return UnknownPos(n.fileInfo.name)
+ }
+
+ tok := n.fileInfo.items[n.startIndex]
+ return n.fileInfo.SourcePos(tok.offset)
+}
+
+// End returns the ending position of the element, exclusive. This is the
+// location after the last character of the node or token. If n returns
+// the same position for Start() and End(), the element in source had a
+// length of zero (which should only happen for the special EOF token
+// that designates the end of the file).
+func (n NodeInfo) End() SourcePos {
+ if n.fileInfo.isDummyFile() {
+ return UnknownPos(n.fileInfo.name)
+ }
+
+ tok := n.fileInfo.items[n.endIndex]
+ // find offset of last character in the span
+ offset := tok.offset
+ if tok.length > 0 {
+ offset += tok.length - 1
+ }
+ pos := n.fileInfo.SourcePos(offset)
+ if tok.length > 0 {
+ // We return "open range", so end is the position *after* the
+ // last character in the span. So we adjust
+ pos.Col++
+ }
+ return pos
+}
+
+// LeadingWhitespace returns any whitespace prior to the element. If there
+// were comments in between this element and the previous one, this will
+// return the whitespace between the last such comment in the element. If
+// there were no such comments, this returns the whitespace between the
+// previous element and the current one.
+func (n NodeInfo) LeadingWhitespace() string {
+ if n.fileInfo.isDummyFile() {
+ return ""
+ }
+
+ tok := n.fileInfo.items[n.startIndex]
+ var prevEnd int
+ if n.startIndex > 0 {
+ prevTok := n.fileInfo.items[n.startIndex-1]
+ prevEnd = prevTok.offset + prevTok.length
+ }
+ return string(n.fileInfo.data[prevEnd:tok.offset])
+}
+
+// LeadingComments returns all comments in the source that exist between the
+// element and the previous element, except for any trailing comment on the
+// previous element.
+func (n NodeInfo) LeadingComments() Comments {
+ if n.fileInfo.isDummyFile() {
+ return EmptyComments
+ }
+
+ start := sort.Search(len(n.fileInfo.comments), func(i int) bool {
+ return n.fileInfo.comments[i].attributedToIndex >= n.startIndex
+ })
+
+ if start == len(n.fileInfo.comments) || n.fileInfo.comments[start].attributedToIndex != n.startIndex {
+ // no comments associated with this token
+ return EmptyComments
+ }
+
+ numComments := 0
+ for i := start; i < len(n.fileInfo.comments); i++ {
+ comment := n.fileInfo.comments[i]
+ if comment.attributedToIndex == n.startIndex &&
+ comment.index < n.startIndex {
+ numComments++
+ } else {
+ break
+ }
+ }
+
+ return Comments{
+ fileInfo: n.fileInfo,
+ first: start,
+ num: numComments,
+ }
+}
+
+// TrailingComments returns the trailing comment for the element, if any.
+// An element will have a trailing comment only if it is the last token
+// on a line and is followed by a comment on the same line. Typically, the
+// following comment is a line-style comment (starting with "//").
+//
+// If the following comment is a block-style comment that spans multiple
+// lines, and the next token is on the same line as the end of the comment,
+// the comment is NOT considered a trailing comment.
+//
+// Examples:
+//
+// foo // this is a trailing comment for foo
+//
+// bar /* this is a trailing comment for bar */
+//
+// baz /* this is a trailing
+// comment for baz */
+//
+// fizz /* this is NOT a trailing
+// comment for fizz because
+// its on the same line as the
+// following token buzz */ buzz
+func (n NodeInfo) TrailingComments() Comments {
+ if n.fileInfo.isDummyFile() {
+ return EmptyComments
+ }
+
+ start := sort.Search(len(n.fileInfo.comments), func(i int) bool {
+ comment := n.fileInfo.comments[i]
+ return comment.attributedToIndex >= n.endIndex &&
+ comment.index > n.endIndex
+ })
+
+ if start == len(n.fileInfo.comments) || n.fileInfo.comments[start].attributedToIndex != n.endIndex {
+ // no comments associated with this token
+ return EmptyComments
+ }
+
+ numComments := 0
+ for i := start; i < len(n.fileInfo.comments); i++ {
+ comment := n.fileInfo.comments[i]
+ if comment.attributedToIndex == n.endIndex {
+ numComments++
+ } else {
+ break
+ }
+ }
+
+ return Comments{
+ fileInfo: n.fileInfo,
+ first: start,
+ num: numComments,
+ }
+}
+
+// RawText returns the actual text in the source file that corresponds to the
+// element. If the element is a node in the AST that encompasses multiple
+// items (like an entire declaration), the full text of all items is returned
+// including any interior whitespace and comments.
+func (n NodeInfo) RawText() string {
+ startTok := n.fileInfo.items[n.startIndex]
+ endTok := n.fileInfo.items[n.endIndex]
+ return string(n.fileInfo.data[startTok.offset : endTok.offset+endTok.length])
+}
+
+// SourcePos identifies a location in a proto source file.
+type SourcePos struct {
+ Filename string
+ // The line and column numbers for this position. These are
+ // one-based, so the first line and column is 1 (not zero). If
+ // either is zero, then the line and column are unknown and
+ // only the file name is known.
+ Line, Col int
+ // The offset, in bytes, from the beginning of the file. This
+ // is zero-based: the first character in the file is offset zero.
+ Offset int
+}
+
+func (pos SourcePos) String() string {
+ if pos.Line <= 0 || pos.Col <= 0 {
+ return pos.Filename
+ }
+ return fmt.Sprintf("%s:%d:%d", pos.Filename, pos.Line, pos.Col)
+}
+
+// Comments represents a range of sequential comments in a source file
+// (e.g. no interleaving items or AST nodes).
+type Comments struct {
+ fileInfo *FileInfo
+ first, num int
+}
+
+// EmptyComments is an empty set of comments.
+var EmptyComments = Comments{}
+
+// Len returns the number of comments in c.
+func (c Comments) Len() int {
+ return c.num
+}
+
+func (c Comments) Index(i int) Comment {
+ if i < 0 || i >= c.num {
+ panic(fmt.Sprintf("index %d out of range (len = %d)", i, c.num))
+ }
+ return Comment{
+ fileInfo: c.fileInfo,
+ index: c.first + i,
+ }
+}
+
+// Comment represents a single comment in a source file. It indicates
+// the position of the comment and its contents. A single comment means
+// one line-style comment ("//" to end of line) or one block comment
+// ("/*" through "*/"). If a longer comment uses multiple line comments,
+// each line is considered to be a separate comment. For example:
+//
+// // This is a single comment, and
+// // this is a separate comment.
+type Comment struct {
+ fileInfo *FileInfo
+ index int
+}
+
+var _ ItemInfo = Comment{}
+
+// IsValid returns true if this comment is valid. If this comment is
+// a zero-value struct, it is not valid.
+func (c Comment) IsValid() bool {
+ return c.fileInfo != nil && c.index >= 0
+}
+
+// AsItem returns the Item that corresponds to c.
+func (c Comment) AsItem() Item {
+ return Item(c.fileInfo.comments[c.index].index)
+}
+
+func (c Comment) Start() SourcePos {
+ span := c.fileInfo.items[c.AsItem()]
+ return c.fileInfo.SourcePos(span.offset)
+}
+
+func (c Comment) End() SourcePos {
+ span := c.fileInfo.items[c.AsItem()]
+ return c.fileInfo.SourcePos(span.offset + span.length - 1)
+}
+
+func (c Comment) LeadingWhitespace() string {
+ item := c.AsItem()
+ span := c.fileInfo.items[item]
+ var prevEnd int
+ if item > 0 {
+ prevItem := c.fileInfo.items[item-1]
+ prevEnd = prevItem.offset + prevItem.length
+ }
+ return string(c.fileInfo.data[prevEnd:span.offset])
+}
+
+func (c Comment) RawText() string {
+ span := c.fileInfo.items[c.AsItem()]
+ return string(c.fileInfo.data[span.offset : span.offset+span.length])
+}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/identifiers.go b/vendor/github.com/bufbuild/protocompile/ast/identifiers.go
new file mode 100644
index 000000000..275999291
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/identifiers.go
@@ -0,0 +1,148 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import (
+ "fmt"
+ "strings"
+)
+
+// Identifier is a possibly-qualified name. This is used to distinguish
+// ValueNode values that are references/identifiers vs. those that are
+// string literals.
+type Identifier string
+
+// IdentValueNode is an AST node that represents an identifier.
+type IdentValueNode interface {
+ ValueNode
+ AsIdentifier() Identifier
+}
+
+var _ IdentValueNode = (*IdentNode)(nil)
+var _ IdentValueNode = (*CompoundIdentNode)(nil)
+
+// IdentNode represents a simple, unqualified identifier. These are used to name
+// elements declared in a protobuf file or to refer to elements. Example:
+//
+// foobar
+type IdentNode struct {
+ terminalNode
+ Val string
+}
+
+// NewIdentNode creates a new *IdentNode. The given val is the identifier text.
+func NewIdentNode(val string, tok Token) *IdentNode {
+ return &IdentNode{
+ terminalNode: tok.asTerminalNode(),
+ Val: val,
+ }
+}
+
+func (n *IdentNode) Value() interface{} {
+ return n.AsIdentifier()
+}
+
+func (n *IdentNode) AsIdentifier() Identifier {
+ return Identifier(n.Val)
+}
+
+// ToKeyword is used to convert identifiers to keywords. Since keywords are not
+// reserved in the protobuf language, they are initially lexed as identifiers
+// and then converted to keywords based on context.
+func (n *IdentNode) ToKeyword() *KeywordNode {
+ return (*KeywordNode)(n)
+}
+
+// CompoundIdentNode represents a qualified identifier. A qualified identifier
+// has at least one dot and possibly multiple identifier names (all separated by
+// dots). If the identifier has a leading dot, then it is a *fully* qualified
+// identifier. Example:
+//
+// .com.foobar.Baz
+type CompoundIdentNode struct {
+ compositeNode
+ // Optional leading dot, indicating that the identifier is fully qualified.
+ LeadingDot *RuneNode
+ Components []*IdentNode
+ // Dots[0] is the dot after Components[0]. The length of Dots is always
+ // one less than the length of Components.
+ Dots []*RuneNode
+ // The text value of the identifier, with all components and dots
+ // concatenated.
+ Val string
+}
+
+// NewCompoundIdentNode creates a *CompoundIdentNode. The leadingDot may be nil.
+// The dots arg must have a length that is one less than the length of
+// components. The components arg must not be empty.
+func NewCompoundIdentNode(leadingDot *RuneNode, components []*IdentNode, dots []*RuneNode) *CompoundIdentNode {
+ if len(components) == 0 {
+ panic("must have at least one component")
+ }
+ if len(dots) != len(components)-1 {
+ panic(fmt.Sprintf("%d components requires %d dots, not %d", len(components), len(components)-1, len(dots)))
+ }
+ numChildren := len(components)*2 - 1
+ if leadingDot != nil {
+ numChildren++
+ }
+ children := make([]Node, 0, numChildren)
+ var b strings.Builder
+ if leadingDot != nil {
+ children = append(children, leadingDot)
+ b.WriteRune(leadingDot.Rune)
+ }
+ for i, comp := range components {
+ if i > 0 {
+ dot := dots[i-1]
+ children = append(children, dot)
+ b.WriteRune(dot.Rune)
+ }
+ children = append(children, comp)
+ b.WriteString(comp.Val)
+ }
+ return &CompoundIdentNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ LeadingDot: leadingDot,
+ Components: components,
+ Dots: dots,
+ Val: b.String(),
+ }
+}
+
+func (n *CompoundIdentNode) Value() interface{} {
+ return n.AsIdentifier()
+}
+
+func (n *CompoundIdentNode) AsIdentifier() Identifier {
+ return Identifier(n.Val)
+}
+
+// KeywordNode is an AST node that represents a keyword. Keywords are
+// like identifiers, but they have special meaning in particular contexts.
+// Example:
+//
+// message
+type KeywordNode IdentNode
+
+// NewKeywordNode creates a new *KeywordNode. The given val is the keyword.
+func NewKeywordNode(val string, tok Token) *KeywordNode {
+ return &KeywordNode{
+ terminalNode: tok.asTerminalNode(),
+ Val: val,
+ }
+}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/message.go b/vendor/github.com/bufbuild/protocompile/ast/message.go
new file mode 100644
index 000000000..00dfe45f8
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/message.go
@@ -0,0 +1,213 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import "fmt"
+
+// MessageDeclNode is a node in the AST that defines a message type. This
+// includes normal message fields as well as implicit messages:
+// - *MessageNode
+// - *GroupNode (the group is a field and inline message type)
+// - *MapFieldNode (map fields implicitly define a MapEntry message type)
+//
+// This also allows NoSourceNode to be used in place of one of the above
+// for some usages.
+type MessageDeclNode interface {
+ Node
+ MessageName() Node
+}
+
+var _ MessageDeclNode = (*MessageNode)(nil)
+var _ MessageDeclNode = (*GroupNode)(nil)
+var _ MessageDeclNode = (*MapFieldNode)(nil)
+var _ MessageDeclNode = NoSourceNode{}
+
+// MessageNode represents a message declaration. Example:
+//
+// message Foo {
+// string name = 1;
+// repeated string labels = 2;
+// bytes extra = 3;
+// }
+type MessageNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ Name *IdentNode
+ MessageBody
+}
+
+func (*MessageNode) fileElement() {}
+func (*MessageNode) msgElement() {}
+
+// NewMessageNode creates a new *MessageNode. All arguments must be non-nil.
+// - keyword: The token corresponding to the "message" keyword.
+// - name: The token corresponding to the field's name.
+// - openBrace: The token corresponding to the "{" rune that starts the body.
+// - decls: All declarations inside the message body.
+// - closeBrace: The token corresponding to the "}" rune that ends the body.
+func NewMessageNode(keyword *KeywordNode, name *IdentNode, openBrace *RuneNode, decls []MessageElement, closeBrace *RuneNode) *MessageNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if openBrace == nil {
+ panic("openBrace is nil")
+ }
+ if closeBrace == nil {
+ panic("closeBrace is nil")
+ }
+ children := make([]Node, 0, 4+len(decls))
+ children = append(children, keyword, name, openBrace)
+ for _, decl := range decls {
+ children = append(children, decl)
+ }
+ children = append(children, closeBrace)
+
+ ret := &MessageNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Name: name,
+ }
+ populateMessageBody(&ret.MessageBody, openBrace, decls, closeBrace)
+ return ret
+}
+
+func (n *MessageNode) MessageName() Node {
+ return n.Name
+}
+
+// MessageBody represents the body of a message. It is used by both
+// MessageNodes and GroupNodes.
+type MessageBody struct {
+ OpenBrace *RuneNode
+ Decls []MessageElement
+ CloseBrace *RuneNode
+}
+
+func populateMessageBody(m *MessageBody, openBrace *RuneNode, decls []MessageElement, closeBrace *RuneNode) {
+ m.OpenBrace = openBrace
+ m.Decls = decls
+ for _, decl := range decls {
+ switch decl.(type) {
+ case *OptionNode, *FieldNode, *MapFieldNode, *GroupNode, *OneOfNode,
+ *MessageNode, *EnumNode, *ExtendNode, *ExtensionRangeNode,
+ *ReservedNode, *EmptyDeclNode:
+ default:
+ panic(fmt.Sprintf("invalid MessageElement type: %T", decl))
+ }
+ }
+ m.CloseBrace = closeBrace
+}
+
+// MessageElement is an interface implemented by all AST nodes that can
+// appear in a message body.
+type MessageElement interface {
+ Node
+ msgElement()
+}
+
+var _ MessageElement = (*OptionNode)(nil)
+var _ MessageElement = (*FieldNode)(nil)
+var _ MessageElement = (*MapFieldNode)(nil)
+var _ MessageElement = (*OneOfNode)(nil)
+var _ MessageElement = (*GroupNode)(nil)
+var _ MessageElement = (*MessageNode)(nil)
+var _ MessageElement = (*EnumNode)(nil)
+var _ MessageElement = (*ExtendNode)(nil)
+var _ MessageElement = (*ExtensionRangeNode)(nil)
+var _ MessageElement = (*ReservedNode)(nil)
+var _ MessageElement = (*EmptyDeclNode)(nil)
+
+// ExtendNode represents a declaration of extension fields. Example:
+//
+// extend google.protobuf.FieldOptions {
+// bool redacted = 33333;
+// }
+type ExtendNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ Extendee IdentValueNode
+ OpenBrace *RuneNode
+ Decls []ExtendElement
+ CloseBrace *RuneNode
+}
+
+func (*ExtendNode) fileElement() {}
+func (*ExtendNode) msgElement() {}
+
+// NewExtendNode creates a new *ExtendNode. All arguments must be non-nil.
+// - keyword: The token corresponding to the "extend" keyword.
+// - extendee: The token corresponding to the name of the extended message.
+// - openBrace: The token corresponding to the "{" rune that starts the body.
+// - decls: All declarations inside the message body.
+// - closeBrace: The token corresponding to the "}" rune that ends the body.
+func NewExtendNode(keyword *KeywordNode, extendee IdentValueNode, openBrace *RuneNode, decls []ExtendElement, closeBrace *RuneNode) *ExtendNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if extendee == nil {
+ panic("extendee is nil")
+ }
+ if openBrace == nil {
+ panic("openBrace is nil")
+ }
+ if closeBrace == nil {
+ panic("closeBrace is nil")
+ }
+ children := make([]Node, 0, 4+len(decls))
+ children = append(children, keyword, extendee, openBrace)
+ for _, decl := range decls {
+ children = append(children, decl)
+ }
+ children = append(children, closeBrace)
+
+ ret := &ExtendNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Extendee: extendee,
+ OpenBrace: openBrace,
+ Decls: decls,
+ CloseBrace: closeBrace,
+ }
+ for _, decl := range decls {
+ switch decl := decl.(type) {
+ case *FieldNode:
+ decl.Extendee = ret
+ case *GroupNode:
+ decl.Extendee = ret
+ case *EmptyDeclNode:
+ default:
+ panic(fmt.Sprintf("invalid ExtendElement type: %T", decl))
+ }
+ }
+ return ret
+}
+
+// ExtendElement is an interface implemented by all AST nodes that can
+// appear in the body of an extends declaration.
+type ExtendElement interface {
+ Node
+ extendElement()
+}
+
+var _ ExtendElement = (*FieldNode)(nil)
+var _ ExtendElement = (*GroupNode)(nil)
+var _ ExtendElement = (*EmptyDeclNode)(nil)
diff --git a/vendor/github.com/bufbuild/protocompile/ast/no_source.go b/vendor/github.com/bufbuild/protocompile/ast/no_source.go
new file mode 100644
index 000000000..d66d93957
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/no_source.go
@@ -0,0 +1,119 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+// UnknownPos is a placeholder position when only the source file
+// name is known.
+func UnknownPos(filename string) SourcePos {
+ return SourcePos{Filename: filename}
+}
+
+// NoSourceNode is a placeholder AST node that implements numerous
+// interfaces in this package. It can be used to represent an AST
+// element for a file whose source is not available.
+type NoSourceNode struct {
+ filename string
+}
+
+// NewNoSourceNode creates a new NoSourceNode for the given filename.
+func NewNoSourceNode(filename string) NoSourceNode {
+ return NoSourceNode{filename: filename}
+}
+
+func (n NoSourceNode) Name() string {
+ return n.filename
+}
+
+func (n NoSourceNode) Start() Token {
+ return 0
+}
+
+func (n NoSourceNode) End() Token {
+ return 0
+}
+
+func (n NoSourceNode) NodeInfo(Node) NodeInfo {
+ return NodeInfo{
+ fileInfo: &FileInfo{name: n.filename},
+ }
+}
+
+func (n NoSourceNode) GetSyntax() Node {
+ return n
+}
+
+func (n NoSourceNode) GetName() Node {
+ return n
+}
+
+func (n NoSourceNode) GetValue() ValueNode {
+ return n
+}
+
+func (n NoSourceNode) FieldLabel() Node {
+ return n
+}
+
+func (n NoSourceNode) FieldName() Node {
+ return n
+}
+
+func (n NoSourceNode) FieldType() Node {
+ return n
+}
+
+func (n NoSourceNode) FieldTag() Node {
+ return n
+}
+
+func (n NoSourceNode) FieldExtendee() Node {
+ return n
+}
+
+func (n NoSourceNode) GetGroupKeyword() Node {
+ return n
+}
+
+func (n NoSourceNode) GetOptions() *CompactOptionsNode {
+ return nil
+}
+
+func (n NoSourceNode) RangeStart() Node {
+ return n
+}
+
+func (n NoSourceNode) RangeEnd() Node {
+ return n
+}
+
+func (n NoSourceNode) GetNumber() Node {
+ return n
+}
+
+func (n NoSourceNode) MessageName() Node {
+ return n
+}
+
+func (n NoSourceNode) GetInputType() Node {
+ return n
+}
+
+func (n NoSourceNode) GetOutputType() Node {
+ return n
+}
+
+func (n NoSourceNode) Value() interface{} {
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/node.go b/vendor/github.com/bufbuild/protocompile/ast/node.go
new file mode 100644
index 000000000..63a76c798
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/node.go
@@ -0,0 +1,139 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+// Node is the interface implemented by all nodes in the AST. It
+// provides information about the span of this AST node in terms
+// of location in the source file. It also provides information
+// about all prior comments (attached as leading comments) and
+// optional subsequent comments (attached as trailing comments).
+type Node interface {
+ Start() Token
+ End() Token
+}
+
+// TerminalNode represents a leaf in the AST. These represent
+// the items/lexemes in the protobuf language. Comments and
+// whitespace are accumulated by the lexer and associated with
+// the following lexed token.
+type TerminalNode interface {
+ Node
+ Token() Token
+}
+
+var _ TerminalNode = (*StringLiteralNode)(nil)
+var _ TerminalNode = (*UintLiteralNode)(nil)
+var _ TerminalNode = (*FloatLiteralNode)(nil)
+var _ TerminalNode = (*IdentNode)(nil)
+var _ TerminalNode = (*SpecialFloatLiteralNode)(nil)
+var _ TerminalNode = (*KeywordNode)(nil)
+var _ TerminalNode = (*RuneNode)(nil)
+
+// CompositeNode represents any non-terminal node in the tree. These
+// are interior or root nodes and have child nodes.
+type CompositeNode interface {
+ Node
+ // Children contains all AST nodes that are immediate children of this one.
+ Children() []Node
+}
+
+// terminalNode contains bookkeeping shared by all TerminalNode
+// implementations. It is embedded in all such node types in this
+// package. It provides the implementation of the TerminalNode
+// interface.
+type terminalNode Token
+
+func (n terminalNode) Start() Token {
+ return Token(n)
+}
+
+func (n terminalNode) End() Token {
+ return Token(n)
+}
+
+func (n terminalNode) Token() Token {
+ return Token(n)
+}
+
+// compositeNode contains bookkeeping shared by all CompositeNode
+// implementations. It is embedded in all such node types in this
+// package. It provides the implementation of the CompositeNode
+// interface.
+type compositeNode struct {
+ children []Node
+}
+
+func (n *compositeNode) Children() []Node {
+ return n.children
+}
+
+func (n *compositeNode) Start() Token {
+ return n.children[0].Start()
+}
+
+func (n *compositeNode) End() Token {
+ return n.children[len(n.children)-1].End()
+}
+
+// RuneNode represents a single rune in protobuf source. Runes
+// are typically collected into items, but some runes stand on
+// their own, such as punctuation/symbols like commas, semicolons,
+// equals signs, open and close symbols (braces, brackets, angles,
+// and parentheses), and periods/dots.
+// TODO: make this more compact; if runes don't have attributed comments
+// then we don't need a Token to represent them and only need an offset
+// into the file's contents.
+type RuneNode struct {
+ terminalNode
+ Rune rune
+}
+
+// NewRuneNode creates a new *RuneNode with the given properties.
+func NewRuneNode(r rune, tok Token) *RuneNode {
+ return &RuneNode{
+ terminalNode: tok.asTerminalNode(),
+ Rune: r,
+ }
+}
+
+// EmptyDeclNode represents an empty declaration in protobuf source.
+// These amount to extra semicolons, with no actual content preceding
+// the semicolon.
+type EmptyDeclNode struct {
+ compositeNode
+ Semicolon *RuneNode
+}
+
+// NewEmptyDeclNode creates a new *EmptyDeclNode. The one argument must
+// be non-nil.
+func NewEmptyDeclNode(semicolon *RuneNode) *EmptyDeclNode {
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ return &EmptyDeclNode{
+ compositeNode: compositeNode{
+ children: []Node{semicolon},
+ },
+ Semicolon: semicolon,
+ }
+}
+
+func (e *EmptyDeclNode) fileElement() {}
+func (e *EmptyDeclNode) msgElement() {}
+func (e *EmptyDeclNode) extendElement() {}
+func (e *EmptyDeclNode) oneOfElement() {}
+func (e *EmptyDeclNode) enumElement() {}
+func (e *EmptyDeclNode) serviceElement() {}
+func (e *EmptyDeclNode) methodElement() {}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/options.go b/vendor/github.com/bufbuild/protocompile/ast/options.go
new file mode 100644
index 000000000..497ad44b5
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/options.go
@@ -0,0 +1,373 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import "fmt"
+
+// OptionDeclNode is a placeholder interface for AST nodes that represent
+// options. This allows NoSourceNode to be used in place of *OptionNode
+// for some usages.
+type OptionDeclNode interface {
+ Node
+ GetName() Node
+ GetValue() ValueNode
+}
+
+var _ OptionDeclNode = (*OptionNode)(nil)
+var _ OptionDeclNode = NoSourceNode{}
+
+// OptionNode represents the declaration of a single option for an element.
+// It is used both for normal option declarations (start with "option" keyword
+// and end with semicolon) and for compact options found in fields, enum values,
+// and extension ranges. Example:
+//
+// option (custom.option) = "foo";
+type OptionNode struct {
+ compositeNode
+ Keyword *KeywordNode // absent for compact options
+ Name *OptionNameNode
+ Equals *RuneNode
+ Val ValueNode
+ Semicolon *RuneNode // absent for compact options
+}
+
+func (n *OptionNode) fileElement() {}
+func (n *OptionNode) msgElement() {}
+func (n *OptionNode) oneOfElement() {}
+func (n *OptionNode) enumElement() {}
+func (n *OptionNode) serviceElement() {}
+func (n *OptionNode) methodElement() {}
+
+// NewOptionNode creates a new *OptionNode for a full option declaration (as
+// used in files, messages, oneofs, enums, services, and methods). All arguments
+// must be non-nil. (Also see NewCompactOptionNode.)
+// - keyword: The token corresponding to the "option" keyword.
+// - name: The token corresponding to the name of the option.
+// - equals: The token corresponding to the "=" rune after the name.
+// - val: The token corresponding to the option value.
+// - semicolon: The token corresponding to the ";" rune that ends the declaration.
+func NewOptionNode(keyword *KeywordNode, name *OptionNameNode, equals *RuneNode, val ValueNode, semicolon *RuneNode) *OptionNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if equals == nil {
+ panic("equals is nil")
+ }
+ if val == nil {
+ panic("val is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ children := []Node{keyword, name, equals, val, semicolon}
+ return &OptionNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Name: name,
+ Equals: equals,
+ Val: val,
+ Semicolon: semicolon,
+ }
+}
+
+// NewCompactOptionNode creates a new *OptionNode for a full compact declaration
+// (as used in fields, enum values, and extension ranges). All arguments must be
+// non-nil.
+// - name: The token corresponding to the name of the option.
+// - equals: The token corresponding to the "=" rune after the name.
+// - val: The token corresponding to the option value.
+func NewCompactOptionNode(name *OptionNameNode, equals *RuneNode, val ValueNode) *OptionNode {
+ if name == nil {
+ panic("name is nil")
+ }
+ if equals == nil {
+ panic("equals is nil")
+ }
+ if val == nil {
+ panic("val is nil")
+ }
+ children := []Node{name, equals, val}
+ return &OptionNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Name: name,
+ Equals: equals,
+ Val: val,
+ }
+}
+
+func (n *OptionNode) GetName() Node {
+ return n.Name
+}
+
+func (n *OptionNode) GetValue() ValueNode {
+ return n.Val
+}
+
+// OptionNameNode represents an option name or even a traversal through message
+// types to name a nested option field. Example:
+//
+// (foo.bar).baz.(bob)
+type OptionNameNode struct {
+ compositeNode
+ Parts []*FieldReferenceNode
+ // Dots represent the separating '.' characters between name parts. The
+ // length of this slice must be exactly len(Parts)-1, each item in Parts
+ // having a corresponding item in this slice *except the last* (since a
+ // trailing dot is not allowed).
+ //
+ // These do *not* include dots that are inside of an extension name. For
+ // example: (foo.bar).baz.(bob) has three parts:
+ // 1. (foo.bar) - an extension name
+ // 2. baz - a regular field in foo.bar
+ // 3. (bob) - an extension field in baz
+ // Note that the dot in foo.bar will thus not be present in Dots but is
+ // instead in Parts[0].
+ Dots []*RuneNode
+}
+
+// NewOptionNameNode creates a new *OptionNameNode. The dots arg must have a
+// length that is one less than the length of parts. The parts arg must not be
+// empty.
+func NewOptionNameNode(parts []*FieldReferenceNode, dots []*RuneNode) *OptionNameNode {
+ if len(parts) == 0 {
+ panic("must have at least one part")
+ }
+ if len(dots) != len(parts)-1 {
+ panic(fmt.Sprintf("%d parts requires %d dots, not %d", len(parts), len(parts)-1, len(dots)))
+ }
+ children := make([]Node, 0, len(parts)*2-1)
+ for i, part := range parts {
+ if part == nil {
+ panic(fmt.Sprintf("parts[%d] is nil", i))
+ }
+ if i > 0 {
+ if dots[i-1] == nil {
+ panic(fmt.Sprintf("dots[%d] is nil", i-1))
+ }
+ children = append(children, dots[i-1])
+ }
+ children = append(children, part)
+ }
+ return &OptionNameNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Parts: parts,
+ Dots: dots,
+ }
+}
+
+// FieldReferenceNode is a reference to a field name. It can indicate a regular
+// field (simple unqualified name), an extension field (possibly-qualified name
+// that is enclosed either in brackets or parentheses), or an "any" type
+// reference (a type URL in the form "server.host/fully.qualified.Name" that is
+// enclosed in brackets).
+//
+// Extension names are used in options to refer to custom options (which are
+// actually extensions), in which case the name is enclosed in parentheses "("
+// and ")". They can also be used to refer to extension fields of options.
+//
+// Extension names are also used in message literals to set extension fields,
+// in which case the name is enclosed in square brackets "[" and "]".
+//
+// "Any" type references can only be used in message literals, and are not
+// allowed in option names. They are always enclosed in square brackets. An
+// "any" type reference is distinguished from an extension name by the presence
+// of a slash, which must be present in an "any" type reference and must be
+// absent in an extension name.
+//
+// Examples:
+//
+// foobar
+// (foo.bar)
+// [foo.bar]
+// [type.googleapis.com/foo.bar]
+type FieldReferenceNode struct {
+ compositeNode
+ Open *RuneNode // only present for extension names and "any" type references
+
+ // only present for "any" type references
+ URLPrefix IdentValueNode
+ Slash *RuneNode
+
+ Name IdentValueNode
+
+ Close *RuneNode // only present for extension names and "any" type references
+}
+
+// NewFieldReferenceNode creates a new *FieldReferenceNode for a regular field.
+// The name arg must not be nil.
+func NewFieldReferenceNode(name *IdentNode) *FieldReferenceNode {
+ if name == nil {
+ panic("name is nil")
+ }
+ children := []Node{name}
+ return &FieldReferenceNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Name: name,
+ }
+}
+
+// NewExtensionFieldReferenceNode creates a new *FieldReferenceNode for an
+// extension field. All args must be non-nil. The openSym and closeSym runes
+// should be "(" and ")" or "[" and "]".
+func NewExtensionFieldReferenceNode(openSym *RuneNode, name IdentValueNode, closeSym *RuneNode) *FieldReferenceNode {
+ if name == nil {
+ panic("name is nil")
+ }
+ if openSym == nil {
+ panic("openSym is nil")
+ }
+ if closeSym == nil {
+ panic("closeSym is nil")
+ }
+ children := []Node{openSym, name, closeSym}
+ return &FieldReferenceNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Open: openSym,
+ Name: name,
+ Close: closeSym,
+ }
+}
+
+// NewAnyTypeReferenceNode creates a new *FieldReferenceNode for an "any"
+// type reference. All args must be non-nil. The openSym and closeSym runes
+// should be "[" and "]". The slashSym run should be "/".
+func NewAnyTypeReferenceNode(openSym *RuneNode, urlPrefix IdentValueNode, slashSym *RuneNode, name IdentValueNode, closeSym *RuneNode) *FieldReferenceNode {
+ if name == nil {
+ panic("name is nil")
+ }
+ if openSym == nil {
+ panic("openSym is nil")
+ }
+ if closeSym == nil {
+ panic("closeSym is nil")
+ }
+ if urlPrefix == nil {
+ panic("urlPrefix is nil")
+ }
+ if slashSym == nil {
+ panic("slashSym is nil")
+ }
+ children := []Node{openSym, urlPrefix, slashSym, name, closeSym}
+ return &FieldReferenceNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Open: openSym,
+ URLPrefix: urlPrefix,
+ Slash: slashSym,
+ Name: name,
+ Close: closeSym,
+ }
+}
+
+// IsExtension reports if this is an extension name or not (e.g. enclosed in
+// punctuation, such as parentheses or brackets).
+func (a *FieldReferenceNode) IsExtension() bool {
+ return a.Open != nil && a.Slash == nil
+}
+
+// IsAnyTypeReference reports if this is an Any type reference.
+func (a *FieldReferenceNode) IsAnyTypeReference() bool {
+ return a.Slash != nil
+}
+
+func (a *FieldReferenceNode) Value() string {
+ if a.Open != nil {
+ if a.Slash != nil {
+ return string(a.Open.Rune) + string(a.URLPrefix.AsIdentifier()) + string(a.Slash.Rune) + string(a.Name.AsIdentifier()) + string(a.Close.Rune)
+ }
+ return string(a.Open.Rune) + string(a.Name.AsIdentifier()) + string(a.Close.Rune)
+ }
+ return string(a.Name.AsIdentifier())
+}
+
+// CompactOptionsNode represents a compact options declaration, as used with
+// fields, enum values, and extension ranges. Example:
+//
+// [deprecated = true, json_name = "foo_bar"]
+type CompactOptionsNode struct {
+ compositeNode
+ OpenBracket *RuneNode
+ Options []*OptionNode
+ // Commas represent the separating ',' characters between options. The
+ // length of this slice must be exactly len(Options)-1, with each item
+ // in Options having a corresponding item in this slice *except the last*
+ // (since a trailing comma is not allowed).
+ Commas []*RuneNode
+ CloseBracket *RuneNode
+}
+
+// NewCompactOptionsNode creates a *CompactOptionsNode. All args must be
+// non-nil. The commas arg must have a length that is one less than the
+// length of opts. The opts arg must not be empty.
+func NewCompactOptionsNode(openBracket *RuneNode, opts []*OptionNode, commas []*RuneNode, closeBracket *RuneNode) *CompactOptionsNode {
+ if openBracket == nil {
+ panic("openBracket is nil")
+ }
+ if closeBracket == nil {
+ panic("closeBracket is nil")
+ }
+ if len(opts) == 0 {
+ panic("must have at least one part")
+ }
+ if len(commas) != len(opts)-1 {
+ panic(fmt.Sprintf("%d opts requires %d commas, not %d", len(opts), len(opts)-1, len(commas)))
+ }
+ children := make([]Node, 0, len(opts)*2+1)
+ children = append(children, openBracket)
+ for i, opt := range opts {
+ if i > 0 {
+ if commas[i-1] == nil {
+ panic(fmt.Sprintf("commas[%d] is nil", i-1))
+ }
+ children = append(children, commas[i-1])
+ }
+ if opt == nil {
+ panic(fmt.Sprintf("opts[%d] is nil", i))
+ }
+ children = append(children, opt)
+ }
+ children = append(children, closeBracket)
+
+ return &CompactOptionsNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ OpenBracket: openBracket,
+ Options: opts,
+ Commas: commas,
+ CloseBracket: closeBracket,
+ }
+}
+
+func (e *CompactOptionsNode) GetElements() []*OptionNode {
+ if e == nil {
+ return nil
+ }
+ return e.Options
+}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/ranges.go b/vendor/github.com/bufbuild/protocompile/ast/ranges.go
new file mode 100644
index 000000000..453e5a069
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/ranges.go
@@ -0,0 +1,319 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import "fmt"
+
+// ExtensionRangeNode represents an extension range declaration in an extendable
+// message. Example:
+//
+// extensions 100 to max;
+type ExtensionRangeNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ Ranges []*RangeNode
+ // Commas represent the separating ',' characters between ranges. The
+ // length of this slice must be exactly len(Ranges)-1, each item in Ranges
+ // having a corresponding item in this slice *except the last* (since a
+ // trailing comma is not allowed).
+ Commas []*RuneNode
+ Options *CompactOptionsNode
+ Semicolon *RuneNode
+}
+
+func (e *ExtensionRangeNode) msgElement() {}
+
+// NewExtensionRangeNode creates a new *ExtensionRangeNode. All args must be
+// non-nil except opts, which may be nil.
+// - keyword: The token corresponding to the "extends" keyword.
+// - ranges: One or more range expressions.
+// - commas: Tokens that represent the "," runes that delimit the range expressions.
+// The length of commas must be one less than the length of ranges.
+// - opts: The node corresponding to options that apply to each of the ranges.
+// - semicolon The token corresponding to the ";" rune that ends the declaration.
+func NewExtensionRangeNode(keyword *KeywordNode, ranges []*RangeNode, commas []*RuneNode, opts *CompactOptionsNode, semicolon *RuneNode) *ExtensionRangeNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ if len(ranges) == 0 {
+ panic("must have at least one range")
+ }
+ if len(commas) != len(ranges)-1 {
+ panic(fmt.Sprintf("%d ranges requires %d commas, not %d", len(ranges), len(ranges)-1, len(commas)))
+ }
+ numChildren := len(ranges)*2 + 1
+ if opts != nil {
+ numChildren++
+ }
+ children := make([]Node, 0, numChildren)
+ children = append(children, keyword)
+ for i, rng := range ranges {
+ if i > 0 {
+ if commas[i-1] == nil {
+ panic(fmt.Sprintf("commas[%d] is nil", i-1))
+ }
+ children = append(children, commas[i-1])
+ }
+ if rng == nil {
+ panic(fmt.Sprintf("ranges[%d] is nil", i))
+ }
+ children = append(children, rng)
+ }
+ if opts != nil {
+ children = append(children, opts)
+ }
+ children = append(children, semicolon)
+ return &ExtensionRangeNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Ranges: ranges,
+ Commas: commas,
+ Options: opts,
+ Semicolon: semicolon,
+ }
+}
+
+// RangeDeclNode is a placeholder interface for AST nodes that represent
+// numeric values. This allows NoSourceNode to be used in place of *RangeNode
+// for some usages.
+type RangeDeclNode interface {
+ Node
+ RangeStart() Node
+ RangeEnd() Node
+}
+
+var _ RangeDeclNode = (*RangeNode)(nil)
+var _ RangeDeclNode = NoSourceNode{}
+
+// RangeNode represents a range expression, used in both extension ranges and
+// reserved ranges. Example:
+//
+// 1000 to max
+type RangeNode struct {
+ compositeNode
+ StartVal IntValueNode
+ // if To is non-nil, then exactly one of EndVal or Max must also be non-nil
+ To *KeywordNode
+ // EndVal and Max are mutually exclusive
+ EndVal IntValueNode
+ Max *KeywordNode
+}
+
+// NewRangeNode creates a new *RangeNode. The start argument must be non-nil.
+// The to argument represents the "to" keyword. If present (i.e. if it is non-nil),
+// then so must be exactly one of end or max. If max is non-nil, it indicates a
+// "100 to max" style range. But if end is non-nil, the end of the range is a
+// literal, such as "100 to 200".
+func NewRangeNode(start IntValueNode, to *KeywordNode, end IntValueNode, max *KeywordNode) *RangeNode {
+ if start == nil {
+ panic("start is nil")
+ }
+ numChildren := 1
+ if to != nil {
+ if end == nil && max == nil {
+ panic("to is not nil, but end and max both are")
+ }
+ if end != nil && max != nil {
+ panic("end and max cannot be both non-nil")
+ }
+ numChildren = 3
+ } else {
+ if end != nil {
+ panic("to is nil, but end is not")
+ }
+ if max != nil {
+ panic("to is nil, but max is not")
+ }
+ }
+ children := make([]Node, 0, numChildren)
+ children = append(children, start)
+ if to != nil {
+ children = append(children, to)
+ if end != nil {
+ children = append(children, end)
+ } else {
+ children = append(children, max)
+ }
+ }
+ return &RangeNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ StartVal: start,
+ To: to,
+ EndVal: end,
+ Max: max,
+ }
+}
+
+func (n *RangeNode) RangeStart() Node {
+ return n.StartVal
+}
+
+func (n *RangeNode) RangeEnd() Node {
+ if n.Max != nil {
+ return n.Max
+ }
+ if n.EndVal != nil {
+ return n.EndVal
+ }
+ return n.StartVal
+}
+
+func (n *RangeNode) StartValue() interface{} {
+ return n.StartVal.Value()
+}
+
+func (n *RangeNode) StartValueAsInt32(min, max int32) (int32, bool) {
+ return AsInt32(n.StartVal, min, max)
+}
+
+func (n *RangeNode) EndValue() interface{} {
+ if n.EndVal == nil {
+ return nil
+ }
+ return n.EndVal.Value()
+}
+
+func (n *RangeNode) EndValueAsInt32(min, max int32) (int32, bool) {
+ if n.Max != nil {
+ return max, true
+ }
+ if n.EndVal == nil {
+ return n.StartValueAsInt32(min, max)
+ }
+ return AsInt32(n.EndVal, min, max)
+}
+
+// ReservedNode represents reserved declaration, which can be used to reserve
+// either names or numbers. Examples:
+//
+// reserved 1, 10-12, 15;
+// reserved "foo", "bar", "baz";
+type ReservedNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ // If non-empty, this node represents reserved ranges and Names will be empty.
+ Ranges []*RangeNode
+ // If non-empty, this node represents reserved names and Ranges will be empty.
+ Names []StringValueNode
+ // Commas represent the separating ',' characters between options. The
+ // length of this slice must be exactly len(Ranges)-1 or len(Names)-1, depending
+ // on whether this node represents reserved ranges or reserved names. Each item
+ // in Ranges or Names has a corresponding item in this slice *except the last*
+ // (since a trailing comma is not allowed).
+ Commas []*RuneNode
+ Semicolon *RuneNode
+}
+
+func (*ReservedNode) msgElement() {}
+func (*ReservedNode) enumElement() {}
+
+// NewReservedRangesNode creates a new *ReservedNode that represents reserved
+// numeric ranges. All args must be non-nil.
+// - keyword: The token corresponding to the "reserved" keyword.
+// - ranges: One or more range expressions.
+// - commas: Tokens that represent the "," runes that delimit the range expressions.
+// The length of commas must be one less than the length of ranges.
+// - semicolon The token corresponding to the ";" rune that ends the declaration.
+func NewReservedRangesNode(keyword *KeywordNode, ranges []*RangeNode, commas []*RuneNode, semicolon *RuneNode) *ReservedNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ if len(ranges) == 0 {
+ panic("must have at least one range")
+ }
+ if len(commas) != len(ranges)-1 {
+ panic(fmt.Sprintf("%d ranges requires %d commas, not %d", len(ranges), len(ranges)-1, len(commas)))
+ }
+ children := make([]Node, 0, len(ranges)*2+1)
+ children = append(children, keyword)
+ for i, rng := range ranges {
+ if i > 0 {
+ if commas[i-1] == nil {
+ panic(fmt.Sprintf("commas[%d] is nil", i-1))
+ }
+ children = append(children, commas[i-1])
+ }
+ if rng == nil {
+ panic(fmt.Sprintf("ranges[%d] is nil", i))
+ }
+ children = append(children, rng)
+ }
+ children = append(children, semicolon)
+ return &ReservedNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Ranges: ranges,
+ Commas: commas,
+ Semicolon: semicolon,
+ }
+}
+
+// NewReservedNamesNode creates a new *ReservedNode that represents reserved
+// names. All args must be non-nil.
+// - keyword: The token corresponding to the "reserved" keyword.
+// - names: One or more names.
+// - commas: Tokens that represent the "," runes that delimit the names.
+// The length of commas must be one less than the length of names.
+// - semicolon The token corresponding to the ";" rune that ends the declaration.
+func NewReservedNamesNode(keyword *KeywordNode, names []StringValueNode, commas []*RuneNode, semicolon *RuneNode) *ReservedNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ if len(names) == 0 {
+ panic("must have at least one name")
+ }
+ if len(commas) != len(names)-1 {
+ panic(fmt.Sprintf("%d names requires %d commas, not %d", len(names), len(names)-1, len(commas)))
+ }
+ children := make([]Node, 0, len(names)*2+1)
+ children = append(children, keyword)
+ for i, name := range names {
+ if i > 0 {
+ if commas[i-1] == nil {
+ panic(fmt.Sprintf("commas[%d] is nil", i-1))
+ }
+ children = append(children, commas[i-1])
+ }
+ if name == nil {
+ panic(fmt.Sprintf("names[%d] is nil", i))
+ }
+ children = append(children, name)
+ }
+ children = append(children, semicolon)
+ return &ReservedNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Names: names,
+ Commas: commas,
+ Semicolon: semicolon,
+ }
+}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/service.go b/vendor/github.com/bufbuild/protocompile/ast/service.go
new file mode 100644
index 000000000..c1807488c
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/service.go
@@ -0,0 +1,286 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import "fmt"
+
+// ServiceNode represents a service declaration. Example:
+//
+// service Foo {
+// rpc Bar (Baz) returns (Bob);
+// rpc Frobnitz (stream Parts) returns (Gyzmeaux);
+// }
+type ServiceNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ Name *IdentNode
+ OpenBrace *RuneNode
+ Decls []ServiceElement
+ CloseBrace *RuneNode
+}
+
+func (*ServiceNode) fileElement() {}
+
+// NewServiceNode creates a new *ServiceNode. All arguments must be non-nil.
+// - keyword: The token corresponding to the "service" keyword.
+// - name: The token corresponding to the service's name.
+// - openBrace: The token corresponding to the "{" rune that starts the body.
+// - decls: All declarations inside the service body.
+// - closeBrace: The token corresponding to the "}" rune that ends the body.
+func NewServiceNode(keyword *KeywordNode, name *IdentNode, openBrace *RuneNode, decls []ServiceElement, closeBrace *RuneNode) *ServiceNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if openBrace == nil {
+ panic("openBrace is nil")
+ }
+ if closeBrace == nil {
+ panic("closeBrace is nil")
+ }
+ children := make([]Node, 0, 4+len(decls))
+ children = append(children, keyword, name, openBrace)
+ for _, decl := range decls {
+ switch decl := decl.(type) {
+ case *OptionNode, *RPCNode, *EmptyDeclNode:
+ default:
+ panic(fmt.Sprintf("invalid ServiceElement type: %T", decl))
+ }
+ children = append(children, decl)
+ }
+ children = append(children, closeBrace)
+
+ return &ServiceNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Name: name,
+ OpenBrace: openBrace,
+ Decls: decls,
+ CloseBrace: closeBrace,
+ }
+}
+
+// ServiceElement is an interface implemented by all AST nodes that can
+// appear in the body of a service declaration.
+type ServiceElement interface {
+ Node
+ serviceElement()
+}
+
+var _ ServiceElement = (*OptionNode)(nil)
+var _ ServiceElement = (*RPCNode)(nil)
+var _ ServiceElement = (*EmptyDeclNode)(nil)
+
+// RPCDeclNode is a placeholder interface for AST nodes that represent RPC
+// declarations. This allows NoSourceNode to be used in place of *RPCNode
+// for some usages.
+type RPCDeclNode interface {
+ Node
+ GetName() Node
+ GetInputType() Node
+ GetOutputType() Node
+}
+
+var _ RPCDeclNode = (*RPCNode)(nil)
+var _ RPCDeclNode = NoSourceNode{}
+
+// RPCNode represents an RPC declaration. Example:
+//
+// rpc Foo (Bar) returns (Baz);
+type RPCNode struct {
+ compositeNode
+ Keyword *KeywordNode
+ Name *IdentNode
+ Input *RPCTypeNode
+ Returns *KeywordNode
+ Output *RPCTypeNode
+ Semicolon *RuneNode
+ OpenBrace *RuneNode
+ Decls []RPCElement
+ CloseBrace *RuneNode
+}
+
+func (n *RPCNode) serviceElement() {}
+
+// NewRPCNode creates a new *RPCNode with no body. All arguments must be non-nil.
+// - keyword: The token corresponding to the "rpc" keyword.
+// - name: The token corresponding to the RPC's name.
+// - input: The token corresponding to the RPC input message type.
+// - returns: The token corresponding to the "returns" keyword that precedes the output type.
+// - output: The token corresponding to the RPC output message type.
+// - semicolon: The token corresponding to the ";" rune that ends the declaration.
+func NewRPCNode(keyword *KeywordNode, name *IdentNode, input *RPCTypeNode, returns *KeywordNode, output *RPCTypeNode, semicolon *RuneNode) *RPCNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if input == nil {
+ panic("input is nil")
+ }
+ if returns == nil {
+ panic("returns is nil")
+ }
+ if output == nil {
+ panic("output is nil")
+ }
+ if semicolon == nil {
+ panic("semicolon is nil")
+ }
+ children := []Node{keyword, name, input, returns, output, semicolon}
+ return &RPCNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Name: name,
+ Input: input,
+ Returns: returns,
+ Output: output,
+ Semicolon: semicolon,
+ }
+}
+
+// NewRPCNodeWithBody creates a new *RPCNode that includes a body (and possibly
+// options). All arguments must be non-nil.
+// - keyword: The token corresponding to the "rpc" keyword.
+// - name: The token corresponding to the RPC's name.
+// - input: The token corresponding to the RPC input message type.
+// - returns: The token corresponding to the "returns" keyword that precedes the output type.
+// - output: The token corresponding to the RPC output message type.
+// - openBrace: The token corresponding to the "{" rune that starts the body.
+// - decls: All declarations inside the RPC body.
+// - closeBrace: The token corresponding to the "}" rune that ends the body.
+func NewRPCNodeWithBody(keyword *KeywordNode, name *IdentNode, input *RPCTypeNode, returns *KeywordNode, output *RPCTypeNode, openBrace *RuneNode, decls []RPCElement, closeBrace *RuneNode) *RPCNode {
+ if keyword == nil {
+ panic("keyword is nil")
+ }
+ if name == nil {
+ panic("name is nil")
+ }
+ if input == nil {
+ panic("input is nil")
+ }
+ if returns == nil {
+ panic("returns is nil")
+ }
+ if output == nil {
+ panic("output is nil")
+ }
+ if openBrace == nil {
+ panic("openBrace is nil")
+ }
+ if closeBrace == nil {
+ panic("closeBrace is nil")
+ }
+ children := make([]Node, 0, 7+len(decls))
+ children = append(children, keyword, name, input, returns, output, openBrace)
+ for _, decl := range decls {
+ switch decl := decl.(type) {
+ case *OptionNode, *EmptyDeclNode:
+ default:
+ panic(fmt.Sprintf("invalid RPCElement type: %T", decl))
+ }
+ children = append(children, decl)
+ }
+ children = append(children, closeBrace)
+
+ return &RPCNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Keyword: keyword,
+ Name: name,
+ Input: input,
+ Returns: returns,
+ Output: output,
+ OpenBrace: openBrace,
+ Decls: decls,
+ CloseBrace: closeBrace,
+ }
+}
+
+func (n *RPCNode) GetName() Node {
+ return n.Name
+}
+
+func (n *RPCNode) GetInputType() Node {
+ return n.Input.MessageType
+}
+
+func (n *RPCNode) GetOutputType() Node {
+ return n.Output.MessageType
+}
+
+// RPCElement is an interface implemented by all AST nodes that can
+// appear in the body of an rpc declaration (aka method).
+type RPCElement interface {
+ Node
+ methodElement()
+}
+
+var _ RPCElement = (*OptionNode)(nil)
+var _ RPCElement = (*EmptyDeclNode)(nil)
+
+// RPCTypeNode represents the declaration of a request or response type for an
+// RPC. Example:
+//
+// (stream foo.Bar)
+type RPCTypeNode struct {
+ compositeNode
+ OpenParen *RuneNode
+ Stream *KeywordNode
+ MessageType IdentValueNode
+ CloseParen *RuneNode
+}
+
+// NewRPCTypeNode creates a new *RPCTypeNode. All arguments must be non-nil
+// except stream, which may be nil.
+// - openParen: The token corresponding to the "(" rune that starts the declaration.
+// - stream: The token corresponding to the "stream" keyword or nil if not present.
+// - msgType: The token corresponding to the message type's name.
+// - closeParen: The token corresponding to the ")" rune that ends the declaration.
+func NewRPCTypeNode(openParen *RuneNode, stream *KeywordNode, msgType IdentValueNode, closeParen *RuneNode) *RPCTypeNode {
+ if openParen == nil {
+ panic("openParen is nil")
+ }
+ if msgType == nil {
+ panic("msgType is nil")
+ }
+ if closeParen == nil {
+ panic("closeParen is nil")
+ }
+ var children []Node
+ if stream != nil {
+ children = []Node{openParen, stream, msgType, closeParen}
+ } else {
+ children = []Node{openParen, msgType, closeParen}
+ }
+
+ return &RPCTypeNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ OpenParen: openParen,
+ Stream: stream,
+ MessageType: msgType,
+ CloseParen: closeParen,
+ }
+}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/values.go b/vendor/github.com/bufbuild/protocompile/ast/values.go
new file mode 100644
index 000000000..b9f050aa5
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/values.go
@@ -0,0 +1,558 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import (
+ "fmt"
+ "math"
+ "strings"
+)
+
+// ValueNode is an AST node that represents a literal value.
+//
+// It also includes references (e.g. IdentifierValueNode), which can be
+// used as values in some contexts, such as describing the default value
+// for a field, which can refer to an enum value.
+//
+// This also allows NoSourceNode to be used in place of a real value node
+// for some usages.
+type ValueNode interface {
+ Node
+ // Value returns a Go representation of the value. For scalars, this
+ // will be a string, int64, uint64, float64, or bool. This could also
+ // be an Identifier (e.g. IdentValueNodes). It can also be a composite
+ // literal:
+ // * For array literals, the type returned will be []ValueNode
+ // * For message literals, the type returned will be []*MessageFieldNode
+ Value() interface{}
+}
+
+var _ ValueNode = (*IdentNode)(nil)
+var _ ValueNode = (*CompoundIdentNode)(nil)
+var _ ValueNode = (*StringLiteralNode)(nil)
+var _ ValueNode = (*CompoundStringLiteralNode)(nil)
+var _ ValueNode = (*UintLiteralNode)(nil)
+var _ ValueNode = (*PositiveUintLiteralNode)(nil)
+var _ ValueNode = (*NegativeIntLiteralNode)(nil)
+var _ ValueNode = (*FloatLiteralNode)(nil)
+var _ ValueNode = (*SpecialFloatLiteralNode)(nil)
+var _ ValueNode = (*SignedFloatLiteralNode)(nil)
+var _ ValueNode = (*ArrayLiteralNode)(nil)
+var _ ValueNode = (*MessageLiteralNode)(nil)
+var _ ValueNode = NoSourceNode{}
+
+// StringValueNode is an AST node that represents a string literal.
+// Such a node can be a single literal (*StringLiteralNode) or a
+// concatenation of multiple literals (*CompoundStringLiteralNode).
+type StringValueNode interface {
+ ValueNode
+ AsString() string
+}
+
+var _ StringValueNode = (*StringLiteralNode)(nil)
+var _ StringValueNode = (*CompoundStringLiteralNode)(nil)
+
+// StringLiteralNode represents a simple string literal. Example:
+//
+// "proto2"
+type StringLiteralNode struct {
+ terminalNode
+ // Val is the actual string value that the literal indicates.
+ Val string
+}
+
+// NewStringLiteralNode creates a new *StringLiteralNode with the given val.
+func NewStringLiteralNode(val string, tok Token) *StringLiteralNode {
+ return &StringLiteralNode{
+ terminalNode: tok.asTerminalNode(),
+ Val: val,
+ }
+}
+
+func (n *StringLiteralNode) Value() interface{} {
+ return n.AsString()
+}
+
+func (n *StringLiteralNode) AsString() string {
+ return n.Val
+}
+
+// CompoundStringLiteralNode represents a compound string literal, which is
+// the concatenaton of adjacent string literals. Example:
+//
+// "this " "is" " all one " "string"
+type CompoundStringLiteralNode struct {
+ compositeNode
+ Val string
+}
+
+// NewCompoundLiteralStringNode creates a new *CompoundStringLiteralNode that
+// consists of the given string components. The components argument may not be
+// empty.
+func NewCompoundLiteralStringNode(components ...*StringLiteralNode) *CompoundStringLiteralNode {
+ if len(components) == 0 {
+ panic("must have at least one component")
+ }
+ children := make([]Node, len(components))
+ var b strings.Builder
+ for i, comp := range components {
+ children[i] = comp
+ b.WriteString(comp.Val)
+ }
+ return &CompoundStringLiteralNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Val: b.String(),
+ }
+}
+
+func (n *CompoundStringLiteralNode) Value() interface{} {
+ return n.AsString()
+}
+
+func (n *CompoundStringLiteralNode) AsString() string {
+ return n.Val
+}
+
+// IntValueNode is an AST node that represents an integer literal. If
+// an integer literal is too large for an int64 (or uint64 for
+// positive literals), it is represented instead by a FloatValueNode.
+type IntValueNode interface {
+ ValueNode
+ AsInt64() (int64, bool)
+ AsUint64() (uint64, bool)
+}
+
+// AsInt32 range checks the given int value and returns its value is
+// in the range or 0, false if it is outside the range.
+func AsInt32(n IntValueNode, min, max int32) (int32, bool) {
+ i, ok := n.AsInt64()
+ if !ok {
+ return 0, false
+ }
+ if i < int64(min) || i > int64(max) {
+ return 0, false
+ }
+ return int32(i), true
+}
+
+var _ IntValueNode = (*UintLiteralNode)(nil)
+var _ IntValueNode = (*PositiveUintLiteralNode)(nil)
+var _ IntValueNode = (*NegativeIntLiteralNode)(nil)
+
+// UintLiteralNode represents a simple integer literal with no sign character.
+type UintLiteralNode struct {
+ terminalNode
+ // Val is the numeric value indicated by the literal
+ Val uint64
+}
+
+// NewUintLiteralNode creates a new *UintLiteralNode with the given val.
+func NewUintLiteralNode(val uint64, tok Token) *UintLiteralNode {
+ return &UintLiteralNode{
+ terminalNode: tok.asTerminalNode(),
+ Val: val,
+ }
+}
+
+func (n *UintLiteralNode) Value() interface{} {
+ return n.Val
+}
+
+func (n *UintLiteralNode) AsInt64() (int64, bool) {
+ if n.Val > math.MaxInt64 {
+ return 0, false
+ }
+ return int64(n.Val), true
+}
+
+func (n *UintLiteralNode) AsUint64() (uint64, bool) {
+ return n.Val, true
+}
+
+func (n *UintLiteralNode) AsFloat() float64 {
+ return float64(n.Val)
+}
+
+// PositiveUintLiteralNode represents an integer literal with a positive (+) sign.
+type PositiveUintLiteralNode struct {
+ compositeNode
+ Plus *RuneNode
+ Uint *UintLiteralNode
+ Val uint64
+}
+
+// NewPositiveUintLiteralNode creates a new *PositiveUintLiteralNode. Both
+// arguments must be non-nil.
+func NewPositiveUintLiteralNode(sign *RuneNode, i *UintLiteralNode) *PositiveUintLiteralNode {
+ if sign == nil {
+ panic("sign is nil")
+ }
+ if i == nil {
+ panic("i is nil")
+ }
+ children := []Node{sign, i}
+ return &PositiveUintLiteralNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Plus: sign,
+ Uint: i,
+ Val: i.Val,
+ }
+}
+
+func (n *PositiveUintLiteralNode) Value() interface{} {
+ return n.Val
+}
+
+func (n *PositiveUintLiteralNode) AsInt64() (int64, bool) {
+ if n.Val > math.MaxInt64 {
+ return 0, false
+ }
+ return int64(n.Val), true
+}
+
+func (n *PositiveUintLiteralNode) AsUint64() (uint64, bool) {
+ return n.Val, true
+}
+
+// NegativeIntLiteralNode represents an integer literal with a negative (-) sign.
+type NegativeIntLiteralNode struct {
+ compositeNode
+ Minus *RuneNode
+ Uint *UintLiteralNode
+ Val int64
+}
+
+// NewNegativeIntLiteralNode creates a new *NegativeIntLiteralNode. Both
+// arguments must be non-nil.
+func NewNegativeIntLiteralNode(sign *RuneNode, i *UintLiteralNode) *NegativeIntLiteralNode {
+ if sign == nil {
+ panic("sign is nil")
+ }
+ if i == nil {
+ panic("i is nil")
+ }
+ children := []Node{sign, i}
+ return &NegativeIntLiteralNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Minus: sign,
+ Uint: i,
+ Val: -int64(i.Val),
+ }
+}
+
+func (n *NegativeIntLiteralNode) Value() interface{} {
+ return n.Val
+}
+
+func (n *NegativeIntLiteralNode) AsInt64() (int64, bool) {
+ return n.Val, true
+}
+
+func (n *NegativeIntLiteralNode) AsUint64() (uint64, bool) {
+ if n.Val < 0 {
+ return 0, false
+ }
+ return uint64(n.Val), true
+}
+
+// FloatValueNode is an AST node that represents a numeric literal with
+// a floating point, in scientific notation, or too large to fit in an
+// int64 or uint64.
+type FloatValueNode interface {
+ ValueNode
+ AsFloat() float64
+}
+
+var _ FloatValueNode = (*FloatLiteralNode)(nil)
+var _ FloatValueNode = (*SpecialFloatLiteralNode)(nil)
+var _ FloatValueNode = (*UintLiteralNode)(nil)
+
+// FloatLiteralNode represents a floating point numeric literal.
+type FloatLiteralNode struct {
+ terminalNode
+ // Val is the numeric value indicated by the literal
+ Val float64
+}
+
+// NewFloatLiteralNode creates a new *FloatLiteralNode with the given val.
+func NewFloatLiteralNode(val float64, tok Token) *FloatLiteralNode {
+ return &FloatLiteralNode{
+ terminalNode: tok.asTerminalNode(),
+ Val: val,
+ }
+}
+
+func (n *FloatLiteralNode) Value() interface{} {
+ return n.AsFloat()
+}
+
+func (n *FloatLiteralNode) AsFloat() float64 {
+ return n.Val
+}
+
+// SpecialFloatLiteralNode represents a special floating point numeric literal
+// for "inf" and "nan" values.
+type SpecialFloatLiteralNode struct {
+ *KeywordNode
+ Val float64
+}
+
+// NewSpecialFloatLiteralNode returns a new *SpecialFloatLiteralNode for the
+// given keyword, which must be "inf" or "nan".
+func NewSpecialFloatLiteralNode(name *KeywordNode) *SpecialFloatLiteralNode {
+ var f float64
+ if name.Val == "inf" {
+ f = math.Inf(1)
+ } else {
+ f = math.NaN()
+ }
+ return &SpecialFloatLiteralNode{
+ KeywordNode: name,
+ Val: f,
+ }
+}
+
+func (n *SpecialFloatLiteralNode) Value() interface{} {
+ return n.AsFloat()
+}
+
+func (n *SpecialFloatLiteralNode) AsFloat() float64 {
+ return n.Val
+}
+
+// SignedFloatLiteralNode represents a signed floating point number.
+type SignedFloatLiteralNode struct {
+ compositeNode
+ Sign *RuneNode
+ Float FloatValueNode
+ Val float64
+}
+
+// NewSignedFloatLiteralNode creates a new *SignedFloatLiteralNode. Both
+// arguments must be non-nil.
+func NewSignedFloatLiteralNode(sign *RuneNode, f FloatValueNode) *SignedFloatLiteralNode {
+ if sign == nil {
+ panic("sign is nil")
+ }
+ if f == nil {
+ panic("f is nil")
+ }
+ children := []Node{sign, f}
+ val := f.AsFloat()
+ if sign.Rune == '-' {
+ val = -val
+ }
+ return &SignedFloatLiteralNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Sign: sign,
+ Float: f,
+ Val: val,
+ }
+}
+
+func (n *SignedFloatLiteralNode) Value() interface{} {
+ return n.Val
+}
+
+func (n *SignedFloatLiteralNode) AsFloat() float64 {
+ return n.Val
+}
+
+// ArrayLiteralNode represents an array literal, which is only allowed inside of
+// a MessageLiteralNode, to indicate values for a repeated field. Example:
+//
+// ["foo", "bar", "baz"]
+type ArrayLiteralNode struct {
+ compositeNode
+ OpenBracket *RuneNode
+ Elements []ValueNode
+ // Commas represent the separating ',' characters between elements. The
+ // length of this slice must be exactly len(Elements)-1, with each item
+ // in Elements having a corresponding item in this slice *except the last*
+ // (since a trailing comma is not allowed).
+ Commas []*RuneNode
+ CloseBracket *RuneNode
+}
+
+// NewArrayLiteralNode creates a new *ArrayLiteralNode. The openBracket and
+// closeBracket args must be non-nil and represent the "[" and "]" runes that
+// surround the array values. The given commas arg must have a length that is
+// one less than the length of the vals arg. However, vals may be empty, in
+// which case commas must also be empty.
+func NewArrayLiteralNode(openBracket *RuneNode, vals []ValueNode, commas []*RuneNode, closeBracket *RuneNode) *ArrayLiteralNode {
+ if openBracket == nil {
+ panic("openBracket is nil")
+ }
+ if closeBracket == nil {
+ panic("closeBracket is nil")
+ }
+ if len(vals) == 0 && len(commas) != 0 {
+ panic("vals is empty but commas is not")
+ }
+ if len(vals) > 0 && len(commas) != len(vals)-1 {
+ panic(fmt.Sprintf("%d vals requires %d commas, not %d", len(vals), len(vals)-1, len(commas)))
+ }
+ children := make([]Node, 0, len(vals)*2+1)
+ children = append(children, openBracket)
+ for i, val := range vals {
+ if i > 0 {
+ if commas[i-1] == nil {
+ panic(fmt.Sprintf("commas[%d] is nil", i-1))
+ }
+ children = append(children, commas[i-1])
+ }
+ if val == nil {
+ panic(fmt.Sprintf("vals[%d] is nil", i))
+ }
+ children = append(children, val)
+ }
+ children = append(children, closeBracket)
+
+ return &ArrayLiteralNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ OpenBracket: openBracket,
+ Elements: vals,
+ Commas: commas,
+ CloseBracket: closeBracket,
+ }
+}
+
+func (n *ArrayLiteralNode) Value() interface{} {
+ return n.Elements
+}
+
+// MessageLiteralNode represents a message literal, which is compatible with the
+// protobuf text format and can be used for custom options with message types.
+// Example:
+//
+// { foo:1 foo:2 foo:3 bar: }
+type MessageLiteralNode struct {
+ compositeNode
+ Open *RuneNode // should be '{' or '<'
+ Elements []*MessageFieldNode
+ // Separator characters between elements, which can be either ','
+ // or ';' if present. This slice must be exactly len(Elements) in
+ // length, with each item in Elements having one corresponding item
+ // in Seps. Separators in message literals are optional, so a given
+ // item in this slice may be nil to indicate absence of a separator.
+ Seps []*RuneNode
+ Close *RuneNode // should be '}' or '>', depending on Open
+}
+
+// NewMessageLiteralNode creates a new *MessageLiteralNode. The openSym and
+// closeSym runes must not be nil and should be "{" and "}" or "<" and ">".
+//
+// Unlike separators (dots and commas) used for other AST nodes that represent
+// a list of elements, the seps arg must be the SAME length as vals, and it may
+// contain nil values to indicate absence of a separator (in fact, it could be
+// all nils).
+func NewMessageLiteralNode(openSym *RuneNode, vals []*MessageFieldNode, seps []*RuneNode, closeSym *RuneNode) *MessageLiteralNode {
+ if openSym == nil {
+ panic("openSym is nil")
+ }
+ if closeSym == nil {
+ panic("closeSym is nil")
+ }
+ if len(seps) != len(vals) {
+ panic(fmt.Sprintf("%d vals requires %d commas, not %d", len(vals), len(vals), len(seps)))
+ }
+ numChildren := len(vals) + 2
+ for _, sep := range seps {
+ if sep != nil {
+ numChildren++
+ }
+ }
+ children := make([]Node, 0, numChildren)
+ children = append(children, openSym)
+ for i, val := range vals {
+ if val == nil {
+ panic(fmt.Sprintf("vals[%d] is nil", i))
+ }
+ children = append(children, val)
+ if seps[i] != nil {
+ children = append(children, seps[i])
+ }
+ }
+ children = append(children, closeSym)
+
+ return &MessageLiteralNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Open: openSym,
+ Elements: vals,
+ Seps: seps,
+ Close: closeSym,
+ }
+}
+
+func (n *MessageLiteralNode) Value() interface{} {
+ return n.Elements
+}
+
+// MessageFieldNode represents a single field (name and value) inside of a
+// message literal. Example:
+//
+// foo:"bar"
+type MessageFieldNode struct {
+ compositeNode
+ Name *FieldReferenceNode
+ // Sep represents the ':' separator between the name and value. If
+ // the value is a message or list literal (and thus starts with '<',
+ // '{', or '['), then the separator may be omitted and this field may
+ // be nil.
+ Sep *RuneNode
+ Val ValueNode
+}
+
+// NewMessageFieldNode creates a new *MessageFieldNode. All args except sep
+// must be non-nil.
+func NewMessageFieldNode(name *FieldReferenceNode, sep *RuneNode, val ValueNode) *MessageFieldNode {
+ if name == nil {
+ panic("name is nil")
+ }
+ if val == nil {
+ panic("val is nil")
+ }
+ numChildren := 2
+ if sep != nil {
+ numChildren++
+ }
+ children := make([]Node, 0, numChildren)
+ children = append(children, name)
+ if sep != nil {
+ children = append(children, sep)
+ }
+ children = append(children, val)
+
+ return &MessageFieldNode{
+ compositeNode: compositeNode{
+ children: children,
+ },
+ Name: name,
+ Sep: sep,
+ Val: val,
+ }
+}
diff --git a/vendor/github.com/bufbuild/protocompile/ast/walk.go b/vendor/github.com/bufbuild/protocompile/ast/walk.go
new file mode 100644
index 000000000..c5311b815
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/ast/walk.go
@@ -0,0 +1,921 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 ast
+
+import "fmt"
+
+// Walk conducts a walk of the AST rooted at the given root using the
+// given visitor. It performs a "pre-order traversal", visiting a
+// given AST node before it visits that node's descendants.
+//
+// If a visitor returns an error while walking the tree, the entire
+// operation is aborted and that error is returned.
+func Walk(root Node, v Visitor, opts ...WalkOption) error {
+ var wOpts walkOptions
+ for _, opt := range opts {
+ opt(&wOpts)
+ }
+ return walk(root, v, wOpts)
+}
+
+// WalkOption represents an option used with the Walk function. These
+// allow optional before and after hooks to be invoked as each node in
+// the tree is visited.
+type WalkOption func(*walkOptions)
+
+type walkOptions struct {
+ before, after func(Node) error
+}
+
+// WithBefore returns a WalkOption that will cause the given function to be
+// invoked before a node is visited during a walk operation. If this hook
+// returns an error, the node is not visited and the walk operation is aborted.
+func WithBefore(fn func(Node) error) WalkOption {
+ return func(options *walkOptions) {
+ options.before = fn
+ }
+}
+
+// WithAfter returns a WalkOption that will cause the given function to be
+// invoked after a node (as well as any descendants) is visited during a walk
+// operation. If this hook returns an error, the node is not visited and the
+// walk operation is aborted.
+//
+// If the walk is aborted due to some other visitor or before hook returning an
+// error, the after hook is still called for all nodes that have been visited.
+// However, the walk operation fails with the first error it encountered, so any
+// error returned from an after hook is effectively ignored.
+func WithAfter(fn func(Node) error) WalkOption {
+ return func(options *walkOptions) {
+ options.after = fn
+ }
+}
+
+func walk(root Node, v Visitor, opts walkOptions) (err error) {
+ if opts.before != nil {
+ if err := opts.before(root); err != nil {
+ return err
+ }
+ }
+ if opts.after != nil {
+ defer func() {
+ if afterErr := opts.after(root); afterErr != nil {
+ // if another call already returned an error then we
+ // have to ignore the error from the after hook
+ if err == nil {
+ err = afterErr
+ }
+ }
+ }()
+ }
+
+ if err := Visit(root, v); err != nil {
+ return err
+ }
+
+ if comp, ok := root.(CompositeNode); ok {
+ for _, child := range comp.Children() {
+ if err := walk(child, v, opts); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+// Visit implements the double-dispatch idiom and visits the given node by
+// calling the appropriate method of the given visitor.
+func Visit(n Node, v Visitor) error {
+ switch n := n.(type) {
+ case *FileNode:
+ return v.VisitFileNode(n)
+ case *SyntaxNode:
+ return v.VisitSyntaxNode(n)
+ case *PackageNode:
+ return v.VisitPackageNode(n)
+ case *ImportNode:
+ return v.VisitImportNode(n)
+ case *OptionNode:
+ return v.VisitOptionNode(n)
+ case *OptionNameNode:
+ return v.VisitOptionNameNode(n)
+ case *FieldReferenceNode:
+ return v.VisitFieldReferenceNode(n)
+ case *CompactOptionsNode:
+ return v.VisitCompactOptionsNode(n)
+ case *MessageNode:
+ return v.VisitMessageNode(n)
+ case *ExtendNode:
+ return v.VisitExtendNode(n)
+ case *ExtensionRangeNode:
+ return v.VisitExtensionRangeNode(n)
+ case *ReservedNode:
+ return v.VisitReservedNode(n)
+ case *RangeNode:
+ return v.VisitRangeNode(n)
+ case *FieldNode:
+ return v.VisitFieldNode(n)
+ case *GroupNode:
+ return v.VisitGroupNode(n)
+ case *MapFieldNode:
+ return v.VisitMapFieldNode(n)
+ case *MapTypeNode:
+ return v.VisitMapTypeNode(n)
+ case *OneOfNode:
+ return v.VisitOneOfNode(n)
+ case *EnumNode:
+ return v.VisitEnumNode(n)
+ case *EnumValueNode:
+ return v.VisitEnumValueNode(n)
+ case *ServiceNode:
+ return v.VisitServiceNode(n)
+ case *RPCNode:
+ return v.VisitRPCNode(n)
+ case *RPCTypeNode:
+ return v.VisitRPCTypeNode(n)
+ case *IdentNode:
+ return v.VisitIdentNode(n)
+ case *CompoundIdentNode:
+ return v.VisitCompoundIdentNode(n)
+ case *StringLiteralNode:
+ return v.VisitStringLiteralNode(n)
+ case *CompoundStringLiteralNode:
+ return v.VisitCompoundStringLiteralNode(n)
+ case *UintLiteralNode:
+ return v.VisitUintLiteralNode(n)
+ case *PositiveUintLiteralNode:
+ return v.VisitPositiveUintLiteralNode(n)
+ case *NegativeIntLiteralNode:
+ return v.VisitNegativeIntLiteralNode(n)
+ case *FloatLiteralNode:
+ return v.VisitFloatLiteralNode(n)
+ case *SpecialFloatLiteralNode:
+ return v.VisitSpecialFloatLiteralNode(n)
+ case *SignedFloatLiteralNode:
+ return v.VisitSignedFloatLiteralNode(n)
+ case *ArrayLiteralNode:
+ return v.VisitArrayLiteralNode(n)
+ case *MessageLiteralNode:
+ return v.VisitMessageLiteralNode(n)
+ case *MessageFieldNode:
+ return v.VisitMessageFieldNode(n)
+ case *KeywordNode:
+ return v.VisitKeywordNode(n)
+ case *RuneNode:
+ return v.VisitRuneNode(n)
+ case *EmptyDeclNode:
+ return v.VisitEmptyDeclNode(n)
+ default:
+ panic(fmt.Sprintf("unexpected type of node: %T", n))
+ }
+}
+
+// AncestorTracker is used to track the path of nodes during a walk operation.
+// By passing AsWalkOptions to a call to Walk, a visitor can inspect the path to
+// the node being visited using this tracker.
+type AncestorTracker struct {
+ ancestors []Node
+}
+
+// AsWalkOptions returns WalkOption values that will cause this ancestor tracker
+// to track the path through the AST during the walk operation.
+func (t *AncestorTracker) AsWalkOptions() []WalkOption {
+ return []WalkOption{
+ WithBefore(func(n Node) error {
+ t.ancestors = append(t.ancestors, n)
+ return nil
+ }),
+ WithAfter(func(n Node) error {
+ t.ancestors = t.ancestors[:len(t.ancestors)-1]
+ return nil
+ }),
+ }
+}
+
+// Path returns a slice of nodes that represents the path from the root of the
+// walk operaiton to the currently visited node. The first element in the path
+// is the root supplied to Walk. The last element in the path is the currently
+// visited node.
+//
+// The returned slice is not a defensive copy; so callers should NOT mutate it.
+func (t *AncestorTracker) Path() []Node {
+ return t.ancestors
+}
+
+// Parent returns the parent node of the currently visited node. If the node
+// currently being visited is the root supplied to Walk then nil is returned.
+func (t *AncestorTracker) Parent() Node {
+ if len(t.ancestors) <= 1 {
+ return nil
+ }
+ return t.ancestors[len(t.ancestors)-2]
+}
+
+// VisitChildren visits all direct children of the given node using the given
+// visitor. If visiting a child returns an error, that error is immediately
+// returned, and other children will not be visited.
+func VisitChildren(n CompositeNode, v Visitor) error {
+ for _, ch := range n.Children() {
+ if err := Visit(ch, v); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// Visitor provides a technique for walking the AST that allows for
+// dynamic dispatch, where a particular function is invoked based on
+// the runtime type of the argument.
+//
+// It consists of a number of functions, each of which matches a
+// concrete Node type. It also includes functions for sub-interfaces
+// of Node and the Node interface itself, to be used as broader
+// "catch all" functions.
+//
+// To use a visitor, provide a function for the node types of
+// interest and pass visitor.Visit as the function to a Walk operation.
+// When a node is traversed, the corresponding function field of
+// the visitor is invoked, if not nil. If the function for a node's
+// concrete type is nil/absent but the function for an interface it
+// implements is present, that interface visit function will be used
+// instead. If no matching function is present, the traversal will
+// continue. If a matching function is present, it will be invoked
+// and its response determines how the traversal proceeds.
+//
+// Every visit function returns (bool, *Visitor). If the bool returned
+// is false, the visited node's descendants are skipped. Otherwise,
+// traversal will continue into the node's children. If the returned
+// visitor is nil, the current visitor will continue to be used. But
+// if a non-nil visitor is returned, it will be used to visit the
+// node's children.
+type Visitor interface {
+ // VisitFileNode is invoked when visiting a *FileNode in the AST.
+ VisitFileNode(*FileNode) error
+ // VisitSyntaxNode is invoked when visiting a *SyntaxNode in the AST.
+ VisitSyntaxNode(*SyntaxNode) error
+ // VisitPackageNode is invoked when visiting a *PackageNode in the AST.
+ VisitPackageNode(*PackageNode) error
+ // VisitImportNode is invoked when visiting an *ImportNode in the AST.
+ VisitImportNode(*ImportNode) error
+ // VisitOptionNode is invoked when visiting an *OptionNode in the AST.
+ VisitOptionNode(*OptionNode) error
+ // VisitOptionNameNode is invoked when visiting an *OptionNameNode in the AST.
+ VisitOptionNameNode(*OptionNameNode) error
+ // VisitFieldReferenceNode is invoked when visiting a *FieldReferenceNode in the AST.
+ VisitFieldReferenceNode(*FieldReferenceNode) error
+ // VisitCompactOptionsNode is invoked when visiting a *CompactOptionsNode in the AST.
+ VisitCompactOptionsNode(*CompactOptionsNode) error
+ // VisitMessageNode is invoked when visiting a *MessageNode in the AST.
+ VisitMessageNode(*MessageNode) error
+ // VisitExtendNode is invoked when visiting an *ExtendNode in the AST.
+ VisitExtendNode(*ExtendNode) error
+ // VisitExtensionRangeNode is invoked when visiting an *ExtensionRangeNode in the AST.
+ VisitExtensionRangeNode(*ExtensionRangeNode) error
+ // VisitReservedNode is invoked when visiting a *ReservedNode in the AST.
+ VisitReservedNode(*ReservedNode) error
+ // VisitRangeNode is invoked when visiting a *RangeNode in the AST.
+ VisitRangeNode(*RangeNode) error
+ // VisitFieldNode is invoked when visiting a *FieldNode in the AST.
+ VisitFieldNode(*FieldNode) error
+ // VisitGroupNode is invoked when visiting a *GroupNode in the AST.
+ VisitGroupNode(*GroupNode) error
+ // VisitMapFieldNode is invoked when visiting a *MapFieldNode in the AST.
+ VisitMapFieldNode(*MapFieldNode) error
+ // VisitMapTypeNode is invoked when visiting a *MapTypeNode in the AST.
+ VisitMapTypeNode(*MapTypeNode) error
+ // VisitOneOfNode is invoked when visiting a *OneOfNode in the AST.
+ VisitOneOfNode(*OneOfNode) error
+ // VisitEnumNode is invoked when visiting an *EnumNode in the AST.
+ VisitEnumNode(*EnumNode) error
+ // VisitEnumValueNode is invoked when visiting an *EnumValueNode in the AST.
+ VisitEnumValueNode(*EnumValueNode) error
+ // VisitServiceNode is invoked when visiting a *ServiceNode in the AST.
+ VisitServiceNode(*ServiceNode) error
+ // VisitRPCNode is invoked when visiting an *RPCNode in the AST.
+ VisitRPCNode(*RPCNode) error
+ // VisitRPCTypeNode is invoked when visiting an *RPCTypeNode in the AST.
+ VisitRPCTypeNode(*RPCTypeNode) error
+ // VisitIdentNode is invoked when visiting an *IdentNode in the AST.
+ VisitIdentNode(*IdentNode) error
+ // VisitCompoundIdentNode is invoked when visiting a *CompoundIdentNode in the AST.
+ VisitCompoundIdentNode(*CompoundIdentNode) error
+ // VisitStringLiteralNode is invoked when visiting a *StringLiteralNode in the AST.
+ VisitStringLiteralNode(*StringLiteralNode) error
+ // VisitCompoundStringLiteralNode is invoked when visiting a *CompoundStringLiteralNode in the AST.
+ VisitCompoundStringLiteralNode(*CompoundStringLiteralNode) error
+ // VisitUintLiteralNode is invoked when visiting a *UintLiteralNode in the AST.
+ VisitUintLiteralNode(*UintLiteralNode) error
+ // VisitPositiveUintLiteralNode is invoked when visiting a *PositiveUintLiteralNode in the AST.
+ VisitPositiveUintLiteralNode(*PositiveUintLiteralNode) error
+ // VisitNegativeIntLiteralNode is invoked when visiting a *NegativeIntLiteralNode in the AST.
+ VisitNegativeIntLiteralNode(*NegativeIntLiteralNode) error
+ // VisitFloatLiteralNode is invoked when visiting a *FloatLiteralNode in the AST.
+ VisitFloatLiteralNode(*FloatLiteralNode) error
+ // VisitSpecialFloatLiteralNode is invoked when visiting a *SpecialFloatLiteralNode in the AST.
+ VisitSpecialFloatLiteralNode(*SpecialFloatLiteralNode) error
+ // VisitSignedFloatLiteralNode is invoked when visiting a *SignedFloatLiteralNode in the AST.
+ VisitSignedFloatLiteralNode(*SignedFloatLiteralNode) error
+ // VisitArrayLiteralNode is invoked when visiting an *ArrayLiteralNode in the AST.
+ VisitArrayLiteralNode(*ArrayLiteralNode) error
+ // VisitMessageLiteralNode is invoked when visiting a *MessageLiteralNode in the AST.
+ VisitMessageLiteralNode(*MessageLiteralNode) error
+ // VisitMessageFieldNode is invoked when visiting a *MessageFieldNode in the AST.
+ VisitMessageFieldNode(*MessageFieldNode) error
+ // VisitKeywordNode is invoked when visiting a *KeywordNode in the AST.
+ VisitKeywordNode(*KeywordNode) error
+ // VisitRuneNode is invoked when visiting a *RuneNode in the AST.
+ VisitRuneNode(*RuneNode) error
+ // VisitEmptyDeclNode is invoked when visiting a *EmptyDeclNode in the AST.
+ VisitEmptyDeclNode(*EmptyDeclNode) error
+}
+
+// NoOpVisitor is a visitor implementation that does nothing. All methods
+// unconditionally return nil. This can be embedded into a struct to make that
+// struct implement the Visitor interface, and only the relevant visit methods
+// then need to be implemented on the struct.
+type NoOpVisitor struct{}
+
+var _ Visitor = NoOpVisitor{}
+
+func (n NoOpVisitor) VisitFileNode(_ *FileNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitSyntaxNode(_ *SyntaxNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitPackageNode(_ *PackageNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitImportNode(_ *ImportNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitOptionNode(_ *OptionNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitOptionNameNode(_ *OptionNameNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitFieldReferenceNode(_ *FieldReferenceNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitCompactOptionsNode(_ *CompactOptionsNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitMessageNode(_ *MessageNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitExtendNode(_ *ExtendNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitExtensionRangeNode(_ *ExtensionRangeNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitReservedNode(_ *ReservedNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitRangeNode(_ *RangeNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitFieldNode(_ *FieldNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitGroupNode(_ *GroupNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitMapFieldNode(_ *MapFieldNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitMapTypeNode(_ *MapTypeNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitOneOfNode(_ *OneOfNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitEnumNode(_ *EnumNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitEnumValueNode(_ *EnumValueNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitServiceNode(_ *ServiceNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitRPCNode(_ *RPCNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitRPCTypeNode(_ *RPCTypeNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitIdentNode(_ *IdentNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitCompoundIdentNode(_ *CompoundIdentNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitStringLiteralNode(_ *StringLiteralNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitCompoundStringLiteralNode(_ *CompoundStringLiteralNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitUintLiteralNode(_ *UintLiteralNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitPositiveUintLiteralNode(_ *PositiveUintLiteralNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitNegativeIntLiteralNode(_ *NegativeIntLiteralNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitFloatLiteralNode(_ *FloatLiteralNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitSpecialFloatLiteralNode(_ *SpecialFloatLiteralNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitSignedFloatLiteralNode(_ *SignedFloatLiteralNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitArrayLiteralNode(_ *ArrayLiteralNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitMessageLiteralNode(_ *MessageLiteralNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitMessageFieldNode(_ *MessageFieldNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitKeywordNode(_ *KeywordNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitRuneNode(_ *RuneNode) error {
+ return nil
+}
+
+func (n NoOpVisitor) VisitEmptyDeclNode(_ *EmptyDeclNode) error {
+ return nil
+}
+
+// SimpleVisitor is a visitor implementation that uses numerous function fields.
+// If a relevant function field is not nil, then it will be invoked when a node
+// is visited.
+//
+// In addition to a function for each concrete node type (and thus for each
+// Visit* method of the Visitor interface), it also has function fields that
+// accept interface types. So a visitor can, for example, easily treat all
+// ValueNodes uniformly by providing a non-nil value for DoVisitValueNode
+// instead of having to supply values for the various Do*Node methods
+// corresponding to all types that implement ValueNode.
+//
+// The most specific function provided that matches a given node is the one that
+// will be invoked. For example, DoVisitStringValueNode will be called if
+// present and applicable before DoVisitValueNode. Similarly, DoVisitValueNode
+// would be called before DoVisitTerminalNode or DoVisitCompositeNode. The
+// DoVisitNode is the most generic function and is called only if no more
+// specific function is present for a given node type.
+//
+// The *UintLiteralNode type implements both IntValueNode and FloatValueNode.
+// In this case, the DoVisitIntValueNode function is considered more specific
+// than DoVisitFloatValueNode, so will be preferred if present.
+//
+// Similarly, *MapFieldNode implements both FieldDeclNode and MessageDeclNode.
+// In this case, the DoVisitFieldDeclNode function is considered more specific
+// than DoVisitMessageDeclNode, so will be preferred if present.
+type SimpleVisitor struct {
+ DoVisitFileNode func(*FileNode) error
+ DoVisitSyntaxNode func(*SyntaxNode) error
+ DoVisitPackageNode func(*PackageNode) error
+ DoVisitImportNode func(*ImportNode) error
+ DoVisitOptionNode func(*OptionNode) error
+ DoVisitOptionNameNode func(*OptionNameNode) error
+ DoVisitFieldReferenceNode func(*FieldReferenceNode) error
+ DoVisitCompactOptionsNode func(*CompactOptionsNode) error
+ DoVisitMessageNode func(*MessageNode) error
+ DoVisitExtendNode func(*ExtendNode) error
+ DoVisitExtensionRangeNode func(*ExtensionRangeNode) error
+ DoVisitReservedNode func(*ReservedNode) error
+ DoVisitRangeNode func(*RangeNode) error
+ DoVisitFieldNode func(*FieldNode) error
+ DoVisitGroupNode func(*GroupNode) error
+ DoVisitMapFieldNode func(*MapFieldNode) error
+ DoVisitMapTypeNode func(*MapTypeNode) error
+ DoVisitOneOfNode func(*OneOfNode) error
+ DoVisitEnumNode func(*EnumNode) error
+ DoVisitEnumValueNode func(*EnumValueNode) error
+ DoVisitServiceNode func(*ServiceNode) error
+ DoVisitRPCNode func(*RPCNode) error
+ DoVisitRPCTypeNode func(*RPCTypeNode) error
+ DoVisitIdentNode func(*IdentNode) error
+ DoVisitCompoundIdentNode func(*CompoundIdentNode) error
+ DoVisitStringLiteralNode func(*StringLiteralNode) error
+ DoVisitCompoundStringLiteralNode func(*CompoundStringLiteralNode) error
+ DoVisitUintLiteralNode func(*UintLiteralNode) error
+ DoVisitPositiveUintLiteralNode func(*PositiveUintLiteralNode) error
+ DoVisitNegativeIntLiteralNode func(*NegativeIntLiteralNode) error
+ DoVisitFloatLiteralNode func(*FloatLiteralNode) error
+ DoVisitSpecialFloatLiteralNode func(*SpecialFloatLiteralNode) error
+ DoVisitSignedFloatLiteralNode func(*SignedFloatLiteralNode) error
+ DoVisitArrayLiteralNode func(*ArrayLiteralNode) error
+ DoVisitMessageLiteralNode func(*MessageLiteralNode) error
+ DoVisitMessageFieldNode func(*MessageFieldNode) error
+ DoVisitKeywordNode func(*KeywordNode) error
+ DoVisitRuneNode func(*RuneNode) error
+ DoVisitEmptyDeclNode func(*EmptyDeclNode) error
+
+ DoVisitFieldDeclNode func(FieldDeclNode) error
+ DoVisitMessageDeclNode func(MessageDeclNode) error
+
+ DoVisitIdentValueNode func(IdentValueNode) error
+ DoVisitStringValueNode func(StringValueNode) error
+ DoVisitIntValueNode func(IntValueNode) error
+ DoVisitFloatValueNode func(FloatValueNode) error
+ DoVisitValueNode func(ValueNode) error
+
+ DoVisitTerminalNode func(TerminalNode) error
+ DoVisitCompositeNode func(CompositeNode) error
+ DoVisitNode func(Node) error
+}
+
+var _ Visitor = (*SimpleVisitor)(nil)
+
+func (b *SimpleVisitor) visitInterface(node Node) error {
+ switch n := node.(type) {
+ case FieldDeclNode:
+ if b.DoVisitFieldDeclNode != nil {
+ return b.DoVisitFieldDeclNode(n)
+ }
+ // *MapFieldNode implements both FieldDeclNode and MessageDeclNode,
+ // so handle other case here
+ if fn, ok := n.(MessageDeclNode); ok && b.DoVisitMessageDeclNode != nil {
+ return b.DoVisitMessageDeclNode(fn)
+ }
+ case MessageDeclNode:
+ if b.DoVisitMessageDeclNode != nil {
+ return b.DoVisitMessageDeclNode(n)
+ }
+ case IdentValueNode:
+ if b.DoVisitIdentValueNode != nil {
+ return b.DoVisitIdentValueNode(n)
+ }
+ case StringValueNode:
+ if b.DoVisitStringValueNode != nil {
+ return b.DoVisitStringValueNode(n)
+ }
+ case IntValueNode:
+ if b.DoVisitIntValueNode != nil {
+ return b.DoVisitIntValueNode(n)
+ }
+ // *UintLiteralNode implements both IntValueNode and FloatValueNode,
+ // so handle other case here
+ if fn, ok := n.(FloatValueNode); ok && b.DoVisitFloatValueNode != nil {
+ return b.DoVisitFloatValueNode(fn)
+ }
+ case FloatValueNode:
+ if b.DoVisitFloatValueNode != nil {
+ return b.DoVisitFloatValueNode(n)
+ }
+ }
+
+ if n, ok := node.(ValueNode); ok && b.DoVisitValueNode != nil {
+ return b.DoVisitValueNode(n)
+ }
+
+ switch n := node.(type) {
+ case TerminalNode:
+ if b.DoVisitTerminalNode != nil {
+ return b.DoVisitTerminalNode(n)
+ }
+ case CompositeNode:
+ if b.DoVisitCompositeNode != nil {
+ return b.DoVisitCompositeNode(n)
+ }
+ }
+
+ if b.DoVisitNode != nil {
+ return b.DoVisitNode(node)
+ }
+
+ return nil
+}
+
+func (b *SimpleVisitor) VisitFileNode(node *FileNode) error {
+ if b.DoVisitFileNode != nil {
+ return b.DoVisitFileNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitSyntaxNode(node *SyntaxNode) error {
+ if b.DoVisitSyntaxNode != nil {
+ return b.DoVisitSyntaxNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitPackageNode(node *PackageNode) error {
+ if b.DoVisitPackageNode != nil {
+ return b.DoVisitPackageNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitImportNode(node *ImportNode) error {
+ if b.DoVisitImportNode != nil {
+ return b.DoVisitImportNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitOptionNode(node *OptionNode) error {
+ if b.DoVisitOptionNode != nil {
+ return b.DoVisitOptionNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitOptionNameNode(node *OptionNameNode) error {
+ if b.DoVisitOptionNameNode != nil {
+ return b.DoVisitOptionNameNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitFieldReferenceNode(node *FieldReferenceNode) error {
+ if b.DoVisitFieldReferenceNode != nil {
+ return b.DoVisitFieldReferenceNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitCompactOptionsNode(node *CompactOptionsNode) error {
+ if b.DoVisitCompactOptionsNode != nil {
+ return b.DoVisitCompactOptionsNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitMessageNode(node *MessageNode) error {
+ if b.DoVisitMessageNode != nil {
+ return b.DoVisitMessageNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitExtendNode(node *ExtendNode) error {
+ if b.DoVisitExtendNode != nil {
+ return b.DoVisitExtendNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitExtensionRangeNode(node *ExtensionRangeNode) error {
+ if b.DoVisitExtensionRangeNode != nil {
+ return b.DoVisitExtensionRangeNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitReservedNode(node *ReservedNode) error {
+ if b.DoVisitReservedNode != nil {
+ return b.DoVisitReservedNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitRangeNode(node *RangeNode) error {
+ if b.DoVisitRangeNode != nil {
+ return b.DoVisitRangeNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitFieldNode(node *FieldNode) error {
+ if b.DoVisitFieldNode != nil {
+ return b.DoVisitFieldNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitGroupNode(node *GroupNode) error {
+ if b.DoVisitGroupNode != nil {
+ return b.DoVisitGroupNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitMapFieldNode(node *MapFieldNode) error {
+ if b.DoVisitMapFieldNode != nil {
+ return b.DoVisitMapFieldNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitMapTypeNode(node *MapTypeNode) error {
+ if b.DoVisitMapTypeNode != nil {
+ return b.DoVisitMapTypeNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitOneOfNode(node *OneOfNode) error {
+ if b.DoVisitOneOfNode != nil {
+ return b.DoVisitOneOfNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitEnumNode(node *EnumNode) error {
+ if b.DoVisitEnumNode != nil {
+ return b.DoVisitEnumNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitEnumValueNode(node *EnumValueNode) error {
+ if b.DoVisitEnumValueNode != nil {
+ return b.DoVisitEnumValueNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitServiceNode(node *ServiceNode) error {
+ if b.DoVisitServiceNode != nil {
+ return b.DoVisitServiceNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitRPCNode(node *RPCNode) error {
+ if b.DoVisitRPCNode != nil {
+ return b.DoVisitRPCNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitRPCTypeNode(node *RPCTypeNode) error {
+ if b.DoVisitRPCTypeNode != nil {
+ return b.DoVisitRPCTypeNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitIdentNode(node *IdentNode) error {
+ if b.DoVisitIdentNode != nil {
+ return b.DoVisitIdentNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitCompoundIdentNode(node *CompoundIdentNode) error {
+ if b.DoVisitCompoundIdentNode != nil {
+ return b.DoVisitCompoundIdentNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitStringLiteralNode(node *StringLiteralNode) error {
+ if b.DoVisitStringLiteralNode != nil {
+ return b.DoVisitStringLiteralNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitCompoundStringLiteralNode(node *CompoundStringLiteralNode) error {
+ if b.DoVisitCompoundStringLiteralNode != nil {
+ return b.DoVisitCompoundStringLiteralNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitUintLiteralNode(node *UintLiteralNode) error {
+ if b.DoVisitUintLiteralNode != nil {
+ return b.DoVisitUintLiteralNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitPositiveUintLiteralNode(node *PositiveUintLiteralNode) error {
+ if b.DoVisitPositiveUintLiteralNode != nil {
+ return b.DoVisitPositiveUintLiteralNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitNegativeIntLiteralNode(node *NegativeIntLiteralNode) error {
+ if b.DoVisitNegativeIntLiteralNode != nil {
+ return b.DoVisitNegativeIntLiteralNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitFloatLiteralNode(node *FloatLiteralNode) error {
+ if b.DoVisitFloatLiteralNode != nil {
+ return b.DoVisitFloatLiteralNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitSpecialFloatLiteralNode(node *SpecialFloatLiteralNode) error {
+ if b.DoVisitSpecialFloatLiteralNode != nil {
+ return b.DoVisitSpecialFloatLiteralNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitSignedFloatLiteralNode(node *SignedFloatLiteralNode) error {
+ if b.DoVisitSignedFloatLiteralNode != nil {
+ return b.DoVisitSignedFloatLiteralNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitArrayLiteralNode(node *ArrayLiteralNode) error {
+ if b.DoVisitArrayLiteralNode != nil {
+ return b.DoVisitArrayLiteralNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitMessageLiteralNode(node *MessageLiteralNode) error {
+ if b.DoVisitMessageLiteralNode != nil {
+ return b.DoVisitMessageLiteralNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitMessageFieldNode(node *MessageFieldNode) error {
+ if b.DoVisitMessageFieldNode != nil {
+ return b.DoVisitMessageFieldNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitKeywordNode(node *KeywordNode) error {
+ if b.DoVisitKeywordNode != nil {
+ return b.DoVisitKeywordNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitRuneNode(node *RuneNode) error {
+ if b.DoVisitRuneNode != nil {
+ return b.DoVisitRuneNode(node)
+ }
+ return b.visitInterface(node)
+}
+
+func (b *SimpleVisitor) VisitEmptyDeclNode(node *EmptyDeclNode) error {
+ if b.DoVisitEmptyDeclNode != nil {
+ return b.DoVisitEmptyDeclNode(node)
+ }
+ return b.visitInterface(node)
+}
diff --git a/vendor/github.com/bufbuild/protocompile/compiler.go b/vendor/github.com/bufbuild/protocompile/compiler.go
new file mode 100644
index 000000000..e188f46d0
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/compiler.go
@@ -0,0 +1,560 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protocompile
+
+import (
+ "bytes"
+ "context"
+ "fmt"
+ "io"
+ "runtime"
+ "runtime/debug"
+ "strings"
+ "sync"
+
+ "golang.org/x/sync/semaphore"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/linker"
+ "github.com/bufbuild/protocompile/options"
+ "github.com/bufbuild/protocompile/parser"
+ "github.com/bufbuild/protocompile/reporter"
+ "github.com/bufbuild/protocompile/sourceinfo"
+)
+
+// Compiler handles compilation tasks, to turn protobuf source files, or other
+// intermediate representations, into fully linked descriptors.
+//
+// The compilation process involves five steps for each protobuf source file:
+// 1. Parsing the source into an AST (abstract syntax tree).
+// 2. Converting the AST into descriptor protos.
+// 3. Linking descriptor protos into fully linked descriptors.
+// 4. Interpreting options.
+// 5. Computing source code information.
+//
+// With fully linked descriptors, code generators and protoc plugins could be
+// invoked (though that step is not implemented by this package and not a
+// responsibility of this type).
+type Compiler struct {
+ // Resolves path/file names into source code or intermediate representations
+ // for protobuf source files. This is how the compiler loads the files to
+ // be compiled as well as all dependencies. This field is the only required
+ // field.
+ Resolver Resolver
+ // The maximum parallelism to use when compiling. If unspecified or set to
+ // a non-positive value, then min(runtime.NumCPU(), runtime.GOMAXPROCS(-1))
+ // will be used.
+ MaxParallelism int
+ // A custom error and warning reporter. If unspecified a default reporter
+ // is used. A default reporter fails the compilation after encountering any
+ // errors and ignores all warnings.
+ Reporter reporter.Reporter
+
+ // If unspecified or set to SourceInfoNone, source code information will not
+ // be included in the resulting descriptors. Source code information is
+ // metadata in the file descriptor that provides position information (i.e.
+ // the line and column where file elements were defined) as well as comments.
+ //
+ // If set to SourceInfoStandard, normal source code information will be
+ // included in the resulting descriptors. This matches the output of protoc
+ // (the reference compiler for Protocol Buffers). If set to
+ // SourceInfoMoreComments, the resulting descriptor will attempt to preserve
+ // as many comments as possible, for all elements in the file, not just for
+ // complete declarations.
+ //
+ // If Resolver returns descriptors or descriptor protos for a file, then
+ // those descriptors will not be modified. If they do not already include
+ // source code info, they will be left that way when the compile operation
+ // concludes. Similarly, if they already have source code info but this flag
+ // is false, existing info will be left in place.
+ SourceInfoMode SourceInfoMode
+
+ // If true, ASTs are retained in compilation results for which an AST was
+ // constructed. So any linker.Result value in the resulting compiled files
+ // will have an AST, in addition to descriptors. If left false, the AST
+ // will be removed as soon as it's no longer needed. This can help reduce
+ // total memory usage for operations involving a large number of files.
+ RetainASTs bool
+}
+
+// SourceInfoMode indicates how source code info is generated by a Compiler.
+type SourceInfoMode int
+
+const (
+ // SourceInfoNone indicates that no source code info is generated.
+ SourceInfoNone = SourceInfoMode(iota)
+ // SourceInfoStandard indicates that the standard source code info is
+ // generated, which includes comments only for complete declarations.
+ SourceInfoStandard
+ // SourceInfoExtraComments indicates that source code info is generated
+ // and will include comments for all elements (more comments than would
+ // be found in a descriptor produced by protoc).
+ SourceInfoExtraComments
+)
+
+// Compile compiles the given file names into fully-linked descriptors. The
+// compiler's resolver is used to locate source code (or intermediate artifacts
+// such as parsed ASTs or descriptor protos) and then do what is necessary to
+// transform that into descriptors (parsing, linking, etc).
+//
+// Elements in the given returned files will implement [linker.Result] if the
+// compiler had to link it (i.e. the resolver provided either a descriptor proto
+// or source code). That result will contain a full AST for the file if the
+// compiler had to parse it (i.e. the resolver provided source code for that
+// file).
+func (c *Compiler) Compile(ctx context.Context, files ...string) (linker.Files, error) {
+ if len(files) == 0 {
+ return nil, nil
+ }
+
+ ctx, cancel := context.WithCancel(ctx)
+ defer cancel()
+
+ par := c.MaxParallelism
+ if par <= 0 {
+ par = runtime.GOMAXPROCS(-1)
+ cpus := runtime.NumCPU()
+ if par > cpus {
+ par = cpus
+ }
+ }
+
+ h := reporter.NewHandler(c.Reporter)
+
+ e := executor{
+ c: c,
+ h: h,
+ s: semaphore.NewWeighted(int64(par)),
+ cancel: cancel,
+ sym: &linker.Symbols{},
+ results: map[string]*result{},
+ }
+
+ // We lock now and create all tasks under lock to make sure that no
+ // async task can create a duplicate result. For example, if files
+ // contains both "foo.proto" and "bar.proto", then there is a race
+ // after we start compiling "foo.proto" between this loop and the
+ // async compilation task to create the result for "bar.proto". But
+ // we need to know if the file is directly requested for compilation,
+ // so we need this loop to define the result. So this loop holds the
+ // lock the whole time so async tasks can't create a result first.
+ results := make([]*result, len(files))
+ func() {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+ for i, f := range files {
+ results[i] = e.compileLocked(ctx, f, true)
+ }
+ }()
+
+ descs := make([]linker.File, len(files))
+ var firstError error
+ for i, r := range results {
+ select {
+ case <-r.ready:
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ }
+ if r.err != nil {
+ if firstError == nil {
+ firstError = r.err
+ }
+ }
+ descs[i] = r.res
+ }
+
+ if err := h.Error(); err != nil {
+ return descs, err
+ }
+ // this should probably never happen; if any task returned an
+ // error, h.Error() should be non-nil
+ return descs, firstError
+}
+
+type result struct {
+ name string
+ ready chan struct{}
+
+ // true if this file was explicitly provided to the compiler; otherwise
+ // this file is an import that is implicitly included
+ explicitFile bool
+
+ // produces a linker.File or error, only available when ready is closed
+ res linker.File
+ err error
+
+ mu sync.Mutex
+ // the results that are dependencies of this result; this result is
+ // blocked, waiting on these dependencies to complete
+ blockedOn []string
+}
+
+func (r *result) fail(err error) {
+ r.err = err
+ close(r.ready)
+}
+
+func (r *result) complete(f linker.File) {
+ r.res = f
+ close(r.ready)
+}
+
+func (r *result) setBlockedOn(deps []string) {
+ r.mu.Lock()
+ defer r.mu.Unlock()
+ r.blockedOn = deps
+}
+
+func (r *result) getBlockedOn() []string {
+ r.mu.Lock()
+ defer r.mu.Unlock()
+ return r.blockedOn
+}
+
+type executor struct {
+ c *Compiler
+ h *reporter.Handler
+ s *semaphore.Weighted
+ cancel context.CancelFunc
+ sym *linker.Symbols
+
+ mu sync.Mutex
+ results map[string]*result
+}
+
+func (e *executor) compile(ctx context.Context, file string) *result {
+ e.mu.Lock()
+ defer e.mu.Unlock()
+
+ return e.compileLocked(ctx, file, false)
+}
+
+func (e *executor) compileLocked(ctx context.Context, file string, explicitFile bool) *result {
+ r := e.results[file]
+ if r != nil {
+ return r
+ }
+
+ r = &result{
+ name: file,
+ ready: make(chan struct{}),
+ explicitFile: explicitFile,
+ }
+ e.results[file] = r
+ go func() {
+ defer func() {
+ if p := recover(); p != nil {
+ if r.err == nil {
+ // TODO: strip top frames from stack trace so that the panic is
+ // the top of the trace?
+ panicErr := PanicError{File: file, Value: p, Stack: string(debug.Stack())}
+ r.fail(panicErr)
+ }
+ // TODO: if r.err != nil, then this task has already
+ // failed and there's nothing we can really do to
+ // communicate this panic to parent goroutine. This
+ // means the panic must have happened *after* the
+ // failure was already recorded (or during?)
+ // It would be nice to do something else here, like
+ // send the compiler an out-of-band error? Or log?
+ }
+ }()
+ e.doCompile(ctx, file, r)
+ }()
+ return r
+}
+
+// PanicError is an error value that represents a recovered panic. It includes
+// the value returned by recover() as well as the stack trace.
+//
+// This should generally only be seen if a Resolver implementation panics.
+//
+// An error returned by a Compiler may wrap a PanicError, so you may need to
+// use errors.As(...) to access panic details.
+type PanicError struct {
+ // The file that was being processed when the panic occurred
+ File string
+ // The value returned by recover()
+ Value interface{}
+ // A formatted stack trace
+ Stack string
+}
+
+// Error implements the error interface. It does NOT include the stack trace.
+// Use a type assertion and query the Stack field directly to access that.
+func (p PanicError) Error() string {
+ return fmt.Sprintf("panic handling %q: %v", p.File, p.Value)
+}
+
+type errFailedToResolve struct {
+ err error
+ path string
+}
+
+func (e errFailedToResolve) Error() string {
+ errMsg := e.err.Error()
+ if strings.Contains(errMsg, e.path) {
+ // underlying error already refers to path in question, so we don't need to add more context
+ return errMsg
+ }
+ return fmt.Sprintf("could not resolve path %q: %s", e.path, e.err.Error())
+}
+
+func (e errFailedToResolve) Unwrap() error {
+ return e.err
+}
+
+func (e *executor) doCompile(ctx context.Context, file string, r *result) {
+ t := task{e: e, h: e.h.SubHandler(), r: r}
+ if err := e.s.Acquire(ctx, 1); err != nil {
+ r.fail(err)
+ return
+ }
+ defer t.release()
+
+ sr, err := e.c.Resolver.FindFileByPath(file)
+ if err != nil {
+ r.fail(errFailedToResolve{err, file})
+ return
+ }
+
+ defer func() {
+ // if results included a result, don't leave it open if it can be closed
+ if sr.Source == nil {
+ return
+ }
+ if c, ok := sr.Source.(io.Closer); ok {
+ _ = c.Close()
+ }
+ }()
+
+ desc, err := t.asFile(ctx, file, sr)
+ if err != nil {
+ r.fail(err)
+ return
+ }
+ r.complete(desc)
+}
+
+// A compilation task. The executor has a semaphore that limits the number
+// of concurrent, running tasks.
+type task struct {
+ e *executor
+
+ // handler for this task
+ h *reporter.Handler
+
+ // If true, this task needs to acquire a semaphore permit before running.
+ // If false, this task needs to release its semaphore permit on completion.
+ released bool
+
+ // the result that is populated by this task
+ r *result
+}
+
+func (t *task) release() {
+ if !t.released {
+ t.e.s.Release(1)
+ t.released = true
+ }
+}
+
+func (t *task) asFile(ctx context.Context, name string, r SearchResult) (linker.File, error) {
+ if r.Desc != nil {
+ if r.Desc.Path() != name {
+ return nil, fmt.Errorf("search result for %q returned descriptor for %q", name, r.Desc.Path())
+ }
+ return linker.NewFileRecursive(r.Desc)
+ }
+
+ parseRes, err := t.asParseResult(name, r)
+ if err != nil {
+ return nil, err
+ }
+
+ var deps []linker.File
+ if len(parseRes.FileDescriptorProto().Dependency) > 0 {
+ t.r.setBlockedOn(parseRes.FileDescriptorProto().Dependency)
+
+ results := make([]*result, len(parseRes.FileDescriptorProto().Dependency))
+ checked := map[string]struct{}{}
+ for i, dep := range parseRes.FileDescriptorProto().Dependency {
+ pos := findImportPos(parseRes, dep)
+ if name == dep {
+ // doh! file imports itself
+ handleImportCycle(t.h, pos, []string{name}, dep)
+ return nil, t.h.Error()
+ }
+
+ res := t.e.compile(ctx, dep)
+ // check for dependency cycle to prevent deadlock
+ if err := t.e.checkForDependencyCycle(res, []string{name, dep}, pos, checked); err != nil {
+ return nil, err
+ }
+ results[i] = res
+ }
+ deps = make([]linker.File, len(results))
+
+ // release our semaphore so dependencies can be processed w/out risk of deadlock
+ t.e.s.Release(1)
+ t.released = true
+
+ // now we wait for them all to be computed
+ for i, res := range results {
+ select {
+ case <-res.ready:
+ if res.err != nil {
+ if rerr, ok := res.err.(errFailedToResolve); ok {
+ // We don't report errors to get file from resolver to handler since
+ // it's usually considered immediately fatal. However, if the reason
+ // we were resolving is due to an import, turn this into an error with
+ // source position that pinpoints the import statement and report it.
+ return nil, reporter.Error(findImportPos(parseRes, res.name), rerr)
+ }
+ return nil, res.err
+ }
+ deps[i] = res.res
+ case <-ctx.Done():
+ return nil, ctx.Err()
+ }
+ }
+
+ // all deps resolved
+ t.r.setBlockedOn(nil)
+ // reacquire semaphore so we can proceed
+ if err := t.e.s.Acquire(ctx, 1); err != nil {
+ return nil, err
+ }
+ t.released = false
+ }
+
+ return t.link(parseRes, deps)
+}
+
+func (e *executor) checkForDependencyCycle(res *result, sequence []string, pos ast.SourcePos, checked map[string]struct{}) error {
+ if _, ok := checked[res.name]; ok {
+ // already checked this one
+ return nil
+ }
+ checked[res.name] = struct{}{}
+ deps := res.getBlockedOn()
+ for _, dep := range deps {
+ // is this a cycle?
+ for _, file := range sequence {
+ if file == dep {
+ handleImportCycle(e.h, pos, sequence, dep)
+ return e.h.Error()
+ }
+ }
+
+ e.mu.Lock()
+ depRes := e.results[dep]
+ e.mu.Unlock()
+ if depRes == nil {
+ continue
+ }
+ if err := e.checkForDependencyCycle(depRes, append(sequence, dep), pos, checked); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func handleImportCycle(h *reporter.Handler, pos ast.SourcePos, importSequence []string, dep string) {
+ var buf bytes.Buffer
+ buf.WriteString("cycle found in imports: ")
+ for _, imp := range importSequence {
+ fmt.Fprintf(&buf, "%q -> ", imp)
+ }
+ fmt.Fprintf(&buf, "%q", dep)
+ // error is saved and returned in caller
+ h.HandleErrorf(pos, buf.String()) //nolint:errcheck
+}
+
+func findImportPos(res parser.Result, dep string) ast.SourcePos {
+ root := res.AST()
+ if root == nil {
+ return ast.UnknownPos(res.FileNode().Name())
+ }
+ for _, decl := range root.Decls {
+ if imp, ok := decl.(*ast.ImportNode); ok {
+ if imp.Name.AsString() == dep {
+ return root.NodeInfo(imp.Name).Start()
+ }
+ }
+ }
+ // this should never happen...
+ return ast.UnknownPos(res.FileNode().Name())
+}
+
+func (t *task) link(parseRes parser.Result, deps linker.Files) (linker.File, error) {
+ file, err := linker.Link(parseRes, deps, t.e.sym, t.h)
+ if err != nil {
+ return nil, err
+ }
+ optsIndex, err := options.InterpretOptions(file, t.h)
+ if err != nil {
+ return nil, err
+ }
+ // now that options are interpreted, we can do some additional checks
+ if err := file.ValidateOptions(t.h); err != nil {
+ return nil, err
+ }
+ if t.r.explicitFile {
+ file.CheckForUnusedImports(t.h)
+ }
+
+ if t.e.c.SourceInfoMode != SourceInfoNone && parseRes.AST() != nil {
+ switch t.e.c.SourceInfoMode {
+ case SourceInfoStandard:
+ parseRes.FileDescriptorProto().SourceCodeInfo = sourceinfo.GenerateSourceInfo(parseRes.AST(), optsIndex)
+ case SourceInfoExtraComments:
+ parseRes.FileDescriptorProto().SourceCodeInfo = sourceinfo.GenerateSourceInfoWithExtraComments(parseRes.AST(), optsIndex)
+ }
+ file.PopulateSourceCodeInfo()
+ }
+
+ if !t.e.c.RetainASTs {
+ file.RemoveAST()
+ }
+ return file, nil
+}
+
+func (t *task) asParseResult(name string, r SearchResult) (parser.Result, error) {
+ if r.Proto != nil {
+ if r.Proto.GetName() != name {
+ return nil, fmt.Errorf("search result for %q returned descriptor for %q", name, r.Proto.GetName())
+ }
+ return parser.ResultWithoutAST(r.Proto), nil
+ }
+
+ file, err := t.asAST(name, r)
+ if err != nil {
+ return nil, err
+ }
+
+ return parser.ResultFromAST(file, true, t.h)
+}
+
+func (t *task) asAST(name string, r SearchResult) (*ast.FileNode, error) {
+ if r.AST != nil {
+ if r.AST.Name() != name {
+ return nil, fmt.Errorf("search result for %q returned descriptor for %q", name, r.AST.Name())
+ }
+ return r.AST, nil
+ }
+
+ return parser.Parse(name, r.Source, t.h)
+}
diff --git a/vendor/github.com/bufbuild/protocompile/doc.go b/vendor/github.com/bufbuild/protocompile/doc.go
new file mode 100644
index 000000000..661ccc45f
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/doc.go
@@ -0,0 +1,82 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protocompile provides the entry point for a high performance
+// native Go protobuf compiler. "Compile" in this case just means parsing
+// and validating source and generating fully-linked descriptors in the end.
+// Unlike the protoc command-line tool, this package does not try to use the
+// descriptors to perform code generation.
+//
+// The various sub-packages represent the various compile phases and contain
+// models for the intermediate results. Those phases follow:
+// 1. Parse into AST.
+// Also see: parser.Parse
+// 2. Convert AST to unlinked descriptor protos.
+// Also see: parser.ResultFromAST
+// 3. Link descriptor protos into "rich" descriptors.
+// Also see: linker.Link
+// 4. Interpret custom options.
+// Also see: options.InterpretOptions
+// 5. Generate source code info.
+// Also see: sourceinfo.GenerateSourceInfo
+//
+// This package provides an easy-to-use interface that does all the relevant
+// phases, based on the inputs given. If an input is provided as source, all
+// phases apply. If an input is provided as a descriptor proto, only phases
+// 3 to 5 apply. Nothing is necessary if provided a linked descriptor (which
+// is usually only the case for select system dependencies).
+//
+// This package is also capable of taking advantage of multiple CPU cores, so
+// a compilation involving thousands of files can be done very quickly by
+// compiling things in parallel.
+//
+// # Resolvers
+//
+// A Resolver is how the compiler locates artifacts that are inputs to the
+// compilation. For example, it can load protobuf source code that must be
+// processed. A Resolver could also supply some already-compiled dependencies
+// as fully-linked descriptors, alleviating the need to re-compile them.
+//
+// A Resolver can provide any of the following in response to a query for an
+// input.
+// - Source code: If a resolver answers a query with protobuf source, the
+// compiler will parse and compile it.
+// - AST: If a resolver answers a query with an AST, the parsing step can be
+// skipped, and the rest of the compilation steps will be applied.
+// - Descriptor proto: If a resolver answers a query with an unlinked proto,
+// only the other compilation steps, including linking, need to be applied.
+// - Descriptor: If a resolver answers a query with a fully-linked descriptor,
+// nothing further needs to be done. The descriptor is used as-is.
+//
+// Compilation will use the Resolver to load the files that are to be compiled
+// and also to load all dependencies (i.e. other files imported by those being
+// compiled).
+//
+// # Compiler
+//
+// A Compiler accepts a list of file names and produces the list of descriptors.
+// A Compiler has several fields that control how it works but only the Resolver
+// field is required. A minimal Compiler, that resolves files by loading them
+// from the file system based on the current working directory, can be had with
+// the following simple snippet:
+//
+// compiler := protocompile.Compiler{
+// Resolver: &protocompile.SourceResolver{},
+// }
+//
+// This minimal Compiler will use default parallelism, equal to the number of
+// CPU cores detected; it will not generate source code info in the resulting
+// descriptors; and it will fail fast at the first sign of any error. All of
+// these aspects can be customized by setting other fields.
+package protocompile
diff --git a/vendor/github.com/bufbuild/protocompile/go.work b/vendor/github.com/bufbuild/protocompile/go.work
new file mode 100644
index 000000000..de1c41a8f
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/go.work
@@ -0,0 +1,7 @@
+go 1.19
+
+use (
+ .
+ ./internal/benchmarks
+ ./internal/tools
+)
diff --git a/vendor/github.com/bufbuild/protocompile/go.work.sum b/vendor/github.com/bufbuild/protocompile/go.work.sum
new file mode 100644
index 000000000..f9653baad
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/go.work.sum
@@ -0,0 +1,184 @@
+cloud.google.com/go v0.78.0/go.mod h1:QjdrLG0uq+YwhjoVOLsS1t7TW8fs36kLs4XO5R5ECHg=
+cloud.google.com/go v0.79.0/go.mod h1:3bzgcEeQlzbuEAYu4mrWhKqWjmpprinYgKJLgKHnbb8=
+cloud.google.com/go v0.81.0/go.mod h1:mk/AM35KwGk/Nm2YSeZbxXdrNK3KZOYHmLkOqC2V6E0=
+cloud.google.com/go v0.83.0/go.mod h1:Z7MJUsANfY0pYPdw0lbnivPx4/vhy/e2FEkSkF7vAVY=
+cloud.google.com/go v0.84.0/go.mod h1:RazrYuxIK6Kb7YrzzhPoLmCVzl7Sup4NrbKPg8KHSUM=
+cloud.google.com/go v0.87.0/go.mod h1:TpDYlFy7vuLzZMMZ+B6iRiELaY7z/gJPaqbMx6mlWcY=
+cloud.google.com/go v0.90.0/go.mod h1:kRX0mNRHe0e2rC6oNakvwQqzyDmg57xJ+SZU1eT2aDQ=
+cloud.google.com/go v0.93.3/go.mod h1:8utlLll2EF5XMAV15woO4lSbWQlk8rer9aLOfLh7+YI=
+cloud.google.com/go v0.94.1/go.mod h1:qAlAugsXlC+JWO+Bke5vCtc9ONxjQT3drlTTnAplMW4=
+cloud.google.com/go v0.97.0/go.mod h1:GF7l59pYBVlXQIBLx3a761cZ41F9bBH3JUlihCt2Udc=
+cloud.google.com/go v0.99.0/go.mod h1:w0Xx2nLzqWJPuozYQX+hFfCSI8WioryfRDzkoI/Y2ZA=
+cloud.google.com/go v0.100.2/go.mod h1:4Xra9TjzAeYHrl5+oeLlzbM2k3mjVhZh4UqTZ//w99A=
+cloud.google.com/go/compute v0.1.0/go.mod h1:GAesmwr110a34z04OlxYkATPBEfVhkymfTBXtfbBFow=
+cloud.google.com/go/compute v1.3.0/go.mod h1:cCZiE1NHEtai4wiufUhW8I8S1JKkAnhnQJWM7YD99wM=
+cloud.google.com/go/compute v1.5.0/go.mod h1:9SMHyhJlzhlkJqrPAc839t2BZFTSk6Jdj6mkzQJeu0M=
+cloud.google.com/go/compute v1.6.0/go.mod h1:T29tfhtVbq1wvAPo0E3+7vhgmkOYeXjhFvz/FMzPu0s=
+cloud.google.com/go/compute v1.6.1/go.mod h1:g85FgpzFvNULZ+S8AYq87axRKuf2Kh7deLqV/jJ3thU=
+github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU=
+github.com/antihax/optional v1.0.0/go.mod h1:uupD/76wgC+ih3iEmQUL+0Ugr19nfwCT1kdvxnR2qWY=
+github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko=
+github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc=
+github.com/cncf/udpa/go v0.0.0-20210930031921-04548b0d99d4/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI=
+github.com/cncf/xds/go v0.0.0-20210312221358-fbca930ec8ed/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210805033703-aa0b78936158/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20210922020428-25de7278fc84/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211001041855-01bcc9b48dfe/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/cncf/xds/go v0.0.0-20211011173535-cb28da3451f1/go.mod h1:eXthEFrGJvWHgFFCl3hGmgk+/aYT6PnTQLykKQRLhEs=
+github.com/envoyproxy/go-control-plane v0.9.9-0.20210512163311-63b5d3c536b0/go.mod h1:hliV/p42l8fGbc6Y9bQ70uLwIvmJyVE5k4iMKlh8wCQ=
+github.com/envoyproxy/go-control-plane v0.9.10-0.20210907150352-cf90f659a021/go.mod h1:AFq3mo9L8Lqqiid3OhADV3RfLJnjiw63cSpi+fDTRC0=
+github.com/envoyproxy/go-control-plane v0.10.2-0.20220325020618-49ff273808a1/go.mod h1:KJwIaB5Mv44NWtYuAOFCVOjcI94vtpEz2JU/D2v6IjE=
+github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
+github.com/golang/mock v1.5.0/go.mod h1:CWnOUgYIOo4TcNZ0wHX3YZCqsaM1I1Jvs6v3mP3KVu8=
+github.com/golang/mock v1.6.0/go.mod h1:p6yTPP+5HYm5mzsMV8JkE6ZKdX+/wYM6Hr+LicevLPs=
+github.com/golang/protobuf v1.5.1/go.mod h1:DopwsBzvsk0Fs44TXzsVbJyPhcCPeIwnvohx4u74HPM=
+github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q=
+github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
+github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE=
+github.com/google/martian/v3 v3.2.1/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk=
+github.com/google/pprof v0.0.0-20210122040257-d980be63207e/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210226084205-cbba55b83ad5/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210601050228-01bbb1931b22/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210609004039-a478d1d731e9/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/pprof v0.0.0-20210720184732-4bb14d4b1be1/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE=
+github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
+github.com/googleapis/gax-go/v2 v2.1.0/go.mod h1:Q3nei7sK6ybPYH7twZdmQpAd1MKb7pfu6SK+H1/DsU0=
+github.com/googleapis/gax-go/v2 v2.1.1/go.mod h1:hddJymUZASv3XPyGkUpKj8pPO47Rmb0eJc8R6ouapiM=
+github.com/googleapis/gax-go/v2 v2.2.0/go.mod h1:as02EH8zWkzwUoLbBaFeQ+arQaj/OthfcblKl4IGNaM=
+github.com/googleapis/gax-go/v2 v2.3.0/go.mod h1:b8LNqSzNabLiUpXKkY7HAR5jr6bIT99EXz9pXxye9YM=
+github.com/googleapis/gax-go/v2 v2.4.0/go.mod h1:XOTVJ59hdnfJLIP/dh8n5CGryZR2LxK9wbMD5+iXC6c=
+github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
+github.com/rogpeppe/fastuuid v1.2.0/go.mod h1:jVj6XXZzXRy/MSR5jhDC/2q6DgLz+nrA6LYCDYWNEvQ=
+github.com/spaolacci/murmur3 v0.0.0-20180118202830-f09979ecbc72/go.mod h1:JwIasOWyU6f++ZhiEuf87xNszmSA2myDM2Kzu9HwQUA=
+github.com/stretchr/testify v1.6.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
+go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E=
+go.opentelemetry.io/proto/otlp v0.7.0/go.mod h1:PqfVotwruBrMGOCsRd/89rSnXhoiJIqeYNgFYFoEGnI=
+golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
+golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY=
+golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
+golang.org/x/net v0.0.0-20210119194325-5f4716e94777/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
+golang.org/x/net v0.0.0-20210316092652-d523dce5a7f4/go.mod h1:RBQZq4jEuRlivfhVLdyRGr576XBO4/greRjx4P4O3yc=
+golang.org/x/net v0.0.0-20210503060351-7fd8e65b6420/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
+golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220225172249-27dd8689420f/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220325170049-de3da57026de/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220412020605-290c469a71a5/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220425223048-2871e0cb64e4/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220520000938-2e3eb7b945c2/go.mod h1:CfG3xpIq0wQ8r1q4Su4UZFWDARRcnwPjda9FqA0JpMk=
+golang.org/x/net v0.0.0-20220812174116-3211cb980234/go.mod h1:YDH+HFinaLZZlnHAfSS6ZXJJ9M9t4Dl22yv3iI2vPwk=
+golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210313182246-cd4f82c27b84/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210628180205-a41e5a781914/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210805134026-6f1e6394065a/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20210819190943-2bc19b11175f/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20211104180415-d3ed0bb246c8/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A=
+golang.org/x/oauth2 v0.0.0-20220223155221-ee480838109b/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
+golang.org/x/oauth2 v0.0.0-20220309155454-6242fa91716a/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
+golang.org/x/oauth2 v0.0.0-20220411215720-9780585627b5/go.mod h1:DAh4E804XQdzx2j+YRIaUnCqCV2RuMz24cGBJ5QYIrc=
+golang.org/x/sync v0.0.0-20220513210516-0976fa681c29/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
+golang.org/x/sys v0.0.0-20210220050731-9a76102bfb43/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210305230114-8fe3ee5dd75b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210315160823-c6e025ad8005/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
+golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210603125802-9665404d3644/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210616094352-59db8d763f22/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210806184541-e5e7981a1069/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210823070655-63515b42dcdf/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20210908233432-aa78b53d3365/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211124211545-fe61309f8881/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220128215802-99c3d69c2c27/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220209214540-3681064d5158/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220227234510-4e6760a101f9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220328115105-d36c6a25d886/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220502124256-b6088ccd6cba/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/sys v0.0.0-20220728004956-3c1f35247d10/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
+golang.org/x/term v0.0.0-20220722155259-a9ba230a4035/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
+golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
+golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.3/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/tools v0.1.4/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk=
+golang.org/x/xerrors v0.0.0-20220411194840-2f41105eb62f/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
+golang.org/x/xerrors v0.0.0-20220517211312-f3a8303e98df/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
+google.golang.org/api v0.41.0/go.mod h1:RkxM5lITDfTzmyKFPt+wGrCJbVfniCr2ool8kTBzRTU=
+google.golang.org/api v0.43.0/go.mod h1:nQsDGjRXMo4lvh5hP0TKqF244gqhGcr/YSIykhUk/94=
+google.golang.org/api v0.47.0/go.mod h1:Wbvgpq1HddcWVtzsVLyfLp8lDg6AA241LmgIL59tHXo=
+google.golang.org/api v0.48.0/go.mod h1:71Pr1vy+TAZRPkPs/xlCf5SsU8WjuAWv1Pfjbtukyy4=
+google.golang.org/api v0.50.0/go.mod h1:4bNT5pAuq5ji4SRZm+5QIkjny9JAyVD/3gaSihNefaw=
+google.golang.org/api v0.51.0/go.mod h1:t4HdrdoNgyN5cbEfm7Lum0lcLDLiise1F8qDKX00sOU=
+google.golang.org/api v0.54.0/go.mod h1:7C4bFFOvVDGXjfDTAsgGwDgAxRDeQ4X8NvUedIt6z3k=
+google.golang.org/api v0.55.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
+google.golang.org/api v0.56.0/go.mod h1:38yMfeP1kfjsl8isn0tliTjIb1rJXcQi4UXlbqivdVE=
+google.golang.org/api v0.57.0/go.mod h1:dVPlbZyBo2/OjBpmvNdpn2GRm6rPy75jyU7bmhdrMgI=
+google.golang.org/api v0.61.0/go.mod h1:xQRti5UdCmoCEqFxcz93fTl338AVqDgyaDRuOZ3hg9I=
+google.golang.org/api v0.63.0/go.mod h1:gs4ij2ffTRXwuzzgJl/56BdwJaA194ijkfn++9tDuPo=
+google.golang.org/api v0.67.0/go.mod h1:ShHKP8E60yPsKNw/w8w+VYaj9H6buA5UqDp8dhbQZ6g=
+google.golang.org/api v0.70.0/go.mod h1:Bs4ZM2HGifEvXwd50TtW70ovgJffJYw2oRCOFU/SkfA=
+google.golang.org/api v0.71.0/go.mod h1:4PyU6e6JogV1f9eA4voyrTY2batOLdgZ5qZ5HOCc4j8=
+google.golang.org/api v0.74.0/go.mod h1:ZpfMZOVRMywNyvJFeqL9HRWBgAuRfSjJFpe9QtRRyDs=
+google.golang.org/api v0.75.0/go.mod h1:pU9QmyHLnzlpar1Mjt4IbapUCy8J+6HD6GeELN69ljA=
+google.golang.org/api v0.78.0/go.mod h1:1Sg78yoMLOhlQTeF+ARBoytAcH1NNyyl390YMy6rKmw=
+google.golang.org/api v0.81.0/go.mod h1:FA6Mb/bZxj706H2j+j2d6mHEEaHBmbbWnkfvmorOCko=
+google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c=
+google.golang.org/genproto v0.0.0-20210222152913-aa3ee6e6a81c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210303154014-9728d6b83eeb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210310155132-4ce2db91004e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210319143718-93e7006c17a6/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no=
+google.golang.org/genproto v0.0.0-20210402141018-6c239bbf2bb1/go.mod h1:9lPAdzaEmUacj36I+k7YKbEc5CXzPIeORRgDAUOu28A=
+google.golang.org/genproto v0.0.0-20210513213006-bf773b8c8384/go.mod h1:P3QM42oQyzQSnHPnZ/vqoCdDmzH28fzWByN9asMeM8A=
+google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20210604141403-392c879c8b08/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20210608205507-b6d2f5bf0d7d/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0=
+google.golang.org/genproto v0.0.0-20210624195500-8bfb893ecb84/go.mod h1:SzzZ/N+nwJDaO1kznhnlzqS8ocJICar6hYhVyhi++24=
+google.golang.org/genproto v0.0.0-20210713002101-d411969a0d9a/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
+google.golang.org/genproto v0.0.0-20210716133855-ce7ef5c701ea/go.mod h1:AxrInvYm1dci+enl5hChSFPOmmUF1+uAa/UsgNRWd7k=
+google.golang.org/genproto v0.0.0-20210728212813-7823e685a01f/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
+google.golang.org/genproto v0.0.0-20210805201207-89edb61ffb67/go.mod h1:ob2IJxKrgPT52GcgX759i1sleT07tiKowYBGbczaW48=
+google.golang.org/genproto v0.0.0-20210813162853-db860fec028c/go.mod h1:cFeNkxwySK631ADgubI+/XFU/xp8FD5KIVV4rj8UC5w=
+google.golang.org/genproto v0.0.0-20210821163610-241b8fcbd6c8/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210828152312-66f60bf46e71/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210831024726-fe130286e0e2/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210903162649-d08c68adba83/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210909211513-a8c4777a87af/go.mod h1:eFjDcFEctNawg4eG61bRv87N7iHBWyVhJu7u1kqDUXY=
+google.golang.org/genproto v0.0.0-20210924002016-3dee208752a0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211118181313-81c1377c94b1/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211206160659-862468c7d6e0/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20211221195035-429b39de9b1c/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20220126215142-9970aeb2e350/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20220207164111-0872dc986b00/go.mod h1:5CzLGKJ67TSI2B9POpiiyGha0AjJvZIUgRMt1dSmuhc=
+google.golang.org/genproto v0.0.0-20220218161850-94dd64e39d7c/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220222213610-43724f9ea8cf/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220304144024-325a89244dc8/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220310185008-1973136f34c6/go.mod h1:kGP+zUP2Ddo0ayMi4YuN7C3WZyJvGLZRh8Z5wnAqvEI=
+google.golang.org/genproto v0.0.0-20220324131243-acbaeb5b85eb/go.mod h1:hAL49I2IFola2sVEjAn7MEwsja0xp51I0tlGAf9hz4E=
+google.golang.org/genproto v0.0.0-20220407144326-9054f6ed7bac/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220413183235-5e96e2839df9/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220414192740-2d67ff6cf2b4/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220421151946-72621c1f0bd3/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220429170224-98d788798c3e/go.mod h1:8w6bsBMX6yCPbAVTeqQHvzxW0EIFigd5lZyahWgyfDo=
+google.golang.org/genproto v0.0.0-20220505152158-f39f71e6c8f3/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
+google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd h1:e0TwkXOdbnH/1x5rc5MZ/VYyiZ4v+RdVfrGMqEwT68I=
+google.golang.org/genproto v0.0.0-20220519153652-3a47de7e79bd/go.mod h1:RAyBrSAP7Fh3Nc84ghnVLDPuV51xc9agzmm4Ph6i0Q4=
+google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
+google.golang.org/grpc v1.36.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.36.1/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU=
+google.golang.org/grpc v1.37.0/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/grpc v1.37.1/go.mod h1:NREThFqKR1f3iQ6oBuvc5LadQuXVGo9rkm5ZGrQdJfM=
+google.golang.org/grpc v1.39.0/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
+google.golang.org/grpc v1.39.1/go.mod h1:PImNr+rS9TWYb2O4/emRugxiyHZ5JyHW5F+RPnDzfrE=
+google.golang.org/grpc v1.40.0/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
+google.golang.org/grpc v1.40.1/go.mod h1:ogyxbiOoUXAkP+4+xa6PZSE9DZgIHtSpzjDTB9KAK34=
+google.golang.org/grpc v1.44.0/go.mod h1:k+4IHHFw41K8+bbowsex27ge2rCb65oeWqe4jJ590SU=
+google.golang.org/grpc v1.45.0/go.mod h1:lN7owxKUQEqMfSyQikvvk5tf/6zMPsrK+ONuO11+0rQ=
+google.golang.org/grpc v1.46.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.46.2/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc v1.48.0/go.mod h1:vN9eftEi1UMyUsIF80+uQXhHjbXYbm0uXoFCACuMGWk=
+google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.1.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=
+google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
+google.golang.org/protobuf v1.28.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
+gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
diff --git a/vendor/github.com/bufbuild/protocompile/internal/message_context.go b/vendor/github.com/bufbuild/protocompile/internal/message_context.go
new file mode 100644
index 000000000..134a05d00
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/internal/message_context.go
@@ -0,0 +1,98 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "bytes"
+ "fmt"
+
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/ast"
+)
+
+// ParsedFile wraps an optional AST and required FileDescriptorProto.
+// This is used so types like parser.Result can be passed to this internal package avoiding circular imports.
+// Additionally, it makes it less likely that users might specify one or the other.
+type ParsedFile interface {
+ // AST returns the parsed abstract syntax tree. This returns nil if the
+ // Result was created without an AST.
+ AST() *ast.FileNode
+ // FileDescriptorProto returns the file descriptor proto.
+ FileDescriptorProto() *descriptorpb.FileDescriptorProto
+}
+
+// MessageContext provides information about the location in a descriptor
+// hierarchy, for adding context to warnings and error messages.
+type MessageContext struct {
+ // The relevant file
+ File ParsedFile
+
+ // The type and fully-qualified name of the element within the file.
+ ElementType string
+ ElementName string
+
+ // If the element being processed is an option (or *in* an option)
+ // on the named element above, this will be non-nil.
+ Option *descriptorpb.UninterpretedOption
+ // If the element being processed is inside a message literal in an
+ // option value, this will be non-empty and represent a traversal
+ // to the element in question.
+ OptAggPath string
+}
+
+func (c *MessageContext) String() string {
+ var ctx bytes.Buffer
+ if c.ElementType != "file" {
+ _, _ = fmt.Fprintf(&ctx, "%s %s: ", c.ElementType, c.ElementName)
+ }
+ if c.Option != nil && c.Option.Name != nil {
+ ctx.WriteString("option ")
+ writeOptionName(&ctx, c.Option.Name)
+ if c.File.AST() == nil {
+ // if we have no source position info, try to provide as much context
+ // as possible (if nodes != nil, we don't need this because any errors
+ // will actually have file and line numbers)
+ if c.OptAggPath != "" {
+ _, _ = fmt.Fprintf(&ctx, " at %s", c.OptAggPath)
+ }
+ }
+ ctx.WriteString(": ")
+ }
+ return ctx.String()
+}
+
+func writeOptionName(buf *bytes.Buffer, parts []*descriptorpb.UninterpretedOption_NamePart) {
+ first := true
+ for _, p := range parts {
+ if first {
+ first = false
+ } else {
+ buf.WriteByte('.')
+ }
+ nm := p.GetNamePart()
+ if nm[0] == '.' {
+ // skip leading dot
+ nm = nm[1:]
+ }
+ if p.GetIsExtension() {
+ buf.WriteByte('(')
+ buf.WriteString(nm)
+ buf.WriteByte(')')
+ } else {
+ buf.WriteString(nm)
+ }
+ }
+}
diff --git a/vendor/github.com/bufbuild/protocompile/internal/options.go b/vendor/github.com/bufbuild/protocompile/internal/options.go
new file mode 100644
index 000000000..5586802b2
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/internal/options.go
@@ -0,0 +1,59 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/reporter"
+)
+
+type hasOptionNode interface {
+ OptionNode(part *descriptorpb.UninterpretedOption) ast.OptionDeclNode
+ FileNode() ast.FileDeclNode // needed in order to query for NodeInfo
+}
+
+func FindOption(res hasOptionNode, handler *reporter.Handler, scope string, opts []*descriptorpb.UninterpretedOption, name string) (int, error) {
+ found := -1
+ for i, opt := range opts {
+ if len(opt.Name) != 1 {
+ continue
+ }
+ if opt.Name[0].GetIsExtension() || opt.Name[0].GetNamePart() != name {
+ continue
+ }
+ if found >= 0 {
+ optNode := res.OptionNode(opt)
+ fn := res.FileNode()
+ node := optNode.GetName()
+ nodeInfo := fn.NodeInfo(node)
+ return -1, handler.HandleErrorf(nodeInfo.Start(), "%s: option %s cannot be defined more than once", scope, name)
+ }
+ found = i
+ }
+ return found, nil
+}
+
+func RemoveOption(uo []*descriptorpb.UninterpretedOption, indexToRemove int) []*descriptorpb.UninterpretedOption {
+ switch {
+ case indexToRemove == 0:
+ return uo[1:]
+ case indexToRemove == len(uo)-1:
+ return uo[:len(uo)-1]
+ default:
+ return append(uo[:indexToRemove], uo[indexToRemove+1:]...)
+ }
+}
diff --git a/vendor/github.com/bufbuild/protocompile/internal/tags.go b/vendor/github.com/bufbuild/protocompile/internal/tags.go
new file mode 100644
index 000000000..7e674c176
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/internal/tags.go
@@ -0,0 +1,243 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import "math"
+
+const (
+ // MaxNormalTag is the maximum allowed tag number for a field in a normal message.
+ MaxNormalTag = 536870911 // 2^29 - 1
+
+ // MaxMessageSetTag is the maximum allowed tag number of a field in a message that
+ // uses the message set wire format.
+ MaxMessageSetTag = math.MaxInt32 - 1
+
+ // MaxTag is the maximum allowed tag number. (It is the same as MaxMessageSetTag
+ // since that is the absolute highest allowed.)
+ MaxTag = MaxMessageSetTag
+
+ // SpecialReservedStart is the first tag in a range that is reserved and not
+ // allowed for use in message definitions.
+ SpecialReservedStart = 19000
+ // SpecialReservedEnd is the last tag in a range that is reserved and not
+ // allowed for use in message definitions.
+ SpecialReservedEnd = 19999
+
+ // NB: It would be nice to use constants from generated code instead of
+ // hard-coding these here. But code-gen does not emit these as constants
+ // anywhere. The only places they appear in generated code are struct tags
+ // on fields of the generated descriptor protos.
+
+ // FilePackageTag is the tag number of the package element in a file
+ // descriptor proto.
+ FilePackageTag = 2
+ // FileDependencyTag is the tag number of the dependencies element in a
+ // file descriptor proto.
+ FileDependencyTag = 3
+ // FileMessagesTag is the tag number of the messages element in a file
+ // descriptor proto.
+ FileMessagesTag = 4
+ // FileEnumsTag is the tag number of the enums element in a file descriptor
+ // proto.
+ FileEnumsTag = 5
+ // FileServicesTag is the tag number of the services element in a file
+ // descriptor proto.
+ FileServicesTag = 6
+ // FileExtensionsTag is the tag number of the extensions element in a file
+ // descriptor proto.
+ FileExtensionsTag = 7
+ // FileOptionsTag is the tag number of the options element in a file
+ // descriptor proto.
+ FileOptionsTag = 8
+ // FileSourceCodeInfoTag is the tag number of the source code info element
+ // in a file descriptor proto.
+ FileSourceCodeInfoTag = 9
+ // FilePublicDependencyTag is the tag number of the public dependency element
+ // in a file descriptor proto.
+ FilePublicDependencyTag = 10
+ // FileWeakDependencyTag is the tag number of the weak dependency element
+ // in a file descriptor proto.
+ FileWeakDependencyTag = 11
+ // FileSyntaxTag is the tag number of the syntax element in a file
+ // descriptor proto.
+ FileSyntaxTag = 12
+ // MessageNameTag is the tag number of the name element in a message
+ // descriptor proto.
+ MessageNameTag = 1
+ // MessageFieldsTag is the tag number of the fields element in a message
+ // descriptor proto.
+ MessageFieldsTag = 2
+ // MessageNestedMessagesTag is the tag number of the nested messages
+ // element in a message descriptor proto.
+ MessageNestedMessagesTag = 3
+ // MessageEnumsTag is the tag number of the enums element in a message
+ // descriptor proto.
+ MessageEnumsTag = 4
+ // MessageExtensionRangesTag is the tag number of the extension ranges
+ // element in a message descriptor proto.
+ MessageExtensionRangesTag = 5
+ // MessageExtensionsTag is the tag number of the extensions element in a
+ // message descriptor proto.
+ MessageExtensionsTag = 6
+ // MessageOptionsTag is the tag number of the options element in a message
+ // descriptor proto.
+ MessageOptionsTag = 7
+ // MessageOneOfsTag is the tag number of the one-ofs element in a message
+ // descriptor proto.
+ MessageOneOfsTag = 8
+ // MessageReservedRangesTag is the tag number of the reserved ranges element
+ // in a message descriptor proto.
+ MessageReservedRangesTag = 9
+ // MessageReservedNamesTag is the tag number of the reserved names element
+ // in a message descriptor proto.
+ MessageReservedNamesTag = 10
+ // ExtensionRangeStartTag is the tag number of the start index in an
+ // extension range proto.
+ ExtensionRangeStartTag = 1
+ // ExtensionRangeEndTag is the tag number of the end index in an
+ // extension range proto.
+ ExtensionRangeEndTag = 2
+ // ExtensionRangeOptionsTag is the tag number of the options element in an
+ // extension range proto.
+ ExtensionRangeOptionsTag = 3
+ // ReservedRangeStartTag is the tag number of the start index in a reserved
+ // range proto. This field number is the same for both "flavors" of reserved
+ // ranges: DescriptorProto.ReservedRange and EnumDescriptorProto.EnumReservedRange.
+ ReservedRangeStartTag = 1
+ // ReservedRangeEndTag is the tag number of the end index in a reserved
+ // range proto. This field number is the same for both "flavors" of reserved
+ // ranges: DescriptorProto.ReservedRange and EnumDescriptorProto.EnumReservedRange.
+ ReservedRangeEndTag = 2
+ // FieldNameTag is the tag number of the name element in a field descriptor
+ // proto.
+ FieldNameTag = 1
+ // FieldExtendeeTag is the tag number of the extendee element in a field
+ // descriptor proto.
+ FieldExtendeeTag = 2
+ // FieldNumberTag is the tag number of the number element in a field
+ // descriptor proto.
+ FieldNumberTag = 3
+ // FieldLabelTag is the tag number of the label element in a field
+ // descriptor proto.
+ FieldLabelTag = 4
+ // FieldTypeTag is the tag number of the type element in a field descriptor
+ // proto.
+ FieldTypeTag = 5
+ // FieldTypeNameTag is the tag number of the type name element in a field
+ // descriptor proto.
+ FieldTypeNameTag = 6
+ // FieldDefaultTag is the tag number of the default value element in a
+ // field descriptor proto.
+ FieldDefaultTag = 7
+ // FieldOptionsTag is the tag number of the options element in a field
+ // descriptor proto.
+ FieldOptionsTag = 8
+ // FieldOneofIndexTag is the tag number of the oneof index element in a
+ // field descriptor proto.
+ FieldOneofIndexTag = 9
+ // FieldJSONNameTag is the tag number of the JSON name element in a field
+ // descriptor proto.
+ FieldJSONNameTag = 10
+ // FieldProto3OptionalTag is the tag number of the proto3_optional element
+ // in a descriptor proto.
+ FieldProto3OptionalTag = 17
+ // OneOfNameTag is the tag number of the name element in a one-of
+ // descriptor proto.
+ OneOfNameTag = 1
+ // OneOfOptionsTag is the tag number of the options element in a one-of
+ // descriptor proto.
+ OneOfOptionsTag = 2
+ // EnumNameTag is the tag number of the name element in an enum descriptor
+ // proto.
+ EnumNameTag = 1
+ // EnumValuesTag is the tag number of the values element in an enum
+ // descriptor proto.
+ EnumValuesTag = 2
+ // EnumOptionsTag is the tag number of the options element in an enum
+ // descriptor proto.
+ EnumOptionsTag = 3
+ // EnumReservedRangesTag is the tag number of the reserved ranges element in
+ // an enum descriptor proto.
+ EnumReservedRangesTag = 4
+ // EnumReservedNamesTag is the tag number of the reserved names element in
+ // an enum descriptor proto.
+ EnumReservedNamesTag = 5
+ // EnumValNameTag is the tag number of the name element in an enum value
+ // descriptor proto.
+ EnumValNameTag = 1
+ // EnumValNumberTag is the tag number of the number element in an enum
+ // value descriptor proto.
+ EnumValNumberTag = 2
+ // EnumValOptionsTag is the tag number of the options element in an enum
+ // value descriptor proto.
+ EnumValOptionsTag = 3
+ // ServiceNameTag is the tag number of the name element in a service
+ // descriptor proto.
+ ServiceNameTag = 1
+ // ServiceMethodsTag is the tag number of the methods element in a service
+ // descriptor proto.
+ ServiceMethodsTag = 2
+ // ServiceOptionsTag is the tag number of the options element in a service
+ // descriptor proto.
+ ServiceOptionsTag = 3
+ // MethodNameTag is the tag number of the name element in a method
+ // descriptor proto.
+ MethodNameTag = 1
+ // MethodInputTag is the tag number of the input type element in a method
+ // descriptor proto.
+ MethodInputTag = 2
+ // MethodOutputTag is the tag number of the output type element in a method
+ // descriptor proto.
+ MethodOutputTag = 3
+ // MethodOptionsTag is the tag number of the options element in a method
+ // descriptor proto.
+ MethodOptionsTag = 4
+ // MethodInputStreamTag is the tag number of the input stream flag in a
+ // method descriptor proto.
+ MethodInputStreamTag = 5
+ // MethodOutputStreamTag is the tag number of the output stream flag in a
+ // method descriptor proto.
+ MethodOutputStreamTag = 6
+
+ // UninterpretedOptionsTag is the tag number of the uninterpreted options
+ // element. All *Options messages use the same tag for the field that stores
+ // uninterpreted options.
+ UninterpretedOptionsTag = 999
+
+ // UninterpretedNameTag is the tag number of the name element in an
+ // uninterpreted options proto.
+ UninterpretedNameTag = 2
+ // UninterpretedIdentTag is the tag number of the identifier value in an
+ // uninterpreted options proto.
+ UninterpretedIdentTag = 3
+ // UninterpretedPosIntTag is the tag number of the positive int value in an
+ // uninterpreted options proto.
+ UninterpretedPosIntTag = 4
+ // UninterpretedNegIntTag is the tag number of the negative int value in an
+ // uninterpreted options proto.
+ UninterpretedNegIntTag = 5
+ // UninterpretedDoubleTag is the tag number of the double value in an
+ // uninterpreted options proto.
+ UninterpretedDoubleTag = 6
+ // UninterpretedStringTag is the tag number of the string value in an
+ // uninterpreted options proto.
+ UninterpretedStringTag = 7
+ // UninterpretedAggregateTag is the tag number of the aggregate value in an
+ // uninterpreted options proto.
+ UninterpretedAggregateTag = 8
+ // UninterpretedNameNameTag is the tag number of the name element in an
+ // uninterpreted option name proto.
+ UninterpretedNameNameTag = 1
+)
diff --git a/vendor/github.com/bufbuild/protocompile/internal/types.go b/vendor/github.com/bufbuild/protocompile/internal/types.go
new file mode 100644
index 000000000..5e54e4af5
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/internal/types.go
@@ -0,0 +1,35 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import "google.golang.org/protobuf/types/descriptorpb"
+
+var FieldTypes = map[string]descriptorpb.FieldDescriptorProto_Type{
+ "double": descriptorpb.FieldDescriptorProto_TYPE_DOUBLE,
+ "float": descriptorpb.FieldDescriptorProto_TYPE_FLOAT,
+ "int32": descriptorpb.FieldDescriptorProto_TYPE_INT32,
+ "int64": descriptorpb.FieldDescriptorProto_TYPE_INT64,
+ "uint32": descriptorpb.FieldDescriptorProto_TYPE_UINT32,
+ "uint64": descriptorpb.FieldDescriptorProto_TYPE_UINT64,
+ "sint32": descriptorpb.FieldDescriptorProto_TYPE_SINT32,
+ "sint64": descriptorpb.FieldDescriptorProto_TYPE_SINT64,
+ "fixed32": descriptorpb.FieldDescriptorProto_TYPE_FIXED32,
+ "fixed64": descriptorpb.FieldDescriptorProto_TYPE_FIXED64,
+ "sfixed32": descriptorpb.FieldDescriptorProto_TYPE_SFIXED32,
+ "sfixed64": descriptorpb.FieldDescriptorProto_TYPE_SFIXED64,
+ "bool": descriptorpb.FieldDescriptorProto_TYPE_BOOL,
+ "string": descriptorpb.FieldDescriptorProto_TYPE_STRING,
+ "bytes": descriptorpb.FieldDescriptorProto_TYPE_BYTES,
+}
diff --git a/vendor/github.com/bufbuild/protocompile/internal/util.go b/vendor/github.com/bufbuild/protocompile/internal/util.go
new file mode 100644
index 000000000..f01513ea0
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/internal/util.go
@@ -0,0 +1,119 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package internal
+
+import (
+ "bytes"
+ "unicode"
+ "unicode/utf8"
+)
+
+// JSONName returns the default JSON name for a field with the given name.
+// This mirrors the algorithm in protoc:
+//
+// https://github.com/protocolbuffers/protobuf/blob/v21.3/src/google/protobuf/descriptor.cc#L95
+func JSONName(name string) string {
+ var js []rune
+ nextUpper := false
+ for _, r := range name {
+ if r == '_' {
+ nextUpper = true
+ continue
+ }
+ if nextUpper {
+ nextUpper = false
+ js = append(js, unicode.ToUpper(r))
+ } else {
+ js = append(js, r)
+ }
+ }
+ return string(js)
+}
+
+// InitCap returns the given field name, but with the first letter capitalized.
+func InitCap(name string) string {
+ r, sz := utf8.DecodeRuneInString(name)
+ return string(unicode.ToUpper(r)) + name[sz:]
+}
+
+// CreatePrefixList returns a list of package prefixes to search when resolving
+// a symbol name. If the given package is blank, it returns only the empty
+// string. If the given package contains only one token, e.g. "foo", it returns
+// that token and the empty string, e.g. ["foo", ""]. Otherwise, it returns
+// successively shorter prefixes of the package and then the empty string. For
+// example, for a package named "foo.bar.baz" it will return the following list:
+//
+// ["foo.bar.baz", "foo.bar", "foo", ""]
+func CreatePrefixList(pkg string) []string {
+ if pkg == "" {
+ return []string{""}
+ }
+
+ numDots := 0
+ // one pass to pre-allocate the returned slice
+ for i := 0; i < len(pkg); i++ {
+ if pkg[i] == '.' {
+ numDots++
+ }
+ }
+ if numDots == 0 {
+ return []string{pkg, ""}
+ }
+
+ prefixes := make([]string, numDots+2)
+ // second pass to fill in returned slice
+ for i := 0; i < len(pkg); i++ {
+ if pkg[i] == '.' {
+ prefixes[numDots] = pkg[:i]
+ numDots--
+ }
+ }
+ prefixes[0] = pkg
+
+ return prefixes
+}
+
+func WriteEscapedBytes(buf *bytes.Buffer, b []byte) {
+ // This uses the same algorithm as the protoc C++ code for escaping strings.
+ // The protoc C++ code in turn uses the abseil C++ library's CEscape function:
+ // https://github.com/abseil/abseil-cpp/blob/934f613818ffcb26c942dff4a80be9a4031c662c/absl/strings/escaping.cc#L406
+ for _, c := range b {
+ switch c {
+ case '\n':
+ buf.WriteString("\\n")
+ case '\r':
+ buf.WriteString("\\r")
+ case '\t':
+ buf.WriteString("\\t")
+ case '"':
+ buf.WriteString("\\\"")
+ case '\'':
+ buf.WriteString("\\'")
+ case '\\':
+ buf.WriteString("\\\\")
+ default:
+ if c >= 0x20 && c < 0x7f {
+ // simple printable characters
+ buf.WriteByte(c)
+ } else {
+ // use octal escape for all other values
+ buf.WriteRune('\\')
+ buf.WriteByte('0' + ((c >> 6) & 0x7))
+ buf.WriteByte('0' + ((c >> 3) & 0x7))
+ buf.WriteByte('0' + (c & 0x7))
+ }
+ }
+ }
+}
diff --git a/vendor/github.com/bufbuild/protocompile/linker/descriptors.go b/vendor/github.com/bufbuild/protocompile/linker/descriptors.go
new file mode 100644
index 000000000..20968936f
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/linker/descriptors.go
@@ -0,0 +1,1880 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 linker
+
+import (
+ "bytes"
+ "fmt"
+ "strconv"
+ "strings"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+ "google.golang.org/protobuf/types/dynamicpb"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/internal"
+ "github.com/bufbuild/protocompile/parser"
+ "github.com/bufbuild/protocompile/protoutil"
+)
+
+// This file contains implementations of protoreflect.Descriptor. Note that
+// this is a hack since those interfaces have a "doNotImplement" tag
+// interface therein. We do just enough to make dynamicpb happy; constructing
+// a regular descriptor would fail because we haven't yet interpreted options
+// at the point we need these, and some validations will fail if the options
+// aren't present.
+
+type result struct {
+ protoreflect.FileDescriptor
+ parser.Result
+ prefix string
+ deps Files
+
+ // A map of all descriptors keyed by their fully-qualified name (without
+ // any leading dot).
+ descriptors map[string]protoreflect.Descriptor
+
+ // A set of imports that have been used in the course of linking and
+ // interpreting options.
+ usedImports map[string]struct{}
+
+ // A map of descriptor options messages to their pre-serialized bytes (using
+ // a canonical serialization format based on how protoc renders options to
+ // bytes).
+ optionBytes map[proto.Message][]byte
+
+ // A map of AST nodes that represent identifiers in ast.FieldReferenceNodes
+ // to their fully-qualified name. The identifiers are for field names in
+ // message literals (in option values) that are extension fields. These names
+ // are resolved during linking and stored here, to be used to interpret options.
+ optionQualifiedNames map[ast.IdentValueNode]string
+
+ imports fileImports
+ messages msgDescriptors
+ enums enumDescriptors
+ extensions extDescriptors
+ services svcDescriptors
+ srcLocations srcLocs
+}
+
+var _ protoreflect.FileDescriptor = (*result)(nil)
+var _ Result = (*result)(nil)
+var _ protoutil.DescriptorProtoWrapper = (*result)(nil)
+
+func (r *result) RemoveAST() {
+ r.Result = parser.ResultWithoutAST(r.FileDescriptorProto())
+ r.optionQualifiedNames = nil
+}
+
+func (r *result) AsProto() proto.Message {
+ return r.FileDescriptorProto()
+}
+
+func (r *result) ParentFile() protoreflect.FileDescriptor {
+ return r
+}
+
+func (r *result) Parent() protoreflect.Descriptor {
+ return nil
+}
+
+func (r *result) Index() int {
+ return 0
+}
+
+func (r *result) Syntax() protoreflect.Syntax {
+ switch r.FileDescriptorProto().GetSyntax() {
+ case "proto2", "":
+ return protoreflect.Proto2
+ case "proto3":
+ return protoreflect.Proto3
+ default:
+ return 0 // ???
+ }
+}
+
+func (r *result) Name() protoreflect.Name {
+ return ""
+}
+
+func (r *result) FullName() protoreflect.FullName {
+ return r.Package()
+}
+
+func (r *result) IsPlaceholder() bool {
+ return false
+}
+
+func (r *result) Options() protoreflect.ProtoMessage {
+ return r.FileDescriptorProto().Options
+}
+
+func (r *result) Path() string {
+ return r.FileDescriptorProto().GetName()
+}
+
+func (r *result) Package() protoreflect.FullName {
+ return protoreflect.FullName(r.FileDescriptorProto().GetPackage())
+}
+
+func (r *result) Imports() protoreflect.FileImports {
+ return &r.imports
+}
+
+func (r *result) Enums() protoreflect.EnumDescriptors {
+ return &r.enums
+}
+
+func (r *result) Messages() protoreflect.MessageDescriptors {
+ return &r.messages
+}
+
+func (r *result) Extensions() protoreflect.ExtensionDescriptors {
+ return &r.extensions
+}
+
+func (r *result) Services() protoreflect.ServiceDescriptors {
+ return &r.services
+}
+
+func (r *result) PopulateSourceCodeInfo() {
+ srcLocProtos := asSourceLocations(r.FileDescriptorProto().GetSourceCodeInfo().GetLocation())
+ srcLocIndex := computeSourceLocIndex(srcLocProtos)
+ r.srcLocations = srcLocs{file: r, locs: srcLocProtos, index: srcLocIndex}
+}
+
+func (r *result) SourceLocations() protoreflect.SourceLocations {
+ return &r.srcLocations
+}
+
+func computeSourceLocIndex(locs []protoreflect.SourceLocation) map[interface{}]int {
+ index := map[interface{}]int{}
+ for i, loc := range locs {
+ if loc.Next == 0 {
+ index[pathKey(loc.Path)] = i
+ }
+ }
+ return index
+}
+
+func asSourceLocations(srcInfoProtos []*descriptorpb.SourceCodeInfo_Location) []protoreflect.SourceLocation {
+ locs := make([]protoreflect.SourceLocation, len(srcInfoProtos))
+ prev := map[string]*protoreflect.SourceLocation{}
+ for i, loc := range srcInfoProtos {
+ var stLin, stCol, enLin, enCol int
+ if len(loc.Span) == 3 {
+ stLin, stCol, enCol = int(loc.Span[0]), int(loc.Span[1]), int(loc.Span[2])
+ enLin = stLin
+ } else {
+ stLin, stCol, enLin, enCol = int(loc.Span[0]), int(loc.Span[1]), int(loc.Span[2]), int(loc.Span[3])
+ }
+ locs[i] = protoreflect.SourceLocation{
+ Path: loc.Path,
+ LeadingComments: loc.GetLeadingComments(),
+ LeadingDetachedComments: loc.GetLeadingDetachedComments(),
+ TrailingComments: loc.GetTrailingComments(),
+ StartLine: stLin,
+ StartColumn: stCol,
+ EndLine: enLin,
+ EndColumn: enCol,
+ }
+ str := pathStr(loc.Path)
+ pr := prev[str]
+ if pr != nil {
+ pr.Next = i
+ }
+ prev[str] = &locs[i]
+ }
+ return locs
+}
+
+func pathStr(p protoreflect.SourcePath) string {
+ var buf bytes.Buffer
+ for _, v := range p {
+ fmt.Fprintf(&buf, "%x:", v)
+ }
+ return buf.String()
+}
+
+// AddOptionBytes associates the given opts (an options message encoded in the
+// binary format) with the given options protobuf message. The protobuf message
+// should exist in the hierarchy of this result's FileDescriptorProto. This
+// allows the FileDescriptorProto to be marshaled to bytes in a way that
+// preserves the way options are defined in source (just as is done by protoc,
+// but not possible when only using the generated Go types and standard
+// marshaling APIs in the protobuf runtime).
+func (r *result) AddOptionBytes(pm proto.Message, opts []byte) {
+ if r.optionBytes == nil {
+ r.optionBytes = map[proto.Message][]byte{}
+ }
+ r.optionBytes[pm] = append(r.optionBytes[pm], opts...)
+}
+
+func (r *result) CanonicalProto() *descriptorpb.FileDescriptorProto {
+ origFd := r.FileDescriptorProto()
+ // make a copy that we can mutate
+ fd := proto.Clone(origFd).(*descriptorpb.FileDescriptorProto) //nolint:errcheck
+
+ r.storeOptionBytesInFile(fd, origFd)
+
+ return fd
+}
+
+func (r *result) storeOptionBytesInFile(fd, origFd *descriptorpb.FileDescriptorProto) {
+ if fd.Options != nil {
+ fd.Options.Reset()
+ fd.Options.ProtoReflect().SetUnknown(r.optionBytes[origFd.Options])
+ }
+
+ for i, md := range fd.MessageType {
+ origMd := origFd.MessageType[i]
+ r.storeOptionBytesInMessage(md, origMd)
+ }
+
+ for i, ed := range fd.EnumType {
+ origEd := origFd.EnumType[i]
+ r.storeOptionBytesInEnum(ed, origEd)
+ }
+
+ for i, exd := range fd.Extension {
+ origExd := origFd.Extension[i]
+ r.storeOptionBytesInField(exd, origExd)
+ }
+
+ for i, sd := range fd.Service {
+ origSd := origFd.Service[i]
+ if sd.Options != nil {
+ sd.Options.Reset()
+ sd.Options.ProtoReflect().SetUnknown(r.optionBytes[origSd.Options])
+ }
+
+ for j, mtd := range sd.Method {
+ origMtd := origSd.Method[j]
+ if mtd.Options != nil {
+ mtd.Options.Reset()
+ mtd.Options.ProtoReflect().SetUnknown(r.optionBytes[origMtd.Options])
+ }
+ }
+ }
+}
+
+func (r *result) storeOptionBytesInMessage(md, origMd *descriptorpb.DescriptorProto) {
+ if md.GetOptions().GetMapEntry() {
+ // Map entry messages are synthesized. They won't have any option bytes
+ // since they don't actually appear in the source and thus have any option
+ // declarations in the source.
+ return
+ }
+
+ if md.Options != nil {
+ md.Options.Reset()
+ md.Options.ProtoReflect().SetUnknown(r.optionBytes[origMd.Options])
+ }
+
+ for i, fld := range md.Field {
+ origFld := origMd.Field[i]
+ r.storeOptionBytesInField(fld, origFld)
+ }
+
+ for i, ood := range md.OneofDecl {
+ origOod := origMd.OneofDecl[i]
+ if ood.Options != nil {
+ ood.Options.Reset()
+ ood.Options.ProtoReflect().SetUnknown(r.optionBytes[origOod.Options])
+ }
+ }
+
+ for i, exr := range md.ExtensionRange {
+ origExr := origMd.ExtensionRange[i]
+ if exr.Options != nil {
+ exr.Options.Reset()
+ exr.Options.ProtoReflect().SetUnknown(r.optionBytes[origExr.Options])
+ }
+ }
+
+ for i, nmd := range md.NestedType {
+ origNmd := origMd.NestedType[i]
+ r.storeOptionBytesInMessage(nmd, origNmd)
+ }
+
+ for i, ed := range md.EnumType {
+ origEd := origMd.EnumType[i]
+ r.storeOptionBytesInEnum(ed, origEd)
+ }
+
+ for i, exd := range md.Extension {
+ origExd := origMd.Extension[i]
+ r.storeOptionBytesInField(exd, origExd)
+ }
+}
+
+func (r *result) storeOptionBytesInEnum(ed, origEd *descriptorpb.EnumDescriptorProto) {
+ if ed.Options != nil {
+ ed.Options.Reset()
+ ed.Options.ProtoReflect().SetUnknown(r.optionBytes[origEd.Options])
+ }
+
+ for i, evd := range ed.Value {
+ origEvd := origEd.Value[i]
+ if evd.Options != nil {
+ evd.Options.Reset()
+ evd.Options.ProtoReflect().SetUnknown(r.optionBytes[origEvd.Options])
+ }
+ }
+}
+
+func (r *result) storeOptionBytesInField(fld, origFld *descriptorpb.FieldDescriptorProto) {
+ if fld.Options != nil {
+ fld.Options.Reset()
+ fld.Options.ProtoReflect().SetUnknown(r.optionBytes[origFld.Options])
+ }
+}
+
+type fileImports struct {
+ protoreflect.FileImports
+ files []protoreflect.FileImport
+}
+
+func (r *result) createImports() fileImports {
+ fd := r.FileDescriptorProto()
+ imps := make([]protoreflect.FileImport, len(fd.Dependency))
+ for i, dep := range fd.Dependency {
+ desc := r.deps.FindFileByPath(dep)
+ imps[i] = protoreflect.FileImport{FileDescriptor: desc}
+ }
+ for _, publicIndex := range fd.PublicDependency {
+ imps[int(publicIndex)].IsPublic = true
+ }
+ for _, weakIndex := range fd.WeakDependency {
+ imps[int(weakIndex)].IsWeak = true
+ }
+ return fileImports{files: imps}
+}
+
+func (f *fileImports) Len() int {
+ return len(f.files)
+}
+
+func (f *fileImports) Get(i int) protoreflect.FileImport {
+ return f.files[i]
+}
+
+type srcLocs struct {
+ protoreflect.SourceLocations
+ file *result
+ locs []protoreflect.SourceLocation
+ index map[interface{}]int
+}
+
+func (s *srcLocs) Len() int {
+ return len(s.locs)
+}
+
+func (s *srcLocs) Get(i int) protoreflect.SourceLocation {
+ return s.locs[i]
+}
+
+func (s *srcLocs) ByPath(p protoreflect.SourcePath) protoreflect.SourceLocation {
+ index, ok := s.index[pathKey(p)]
+ if !ok {
+ return protoreflect.SourceLocation{}
+ }
+ return s.locs[index]
+}
+
+func (s *srcLocs) ByDescriptor(d protoreflect.Descriptor) protoreflect.SourceLocation {
+ if d.ParentFile() != s.file {
+ return protoreflect.SourceLocation{}
+ }
+ path, ok := computePath(d)
+ if !ok {
+ return protoreflect.SourceLocation{}
+ }
+ return s.ByPath(path)
+}
+
+func computePath(d protoreflect.Descriptor) (protoreflect.SourcePath, bool) {
+ _, ok := d.(protoreflect.FileDescriptor)
+ if ok {
+ return nil, true
+ }
+ var path protoreflect.SourcePath
+ for {
+ p := d.Parent()
+ switch d := d.(type) {
+ case protoreflect.FileDescriptor:
+ return reverse(path), true
+ case protoreflect.MessageDescriptor:
+ path = append(path, int32(d.Index()))
+ switch p.(type) {
+ case protoreflect.FileDescriptor:
+ path = append(path, internal.FileMessagesTag)
+ case protoreflect.MessageDescriptor:
+ path = append(path, internal.MessageNestedMessagesTag)
+ default:
+ return nil, false
+ }
+ case protoreflect.FieldDescriptor:
+ path = append(path, int32(d.Index()))
+ switch p.(type) {
+ case protoreflect.FileDescriptor:
+ if d.IsExtension() {
+ path = append(path, internal.FileExtensionsTag)
+ } else {
+ return nil, false
+ }
+ case protoreflect.MessageDescriptor:
+ if d.IsExtension() {
+ path = append(path, internal.MessageExtensionsTag)
+ } else {
+ path = append(path, internal.MessageFieldsTag)
+ }
+ default:
+ return nil, false
+ }
+ case protoreflect.OneofDescriptor:
+ path = append(path, int32(d.Index()))
+ if _, ok := p.(protoreflect.MessageDescriptor); ok {
+ path = append(path, internal.MessageOneOfsTag)
+ } else {
+ return nil, false
+ }
+ case protoreflect.EnumDescriptor:
+ path = append(path, int32(d.Index()))
+ switch p.(type) {
+ case protoreflect.FileDescriptor:
+ path = append(path, internal.FileEnumsTag)
+ case protoreflect.MessageDescriptor:
+ path = append(path, internal.MessageEnumsTag)
+ default:
+ return nil, false
+ }
+ case protoreflect.EnumValueDescriptor:
+ path = append(path, int32(d.Index()))
+ if _, ok := p.(protoreflect.EnumDescriptor); ok {
+ path = append(path, internal.EnumValuesTag)
+ } else {
+ return nil, false
+ }
+ case protoreflect.ServiceDescriptor:
+ path = append(path, int32(d.Index()))
+ if _, ok := p.(protoreflect.FileDescriptor); ok {
+ path = append(path, internal.FileServicesTag)
+ } else {
+ return nil, false
+ }
+ case protoreflect.MethodDescriptor:
+ path = append(path, int32(d.Index()))
+ if _, ok := p.(protoreflect.ServiceDescriptor); ok {
+ path = append(path, internal.ServiceMethodsTag)
+ } else {
+ return nil, false
+ }
+ }
+ d = p
+ }
+}
+
+func reverse(p protoreflect.SourcePath) protoreflect.SourcePath {
+ for i, j := 0, len(p)-1; i < j; i, j = i+1, j-1 {
+ p[i], p[j] = p[j], p[i]
+ }
+ return p
+}
+
+type msgDescriptors struct {
+ protoreflect.MessageDescriptors
+ msgs []*msgDescriptor
+}
+
+func (r *result) createMessages(prefix string, parent protoreflect.Descriptor, msgProtos []*descriptorpb.DescriptorProto) msgDescriptors {
+ msgs := make([]*msgDescriptor, len(msgProtos))
+ for i, msgProto := range msgProtos {
+ msgs[i] = r.createMessageDescriptor(msgProto, parent, i, prefix+msgProto.GetName())
+ }
+ return msgDescriptors{msgs: msgs}
+}
+
+func (m *msgDescriptors) Len() int {
+ return len(m.msgs)
+}
+
+func (m *msgDescriptors) Get(i int) protoreflect.MessageDescriptor {
+ return m.msgs[i]
+}
+
+func (m *msgDescriptors) ByName(s protoreflect.Name) protoreflect.MessageDescriptor {
+ for _, msg := range m.msgs {
+ if msg.Name() == s {
+ return msg
+ }
+ }
+ return nil
+}
+
+type msgDescriptor struct {
+ protoreflect.MessageDescriptor
+ file *result
+ parent protoreflect.Descriptor
+ index int
+ proto *descriptorpb.DescriptorProto
+ fqn string
+
+ fields fldDescriptors
+ oneofs oneofDescriptors
+ nestedMessages msgDescriptors
+ nestedEnums enumDescriptors
+ nestedExtensions extDescriptors
+
+ extRanges fieldRanges
+ rsvdRanges fieldRanges
+ rsvdNames names
+}
+
+var _ protoreflect.MessageDescriptor = (*msgDescriptor)(nil)
+var _ protoutil.DescriptorProtoWrapper = (*msgDescriptor)(nil)
+
+func (r *result) createMessageDescriptor(md *descriptorpb.DescriptorProto, parent protoreflect.Descriptor, index int, fqn string) *msgDescriptor {
+ ret := &msgDescriptor{file: r, parent: parent, index: index, proto: md, fqn: fqn}
+ r.descriptors[fqn] = ret
+
+ prefix := fqn + "."
+ // NB: We MUST create fields before oneofs so that we can populate the
+ // set of fields that belong to the oneof
+ ret.fields = r.createFields(prefix, ret, md.Field)
+ ret.oneofs = r.createOneOfs(prefix, ret, md.OneofDecl)
+ ret.nestedMessages = r.createMessages(prefix, ret, md.NestedType)
+ ret.nestedEnums = r.createEnums(prefix, ret, md.EnumType)
+ ret.nestedExtensions = r.createExtensions(prefix, ret, md.Extension)
+ ret.extRanges = createFieldRanges(md.ExtensionRange)
+ ret.rsvdRanges = createFieldRanges(md.ReservedRange)
+ ret.rsvdNames = names{s: md.ReservedName}
+
+ return ret
+}
+
+func (m *msgDescriptor) MessageDescriptorProto() *descriptorpb.DescriptorProto {
+ return m.proto
+}
+
+func (m *msgDescriptor) AsProto() proto.Message {
+ return m.proto
+}
+
+func (m *msgDescriptor) ParentFile() protoreflect.FileDescriptor {
+ return m.file
+}
+
+func (m *msgDescriptor) Parent() protoreflect.Descriptor {
+ return m.parent
+}
+
+func (m *msgDescriptor) Index() int {
+ return m.index
+}
+
+func (m *msgDescriptor) Syntax() protoreflect.Syntax {
+ return m.file.Syntax()
+}
+
+func (m *msgDescriptor) Name() protoreflect.Name {
+ return protoreflect.Name(m.proto.GetName())
+}
+
+func (m *msgDescriptor) FullName() protoreflect.FullName {
+ return protoreflect.FullName(m.fqn)
+}
+
+func (m *msgDescriptor) IsPlaceholder() bool {
+ return false
+}
+
+func (m *msgDescriptor) Options() protoreflect.ProtoMessage {
+ return m.proto.Options
+}
+
+func (m *msgDescriptor) IsMapEntry() bool {
+ return m.proto.Options.GetMapEntry()
+}
+
+func (m *msgDescriptor) Fields() protoreflect.FieldDescriptors {
+ return &m.fields
+}
+
+func (m *msgDescriptor) Oneofs() protoreflect.OneofDescriptors {
+ return &m.oneofs
+}
+
+func (m *msgDescriptor) ReservedNames() protoreflect.Names {
+ return m.rsvdNames
+}
+
+func (m *msgDescriptor) ReservedRanges() protoreflect.FieldRanges {
+ return m.rsvdRanges
+}
+
+func (m *msgDescriptor) RequiredNumbers() protoreflect.FieldNumbers {
+ var indexes fieldNums
+ for _, fld := range m.proto.Field {
+ if fld.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REQUIRED {
+ indexes.s = append(indexes.s, fld.GetNumber())
+ }
+ }
+ return indexes
+}
+
+func (m *msgDescriptor) ExtensionRanges() protoreflect.FieldRanges {
+ return m.extRanges
+}
+
+func (m *msgDescriptor) ExtensionRangeOptions(i int) protoreflect.ProtoMessage {
+ return m.proto.ExtensionRange[i].Options
+}
+
+func (m *msgDescriptor) Enums() protoreflect.EnumDescriptors {
+ return &m.nestedEnums
+}
+
+func (m *msgDescriptor) Messages() protoreflect.MessageDescriptors {
+ return &m.nestedMessages
+}
+
+func (m *msgDescriptor) Extensions() protoreflect.ExtensionDescriptors {
+ return &m.nestedExtensions
+}
+
+type names struct {
+ protoreflect.Names
+ s []string
+}
+
+func (n names) Len() int {
+ return len(n.s)
+}
+
+func (n names) Get(i int) protoreflect.Name {
+ return protoreflect.Name(n.s[i])
+}
+
+func (n names) Has(s protoreflect.Name) bool {
+ for _, name := range n.s {
+ if name == string(s) {
+ return true
+ }
+ }
+ return false
+}
+
+type fieldNums struct {
+ protoreflect.FieldNumbers
+ s []int32
+}
+
+func (n fieldNums) Len() int {
+ return len(n.s)
+}
+
+func (n fieldNums) Get(i int) protoreflect.FieldNumber {
+ return protoreflect.FieldNumber(n.s[i])
+}
+
+func (n fieldNums) Has(s protoreflect.FieldNumber) bool {
+ for _, num := range n.s {
+ if num == int32(s) {
+ return true
+ }
+ }
+ return false
+}
+
+type fieldRanges struct {
+ protoreflect.FieldRanges
+ ranges [][2]protoreflect.FieldNumber
+}
+
+type fieldRange interface {
+ GetStart() int32
+ GetEnd() int32
+}
+
+func createFieldRanges[T fieldRange](rangeProtos []T) fieldRanges {
+ ranges := make([][2]protoreflect.FieldNumber, len(rangeProtos))
+ for i, r := range rangeProtos {
+ ranges[i] = [2]protoreflect.FieldNumber{
+ protoreflect.FieldNumber(r.GetStart()),
+ protoreflect.FieldNumber(r.GetEnd()),
+ }
+ }
+ return fieldRanges{ranges: ranges}
+}
+
+func (f fieldRanges) Len() int {
+ return len(f.ranges)
+}
+
+func (f fieldRanges) Get(i int) [2]protoreflect.FieldNumber {
+ return f.ranges[i]
+}
+
+func (f fieldRanges) Has(n protoreflect.FieldNumber) bool {
+ for _, r := range f.ranges {
+ if r[0] <= n && r[1] > n {
+ return true
+ }
+ }
+ return false
+}
+
+type enumDescriptors struct {
+ protoreflect.EnumDescriptors
+ enums []*enumDescriptor
+}
+
+func (r *result) createEnums(prefix string, parent protoreflect.Descriptor, enumProtos []*descriptorpb.EnumDescriptorProto) enumDescriptors {
+ enums := make([]*enumDescriptor, len(enumProtos))
+ for i, enumProto := range enumProtos {
+ enums[i] = r.createEnumDescriptor(enumProto, parent, i, prefix+enumProto.GetName())
+ }
+ return enumDescriptors{enums: enums}
+}
+
+func (e *enumDescriptors) Len() int {
+ return len(e.enums)
+}
+
+func (e *enumDescriptors) Get(i int) protoreflect.EnumDescriptor {
+ return e.enums[i]
+}
+
+func (e *enumDescriptors) ByName(s protoreflect.Name) protoreflect.EnumDescriptor {
+ for _, en := range e.enums {
+ if en.Name() == s {
+ return en
+ }
+ }
+ return nil
+}
+
+type enumDescriptor struct {
+ protoreflect.EnumDescriptor
+ file *result
+ parent protoreflect.Descriptor
+ index int
+ proto *descriptorpb.EnumDescriptorProto
+ fqn string
+
+ values enValDescriptors
+
+ rsvdRanges enumRanges
+ rsvdNames names
+}
+
+var _ protoreflect.EnumDescriptor = (*enumDescriptor)(nil)
+var _ protoutil.DescriptorProtoWrapper = (*enumDescriptor)(nil)
+
+func (r *result) createEnumDescriptor(ed *descriptorpb.EnumDescriptorProto, parent protoreflect.Descriptor, index int, fqn string) *enumDescriptor {
+ ret := &enumDescriptor{file: r, parent: parent, index: index, proto: ed, fqn: fqn}
+ r.descriptors[fqn] = ret
+
+ // Unlike all other elements, the fully-qualified name of enum values
+ // is NOT scoped to their parent element (the enum), but rather to
+ // the enum's parent element. This follows C++ scoping rules for
+ // enum values.
+ prefix := strings.TrimSuffix(fqn, ed.GetName())
+ ret.values = r.createEnumValues(prefix, ret, ed.Value)
+ ret.rsvdRanges = createEnumRanges(ed.ReservedRange)
+ ret.rsvdNames = names{s: ed.ReservedName}
+ return ret
+}
+
+func (e *enumDescriptor) EnumDescriptorProto() *descriptorpb.EnumDescriptorProto {
+ return e.proto
+}
+
+func (e *enumDescriptor) AsProto() proto.Message {
+ return e.proto
+}
+
+func (e *enumDescriptor) ParentFile() protoreflect.FileDescriptor {
+ return e.file
+}
+
+func (e *enumDescriptor) Parent() protoreflect.Descriptor {
+ return e.parent
+}
+
+func (e *enumDescriptor) Index() int {
+ return e.index
+}
+
+func (e *enumDescriptor) Syntax() protoreflect.Syntax {
+ return e.file.Syntax()
+}
+
+func (e *enumDescriptor) Name() protoreflect.Name {
+ return protoreflect.Name(e.proto.GetName())
+}
+
+func (e *enumDescriptor) FullName() protoreflect.FullName {
+ return protoreflect.FullName(e.fqn)
+}
+
+func (e *enumDescriptor) IsPlaceholder() bool {
+ return false
+}
+
+func (e *enumDescriptor) Options() protoreflect.ProtoMessage {
+ return e.proto.Options
+}
+
+func (e *enumDescriptor) Values() protoreflect.EnumValueDescriptors {
+ return &e.values
+}
+
+func (e *enumDescriptor) ReservedNames() protoreflect.Names {
+ return e.rsvdNames
+}
+
+func (e *enumDescriptor) ReservedRanges() protoreflect.EnumRanges {
+ return e.rsvdRanges
+}
+
+type enumRanges struct {
+ protoreflect.EnumRanges
+ ranges [][2]protoreflect.EnumNumber
+}
+
+func createEnumRanges(rangeProtos []*descriptorpb.EnumDescriptorProto_EnumReservedRange) enumRanges {
+ ranges := make([][2]protoreflect.EnumNumber, len(rangeProtos))
+ for i, r := range rangeProtos {
+ ranges[i] = [2]protoreflect.EnumNumber{
+ protoreflect.EnumNumber(r.GetStart()),
+ protoreflect.EnumNumber(r.GetEnd()),
+ }
+ }
+ return enumRanges{ranges: ranges}
+}
+
+func (e enumRanges) Len() int {
+ return len(e.ranges)
+}
+
+func (e enumRanges) Get(i int) [2]protoreflect.EnumNumber {
+ return e.ranges[i]
+}
+
+func (e enumRanges) Has(n protoreflect.EnumNumber) bool {
+ for _, r := range e.ranges {
+ if r[0] <= n && r[1] >= n {
+ return true
+ }
+ }
+ return false
+}
+
+type enValDescriptors struct {
+ protoreflect.EnumValueDescriptors
+ vals []*enValDescriptor
+}
+
+func (r *result) createEnumValues(prefix string, parent *enumDescriptor, enValProtos []*descriptorpb.EnumValueDescriptorProto) enValDescriptors {
+ vals := make([]*enValDescriptor, len(enValProtos))
+ for i, enValProto := range enValProtos {
+ vals[i] = r.createEnumValueDescriptor(enValProto, parent, i, prefix+enValProto.GetName())
+ }
+ return enValDescriptors{vals: vals}
+}
+
+func (e *enValDescriptors) Len() int {
+ return len(e.vals)
+}
+
+func (e *enValDescriptors) Get(i int) protoreflect.EnumValueDescriptor {
+ return e.vals[i]
+}
+
+func (e *enValDescriptors) ByName(s protoreflect.Name) protoreflect.EnumValueDescriptor {
+ for _, val := range e.vals {
+ if val.Name() == s {
+ return val
+ }
+ }
+ return nil
+}
+
+func (e *enValDescriptors) ByNumber(n protoreflect.EnumNumber) protoreflect.EnumValueDescriptor {
+ for _, val := range e.vals {
+ if val.Number() == n {
+ return val
+ }
+ }
+ return nil
+}
+
+type enValDescriptor struct {
+ protoreflect.EnumValueDescriptor
+ file *result
+ parent *enumDescriptor
+ index int
+ proto *descriptorpb.EnumValueDescriptorProto
+ fqn string
+}
+
+var _ protoreflect.EnumValueDescriptor = (*enValDescriptor)(nil)
+var _ protoutil.DescriptorProtoWrapper = (*enValDescriptor)(nil)
+
+func (r *result) createEnumValueDescriptor(ed *descriptorpb.EnumValueDescriptorProto, parent *enumDescriptor, index int, fqn string) *enValDescriptor {
+ ret := &enValDescriptor{file: r, parent: parent, index: index, proto: ed, fqn: fqn}
+ r.descriptors[fqn] = ret
+ return ret
+}
+
+func (e *enValDescriptor) EnumValueDescriptorProto() *descriptorpb.EnumValueDescriptorProto {
+ return e.proto
+}
+
+func (e *enValDescriptor) AsProto() proto.Message {
+ return e.proto
+}
+
+func (e *enValDescriptor) ParentFile() protoreflect.FileDescriptor {
+ return e.file
+}
+
+func (e *enValDescriptor) Parent() protoreflect.Descriptor {
+ return e.parent
+}
+
+func (e *enValDescriptor) Index() int {
+ return e.index
+}
+
+func (e *enValDescriptor) Syntax() protoreflect.Syntax {
+ return e.file.Syntax()
+}
+
+func (e *enValDescriptor) Name() protoreflect.Name {
+ return protoreflect.Name(e.proto.GetName())
+}
+
+func (e *enValDescriptor) FullName() protoreflect.FullName {
+ return protoreflect.FullName(e.fqn)
+}
+
+func (e *enValDescriptor) IsPlaceholder() bool {
+ return false
+}
+
+func (e *enValDescriptor) Options() protoreflect.ProtoMessage {
+ return e.proto.Options
+}
+
+func (e *enValDescriptor) Number() protoreflect.EnumNumber {
+ return protoreflect.EnumNumber(e.proto.GetNumber())
+}
+
+type extDescriptors struct {
+ protoreflect.ExtensionDescriptors
+ exts []*extTypeDescriptor
+}
+
+func (r *result) createExtensions(prefix string, parent protoreflect.Descriptor, extProtos []*descriptorpb.FieldDescriptorProto) extDescriptors {
+ exts := make([]*extTypeDescriptor, len(extProtos))
+ for i, extProto := range extProtos {
+ exts[i] = r.createExtTypeDescriptor(extProto, parent, i, prefix+extProto.GetName())
+ }
+ return extDescriptors{exts: exts}
+}
+
+func (e *extDescriptors) Len() int {
+ return len(e.exts)
+}
+
+func (e *extDescriptors) Get(i int) protoreflect.ExtensionDescriptor {
+ return e.exts[i]
+}
+
+func (e *extDescriptors) ByName(s protoreflect.Name) protoreflect.ExtensionDescriptor {
+ for _, ext := range e.exts {
+ if ext.Name() == s {
+ return ext
+ }
+ }
+ return nil
+}
+
+type extTypeDescriptor struct {
+ protoreflect.ExtensionTypeDescriptor
+ field *fldDescriptor
+}
+
+var _ protoutil.DescriptorProtoWrapper = &extTypeDescriptor{}
+
+func (r *result) createExtTypeDescriptor(fd *descriptorpb.FieldDescriptorProto, parent protoreflect.Descriptor, index int, fqn string) *extTypeDescriptor {
+ ret := &fldDescriptor{file: r, parent: parent, index: index, proto: fd, fqn: fqn}
+ r.descriptors[fqn] = ret
+ return &extTypeDescriptor{ExtensionTypeDescriptor: dynamicpb.NewExtensionType(ret).TypeDescriptor(), field: ret}
+}
+
+func (e *extTypeDescriptor) FieldDescriptorProto() *descriptorpb.FieldDescriptorProto {
+ return e.field.proto
+}
+
+func (e *extTypeDescriptor) AsProto() proto.Message {
+ return e.field.proto
+}
+
+type fldDescriptors struct {
+ protoreflect.FieldDescriptors
+ fields []*fldDescriptor
+}
+
+func (r *result) createFields(prefix string, parent *msgDescriptor, fldProtos []*descriptorpb.FieldDescriptorProto) fldDescriptors {
+ fields := make([]*fldDescriptor, len(fldProtos))
+ for i, fldProto := range fldProtos {
+ fields[i] = r.createFieldDescriptor(fldProto, parent, i, prefix+fldProto.GetName())
+ }
+ return fldDescriptors{fields: fields}
+}
+
+func (f *fldDescriptors) Len() int {
+ return len(f.fields)
+}
+
+func (f *fldDescriptors) Get(i int) protoreflect.FieldDescriptor {
+ return f.fields[i]
+}
+
+func (f *fldDescriptors) ByName(s protoreflect.Name) protoreflect.FieldDescriptor {
+ for _, fld := range f.fields {
+ if fld.Name() == s {
+ return fld
+ }
+ }
+ return nil
+}
+
+func (f *fldDescriptors) ByJSONName(s string) protoreflect.FieldDescriptor {
+ for _, fld := range f.fields {
+ if fld.JSONName() == s {
+ return fld
+ }
+ }
+ return nil
+}
+
+func (f *fldDescriptors) ByTextName(s string) protoreflect.FieldDescriptor {
+ return f.ByName(protoreflect.Name(s))
+}
+
+func (f *fldDescriptors) ByNumber(n protoreflect.FieldNumber) protoreflect.FieldDescriptor {
+ for _, fld := range f.fields {
+ if fld.Number() == n {
+ return fld
+ }
+ }
+ return nil
+}
+
+type fldDescriptor struct {
+ protoreflect.FieldDescriptor
+ file *result
+ parent protoreflect.Descriptor
+ index int
+ proto *descriptorpb.FieldDescriptorProto
+ fqn string
+
+ msgType protoreflect.MessageDescriptor
+ extendee protoreflect.MessageDescriptor
+ enumType protoreflect.EnumDescriptor
+ oneof protoreflect.OneofDescriptor
+}
+
+var _ protoreflect.FieldDescriptor = (*fldDescriptor)(nil)
+var _ protoutil.DescriptorProtoWrapper = (*fldDescriptor)(nil)
+
+func (r *result) createFieldDescriptor(fd *descriptorpb.FieldDescriptorProto, parent *msgDescriptor, index int, fqn string) *fldDescriptor {
+ ret := &fldDescriptor{file: r, parent: parent, index: index, proto: fd, fqn: fqn}
+ r.descriptors[fqn] = ret
+ return ret
+}
+
+func (f *fldDescriptor) FieldDescriptorProto() *descriptorpb.FieldDescriptorProto {
+ return f.proto
+}
+
+func (f *fldDescriptor) AsProto() proto.Message {
+ return f.proto
+}
+
+func (f *fldDescriptor) ParentFile() protoreflect.FileDescriptor {
+ return f.file
+}
+
+func (f *fldDescriptor) Parent() protoreflect.Descriptor {
+ return f.parent
+}
+
+func (f *fldDescriptor) Index() int {
+ return f.index
+}
+
+func (f *fldDescriptor) Syntax() protoreflect.Syntax {
+ return f.file.Syntax()
+}
+
+func (f *fldDescriptor) Name() protoreflect.Name {
+ return protoreflect.Name(f.proto.GetName())
+}
+
+func (f *fldDescriptor) FullName() protoreflect.FullName {
+ return protoreflect.FullName(f.fqn)
+}
+
+func (f *fldDescriptor) IsPlaceholder() bool {
+ return false
+}
+
+func (f *fldDescriptor) Options() protoreflect.ProtoMessage {
+ return f.proto.Options
+}
+
+func (f *fldDescriptor) Number() protoreflect.FieldNumber {
+ return protoreflect.FieldNumber(f.proto.GetNumber())
+}
+
+func (f *fldDescriptor) Cardinality() protoreflect.Cardinality {
+ switch f.proto.GetLabel() {
+ case descriptorpb.FieldDescriptorProto_LABEL_REPEATED:
+ return protoreflect.Repeated
+ case descriptorpb.FieldDescriptorProto_LABEL_REQUIRED:
+ return protoreflect.Required
+ case descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL:
+ return protoreflect.Optional
+ default:
+ return 0
+ }
+}
+
+func (f *fldDescriptor) Kind() protoreflect.Kind {
+ return protoreflect.Kind(f.proto.GetType())
+}
+
+func (f *fldDescriptor) HasJSONName() bool {
+ return f.proto.JsonName != nil
+}
+
+func (f *fldDescriptor) JSONName() string {
+ if f.IsExtension() {
+ return f.TextName()
+ }
+ return f.proto.GetJsonName()
+}
+
+func (f *fldDescriptor) TextName() string {
+ if f.IsExtension() {
+ return fmt.Sprintf("[%s]", f.FullName())
+ }
+ return string(f.Name())
+}
+
+func (f *fldDescriptor) HasPresence() bool {
+ if f.proto.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED {
+ return false
+ }
+ return f.IsExtension() ||
+ f.Syntax() == protoreflect.Proto2 ||
+ f.Kind() == protoreflect.MessageKind || f.Kind() == protoreflect.GroupKind ||
+ f.proto.OneofIndex != nil
+}
+
+func (f *fldDescriptor) IsExtension() bool {
+ return f.proto.GetExtendee() != ""
+}
+
+func (f *fldDescriptor) HasOptionalKeyword() bool {
+ if f.proto.GetLabel() != descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL {
+ return false
+ }
+ if f.proto.GetProto3Optional() {
+ // NB: This smells weird to return false here. If the proto3_optional field
+ // is set, it's because the keyword WAS present. However, the Go runtime
+ // returns false for this case, so we mirror that behavior.
+ return !f.IsExtension()
+ }
+ // If it's optional, but not a proto3 optional, then the keyword is only
+ // present for proto2 files, for fields that are not part of a oneof.
+ return f.file.Syntax() == protoreflect.Proto2 && f.proto.OneofIndex == nil
+}
+
+func (f *fldDescriptor) IsWeak() bool {
+ return f.proto.Options.GetWeak()
+}
+
+func (f *fldDescriptor) IsPacked() bool {
+ opts := f.proto.GetOptions()
+ if opts.GetPacked() {
+ return true
+ }
+ if opts != nil && opts.Packed != nil {
+ // explicitly not packed
+ return false
+ }
+
+ // proto3 defaults to packed for repeated scalar numeric fields
+ if f.file.Syntax() != protoreflect.Proto3 {
+ return false
+ }
+ if f.proto.GetLabel() != descriptorpb.FieldDescriptorProto_LABEL_REPEATED {
+ return false
+ }
+ switch f.proto.GetType() {
+ case descriptorpb.FieldDescriptorProto_TYPE_GROUP, descriptorpb.FieldDescriptorProto_TYPE_MESSAGE,
+ descriptorpb.FieldDescriptorProto_TYPE_BYTES, descriptorpb.FieldDescriptorProto_TYPE_STRING:
+ return false
+ default:
+ // all others can be packed
+ return true
+ }
+}
+
+func (f *fldDescriptor) IsList() bool {
+ if f.proto.GetLabel() != descriptorpb.FieldDescriptorProto_LABEL_REPEATED {
+ return false
+ }
+ return !f.isMapEntry()
+}
+
+func (f *fldDescriptor) IsMap() bool {
+ if f.proto.GetLabel() != descriptorpb.FieldDescriptorProto_LABEL_REPEATED {
+ return false
+ }
+ if f.IsExtension() {
+ return false
+ }
+ return f.isMapEntry()
+}
+
+func (f *fldDescriptor) isMapEntry() bool {
+ if f.proto.GetType() != descriptorpb.FieldDescriptorProto_TYPE_MESSAGE {
+ return false
+ }
+ return f.Message().IsMapEntry()
+}
+
+func (f *fldDescriptor) MapKey() protoreflect.FieldDescriptor {
+ if !f.IsMap() {
+ return nil
+ }
+ return f.Message().Fields().ByNumber(1)
+}
+
+func (f *fldDescriptor) MapValue() protoreflect.FieldDescriptor {
+ if !f.IsMap() {
+ return nil
+ }
+ return f.Message().Fields().ByNumber(2)
+}
+
+func (f *fldDescriptor) HasDefault() bool {
+ return f.proto.DefaultValue != nil
+}
+
+func (f *fldDescriptor) Default() protoreflect.Value {
+ // We only return a valid value for scalar fields
+ if f.proto.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED ||
+ f.Kind() == protoreflect.GroupKind || f.Kind() == protoreflect.MessageKind {
+ return protoreflect.Value{}
+ }
+
+ if f.proto.DefaultValue != nil {
+ defVal := f.parseDefaultValue(f.proto.GetDefaultValue())
+ if defVal.IsValid() {
+ return defVal
+ }
+ // if we cannot parse a valid value, fall back to zero value below
+ }
+
+ // No custom default value, so return the zero value for the type
+ switch f.Kind() {
+ 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.BoolKind:
+ return protoreflect.ValueOfBool(false)
+ case protoreflect.BytesKind:
+ return protoreflect.ValueOfBytes(nil)
+ case protoreflect.StringKind:
+ return protoreflect.ValueOfString("")
+ case protoreflect.EnumKind:
+ return protoreflect.ValueOfEnum(f.Enum().Values().Get(0).Number())
+ case protoreflect.GroupKind, protoreflect.MessageKind:
+ return protoreflect.ValueOfMessage(dynamicpb.NewMessage(f.Message()))
+ default:
+ panic(fmt.Sprintf("unknown kind: %v", f.Kind()))
+ }
+}
+
+func (f *fldDescriptor) parseDefaultValue(val string) protoreflect.Value {
+ switch f.Kind() {
+ case protoreflect.EnumKind:
+ vd := f.Enum().Values().ByName(protoreflect.Name(val))
+ if vd != nil {
+ return protoreflect.ValueOfEnum(vd.Number())
+ }
+ return protoreflect.Value{}
+ case protoreflect.BoolKind:
+ switch val {
+ case "true":
+ return protoreflect.ValueOfBool(true)
+ case "false":
+ return protoreflect.ValueOfBool(false)
+ default:
+ return protoreflect.Value{}
+ }
+ case protoreflect.BytesKind:
+ return protoreflect.ValueOfBytes([]byte(unescape(val)))
+ case protoreflect.StringKind:
+ return protoreflect.ValueOfString(val)
+ case protoreflect.FloatKind:
+ if f, err := strconv.ParseFloat(val, 32); err == nil {
+ return protoreflect.ValueOfFloat32(float32(f))
+ }
+ return protoreflect.Value{}
+ case protoreflect.DoubleKind:
+ if f, err := strconv.ParseFloat(val, 64); err == nil {
+ return protoreflect.ValueOfFloat64(f)
+ }
+ return protoreflect.Value{}
+ case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
+ if i, err := strconv.ParseInt(val, 10, 32); err == nil {
+ return protoreflect.ValueOfInt32(int32(i))
+ }
+ return protoreflect.Value{}
+ case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
+ if i, err := strconv.ParseUint(val, 10, 32); err == nil {
+ return protoreflect.ValueOfUint32(uint32(i))
+ }
+ return protoreflect.Value{}
+ case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
+ if i, err := strconv.ParseInt(val, 10, 64); err == nil {
+ return protoreflect.ValueOfInt64(i)
+ }
+ return protoreflect.Value{}
+ case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
+ if i, err := strconv.ParseUint(val, 10, 64); err == nil {
+ return protoreflect.ValueOfUint64(i)
+ }
+ return protoreflect.Value{}
+ default:
+ return protoreflect.Value{}
+ }
+}
+
+func unescape(s string) string {
+ // protoc encodes default values for 'bytes' fields using C escaping,
+ // so this function reverses that escaping
+ out := make([]byte, 0, len(s))
+ var buf [4]byte
+ for len(s) > 0 {
+ if s[0] != '\\' || len(s) < 2 {
+ // not escape sequence, or too short to be well-formed escape
+ out = append(out, s[0])
+ s = s[1:]
+ continue
+ }
+ nextIndex := 2 // by default, skip '\' + escaped character
+ switch s[1] {
+ case 'x', 'X':
+ n := matchPrefix(s[2:], 2, isHex)
+ if n == 0 {
+ // bad escape
+ out = append(out, s[:2]...)
+ } else {
+ c, err := strconv.ParseUint(s[2:2+n], 16, 8)
+ if err != nil {
+ // shouldn't really happen...
+ out = append(out, s[:2+n]...)
+ } else {
+ out = append(out, byte(c))
+ }
+ nextIndex = 2 + n
+ }
+ case '0', '1', '2', '3', '4', '5', '6', '7':
+ n := 1 + matchPrefix(s[2:], 2, isOctal)
+ c, err := strconv.ParseUint(s[1:1+n], 8, 8)
+ if err != nil || c > 0xff {
+ out = append(out, s[:1+n]...)
+ } else {
+ out = append(out, byte(c))
+ }
+ nextIndex = 1 + n
+ case 'u':
+ if len(s) < 6 {
+ // bad escape
+ out = append(out, s...)
+ nextIndex = len(s)
+ } else {
+ c, err := strconv.ParseUint(s[2:6], 16, 16)
+ if err != nil {
+ // bad escape
+ out = append(out, s[:6]...)
+ } else {
+ w := utf8.EncodeRune(buf[:], rune(c))
+ out = append(out, buf[:w]...)
+ }
+ nextIndex = 6
+ }
+ case 'U':
+ if len(s) < 10 {
+ // bad escape
+ out = append(out, s...)
+ nextIndex = len(s)
+ } else {
+ c, err := strconv.ParseUint(s[2:10], 16, 32)
+ if err != nil || c > 0x10ffff {
+ // bad escape
+ out = append(out, s[:10]...)
+ } else {
+ w := utf8.EncodeRune(buf[:], rune(c))
+ out = append(out, buf[:w]...)
+ }
+ nextIndex = 10
+ }
+ case 'a':
+ out = append(out, '\a')
+ case 'b':
+ out = append(out, '\b')
+ case 'f':
+ out = append(out, '\f')
+ case 'n':
+ out = append(out, '\n')
+ case 'r':
+ out = append(out, '\r')
+ case 't':
+ out = append(out, '\t')
+ case 'v':
+ out = append(out, '\v')
+ case '\\', '\'', '"', '?':
+ out = append(out, s[1])
+ default:
+ // invalid escape, just copy it as-is
+ out = append(out, s[:2]...)
+ }
+ s = s[nextIndex:]
+ }
+ return string(out)
+}
+
+func isOctal(b byte) bool { return b >= '0' && b <= '7' }
+func isHex(b byte) bool {
+ return (b >= '0' && b <= '9') || (b >= 'a' && b <= 'f') || (b >= 'A' && b <= 'F')
+}
+func matchPrefix(s string, limit int, fn func(byte) bool) int {
+ l := len(s)
+ if l > limit {
+ l = limit
+ }
+ i := 0
+ for ; i < l; i++ {
+ if !fn(s[i]) {
+ return i
+ }
+ }
+ return i
+}
+
+func (f *fldDescriptor) DefaultEnumValue() protoreflect.EnumValueDescriptor {
+ ed := f.Enum()
+ if ed == nil {
+ return nil
+ }
+ if f.proto.DefaultValue != nil {
+ if val := ed.Values().ByName(protoreflect.Name(f.proto.GetDefaultValue())); val != nil {
+ return val
+ }
+ }
+ // if no default specified in source, return nil
+ return nil
+}
+
+func (f *fldDescriptor) ContainingOneof() protoreflect.OneofDescriptor {
+ return f.oneof
+}
+
+func (f *fldDescriptor) ContainingMessage() protoreflect.MessageDescriptor {
+ if f.extendee != nil {
+ return f.extendee
+ }
+ return f.parent.(protoreflect.MessageDescriptor)
+}
+
+func (f *fldDescriptor) Enum() protoreflect.EnumDescriptor {
+ return f.enumType
+}
+
+func (f *fldDescriptor) Message() protoreflect.MessageDescriptor {
+ return f.msgType
+}
+
+type oneofDescriptors struct {
+ protoreflect.OneofDescriptors
+ oneofs []*oneofDescriptor
+}
+
+func (r *result) createOneOfs(prefix string, parent *msgDescriptor, ooProtos []*descriptorpb.OneofDescriptorProto) oneofDescriptors {
+ oos := make([]*oneofDescriptor, len(ooProtos))
+ for i, fldProto := range ooProtos {
+ oos[i] = r.createOneOfDescriptor(fldProto, parent, i, prefix+fldProto.GetName())
+ }
+ return oneofDescriptors{oneofs: oos}
+}
+
+func (o *oneofDescriptors) Len() int {
+ return len(o.oneofs)
+}
+
+func (o *oneofDescriptors) Get(i int) protoreflect.OneofDescriptor {
+ return o.oneofs[i]
+}
+
+func (o *oneofDescriptors) ByName(s protoreflect.Name) protoreflect.OneofDescriptor {
+ for _, oo := range o.oneofs {
+ if oo.Name() == s {
+ return oo
+ }
+ }
+ return nil
+}
+
+type oneofDescriptor struct {
+ protoreflect.OneofDescriptor
+ file *result
+ parent *msgDescriptor
+ index int
+ proto *descriptorpb.OneofDescriptorProto
+ fqn string
+
+ fields fldDescriptors
+}
+
+var _ protoreflect.OneofDescriptor = (*oneofDescriptor)(nil)
+var _ protoutil.DescriptorProtoWrapper = (*oneofDescriptor)(nil)
+
+func (r *result) createOneOfDescriptor(ood *descriptorpb.OneofDescriptorProto, parent *msgDescriptor, index int, fqn string) *oneofDescriptor {
+ ret := &oneofDescriptor{file: r, parent: parent, index: index, proto: ood, fqn: fqn}
+ r.descriptors[fqn] = ret
+
+ var fields []*fldDescriptor
+ for _, fld := range parent.fields.fields {
+ if fld.proto.OneofIndex != nil && int(fld.proto.GetOneofIndex()) == index {
+ fields = append(fields, fld)
+ }
+ }
+ ret.fields = fldDescriptors{fields: fields}
+
+ return ret
+}
+
+func (o *oneofDescriptor) OneOfDescriptorProto() *descriptorpb.OneofDescriptorProto {
+ return o.proto
+}
+
+func (o *oneofDescriptor) AsProto() proto.Message {
+ return o.proto
+}
+
+func (o *oneofDescriptor) ParentFile() protoreflect.FileDescriptor {
+ return o.file
+}
+
+func (o *oneofDescriptor) Parent() protoreflect.Descriptor {
+ return o.parent
+}
+
+func (o *oneofDescriptor) Index() int {
+ return o.index
+}
+
+func (o *oneofDescriptor) Syntax() protoreflect.Syntax {
+ return o.file.Syntax()
+}
+
+func (o *oneofDescriptor) Name() protoreflect.Name {
+ return protoreflect.Name(o.proto.GetName())
+}
+
+func (o *oneofDescriptor) FullName() protoreflect.FullName {
+ return protoreflect.FullName(o.fqn)
+}
+
+func (o *oneofDescriptor) IsPlaceholder() bool {
+ return false
+}
+
+func (o *oneofDescriptor) Options() protoreflect.ProtoMessage {
+ return o.proto.Options
+}
+
+func (o *oneofDescriptor) IsSynthetic() bool {
+ for _, fld := range o.parent.proto.GetField() {
+ if fld.OneofIndex != nil && int(fld.GetOneofIndex()) == o.index {
+ return fld.GetProto3Optional()
+ }
+ }
+ return false // NB: we should never get here
+}
+
+func (o *oneofDescriptor) Fields() protoreflect.FieldDescriptors {
+ return &o.fields
+}
+
+type svcDescriptors struct {
+ protoreflect.ServiceDescriptors
+ svcs []*svcDescriptor
+}
+
+func (r *result) createServices(prefix string, svcProtos []*descriptorpb.ServiceDescriptorProto) svcDescriptors {
+ svcs := make([]*svcDescriptor, len(svcProtos))
+ for i, svcProto := range svcProtos {
+ svcs[i] = r.createServiceDescriptor(svcProto, i, prefix+svcProto.GetName())
+ }
+ return svcDescriptors{svcs: svcs}
+}
+
+func (s *svcDescriptors) Len() int {
+ return len(s.svcs)
+}
+
+func (s *svcDescriptors) Get(i int) protoreflect.ServiceDescriptor {
+ return s.svcs[i]
+}
+
+func (s *svcDescriptors) ByName(n protoreflect.Name) protoreflect.ServiceDescriptor {
+ for _, svc := range s.svcs {
+ if svc.Name() == n {
+ return svc
+ }
+ }
+ return nil
+}
+
+type svcDescriptor struct {
+ protoreflect.ServiceDescriptor
+ file *result
+ index int
+ proto *descriptorpb.ServiceDescriptorProto
+ fqn string
+
+ methods mtdDescriptors
+}
+
+var _ protoreflect.ServiceDescriptor = (*svcDescriptor)(nil)
+var _ protoutil.DescriptorProtoWrapper = (*svcDescriptor)(nil)
+
+func (r *result) createServiceDescriptor(sd *descriptorpb.ServiceDescriptorProto, index int, fqn string) *svcDescriptor {
+ ret := &svcDescriptor{file: r, index: index, proto: sd, fqn: fqn}
+ r.descriptors[fqn] = ret
+
+ prefix := fqn + "."
+ ret.methods = r.createMethods(prefix, ret, sd.Method)
+
+ return ret
+}
+
+func (s *svcDescriptor) ServiceDescriptorProto() *descriptorpb.ServiceDescriptorProto {
+ return s.proto
+}
+
+func (s *svcDescriptor) AsProto() proto.Message {
+ return s.proto
+}
+
+func (s *svcDescriptor) ParentFile() protoreflect.FileDescriptor {
+ return s.file
+}
+
+func (s *svcDescriptor) Parent() protoreflect.Descriptor {
+ return s.file
+}
+
+func (s *svcDescriptor) Index() int {
+ return s.index
+}
+
+func (s *svcDescriptor) Syntax() protoreflect.Syntax {
+ return s.file.Syntax()
+}
+
+func (s *svcDescriptor) Name() protoreflect.Name {
+ return protoreflect.Name(s.proto.GetName())
+}
+
+func (s *svcDescriptor) FullName() protoreflect.FullName {
+ return protoreflect.FullName(s.fqn)
+}
+
+func (s *svcDescriptor) IsPlaceholder() bool {
+ return false
+}
+
+func (s *svcDescriptor) Options() protoreflect.ProtoMessage {
+ return s.proto.Options
+}
+
+func (s *svcDescriptor) Methods() protoreflect.MethodDescriptors {
+ return &s.methods
+}
+
+type mtdDescriptors struct {
+ protoreflect.MethodDescriptors
+ mtds []*mtdDescriptor
+}
+
+func (r *result) createMethods(prefix string, parent *svcDescriptor, mtdProtos []*descriptorpb.MethodDescriptorProto) mtdDescriptors {
+ mtds := make([]*mtdDescriptor, len(mtdProtos))
+ for i, mtdProto := range mtdProtos {
+ mtds[i] = r.createMethodDescriptor(mtdProto, parent, i, prefix+mtdProto.GetName())
+ }
+ return mtdDescriptors{mtds: mtds}
+}
+
+func (m *mtdDescriptors) Len() int {
+ return len(m.mtds)
+}
+
+func (m *mtdDescriptors) Get(i int) protoreflect.MethodDescriptor {
+ return m.mtds[i]
+}
+
+func (m *mtdDescriptors) ByName(n protoreflect.Name) protoreflect.MethodDescriptor {
+ for _, mtd := range m.mtds {
+ if mtd.Name() == n {
+ return mtd
+ }
+ }
+ return nil
+}
+
+type mtdDescriptor struct {
+ protoreflect.MethodDescriptor
+ file *result
+ parent *svcDescriptor
+ index int
+ proto *descriptorpb.MethodDescriptorProto
+ fqn string
+
+ inputType, outputType protoreflect.MessageDescriptor
+}
+
+var _ protoreflect.MethodDescriptor = (*mtdDescriptor)(nil)
+var _ protoutil.DescriptorProtoWrapper = (*mtdDescriptor)(nil)
+
+func (r *result) createMethodDescriptor(mtd *descriptorpb.MethodDescriptorProto, parent *svcDescriptor, index int, fqn string) *mtdDescriptor {
+ ret := &mtdDescriptor{file: r, parent: parent, index: index, proto: mtd, fqn: fqn}
+ r.descriptors[fqn] = ret
+ return ret
+}
+
+func (m *mtdDescriptor) MethodDescriptorProto() *descriptorpb.MethodDescriptorProto {
+ return m.proto
+}
+
+func (m *mtdDescriptor) AsProto() proto.Message {
+ return m.proto
+}
+
+func (m *mtdDescriptor) ParentFile() protoreflect.FileDescriptor {
+ return m.file
+}
+
+func (m *mtdDescriptor) Parent() protoreflect.Descriptor {
+ return m.parent
+}
+
+func (m *mtdDescriptor) Index() int {
+ return m.index
+}
+
+func (m *mtdDescriptor) Syntax() protoreflect.Syntax {
+ return m.file.Syntax()
+}
+
+func (m *mtdDescriptor) Name() protoreflect.Name {
+ return protoreflect.Name(m.proto.GetName())
+}
+
+func (m *mtdDescriptor) FullName() protoreflect.FullName {
+ return protoreflect.FullName(m.fqn)
+}
+
+func (m *mtdDescriptor) IsPlaceholder() bool {
+ return false
+}
+
+func (m *mtdDescriptor) Options() protoreflect.ProtoMessage {
+ return m.proto.Options
+}
+
+func (m *mtdDescriptor) Input() protoreflect.MessageDescriptor {
+ return m.inputType
+}
+
+func (m *mtdDescriptor) Output() protoreflect.MessageDescriptor {
+ return m.outputType
+}
+
+func (m *mtdDescriptor) IsStreamingClient() bool {
+ return m.proto.GetClientStreaming()
+}
+
+func (m *mtdDescriptor) IsStreamingServer() bool {
+ return m.proto.GetServerStreaming()
+}
+
+func (r *result) FindImportByPath(path string) File {
+ return r.deps.FindFileByPath(path)
+}
+
+func (r *result) FindExtensionByNumber(msg protoreflect.FullName, tag protoreflect.FieldNumber) protoreflect.ExtensionTypeDescriptor {
+ return findExtension(r, msg, tag)
+}
+
+func (r *result) FindDescriptorByName(name protoreflect.FullName) protoreflect.Descriptor {
+ fqn := strings.TrimPrefix(string(name), ".")
+ return r.descriptors[fqn]
+}
+
+func (r *result) importsAsFiles() Files {
+ return r.deps
+}
+
+func (r *result) hasSource() bool {
+ n := r.FileNode()
+ _, ok := n.(*ast.FileNode)
+ return ok
+}
diff --git a/vendor/github.com/bufbuild/protocompile/linker/doc.go b/vendor/github.com/bufbuild/protocompile/linker/doc.go
new file mode 100644
index 000000000..455c2ef68
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/linker/doc.go
@@ -0,0 +1,48 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 linker contains logic and APIs related to linking a protobuf file.
+// The process of linking involves resolving all symbol references to the
+// referenced descriptor. The result of linking is a "rich" descriptor that
+// is more useful than just a descriptor proto since the links allow easy
+// traversal of a protobuf type schema and the relationships between elements.
+//
+// # Files
+//
+// This package uses an augmentation to protoreflect.FileDescriptor instances
+// in the form of the File interface. There are also factory functions for
+// promoting a FileDescriptor into a linker.File. This new interface provides
+// additional methods for resolving symbols in the file.
+//
+// This interface is both the result of linking but also an input to the linking
+// process, as all dependencies of a file to be linked must be provided in this
+// form. The actual result of the Link function, a Result, is an even broader
+// interface than File: The linker.Result interface provides even more functions,
+// which are needed for subsequent compilation steps: interpreting options and
+// generating source code info.
+//
+// # Symbols
+//
+// This package has a type named Symbols which represents a symbol table. This
+// is usually an internal detail when linking, but callers can provide an
+// instance so that symbols across multiple compile/link operations all have
+// access to the same table. This allows for detection of cases where multiple
+// files try to declare elements with conflicting fully-qualified names or
+// declare extensions for a particular extendable message that have conflicting
+// tag numbers.
+//
+// The calling code simply uses the same Symbols instance across all compile
+// operations and if any files processed have such conflicts, they can be
+// reported.
+package linker
diff --git a/vendor/github.com/bufbuild/protocompile/linker/files.go b/vendor/github.com/bufbuild/protocompile/linker/files.go
new file mode 100644
index 000000000..06492feca
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/linker/files.go
@@ -0,0 +1,368 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 linker
+
+import (
+ "fmt"
+ "strings"
+
+ "google.golang.org/protobuf/reflect/protodesc"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/types/dynamicpb"
+
+ "github.com/bufbuild/protocompile/walk"
+)
+
+// File is like a super-powered protoreflect.FileDescriptor. It includes helpful
+// methods for looking up elements in the descriptor and can be used to create a
+// resolver for all in the file's transitive closure of dependencies. (See
+// ResolverFromFile.)
+type File interface {
+ protoreflect.FileDescriptor
+ // FindDescriptorByName returns the given named element that is defined in
+ // this file. If no such element exists, nil is returned.
+ FindDescriptorByName(name protoreflect.FullName) protoreflect.Descriptor
+ // FindImportByPath returns the File corresponding to the given import path.
+ // If this file does not import the given path, nil is returned.
+ FindImportByPath(path string) File
+ // FindExtensionByNumber returns the extension descriptor for the given tag
+ // that extends the given message name. If no such extension is defined in this
+ // file, nil is returned.
+ FindExtensionByNumber(message protoreflect.FullName, tag protoreflect.FieldNumber) protoreflect.ExtensionTypeDescriptor
+ // Imports returns this file's imports. These are only the files directly
+ // imported by the file. Indirect transitive dependencies will not be in
+ // the returned slice.
+ importsAsFiles() Files
+}
+
+// NewFile converts a protoreflect.FileDescriptor to a File. The given deps must
+// contain all dependencies/imports of f. Also see NewFileRecursive.
+func NewFile(f protoreflect.FileDescriptor, deps Files) (File, error) {
+ if asFile, ok := f.(File); ok {
+ return asFile, nil
+ }
+ checkedDeps := make(Files, f.Imports().Len())
+ for i := 0; i < f.Imports().Len(); i++ {
+ imprt := f.Imports().Get(i)
+ dep := deps.FindFileByPath(imprt.Path())
+ if dep == nil {
+ return nil, fmt.Errorf("cannot create File for %q: missing dependency for %q", f.Path(), imprt.Path())
+ }
+ checkedDeps[i] = dep
+ }
+ return newFile(f, checkedDeps)
+}
+
+func newFile(f protoreflect.FileDescriptor, deps Files) (File, error) {
+ descs := map[protoreflect.FullName]protoreflect.Descriptor{}
+ err := walk.Descriptors(f, func(d protoreflect.Descriptor) error {
+ if _, ok := descs[d.FullName()]; ok {
+ return fmt.Errorf("file %q contains multiple elements with the name %s", f.Path(), d.FullName())
+ }
+ descs[d.FullName()] = d
+ return nil
+ })
+ if err != nil {
+ return nil, err
+ }
+ return file{
+ FileDescriptor: f,
+ descs: descs,
+ deps: deps,
+ }, nil
+}
+
+// NewFileRecursive recursively converts a protoreflect.FileDescriptor to a File.
+// If f has any dependencies/imports, they are converted, too, including any and
+// all transitive dependencies.
+func NewFileRecursive(f protoreflect.FileDescriptor) (File, error) {
+ if asFile, ok := f.(File); ok {
+ return asFile, nil
+ }
+ return newFileRecursive(f, map[protoreflect.FileDescriptor]File{})
+}
+
+func newFileRecursive(fd protoreflect.FileDescriptor, seen map[protoreflect.FileDescriptor]File) (File, error) {
+ if res, ok := seen[fd]; ok {
+ if res == nil {
+ return nil, fmt.Errorf("import cycle encountered: file %s transitively imports itself", fd.Path())
+ }
+ return res, nil
+ }
+
+ if f, ok := fd.(File); ok {
+ seen[fd] = f
+ return f, nil
+ }
+
+ seen[fd] = nil
+ deps := make([]File, fd.Imports().Len())
+ for i := 0; i < fd.Imports().Len(); i++ {
+ imprt := fd.Imports().Get(i)
+ dep, err := newFileRecursive(imprt, seen)
+ if err != nil {
+ return nil, err
+ }
+ deps[i] = dep
+ }
+
+ f, err := newFile(fd, deps)
+ if err != nil {
+ return nil, err
+ }
+ seen[fd] = f
+ return f, nil
+}
+
+type file struct {
+ protoreflect.FileDescriptor
+ descs map[protoreflect.FullName]protoreflect.Descriptor
+ deps Files
+}
+
+func (f file) FindDescriptorByName(name protoreflect.FullName) protoreflect.Descriptor {
+ return f.descs[name]
+}
+
+func (f file) FindImportByPath(path string) File {
+ return f.deps.FindFileByPath(path)
+}
+
+func (f file) FindExtensionByNumber(msg protoreflect.FullName, tag protoreflect.FieldNumber) protoreflect.ExtensionTypeDescriptor {
+ return findExtension(f, msg, tag)
+}
+
+func (f file) importsAsFiles() Files {
+ return f.deps
+}
+
+var _ File = file{}
+
+// Files represents a set of protobuf files. It is a slice of File values, but
+// also provides a method for easily looking up files by path and name.
+type Files []File
+
+// FindFileByPath finds a file in f that has the given path and name. If f
+// contains no such file, nil is returned.
+func (f Files) FindFileByPath(path string) File {
+ for _, file := range f {
+ if file.Path() == path {
+ return file
+ }
+ }
+ return nil
+}
+
+// AsResolver returns a Resolver that uses f as the source of descriptors. If
+// a given query cannot be answered with the files in f, the query will fail
+// with a protoregistry.NotFound error. The implementation just delegates calls
+// to each file until a result is found.
+//
+// Also see ResolverFromFile.
+func (f Files) AsResolver() Resolver {
+ return filesResolver(f)
+}
+
+// Resolver is an interface that can resolve various kinds of queries about
+// descriptors. It satisfies the resolver interfaces defined in protodesc
+// and protoregistry packages.
+type Resolver interface {
+ protodesc.Resolver
+ protoregistry.MessageTypeResolver
+ protoregistry.ExtensionTypeResolver
+}
+
+// ResolverFromFile returns a Resolver that uses the given file plus its full
+// set of transitive dependencies as the source of descriptors. If a given query
+// cannot be answered with these files, the query will fail with a
+// protoregistry.NotFound error.
+//
+// Note that this function does not compute any additional indexes for efficient
+// search, so queries generally take linear time, O(n) where n is the number of
+// files in the transitive closure of the given file. Queries for an extension
+// by number are linear with the number of messages and extensions defined across
+// all the files.
+func ResolverFromFile(f File) Resolver {
+ return fileResolver{
+ f: f,
+ deps: f.importsAsFiles().AsResolver(),
+ }
+}
+
+type fileResolver struct {
+ f File
+ deps Resolver
+}
+
+func (r fileResolver) FindFileByPath(path string) (protoreflect.FileDescriptor, error) {
+ if r.f.Path() == path {
+ return r.f, nil
+ }
+ return r.deps.FindFileByPath(path)
+}
+
+func (r fileResolver) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) {
+ d := r.f.FindDescriptorByName(name)
+ if d != nil {
+ return d, nil
+ }
+ return r.deps.FindDescriptorByName(name)
+}
+
+func (r fileResolver) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) {
+ d := r.f.FindDescriptorByName(message)
+ if d != nil {
+ if md, ok := d.(protoreflect.MessageDescriptor); ok {
+ return dynamicpb.NewMessageType(md), nil
+ }
+ return nil, protoregistry.NotFound
+ }
+ return r.deps.FindMessageByName(message)
+}
+
+func (r fileResolver) FindMessageByURL(url string) (protoreflect.MessageType, error) {
+ fullName := messageNameFromURL(url)
+ return r.FindMessageByName(protoreflect.FullName(fullName))
+}
+
+func messageNameFromURL(url string) string {
+ lastSlash := strings.LastIndexByte(url, '/')
+ var fullName string
+ if lastSlash >= 0 {
+ fullName = url[lastSlash+1:]
+ } else {
+ fullName = url
+ }
+ return fullName
+}
+
+func (r fileResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {
+ d := r.f.FindDescriptorByName(field)
+ if d != nil {
+ if extd, ok := d.(protoreflect.ExtensionTypeDescriptor); ok {
+ return extd.Type(), nil
+ }
+ if fld, ok := d.(protoreflect.FieldDescriptor); ok && fld.IsExtension() {
+ return dynamicpb.NewExtensionType(fld), nil
+ }
+ return nil, protoregistry.NotFound
+ }
+ return r.deps.FindExtensionByName(field)
+}
+
+func (r fileResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {
+ ext := findExtension(r.f, message, field)
+ if ext != nil {
+ return ext.Type(), nil
+ }
+ return r.deps.FindExtensionByNumber(message, field)
+}
+
+type filesResolver []File
+
+func (r filesResolver) FindFileByPath(path string) (protoreflect.FileDescriptor, error) {
+ for _, f := range r {
+ if f.Path() == path {
+ return f, nil
+ }
+ }
+ return nil, protoregistry.NotFound
+}
+
+func (r filesResolver) FindDescriptorByName(name protoreflect.FullName) (protoreflect.Descriptor, error) {
+ for _, f := range r {
+ result := f.FindDescriptorByName(name)
+ if result != nil {
+ return result, nil
+ }
+ }
+ return nil, protoregistry.NotFound
+}
+
+func (r filesResolver) FindMessageByName(message protoreflect.FullName) (protoreflect.MessageType, error) {
+ for _, f := range r {
+ d := f.FindDescriptorByName(message)
+ if d != nil {
+ if md, ok := d.(protoreflect.MessageDescriptor); ok {
+ return dynamicpb.NewMessageType(md), nil
+ }
+ return nil, protoregistry.NotFound
+ }
+ }
+ return nil, protoregistry.NotFound
+}
+
+func (r filesResolver) FindMessageByURL(url string) (protoreflect.MessageType, error) {
+ name := messageNameFromURL(url)
+ return r.FindMessageByName(protoreflect.FullName(name))
+}
+
+func (r filesResolver) FindExtensionByName(field protoreflect.FullName) (protoreflect.ExtensionType, error) {
+ for _, f := range r {
+ d := f.FindDescriptorByName(field)
+ if d != nil {
+ if extd, ok := d.(protoreflect.ExtensionTypeDescriptor); ok {
+ return extd.Type(), nil
+ }
+ if fld, ok := d.(protoreflect.FieldDescriptor); ok && fld.IsExtension() {
+ return dynamicpb.NewExtensionType(fld), nil
+ }
+ return nil, protoregistry.NotFound
+ }
+ }
+ return nil, protoregistry.NotFound
+}
+
+func (r filesResolver) FindExtensionByNumber(message protoreflect.FullName, field protoreflect.FieldNumber) (protoreflect.ExtensionType, error) {
+ for _, f := range r {
+ ext := findExtension(f, message, field)
+ if ext != nil {
+ return ext.Type(), nil
+ }
+ }
+ return nil, protoregistry.NotFound
+}
+
+type hasExtensionsAndMessages interface {
+ Messages() protoreflect.MessageDescriptors
+ Extensions() protoreflect.ExtensionDescriptors
+}
+
+func findExtension(d hasExtensionsAndMessages, message protoreflect.FullName, field protoreflect.FieldNumber) protoreflect.ExtensionTypeDescriptor {
+ for i := 0; i < d.Extensions().Len(); i++ {
+ if extType := isExtensionMatch(d.Extensions().Get(i), message, field); extType != nil {
+ return extType
+ }
+ }
+
+ for i := 0; i < d.Messages().Len(); i++ {
+ if extType := findExtension(d.Messages().Get(i), message, field); extType != nil {
+ return extType
+ }
+ }
+
+ return nil // could not be found
+}
+
+func isExtensionMatch(ext protoreflect.ExtensionDescriptor, message protoreflect.FullName, field protoreflect.FieldNumber) protoreflect.ExtensionTypeDescriptor {
+ if ext.Number() != field || ext.ContainingMessage().FullName() != message {
+ return nil
+ }
+ if extType, ok := ext.(protoreflect.ExtensionTypeDescriptor); ok {
+ return extType
+ }
+ return dynamicpb.NewExtensionType(ext).TypeDescriptor()
+}
diff --git a/vendor/github.com/bufbuild/protocompile/linker/linker.go b/vendor/github.com/bufbuild/protocompile/linker/linker.go
new file mode 100644
index 000000000..c9e6e84e2
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/linker/linker.go
@@ -0,0 +1,177 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 linker
+
+import (
+ "fmt"
+
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/parser"
+ "github.com/bufbuild/protocompile/reporter"
+)
+
+// Link handles linking a parsed descriptor proto into a fully-linked descriptor.
+// If the given parser.Result has imports, they must all be present in the given
+// dependencies.
+//
+// The symbols value is optional and may be nil. If it is not nil, it must be the
+// same instance used to create and link all of the given result's dependencies
+// (or otherwise already have all dependencies imported). Otherwise, linking may
+// fail with spurious errors resolving symbols.
+//
+// The handler value is used to report any link errors. If any such errors are
+// reported, this function returns a non-nil error. The Result value returned
+// also implements protoreflect.FileDescriptor.
+//
+// Note that linking does NOT interpret options. So options messages in the
+// returned value have all values stored in UninterpretedOptions fields.
+func Link(parsed parser.Result, dependencies Files, symbols *Symbols, handler *reporter.Handler) (Result, error) {
+ if symbols == nil {
+ symbols = &Symbols{}
+ }
+ prefix := parsed.FileDescriptorProto().GetPackage()
+ if prefix != "" {
+ prefix += "."
+ }
+
+ for _, imp := range parsed.FileDescriptorProto().Dependency {
+ dep := dependencies.FindFileByPath(imp)
+ if dep == nil {
+ return nil, fmt.Errorf("dependencies is missing import %q", imp)
+ }
+ if err := symbols.Import(dep, handler); err != nil {
+ return nil, err
+ }
+ }
+
+ r := &result{
+ Result: parsed,
+ deps: dependencies,
+ descriptors: map[string]protoreflect.Descriptor{},
+ usedImports: map[string]struct{}{},
+ prefix: prefix,
+ optionQualifiedNames: map[ast.IdentValueNode]string{},
+ }
+
+ // First, we put all symbols into a single pool, which lets us ensure there
+ // are no duplicate symbols and will also let us resolve and revise all type
+ // references in next step.
+ if err := symbols.importResult(r, handler); err != nil {
+ return nil, err
+ }
+
+ // After we've populated the pool, we can now try to resolve all type
+ // references. All references must be checked for correct type, any fields
+ // with enum types must be corrected (since we parse them as if they are
+ // message references since we don't actually know message or enum until
+ // link time), and references will be re-written to be fully-qualified
+ // references (e.g. start with a dot ".").
+ if err := r.resolveReferences(handler, symbols); err != nil {
+ return nil, err
+ }
+
+ return r, handler.Error()
+}
+
+// Result is the result of linking. This is a protoreflect.FileDescriptor, but
+// with some additional methods for exposing additional information, such as the
+// for accessing the input AST or file descriptor.
+//
+// It also provides Resolve* methods, for looking up enums, messages, and
+// extensions that are available to the protobuf source file this result
+// represents. An element is "available" if it meets any of the following
+// criteria:
+// 1. The element is defined in this file itself.
+// 2. The element is defined in a file that is directly imported by this file.
+// 3. The element is "available" to a file that is directly imported by this
+// file as a public import.
+//
+// Other elements, even if in the transitive closure of this file, are not
+// available and thus won't be returned by these methods.
+type Result interface {
+ File
+ parser.Result
+ // ResolveEnumType returns an enum descriptor for the given named enum that
+ // is available in this file. If no such element is available or if the
+ // named element is not an enum, nil is returned.
+ ResolveEnumType(protoreflect.FullName) protoreflect.EnumDescriptor
+ // ResolveMessageType returns a message descriptor for the given named
+ // message that is available in this file. If no such element is available
+ // or if the named element is not a message, nil is returned.
+ ResolveMessageType(protoreflect.FullName) protoreflect.MessageDescriptor
+ // ResolveExtension returns an extension descriptor for the given named
+ // extension that is available in this file. If no such element is available
+ // or if the named element is not an extension, nil is returned.
+ ResolveExtension(protoreflect.FullName) protoreflect.ExtensionTypeDescriptor
+ // ResolveMessageLiteralExtensionName returns the fully qualified name for
+ // an identifier for extension field names in message literals.
+ ResolveMessageLiteralExtensionName(ast.IdentValueNode) string
+ // ValidateOptions runs some validation checks on the descriptor that can only
+ // be done after options are interpreted. Any errors or warnings encountered
+ // will be reported via the given handler. If any error is reported, this
+ // function returns a non-nil error.
+ ValidateOptions(handler *reporter.Handler) error
+ // CheckForUnusedImports is used to report warnings for unused imports. This
+ // should be called after options have been interpreted. Otherwise, the logic
+ // could incorrectly report imports as unused if the only symbol used were a
+ // custom option.
+ CheckForUnusedImports(handler *reporter.Handler)
+ // PopulateSourceCodeInfo is used to populate source code info for the file
+ // descriptor. This step requires that the underlying descriptor proto have
+ // its `source_code_info` field populated. This is typically a post-process
+ // step separate from linking, because computing source code info requires
+ // interpreting options (which is done after linking).
+ PopulateSourceCodeInfo()
+
+ // CanonicalProto returns the file descriptor proto in a form that
+ // will be serialized in a canonical way. The "canonical" way matches
+ // the way that "protoc" emits option values, which is a way that
+ // mostly matches the way options are defined in source, including
+ // ordering and de-structuring. Unlike the FileDescriptorProto() method, this
+ // method is more expensive and results in a new descriptor proto
+ // being constructed with each call.
+ //
+ // The returned value will have all options (fields of the various
+ // descriptorpb.*Options message types) represented via unrecognized
+ // fields. So the returned value will serialize as desired, but it
+ // is otherwise not useful since all option values are treated as
+ // unknown.
+ CanonicalProto() *descriptorpb.FileDescriptorProto
+
+ // RemoveAST drops the AST information from this result.
+ RemoveAST()
+}
+
+// ErrorUnusedImport may be passed to a warning reporter when an unused
+// import is detected. The error the reporter receives will be wrapped
+// with source position that indicates the file and line where the import
+// statement appeared.
+type ErrorUnusedImport interface {
+ error
+ UnusedImport() string
+}
+
+type errUnusedImport string
+
+func (e errUnusedImport) Error() string {
+ return fmt.Sprintf("import %q not used", string(e))
+}
+
+func (e errUnusedImport) UnusedImport() string {
+ return string(e)
+}
diff --git a/vendor/github.com/bufbuild/protocompile/linker/pathkey_no_unsafe.go b/vendor/github.com/bufbuild/protocompile/linker/pathkey_no_unsafe.go
new file mode 100644
index 000000000..89475e693
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/linker/pathkey_no_unsafe.go
@@ -0,0 +1,35 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 appengine || gopherjs || purego
+// +build appengine gopherjs purego
+
+// NB: other environments where unsafe is inappropriate should use "purego" build tag
+// https://github.com/golang/go/issues/23172
+
+package linker
+
+import (
+ "reflect"
+
+ "google.golang.org/protobuf/reflect/protoreflect"
+)
+
+func pathKey(p protoreflect.SourcePath) interface{} {
+ rv := reflect.ValueOf(p)
+ arrayType := reflect.ArrayOf(rv.Len(), rv.Type().Elem())
+ array := reflect.New(arrayType).Elem()
+ reflect.Copy(array, rv)
+ return array.Interface()
+}
diff --git a/vendor/github.com/bufbuild/protocompile/linker/pathkey_unsafe.go b/vendor/github.com/bufbuild/protocompile/linker/pathkey_unsafe.go
new file mode 100644
index 000000000..cf0d0c266
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/linker/pathkey_unsafe.go
@@ -0,0 +1,36 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 !appengine && !gopherjs && !purego
+// +build !appengine,!gopherjs,!purego
+
+// NB: other environments where unsafe is inappropriate should use "purego" build tag
+// https://github.com/golang/go/issues/23172
+
+package linker
+
+import (
+ "reflect"
+ "unsafe"
+
+ "google.golang.org/protobuf/reflect/protoreflect"
+)
+
+var pathElementType = reflect.TypeOf(protoreflect.SourcePath{}).Elem()
+
+func pathKey(p protoreflect.SourcePath) interface{} {
+ hdr := (*reflect.SliceHeader)(unsafe.Pointer(reflect.ValueOf(&p).Pointer()))
+ array := reflect.NewAt(reflect.ArrayOf(hdr.Len, pathElementType), unsafe.Pointer(hdr.Data))
+ return array.Elem().Interface()
+}
diff --git a/vendor/github.com/bufbuild/protocompile/linker/resolve.go b/vendor/github.com/bufbuild/protocompile/linker/resolve.go
new file mode 100644
index 000000000..7c2e76e9b
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/linker/resolve.go
@@ -0,0 +1,780 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 linker
+
+import (
+ "fmt"
+ "strings"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+ "google.golang.org/protobuf/types/dynamicpb"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/internal"
+ "github.com/bufbuild/protocompile/reporter"
+ "github.com/bufbuild/protocompile/walk"
+)
+
+func (r *result) ResolveMessageType(name protoreflect.FullName) protoreflect.MessageDescriptor {
+ d := r.resolveElement(name)
+ if md, ok := d.(protoreflect.MessageDescriptor); ok {
+ return md
+ }
+ return nil
+}
+
+func (r *result) ResolveEnumType(name protoreflect.FullName) protoreflect.EnumDescriptor {
+ d := r.resolveElement(name)
+ if ed, ok := d.(protoreflect.EnumDescriptor); ok {
+ return ed
+ }
+ return nil
+}
+
+func (r *result) ResolveExtension(name protoreflect.FullName) protoreflect.ExtensionTypeDescriptor {
+ d := r.resolveElement(name)
+ if ed, ok := d.(protoreflect.ExtensionDescriptor); ok {
+ if !ed.IsExtension() {
+ return nil
+ }
+ if td, ok := ed.(protoreflect.ExtensionTypeDescriptor); ok {
+ return td
+ }
+ return dynamicpb.NewExtensionType(ed).TypeDescriptor()
+ }
+ return nil
+}
+
+func (r *result) ResolveMessageLiteralExtensionName(node ast.IdentValueNode) string {
+ return r.optionQualifiedNames[node]
+}
+
+func (r *result) resolveElement(name protoreflect.FullName) protoreflect.Descriptor {
+ if len(name) > 0 && name[0] == '.' {
+ name = name[1:]
+ }
+ importedFd, res := resolveElement(r, name, false, nil)
+ if importedFd != nil {
+ r.markUsed(importedFd.Path())
+ }
+ return res
+}
+
+func (r *result) markUsed(importPath string) {
+ r.usedImports[importPath] = struct{}{}
+}
+
+func (r *result) CheckForUnusedImports(handler *reporter.Handler) {
+ fd := r.FileDescriptorProto()
+ file, _ := r.FileNode().(*ast.FileNode)
+ for i, dep := range fd.Dependency {
+ if _, ok := r.usedImports[dep]; !ok {
+ isPublic := false
+ // it's fine if it's a public import
+ for _, j := range fd.PublicDependency {
+ if i == int(j) {
+ isPublic = true
+ break
+ }
+ }
+ if isPublic {
+ continue
+ }
+ pos := ast.UnknownPos(fd.GetName())
+ if file != nil {
+ for _, decl := range file.Decls {
+ imp, ok := decl.(*ast.ImportNode)
+ if ok && imp.Name.AsString() == dep {
+ pos = file.NodeInfo(imp).Start()
+ }
+ }
+ }
+ handler.HandleWarningWithPos(pos, errUnusedImport(dep))
+ }
+ }
+}
+
+func resolveElement(f File, fqn protoreflect.FullName, publicImportsOnly bool, checked []string) (imported File, d protoreflect.Descriptor) {
+ path := f.Path()
+ for _, str := range checked {
+ if str == path {
+ // already checked
+ return nil, nil
+ }
+ }
+ checked = append(checked, path)
+
+ r := resolveElementInFile(fqn, f)
+ if r != nil {
+ // not imported, but present in f
+ return nil, r
+ }
+
+ // When publicImportsOnly = false, we are searching only directly imported symbols. But
+ // we also need to search transitive public imports due to semantics of public imports.
+ for i := 0; i < f.Imports().Len(); i++ {
+ dep := f.Imports().Get(i)
+ if dep.IsPublic || !publicImportsOnly {
+ depFile := f.FindImportByPath(dep.Path())
+ _, d := resolveElement(depFile, fqn, true, checked)
+ if d != nil {
+ return depFile, d
+ }
+ }
+ }
+
+ return nil, nil
+}
+
+func descriptorTypeWithArticle(d protoreflect.Descriptor) string {
+ switch d := d.(type) {
+ case protoreflect.MessageDescriptor:
+ return "a message"
+ case protoreflect.FieldDescriptor:
+ if d.IsExtension() {
+ return "an extension"
+ }
+ return "a field"
+ case protoreflect.OneofDescriptor:
+ return "a oneof"
+ case protoreflect.EnumDescriptor:
+ return "an enum"
+ case protoreflect.EnumValueDescriptor:
+ return "an enum value"
+ case protoreflect.ServiceDescriptor:
+ return "a service"
+ case protoreflect.MethodDescriptor:
+ return "a method"
+ case protoreflect.FileDescriptor:
+ return "a file"
+ default:
+ // shouldn't be possible
+ return fmt.Sprintf("a %T", d)
+ }
+}
+
+func (r *result) resolveReferences(handler *reporter.Handler, s *Symbols) error {
+ // first create the full descriptor hierarchy
+ fd := r.FileDescriptorProto()
+ prefix := ""
+ if fd.GetPackage() != "" {
+ prefix = fd.GetPackage() + "."
+ }
+ r.imports = r.createImports()
+ r.messages = r.createMessages(prefix, r, fd.MessageType)
+ r.enums = r.createEnums(prefix, r, fd.EnumType)
+ r.extensions = r.createExtensions(prefix, r, fd.Extension)
+ r.services = r.createServices(prefix, fd.Service)
+
+ // then resolve symbol references
+ scopes := []scope{fileScope(r)}
+ if fd.Options != nil {
+ if err := r.resolveOptions(handler, "file", protoreflect.FullName(fd.GetName()), fd.Options.UninterpretedOption, scopes); err != nil {
+ return err
+ }
+ }
+
+ return walk.DescriptorsEnterAndExit(r,
+ func(d protoreflect.Descriptor) error {
+ fqn := d.FullName()
+ switch d := d.(type) {
+ case *msgDescriptor:
+ // Strangely, when protoc resolves extension names, it uses the *enclosing* scope
+ // instead of the message's scope. So if the message contains an extension named "i",
+ // an option cannot refer to it as simply "i" but must qualify it (at a minimum "Msg.i").
+ // So we don't add this messages scope to our scopes slice until *after* we do options.
+ if d.proto.Options != nil {
+ if err := r.resolveOptions(handler, "message", fqn, d.proto.Options.UninterpretedOption, scopes); err != nil {
+ return err
+ }
+ }
+ scopes = append(scopes, messageScope(r, fqn)) // push new scope on entry
+ // walk only visits descriptors, so we need to loop over extension ranges ourselves
+ for _, er := range d.proto.ExtensionRange {
+ if er.Options != nil {
+ erName := protoreflect.FullName(fmt.Sprintf("%s:%d-%d", fqn, er.GetStart(), er.GetEnd()-1))
+ if err := r.resolveOptions(handler, "extension range", erName, er.Options.UninterpretedOption, scopes); err != nil {
+ return err
+ }
+ }
+ }
+ case *extTypeDescriptor:
+ if d.field.proto.Options != nil {
+ if err := r.resolveOptions(handler, "extension", fqn, d.field.proto.Options.UninterpretedOption, scopes); err != nil {
+ return err
+ }
+ }
+ if err := resolveFieldTypes(d.field, handler, s, scopes); err != nil {
+ return err
+ }
+ if r.Syntax() == protoreflect.Proto3 && !allowedProto3Extendee(d.field.proto.GetExtendee()) {
+ file := r.FileNode()
+ node := r.FieldNode(d.field.proto).FieldExtendee()
+ if err := handler.HandleErrorf(file.NodeInfo(node).Start(), "extend blocks in proto3 can only be used to define custom options"); err != nil {
+ return err
+ }
+ }
+ case *fldDescriptor:
+ if d.proto.Options != nil {
+ if err := r.resolveOptions(handler, "field", fqn, d.proto.Options.UninterpretedOption, scopes); err != nil {
+ return err
+ }
+ }
+ if err := resolveFieldTypes(d, handler, s, scopes); err != nil {
+ return err
+ }
+ case *oneofDescriptor:
+ if d.proto.Options != nil {
+ if err := r.resolveOptions(handler, "oneof", fqn, d.proto.Options.UninterpretedOption, scopes); err != nil {
+ return err
+ }
+ }
+ case *enumDescriptor:
+ if d.proto.Options != nil {
+ if err := r.resolveOptions(handler, "enum", fqn, d.proto.Options.UninterpretedOption, scopes); err != nil {
+ return err
+ }
+ }
+ case *enValDescriptor:
+ if d.proto.Options != nil {
+ if err := r.resolveOptions(handler, "enum value", fqn, d.proto.Options.UninterpretedOption, scopes); err != nil {
+ return err
+ }
+ }
+ case *svcDescriptor:
+ if d.proto.Options != nil {
+ if err := r.resolveOptions(handler, "service", fqn, d.proto.Options.UninterpretedOption, scopes); err != nil {
+ return err
+ }
+ }
+ // not a message, but same scoping rules for nested elements as if it were
+ scopes = append(scopes, messageScope(r, fqn)) // push new scope on entry
+ case *mtdDescriptor:
+ if d.proto.Options != nil {
+ if err := r.resolveOptions(handler, "method", fqn, d.proto.Options.UninterpretedOption, scopes); err != nil {
+ return err
+ }
+ }
+ if err := resolveMethodTypes(d, handler, scopes); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ func(d protoreflect.Descriptor) error {
+ switch d.(type) {
+ case protoreflect.MessageDescriptor, protoreflect.ServiceDescriptor:
+ // pop message scope on exit
+ scopes = scopes[:len(scopes)-1]
+ }
+ return nil
+ })
+}
+
+var allowedProto3Extendees = map[string]struct{}{
+ ".google.protobuf.FileOptions": {},
+ ".google.protobuf.MessageOptions": {},
+ ".google.protobuf.FieldOptions": {},
+ ".google.protobuf.OneofOptions": {},
+ ".google.protobuf.ExtensionRangeOptions": {},
+ ".google.protobuf.EnumOptions": {},
+ ".google.protobuf.EnumValueOptions": {},
+ ".google.protobuf.ServiceOptions": {},
+ ".google.protobuf.MethodOptions": {},
+}
+
+func allowedProto3Extendee(n string) bool {
+ if n == "" {
+ // not an extension, allowed
+ return true
+ }
+ _, ok := allowedProto3Extendees[n]
+ return ok
+}
+
+func resolveFieldTypes(f *fldDescriptor, handler *reporter.Handler, s *Symbols, scopes []scope) error {
+ r := f.file
+ fld := f.proto
+ file := r.FileNode()
+ node := r.FieldNode(fld)
+ scope := fmt.Sprintf("field %s", f.fqn)
+ if fld.GetExtendee() != "" {
+ scope := fmt.Sprintf("extension %s", f.fqn)
+ dsc := r.resolve(fld.GetExtendee(), false, scopes)
+ if dsc == nil {
+ return handler.HandleErrorf(file.NodeInfo(node.FieldExtendee()).Start(), "unknown extendee type %s", fld.GetExtendee())
+ }
+ if isSentinelDescriptor(dsc) {
+ return handler.HandleErrorf(file.NodeInfo(node.FieldExtendee()).Start(), "unknown extendee type %s; resolved to %s which is not defined; consider using a leading dot", fld.GetExtendee(), dsc.FullName())
+ }
+ extd, ok := dsc.(protoreflect.MessageDescriptor)
+ if !ok {
+ return handler.HandleErrorf(file.NodeInfo(node.FieldExtendee()).Start(), "extendee is invalid: %s is %s, not a message", dsc.FullName(), descriptorTypeWithArticle(dsc))
+ }
+ f.extendee = extd
+ fld.Extendee = proto.String("." + string(dsc.FullName()))
+ // make sure the tag number is in range
+ found := false
+ tag := protoreflect.FieldNumber(fld.GetNumber())
+ for i := 0; i < extd.ExtensionRanges().Len(); i++ {
+ rng := extd.ExtensionRanges().Get(i)
+ if tag >= rng[0] && tag < rng[1] {
+ found = true
+ break
+ }
+ }
+ if !found {
+ if err := handler.HandleErrorf(file.NodeInfo(node.FieldTag()).Start(), "%s: tag %d is not in valid range for extended type %s", scope, tag, dsc.FullName()); err != nil {
+ return err
+ }
+ } else {
+ // make sure tag is not a duplicate
+ if err := s.AddExtension(dsc.ParentFile().Package(), dsc.FullName(), tag, file.NodeInfo(node.FieldTag()).Start(), handler); err != nil {
+ return err
+ }
+ }
+ } else if f.proto.OneofIndex != nil {
+ parent := f.parent.(protoreflect.MessageDescriptor) //nolint:errcheck
+ index := int(f.proto.GetOneofIndex())
+ f.oneof = parent.Oneofs().Get(index)
+ }
+
+ if fld.GetTypeName() == "" {
+ // scalar type; no further resolution required
+ return nil
+ }
+
+ dsc := r.resolve(fld.GetTypeName(), true, scopes)
+ if dsc == nil {
+ return handler.HandleErrorf(file.NodeInfo(node.FieldType()).Start(), "%s: unknown type %s", scope, fld.GetTypeName())
+ }
+ if isSentinelDescriptor(dsc) {
+ return handler.HandleErrorf(file.NodeInfo(node.FieldType()).Start(), "%s: unknown type %s; resolved to %s which is not defined; consider using a leading dot", scope, fld.GetTypeName(), dsc.FullName())
+ }
+ switch dsc := dsc.(type) {
+ case protoreflect.MessageDescriptor:
+ if dsc.IsMapEntry() {
+ isValid := false
+ switch node.(type) {
+ case *ast.MapFieldNode:
+ // We have an AST for this file and can see this field is from a map declaration
+ isValid = true
+ case ast.NoSourceNode:
+ // We don't have an AST for the file (it came from a provided descriptor). So we
+ // need to validate that it's not an illegal reference. To be valid, the field
+ // must be repeated and the entry type must be nested in the same enclosing
+ // message as the field.
+ isValid = isValidMap(f, dsc)
+ if isValid && f.index > 0 {
+ // also make sure there are no earlier fields that are valid for this map entry
+ flds := f.Parent().(protoreflect.MessageDescriptor).Fields()
+ for i := 0; i < f.index; i++ {
+ if isValidMap(flds.Get(i), dsc) {
+ isValid = false
+ break
+ }
+ }
+ }
+ }
+ if !isValid {
+ return handler.HandleErrorf(file.NodeInfo(node.FieldType()).Start(), "%s: %s is a synthetic map entry and may not be referenced explicitly", scope, dsc.FullName())
+ }
+ }
+ fld.TypeName = proto.String("." + string(dsc.FullName()))
+ // if type was tentatively unset, we now know it's actually a message
+ if fld.Type == nil {
+ fld.Type = descriptorpb.FieldDescriptorProto_TYPE_MESSAGE.Enum()
+ }
+ f.msgType = dsc
+ case protoreflect.EnumDescriptor:
+ proto3 := r.Syntax() == protoreflect.Proto3
+ enumIsProto3 := dsc.ParentFile().Syntax() == protoreflect.Proto3
+ if fld.GetExtendee() == "" && proto3 && !enumIsProto3 {
+ // fields in a proto3 message cannot refer to proto2 enums
+ return handler.HandleErrorf(file.NodeInfo(node.FieldType()).Start(), "%s: cannot use proto2 enum %s in a proto3 message", scope, fld.GetTypeName())
+ }
+ fld.TypeName = proto.String("." + string(dsc.FullName()))
+ // the type was tentatively unset, but now we know it's actually an enum
+ fld.Type = descriptorpb.FieldDescriptorProto_TYPE_ENUM.Enum()
+ f.enumType = dsc
+ default:
+ return handler.HandleErrorf(file.NodeInfo(node.FieldType()).Start(), "%s: invalid type: %s is %s, not a message or enum", scope, dsc.FullName(), descriptorTypeWithArticle(dsc))
+ }
+ return nil
+}
+
+func isValidMap(mapField protoreflect.FieldDescriptor, mapEntry protoreflect.MessageDescriptor) bool {
+ return !mapField.IsExtension() &&
+ mapEntry.Parent() == mapField.ContainingMessage() &&
+ mapField.Cardinality() == protoreflect.Repeated &&
+ string(mapEntry.Name()) == internal.InitCap(internal.JSONName(string(mapField.Name())))+"Entry"
+}
+
+func resolveMethodTypes(m *mtdDescriptor, handler *reporter.Handler, scopes []scope) error {
+ scope := fmt.Sprintf("method %s", m.fqn)
+ r := m.file
+ mtd := m.proto
+ file := r.FileNode()
+ node := r.MethodNode(mtd)
+ dsc := r.resolve(mtd.GetInputType(), false, scopes)
+ if dsc == nil {
+ if err := handler.HandleErrorf(file.NodeInfo(node.GetInputType()).Start(), "%s: unknown request type %s", scope, mtd.GetInputType()); err != nil {
+ return err
+ }
+ } else if isSentinelDescriptor(dsc) {
+ if err := handler.HandleErrorf(file.NodeInfo(node.GetInputType()).Start(), "%s: unknown request type %s; resolved to %s which is not defined; consider using a leading dot", scope, mtd.GetInputType(), dsc.FullName()); err != nil {
+ return err
+ }
+ } else if msg, ok := dsc.(protoreflect.MessageDescriptor); !ok {
+ if err := handler.HandleErrorf(file.NodeInfo(node.GetInputType()).Start(), "%s: invalid request type: %s is %s, not a message", scope, dsc.FullName(), descriptorTypeWithArticle(dsc)); err != nil {
+ return err
+ }
+ } else {
+ mtd.InputType = proto.String("." + string(dsc.FullName()))
+ m.inputType = msg
+ }
+
+ // TODO: make input and output type resolution more DRY
+ dsc = r.resolve(mtd.GetOutputType(), false, scopes)
+ if dsc == nil {
+ if err := handler.HandleErrorf(file.NodeInfo(node.GetOutputType()).Start(), "%s: unknown response type %s", scope, mtd.GetOutputType()); err != nil {
+ return err
+ }
+ } else if isSentinelDescriptor(dsc) {
+ if err := handler.HandleErrorf(file.NodeInfo(node.GetOutputType()).Start(), "%s: unknown response type %s; resolved to %s which is not defined; consider using a leading dot", scope, mtd.GetOutputType(), dsc.FullName()); err != nil {
+ return err
+ }
+ } else if msg, ok := dsc.(protoreflect.MessageDescriptor); !ok {
+ if err := handler.HandleErrorf(file.NodeInfo(node.GetOutputType()).Start(), "%s: invalid response type: %s is %s, not a message", scope, dsc.FullName(), descriptorTypeWithArticle(dsc)); err != nil {
+ return err
+ }
+ } else {
+ mtd.OutputType = proto.String("." + string(dsc.FullName()))
+ m.outputType = msg
+ }
+
+ return nil
+}
+
+func (r *result) resolveOptions(handler *reporter.Handler, elemType string, elemName protoreflect.FullName, opts []*descriptorpb.UninterpretedOption, scopes []scope) error {
+ mc := &internal.MessageContext{
+ File: r,
+ ElementName: string(elemName),
+ ElementType: elemType,
+ }
+ file := r.FileNode()
+opts:
+ for _, opt := range opts {
+ // resolve any extension names found in option names
+ for _, nm := range opt.Name {
+ if nm.GetIsExtension() {
+ node := r.OptionNamePartNode(nm)
+ fqn, err := r.resolveExtensionName(nm.GetNamePart(), scopes)
+ if err != nil {
+ if err := handler.HandleErrorf(file.NodeInfo(node).Start(), "%v%v", mc, err); err != nil {
+ return err
+ }
+ continue opts
+ }
+ nm.NamePart = proto.String(fqn)
+ }
+ }
+ // also resolve any extension names found inside message literals in option values
+ mc.Option = opt
+ optVal := r.OptionNode(opt).GetValue()
+ if err := r.resolveOptionValue(handler, mc, optVal, scopes); err != nil {
+ return err
+ }
+ mc.Option = nil
+ }
+ return nil
+}
+
+func (r *result) resolveOptionValue(handler *reporter.Handler, mc *internal.MessageContext, val ast.ValueNode, scopes []scope) error {
+ optVal := val.Value()
+ switch optVal := optVal.(type) {
+ case []ast.ValueNode:
+ origPath := mc.OptAggPath
+ defer func() {
+ mc.OptAggPath = origPath
+ }()
+ for i, v := range optVal {
+ mc.OptAggPath = fmt.Sprintf("%s[%d]", origPath, i)
+ if err := r.resolveOptionValue(handler, mc, v, scopes); err != nil {
+ return err
+ }
+ }
+ case []*ast.MessageFieldNode:
+ origPath := mc.OptAggPath
+ defer func() {
+ mc.OptAggPath = origPath
+ }()
+ for _, fld := range optVal {
+ // check for extension name
+ if fld.Name.IsExtension() {
+ fqn, err := r.resolveExtensionName(string(fld.Name.Name.AsIdentifier()), scopes)
+ if err != nil {
+ if err := handler.HandleErrorf(r.FileNode().NodeInfo(fld.Name.Name).Start(), "%v%v", mc, err); err != nil {
+ return err
+ }
+ } else {
+ r.optionQualifiedNames[fld.Name.Name] = fqn
+ }
+ }
+
+ // recurse into value
+ mc.OptAggPath = origPath
+ if origPath != "" {
+ mc.OptAggPath += "."
+ }
+ if fld.Name.IsExtension() {
+ mc.OptAggPath = fmt.Sprintf("%s[%s]", mc.OptAggPath, string(fld.Name.Name.AsIdentifier()))
+ } else {
+ mc.OptAggPath = fmt.Sprintf("%s%s", mc.OptAggPath, string(fld.Name.Name.AsIdentifier()))
+ }
+
+ if err := r.resolveOptionValue(handler, mc, fld.Val, scopes); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func (r *result) resolveExtensionName(name string, scopes []scope) (string, error) {
+ dsc := r.resolve(name, false, scopes)
+ if dsc == nil {
+ return "", fmt.Errorf("unknown extension %s", name)
+ }
+ if isSentinelDescriptor(dsc) {
+ return "", fmt.Errorf("unknown extension %s; resolved to %s which is not defined; consider using a leading dot", name, dsc.FullName())
+ }
+ if ext, ok := dsc.(protoreflect.FieldDescriptor); !ok {
+ return "", fmt.Errorf("invalid extension: %s is %s, not an extension", name, descriptorTypeWithArticle(dsc))
+ } else if !ext.IsExtension() {
+ return "", fmt.Errorf("invalid extension: %s is a field but not an extension", name)
+ }
+ return string("." + dsc.FullName()), nil
+}
+
+func (r *result) resolve(name string, onlyTypes bool, scopes []scope) protoreflect.Descriptor {
+ if strings.HasPrefix(name, ".") {
+ // already fully-qualified
+ return r.resolveElement(protoreflect.FullName(name[1:]))
+ }
+ // unqualified, so we look in the enclosing (last) scope first and move
+ // towards outermost (first) scope, trying to resolve the symbol
+ pos := strings.IndexByte(name, '.')
+ firstName := name
+ if pos > 0 {
+ firstName = name[:pos]
+ }
+ var bestGuess protoreflect.Descriptor
+ for i := len(scopes) - 1; i >= 0; i-- {
+ d := scopes[i](firstName, name)
+ if d != nil {
+ // In `protoc`, it will skip a match of the wrong type and move on
+ // to the next scope, but only if the reference is unqualified. So
+ // we mirror that behavior here. When we skip and move on, we go
+ // ahead and save the match of the wrong type so we can at least use
+ // it to construct a better error in the event that we don't find
+ // any match of the right type.
+ if !onlyTypes || isType(d) || firstName != name {
+ return d
+ }
+ if bestGuess == nil {
+ bestGuess = d
+ }
+ }
+ }
+ // we return best guess, even though it was not an allowed kind of
+ // descriptor, so caller can print a better error message (e.g.
+ // indicating that the name was found but that it's the wrong type)
+ return bestGuess
+}
+
+func isType(d protoreflect.Descriptor) bool {
+ switch d.(type) {
+ case protoreflect.MessageDescriptor, protoreflect.EnumDescriptor:
+ return true
+ }
+ return false
+}
+
+// scope represents a lexical scope in a proto file in which messages and enums
+// can be declared.
+type scope func(firstName, fullName string) protoreflect.Descriptor
+
+func fileScope(r *result) scope {
+ // we search symbols in this file, but also symbols in other files that have
+ // the same package as this file or a "parent" package (in protobuf,
+ // packages are a hierarchy like C++ namespaces)
+ prefixes := internal.CreatePrefixList(r.FileDescriptorProto().GetPackage())
+ querySymbol := func(n string) protoreflect.Descriptor {
+ return r.resolveElement(protoreflect.FullName(n))
+ }
+ return func(firstName, fullName string) protoreflect.Descriptor {
+ for _, prefix := range prefixes {
+ var n1, n string
+ if prefix == "" {
+ // exhausted all prefixes, so it must be in this one
+ n1, n = fullName, fullName
+ } else {
+ n = prefix + "." + fullName
+ n1 = prefix + "." + firstName
+ }
+ d := resolveElementRelative(n1, n, querySymbol)
+ if d != nil {
+ return d
+ }
+ }
+ return nil
+ }
+}
+
+func messageScope(r *result, messageName protoreflect.FullName) scope {
+ querySymbol := func(n string) protoreflect.Descriptor {
+ return resolveElementInFile(protoreflect.FullName(n), r)
+ }
+ return func(firstName, fullName string) protoreflect.Descriptor {
+ n1 := string(messageName) + "." + firstName
+ n := string(messageName) + "." + fullName
+ return resolveElementRelative(n1, n, querySymbol)
+ }
+}
+
+func resolveElementRelative(firstName, fullName string, query func(name string) protoreflect.Descriptor) protoreflect.Descriptor {
+ d := query(firstName)
+ if d == nil {
+ return nil
+ }
+ if firstName == fullName {
+ return d
+ }
+ if !isAggregateDescriptor(d) {
+ // can't possibly find the rest of full name if
+ // the first name indicated a leaf descriptor
+ return nil
+ }
+ d = query(fullName)
+ if d == nil {
+ return newSentinelDescriptor(fullName)
+ }
+ return d
+}
+
+func resolveElementInFile(name protoreflect.FullName, f File) protoreflect.Descriptor {
+ d := f.FindDescriptorByName(name)
+ if d != nil {
+ return d
+ }
+
+ if matchesPkgNamespace(name, f.Package()) {
+ // this sentinel means the name is a valid namespace but
+ // does not refer to a descriptor
+ return newSentinelDescriptor(string(name))
+ }
+ return nil
+}
+
+func matchesPkgNamespace(fqn, pkg protoreflect.FullName) bool {
+ if pkg == "" {
+ return false
+ }
+ if fqn == pkg {
+ return true
+ }
+ if len(pkg) > len(fqn) && strings.HasPrefix(string(pkg), string(fqn)) {
+ // if char after fqn is a dot, then fqn is a namespace
+ if pkg[len(fqn)] == '.' {
+ return true
+ }
+ }
+ return false
+}
+
+func isAggregateDescriptor(d protoreflect.Descriptor) bool {
+ if isSentinelDescriptor(d) {
+ // this indicates the name matched a package, not a
+ // descriptor, but a package is an aggregate, so
+ // we return true
+ return true
+ }
+ switch d.(type) {
+ case protoreflect.MessageDescriptor, protoreflect.EnumDescriptor, protoreflect.ServiceDescriptor:
+ return true
+ default:
+ return false
+ }
+}
+
+func isSentinelDescriptor(d protoreflect.Descriptor) bool {
+ _, ok := d.(*sentinelDescriptor)
+ return ok
+}
+
+func newSentinelDescriptor(name string) protoreflect.Descriptor {
+ return &sentinelDescriptor{name: name}
+}
+
+// sentinelDescriptor is a placeholder descriptor. It is used instead of nil to
+// distinguish between two situations:
+// 1. The given name could not be found.
+// 2. The given name *cannot* be a valid result so stop searching.
+//
+// In these cases, attempts to resolve an element name will return nil for the
+// first case and will return a sentinelDescriptor in the second. The sentinel
+// contains the fully-qualified name which caused the search to stop (which may
+// be a prefix of the actual name being resolved).
+type sentinelDescriptor struct {
+ protoreflect.Descriptor
+ name string
+}
+
+func (p *sentinelDescriptor) ParentFile() protoreflect.FileDescriptor {
+ return nil
+}
+
+func (p *sentinelDescriptor) Parent() protoreflect.Descriptor {
+ return nil
+}
+
+func (p *sentinelDescriptor) Index() int {
+ return 0
+}
+
+func (p *sentinelDescriptor) Syntax() protoreflect.Syntax {
+ return 0
+}
+
+func (p *sentinelDescriptor) Name() protoreflect.Name {
+ return protoreflect.Name(p.name)
+}
+
+func (p *sentinelDescriptor) FullName() protoreflect.FullName {
+ return protoreflect.FullName(p.name)
+}
+
+func (p *sentinelDescriptor) IsPlaceholder() bool {
+ return false
+}
+
+func (p *sentinelDescriptor) Options() protoreflect.ProtoMessage {
+ return nil
+}
+
+var _ protoreflect.Descriptor = (*sentinelDescriptor)(nil)
diff --git a/vendor/github.com/bufbuild/protocompile/linker/symbols.go b/vendor/github.com/bufbuild/protocompile/linker/symbols.go
new file mode 100644
index 000000000..d8b8bc375
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/linker/symbols.go
@@ -0,0 +1,557 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 linker
+
+import (
+ "strings"
+ "sync"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/internal"
+ "github.com/bufbuild/protocompile/reporter"
+ "github.com/bufbuild/protocompile/walk"
+)
+
+// Symbols is a symbol table that maps names for all program elements to their
+// location in source. It also tracks extension tag numbers. This can be used
+// to enforce uniqueness for symbol names and tag numbers across many files and
+// many link operations.
+//
+// This type is thread-safe.
+type Symbols struct {
+ pkgTrie packageSymbols
+}
+
+type packageSymbols struct {
+ mu sync.RWMutex
+ children map[protoreflect.FullName]*packageSymbols
+ files map[protoreflect.FileDescriptor]struct{}
+ symbols map[protoreflect.FullName]symbolEntry
+ exts map[extNumber]ast.SourcePos
+}
+
+type extNumber struct {
+ extendee protoreflect.FullName
+ tag protoreflect.FieldNumber
+}
+
+type symbolEntry struct {
+ pos ast.SourcePos
+ isEnumValue bool
+ isPackage bool
+}
+
+// Import populates the symbol table with all symbols/elements and extension
+// tags present in the given file descriptor. If s is nil or if fd has already
+// been imported into s, this returns immediately without doing anything. If any
+// collisions in symbol names or extension tags are identified, an error will be
+// returned and the symbol table will not be updated.
+func (s *Symbols) Import(fd protoreflect.FileDescriptor, handler *reporter.Handler) error {
+ if s == nil {
+ return nil
+ }
+
+ if f, ok := fd.(file); ok {
+ // unwrap any file instance
+ fd = f.FileDescriptor
+ }
+
+ var pkgPos ast.SourcePos
+ if res, ok := fd.(*result); ok {
+ pkgPos = packageNameStart(res)
+ } else {
+ pkgPos = sourcePositionForPackage(fd)
+ }
+ pkg, err := s.importPackages(pkgPos, fd.Package(), handler)
+ if err != nil || pkg == nil {
+ return err
+ }
+
+ pkg.mu.RLock()
+ _, alreadyImported := pkg.files[fd]
+ pkg.mu.RUnlock()
+
+ if alreadyImported {
+ return nil
+ }
+
+ for i := 0; i < fd.Imports().Len(); i++ {
+ if err := s.Import(fd.Imports().Get(i).FileDescriptor, handler); err != nil {
+ return err
+ }
+ }
+
+ if res, ok := fd.(*result); ok && res.hasSource() {
+ return s.importResultWithExtensions(pkg, res, handler)
+ }
+
+ return s.importFileWithExtensions(pkg, fd, handler)
+}
+
+func (s *Symbols) importFileWithExtensions(pkg *packageSymbols, fd protoreflect.FileDescriptor, handler *reporter.Handler) error {
+ imported, err := pkg.importFile(fd, handler)
+ if err != nil {
+ return err
+ }
+ if !imported {
+ // nothing else to do
+ return nil
+ }
+
+ return walk.Descriptors(fd, func(d protoreflect.Descriptor) error {
+ fld, ok := d.(protoreflect.FieldDescriptor)
+ if !ok || !fld.IsExtension() {
+ return nil
+ }
+ pos := sourcePositionForNumber(fld)
+ extendee := fld.ContainingMessage()
+ if err := s.AddExtension(extendee.ParentFile().Package(), extendee.FullName(), fld.Number(), pos, handler); err != nil {
+ return err
+ }
+ return nil
+ })
+}
+
+func (s *packageSymbols) importFile(fd protoreflect.FileDescriptor, handler *reporter.Handler) (bool, error) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ if _, ok := s.files[fd]; ok {
+ // have to double-check if it's already imported, in case
+ // it was added after above read-locked check
+ return false, nil
+ }
+
+ // first pass: check for conflicts
+ if err := s.checkFileLocked(fd, handler); err != nil {
+ return false, err
+ }
+ if err := handler.Error(); err != nil {
+ return false, err
+ }
+
+ // second pass: commit all symbols
+ s.commitFileLocked(fd)
+
+ return true, nil
+}
+
+func (s *Symbols) importPackages(pkgPos ast.SourcePos, pkg protoreflect.FullName, handler *reporter.Handler) (*packageSymbols, error) {
+ if pkg == "" {
+ return &s.pkgTrie, nil
+ }
+
+ parts := strings.Split(string(pkg), ".")
+ for i := 1; i < len(parts); i++ {
+ parts[i] = parts[i-1] + "." + parts[i]
+ }
+
+ cur := &s.pkgTrie
+ for _, p := range parts {
+ var err error
+ cur, err = cur.importPackage(pkgPos, protoreflect.FullName(p), handler)
+ if err != nil {
+ return nil, err
+ }
+ if cur == nil {
+ return nil, nil
+ }
+ }
+
+ return cur, nil
+}
+
+func (s *packageSymbols) importPackage(pkgPos ast.SourcePos, pkg protoreflect.FullName, handler *reporter.Handler) (*packageSymbols, error) {
+ s.mu.RLock()
+ existing, ok := s.symbols[pkg]
+ var child *packageSymbols
+ if ok && existing.isPackage {
+ child = s.children[pkg]
+ }
+ s.mu.RUnlock()
+
+ if ok && existing.isPackage {
+ // package already exists
+ return child, nil
+ } else if ok {
+ return nil, reportSymbolCollision(pkgPos, pkg, false, existing, handler)
+ }
+
+ s.mu.Lock()
+ defer s.mu.Unlock()
+ // have to double-check in case it was added while upgrading to write lock
+ existing, ok = s.symbols[pkg]
+ if ok && existing.isPackage {
+ // package already exists
+ return s.children[pkg], nil
+ } else if ok {
+ return nil, reportSymbolCollision(pkgPos, pkg, false, existing, handler)
+ }
+ if s.symbols == nil {
+ s.symbols = map[protoreflect.FullName]symbolEntry{}
+ }
+ s.symbols[pkg] = symbolEntry{pos: pkgPos, isPackage: true}
+ child = &packageSymbols{}
+ if s.children == nil {
+ s.children = map[protoreflect.FullName]*packageSymbols{}
+ }
+ s.children[pkg] = child
+ return child, nil
+}
+
+func (s *Symbols) getPackage(pkg protoreflect.FullName) *packageSymbols {
+ if pkg == "" {
+ return &s.pkgTrie
+ }
+
+ parts := strings.Split(string(pkg), ".")
+ for i := 1; i < len(parts); i++ {
+ parts[i] = parts[i-1] + "." + parts[i]
+ }
+
+ cur := &s.pkgTrie
+ for _, p := range parts {
+ cur.mu.RLock()
+ next := cur.children[protoreflect.FullName(p)]
+ cur.mu.RUnlock()
+
+ if next == nil {
+ return nil
+ }
+ cur = next
+ }
+
+ return cur
+}
+
+func reportSymbolCollision(pos ast.SourcePos, fqn protoreflect.FullName, additionIsEnumVal bool, existing symbolEntry, handler *reporter.Handler) error {
+ // because of weird scoping for enum values, provide more context in error message
+ // if this conflict is with an enum value
+ var isPkg, suffix string
+ if additionIsEnumVal || existing.isEnumValue {
+ suffix = "; protobuf uses C++ scoping rules for enum values, so they exist in the scope enclosing the enum"
+ }
+ if existing.isPackage {
+ isPkg = " as a package"
+ }
+ orig := existing.pos
+ conflict := pos
+ if posLess(conflict, orig) {
+ orig, conflict = conflict, orig
+ }
+ return handler.HandleErrorf(conflict, "symbol %q already defined%s at %v%s", fqn, isPkg, orig, suffix)
+}
+
+func posLess(a, b ast.SourcePos) bool {
+ if a.Filename == b.Filename {
+ if a.Line == b.Line {
+ return a.Col < b.Col
+ }
+ return a.Line < b.Line
+ }
+ return false
+}
+
+func (s *packageSymbols) checkFileLocked(f protoreflect.FileDescriptor, handler *reporter.Handler) error {
+ return walk.Descriptors(f, func(d protoreflect.Descriptor) error {
+ pos := sourcePositionFor(d)
+ if existing, ok := s.symbols[d.FullName()]; ok {
+ _, isEnumVal := d.(protoreflect.EnumValueDescriptor)
+ if err := reportSymbolCollision(pos, d.FullName(), isEnumVal, existing, handler); err != nil {
+ return err
+ }
+ }
+ return nil
+ })
+}
+
+func sourcePositionForPackage(fd protoreflect.FileDescriptor) ast.SourcePos {
+ loc := fd.SourceLocations().ByPath([]int32{internal.FilePackageTag})
+ if isZeroLoc(loc) {
+ return ast.UnknownPos(fd.Path())
+ }
+ return ast.SourcePos{
+ Filename: fd.Path(),
+ Line: loc.StartLine,
+ Col: loc.StartColumn,
+ }
+}
+
+func sourcePositionFor(d protoreflect.Descriptor) ast.SourcePos {
+ path, ok := computePath(d)
+ if !ok {
+ return ast.UnknownPos(d.ParentFile().Path())
+ }
+ namePath := path
+ switch d.(type) {
+ case protoreflect.FieldDescriptor:
+ namePath = append(namePath, internal.FieldNameTag)
+ case protoreflect.MessageDescriptor:
+ namePath = append(namePath, internal.MessageNameTag)
+ case protoreflect.OneofDescriptor:
+ namePath = append(namePath, internal.OneOfNameTag)
+ case protoreflect.EnumDescriptor:
+ namePath = append(namePath, internal.EnumNameTag)
+ case protoreflect.EnumValueDescriptor:
+ namePath = append(namePath, internal.EnumValNameTag)
+ case protoreflect.ServiceDescriptor:
+ namePath = append(namePath, internal.ServiceNameTag)
+ case protoreflect.MethodDescriptor:
+ namePath = append(namePath, internal.MethodNameTag)
+ default:
+ // NB: shouldn't really happen, but just in case fall back to path to
+ // descriptor, sans name field
+ }
+ loc := d.ParentFile().SourceLocations().ByPath(namePath)
+ if isZeroLoc(loc) {
+ loc = d.ParentFile().SourceLocations().ByPath(path)
+ if isZeroLoc(loc) {
+ return ast.UnknownPos(d.ParentFile().Path())
+ }
+ }
+ return ast.SourcePos{
+ Filename: d.ParentFile().Path(),
+ Line: loc.StartLine,
+ Col: loc.StartColumn,
+ }
+}
+
+func sourcePositionForNumber(fd protoreflect.FieldDescriptor) ast.SourcePos {
+ path, ok := computePath(fd)
+ if !ok {
+ return ast.UnknownPos(fd.ParentFile().Path())
+ }
+ numberPath := path
+ numberPath = append(numberPath, internal.FieldNumberTag)
+ loc := fd.ParentFile().SourceLocations().ByPath(numberPath)
+ if isZeroLoc(loc) {
+ loc = fd.ParentFile().SourceLocations().ByPath(path)
+ if isZeroLoc(loc) {
+ return ast.UnknownPos(fd.ParentFile().Path())
+ }
+ }
+ return ast.SourcePos{
+ Filename: fd.ParentFile().Path(),
+ Line: loc.StartLine,
+ Col: loc.StartColumn,
+ }
+}
+
+func isZeroLoc(loc protoreflect.SourceLocation) bool {
+ return loc.Path == nil &&
+ loc.StartLine == 0 &&
+ loc.StartColumn == 0 &&
+ loc.EndLine == 0 &&
+ loc.EndColumn == 0
+}
+
+func (s *packageSymbols) commitFileLocked(f protoreflect.FileDescriptor) {
+ if s.symbols == nil {
+ s.symbols = map[protoreflect.FullName]symbolEntry{}
+ }
+ if s.exts == nil {
+ s.exts = map[extNumber]ast.SourcePos{}
+ }
+ _ = walk.Descriptors(f, func(d protoreflect.Descriptor) error {
+ pos := sourcePositionFor(d)
+ name := d.FullName()
+ _, isEnumValue := d.(protoreflect.EnumValueDescriptor)
+ s.symbols[name] = symbolEntry{pos: pos, isEnumValue: isEnumValue}
+ return nil
+ })
+
+ if s.files == nil {
+ s.files = map[protoreflect.FileDescriptor]struct{}{}
+ }
+ s.files[f] = struct{}{}
+}
+
+func (s *Symbols) importResultWithExtensions(pkg *packageSymbols, r *result, handler *reporter.Handler) error {
+ imported, err := pkg.importResult(r, handler)
+ if err != nil {
+ return err
+ }
+ if !imported {
+ // nothing else to do
+ return nil
+ }
+
+ return walk.Descriptors(r, func(d protoreflect.Descriptor) error {
+ fd, ok := d.(*extTypeDescriptor)
+ if !ok {
+ return nil
+ }
+ file := r.FileNode()
+ node := r.FieldNode(fd.FieldDescriptorProto())
+ pos := file.NodeInfo(node.FieldTag()).Start()
+ extendee := fd.ContainingMessage()
+ if err := s.AddExtension(extendee.ParentFile().Package(), extendee.FullName(), fd.Number(), pos, handler); err != nil {
+ return err
+ }
+
+ return nil
+ })
+}
+
+func (s *Symbols) importResult(r *result, handler *reporter.Handler) error {
+ pkg, err := s.importPackages(packageNameStart(r), r.Package(), handler)
+ if err != nil || pkg == nil {
+ return err
+ }
+ _, err = pkg.importResult(r, handler)
+ return err
+}
+
+func (s *packageSymbols) importResult(r *result, handler *reporter.Handler) (bool, error) {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ if _, ok := s.files[r]; ok {
+ // already imported
+ return false, nil
+ }
+
+ // first pass: check for conflicts
+ if err := s.checkResultLocked(r, handler); err != nil {
+ return false, err
+ }
+ if err := handler.Error(); err != nil {
+ return false, err
+ }
+
+ // second pass: commit all symbols
+ s.commitResultLocked(r)
+
+ return true, nil
+}
+
+func (s *packageSymbols) checkResultLocked(r *result, handler *reporter.Handler) error {
+ resultSyms := map[protoreflect.FullName]symbolEntry{}
+ return walk.DescriptorProtos(r.FileDescriptorProto(), func(fqn protoreflect.FullName, d proto.Message) error {
+ _, isEnumVal := d.(*descriptorpb.EnumValueDescriptorProto)
+ file := r.FileNode()
+ node := r.Node(d)
+ pos := nameStart(file, node)
+ // check symbols already in this symbol table
+ if existing, ok := s.symbols[fqn]; ok {
+ if err := reportSymbolCollision(pos, fqn, isEnumVal, existing, handler); err != nil {
+ return err
+ }
+ }
+
+ // also check symbols from this result (that are not yet in symbol table)
+ if existing, ok := resultSyms[fqn]; ok {
+ if err := reportSymbolCollision(pos, fqn, isEnumVal, existing, handler); err != nil {
+ return err
+ }
+ }
+ resultSyms[fqn] = symbolEntry{
+ pos: pos,
+ isEnumValue: isEnumVal,
+ }
+
+ return nil
+ })
+}
+
+func packageNameStart(r *result) ast.SourcePos {
+ if node, ok := r.FileNode().(*ast.FileNode); ok {
+ for _, decl := range node.Decls {
+ if pkgNode, ok := decl.(*ast.PackageNode); ok {
+ return r.FileNode().NodeInfo(pkgNode.Name).Start()
+ }
+ }
+ }
+ return ast.UnknownPos(r.Path())
+}
+
+func nameStart(file ast.FileDeclNode, n ast.Node) ast.SourcePos {
+ // TODO: maybe ast package needs a NamedNode interface to simplify this?
+ switch n := n.(type) {
+ case ast.FieldDeclNode:
+ return file.NodeInfo(n.FieldName()).Start()
+ case ast.MessageDeclNode:
+ return file.NodeInfo(n.MessageName()).Start()
+ case ast.OneOfDeclNode:
+ return file.NodeInfo(n.OneOfName()).Start()
+ case ast.EnumValueDeclNode:
+ return file.NodeInfo(n.GetName()).Start()
+ case *ast.EnumNode:
+ return file.NodeInfo(n.Name).Start()
+ case *ast.ServiceNode:
+ return file.NodeInfo(n.Name).Start()
+ case ast.RPCDeclNode:
+ return file.NodeInfo(n.GetName()).Start()
+ default:
+ return file.NodeInfo(n).Start()
+ }
+}
+
+func (s *packageSymbols) commitResultLocked(r *result) {
+ if s.symbols == nil {
+ s.symbols = map[protoreflect.FullName]symbolEntry{}
+ }
+ if s.exts == nil {
+ s.exts = map[extNumber]ast.SourcePos{}
+ }
+ _ = walk.DescriptorProtos(r.FileDescriptorProto(), func(fqn protoreflect.FullName, d proto.Message) error {
+ pos := nameStart(r.FileNode(), r.Node(d))
+ _, isEnumValue := d.(protoreflect.EnumValueDescriptor)
+ s.symbols[fqn] = symbolEntry{pos: pos, isEnumValue: isEnumValue}
+ return nil
+ })
+
+ if s.files == nil {
+ s.files = map[protoreflect.FileDescriptor]struct{}{}
+ }
+ s.files[r] = struct{}{}
+}
+
+func (s *Symbols) AddExtension(pkg, extendee protoreflect.FullName, tag protoreflect.FieldNumber, pos ast.SourcePos, handler *reporter.Handler) error {
+ if pkg != "" {
+ if !strings.HasPrefix(string(extendee), string(pkg)+".") {
+ return handler.HandleErrorf(pos, "could not register extension: extendee %q does not match package %q", extendee, pkg)
+ }
+ }
+ pkgSyms := s.getPackage(pkg)
+ if pkgSyms == nil {
+ // should never happen
+ return handler.HandleErrorf(pos, "could not register extension: missing package symbols for %q", pkg)
+ }
+ return pkgSyms.addExtension(extendee, tag, pos, handler)
+}
+
+func (s *packageSymbols) addExtension(extendee protoreflect.FullName, tag protoreflect.FieldNumber, pos ast.SourcePos, handler *reporter.Handler) error {
+ s.mu.Lock()
+ defer s.mu.Unlock()
+
+ if s.exts == nil {
+ s.exts = map[extNumber]ast.SourcePos{}
+ }
+
+ extNum := extNumber{extendee: extendee, tag: tag}
+ if existing, ok := s.exts[extNum]; ok {
+ if err := handler.HandleErrorf(pos, "extension with tag %d for message %s already defined at %v", tag, extendee, existing); err != nil {
+ return err
+ }
+ } else {
+ s.exts[extNum] = pos
+ }
+ return nil
+}
diff --git a/vendor/github.com/bufbuild/protocompile/linker/validate.go b/vendor/github.com/bufbuild/protocompile/linker/validate.go
new file mode 100644
index 000000000..7bc18bc9a
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/linker/validate.go
@@ -0,0 +1,290 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 linker
+
+import (
+ "fmt"
+ "strings"
+ "unicode"
+ "unicode/utf8"
+
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/internal"
+ "github.com/bufbuild/protocompile/reporter"
+)
+
+// ValidateOptions runs some validation checks on the result that can only
+// be done after options are interpreted.
+func (r *result) ValidateOptions(handler *reporter.Handler) error {
+ if err := r.validateExtensions(r, handler); err != nil {
+ return err
+ }
+ return r.validateJSONNamesInFile(handler)
+}
+
+func (r *result) validateExtensions(d hasExtensionsAndMessages, handler *reporter.Handler) error {
+ for i := 0; i < d.Extensions().Len(); i++ {
+ if err := r.validateExtension(d.Extensions().Get(i), handler); err != nil {
+ return err
+ }
+ }
+ for i := 0; i < d.Messages().Len(); i++ {
+ if err := r.validateExtensions(d.Messages().Get(i), handler); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (r *result) validateExtension(fld protoreflect.FieldDescriptor, handler *reporter.Handler) error {
+ // NB: It's a little gross that we don't enforce these in validateBasic().
+ // But it requires linking to resolve the extendee, so we can interrogate
+ // its descriptor.
+ if xtd, ok := fld.(protoreflect.ExtensionTypeDescriptor); ok {
+ fld = xtd.Descriptor()
+ }
+ fd := fld.(*fldDescriptor) //nolint:errcheck
+ if fld.ContainingMessage().Options().(*descriptorpb.MessageOptions).GetMessageSetWireFormat() {
+ // Message set wire format requires that all extensions be messages
+ // themselves (no scalar extensions)
+ if fld.Kind() != protoreflect.MessageKind {
+ file := r.FileNode()
+ pos := file.NodeInfo(r.FieldNode(fd.proto).FieldType()).Start()
+ return handler.HandleErrorf(pos, "messages with message-set wire format cannot contain scalar extensions, only messages")
+ }
+ if fld.Cardinality() == protoreflect.Repeated {
+ file := r.FileNode()
+ pos := file.NodeInfo(r.FieldNode(fd.proto).FieldLabel()).Start()
+ return handler.HandleErrorf(pos, "messages with message-set wire format cannot contain repeated extensions, only optional")
+ }
+ } else if fld.Number() > internal.MaxNormalTag {
+ // In validateBasic() we just made sure these were within bounds for any message. But
+ // now that things are linked, we can check if the extendee is messageset wire format
+ // and, if not, enforce tighter limit.
+ file := r.FileNode()
+ pos := file.NodeInfo(r.FieldNode(fd.proto).FieldTag()).Start()
+ return handler.HandleErrorf(pos, "tag number %d is higher than max allowed tag number (%d)", fld.Number(), internal.MaxNormalTag)
+ }
+
+ return nil
+}
+
+func (r *result) validateJSONNamesInFile(handler *reporter.Handler) error {
+ for _, md := range r.FileDescriptorProto().GetMessageType() {
+ if err := r.validateJSONNamesInMessage(md, handler); err != nil {
+ return err
+ }
+ }
+ for _, ed := range r.FileDescriptorProto().GetEnumType() {
+ if err := r.validateJSONNamesInEnum(ed, handler); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (r *result) validateJSONNamesInMessage(md *descriptorpb.DescriptorProto, handler *reporter.Handler) error {
+ if err := r.validateFieldJSONNames(md, false, handler); err != nil {
+ return err
+ }
+ if err := r.validateFieldJSONNames(md, true, handler); err != nil {
+ return err
+ }
+
+ for _, nmd := range md.GetNestedType() {
+ if err := r.validateJSONNamesInMessage(nmd, handler); err != nil {
+ return err
+ }
+ }
+ for _, ed := range md.GetEnumType() {
+ if err := r.validateJSONNamesInEnum(ed, handler); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (r *result) validateJSONNamesInEnum(ed *descriptorpb.EnumDescriptorProto, handler *reporter.Handler) error {
+ seen := map[string]*descriptorpb.EnumValueDescriptorProto{}
+ for _, evd := range ed.GetValue() {
+ scope := "enum value " + ed.GetName() + "." + evd.GetName()
+
+ name := canonicalEnumValueName(evd.GetName(), ed.GetName())
+ if existing, ok := seen[name]; ok && evd.GetNumber() != existing.GetNumber() {
+ fldNode := r.EnumValueNode(evd)
+ existingNode := r.EnumValueNode(existing)
+ conflictErr := fmt.Errorf("%s: camel-case name (with optional enum name prefix removed) %q conflicts with camel-case name of enum value %s, defined at %v",
+ scope, name, existing.GetName(), r.FileNode().NodeInfo(existingNode).Start())
+
+ // Since proto2 did not originally have a JSON format, we report conflicts as just warnings
+ if r.Syntax() != protoreflect.Proto3 {
+ handler.HandleWarningWithPos(r.FileNode().NodeInfo(fldNode).Start(), conflictErr)
+ } else if err := handler.HandleErrorf(r.FileNode().NodeInfo(fldNode).Start(), conflictErr.Error()); err != nil {
+ return err
+ }
+ } else {
+ seen[name] = evd
+ }
+ }
+ return nil
+}
+
+func (r *result) validateFieldJSONNames(md *descriptorpb.DescriptorProto, useCustom bool, handler *reporter.Handler) error {
+ type jsonName struct {
+ source *descriptorpb.FieldDescriptorProto
+ // field's original JSON nane (which can differ in case from map key)
+ orig string
+ // true if orig is a custom JSON name (vs. the field's default JSON name)
+ custom bool
+ }
+ seen := map[string]jsonName{}
+
+ for _, fd := range md.GetField() {
+ scope := "field " + md.GetName() + "." + fd.GetName()
+ defaultName := internal.JSONName(fd.GetName())
+ name := defaultName
+ custom := false
+ if useCustom {
+ n := fd.GetJsonName()
+ if n != defaultName || r.hasCustomJSONName(fd) {
+ name = n
+ custom = true
+ }
+ }
+ lcaseName := strings.ToLower(name)
+ if existing, ok := seen[lcaseName]; ok {
+ // When useCustom is true, we'll only report an issue when a conflict is
+ // due to a custom name. That way, we don't double report conflicts on
+ // non-custom names.
+ if !useCustom || custom || existing.custom {
+ fldNode := r.FieldNode(fd)
+ customStr, srcCustomStr := "custom", "custom"
+ if !custom {
+ customStr = "default"
+ }
+ if !existing.custom {
+ srcCustomStr = "default"
+ }
+ otherName := ""
+ if name != existing.orig {
+ otherName = fmt.Sprintf(" %q", existing.orig)
+ }
+ pos := r.FileNode().NodeInfo(fldNode).Start()
+ conflictErr := reporter.Errorf(pos, "%s: %s JSON name %q conflicts with %s JSON name%s of field %s, defined at %v",
+ scope, customStr, name, srcCustomStr, otherName, existing.source.GetName(), r.FileNode().NodeInfo(r.FieldNode(existing.source)).Start())
+
+ // Since proto2 did not originally have default JSON names, we report conflicts involving
+ // default names as just warnings.
+ if r.Syntax() != protoreflect.Proto3 && (!custom || !existing.custom) {
+ handler.HandleWarning(conflictErr)
+ } else if err := handler.HandleError(conflictErr); err != nil {
+ return err
+ }
+ }
+ } else {
+ seen[lcaseName] = jsonName{source: fd, orig: name, custom: custom}
+ }
+ }
+ return nil
+}
+
+func (r *result) hasCustomJSONName(fdProto *descriptorpb.FieldDescriptorProto) bool {
+ // if we have the AST, we can more precisely determine if there was a custom
+ // JSON named defined, even if it is explicitly configured to tbe the same
+ // as the default JSON name for the field.
+ opts := r.FieldNode(fdProto).GetOptions()
+ if opts == nil {
+ return false
+ }
+ for _, opt := range opts.Options {
+ if len(opt.Name.Parts) == 1 &&
+ opt.Name.Parts[0].Name.AsIdentifier() == "json_name" &&
+ !opt.Name.Parts[0].IsExtension() {
+ return true
+ }
+ }
+ return false
+}
+
+func canonicalEnumValueName(enumValueName, enumName string) string {
+ return enumValCamelCase(removePrefix(enumValueName, enumName))
+}
+
+// removePrefix is used to remove the given prefix from the given str. It does not require
+// an exact match and ignores case and underscores. If the all non-underscore characters
+// would be removed from str, str is returned unchanged. If str does not have the given
+// prefix (even with the very lenient matching, in regard to case and underscores), then
+// str is returned unchanged.
+//
+// The algorithm is adapted from the protoc source:
+//
+// https://github.com/protocolbuffers/protobuf/blob/v21.3/src/google/protobuf/descriptor.cc#L922
+func removePrefix(str, prefix string) string {
+ j := 0
+ for i, r := range str {
+ if r == '_' {
+ // skip underscores in the input
+ continue
+ }
+
+ p, sz := utf8.DecodeRuneInString(prefix[j:])
+ for p == '_' {
+ j += sz // consume/skip underscore
+ p, sz = utf8.DecodeRuneInString(prefix[j:])
+ }
+
+ if j == len(prefix) {
+ // matched entire prefix; return rest of str
+ // but skipping any leading underscores
+ result := strings.TrimLeft(str[i:], "_")
+ if len(result) == 0 {
+ // result can't be empty string
+ return str
+ }
+ return result
+ }
+ if unicode.ToLower(r) != unicode.ToLower(p) {
+ // does not match prefix
+ return str
+ }
+ j += sz // consume matched rune of prefix
+ }
+ return str
+}
+
+// enumValCamelCase converts the given string to upper-camel-case.
+//
+// The algorithm is adapted from the protoc source:
+//
+// https://github.com/protocolbuffers/protobuf/blob/v21.3/src/google/protobuf/descriptor.cc#L887
+func enumValCamelCase(name string) string {
+ var js []rune
+ nextUpper := true
+ for _, r := range name {
+ if r == '_' {
+ nextUpper = true
+ continue
+ }
+ if nextUpper {
+ nextUpper = false
+ js = append(js, unicode.ToUpper(r))
+ } else {
+ js = append(js, unicode.ToLower(r))
+ }
+ }
+ return string(js)
+}
diff --git a/vendor/github.com/bufbuild/protocompile/options/options.go b/vendor/github.com/bufbuild/protocompile/options/options.go
new file mode 100644
index 000000000..5f6ef7b35
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/options/options.go
@@ -0,0 +1,1521 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 options contains the logic for interpreting options. The parse step
+// of compilation stores the options in uninterpreted form, which contains raw
+// identifiers and literal values.
+//
+// The process of interpreting an option is to resolve identifiers, by examining
+// descriptors for the google.protobuf.*Options types and their available
+// extensions (custom options). As field names are resolved, the values can be
+// type-checked against the types indicated in field descriptors.
+//
+// On success, the various fields and extensions of the options message are
+// populated and the field holding the uninterpreted form is cleared.
+package options
+
+import (
+ "bytes"
+ "fmt"
+ "math"
+ "sort"
+ "strings"
+
+ "google.golang.org/protobuf/encoding/protowire"
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+ "google.golang.org/protobuf/types/dynamicpb"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/internal"
+ "github.com/bufbuild/protocompile/linker"
+ "github.com/bufbuild/protocompile/parser"
+ "github.com/bufbuild/protocompile/reporter"
+)
+
+// Index is a mapping of AST nodes that define options to a corresponding path
+// into the containing file descriptor. The path is a sequence of field tags
+// and indexes that define a traversal path from the root (the file descriptor)
+// to the resolved option field.
+type Index map[*ast.OptionNode][]int32
+
+type interpreter struct {
+ file file
+ resolver linker.Resolver
+ container optionsContainer
+ lenient bool
+ reporter *reporter.Handler
+ index Index
+}
+
+type file interface {
+ parser.Result
+ ResolveEnumType(protoreflect.FullName) protoreflect.EnumDescriptor
+ ResolveMessageType(protoreflect.FullName) protoreflect.MessageDescriptor
+ ResolveExtension(protoreflect.FullName) protoreflect.ExtensionTypeDescriptor
+ ResolveMessageLiteralExtensionName(ast.IdentValueNode) string
+}
+
+type noResolveFile struct {
+ parser.Result
+}
+
+func (n noResolveFile) ResolveEnumType(name protoreflect.FullName) protoreflect.EnumDescriptor {
+ return nil
+}
+
+func (n noResolveFile) ResolveMessageType(name protoreflect.FullName) protoreflect.MessageDescriptor {
+ return nil
+}
+
+func (n noResolveFile) ResolveExtension(name protoreflect.FullName) protoreflect.ExtensionTypeDescriptor {
+ return nil
+}
+
+func (n noResolveFile) ResolveMessageLiteralExtensionName(ast.IdentValueNode) string {
+ return ""
+}
+
+// InterpretOptions interprets options in the given linked result, returning
+// an index that can be used to generate source code info. This step mutates
+// the linked result's underlying proto to move option elements out of the
+// "uninterpreted_option" fields and into proper option fields and extensions.
+//
+// The given handler is used to report errors and warnings. If any errors are
+// reported, this function returns a non-nil error.
+func InterpretOptions(linked linker.Result, handler *reporter.Handler) (Index, error) {
+ return interpretOptions(false, linked, handler)
+}
+
+// InterpretOptionsLenient interprets options in a lenient/best-effort way in
+// the given linked result, returning an index that can be used to generate
+// source code info. This step mutates the linked result's underlying proto to
+// move option elements out of the "uninterpreted_option" fields and into proper
+// option fields and extensions.
+//
+// In lenient more, errors resolving option names and type errors are ignored.
+// Any options that are uninterpretable (due to such errors) will remain in the
+// "uninterpreted_option" fields.
+func InterpretOptionsLenient(linked linker.Result) (Index, error) {
+ return interpretOptions(true, linked, reporter.NewHandler(nil))
+}
+
+// InterpretUnlinkedOptions does a best-effort attempt to interpret options in
+// the given parsed result, returning an index that can be used to generate
+// source code info. This step mutates the parsed result's underlying proto to
+// move option elements out of the "uninterpreted_option" fields and into proper
+// option fields and extensions.
+//
+// This is the same as InterpretOptionsLenient except that it accepts an
+// unlinked result. Because the file is unlinked, custom options cannot be
+// interpreted. Other errors resolving option names or type errors will be
+// effectively ignored. Any options that are uninterpretable (due to such
+// errors) will remain in the "uninterpreted_option" fields.
+func InterpretUnlinkedOptions(parsed parser.Result) (Index, error) {
+ return interpretOptions(true, noResolveFile{parsed}, reporter.NewHandler(nil))
+}
+
+func interpretOptions(lenient bool, file file, handler *reporter.Handler) (Index, error) {
+ interp := interpreter{
+ file: file,
+ lenient: lenient,
+ reporter: handler,
+ index: Index{},
+ }
+ interp.container, _ = file.(optionsContainer)
+ if f, ok := file.(linker.File); ok {
+ interp.resolver = linker.ResolverFromFile(f)
+ }
+
+ fd := file.FileDescriptorProto()
+ prefix := fd.GetPackage()
+ if prefix != "" {
+ prefix += "."
+ }
+ opts := fd.GetOptions()
+ if opts != nil {
+ if len(opts.UninterpretedOption) > 0 {
+ remain, err := interp.interpretOptions(fd.GetName(), fd, opts, opts.UninterpretedOption)
+ if err != nil {
+ return nil, err
+ }
+ opts.UninterpretedOption = remain
+ }
+ }
+ for _, md := range fd.GetMessageType() {
+ fqn := prefix + md.GetName()
+ if err := interp.interpretMessageOptions(fqn, md); err != nil {
+ return nil, err
+ }
+ }
+ for _, fld := range fd.GetExtension() {
+ fqn := prefix + fld.GetName()
+ if err := interp.interpretFieldOptions(fqn, fld); err != nil {
+ return nil, err
+ }
+ }
+ for _, ed := range fd.GetEnumType() {
+ fqn := prefix + ed.GetName()
+ if err := interp.interpretEnumOptions(fqn, ed); err != nil {
+ return nil, err
+ }
+ }
+ for _, sd := range fd.GetService() {
+ fqn := prefix + sd.GetName()
+ opts := sd.GetOptions()
+ if len(opts.GetUninterpretedOption()) > 0 {
+ remain, err := interp.interpretOptions(fqn, sd, opts, opts.UninterpretedOption)
+ if err != nil {
+ return nil, err
+ }
+ opts.UninterpretedOption = remain
+ }
+ for _, mtd := range sd.GetMethod() {
+ mtdFqn := fqn + "." + mtd.GetName()
+ opts := mtd.GetOptions()
+ if len(opts.GetUninterpretedOption()) > 0 {
+ remain, err := interp.interpretOptions(mtdFqn, mtd, opts, opts.UninterpretedOption)
+ if err != nil {
+ return nil, err
+ }
+ opts.UninterpretedOption = remain
+ }
+ }
+ }
+ return interp.index, nil
+}
+
+func (interp *interpreter) nodeInfo(n ast.Node) ast.NodeInfo {
+ return interp.file.FileNode().NodeInfo(n)
+}
+
+func (interp *interpreter) interpretMessageOptions(fqn string, md *descriptorpb.DescriptorProto) error {
+ opts := md.GetOptions()
+ if opts != nil {
+ if len(opts.UninterpretedOption) > 0 {
+ remain, err := interp.interpretOptions(fqn, md, opts, opts.UninterpretedOption)
+ if err != nil {
+ return err
+ }
+ opts.UninterpretedOption = remain
+ }
+ }
+ for _, fld := range md.GetField() {
+ fldFqn := fqn + "." + fld.GetName()
+ if err := interp.interpretFieldOptions(fldFqn, fld); err != nil {
+ return err
+ }
+ }
+ for _, ood := range md.GetOneofDecl() {
+ oodFqn := fqn + "." + ood.GetName()
+ opts := ood.GetOptions()
+ if len(opts.GetUninterpretedOption()) > 0 {
+ remain, err := interp.interpretOptions(oodFqn, ood, opts, opts.UninterpretedOption)
+ if err != nil {
+ return err
+ }
+ opts.UninterpretedOption = remain
+ }
+ }
+ for _, fld := range md.GetExtension() {
+ fldFqn := fqn + "." + fld.GetName()
+ if err := interp.interpretFieldOptions(fldFqn, fld); err != nil {
+ return err
+ }
+ }
+ for _, er := range md.GetExtensionRange() {
+ erFqn := fmt.Sprintf("%s.%d-%d", fqn, er.GetStart(), er.GetEnd())
+ opts := er.GetOptions()
+ if len(opts.GetUninterpretedOption()) > 0 {
+ remain, err := interp.interpretOptions(erFqn, er, opts, opts.UninterpretedOption)
+ if err != nil {
+ return err
+ }
+ opts.UninterpretedOption = remain
+ }
+ }
+ for _, nmd := range md.GetNestedType() {
+ nmdFqn := fqn + "." + nmd.GetName()
+ if err := interp.interpretMessageOptions(nmdFqn, nmd); err != nil {
+ return err
+ }
+ }
+ for _, ed := range md.GetEnumType() {
+ edFqn := fqn + "." + ed.GetName()
+ if err := interp.interpretEnumOptions(edFqn, ed); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (interp *interpreter) interpretFieldOptions(fqn string, fld *descriptorpb.FieldDescriptorProto) error {
+ opts := fld.GetOptions()
+ if len(opts.GetUninterpretedOption()) == 0 {
+ return nil
+ }
+ uo := opts.UninterpretedOption
+ scope := fmt.Sprintf("field %s", fqn)
+
+ // process json_name pseudo-option
+ index, err := internal.FindOption(interp.file, interp.reporter, scope, uo, "json_name")
+ if err != nil && !interp.lenient {
+ return err
+ }
+ if index >= 0 {
+ opt := uo[index]
+ optNode := interp.file.OptionNode(opt)
+ if fld.GetExtendee() != "" {
+ return interp.reporter.HandleErrorf(interp.nodeInfo(optNode.GetName()).Start(), "%s: option json_name is not allowed on extensions", scope)
+ }
+ // attribute source code info
+ if on, ok := optNode.(*ast.OptionNode); ok {
+ interp.index[on] = []int32{-1, internal.FieldJSONNameTag}
+ }
+ uo = internal.RemoveOption(uo, index)
+ if opt.StringValue == nil {
+ return interp.reporter.HandleErrorf(interp.nodeInfo(optNode.GetValue()).Start(), "%s: expecting string value for json_name option", scope)
+ }
+ fld.JsonName = proto.String(string(opt.StringValue))
+ }
+
+ // and process default pseudo-option
+ if index, err := interp.processDefaultOption(scope, fqn, fld, uo); err != nil && !interp.lenient {
+ return err
+ } else if index >= 0 {
+ // attribute source code info
+ optNode := interp.file.OptionNode(uo[index])
+ if on, ok := optNode.(*ast.OptionNode); ok {
+ interp.index[on] = []int32{-1, internal.FieldDefaultTag}
+ }
+ uo = internal.RemoveOption(uo, index)
+ }
+
+ if len(uo) == 0 {
+ // no real options, only pseudo-options above? clear out options
+ fld.Options = nil
+ } else if remain, err := interp.interpretOptions(fqn, fld, opts, uo); err != nil {
+ return err
+ } else {
+ opts.UninterpretedOption = remain
+ }
+ return nil
+}
+
+func (interp *interpreter) processDefaultOption(scope string, fqn string, fld *descriptorpb.FieldDescriptorProto, uos []*descriptorpb.UninterpretedOption) (defaultIndex int, err error) {
+ found, err := internal.FindOption(interp.file, interp.reporter, scope, uos, "default")
+ if err != nil || found == -1 {
+ return -1, err
+ }
+ opt := uos[found]
+ optNode := interp.file.OptionNode(opt)
+ if fld.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REPEATED {
+ return -1, interp.reporter.HandleErrorf(interp.nodeInfo(optNode.GetName()).Start(), "%s: default value cannot be set because field is repeated", scope)
+ }
+ if fld.GetType() == descriptorpb.FieldDescriptorProto_TYPE_GROUP || fld.GetType() == descriptorpb.FieldDescriptorProto_TYPE_MESSAGE {
+ return -1, interp.reporter.HandleErrorf(interp.nodeInfo(optNode.GetName()).Start(), "%s: default value cannot be set because field is a message", scope)
+ }
+ val := optNode.GetValue()
+ if _, ok := val.(*ast.MessageLiteralNode); ok {
+ return -1, interp.reporter.HandleErrorf(interp.nodeInfo(val).Start(), "%s: default value cannot be a message", scope)
+ }
+ mc := &internal.MessageContext{
+ File: interp.file,
+ ElementName: fqn,
+ ElementType: descriptorType(fld),
+ Option: opt,
+ }
+ var v interface{}
+ if fld.GetType() == descriptorpb.FieldDescriptorProto_TYPE_ENUM {
+ ed := interp.file.ResolveEnumType(protoreflect.FullName(fld.GetTypeName()))
+ ev, err := interp.enumFieldValue(mc, ed, val)
+ if err != nil {
+ return -1, interp.reporter.HandleError(err)
+ }
+ v = string(ev.Name())
+ } else {
+ v, err = interp.scalarFieldValue(mc, fld.GetType(), val, false)
+ if err != nil {
+ return -1, interp.reporter.HandleError(err)
+ }
+ }
+ if str, ok := v.(string); ok {
+ fld.DefaultValue = proto.String(str)
+ } else if b, ok := v.([]byte); ok {
+ fld.DefaultValue = proto.String(encodeDefaultBytes(b))
+ } else {
+ var flt float64
+ var ok bool
+ if flt, ok = v.(float64); !ok {
+ var flt32 float32
+ if flt32, ok = v.(float32); ok {
+ flt = float64(flt32)
+ }
+ }
+ if ok {
+ switch {
+ case math.IsInf(flt, 1):
+ fld.DefaultValue = proto.String("inf")
+ case math.IsInf(flt, -1):
+ fld.DefaultValue = proto.String("-inf")
+ case math.IsNaN(flt):
+ fld.DefaultValue = proto.String("nan")
+ default:
+ fld.DefaultValue = proto.String(fmt.Sprintf("%v", v))
+ }
+ } else {
+ fld.DefaultValue = proto.String(fmt.Sprintf("%v", v))
+ }
+ }
+ return found, nil
+}
+
+func encodeDefaultBytes(b []byte) string {
+ var buf bytes.Buffer
+ internal.WriteEscapedBytes(&buf, b)
+ return buf.String()
+}
+
+func (interp *interpreter) interpretEnumOptions(fqn string, ed *descriptorpb.EnumDescriptorProto) error {
+ opts := ed.GetOptions()
+ if opts != nil {
+ if len(opts.UninterpretedOption) > 0 {
+ remain, err := interp.interpretOptions(fqn, ed, opts, opts.UninterpretedOption)
+ if err != nil {
+ return err
+ }
+ opts.UninterpretedOption = remain
+ }
+ }
+ for _, evd := range ed.GetValue() {
+ evdFqn := fqn + "." + evd.GetName()
+ opts := evd.GetOptions()
+ if len(opts.GetUninterpretedOption()) > 0 {
+ remain, err := interp.interpretOptions(evdFqn, evd, opts, opts.UninterpretedOption)
+ if err != nil {
+ return err
+ }
+ opts.UninterpretedOption = remain
+ }
+ }
+ return nil
+}
+
+// interpretedOption represents the result of interpreting an option.
+// This includes metadata that allows the option to be serialized to
+// bytes in a way that is deterministic and can preserve the structure
+// of the source (the way the options are de-structured and the order in
+// which options appear).
+type interpretedOption struct {
+ unknown bool
+ pathPrefix []int32
+ interpretedField
+}
+
+func (o *interpretedOption) path() []int32 {
+ path := o.pathPrefix
+ path = append(path, o.number)
+ if o.repeated {
+ path = append(path, o.index)
+ }
+ return path
+}
+
+func (o *interpretedOption) appendOptionBytes(b []byte) ([]byte, error) {
+ return o.appendOptionBytesWithPath(b, o.pathPrefix)
+}
+
+func (o *interpretedOption) appendOptionBytesWithPath(b []byte, path []int32) ([]byte, error) {
+ if len(path) == 0 {
+ return appendOptionBytesSingle(b, &o.interpretedField)
+ }
+ // NB: if we add functions to compute sizes of the options first, we could
+ // allocate precisely sized slice up front, which would be more efficient than
+ // repeated creation/growing/concatenation.
+ enclosed, err := o.appendOptionBytesWithPath(nil, path[1:])
+ if err != nil {
+ return nil, err
+ }
+ b = protowire.AppendTag(b, protowire.Number(path[0]), protowire.BytesType)
+ return protowire.AppendBytes(b, enclosed), nil
+}
+
+// interpretedField represents a field in an options message that is the
+// result of interpreting an option. This is used for the option value
+// itself as well as for subfields when an option value is a message
+// literal.
+type interpretedField struct {
+ // field number
+ number int32
+ // index of this element inside a repeated field; only set if repeated == true
+ index int32
+ // true if this is a repeated field
+ repeated bool
+ // true if this is a repeated field that stores scalar values in packed form
+ packed bool
+ // the field's kind
+ kind protoreflect.Kind
+
+ value interpretedFieldValue
+}
+
+// interpretedFieldValue is a wrapper around protoreflect.Value that
+// includes extra metadata.
+type interpretedFieldValue struct {
+ // the field value
+ val protoreflect.Value
+ // if true, this value is a list of values, not a singular value
+ isList bool
+ // non-nil for singular message values
+ msgVal []*interpretedField
+ // non-nil for non-empty lists of message values
+ msgListVal [][]*interpretedField
+}
+
+func appendOptionBytes(b []byte, flds []*interpretedField) ([]byte, error) {
+ // protoc emits messages sorted by field number
+ if len(flds) > 1 {
+ sort.SliceStable(flds, func(i, j int) bool {
+ return flds[i].number < flds[j].number
+ })
+ }
+
+ for i := 0; i < len(flds); i++ {
+ f := flds[i]
+ switch {
+ case f.packed && canPack(f.kind):
+ // for packed repeated numeric fields, all runs of values are merged into one packed list
+ num := f.number
+ j := i
+ for j < len(flds) && flds[j].number == num {
+ j++
+ }
+ // now flds[i:j] is the range of contiguous fields for the same field number
+ enclosed, err := appendOptionBytesPacked(nil, f.kind, flds[i:j])
+ if err != nil {
+ return nil, err
+ }
+ b = protowire.AppendTag(b, protowire.Number(f.number), protowire.BytesType)
+ b = protowire.AppendBytes(b, enclosed)
+ // skip over the other subsequent fields we just serialized
+ i = j - 1
+ case f.value.isList:
+ // if not packed, then emit one value at a time
+ single := *f
+ single.value.isList = false
+ single.value.msgListVal = nil
+ l := f.value.val.List()
+ for i := 0; i < l.Len(); i++ {
+ single.value.val = l.Get(i)
+ if f.kind == protoreflect.MessageKind || f.kind == protoreflect.GroupKind {
+ single.value.msgVal = f.value.msgListVal[i]
+ }
+ var err error
+ b, err = appendOptionBytesSingle(b, &single)
+ if err != nil {
+ return nil, err
+ }
+ }
+ default:
+ // simple singular value
+ var err error
+ b, err = appendOptionBytesSingle(b, f)
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+
+ return b, nil
+}
+
+func canPack(k protoreflect.Kind) bool {
+ switch k {
+ case protoreflect.MessageKind, protoreflect.GroupKind, protoreflect.StringKind, protoreflect.BytesKind:
+ return false
+ default:
+ return true
+ }
+}
+
+func appendOptionBytesPacked(b []byte, k protoreflect.Kind, flds []*interpretedField) ([]byte, error) {
+ for i := range flds {
+ val := flds[i].value
+ if val.isList {
+ l := val.val.List()
+ var err error
+ b, err = appendNumericValueBytesPacked(b, k, l)
+ if err != nil {
+ return nil, err
+ }
+ } else {
+ var err error
+ b, err = appendNumericValueBytes(b, k, val.val)
+ if err != nil {
+ return nil, err
+ }
+ }
+ }
+ return b, nil
+}
+
+func appendOptionBytesSingle(b []byte, f *interpretedField) ([]byte, error) {
+ num := protowire.Number(f.number)
+ switch f.kind {
+ case protoreflect.MessageKind:
+ enclosed, err := appendOptionBytes(nil, f.value.msgVal)
+ if err != nil {
+ return nil, err
+ }
+ b = protowire.AppendTag(b, num, protowire.BytesType)
+ return protowire.AppendBytes(b, enclosed), nil
+
+ case protoreflect.GroupKind:
+ b = protowire.AppendTag(b, num, protowire.StartGroupType)
+ var err error
+ b, err = appendOptionBytes(b, f.value.msgVal)
+ if err != nil {
+ return nil, err
+ }
+ return protowire.AppendTag(b, num, protowire.EndGroupType), nil
+
+ case protoreflect.StringKind:
+ b = protowire.AppendTag(b, num, protowire.BytesType)
+ return protowire.AppendString(b, f.value.val.String()), nil
+
+ case protoreflect.BytesKind:
+ b = protowire.AppendTag(b, num, protowire.BytesType)
+ return protowire.AppendBytes(b, f.value.val.Bytes()), nil
+
+ case protoreflect.Int32Kind, protoreflect.Int64Kind, protoreflect.Uint32Kind, protoreflect.Uint64Kind,
+ protoreflect.Sint32Kind, protoreflect.Sint64Kind, protoreflect.EnumKind, protoreflect.BoolKind:
+ b = protowire.AppendTag(b, num, protowire.VarintType)
+ return appendNumericValueBytes(b, f.kind, f.value.val)
+
+ case protoreflect.Fixed32Kind, protoreflect.Sfixed32Kind, protoreflect.FloatKind:
+ b = protowire.AppendTag(b, num, protowire.Fixed32Type)
+ return appendNumericValueBytes(b, f.kind, f.value.val)
+
+ case protoreflect.Fixed64Kind, protoreflect.Sfixed64Kind, protoreflect.DoubleKind:
+ b = protowire.AppendTag(b, num, protowire.Fixed64Type)
+ return appendNumericValueBytes(b, f.kind, f.value.val)
+
+ default:
+ return nil, fmt.Errorf("unknown field kind: %v", f.kind)
+ }
+}
+
+func appendNumericValueBytesPacked(b []byte, k protoreflect.Kind, l protoreflect.List) ([]byte, error) {
+ for i := 0; i < l.Len(); i++ {
+ var err error
+ b, err = appendNumericValueBytes(b, k, l.Get(i))
+ if err != nil {
+ return nil, err
+ }
+ }
+ return b, nil
+}
+
+func appendNumericValueBytes(b []byte, k protoreflect.Kind, v protoreflect.Value) ([]byte, error) {
+ switch k {
+ case protoreflect.Int32Kind, protoreflect.Int64Kind:
+ return protowire.AppendVarint(b, uint64(v.Int())), nil
+ case protoreflect.Uint32Kind, protoreflect.Uint64Kind:
+ return protowire.AppendVarint(b, v.Uint()), nil
+ case protoreflect.Sint32Kind, protoreflect.Sint64Kind:
+ return protowire.AppendVarint(b, protowire.EncodeZigZag(v.Int())), nil
+ case protoreflect.Fixed32Kind:
+ return protowire.AppendFixed32(b, uint32(v.Uint())), nil
+ case protoreflect.Fixed64Kind:
+ return protowire.AppendFixed64(b, v.Uint()), nil
+ case protoreflect.Sfixed32Kind:
+ return protowire.AppendFixed32(b, uint32(v.Int())), nil
+ case protoreflect.Sfixed64Kind:
+ return protowire.AppendFixed64(b, uint64(v.Int())), nil
+ case protoreflect.FloatKind:
+ return protowire.AppendFixed32(b, math.Float32bits(float32(v.Float()))), nil
+ case protoreflect.DoubleKind:
+ return protowire.AppendFixed64(b, math.Float64bits(v.Float())), nil
+ case protoreflect.BoolKind:
+ return protowire.AppendVarint(b, protowire.EncodeBool(v.Bool())), nil
+ case protoreflect.EnumKind:
+ return protowire.AppendVarint(b, uint64(v.Enum())), nil
+ default:
+ return nil, fmt.Errorf("unknown field kind: %v", k)
+ }
+}
+
+// optionsContainer may be optionally implemented by a linker.Result. It is
+// not part of the linker.Result interface as it is meant only for internal use.
+// This allows the option interpreter step to store extra metadata about the
+// serialized structure of options.
+type optionsContainer interface {
+ // AddOptionBytes adds the given pre-serialized option bytes to a file,
+ // associated with the given options message. The type of the given message
+ // should be an options message, for example *descriptorpb.MessageOptions.
+ // This value should be part of the message hierarchy whose root is the
+ // *descriptorpb.FileDescriptorProto that corresponds to this result.
+ AddOptionBytes(pm proto.Message, opts []byte)
+}
+
+// interpretOptions processes the options in uninterpreted, which are interpreted as fields
+// of the given opts message. On success, it will usually return nil, nil. But if the current
+// operation is lenient, it may return a non-nil slice of uninterpreted options on success.
+// In such a case, the returned value is the remaining slice of options which could not be
+// interpreted.
+func (interp *interpreter) interpretOptions(fqn string, element, opts proto.Message, uninterpreted []*descriptorpb.UninterpretedOption) ([]*descriptorpb.UninterpretedOption, error) {
+ optsDesc := opts.ProtoReflect().Descriptor()
+ optsFqn := string(optsDesc.FullName())
+ var msg protoreflect.Message
+ // see if the parse included an override copy for these options
+ if md := interp.file.ResolveMessageType(protoreflect.FullName(optsFqn)); md != nil {
+ dm := dynamicpb.NewMessage(md)
+ if err := cloneInto(dm, opts, nil); err != nil {
+ node := interp.file.Node(element)
+ return nil, interp.reporter.HandleError(reporter.Error(interp.nodeInfo(node).Start(), err))
+ }
+ msg = dm
+ } else {
+ msg = proto.Clone(opts).ProtoReflect()
+ }
+
+ mc := &internal.MessageContext{
+ File: interp.file,
+ ElementName: fqn,
+ ElementType: descriptorType(element),
+ }
+ var remain []*descriptorpb.UninterpretedOption
+ results := make([]*interpretedOption, 0, len(uninterpreted))
+ for _, uo := range uninterpreted {
+ node := interp.file.OptionNode(uo)
+ if !uo.Name[0].GetIsExtension() && uo.Name[0].GetNamePart() == "uninterpreted_option" {
+ if interp.lenient {
+ remain = append(remain, uo)
+ continue
+ }
+ // uninterpreted_option might be found reflectively, but is not actually valid for use
+ if err := interp.reporter.HandleErrorf(interp.nodeInfo(node.GetName()).Start(), "%vinvalid option 'uninterpreted_option'", mc); err != nil {
+ return nil, err
+ }
+ }
+ mc.Option = uo
+ res, err := interp.interpretField(mc, msg, uo, 0, nil)
+ if err != nil {
+ if interp.lenient {
+ remain = append(remain, uo)
+ continue
+ }
+ return nil, err
+ }
+ res.unknown = !isKnownField(optsDesc, res)
+ results = append(results, res)
+ if optn, ok := node.(*ast.OptionNode); ok {
+ interp.index[optn] = res.path()
+ }
+ }
+
+ if interp.lenient {
+ // If we're lenient, then we don't want to clobber the passed in message
+ // and leave it partially populated. So we convert into a copy first
+ optsClone := opts.ProtoReflect().New().Interface()
+ if err := cloneInto(optsClone, msg.Interface(), interp.resolver); err != nil {
+ // TODO: do this in a more granular way, so we can convert individual
+ // fields and leave bad ones uninterpreted instead of skipping all of
+ // the work we've done so far.
+ return uninterpreted, nil
+ }
+ // conversion from dynamic message above worked, so now
+ // it is safe to overwrite the passed in message
+ proto.Reset(opts)
+ proto.Merge(opts, optsClone)
+
+ if interp.container != nil {
+ b, err := interp.toOptionBytes(mc, results)
+ if err != nil {
+ return nil, err
+ }
+ interp.container.AddOptionBytes(opts, b)
+ }
+
+ return remain, nil
+ }
+
+ if err := validateRecursive(msg, ""); err != nil {
+ node := interp.file.Node(element)
+ if err := interp.reporter.HandleErrorf(interp.nodeInfo(node).Start(), "error in %s options: %v", descriptorType(element), err); err != nil {
+ return nil, err
+ }
+ }
+
+ // now try to convert into the passed in message and fail if not successful
+ if err := cloneInto(opts, msg.Interface(), interp.resolver); err != nil {
+ node := interp.file.Node(element)
+ return nil, interp.reporter.HandleError(reporter.Error(interp.nodeInfo(node).Start(), err))
+ }
+ if interp.container != nil {
+ b, err := interp.toOptionBytes(mc, results)
+ if err != nil {
+ return nil, err
+ }
+ interp.container.AddOptionBytes(opts, b)
+ }
+
+ return nil, nil
+}
+
+func isKnownField(desc protoreflect.MessageDescriptor, opt *interpretedOption) bool {
+ var num int32
+ if len(opt.pathPrefix) > 0 {
+ num = opt.pathPrefix[0]
+ } else {
+ num = opt.number
+ }
+ return desc.Fields().ByNumber(protoreflect.FieldNumber(num)) != nil
+}
+
+func cloneInto(dest proto.Message, src proto.Message, res linker.Resolver) error {
+ if dest.ProtoReflect().Descriptor() == src.ProtoReflect().Descriptor() {
+ proto.Reset(dest)
+ proto.Merge(dest, src)
+ if err := proto.CheckInitialized(dest); err != nil {
+ return err
+ }
+ return nil
+ }
+
+ // If descriptors are not the same, we could have field descriptors in src that
+ // don't match the ones in dest. There's no easy/sane way to handle that. So we
+ // just marshal to bytes and back to do this
+ data, err := proto.Marshal(src)
+ if err != nil {
+ return err
+ }
+ return proto.UnmarshalOptions{Resolver: res}.Unmarshal(data, dest)
+}
+
+func (interp *interpreter) toOptionBytes(mc *internal.MessageContext, results []*interpretedOption) ([]byte, error) {
+ // protoc emits non-custom options in tag order and then
+ // the rest are emitted in the order they are defined in source
+ sort.SliceStable(results, func(i, j int) bool {
+ if !results[i].unknown && results[j].unknown {
+ return true
+ }
+ if !results[i].unknown && !results[j].unknown {
+ return results[i].number < results[j].number
+ }
+ return false
+ })
+ var b []byte
+ for _, res := range results {
+ var err error
+ b, err = res.appendOptionBytes(b)
+ if err != nil {
+ if _, ok := err.(reporter.ErrorWithPos); !ok {
+ pos := ast.SourcePos{Filename: interp.file.AST().Name()}
+ err = reporter.Errorf(pos, "%sfailed to encode options: %w", mc, err)
+ }
+ if err := interp.reporter.HandleError(err); err != nil {
+ return nil, err
+ }
+ }
+ }
+ return b, nil
+}
+
+func validateRecursive(msg protoreflect.Message, prefix string) error {
+ flds := msg.Descriptor().Fields()
+ var missingFields []string
+ for i := 0; i < flds.Len(); i++ {
+ fld := flds.Get(i)
+ if fld.Cardinality() == protoreflect.Required && !msg.Has(fld) {
+ missingFields = append(missingFields, fmt.Sprintf("%s%s", prefix, fld.Name()))
+ }
+ }
+ if len(missingFields) > 0 {
+ return fmt.Errorf("some required fields missing: %v", strings.Join(missingFields, ", "))
+ }
+
+ var err error
+ msg.Range(func(fld protoreflect.FieldDescriptor, val protoreflect.Value) bool {
+ if fld.IsMap() {
+ md := fld.MapValue().Message()
+ if md != nil {
+ val.Map().Range(func(k protoreflect.MapKey, v protoreflect.Value) bool {
+ chprefix := fmt.Sprintf("%s%s[%v].", prefix, fieldName(fld), k)
+ err = validateRecursive(v.Message(), chprefix)
+ return err == nil
+ })
+ if err != nil {
+ return false
+ }
+ }
+ } else {
+ md := fld.Message()
+ if md != nil {
+ if fld.IsList() {
+ sl := val.List()
+ for i := 0; i < sl.Len(); i++ {
+ v := sl.Get(i)
+ chprefix := fmt.Sprintf("%s%s[%d].", prefix, fieldName(fld), i)
+ err = validateRecursive(v.Message(), chprefix)
+ if err != nil {
+ return false
+ }
+ }
+ } else {
+ chprefix := fmt.Sprintf("%s%s.", prefix, fieldName(fld))
+ err = validateRecursive(val.Message(), chprefix)
+ if err != nil {
+ return false
+ }
+ }
+ }
+ }
+ return true
+ })
+ return err
+}
+
+// interpretField interprets the option described by opt, as a field inside the given msg. This
+// interprets components of the option name starting at nameIndex. When nameIndex == 0, then
+// msg must be an options message. For nameIndex > 0, msg is a nested message inside of the
+// options message. The given pathPrefix is the path (sequence of field numbers and indices
+// with a FileDescriptorProto as the start) up to but not including the given nameIndex.
+func (interp *interpreter) interpretField(mc *internal.MessageContext, msg protoreflect.Message, opt *descriptorpb.UninterpretedOption, nameIndex int, pathPrefix []int32) (*interpretedOption, error) {
+ var fld protoreflect.FieldDescriptor
+ nm := opt.GetName()[nameIndex]
+ node := interp.file.OptionNamePartNode(nm)
+ if nm.GetIsExtension() {
+ extName := nm.GetNamePart()
+ if extName[0] == '.' {
+ extName = extName[1:] /* skip leading dot */
+ }
+ fld = interp.file.ResolveExtension(protoreflect.FullName(extName))
+ if fld == nil {
+ return nil, interp.reporter.HandleErrorf(interp.nodeInfo(node).Start(),
+ "%vunrecognized extension %s of %s",
+ mc, extName, msg.Descriptor().FullName())
+ }
+ if fld.ContainingMessage().FullName() != msg.Descriptor().FullName() {
+ return nil, interp.reporter.HandleErrorf(interp.nodeInfo(node).Start(),
+ "%vextension %s should extend %s but instead extends %s",
+ mc, extName, msg.Descriptor().FullName(), fld.ContainingMessage().FullName())
+ }
+ } else {
+ fld = msg.Descriptor().Fields().ByName(protoreflect.Name(nm.GetNamePart()))
+ if fld == nil {
+ return nil, interp.reporter.HandleErrorf(interp.nodeInfo(node).Start(),
+ "%vfield %s of %s does not exist",
+ mc, nm.GetNamePart(), msg.Descriptor().FullName())
+ }
+ }
+
+ if len(opt.GetName()) > nameIndex+1 {
+ nextnm := opt.GetName()[nameIndex+1]
+ nextnode := interp.file.OptionNamePartNode(nextnm)
+ k := fld.Kind()
+ if k != protoreflect.MessageKind && k != protoreflect.GroupKind {
+ return nil, interp.reporter.HandleErrorf(interp.nodeInfo(nextnode).Start(),
+ "%vcannot set field %s because %s is not a message",
+ mc, nextnm.GetNamePart(), nm.GetNamePart())
+ }
+ if fld.Cardinality() == protoreflect.Repeated {
+ return nil, interp.reporter.HandleErrorf(interp.nodeInfo(nextnode).Start(),
+ "%vcannot set field %s because %s is repeated (must use an aggregate)",
+ mc, nextnm.GetNamePart(), nm.GetNamePart())
+ }
+ var fdm protoreflect.Message
+ if msg.Has(fld) {
+ v := msg.Mutable(fld)
+ fdm = v.Message()
+ } else {
+ if ood := fld.ContainingOneof(); ood != nil {
+ existingFld := msg.WhichOneof(ood)
+ if existingFld != nil && existingFld.Number() != fld.Number() {
+ return nil, interp.reporter.HandleErrorf(interp.nodeInfo(node).Start(),
+ "%voneof %q already has field %q set",
+ mc, ood.Name(), fieldName(existingFld))
+ }
+ }
+ fdm = dynamicpb.NewMessage(fld.Message())
+ msg.Set(fld, protoreflect.ValueOfMessage(fdm))
+ }
+ // recurse to set next part of name
+ return interp.interpretField(mc, fdm, opt, nameIndex+1, append(pathPrefix, int32(fld.Number())))
+ }
+
+ optNode := interp.file.OptionNode(opt)
+ val, err := interp.setOptionField(mc, msg, fld, node, optNode.GetValue(), false)
+ if err != nil {
+ return nil, interp.reporter.HandleError(err)
+ }
+ var index int32
+ if fld.IsMap() {
+ index = int32(msg.Get(fld).Map().Len()) - 1
+ } else if fld.IsList() {
+ index = int32(msg.Get(fld).List().Len()) - 1
+ }
+ return &interpretedOption{
+ pathPrefix: pathPrefix,
+ interpretedField: interpretedField{
+ number: int32(fld.Number()),
+ index: index,
+ kind: fld.Kind(),
+ repeated: fld.Cardinality() == protoreflect.Repeated,
+ value: val,
+ // NB: don't set packed here in a top-level option
+ // (only values in message literals will be serialized
+ // in packed format)
+ },
+ }, nil
+}
+
+// setOptionField sets the value for field fld in the given message msg to the value represented
+// by val. The given name is the AST node that corresponds to the name of fld. On success, it
+// returns additional metadata about the field that was set.
+func (interp *interpreter) setOptionField(mc *internal.MessageContext, msg protoreflect.Message, fld protoreflect.FieldDescriptor, name ast.Node, val ast.ValueNode, insideMsgLiteral bool) (interpretedFieldValue, error) {
+ v := val.Value()
+ if sl, ok := v.([]ast.ValueNode); ok {
+ // handle slices a little differently than the others
+ if fld.Cardinality() != protoreflect.Repeated {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(val).Start(), "%vvalue is an array but field is not repeated", mc)
+ }
+ origPath := mc.OptAggPath
+ defer func() {
+ mc.OptAggPath = origPath
+ }()
+ var resVal listValue
+ var resMsgVals [][]*interpretedField
+ for index, item := range sl {
+ mc.OptAggPath = fmt.Sprintf("%s[%d]", origPath, index)
+ value, err := interp.fieldValue(mc, fld, item, insideMsgLiteral)
+ if err != nil {
+ return interpretedFieldValue{}, err
+ }
+ if fld.IsMap() {
+ setMapEntry(msg, fld, &value)
+ } else {
+ msg.Mutable(fld).List().Append(value.val)
+ }
+ resVal = append(resVal, value.val)
+ if value.msgVal != nil {
+ resMsgVals = append(resMsgVals, value.msgVal)
+ }
+ }
+ return interpretedFieldValue{
+ isList: true,
+ val: protoreflect.ValueOfList(&resVal),
+ msgListVal: resMsgVals,
+ }, nil
+ }
+
+ value, err := interp.fieldValue(mc, fld, val, insideMsgLiteral)
+ if err != nil {
+ return interpretedFieldValue{}, err
+ }
+
+ if ood := fld.ContainingOneof(); ood != nil {
+ existingFld := msg.WhichOneof(ood)
+ if existingFld != nil && existingFld.Number() != fld.Number() {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(name).Start(), "%voneof %q already has field %q set", mc, ood.Name(), fieldName(existingFld))
+ }
+ }
+
+ switch {
+ case fld.IsMap():
+ setMapEntry(msg, fld, &value)
+ case fld.IsList():
+ msg.Mutable(fld).List().Append(value.val)
+ default:
+ if msg.Has(fld) {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(name).Start(), "%vnon-repeated option field %s already set", mc, fieldName(fld))
+ }
+ msg.Set(fld, value.val)
+ }
+ return value, nil
+}
+
+func setMapEntry(msg protoreflect.Message, fld protoreflect.FieldDescriptor, value *interpretedFieldValue) {
+ entry := value.val.Message()
+ keyFld, valFld := fld.MapKey(), fld.MapValue()
+ // if an entry is missing a key or value, we add in an explicit
+ // zero value to msgVals to match protoc (which also odds these
+ // in even if not present in source)
+ if !entry.Has(keyFld) {
+ // put key before value
+ value.msgVal = append(append(([]*interpretedField)(nil), zeroValue(keyFld)), value.msgVal...)
+ }
+ if !entry.Has(valFld) {
+ value.msgVal = append(value.msgVal, zeroValue(valFld))
+ }
+ key := entry.Get(keyFld)
+ val := entry.Get(valFld)
+ if dm, ok := val.Interface().(*dynamicpb.Message); ok && (dm == nil || !dm.IsValid()) {
+ val = protoreflect.ValueOfMessage(dynamicpb.NewMessage(valFld.Message()))
+ }
+ m := msg.Mutable(fld).Map()
+ // TODO: error if key is already present
+ m.Set(key.MapKey(), val)
+}
+
+// zeroValue returns the zero value for the field types as a *interpretedField.
+// The given fld must NOT be a repeated field.
+func zeroValue(fld protoreflect.FieldDescriptor) *interpretedField {
+ var val protoreflect.Value
+ var msgVal []*interpretedField
+ switch fld.Kind() {
+ case protoreflect.MessageKind, protoreflect.GroupKind:
+ // needs to be non-nil, but empty
+ msgVal = []*interpretedField{}
+ msg := dynamicpb.NewMessage(fld.Message())
+ val = protoreflect.ValueOfMessage(msg)
+ case protoreflect.EnumKind:
+ val = protoreflect.ValueOfEnum(0)
+ case protoreflect.Int32Kind, protoreflect.Sint32Kind, protoreflect.Sfixed32Kind:
+ val = protoreflect.ValueOfInt32(0)
+ case protoreflect.Uint32Kind, protoreflect.Fixed32Kind:
+ val = protoreflect.ValueOfUint32(0)
+ case protoreflect.Int64Kind, protoreflect.Sint64Kind, protoreflect.Sfixed64Kind:
+ val = protoreflect.ValueOfInt64(0)
+ case protoreflect.Uint64Kind, protoreflect.Fixed64Kind:
+ val = protoreflect.ValueOfUint64(0)
+ case protoreflect.BoolKind:
+ val = protoreflect.ValueOfBool(false)
+ case protoreflect.FloatKind:
+ val = protoreflect.ValueOfFloat32(0)
+ case protoreflect.DoubleKind:
+ val = protoreflect.ValueOfFloat64(0)
+ case protoreflect.BytesKind:
+ val = protoreflect.ValueOfBytes(nil)
+ case protoreflect.StringKind:
+ val = protoreflect.ValueOfString("")
+ }
+ return &interpretedField{
+ number: int32(fld.Number()),
+ kind: fld.Kind(),
+ value: interpretedFieldValue{
+ val: val,
+ msgVal: msgVal,
+ },
+ }
+}
+
+type listValue []protoreflect.Value
+
+var _ protoreflect.List = (*listValue)(nil)
+
+func (l listValue) Len() int {
+ return len(l)
+}
+
+func (l listValue) Get(i int) protoreflect.Value {
+ return l[i]
+}
+
+func (l listValue) Set(i int, value protoreflect.Value) {
+ l[i] = value
+}
+
+func (l *listValue) Append(value protoreflect.Value) {
+ *l = append(*l, value)
+}
+
+func (l listValue) AppendMutable() protoreflect.Value {
+ panic("AppendMutable not supported")
+}
+
+func (l *listValue) Truncate(i int) {
+ *l = (*l)[:i]
+}
+
+func (l listValue) NewElement() protoreflect.Value {
+ panic("NewElement not supported")
+}
+
+func (l listValue) IsValid() bool {
+ return true
+}
+
+func fieldName(fld protoreflect.FieldDescriptor) string {
+ if fld.IsExtension() {
+ return fmt.Sprintf("(%s)", fld.FullName())
+ }
+ return string(fld.Name())
+}
+
+func valueKind(val interface{}) string {
+ switch val := val.(type) {
+ case ast.Identifier:
+ return "identifier"
+ case bool:
+ return "bool"
+ case int64:
+ if val < 0 {
+ return "negative integer"
+ }
+ return "integer"
+ case uint64:
+ return "integer"
+ case float64:
+ return "double"
+ case string, []byte:
+ return "string"
+ case []*ast.MessageFieldNode:
+ return "message"
+ case []ast.ValueNode:
+ return "array"
+ default:
+ return fmt.Sprintf("%T", val)
+ }
+}
+
+// fieldValue computes a compile-time value (constant or list or message literal) for the given
+// AST node val. The value in val must be assignable to the field fld.
+func (interp *interpreter) fieldValue(mc *internal.MessageContext, fld protoreflect.FieldDescriptor, val ast.ValueNode, insideMsgLiteral bool) (interpretedFieldValue, error) {
+ k := fld.Kind()
+ switch k {
+ case protoreflect.EnumKind:
+ evd, err := interp.enumFieldValue(mc, fld.Enum(), val)
+ if err != nil {
+ return interpretedFieldValue{}, err
+ }
+ return interpretedFieldValue{val: protoreflect.ValueOfEnum(evd.Number())}, nil
+
+ case protoreflect.MessageKind, protoreflect.GroupKind:
+ v := val.Value()
+ if aggs, ok := v.([]*ast.MessageFieldNode); ok {
+ fmd := fld.Message()
+ return interp.messageLiteralValue(mc, aggs, fmd)
+ }
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting message, got %s", mc, valueKind(v))
+
+ default:
+ v, err := interp.scalarFieldValue(mc, descriptorpb.FieldDescriptorProto_Type(k), val, insideMsgLiteral)
+ if err != nil {
+ return interpretedFieldValue{}, err
+ }
+ return interpretedFieldValue{val: protoreflect.ValueOf(v)}, nil
+ }
+}
+
+// enumFieldValue resolves the given AST node val as an enum value descriptor. If the given
+// value is not a valid identifier, an error is returned instead.
+func (interp *interpreter) enumFieldValue(mc *internal.MessageContext, ed protoreflect.EnumDescriptor, val ast.ValueNode) (protoreflect.EnumValueDescriptor, error) {
+ v := val.Value()
+ if id, ok := v.(ast.Identifier); ok {
+ ev := ed.Values().ByName(protoreflect.Name(id))
+ if ev == nil {
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%venum %s has no value named %s", mc, ed.FullName(), id)
+ }
+ return ev, nil
+ }
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting enum, got %s", mc, valueKind(v))
+}
+
+// scalarFieldValue resolves the given AST node val as a value whose type is assignable to a
+// field with the given fldType.
+func (interp *interpreter) scalarFieldValue(mc *internal.MessageContext, fldType descriptorpb.FieldDescriptorProto_Type, val ast.ValueNode, insideMsgLiteral bool) (interface{}, error) {
+ v := val.Value()
+ switch fldType {
+ case descriptorpb.FieldDescriptorProto_TYPE_BOOL:
+ if b, ok := v.(bool); ok {
+ return b, nil
+ }
+ if id, ok := v.(ast.Identifier); ok {
+ if insideMsgLiteral {
+ // inside a message literal, values use the protobuf text format,
+ // which is lenient in that it accepts "t" and "f" or "True" and "False"
+ switch id {
+ case "t", "true", "True":
+ return true, nil
+ case "f", "false", "False":
+ return false, nil
+ }
+ } else {
+ // options with simple scalar values (no message literal) are stricter
+ switch id {
+ case "true":
+ return true, nil
+ case "false":
+ return false, nil
+ }
+ }
+ }
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting bool, got %s", mc, valueKind(v))
+ case descriptorpb.FieldDescriptorProto_TYPE_BYTES:
+ if str, ok := v.(string); ok {
+ return []byte(str), nil
+ }
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting bytes, got %s", mc, valueKind(v))
+ case descriptorpb.FieldDescriptorProto_TYPE_STRING:
+ if str, ok := v.(string); ok {
+ return str, nil
+ }
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting string, got %s", mc, valueKind(v))
+ case descriptorpb.FieldDescriptorProto_TYPE_INT32, descriptorpb.FieldDescriptorProto_TYPE_SINT32, descriptorpb.FieldDescriptorProto_TYPE_SFIXED32:
+ if i, ok := v.(int64); ok {
+ if i > math.MaxInt32 || i < math.MinInt32 {
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vvalue %d is out of range for int32", mc, i)
+ }
+ return int32(i), nil
+ }
+ if ui, ok := v.(uint64); ok {
+ if ui > math.MaxInt32 {
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vvalue %d is out of range for int32", mc, ui)
+ }
+ return int32(ui), nil
+ }
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting int32, got %s", mc, valueKind(v))
+ case descriptorpb.FieldDescriptorProto_TYPE_UINT32, descriptorpb.FieldDescriptorProto_TYPE_FIXED32:
+ if i, ok := v.(int64); ok {
+ if i > math.MaxUint32 || i < 0 {
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vvalue %d is out of range for uint32", mc, i)
+ }
+ return uint32(i), nil
+ }
+ if ui, ok := v.(uint64); ok {
+ if ui > math.MaxUint32 {
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vvalue %d is out of range for uint32", mc, ui)
+ }
+ return uint32(ui), nil
+ }
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting uint32, got %s", mc, valueKind(v))
+ case descriptorpb.FieldDescriptorProto_TYPE_INT64, descriptorpb.FieldDescriptorProto_TYPE_SINT64, descriptorpb.FieldDescriptorProto_TYPE_SFIXED64:
+ if i, ok := v.(int64); ok {
+ return i, nil
+ }
+ if ui, ok := v.(uint64); ok {
+ if ui > math.MaxInt64 {
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vvalue %d is out of range for int64", mc, ui)
+ }
+ return int64(ui), nil
+ }
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting int64, got %s", mc, valueKind(v))
+ case descriptorpb.FieldDescriptorProto_TYPE_UINT64, descriptorpb.FieldDescriptorProto_TYPE_FIXED64:
+ if i, ok := v.(int64); ok {
+ if i < 0 {
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vvalue %d is out of range for uint64", mc, i)
+ }
+ return uint64(i), nil
+ }
+ if ui, ok := v.(uint64); ok {
+ return ui, nil
+ }
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting uint64, got %s", mc, valueKind(v))
+ case descriptorpb.FieldDescriptorProto_TYPE_DOUBLE:
+ if id, ok := v.(ast.Identifier); ok {
+ switch id {
+ case "inf":
+ return math.Inf(1), nil
+ case "nan":
+ return math.NaN(), nil
+ }
+ }
+ if d, ok := v.(float64); ok {
+ return d, nil
+ }
+ if i, ok := v.(int64); ok {
+ return float64(i), nil
+ }
+ if u, ok := v.(uint64); ok {
+ return float64(u), nil
+ }
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting double, got %s", mc, valueKind(v))
+ case descriptorpb.FieldDescriptorProto_TYPE_FLOAT:
+ if id, ok := v.(ast.Identifier); ok {
+ switch id {
+ case "inf":
+ return float32(math.Inf(1)), nil
+ case "nan":
+ return float32(math.NaN()), nil
+ }
+ }
+ if d, ok := v.(float64); ok {
+ return float32(d), nil
+ }
+ if i, ok := v.(int64); ok {
+ return float32(i), nil
+ }
+ if u, ok := v.(uint64); ok {
+ return float32(u), nil
+ }
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vexpecting float, got %s", mc, valueKind(v))
+ default:
+ return nil, reporter.Errorf(interp.nodeInfo(val).Start(), "%vunrecognized field type: %s", mc, fldType)
+ }
+}
+
+func descriptorType(m proto.Message) string {
+ switch m := m.(type) {
+ case *descriptorpb.DescriptorProto:
+ return "message"
+ case *descriptorpb.DescriptorProto_ExtensionRange:
+ return "extension range"
+ case *descriptorpb.FieldDescriptorProto:
+ if m.GetExtendee() == "" {
+ return "field"
+ }
+ return "extension"
+ case *descriptorpb.EnumDescriptorProto:
+ return "enum"
+ case *descriptorpb.EnumValueDescriptorProto:
+ return "enum value"
+ case *descriptorpb.ServiceDescriptorProto:
+ return "service"
+ case *descriptorpb.MethodDescriptorProto:
+ return "method"
+ case *descriptorpb.FileDescriptorProto:
+ return "file"
+ default:
+ // shouldn't be possible
+ return fmt.Sprintf("%T", m)
+ }
+}
+
+func (interp *interpreter) messageLiteralValue(mc *internal.MessageContext, fieldNodes []*ast.MessageFieldNode, fmd protoreflect.MessageDescriptor) (interpretedFieldValue, error) {
+ fdm := dynamicpb.NewMessage(fmd)
+ origPath := mc.OptAggPath
+ defer func() {
+ mc.OptAggPath = origPath
+ }()
+ // NB: we don't want to leave this nil, even if the
+ // message is empty, because that indicates to
+ // caller that the result is not a message
+ flds := make([]*interpretedField, 0, len(fieldNodes))
+ var foundAnyNode bool
+ for _, fieldNode := range fieldNodes {
+ if origPath == "" {
+ mc.OptAggPath = fieldNode.Name.Value()
+ } else {
+ mc.OptAggPath = origPath + "." + fieldNode.Name.Value()
+ }
+ if fieldNode.Name.IsAnyTypeReference() {
+ if fmd.FullName() != "google.protobuf.Any" {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Name.URLPrefix).Start(), "%vtype references are only allowed for google.protobuf.Any, but this type is %s", mc, fmd.FullName())
+ }
+ if foundAnyNode {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Name.URLPrefix).Start(), "%vmultiple any type references are not allowed", mc)
+ }
+ foundAnyNode = true
+ urlPrefix := fieldNode.Name.URLPrefix.AsIdentifier()
+ msgName := fieldNode.Name.Name.AsIdentifier()
+ fullURL := fmt.Sprintf("%s/%s", urlPrefix, msgName)
+ // TODO: Support other URLs dynamically -- the caller of protoparse
+ // should be able to provide a fldNode custom resolver that can resolve type
+ // URLs into message descriptors. The default resolver would be
+ // implemented as below, only accepting "type.googleapis.com" and
+ // "type.googleprod.com" as hosts/prefixes and using the compiled
+ // file's transitive closure to find the named message.
+ if urlPrefix != "type.googleapis.com" && urlPrefix != "type.googleprod.com" {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Name.URLPrefix).Start(), "%vcould not resolve type reference %s", mc, fullURL)
+ }
+ anyFields, ok := fieldNode.Val.Value().([]*ast.MessageFieldNode)
+ if !ok {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Val).Start(), "%vtype references for google.protobuf.Any must have message literal value", mc)
+ }
+ anyMd := interp.file.ResolveMessageType(protoreflect.FullName(msgName))
+ if anyMd == nil {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Name.URLPrefix).Start(), "%vcould not resolve type reference %s", mc, fullURL)
+ }
+ // parse the message value
+ msgVal, err := interp.messageLiteralValue(mc, anyFields, anyMd)
+ if err != nil {
+ return interpretedFieldValue{}, err
+ }
+
+ // Any is defined with two fields:
+ // string type_url = 1
+ // bytes value = 2
+ typeURLDescriptor := fmd.Fields().ByNumber(1)
+ if typeURLDescriptor == nil || typeURLDescriptor.Kind() != protoreflect.StringKind {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Name).Start(), "%vfailed to set type_url string field on Any: %w", mc, err)
+ }
+ fdm.Set(typeURLDescriptor, protoreflect.ValueOfString(fullURL))
+ valueDescriptor := fmd.Fields().ByNumber(2)
+ if valueDescriptor == nil || valueDescriptor.Kind() != protoreflect.BytesKind {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Name).Start(), "%vfailed to set value bytes field on Any: %w", mc, err)
+ }
+ b, err := proto.MarshalOptions{Deterministic: true}.Marshal(msgVal.val.Message().Interface())
+ if err != nil {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Val).Start(), "%vfailed to serialize message value: %w", mc, err)
+ }
+ fdm.Set(valueDescriptor, protoreflect.ValueOfBytes(b))
+ } else {
+ var ffld protoreflect.FieldDescriptor
+ if fieldNode.Name.IsExtension() {
+ n := interp.file.ResolveMessageLiteralExtensionName(fieldNode.Name.Name)
+ if n == "" {
+ // this should not be possible!
+ n = string(fieldNode.Name.Name.AsIdentifier())
+ }
+ ffld = interp.file.ResolveExtension(protoreflect.FullName(n))
+ if ffld == nil {
+ // may need to qualify with package name
+ // (this should not be necessary!)
+ pkg := mc.File.FileDescriptorProto().GetPackage()
+ if pkg != "" {
+ ffld = interp.file.ResolveExtension(protoreflect.FullName(pkg + "." + n))
+ }
+ }
+ } else {
+ ffld = fmd.Fields().ByName(protoreflect.Name(fieldNode.Name.Value()))
+ // Groups are indicated in the text format by the group name (which is
+ // camel-case), NOT the field name (which is lower-case).
+ // ...but only regular fields, not extensions that are groups...
+ if ffld != nil && ffld.Kind() == protoreflect.GroupKind && ffld.Message().Name() != protoreflect.Name(fieldNode.Name.Value()) {
+ // this is kind of silly to fail here, but this mimics protoc behavior
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Name).Start(), "%vfield %s not found (did you mean the group named %s?)", mc, fieldNode.Name.Value(), ffld.Message().Name())
+ }
+ if ffld == nil {
+ // could be a group name
+ for i := 0; i < fmd.Fields().Len(); i++ {
+ fd := fmd.Fields().Get(i)
+ if fd.Kind() == protoreflect.GroupKind && fd.Message().Name() == protoreflect.Name(fieldNode.Name.Value()) {
+ // found it!
+ ffld = fd
+ break
+ }
+ }
+ }
+ }
+ if ffld == nil {
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Name).Start(), "%vfield %s not found", mc, string(fieldNode.Name.Name.AsIdentifier()))
+ }
+ if fieldNode.Sep == nil && ffld.Message() == nil {
+ // If there is no separator, the field type should be a message.
+ // Otherwise it is an error in the text format.
+ return interpretedFieldValue{}, reporter.Errorf(interp.nodeInfo(fieldNode.Val).Start(), "syntax error: unexpected value, expecting ':'")
+ }
+ res, err := interp.setOptionField(mc, fdm, ffld, fieldNode.Name, fieldNode.Val, true)
+ if err != nil {
+ return interpretedFieldValue{}, err
+ }
+ flds = append(flds, &interpretedField{
+ number: int32(ffld.Number()),
+ kind: ffld.Kind(),
+ repeated: ffld.Cardinality() == protoreflect.Repeated,
+ packed: ffld.IsPacked(),
+ value: res,
+ // NB: no need to set index here, inside message literal
+ // (it is only used for top-level options, for emitting
+ // source code info)
+ })
+ }
+ }
+ return interpretedFieldValue{
+ val: protoreflect.ValueOfMessage(fdm),
+ msgVal: flds,
+ }, nil
+}
diff --git a/vendor/github.com/bufbuild/protocompile/parser/.gitignore b/vendor/github.com/bufbuild/protocompile/parser/.gitignore
new file mode 100644
index 000000000..26520536f
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/parser/.gitignore
@@ -0,0 +1 @@
+y.output
diff --git a/vendor/github.com/bufbuild/protocompile/parser/ast.go b/vendor/github.com/bufbuild/protocompile/parser/ast.go
new file mode 100644
index 000000000..105502d40
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/parser/ast.go
@@ -0,0 +1,216 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 parser
+
+import "github.com/bufbuild/protocompile/ast"
+
+// the types below are accumulator types: linked lists that are
+// constructed during parsing and then converted to slices of AST nodes
+// once the whole list has been parsed
+// TODO: change grammar to use slices of nodes instead of these constructions
+
+type compactOptionList struct {
+ option *ast.OptionNode
+ comma *ast.RuneNode
+ next *compactOptionList
+}
+
+func (list *compactOptionList) toNodes() ([]*ast.OptionNode, []*ast.RuneNode) {
+ l := 0
+ for cur := list; cur != nil; cur = cur.next {
+ l++
+ }
+ opts := make([]*ast.OptionNode, l)
+ commas := make([]*ast.RuneNode, l-1)
+ for cur, i := list, 0; cur != nil; cur, i = cur.next, i+1 {
+ opts[i] = cur.option
+ if cur.comma != nil {
+ commas[i] = cur.comma
+ }
+ }
+ return opts, commas
+}
+
+type stringList struct {
+ str *ast.StringLiteralNode
+ next *stringList
+}
+
+func (list *stringList) toStringValueNode() ast.StringValueNode {
+ if list.next == nil {
+ // single name
+ return list.str
+ }
+
+ l := 0
+ for cur := list; cur != nil; cur = cur.next {
+ l++
+ }
+ strs := make([]*ast.StringLiteralNode, l)
+ for cur, i := list, 0; cur != nil; cur, i = cur.next, i+1 {
+ strs[i] = cur.str
+ }
+ return ast.NewCompoundLiteralStringNode(strs...)
+}
+
+type nameList struct {
+ name ast.StringValueNode
+ comma *ast.RuneNode
+ next *nameList
+}
+
+func (list *nameList) toNodes() ([]ast.StringValueNode, []*ast.RuneNode) {
+ l := 0
+ for cur := list; cur != nil; cur = cur.next {
+ l++
+ }
+ names := make([]ast.StringValueNode, l)
+ commas := make([]*ast.RuneNode, l-1)
+ for cur, i := list, 0; cur != nil; cur, i = cur.next, i+1 {
+ names[i] = cur.name
+ if cur.comma != nil {
+ commas[i] = cur.comma
+ }
+ }
+ return names, commas
+}
+
+type rangeList struct {
+ rng *ast.RangeNode
+ comma *ast.RuneNode
+ next *rangeList
+}
+
+func (list *rangeList) toNodes() ([]*ast.RangeNode, []*ast.RuneNode) {
+ l := 0
+ for cur := list; cur != nil; cur = cur.next {
+ l++
+ }
+ ranges := make([]*ast.RangeNode, l)
+ commas := make([]*ast.RuneNode, l-1)
+ for cur, i := list, 0; cur != nil; cur, i = cur.next, i+1 {
+ ranges[i] = cur.rng
+ if cur.comma != nil {
+ commas[i] = cur.comma
+ }
+ }
+ return ranges, commas
+}
+
+type valueList struct {
+ val ast.ValueNode
+ comma *ast.RuneNode
+ next *valueList
+}
+
+func (list *valueList) toNodes() ([]ast.ValueNode, []*ast.RuneNode) {
+ if list == nil {
+ return nil, nil
+ }
+ l := 0
+ for cur := list; cur != nil; cur = cur.next {
+ l++
+ }
+ vals := make([]ast.ValueNode, l)
+ commas := make([]*ast.RuneNode, l-1)
+ for cur, i := list, 0; cur != nil; cur, i = cur.next, i+1 {
+ vals[i] = cur.val
+ if cur.comma != nil {
+ commas[i] = cur.comma
+ }
+ }
+ return vals, commas
+}
+
+type fieldRefList struct {
+ ref *ast.FieldReferenceNode
+ dot *ast.RuneNode
+ next *fieldRefList
+}
+
+func (list *fieldRefList) toNodes() ([]*ast.FieldReferenceNode, []*ast.RuneNode) {
+ l := 0
+ for cur := list; cur != nil; cur = cur.next {
+ l++
+ }
+ refs := make([]*ast.FieldReferenceNode, l)
+ dots := make([]*ast.RuneNode, l-1)
+ for cur, i := list, 0; cur != nil; cur, i = cur.next, i+1 {
+ refs[i] = cur.ref
+ if cur.dot != nil {
+ dots[i] = cur.dot
+ }
+ }
+
+ return refs, dots
+}
+
+type identList struct {
+ ident *ast.IdentNode
+ dot *ast.RuneNode
+ next *identList
+}
+
+func (list *identList) toIdentValueNode(leadingDot *ast.RuneNode) ast.IdentValueNode {
+ if list.next == nil && leadingDot == nil {
+ // single name
+ return list.ident
+ }
+
+ l := 0
+ for cur := list; cur != nil; cur = cur.next {
+ l++
+ }
+ idents := make([]*ast.IdentNode, l)
+ dots := make([]*ast.RuneNode, l-1)
+ for cur, i := list, 0; cur != nil; cur, i = cur.next, i+1 {
+ idents[i] = cur.ident
+ if cur.dot != nil {
+ dots[i] = cur.dot
+ }
+ }
+
+ return ast.NewCompoundIdentNode(leadingDot, idents, dots)
+}
+
+type messageFieldEntry struct {
+ field *ast.MessageFieldNode
+ delimiter *ast.RuneNode
+}
+
+type messageFieldList struct {
+ field *messageFieldEntry
+ next *messageFieldList
+}
+
+func (list *messageFieldList) toNodes() ([]*ast.MessageFieldNode, []*ast.RuneNode) {
+ if list == nil {
+ return nil, nil
+ }
+ l := 0
+ for cur := list; cur != nil; cur = cur.next {
+ l++
+ }
+ fields := make([]*ast.MessageFieldNode, l)
+ delimiters := make([]*ast.RuneNode, l)
+ for cur, i := list, 0; cur != nil; cur, i = cur.next, i+1 {
+ fields[i] = cur.field.field
+ if cur.field.delimiter != nil {
+ delimiters[i] = cur.field.delimiter
+ }
+ }
+
+ return fields, delimiters
+}
diff --git a/vendor/github.com/bufbuild/protocompile/parser/doc.go b/vendor/github.com/bufbuild/protocompile/parser/doc.go
new file mode 100644
index 000000000..d4e2c75aa
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/parser/doc.go
@@ -0,0 +1,25 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 parser contains the logic for parsing protobuf source code into an
+// AST (abstract syntax tree) and also for converting an AST into a descriptor
+// proto.
+//
+// A FileDescriptorProto is very similar to an AST, but the AST this package
+// uses is more useful because it contains more information about the source
+// code, including details about whitespace and comments, that cannot be
+// represented by a descriptor proto. This makes it ideal for things like
+// code formatters, which may want to preserve things like whitespace and
+// comment format.
+package parser
diff --git a/vendor/github.com/bufbuild/protocompile/parser/errors.go b/vendor/github.com/bufbuild/protocompile/parser/errors.go
new file mode 100644
index 000000000..6e34bb8cf
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/parser/errors.go
@@ -0,0 +1,22 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 parser
+
+import "errors"
+
+// ErrNoSyntax is a sentinel error that may be passed to a warning reporter.
+// The error the reporter receives will be wrapped with source position that
+// indicates the file that had no syntax statement.
+var ErrNoSyntax = errors.New("no syntax specified; defaulting to proto2 syntax")
diff --git a/vendor/github.com/bufbuild/protocompile/parser/lexer.go b/vendor/github.com/bufbuild/protocompile/parser/lexer.go
new file mode 100644
index 000000000..e90779a2c
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/parser/lexer.go
@@ -0,0 +1,693 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 parser
+
+import (
+ "bufio"
+ "bytes"
+ "errors"
+ "fmt"
+ "io"
+ "math"
+ "strconv"
+ "strings"
+ "unicode/utf8"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/reporter"
+)
+
+type runeReader struct {
+ data []byte
+ pos int
+ err error
+ mark int
+ // Enable this check to make input required to be valid UTF-8.
+ // For now, since protoc allows invalid UTF-8, default to false.
+ utf8Strict bool
+}
+
+func (rr *runeReader) readRune() (r rune, size int, err error) {
+ if rr.err != nil {
+ return 0, 0, rr.err
+ }
+ if rr.pos == len(rr.data) {
+ rr.err = io.EOF
+ return 0, 0, rr.err
+ }
+ r, sz := utf8.DecodeRune(rr.data[rr.pos:])
+ if rr.utf8Strict && r == utf8.RuneError {
+ rr.err = fmt.Errorf("invalid UTF8 at offset %d: %x", rr.pos, rr.data[rr.pos])
+ return 0, 0, rr.err
+ }
+ rr.pos += sz
+ return r, sz, nil
+}
+
+func (rr *runeReader) offset() int {
+ return rr.pos
+}
+
+func (rr *runeReader) unreadRune(sz int) {
+ newPos := rr.pos - sz
+ if newPos < rr.mark {
+ panic("unread past mark")
+ }
+ rr.pos = newPos
+}
+
+func (rr *runeReader) setMark() {
+ rr.mark = rr.pos
+}
+
+func (rr *runeReader) getMark() string {
+ return string(rr.data[rr.mark:rr.pos])
+}
+
+type protoLex struct {
+ input *runeReader
+ info *ast.FileInfo
+ handler *reporter.Handler
+ res *ast.FileNode
+
+ prevSym ast.TerminalNode
+ prevOffset int
+ eof ast.Token
+
+ comments []ast.Token
+}
+
+var utf8Bom = []byte{0xEF, 0xBB, 0xBF}
+
+func newLexer(in io.Reader, filename string, handler *reporter.Handler) (*protoLex, error) {
+ br := bufio.NewReader(in)
+
+ // if file has UTF8 byte order marker preface, consume it
+ marker, err := br.Peek(3)
+ if err == nil && bytes.Equal(marker, utf8Bom) {
+ _, _ = br.Discard(3)
+ }
+
+ contents, err := io.ReadAll(br)
+ if err != nil {
+ return nil, err
+ }
+ return &protoLex{
+ input: &runeReader{data: contents},
+ info: ast.NewFileInfo(filename, contents),
+ handler: handler,
+ }, nil
+}
+
+var keywords = map[string]int{
+ "syntax": _SYNTAX,
+ "import": _IMPORT,
+ "weak": _WEAK,
+ "public": _PUBLIC,
+ "package": _PACKAGE,
+ "option": _OPTION,
+ "true": _TRUE,
+ "false": _FALSE,
+ "inf": _INF,
+ "nan": _NAN,
+ "repeated": _REPEATED,
+ "optional": _OPTIONAL,
+ "required": _REQUIRED,
+ "double": _DOUBLE,
+ "float": _FLOAT,
+ "int32": _INT32,
+ "int64": _INT64,
+ "uint32": _UINT32,
+ "uint64": _UINT64,
+ "sint32": _SINT32,
+ "sint64": _SINT64,
+ "fixed32": _FIXED32,
+ "fixed64": _FIXED64,
+ "sfixed32": _SFIXED32,
+ "sfixed64": _SFIXED64,
+ "bool": _BOOL,
+ "string": _STRING,
+ "bytes": _BYTES,
+ "group": _GROUP,
+ "oneof": _ONEOF,
+ "map": _MAP,
+ "extensions": _EXTENSIONS,
+ "to": _TO,
+ "max": _MAX,
+ "reserved": _RESERVED,
+ "enum": _ENUM,
+ "message": _MESSAGE,
+ "extend": _EXTEND,
+ "service": _SERVICE,
+ "rpc": _RPC,
+ "stream": _STREAM,
+ "returns": _RETURNS,
+}
+
+func (l *protoLex) maybeNewLine(r rune) {
+ if r == '\n' {
+ l.info.AddLine(l.input.offset())
+ }
+}
+
+func (l *protoLex) prev() ast.SourcePos {
+ return l.info.SourcePos(l.prevOffset)
+}
+
+func (l *protoLex) Lex(lval *protoSymType) int {
+ if l.handler.ReporterError() != nil {
+ // if error reporter already returned non-nil error,
+ // we can skip the rest of the input
+ return 0
+ }
+
+ l.comments = nil
+
+ for {
+ l.input.setMark()
+
+ l.prevOffset = l.input.offset()
+ c, _, err := l.input.readRune()
+ if err == io.EOF {
+ // we're not actually returning a rune, but this will associate
+ // accumulated comments as a trailing comment on last symbol
+ // (if appropriate)
+ l.setRune(lval, 0)
+ l.eof = lval.b.Token()
+ return 0
+ }
+ if err != nil {
+ l.setError(lval, err)
+ return _ERROR
+ }
+
+ if strings.ContainsRune("\n\r\t\f\v ", c) {
+ // skip whitespace
+ l.maybeNewLine(c)
+ continue
+ }
+
+ if c == '.' {
+ // decimal literals could start with a dot
+ cn, szn, err := l.input.readRune()
+ if err != nil {
+ l.setRune(lval, c)
+ return int(c)
+ }
+ if cn >= '0' && cn <= '9' {
+ l.readNumber()
+ token := l.input.getMark()
+ f, err := parseFloat(token)
+ if err != nil {
+ l.setError(lval, numError(err, "float", token))
+ return _ERROR
+ }
+ l.setFloat(lval, f)
+ return _FLOAT_LIT
+ }
+ l.input.unreadRune(szn)
+ l.setRune(lval, c)
+ return int(c)
+ }
+
+ if c == '_' || (c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') {
+ // identifier
+ l.readIdentifier()
+ str := l.input.getMark()
+ if t, ok := keywords[str]; ok {
+ l.setIdent(lval, str)
+ return t
+ }
+ l.setIdent(lval, str)
+ return _NAME
+ }
+
+ if c >= '0' && c <= '9' {
+ // integer or float literal
+ l.readNumber()
+ token := l.input.getMark()
+ if strings.HasPrefix(token, "0x") || strings.HasPrefix(token, "0X") {
+ // hexadecimal
+ ui, err := strconv.ParseUint(token[2:], 16, 64)
+ if err != nil {
+ l.setError(lval, numError(err, "hexadecimal integer", token[2:]))
+ return _ERROR
+ }
+ l.setInt(lval, ui)
+ return _INT_LIT
+ }
+ if strings.ContainsAny(token, ".eE") {
+ // floating point!
+ f, err := parseFloat(token)
+ if err != nil {
+ l.setError(lval, numError(err, "float", token))
+ return _ERROR
+ }
+ l.setFloat(lval, f)
+ return _FLOAT_LIT
+ }
+ // integer! (decimal or octal)
+ base := 10
+ if token[0] == '0' {
+ base = 8
+ }
+ ui, err := strconv.ParseUint(token, base, 64)
+ if err != nil {
+ kind := "integer"
+ if base == 8 {
+ kind = "octal integer"
+ } else if numErr, ok := err.(*strconv.NumError); ok && numErr.Err == strconv.ErrRange {
+ // if it's too big to be an int, parse it as a float
+ var f float64
+ kind = "float"
+ f, err = parseFloat(token)
+ if err == nil {
+ l.setFloat(lval, f)
+ return _FLOAT_LIT
+ }
+ }
+ l.setError(lval, numError(err, kind, token))
+ return _ERROR
+ }
+ l.setInt(lval, ui)
+ return _INT_LIT
+ }
+
+ if c == '\'' || c == '"' {
+ // string literal
+ str, err := l.readStringLiteral(c)
+ if err != nil {
+ l.setError(lval, err)
+ return _ERROR
+ }
+ l.setString(lval, str)
+ return _STRING_LIT
+ }
+
+ if c == '/' {
+ // comment
+ cn, szn, err := l.input.readRune()
+ if err != nil {
+ l.setRune(lval, '/')
+ return int(c)
+ }
+ if cn == '/' {
+ if hasErr := l.skipToEndOfLineComment(lval); hasErr {
+ return _ERROR
+ }
+ l.comments = append(l.comments, l.newToken())
+ continue
+ }
+ if cn == '*' {
+ ok, hasErr := l.skipToEndOfBlockComment(lval)
+ if hasErr {
+ return _ERROR
+ }
+ if !ok {
+ l.setError(lval, errors.New("block comment never terminates, unexpected EOF"))
+ return _ERROR
+ }
+ l.comments = append(l.comments, l.newToken())
+ continue
+ }
+ l.input.unreadRune(szn)
+ }
+
+ if c < 32 || c == 127 {
+ l.setError(lval, errors.New("invalid control character"))
+ return _ERROR
+ }
+ if !strings.ContainsRune(";,.:=-+(){}[]<>/", c) {
+ l.setError(lval, errors.New("invalid character"))
+ return _ERROR
+ }
+ l.setRune(lval, c)
+ return int(c)
+ }
+}
+
+func parseFloat(token string) (float64, error) {
+ // strconv.ParseFloat allows _ to separate digits, but protobuf does not
+ if strings.ContainsRune(token, '_') {
+ return 0, &strconv.NumError{
+ Func: "parseFloat",
+ Num: token,
+ Err: strconv.ErrSyntax,
+ }
+ }
+ f, err := strconv.ParseFloat(token, 64)
+ if err == nil {
+ return f, nil
+ }
+ if numErr, ok := err.(*strconv.NumError); ok && numErr.Err == strconv.ErrRange && math.IsInf(f, 1) {
+ // protoc doesn't complain about float overflow and instead just uses "infinity"
+ // so we mirror that behavior by just returning infinity and ignoring the error
+ return f, nil
+ }
+ return f, err
+}
+
+func (l *protoLex) newToken() ast.Token {
+ offset := l.input.mark
+ length := l.input.pos - l.input.mark
+ return l.info.AddToken(offset, length)
+}
+
+func (l *protoLex) setPrevAndAddComments(n ast.TerminalNode) {
+ comments := l.comments
+ l.comments = nil
+ var prevTrailingComments []ast.Token
+ if l.prevSym != nil && len(comments) > 0 {
+ prevEnd := l.info.NodeInfo(l.prevSym).End().Line
+ info := l.info.NodeInfo(n)
+ nStart := info.Start().Line
+ if nStart == prevEnd {
+ if rn, ok := n.(*ast.RuneNode); ok && rn.Rune == 0 {
+ // if current token is EOF, pretend its on separate line
+ // so that the logic below can attribute a final trailing
+ // comment to the previous token
+ nStart++
+ }
+ }
+ c := comments[0]
+ commentInfo := l.info.TokenInfo(c)
+ commentStart := commentInfo.Start().Line
+ if nStart > prevEnd && commentStart == prevEnd {
+ // Comment starts right after the previous token. If it's a
+ // line comment, we record that as a trailing comment.
+ //
+ // But if it's a block comment, it is only a trailing comment
+ // if there are multiple comments or if the block comment ends
+ // on a line before n.
+ canDonate := strings.HasPrefix(commentInfo.RawText(), "//") ||
+ len(comments) > 1 || commentInfo.End().Line < nStart
+
+ if canDonate {
+ prevTrailingComments = comments[:1]
+ comments = comments[1:]
+ }
+ }
+ }
+
+ // now we can associate comments
+ for _, c := range prevTrailingComments {
+ l.info.AddComment(c, l.prevSym.Token())
+ }
+ for _, c := range comments {
+ l.info.AddComment(c, n.Token())
+ }
+
+ l.prevSym = n
+}
+
+func (l *protoLex) setString(lval *protoSymType, val string) {
+ lval.s = ast.NewStringLiteralNode(val, l.newToken())
+ l.setPrevAndAddComments(lval.s)
+}
+
+func (l *protoLex) setIdent(lval *protoSymType, val string) {
+ lval.id = ast.NewIdentNode(val, l.newToken())
+ l.setPrevAndAddComments(lval.id)
+}
+
+func (l *protoLex) setInt(lval *protoSymType, val uint64) {
+ lval.i = ast.NewUintLiteralNode(val, l.newToken())
+ l.setPrevAndAddComments(lval.i)
+}
+
+func (l *protoLex) setFloat(lval *protoSymType, val float64) {
+ lval.f = ast.NewFloatLiteralNode(val, l.newToken())
+ l.setPrevAndAddComments(lval.f)
+}
+
+func (l *protoLex) setRune(lval *protoSymType, val rune) {
+ lval.b = ast.NewRuneNode(val, l.newToken())
+ l.setPrevAndAddComments(lval.b)
+}
+
+func (l *protoLex) setError(lval *protoSymType, err error) {
+ lval.err = l.addSourceError(err)
+}
+
+func (l *protoLex) readNumber() {
+ allowExpSign := false
+ for {
+ c, sz, err := l.input.readRune()
+ if err != nil {
+ break
+ }
+ if (c == '-' || c == '+') && !allowExpSign {
+ l.input.unreadRune(sz)
+ break
+ }
+ allowExpSign = false
+ if c != '.' && c != '_' && (c < '0' || c > '9') &&
+ (c < 'a' || c > 'z') && (c < 'A' || c > 'Z') &&
+ c != '-' && c != '+' {
+ // no more chars in the number token
+ l.input.unreadRune(sz)
+ break
+ }
+ if c == 'e' || c == 'E' {
+ // scientific notation char can be followed by
+ // an exponent sign
+ allowExpSign = true
+ }
+ }
+}
+
+func numError(err error, kind, s string) error {
+ ne, ok := err.(*strconv.NumError)
+ if !ok {
+ return err
+ }
+ if ne.Err == strconv.ErrRange {
+ return fmt.Errorf("value out of range for %s: %s", kind, s)
+ }
+ // syntax error
+ return fmt.Errorf("invalid syntax in %s value: %s", kind, s)
+}
+
+func (l *protoLex) readIdentifier() {
+ for {
+ c, sz, err := l.input.readRune()
+ if err != nil {
+ break
+ }
+ if c != '_' && (c < 'a' || c > 'z') && (c < 'A' || c > 'Z') && (c < '0' || c > '9') {
+ l.input.unreadRune(sz)
+ break
+ }
+ }
+}
+
+func (l *protoLex) readStringLiteral(quote rune) (string, error) {
+ var buf bytes.Buffer
+ for {
+ c, _, err := l.input.readRune()
+ if err != nil {
+ if err == io.EOF {
+ err = io.ErrUnexpectedEOF
+ }
+ return "", err
+ }
+ if c == '\n' {
+ return "", errors.New("encountered end-of-line before end of string literal")
+ }
+ if c == quote {
+ break
+ }
+ if c == 0 {
+ return "", errors.New("null character ('\\0') not allowed in string literal")
+ }
+ if c == '\\' {
+ // escape sequence
+ c, _, err = l.input.readRune()
+ if err != nil {
+ return "", err
+ }
+ switch {
+ case c == 'x' || c == 'X':
+ // hex escape
+ c, _, err := l.input.readRune()
+ if err != nil {
+ return "", err
+ }
+ c2, sz2, err := l.input.readRune()
+ if err != nil {
+ return "", err
+ }
+ var hex string
+ if (c2 < '0' || c2 > '9') && (c2 < 'a' || c2 > 'f') && (c2 < 'A' || c2 > 'F') {
+ l.input.unreadRune(sz2)
+ hex = string(c)
+ } else {
+ hex = string([]rune{c, c2})
+ }
+ i, err := strconv.ParseInt(hex, 16, 32)
+ if err != nil {
+ return "", fmt.Errorf("invalid hex escape: \\x%q", hex)
+ }
+ buf.WriteByte(byte(i))
+ case c >= '0' && c <= '7':
+ // octal escape
+ c2, sz2, err := l.input.readRune()
+ if err != nil {
+ return "", err
+ }
+ var octal string
+ if c2 < '0' || c2 > '7' {
+ l.input.unreadRune(sz2)
+ octal = string(c)
+ } else {
+ c3, sz3, err := l.input.readRune()
+ if err != nil {
+ return "", err
+ }
+ if c3 < '0' || c3 > '7' {
+ l.input.unreadRune(sz3)
+ octal = string([]rune{c, c2})
+ } else {
+ octal = string([]rune{c, c2, c3})
+ }
+ }
+ i, err := strconv.ParseInt(octal, 8, 32)
+ if err != nil {
+ return "", fmt.Errorf("invalid octal escape: \\%q", octal)
+ }
+ if i > 0xff {
+ return "", fmt.Errorf("octal escape is out range, must be between 0 and 377: \\%q", octal)
+ }
+ buf.WriteByte(byte(i))
+ case c == 'u':
+ // short unicode escape
+ u := make([]rune, 4)
+ for i := range u {
+ c, _, err := l.input.readRune()
+ if err != nil {
+ return "", err
+ }
+ u[i] = c
+ }
+ i, err := strconv.ParseInt(string(u), 16, 32)
+ if err != nil {
+ return "", fmt.Errorf("invalid unicode escape: \\u%q", string(u))
+ }
+ buf.WriteRune(rune(i))
+ case c == 'U':
+ // long unicode escape
+ u := make([]rune, 8)
+ for i := range u {
+ c, _, err := l.input.readRune()
+ if err != nil {
+ return "", err
+ }
+ u[i] = c
+ }
+ i, err := strconv.ParseInt(string(u), 16, 32)
+ if err != nil {
+ return "", fmt.Errorf("invalid unicode escape: \\U%q", string(u))
+ }
+ if i > 0x10ffff || i < 0 {
+ return "", fmt.Errorf("unicode escape is out of range, must be between 0 and 0x10ffff: \\U%q", string(u))
+ }
+ buf.WriteRune(rune(i))
+ case c == 'a':
+ buf.WriteByte('\a')
+ case c == 'b':
+ buf.WriteByte('\b')
+ case c == 'f':
+ buf.WriteByte('\f')
+ case c == 'n':
+ buf.WriteByte('\n')
+ case c == 'r':
+ buf.WriteByte('\r')
+ case c == 't':
+ buf.WriteByte('\t')
+ case c == 'v':
+ buf.WriteByte('\v')
+ case c == '\\':
+ buf.WriteByte('\\')
+ case c == '\'':
+ buf.WriteByte('\'')
+ case c == '"':
+ buf.WriteByte('"')
+ case c == '?':
+ buf.WriteByte('?')
+ default:
+ return "", fmt.Errorf("invalid escape sequence: %q", "\\"+string(c))
+ }
+ } else {
+ buf.WriteRune(c)
+ }
+ }
+ return buf.String(), nil
+}
+
+func (l *protoLex) skipToEndOfLineComment(lval *protoSymType) (hasErr bool) {
+ for {
+ c, sz, err := l.input.readRune()
+ if err != nil {
+ // eof
+ return false
+ }
+ switch c {
+ case '\n':
+ // don't include newline in the comment
+ l.input.unreadRune(sz)
+ return false
+ case 0:
+ l.setError(lval, errors.New("invalid control character"))
+ return true
+ }
+ }
+}
+
+func (l *protoLex) skipToEndOfBlockComment(lval *protoSymType) (ok, hasErr bool) {
+ for {
+ c, _, err := l.input.readRune()
+ if err != nil {
+ return false, false
+ }
+ if c == 0 {
+ l.setError(lval, errors.New("invalid control character"))
+ return false, true
+ }
+ l.maybeNewLine(c)
+ if c == '*' {
+ c, sz, err := l.input.readRune()
+ if err != nil {
+ return false, false
+ }
+ if c == '/' {
+ return true, false
+ }
+ l.input.unreadRune(sz)
+ }
+ }
+}
+
+func (l *protoLex) addSourceError(err error) reporter.ErrorWithPos {
+ ewp, ok := err.(reporter.ErrorWithPos)
+ if !ok {
+ ewp = reporter.Error(l.prev(), err)
+ }
+ _ = l.handler.HandleError(ewp)
+ return ewp
+}
+
+func (l *protoLex) Error(s string) {
+ _ = l.addSourceError(errors.New(s))
+}
diff --git a/vendor/github.com/bufbuild/protocompile/parser/parser.go b/vendor/github.com/bufbuild/protocompile/parser/parser.go
new file mode 100644
index 000000000..c6494ad87
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/parser/parser.go
@@ -0,0 +1,180 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 parser
+
+import (
+ "fmt"
+ "io"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/reporter"
+)
+
+//go:generate goyacc -o proto.y.go -l -p proto proto.y
+
+func init() {
+ protoErrorVerbose = true
+
+ // fix up the generated "token name" array so that error messages are nicer
+ setTokenName(_STRING_LIT, "string literal")
+ setTokenName(_INT_LIT, "int literal")
+ setTokenName(_FLOAT_LIT, "float literal")
+ setTokenName(_NAME, "identifier")
+ setTokenName(_ERROR, "error")
+ // for keywords, just show the keyword itself wrapped in quotes
+ for str, i := range keywords {
+ setTokenName(i, fmt.Sprintf(`"%s"`, str))
+ }
+}
+
+func setTokenName(token int, text string) {
+ // NB: this is based on logic in generated parse code that translates the
+ // int returned from the lexer into an internal token number.
+ var intern int8
+ if token < len(protoTok1) {
+ intern = protoTok1[token]
+ } else {
+ if token >= protoPrivate {
+ if token < protoPrivate+len(protoTok2) {
+ intern = protoTok2[token-protoPrivate]
+ }
+ }
+ if intern == 0 {
+ for i := 0; i+1 < len(protoTok3); i += 2 {
+ if int(protoTok3[i]) == token {
+ intern = protoTok3[i+1]
+ break
+ }
+ }
+ }
+ }
+
+ if intern >= 1 && int(intern-1) < len(protoToknames) {
+ protoToknames[intern-1] = text
+ return
+ }
+
+ panic(fmt.Sprintf("Unknown token value: %d", token))
+}
+
+// Parse parses the given source code info and returns an AST. The given filename
+// is used to construct error messages and position information. The given reader
+// supplies the source code. The given handler is used to report errors and
+// warnings encountered while parsing. If any errors are reported, this function
+// returns a non-nil error.
+func Parse(filename string, r io.Reader, handler *reporter.Handler) (*ast.FileNode, error) {
+ lx, err := newLexer(r, filename, handler)
+ if err != nil {
+ return nil, err
+ }
+ protoParse(lx)
+ if lx.res == nil {
+ // nil AST means there was an error that prevented any parsing
+ // or the file was empty; synthesize empty non-nil AST
+ lx.res = ast.NewEmptyFileNode(filename)
+ }
+ return lx.res, handler.Error()
+}
+
+// Result is the result of constructing a descriptor proto from a parsed AST.
+// From this result, the AST and the file descriptor proto can be had. This
+// also contains numerous lookup functions, for looking up AST nodes that
+// correspond to various elements of the descriptor hierarchy.
+//
+// Results can be created without AST information, using the ResultWithoutAST()
+// function. All functions other than AST() will still return non-nil values,
+// allowing compile operations to work with files that have only intermediate
+// descriptor protos and no source code. For such results, the function that
+// return AST nodes will return placeholder nodes. The position information for
+// placeholder nodes contains only the filename.
+type Result interface {
+ // AST returns the parsed abstract syntax tree. This returns nil if the
+ // Result was created without an AST.
+ AST() *ast.FileNode
+ // FileDescriptorProto returns the file descriptor proto.
+ FileDescriptorProto() *descriptorpb.FileDescriptorProto
+
+ // FileNode returns the root of the AST. If this result has no AST then a
+ // placeholder node is returned.
+ FileNode() ast.FileDeclNode
+ // Node returns the AST node from which the given message was created. This
+ // can return nil, such as if the given message is not part of the
+ // FileDescriptorProto hierarchy. If this result has no AST, this returns a
+ // placeholder node.
+ Node(proto.Message) ast.Node
+ // OptionNode returns the AST node corresponding to the given uninterpreted
+ // option. This can return nil, such as if the given option is not part of
+ // the FileDescriptorProto hierarchy. If this result has no AST, this
+ // returns a placeholder node.
+ OptionNode(*descriptorpb.UninterpretedOption) ast.OptionDeclNode
+ // OptionNamePartNode returns the AST node corresponding to the given name
+ // part for an uninterpreted option. This can return nil, such as if the
+ // given name part is not part of the FileDescriptorProto hierarchy. If this
+ // result has no AST, this returns a placeholder node.
+ OptionNamePartNode(*descriptorpb.UninterpretedOption_NamePart) ast.Node
+ // MessageNode returns the AST node corresponding to the given message. This
+ // can return nil, such as if the given message is not part of the
+ // FileDescriptorProto hierarchy. If this result has no AST, this returns a
+ // placeholder node.
+ MessageNode(*descriptorpb.DescriptorProto) ast.MessageDeclNode
+ // FieldNode returns the AST node corresponding to the given field. This can
+ // return nil, such as if the given field is not part of the
+ // FileDescriptorProto hierarchy. If this result has no AST, this returns a
+ // placeholder node.
+ FieldNode(*descriptorpb.FieldDescriptorProto) ast.FieldDeclNode
+ // OneOfNode returns the AST node corresponding to the given oneof. This can
+ // return nil, such as if the given oneof is not part of the
+ // FileDescriptorProto hierarchy. If this result has no AST, this returns a
+ // placeholder node.
+ OneOfNode(*descriptorpb.OneofDescriptorProto) ast.Node
+ // ExtensionRangeNode returns the AST node corresponding to the given
+ // extension range. This can return nil, such as if the given range is not
+ // part of the FileDescriptorProto hierarchy. If this result has no AST,
+ // this returns a placeholder node.
+ ExtensionRangeNode(*descriptorpb.DescriptorProto_ExtensionRange) ast.RangeDeclNode
+ // MessageReservedRangeNode returns the AST node corresponding to the given
+ // reserved range. This can return nil, such as if the given range is not
+ // part of the FileDescriptorProto hierarchy. If this result has no AST,
+ // this returns a placeholder node.
+ MessageReservedRangeNode(*descriptorpb.DescriptorProto_ReservedRange) ast.RangeDeclNode
+ // EnumNode returns the AST node corresponding to the given enum. This can
+ // return nil, such as if the given enum is not part of the
+ // FileDescriptorProto hierarchy. If this result has no AST, this returns a
+ // placeholder node.
+ EnumNode(*descriptorpb.EnumDescriptorProto) ast.Node
+ // EnumValueNode returns the AST node corresponding to the given enum. This
+ // can return nil, such as if the given enum value is not part of the
+ // FileDescriptorProto hierarchy. If this result has no AST, this returns a
+ // placeholder node.
+ EnumValueNode(*descriptorpb.EnumValueDescriptorProto) ast.EnumValueDeclNode
+ // EnumReservedRangeNode returns the AST node corresponding to the given
+ // reserved range. This can return nil, such as if the given range is not
+ // part of the FileDescriptorProto hierarchy. If this result has no AST,
+ // this returns a placeholder node.
+ EnumReservedRangeNode(*descriptorpb.EnumDescriptorProto_EnumReservedRange) ast.RangeDeclNode
+ // ServiceNode returns the AST node corresponding to the given service. This
+ // can return nil, such as if the given service is not part of the
+ // FileDescriptorProto hierarchy. If this result has no AST, this returns a
+ // placeholder node.
+ ServiceNode(*descriptorpb.ServiceDescriptorProto) ast.Node
+ // MethodNode returns the AST node corresponding to the given method. This
+ // can return nil, such as if the given method is not part of the
+ // FileDescriptorProto hierarchy. If this result has no AST, this returns a
+ // placeholder node.
+ MethodNode(*descriptorpb.MethodDescriptorProto) ast.RPCDeclNode
+}
diff --git a/vendor/github.com/bufbuild/protocompile/parser/proto.y b/vendor/github.com/bufbuild/protocompile/parser/proto.y
new file mode 100644
index 000000000..78a6c8069
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/parser/proto.y
@@ -0,0 +1,1219 @@
+%{
+package parser
+
+//lint:file-ignore SA4006 generated parser has unused values
+
+import (
+ "math"
+
+ "github.com/bufbuild/protocompile/ast"
+)
+
+%}
+
+// fields inside this union end up as the fields in a structure known
+// as ${PREFIX}SymType, of which a reference is passed to the lexer.
+%union{
+ file *ast.FileNode
+ syn *ast.SyntaxNode
+ fileDecl ast.FileElement
+ fileDecls []ast.FileElement
+ pkg *ast.PackageNode
+ imprt *ast.ImportNode
+ msg *ast.MessageNode
+ msgDecl ast.MessageElement
+ msgDecls []ast.MessageElement
+ fld *ast.FieldNode
+ mapFld *ast.MapFieldNode
+ mapType *ast.MapTypeNode
+ grp *ast.GroupNode
+ oo *ast.OneOfNode
+ ooDecl ast.OneOfElement
+ ooDecls []ast.OneOfElement
+ ext *ast.ExtensionRangeNode
+ resvd *ast.ReservedNode
+ en *ast.EnumNode
+ enDecl ast.EnumElement
+ enDecls []ast.EnumElement
+ env *ast.EnumValueNode
+ extend *ast.ExtendNode
+ extDecl ast.ExtendElement
+ extDecls []ast.ExtendElement
+ svc *ast.ServiceNode
+ svcDecl ast.ServiceElement
+ svcDecls []ast.ServiceElement
+ mtd *ast.RPCNode
+ rpcType *ast.RPCTypeNode
+ rpcDecl ast.RPCElement
+ rpcDecls []ast.RPCElement
+ opt *ast.OptionNode
+ opts *compactOptionList
+ ref *ast.FieldReferenceNode
+ optNms *fieldRefList
+ cmpctOpts *ast.CompactOptionsNode
+ rng *ast.RangeNode
+ rngs *rangeList
+ names *nameList
+ cid *identList
+ tid ast.IdentValueNode
+ sl *valueList
+ msgField *ast.MessageFieldNode
+ msgEntry *messageFieldEntry
+ msgLit *messageFieldList
+ v ast.ValueNode
+ il ast.IntValueNode
+ str *stringList
+ s *ast.StringLiteralNode
+ i *ast.UintLiteralNode
+ f *ast.FloatLiteralNode
+ id *ast.IdentNode
+ b *ast.RuneNode
+ err error
+}
+
+// any non-terminal which returns a value needs a type, which is
+// really a field name in the above union struct
+%type file
+%type syntax
+%type fileDecl
+%type fileDecls
+%type import
+%type package
+%type option compactOption
+%type compactOptionDecls
+%type rpcDecl
+%type rpcDecls
+%type [ optionNameComponent aggName
+%type ] optionName
+%type compactOptions
+%type constant scalarConstant aggregate msgLit numLit
+%type intLit
+%type name keyType msgElementName extElementName oneofElementName enumElementName
+%type ident msgElementIdent extElementIdent oneofElementIdent
+%type typeIdent msgElementTypeIdent extElementTypeIdent oneofElementTypeIdent
+%type constantList msgList
+%type aggFieldEntry
+%type aggField
+%type aggFields
+%type msgField oneofField extField
+%type oneof
+%type group oneofGroup
+%type mapField
+%type mapType
+%type message
+%type messageDecl
+%type messageDecls
+%type ooDecl
+%type ooDecls
+%type fieldNames
+%type msgReserved enumReserved reservedNames
+%type tagRange enumRange
+%type tagRanges enumRanges
+%type extensions
+%type enum
+%type enumDecl
+%type enumDecls
+%type enumValue
+%type extend
+%type extendDecl
+%type extendDecls
+%type stringLit
+%type service
+%type serviceDecl
+%type serviceDecls
+%type rpc
+%type rpcType
+
+// same for terminals
+%token _STRING_LIT
+%token _INT_LIT
+%token _FLOAT_LIT
+%token _NAME
+%token _SYNTAX _IMPORT _WEAK _PUBLIC _PACKAGE _OPTION _TRUE _FALSE _INF _NAN _REPEATED _OPTIONAL _REQUIRED
+%token _DOUBLE _FLOAT _INT32 _INT64 _UINT32 _UINT64 _SINT32 _SINT64 _FIXED32 _FIXED64 _SFIXED32 _SFIXED64
+%token _BOOL _STRING _BYTES _GROUP _ONEOF _MAP _EXTENSIONS _TO _MAX _RESERVED _ENUM _MESSAGE _EXTEND
+%token _SERVICE _RPC _STREAM _RETURNS
+%token _ERROR
+// we define all of these, even ones that aren't used, to improve error messages
+// so it shows the unexpected symbol instead of showing "$unk"
+%token '=' ';' ':' '{' '}' '\\' '/' '?' '.' ',' '>' '<' '+' '-' '(' ')' '[' ']' '*' '&' '^' '%' '$' '#' '@' '!' '~' '`'
+
+%%
+
+file : syntax {
+ lex := protolex.(*protoLex)
+ $$ = ast.NewFileNode(lex.info, $1, nil, lex.eof)
+ lex.res = $$
+ }
+ | fileDecls {
+ lex := protolex.(*protoLex)
+ $$ = ast.NewFileNode(lex.info, nil, $1, lex.eof)
+ lex.res = $$
+ }
+ | syntax fileDecls {
+ lex := protolex.(*protoLex)
+ $$ = ast.NewFileNode(lex.info, $1, $2, lex.eof)
+ lex.res = $$
+ }
+ | {
+ lex := protolex.(*protoLex)
+ $$ = ast.NewFileNode(lex.info, nil, nil, lex.eof)
+ lex.res = $$
+ }
+
+fileDecls : fileDecls fileDecl {
+ if $2 != nil {
+ $$ = append($1, $2)
+ } else {
+ $$ = $1
+ }
+ }
+ | fileDecl {
+ if $1 != nil {
+ $$ = []ast.FileElement{$1}
+ } else {
+ $$ = nil
+ }
+ }
+
+fileDecl : import {
+ $$ = $1
+ }
+ | package {
+ $$ = $1
+ }
+ | option {
+ $$ = $1
+ }
+ | message {
+ $$ = $1
+ }
+ | enum {
+ $$ = $1
+ }
+ | extend {
+ $$ = $1
+ }
+ | service {
+ $$ = $1
+ }
+ | ';' {
+ $$ = ast.NewEmptyDeclNode($1)
+ }
+ | error ';' {
+ $$ = nil
+ }
+ | error {
+ $$ = nil
+ }
+
+syntax : _SYNTAX '=' stringLit ';' {
+ $$ = ast.NewSyntaxNode($1.ToKeyword(), $2, $3.toStringValueNode(), $4)
+ }
+
+import : _IMPORT stringLit ';' {
+ $$ = ast.NewImportNode($1.ToKeyword(), nil, nil, $2.toStringValueNode(), $3)
+ }
+ | _IMPORT _WEAK stringLit ';' {
+ $$ = ast.NewImportNode($1.ToKeyword(), nil, $2.ToKeyword(), $3.toStringValueNode(), $4)
+ }
+ | _IMPORT _PUBLIC stringLit ';' {
+ $$ = ast.NewImportNode($1.ToKeyword(), $2.ToKeyword(), nil, $3.toStringValueNode(), $4)
+ }
+
+package : _PACKAGE ident ';' {
+ $$ = ast.NewPackageNode($1.ToKeyword(), $2.toIdentValueNode(nil), $3)
+ }
+
+ident : name {
+ $$ = &identList{$1, nil, nil}
+ }
+ | name '.' ident {
+ $$ = &identList{$1, $2, $3}
+ }
+
+// to mimic limitations of protoc recursive-descent parser,
+// we don't allowed message statement keywords as identifiers
+// (or oneof statement keywords [e.g. "option"] below)
+
+msgElementIdent : msgElementName {
+ $$ = &identList{$1, nil, nil}
+ }
+ | msgElementName '.' ident {
+ $$ = &identList{$1, $2, $3}
+ }
+
+extElementIdent : extElementName {
+ $$ = &identList{$1, nil, nil}
+ }
+ | extElementName '.' ident {
+ $$ = &identList{$1, $2, $3}
+ }
+
+oneofElementIdent : oneofElementName {
+ $$ = &identList{$1, nil, nil}
+ }
+ | oneofElementName '.' ident {
+ $$ = &identList{$1, $2, $3}
+ }
+
+option : _OPTION optionName '=' constant ';' {
+ refs, dots := $2.toNodes()
+ optName := ast.NewOptionNameNode(refs, dots)
+ $$ = ast.NewOptionNode($1.ToKeyword(), optName, $3, $4, $5)
+ }
+
+optionName : optionNameComponent {
+ $$ = &fieldRefList{$1, nil, nil}
+ }
+ | optionNameComponent '.' optionName {
+ $$ = &fieldRefList{$1, $2, $3}
+ }
+
+optionNameComponent : name {
+ $$ = ast.NewFieldReferenceNode($1)
+ }
+ | '(' typeIdent ')' {
+ $$ = ast.NewExtensionFieldReferenceNode($1, $2, $3)
+ }
+
+constant : scalarConstant
+ | aggregate
+
+scalarConstant : stringLit {
+ $$ = $1.toStringValueNode()
+ }
+ | numLit
+ | name {
+ $$ = $1
+ }
+
+numLit : _FLOAT_LIT {
+ $$ = $1
+ }
+ | '-' _FLOAT_LIT {
+ $$ = ast.NewSignedFloatLiteralNode($1, $2)
+ }
+ | '+' _FLOAT_LIT {
+ $$ = ast.NewSignedFloatLiteralNode($1, $2)
+ }
+ | '+' _INF {
+ f := ast.NewSpecialFloatLiteralNode($2.ToKeyword())
+ $$ = ast.NewSignedFloatLiteralNode($1, f)
+ }
+ | '-' _INF {
+ f := ast.NewSpecialFloatLiteralNode($2.ToKeyword())
+ $$ = ast.NewSignedFloatLiteralNode($1, f)
+ }
+ | _INT_LIT {
+ $$ = $1
+ }
+ | '+' _INT_LIT {
+ $$ = ast.NewPositiveUintLiteralNode($1, $2)
+ }
+ | '-' _INT_LIT {
+ if $2.Val > math.MaxInt64 + 1 {
+ // can't represent as int so treat as float literal
+ $$ = ast.NewSignedFloatLiteralNode($1, $2)
+ } else {
+ $$ = ast.NewNegativeIntLiteralNode($1, $2)
+ }
+ }
+
+stringLit : _STRING_LIT {
+ $$ = &stringList{$1, nil}
+ }
+ | _STRING_LIT stringLit {
+ $$ = &stringList{$1, $2}
+ }
+
+aggregate : '{' aggFields '}' {
+ fields, delims := $2.toNodes()
+ $$ = ast.NewMessageLiteralNode($1, fields, delims, $3)
+ }
+ | '{' error '}' {
+ $$ = nil
+ }
+
+aggFields : aggField {
+ if $1 != nil {
+ $$ = &messageFieldList{$1, nil}
+ } else {
+ $$ = nil
+ }
+ }
+ | aggField aggFields {
+ if $1 != nil {
+ $$ = &messageFieldList{$1, $2}
+ } else {
+ $$ = $2
+ }
+ }
+ | {
+ $$ = nil
+ }
+
+aggField : aggFieldEntry {
+ if $1 != nil {
+ $$ = &messageFieldEntry{$1, nil}
+ } else {
+ $$ = nil
+ }
+ }
+ | aggFieldEntry ',' {
+ if $1 != nil {
+ $$ = &messageFieldEntry{$1, $2}
+ } else {
+ $$ = nil
+ }
+ }
+ | aggFieldEntry ';' {
+ if $1 != nil {
+ $$ = &messageFieldEntry{$1, $2}
+ } else {
+ $$ = nil
+ }
+ }
+ | error ',' {
+ $$ = nil
+ }
+ | error ';' {
+ $$ = nil
+ }
+ | error {
+ $$ = nil
+ }
+
+aggFieldEntry : aggName ':' scalarConstant {
+ if $1 != nil {
+ $$ = ast.NewMessageFieldNode($1, $2, $3)
+ } else {
+ $$ = nil
+ }
+ }
+ | aggName '[' ']' {
+ if $1 != nil {
+ val := ast.NewArrayLiteralNode($2, nil, nil, $3)
+ $$ = ast.NewMessageFieldNode($1, nil, val)
+ } else {
+ $$ = nil
+ }
+ }
+ | aggName ':' '[' ']' {
+ if $1 != nil {
+ val := ast.NewArrayLiteralNode($3, nil, nil, $4)
+ $$ = ast.NewMessageFieldNode($1, $2, val)
+ } else {
+ $$ = nil
+ }
+ }
+ | aggName '[' msgList ']' {
+ if $1 != nil {
+ vals, commas := $3.toNodes()
+ val := ast.NewArrayLiteralNode($2, vals, commas, $4)
+ $$ = ast.NewMessageFieldNode($1, nil, val)
+ } else {
+ $$ = nil
+ }
+ }
+ | aggName ':' '[' constantList ']' {
+ if $1 != nil {
+ vals, commas := $4.toNodes()
+ val := ast.NewArrayLiteralNode($3, vals, commas, $5)
+ $$ = ast.NewMessageFieldNode($1, $2, val)
+ } else {
+ $$ = nil
+ }
+ }
+ | aggName ':' '[' error ']' {
+ $$ = nil
+ }
+ | aggName '[' error ']' {
+ $$ = nil
+ }
+ | aggName ':' msgLit {
+ if $1 != nil && $3 != nil {
+ $$ = ast.NewMessageFieldNode($1, $2, $3)
+ } else {
+ $$ = nil
+ }
+ }
+ | aggName msgLit {
+ if $1 != nil && $2 != nil {
+ $$ = ast.NewMessageFieldNode($1, nil, $2)
+ } else {
+ $$ = nil
+ }
+ }
+ | aggName ':' '<' error '>' {
+ $$ = nil
+ }
+ | aggName '<' error '>' {
+ $$ = nil
+ }
+
+aggName : name {
+ $$ = ast.NewFieldReferenceNode($1)
+ }
+ | '[' ident ']' {
+ $$ = ast.NewExtensionFieldReferenceNode($1, $2.toIdentValueNode(nil), $3)
+ }
+ | '[' ident '/' ident ']' {
+ $$ = ast.NewAnyTypeReferenceNode($1, $2.toIdentValueNode(nil), $3, $4.toIdentValueNode(nil), $5)
+ }
+ | '[' error ']' {
+ $$ = nil
+ }
+
+msgList : msgLit {
+ if $1 == nil {
+ $$ = nil
+ } else {
+ $$ = &valueList{$1, nil, nil}
+ }
+ }
+ | msgLit ',' msgList {
+ if $1 == nil {
+ $$ = nil
+ } else {
+ $$ = &valueList{$1, $2, $3}
+ }
+ }
+
+msgLit : aggregate {
+ $$ = $1
+ }
+ | '<' aggFields '>' {
+ fields, delims := $2.toNodes()
+ $$ = ast.NewMessageLiteralNode($1, fields, delims, $3)
+ }
+ | '<' error '>' {
+ $$ = nil
+ }
+
+constantList : constant {
+ $$ = &valueList{$1, nil, nil}
+ }
+ | constant ',' constantList {
+ $$ = &valueList{$1, $2, $3}
+ }
+ | '<' aggFields '>' {
+ fields, delims := $2.toNodes()
+ msg := ast.NewMessageLiteralNode($1, fields, delims, $3)
+ $$ = &valueList{msg, nil, nil}
+ }
+ | '<' aggFields '>' ',' constantList {
+ fields, delims := $2.toNodes()
+ msg := ast.NewMessageLiteralNode($1, fields, delims, $3)
+ $$ = &valueList{msg, $4, $5}
+ }
+ | '<' error '>' {
+ $$ = nil
+ }
+ | '<' error '>' ',' constantList {
+ $$ = $5
+ }
+
+typeIdent : ident {
+ $$ = $1.toIdentValueNode(nil)
+ }
+ | '.' ident {
+ $$ = $2.toIdentValueNode($1)
+ }
+
+msgElementTypeIdent : msgElementIdent {
+ $$ = $1.toIdentValueNode(nil)
+ }
+ | '.' ident {
+ $$ = $2.toIdentValueNode($1)
+ }
+
+extElementTypeIdent : extElementIdent {
+ $$ = $1.toIdentValueNode(nil)
+ }
+ | '.' ident {
+ $$ = $2.toIdentValueNode($1)
+ }
+
+oneofElementTypeIdent : oneofElementIdent {
+ $$ = $1.toIdentValueNode(nil)
+ }
+ | '.' ident {
+ $$ = $2.toIdentValueNode($1)
+ }
+
+msgField : _REQUIRED typeIdent name '=' _INT_LIT ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, nil, $6)
+ }
+ | _OPTIONAL typeIdent name '=' _INT_LIT ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, nil, $6)
+ }
+ | _REPEATED typeIdent name '=' _INT_LIT ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, nil, $6)
+ }
+ | _REQUIRED typeIdent name '=' _INT_LIT compactOptions ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, $6, $7)
+ }
+ | _OPTIONAL typeIdent name '=' _INT_LIT compactOptions ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, $6, $7)
+ }
+ | _REPEATED typeIdent name '=' _INT_LIT compactOptions ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, $6, $7)
+ }
+ | msgElementTypeIdent name '=' _INT_LIT ';' {
+ $$ = ast.NewFieldNode(nil, $1, $2, $3, $4, nil, $5)
+ }
+ | msgElementTypeIdent name '=' _INT_LIT compactOptions ';' {
+ $$ = ast.NewFieldNode(nil, $1, $2, $3, $4, $5, $6)
+ }
+
+extField : _REQUIRED typeIdent name '=' _INT_LIT ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, nil, $6)
+ }
+ | _OPTIONAL typeIdent name '=' _INT_LIT ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, nil, $6)
+ }
+ | _REPEATED typeIdent name '=' _INT_LIT ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, nil, $6)
+ }
+ | _REQUIRED typeIdent name '=' _INT_LIT compactOptions ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, $6, $7)
+ }
+ | _OPTIONAL typeIdent name '=' _INT_LIT compactOptions ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, $6, $7)
+ }
+ | _REPEATED typeIdent name '=' _INT_LIT compactOptions ';' {
+ $$ = ast.NewFieldNode($1.ToKeyword(), $2, $3, $4, $5, $6, $7)
+ }
+ | extElementTypeIdent name '=' _INT_LIT ';' {
+ $$ = ast.NewFieldNode(nil, $1, $2, $3, $4, nil, $5)
+ }
+ | extElementTypeIdent name '=' _INT_LIT compactOptions ';' {
+ $$ = ast.NewFieldNode(nil, $1, $2, $3, $4, $5, $6)
+ }
+
+compactOptions: '[' compactOptionDecls ']' {
+ opts, commas := $2.toNodes()
+ $$ = ast.NewCompactOptionsNode($1, opts, commas, $3)
+ }
+
+compactOptionDecls : compactOption {
+ $$ = &compactOptionList{$1, nil, nil}
+ }
+ | compactOption ',' compactOptionDecls {
+ $$ = &compactOptionList{$1, $2, $3}
+ }
+
+compactOption: optionName '=' constant {
+ refs, dots := $1.toNodes()
+ optName := ast.NewOptionNameNode(refs, dots)
+ $$ = ast.NewCompactOptionNode(optName, $2, $3)
+ }
+
+group : _REQUIRED _GROUP name '=' _INT_LIT '{' messageDecls '}' {
+ $$ = ast.NewGroupNode($1.ToKeyword(), $2.ToKeyword(), $3, $4, $5, nil, $6, $7, $8)
+ }
+ | _OPTIONAL _GROUP name '=' _INT_LIT '{' messageDecls '}' {
+ $$ = ast.NewGroupNode($1.ToKeyword(), $2.ToKeyword(), $3, $4, $5, nil, $6, $7, $8)
+ }
+ | _REPEATED _GROUP name '=' _INT_LIT '{' messageDecls '}' {
+ $$ = ast.NewGroupNode($1.ToKeyword(), $2.ToKeyword(), $3, $4, $5, nil, $6, $7, $8)
+ }
+ | _REQUIRED _GROUP name '=' _INT_LIT compactOptions '{' messageDecls '}' {
+ $$ = ast.NewGroupNode($1.ToKeyword(), $2.ToKeyword(), $3, $4, $5, $6, $7, $8, $9)
+ }
+ | _OPTIONAL _GROUP name '=' _INT_LIT compactOptions '{' messageDecls '}' {
+ $$ = ast.NewGroupNode($1.ToKeyword(), $2.ToKeyword(), $3, $4, $5, $6, $7, $8, $9)
+ }
+ | _REPEATED _GROUP name '=' _INT_LIT compactOptions '{' messageDecls '}' {
+ $$ = ast.NewGroupNode($1.ToKeyword(), $2.ToKeyword(), $3, $4, $5, $6, $7, $8, $9)
+ }
+
+oneof : _ONEOF name '{' ooDecls '}' {
+ $$ = ast.NewOneOfNode($1.ToKeyword(), $2, $3, $4, $5)
+ }
+
+ooDecls : ooDecls ooDecl {
+ if $2 != nil {
+ $$ = append($1, $2)
+ } else {
+ $$ = $1
+ }
+ }
+ | ooDecl {
+ if $1 != nil {
+ $$ = []ast.OneOfElement{$1}
+ } else {
+ $$ = nil
+ }
+ }
+ | {
+ $$ = nil
+ }
+
+ooDecl : option {
+ $$ = $1
+ }
+ | oneofField {
+ $$ = $1
+ }
+ | oneofGroup {
+ $$ = $1
+ }
+ | error ';' {
+ $$ = nil
+ }
+ | error {
+ $$ = nil
+ }
+
+oneofField : oneofElementTypeIdent name '=' _INT_LIT ';' {
+ $$ = ast.NewFieldNode(nil, $1, $2, $3, $4, nil, $5)
+ }
+ | oneofElementTypeIdent name '=' _INT_LIT compactOptions ';' {
+ $$ = ast.NewFieldNode(nil, $1, $2, $3, $4, $5, $6)
+ }
+
+oneofGroup : _GROUP name '=' _INT_LIT '{' messageDecls '}' {
+ $$ = ast.NewGroupNode(nil, $1.ToKeyword(), $2, $3, $4, nil, $5, $6, $7)
+ }
+ | _GROUP name '=' _INT_LIT compactOptions '{' messageDecls '}' {
+ $$ = ast.NewGroupNode(nil, $1.ToKeyword(), $2, $3, $4, $5, $6, $7, $8)
+ }
+
+mapField : mapType name '=' _INT_LIT ';' {
+ $$ = ast.NewMapFieldNode($1, $2, $3, $4, nil, $5)
+ }
+ | mapType name '=' _INT_LIT compactOptions ';' {
+ $$ = ast.NewMapFieldNode($1, $2, $3, $4, $5, $6)
+ }
+
+mapType : _MAP '<' keyType ',' typeIdent '>' {
+ $$ = ast.NewMapTypeNode($1.ToKeyword(), $2, $3, $4, $5, $6)
+ }
+
+keyType : _INT32
+ | _INT64
+ | _UINT32
+ | _UINT64
+ | _SINT32
+ | _SINT64
+ | _FIXED32
+ | _FIXED64
+ | _SFIXED32
+ | _SFIXED64
+ | _BOOL
+ | _STRING
+
+extensions : _EXTENSIONS tagRanges ';' {
+ ranges, commas := $2.toNodes()
+ $$ = ast.NewExtensionRangeNode($1.ToKeyword(), ranges, commas, nil, $3)
+ }
+ | _EXTENSIONS tagRanges compactOptions ';' {
+ ranges, commas := $2.toNodes()
+ $$ = ast.NewExtensionRangeNode($1.ToKeyword(), ranges, commas, $3, $4)
+ }
+
+tagRanges : tagRange {
+ $$ = &rangeList{$1, nil, nil}
+ }
+ | tagRange ',' tagRanges {
+ $$ = &rangeList{$1, $2, $3}
+ }
+
+tagRange : _INT_LIT {
+ $$ = ast.NewRangeNode($1, nil, nil, nil)
+ }
+ | _INT_LIT _TO _INT_LIT {
+ $$ = ast.NewRangeNode($1, $2.ToKeyword(), $3, nil)
+ }
+ | _INT_LIT _TO _MAX {
+ $$ = ast.NewRangeNode($1, $2.ToKeyword(), nil, $3.ToKeyword())
+ }
+
+enumRanges : enumRange {
+ $$ = &rangeList{$1, nil, nil}
+ }
+ | enumRange ',' enumRanges {
+ $$ = &rangeList{$1, $2, $3}
+ }
+
+enumRange : intLit {
+ $$ = ast.NewRangeNode($1, nil, nil, nil)
+ }
+ | intLit _TO intLit {
+ $$ = ast.NewRangeNode($1, $2.ToKeyword(), $3, nil)
+ }
+ | intLit _TO _MAX {
+ $$ = ast.NewRangeNode($1, $2.ToKeyword(), nil, $3.ToKeyword())
+ }
+
+intLit : _INT_LIT {
+ $$ = $1
+ }
+ | '-' _INT_LIT {
+ $$ = ast.NewNegativeIntLiteralNode($1, $2)
+ }
+
+msgReserved : _RESERVED tagRanges ';' {
+ ranges, commas := $2.toNodes()
+ $$ = ast.NewReservedRangesNode($1.ToKeyword(), ranges, commas, $3)
+ }
+ | reservedNames
+
+enumReserved : _RESERVED enumRanges ';' {
+ ranges, commas := $2.toNodes()
+ $$ = ast.NewReservedRangesNode($1.ToKeyword(), ranges, commas, $3)
+ }
+ | reservedNames
+
+reservedNames : _RESERVED fieldNames ';' {
+ names, commas := $2.toNodes()
+ $$ = ast.NewReservedNamesNode($1.ToKeyword(), names, commas, $3)
+ }
+
+fieldNames : stringLit {
+ $$ = &nameList{$1.toStringValueNode(), nil, nil}
+ }
+ | stringLit ',' fieldNames {
+ $$ = &nameList{$1.toStringValueNode(), $2, $3}
+ }
+
+enum : _ENUM name '{' enumDecls '}' {
+ $$ = ast.NewEnumNode($1.ToKeyword(), $2, $3, $4, $5)
+ }
+
+enumDecls : enumDecls enumDecl {
+ if $2 != nil {
+ $$ = append($1, $2)
+ } else {
+ $$ = $1
+ }
+ }
+ | enumDecl {
+ if $1 != nil {
+ $$ = []ast.EnumElement{$1}
+ } else {
+ $$ = nil
+ }
+ }
+ | {
+ $$ = nil
+ }
+
+enumDecl : option {
+ $$ = $1
+ }
+ | enumValue {
+ $$ = $1
+ }
+ | enumReserved {
+ $$ = $1
+ }
+ | ';' {
+ $$ = ast.NewEmptyDeclNode($1)
+ }
+ | error ';' {
+ $$ = nil
+ }
+ | error {
+ $$ = nil
+ }
+
+enumValue : enumElementName '=' intLit ';' {
+ $$ = ast.NewEnumValueNode($1, $2, $3, nil, $4)
+ }
+ | enumElementName '=' intLit compactOptions ';' {
+ $$ = ast.NewEnumValueNode($1, $2, $3, $4, $5)
+ }
+
+message : _MESSAGE name '{' messageDecls '}' {
+ $$ = ast.NewMessageNode($1.ToKeyword(), $2, $3, $4, $5)
+ }
+
+messageDecls : messageDecls messageDecl {
+ if $2 != nil {
+ $$ = append($1, $2)
+ } else {
+ $$ = $1
+ }
+ }
+ | messageDecl {
+ if $1 != nil {
+ $$ = []ast.MessageElement{$1}
+ } else {
+ $$ = nil
+ }
+ }
+ | {
+ $$ = nil
+ }
+
+messageDecl : msgField {
+ $$ = $1
+ }
+ | enum {
+ $$ = $1
+ }
+ | message {
+ $$ = $1
+ }
+ | extend {
+ $$ = $1
+ }
+ | extensions {
+ $$ = $1
+ }
+ | group {
+ $$ = $1
+ }
+ | option {
+ $$ = $1
+ }
+ | oneof {
+ $$ = $1
+ }
+ | mapField {
+ $$ = $1
+ }
+ | msgReserved {
+ $$ = $1
+ }
+ | ';' {
+ $$ = ast.NewEmptyDeclNode($1)
+ }
+ | error ';' {
+ $$ = nil
+ }
+ | error {
+ $$ = nil
+ }
+
+extend : _EXTEND typeIdent '{' extendDecls '}' {
+ $$ = ast.NewExtendNode($1.ToKeyword(), $2, $3, $4, $5)
+ }
+
+extendDecls : extendDecls extendDecl {
+ if $2 != nil {
+ $$ = append($1, $2)
+ } else {
+ $$ = $1
+ }
+ }
+ | extendDecl {
+ if $1 != nil {
+ $$ = []ast.ExtendElement{$1}
+ } else {
+ $$ = nil
+ }
+ }
+ | {
+ $$ = nil
+ }
+
+extendDecl : extField {
+ $$ = $1
+ }
+ | group {
+ $$ = $1
+ }
+ | error ';' {
+ $$ = nil
+ }
+ | error {
+ $$ = nil
+ }
+
+service : _SERVICE name '{' serviceDecls '}' {
+ $$ = ast.NewServiceNode($1.ToKeyword(), $2, $3, $4, $5)
+ }
+
+serviceDecls : serviceDecls serviceDecl {
+ if $2 != nil {
+ $$ = append($1, $2)
+ } else {
+ $$ = $1
+ }
+ }
+ | serviceDecl {
+ if $1 != nil {
+ $$ = []ast.ServiceElement{$1}
+ } else {
+ $$ = nil
+ }
+ }
+ | {
+ $$ = nil
+ }
+
+// NB: doc suggests support for "stream" declaration, separate from "rpc", but
+// it does not appear to be supported in protoc (doc is likely from grammar for
+// Google-internal version of protoc, with support for streaming stubby)
+serviceDecl : option {
+ $$ = $1
+ }
+ | rpc {
+ $$ = $1
+ }
+ | ';' {
+ $$ = ast.NewEmptyDeclNode($1)
+ }
+ | error ';' {
+ $$ = nil
+ }
+ | error {
+ $$ = nil
+ }
+
+rpc : _RPC name rpcType _RETURNS rpcType ';' {
+ $$ = ast.NewRPCNode($1.ToKeyword(), $2, $3, $4.ToKeyword(), $5, $6)
+ }
+ | _RPC name rpcType _RETURNS rpcType '{' rpcDecls '}' {
+ $$ = ast.NewRPCNodeWithBody($1.ToKeyword(), $2, $3, $4.ToKeyword(), $5, $6, $7, $8)
+ }
+
+rpcType : '(' _STREAM typeIdent ')' {
+ $$ = ast.NewRPCTypeNode($1, $2.ToKeyword(), $3, $4)
+ }
+ | '(' typeIdent ')' {
+ $$ = ast.NewRPCTypeNode($1, nil, $2, $3)
+ }
+
+rpcDecls : rpcDecls rpcDecl {
+ if $2 != nil {
+ $$ = append($1, $2)
+ } else {
+ $$ = $1
+ }
+ }
+ | rpcDecl {
+ if $1 != nil {
+ $$ = []ast.RPCElement{$1}
+ } else {
+ $$ = nil
+ }
+ }
+ | {
+ $$ = nil
+ }
+
+rpcDecl : option {
+ $$ = $1
+ }
+ | ';' {
+ $$ = ast.NewEmptyDeclNode($1)
+ }
+ | error ';' {
+ $$ = nil
+ }
+ | error {
+ $$ = nil
+ }
+
+// excludes message, enum, oneof, extensions, reserved, extend,
+// option, optional, required, and repeated
+msgElementName : _NAME
+ | _SYNTAX
+ | _IMPORT
+ | _WEAK
+ | _PUBLIC
+ | _PACKAGE
+ | _TRUE
+ | _FALSE
+ | _INF
+ | _NAN
+ | _DOUBLE
+ | _FLOAT
+ | _INT32
+ | _INT64
+ | _UINT32
+ | _UINT64
+ | _SINT32
+ | _SINT64
+ | _FIXED32
+ | _FIXED64
+ | _SFIXED32
+ | _SFIXED64
+ | _BOOL
+ | _STRING
+ | _BYTES
+ | _GROUP
+ | _MAP
+ | _TO
+ | _MAX
+ | _SERVICE
+ | _RPC
+ | _STREAM
+ | _RETURNS
+
+// excludes optional, required, and repeated
+extElementName : _NAME
+ | _SYNTAX
+ | _IMPORT
+ | _WEAK
+ | _PUBLIC
+ | _PACKAGE
+ | _OPTION
+ | _TRUE
+ | _FALSE
+ | _INF
+ | _NAN
+ | _DOUBLE
+ | _FLOAT
+ | _INT32
+ | _INT64
+ | _UINT32
+ | _UINT64
+ | _SINT32
+ | _SINT64
+ | _FIXED32
+ | _FIXED64
+ | _SFIXED32
+ | _SFIXED64
+ | _BOOL
+ | _STRING
+ | _BYTES
+ | _GROUP
+ | _ONEOF
+ | _MAP
+ | _EXTENSIONS
+ | _TO
+ | _MAX
+ | _RESERVED
+ | _ENUM
+ | _MESSAGE
+ | _EXTEND
+ | _SERVICE
+ | _RPC
+ | _STREAM
+ | _RETURNS
+
+// excludes reserved, option
+enumElementName : _NAME
+ | _SYNTAX
+ | _IMPORT
+ | _WEAK
+ | _PUBLIC
+ | _PACKAGE
+ | _TRUE
+ | _FALSE
+ | _INF
+ | _NAN
+ | _REPEATED
+ | _OPTIONAL
+ | _REQUIRED
+ | _DOUBLE
+ | _FLOAT
+ | _INT32
+ | _INT64
+ | _UINT32
+ | _UINT64
+ | _SINT32
+ | _SINT64
+ | _FIXED32
+ | _FIXED64
+ | _SFIXED32
+ | _SFIXED64
+ | _BOOL
+ | _STRING
+ | _BYTES
+ | _GROUP
+ | _ONEOF
+ | _MAP
+ | _EXTENSIONS
+ | _TO
+ | _MAX
+ | _ENUM
+ | _MESSAGE
+ | _EXTEND
+ | _SERVICE
+ | _RPC
+ | _STREAM
+ | _RETURNS
+
+// excludes option, optional, required, and repeated
+oneofElementName : _NAME
+ | _SYNTAX
+ | _IMPORT
+ | _WEAK
+ | _PUBLIC
+ | _PACKAGE
+ | _TRUE
+ | _FALSE
+ | _INF
+ | _NAN
+ | _DOUBLE
+ | _FLOAT
+ | _INT32
+ | _INT64
+ | _UINT32
+ | _UINT64
+ | _SINT32
+ | _SINT64
+ | _FIXED32
+ | _FIXED64
+ | _SFIXED32
+ | _SFIXED64
+ | _BOOL
+ | _STRING
+ | _BYTES
+ | _GROUP
+ | _ONEOF
+ | _MAP
+ | _EXTENSIONS
+ | _TO
+ | _MAX
+ | _RESERVED
+ | _ENUM
+ | _MESSAGE
+ | _EXTEND
+ | _SERVICE
+ | _RPC
+ | _STREAM
+ | _RETURNS
+
+name : _NAME
+ | _SYNTAX
+ | _IMPORT
+ | _WEAK
+ | _PUBLIC
+ | _PACKAGE
+ | _OPTION
+ | _TRUE
+ | _FALSE
+ | _INF
+ | _NAN
+ | _REPEATED
+ | _OPTIONAL
+ | _REQUIRED
+ | _DOUBLE
+ | _FLOAT
+ | _INT32
+ | _INT64
+ | _UINT32
+ | _UINT64
+ | _SINT32
+ | _SINT64
+ | _FIXED32
+ | _FIXED64
+ | _SFIXED32
+ | _SFIXED64
+ | _BOOL
+ | _STRING
+ | _BYTES
+ | _GROUP
+ | _ONEOF
+ | _MAP
+ | _EXTENSIONS
+ | _TO
+ | _MAX
+ | _RESERVED
+ | _ENUM
+ | _MESSAGE
+ | _EXTEND
+ | _SERVICE
+ | _RPC
+ | _STREAM
+ | _RETURNS
+
+%%
diff --git a/vendor/github.com/bufbuild/protocompile/parser/proto.y.go b/vendor/github.com/bufbuild/protocompile/parser/proto.y.go
new file mode 100644
index 000000000..5a7e953f4
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/parser/proto.y.go
@@ -0,0 +1,2408 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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.
+
+// Code generated by goyacc -o proto.y.go -l -p proto proto.y. DO NOT EDIT.
+package parser
+
+import __yyfmt__ "fmt"
+
+//lint:file-ignore SA4006 generated parser has unused values
+
+import (
+ "math"
+
+ "github.com/bufbuild/protocompile/ast"
+)
+
+type protoSymType struct {
+ yys int
+ file *ast.FileNode
+ syn *ast.SyntaxNode
+ fileDecl ast.FileElement
+ fileDecls []ast.FileElement
+ pkg *ast.PackageNode
+ imprt *ast.ImportNode
+ msg *ast.MessageNode
+ msgDecl ast.MessageElement
+ msgDecls []ast.MessageElement
+ fld *ast.FieldNode
+ mapFld *ast.MapFieldNode
+ mapType *ast.MapTypeNode
+ grp *ast.GroupNode
+ oo *ast.OneOfNode
+ ooDecl ast.OneOfElement
+ ooDecls []ast.OneOfElement
+ ext *ast.ExtensionRangeNode
+ resvd *ast.ReservedNode
+ en *ast.EnumNode
+ enDecl ast.EnumElement
+ enDecls []ast.EnumElement
+ env *ast.EnumValueNode
+ extend *ast.ExtendNode
+ extDecl ast.ExtendElement
+ extDecls []ast.ExtendElement
+ svc *ast.ServiceNode
+ svcDecl ast.ServiceElement
+ svcDecls []ast.ServiceElement
+ mtd *ast.RPCNode
+ rpcType *ast.RPCTypeNode
+ rpcDecl ast.RPCElement
+ rpcDecls []ast.RPCElement
+ opt *ast.OptionNode
+ opts *compactOptionList
+ ref *ast.FieldReferenceNode
+ optNms *fieldRefList
+ cmpctOpts *ast.CompactOptionsNode
+ rng *ast.RangeNode
+ rngs *rangeList
+ names *nameList
+ cid *identList
+ tid ast.IdentValueNode
+ sl *valueList
+ msgField *ast.MessageFieldNode
+ msgEntry *messageFieldEntry
+ msgLit *messageFieldList
+ v ast.ValueNode
+ il ast.IntValueNode
+ str *stringList
+ s *ast.StringLiteralNode
+ i *ast.UintLiteralNode
+ f *ast.FloatLiteralNode
+ id *ast.IdentNode
+ b *ast.RuneNode
+ err error
+}
+
+const _STRING_LIT = 57346
+const _INT_LIT = 57347
+const _FLOAT_LIT = 57348
+const _NAME = 57349
+const _SYNTAX = 57350
+const _IMPORT = 57351
+const _WEAK = 57352
+const _PUBLIC = 57353
+const _PACKAGE = 57354
+const _OPTION = 57355
+const _TRUE = 57356
+const _FALSE = 57357
+const _INF = 57358
+const _NAN = 57359
+const _REPEATED = 57360
+const _OPTIONAL = 57361
+const _REQUIRED = 57362
+const _DOUBLE = 57363
+const _FLOAT = 57364
+const _INT32 = 57365
+const _INT64 = 57366
+const _UINT32 = 57367
+const _UINT64 = 57368
+const _SINT32 = 57369
+const _SINT64 = 57370
+const _FIXED32 = 57371
+const _FIXED64 = 57372
+const _SFIXED32 = 57373
+const _SFIXED64 = 57374
+const _BOOL = 57375
+const _STRING = 57376
+const _BYTES = 57377
+const _GROUP = 57378
+const _ONEOF = 57379
+const _MAP = 57380
+const _EXTENSIONS = 57381
+const _TO = 57382
+const _MAX = 57383
+const _RESERVED = 57384
+const _ENUM = 57385
+const _MESSAGE = 57386
+const _EXTEND = 57387
+const _SERVICE = 57388
+const _RPC = 57389
+const _STREAM = 57390
+const _RETURNS = 57391
+const _ERROR = 57392
+
+var protoToknames = [...]string{
+ "$end",
+ "error",
+ "$unk",
+ "_STRING_LIT",
+ "_INT_LIT",
+ "_FLOAT_LIT",
+ "_NAME",
+ "_SYNTAX",
+ "_IMPORT",
+ "_WEAK",
+ "_PUBLIC",
+ "_PACKAGE",
+ "_OPTION",
+ "_TRUE",
+ "_FALSE",
+ "_INF",
+ "_NAN",
+ "_REPEATED",
+ "_OPTIONAL",
+ "_REQUIRED",
+ "_DOUBLE",
+ "_FLOAT",
+ "_INT32",
+ "_INT64",
+ "_UINT32",
+ "_UINT64",
+ "_SINT32",
+ "_SINT64",
+ "_FIXED32",
+ "_FIXED64",
+ "_SFIXED32",
+ "_SFIXED64",
+ "_BOOL",
+ "_STRING",
+ "_BYTES",
+ "_GROUP",
+ "_ONEOF",
+ "_MAP",
+ "_EXTENSIONS",
+ "_TO",
+ "_MAX",
+ "_RESERVED",
+ "_ENUM",
+ "_MESSAGE",
+ "_EXTEND",
+ "_SERVICE",
+ "_RPC",
+ "_STREAM",
+ "_RETURNS",
+ "_ERROR",
+ "'='",
+ "';'",
+ "':'",
+ "'{'",
+ "'}'",
+ "'\\\\'",
+ "'/'",
+ "'?'",
+ "'.'",
+ "','",
+ "'>'",
+ "'<'",
+ "'+'",
+ "'-'",
+ "'('",
+ "')'",
+ "'['",
+ "']'",
+ "'*'",
+ "'&'",
+ "'^'",
+ "'%'",
+ "'$'",
+ "'#'",
+ "'@'",
+ "'!'",
+ "'~'",
+ "'`'",
+}
+
+var protoStatenames = [...]string{}
+
+const protoEofCode = 1
+const protoErrCode = 2
+const protoInitialStackSize = 16
+
+var protoExca = [...]int16{
+ -1, 0,
+ 1, 4,
+ -2, 0,
+ -1, 1,
+ 1, -1,
+ -2, 0,
+ -1, 2,
+ 1, 1,
+ -2, 0,
+ -1, 3,
+ 1, 2,
+ -2, 0,
+ -1, 22,
+ 1, 3,
+ -2, 0,
+ -1, 95,
+ 55, 185,
+ -2, 0,
+ -1, 96,
+ 55, 173,
+ -2, 0,
+ -1, 97,
+ 55, 202,
+ -2, 0,
+ -1, 99,
+ 55, 210,
+ -2, 0,
+ -1, 110,
+ 55, 54,
+ -2, 0,
+ -1, 289,
+ 55, 52,
+ 61, 52,
+ -2, 0,
+ -1, 354,
+ 61, 54,
+ -2, 0,
+ -1, 370,
+ 55, 124,
+ -2, 0,
+ -1, 404,
+ 61, 54,
+ -2, 0,
+ -1, 409,
+ 61, 54,
+ -2, 0,
+ -1, 497,
+ 61, 54,
+ -2, 0,
+ -1, 547,
+ 55, 185,
+ -2, 0,
+ -1, 551,
+ 55, 185,
+ -2, 0,
+ -1, 555,
+ 55, 185,
+ -2, 0,
+ -1, 573,
+ 55, 222,
+ -2, 0,
+ -1, 580,
+ 55, 185,
+ -2, 0,
+ -1, 583,
+ 55, 185,
+ -2, 0,
+ -1, 586,
+ 55, 185,
+ -2, 0,
+ -1, 607,
+ 55, 185,
+ -2, 0,
+ -1, 619,
+ 55, 185,
+ -2, 0,
+}
+
+const protoPrivate = 57344
+
+const protoLast = 2396
+
+var protoAct = [...]int16{
+ 31, 118, 117, 125, 8, 106, 8, 8, 496, 494,
+ 593, 423, 366, 406, 399, 430, 81, 325, 77, 79,
+ 80, 82, 84, 327, 316, 107, 8, 310, 411, 408,
+ 105, 280, 124, 228, 139, 177, 407, 413, 30, 425,
+ 544, 26, 351, 110, 605, 607, 569, 567, 412, 565,
+ 85, 354, 555, 87, 88, 89, 352, 75, 367, 367,
+ 553, 367, 367, 551, 367, 367, 549, 547, 545, 537,
+ 536, 531, 524, 514, 512, 367, 367, 481, 500, 499,
+ 367, 367, 365, 367, 574, 414, 367, 367, 110, 367,
+ 535, 400, 367, 109, 77, 94, 409, 367, 328, 116,
+ 178, 104, 405, 281, 110, 98, 328, 346, 319, 346,
+ 576, 292, 409, 103, 346, 345, 577, 345, 543, 301,
+ 346, 564, 345, 541, 346, 504, 598, 344, 345, 503,
+ 230, 185, 345, 115, 485, 309, 346, 313, 314, 287,
+ 597, 538, 515, 350, 345, 501, 480, 391, 303, 305,
+ 307, 349, 374, 29, 328, 368, 523, 329, 338, 320,
+ 343, 93, 434, 318, 317, 329, 315, 440, 441, 442,
+ 443, 444, 445, 17, 446, 447, 448, 449, 91, 619,
+ 178, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 436, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 317, 185, 322, 329, 14, 517, 572, 586, 573, 438,
+ 4, 15, 284, 583, 16, 17, 580, 14, 596, 284,
+ 596, 370, 99, 17, 15, 97, 336, 16, 17, 17,
+ 17, 17, 96, 95, 617, 611, 591, 590, 589, 333,
+ 334, 335, 584, 581, 578, 19, 18, 20, 21, 337,
+ 230, 331, 571, 563, 13, 557, 527, 285, 19, 18,
+ 20, 21, 283, 519, 285, 339, 422, 13, 595, 283,
+ 595, 609, 390, 281, 373, 372, 342, 341, 332, 323,
+ 292, 302, 286, 102, 101, 100, 90, 355, 86, 25,
+ 561, 560, 516, 488, 358, 359, 360, 361, 362, 363,
+ 487, 340, 486, 420, 419, 356, 418, 417, 347, 416,
+ 415, 353, 397, 371, 364, 324, 92, 24, 490, 427,
+ 392, 369, 29, 5, 394, 395, 396, 23, 27, 28,
+ 122, 11, 388, 11, 11, 588, 120, 10, 389, 10,
+ 10, 587, 109, 299, 297, 292, 23, 355, 355, 530,
+ 398, 29, 312, 11, 298, 428, 296, 294, 77, 10,
+ 529, 528, 121, 9, 431, 9, 9, 295, 511, 510,
+ 509, 403, 401, 376, 377, 378, 379, 380, 381, 382,
+ 383, 384, 385, 386, 387, 9, 426, 508, 507, 479,
+ 317, 506, 482, 109, 489, 292, 478, 312, 421, 483,
+ 292, 393, 29, 282, 279, 3, 484, 492, 22, 12,
+ 227, 179, 176, 123, 326, 311, 180, 128, 429, 137,
+ 127, 433, 126, 431, 513, 505, 520, 521, 229, 432,
+ 119, 289, 434, 290, 435, 518, 235, 440, 441, 442,
+ 443, 444, 445, 17, 446, 447, 448, 449, 134, 437,
+ 522, 450, 451, 452, 453, 454, 455, 456, 457, 458,
+ 459, 460, 461, 462, 463, 464, 436, 465, 466, 467,
+ 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
+ 236, 525, 140, 183, 439, 238, 143, 526, 292, 438,
+ 375, 108, 532, 291, 76, 533, 592, 355, 534, 424,
+ 7, 6, 2, 1, 0, 542, 77, 109, 0, 546,
+ 548, 550, 552, 554, 556, 559, 539, 558, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 109,
+ 0, 566, 568, 570, 0, 562, 0, 0, 575, 0,
+ 579, 0, 0, 0, 582, 0, 0, 0, 585, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 594, 0, 0,
+ 0, 301, 0, 600, 301, 0, 602, 301, 0, 604,
+ 0, 0, 0, 0, 0, 0, 594, 0, 109, 109,
+ 606, 608, 301, 610, 301, 0, 301, 612, 613, 0,
+ 618, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 301, 0, 621, 301, 495, 0, 29, 114, 111, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 0, 0, 0, 0, 110, 0, 0, 0,
+ 0, 0, 0, 0, 497, 113, 112, 0, 0, 0,
+ 493, 29, 114, 111, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 61, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 0, 0, 0,
+ 0, 110, 0, 0, 0, 0, 0, 0, 0, 404,
+ 113, 112, 0, 0, 402, 29, 114, 111, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 0, 0, 0, 0, 110, 0, 0, 0, 0,
+ 0, 0, 0, 497, 113, 112, 29, 114, 111, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 0, 0, 0, 0, 110, 0, 0, 0,
+ 0, 0, 540, 0, 0, 113, 112, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 61, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 502, 0, 0, 0, 293, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 498, 0, 0, 0, 293, 32,
+ 33, 34, 35, 36, 37, 38, 39, 40, 41, 42,
+ 43, 44, 45, 46, 47, 48, 49, 50, 51, 52,
+ 53, 54, 55, 56, 57, 58, 59, 60, 61, 62,
+ 63, 64, 65, 66, 67, 68, 69, 70, 71, 72,
+ 73, 74, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 410, 0, 0, 0, 293,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 348, 0, 0, 0,
+ 293, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 73, 74, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 288, 0, 0,
+ 0, 293, 32, 33, 34, 35, 36, 37, 38, 39,
+ 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
+ 50, 51, 52, 53, 54, 55, 56, 57, 58, 59,
+ 60, 61, 62, 63, 64, 65, 66, 67, 68, 69,
+ 70, 71, 72, 73, 74, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 293, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 130, 0, 0,
+ 0, 78, 144, 145, 146, 147, 148, 149, 17, 150,
+ 151, 152, 153, 133, 132, 131, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 169, 136, 142, 135, 170, 171, 138, 19, 18,
+ 20, 172, 173, 174, 175, 0, 0, 129, 0, 0,
+ 622, 130, 0, 0, 141, 0, 144, 145, 146, 147,
+ 148, 149, 17, 150, 151, 152, 153, 133, 132, 131,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 136, 142, 135, 170,
+ 171, 138, 19, 18, 20, 172, 173, 174, 175, 0,
+ 0, 129, 0, 0, 620, 130, 0, 0, 141, 0,
+ 144, 145, 146, 147, 148, 149, 17, 150, 151, 152,
+ 153, 133, 132, 131, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 136, 142, 135, 170, 171, 138, 19, 18, 20, 172,
+ 173, 174, 175, 0, 0, 129, 0, 0, 616, 130,
+ 0, 0, 141, 0, 144, 145, 146, 147, 148, 149,
+ 17, 150, 151, 152, 153, 133, 132, 131, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 167, 168, 169, 136, 142, 135, 170, 171, 138,
+ 19, 18, 20, 172, 173, 174, 175, 0, 0, 129,
+ 0, 0, 615, 130, 0, 0, 141, 0, 144, 145,
+ 146, 147, 148, 149, 17, 150, 151, 152, 153, 133,
+ 132, 131, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 136, 142,
+ 135, 170, 171, 138, 19, 18, 20, 172, 173, 174,
+ 175, 0, 0, 129, 0, 0, 614, 130, 0, 0,
+ 141, 0, 144, 145, 146, 147, 148, 149, 17, 150,
+ 151, 152, 153, 133, 132, 131, 154, 155, 156, 157,
+ 158, 159, 160, 161, 162, 163, 164, 165, 166, 167,
+ 168, 169, 136, 142, 135, 170, 171, 138, 19, 18,
+ 20, 172, 173, 174, 175, 0, 0, 129, 0, 0,
+ 603, 130, 0, 0, 141, 0, 144, 145, 146, 147,
+ 148, 149, 17, 150, 151, 152, 153, 133, 132, 131,
+ 154, 155, 156, 157, 158, 159, 160, 161, 162, 163,
+ 164, 165, 166, 167, 168, 169, 136, 142, 135, 170,
+ 171, 138, 19, 18, 20, 172, 173, 174, 175, 0,
+ 0, 129, 0, 0, 601, 130, 0, 0, 141, 0,
+ 144, 145, 146, 147, 148, 149, 17, 150, 151, 152,
+ 153, 133, 132, 131, 154, 155, 156, 157, 158, 159,
+ 160, 161, 162, 163, 164, 165, 166, 167, 168, 169,
+ 136, 142, 135, 170, 171, 138, 19, 18, 20, 172,
+ 173, 174, 175, 0, 0, 129, 0, 0, 599, 130,
+ 0, 0, 141, 0, 144, 145, 146, 147, 148, 149,
+ 17, 150, 151, 152, 153, 133, 132, 131, 154, 155,
+ 156, 157, 158, 159, 160, 161, 162, 163, 164, 165,
+ 166, 167, 168, 169, 136, 142, 135, 170, 171, 138,
+ 19, 18, 20, 172, 173, 174, 175, 0, 0, 129,
+ 0, 0, 300, 130, 0, 0, 141, 0, 144, 145,
+ 146, 147, 148, 149, 17, 150, 151, 152, 153, 133,
+ 132, 131, 154, 155, 156, 157, 158, 159, 160, 161,
+ 162, 163, 164, 165, 166, 167, 168, 169, 136, 142,
+ 135, 170, 171, 138, 19, 18, 20, 172, 173, 174,
+ 175, 0, 0, 129, 0, 0, 231, 0, 0, 0,
+ 141, 239, 240, 241, 242, 243, 244, 245, 246, 247,
+ 248, 249, 234, 233, 232, 250, 251, 252, 253, 254,
+ 255, 256, 257, 258, 259, 260, 261, 262, 263, 264,
+ 265, 266, 267, 268, 269, 270, 271, 272, 273, 274,
+ 275, 276, 277, 278, 0, 0, 0, 0, 0, 330,
+ 231, 0, 0, 237, 0, 239, 240, 241, 242, 243,
+ 244, 245, 246, 247, 248, 249, 234, 233, 232, 250,
+ 251, 252, 253, 254, 255, 256, 257, 258, 259, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 237, 32, 33,
+ 34, 35, 36, 37, 38, 39, 40, 41, 42, 43,
+ 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+ 54, 55, 56, 57, 58, 59, 60, 61, 62, 63,
+ 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
+ 74, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 83, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
+ 51, 52, 53, 54, 55, 56, 57, 58, 59, 60,
+ 61, 62, 63, 64, 65, 66, 67, 68, 69, 70,
+ 71, 72, 491, 74, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 83, 32, 33, 34, 35, 36, 37,
+ 38, 39, 40, 41, 42, 43, 44, 45, 46, 47,
+ 48, 49, 50, 51, 52, 53, 54, 55, 56, 57,
+ 58, 59, 60, 308, 62, 63, 64, 65, 66, 67,
+ 68, 69, 70, 71, 72, 73, 74, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 83, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, 50, 51, 52, 53, 54,
+ 55, 56, 57, 58, 59, 60, 306, 62, 63, 64,
+ 65, 66, 67, 68, 69, 70, 71, 72, 73, 74,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 83,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 304,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 0, 0, 0, 0, 0, 182, 0,
+ 0, 0, 83, 186, 187, 188, 189, 190, 191, 17,
+ 192, 193, 194, 195, 196, 197, 198, 199, 200, 201,
+ 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
+ 212, 213, 214, 215, 216, 217, 218, 219, 184, 220,
+ 221, 222, 223, 224, 225, 226, 0, 182, 181, 0,
+ 0, 321, 186, 187, 188, 189, 190, 191, 17, 192,
+ 193, 194, 195, 196, 197, 198, 199, 200, 201, 202,
+ 203, 204, 205, 206, 207, 208, 209, 210, 211, 212,
+ 213, 214, 215, 216, 217, 218, 219, 184, 220, 221,
+ 222, 223, 224, 225, 226, 357, 0, 181, 0, 0,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
+ 52, 53, 54, 55, 56, 57, 58, 59, 60, 61,
+ 62, 63, 64, 65, 66, 67, 68, 69, 70, 71,
+ 72, 73, 74, 32, 33, 34, 35, 36, 37, 38,
+ 39, 40, 41, 42, 43, 44, 45, 46, 47, 48,
+ 49, 50, 51, 52, 53, 54, 55, 56, 57, 58,
+ 59, 60, 61, 62, 63, 64, 65, 66, 67, 68,
+ 69, 70, 71, 72, 73, 74,
+}
+
+var protoPact = [...]int16{
+ 212, -1000, 225, 225, 276, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, 247, 328, 2346, 1236, 2346, 2346,
+ 1941, 2346, 225, -1000, 408, -1000, 246, 408, 408, 408,
+ 244, 119, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, 275, 102, -1000, 1941, 189,
+ 188, 181, -1000, 2346, 178, 243, -1000, 242, 241, -1000,
+ -1000, 2346, 812, 1236, 33, 1781, 2255, 1888, -1000, 227,
+ -1000, -1000, -1000, -1000, 240, -1000, -1000, -1000, -1000, -1000,
+ 1175, -1000, 361, 348, -1000, -1000, -1000, 1727, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ 239, 2153, 2100, 2047, 2346, 402, 2346, 2346, 357, -1000,
+ -1000, 2346, 46, 100, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, 2206, -1000, -1000, -1000,
+ -1000, -1000, 237, 274, 149, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1834, -1000, -1000,
+ -1000, 236, 2153, 2100, 2047, 2346, -1000, 2346, 99, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 220,
+ -1000, -1000, -1000, -1000, 235, 2346, -1000, 105, 72, 1114,
+ 91, -11, -1000, 2303, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, 2346, 2346, 2346, 2346, 2346, 2346, 273,
+ 30, 95, 291, 177, 272, 233, 232, 92, -1000, 360,
+ 2346, -1000, -1000, -1000, 101, 230, 87, 290, -1000, 406,
+ -1000, -1000, -1000, 2346, 2346, 2346, 271, -1000, 2346, -1000,
+ -1000, -1000, 26, -1000, -1000, -1000, -1000, -1000, 84, -1000,
+ -1000, 687, 34, -1000, 1053, -1000, -20, 17, 269, 268,
+ 266, 265, 263, 262, 403, -1000, 224, 1236, 402, 324,
+ 440, 401, -1000, -1000, 408, 86, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 25,
+ -1000, 101, 93, -1000, 261, 259, 252, 399, -1000, 279,
+ 1994, -1000, 622, -1000, 992, -1000, 11, 10, 85, 931,
+ 68, 64, -1000, 2346, -1000, 396, 393, 392, 375, 374,
+ 373, 22, -1000, 5, 82, 251, -1000, -1000, -1000, 160,
+ -1000, -1000, -1000, -1000, 221, 2346, 2346, -1000, 2346, 97,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 20, -1000,
+ 1941, -1000, 214, -1000, -1000, -1000, 366, 365, 354, 19,
+ 26, 1941, 24, -1000, 2, 1, 81, 870, 62, -1000,
+ -1000, 50, 57, -1000, -1000, -28, 16, 13, 14, 9,
+ 8, -2, -1000, 213, -1000, 1236, 812, -1000, -1000, -1000,
+ 250, 249, -1000, 2346, -1000, 211, 60, -1000, -3, -5,
+ -6, -1000, 210, 164, 18, -1000, -1000, -1000, 751, 49,
+ 55, -1000, -1000, -1000, -1000, -1000, 202, 1781, 172, -1000,
+ 201, 1781, 169, -1000, 200, 1781, 163, -1000, -1000, -1000,
+ 346, 340, -1000, -1000, -1000, -1000, 196, -1000, 195, -1000,
+ 194, -1000, -1000, 228, -1000, -1000, 80, 66, -1000, 1673,
+ 1781, -1000, 1619, 1781, -1000, 1565, 1781, -8, -9, -1000,
+ -1000, -1000, 226, -1000, -1000, -1000, 193, 751, 751, -1000,
+ 1511, -1000, 1457, -1000, 1403, -1000, 192, 1781, 125, -1000,
+ -1000, -1000, -1000, -1000, -1000, -1000, -1000, -1000, 1349, 1781,
+ -1000, 1295, -1000,
+}
+
+var protoPgo = [...]int16{
+ 0, 513, 512, 333, 415, 511, 510, 3, 509, 11,
+ 10, 506, 504, 503, 39, 12, 8, 30, 5, 29,
+ 501, 23, 0, 500, 496, 495, 494, 493, 21, 492,
+ 490, 459, 16, 458, 446, 444, 9, 13, 443, 441,
+ 28, 440, 439, 438, 432, 32, 431, 430, 429, 372,
+ 1, 2, 15, 428, 24, 427, 426, 34, 425, 424,
+ 27, 17, 423, 346, 35, 422, 421, 340, 33, 420,
+ 25, 419, 31, 414, 413, 14,
+}
+
+var protoR1 = [...]int8{
+ 0, 1, 1, 1, 1, 4, 4, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 2, 5, 5,
+ 5, 6, 28, 28, 29, 29, 30, 30, 31, 31,
+ 7, 14, 14, 12, 12, 16, 16, 17, 17, 17,
+ 20, 20, 20, 20, 20, 20, 20, 20, 70, 70,
+ 18, 18, 40, 40, 40, 39, 39, 39, 39, 39,
+ 39, 38, 38, 38, 38, 38, 38, 38, 38, 38,
+ 38, 38, 13, 13, 13, 13, 37, 37, 19, 19,
+ 19, 36, 36, 36, 36, 36, 36, 32, 32, 33,
+ 33, 34, 34, 35, 35, 41, 41, 41, 41, 41,
+ 41, 41, 41, 43, 43, 43, 43, 43, 43, 43,
+ 43, 15, 9, 9, 8, 45, 45, 45, 45, 45,
+ 45, 44, 53, 53, 53, 52, 52, 52, 52, 52,
+ 42, 42, 46, 46, 47, 47, 48, 23, 23, 23,
+ 23, 23, 23, 23, 23, 23, 23, 23, 23, 62,
+ 62, 60, 60, 58, 58, 58, 61, 61, 59, 59,
+ 59, 21, 21, 55, 55, 56, 56, 57, 54, 54,
+ 63, 65, 65, 65, 64, 64, 64, 64, 64, 64,
+ 66, 66, 49, 51, 51, 51, 50, 50, 50, 50,
+ 50, 50, 50, 50, 50, 50, 50, 50, 50, 67,
+ 69, 69, 69, 68, 68, 68, 68, 71, 73, 73,
+ 73, 72, 72, 72, 72, 72, 74, 74, 75, 75,
+ 11, 11, 11, 10, 10, 10, 10, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 24, 24, 24, 24, 24, 24, 24, 24, 24, 24,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 25, 25, 25, 25, 25, 25, 25, 25, 25, 25,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 27, 27, 27, 27, 27, 27, 27, 27, 27,
+ 27, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 26, 26, 26, 26, 26, 26, 26, 26, 26, 26,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22, 22, 22, 22, 22, 22, 22, 22,
+ 22, 22, 22,
+}
+
+var protoR2 = [...]int8{
+ 0, 1, 1, 2, 0, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 2, 1, 4, 3, 4,
+ 4, 3, 1, 3, 1, 3, 1, 3, 1, 3,
+ 5, 1, 3, 1, 3, 1, 1, 1, 1, 1,
+ 1, 2, 2, 2, 2, 1, 2, 2, 1, 2,
+ 3, 3, 1, 2, 0, 1, 2, 2, 2, 2,
+ 1, 3, 3, 4, 4, 5, 5, 4, 3, 2,
+ 5, 4, 1, 3, 5, 3, 1, 3, 1, 3,
+ 3, 1, 3, 3, 5, 3, 5, 1, 2, 1,
+ 2, 1, 2, 1, 2, 6, 6, 6, 7, 7,
+ 7, 5, 6, 6, 6, 6, 7, 7, 7, 5,
+ 6, 3, 1, 3, 3, 8, 8, 8, 9, 9,
+ 9, 5, 2, 1, 0, 1, 1, 1, 2, 1,
+ 5, 6, 7, 8, 5, 6, 6, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 3,
+ 4, 1, 3, 1, 3, 3, 1, 3, 1, 3,
+ 3, 1, 2, 3, 1, 3, 1, 3, 1, 3,
+ 5, 2, 1, 0, 1, 1, 1, 1, 2, 1,
+ 4, 5, 5, 2, 1, 0, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 2, 1, 5,
+ 2, 1, 0, 1, 1, 2, 1, 5, 2, 1,
+ 0, 1, 1, 1, 2, 1, 6, 8, 4, 3,
+ 2, 1, 0, 1, 1, 2, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
+ 1, 1, 1,
+}
+
+var protoChk = [...]int16{
+ -1000, -1, -2, -4, 8, -3, -5, -6, -7, -49,
+ -63, -67, -71, 52, 2, 9, 12, 13, 44, 43,
+ 45, 46, -4, -3, 51, 52, -70, 10, 11, 4,
+ -28, -22, 7, 8, 9, 10, 11, 12, 13, 14,
+ 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
+ 25, 26, 27, 28, 29, 30, 31, 32, 33, 34,
+ 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
+ 45, 46, 47, 48, 49, -14, -12, -22, 65, -22,
+ -22, -32, -28, 59, -22, -70, 52, -70, -70, -70,
+ 52, 59, 51, 59, -32, 54, 54, 54, -28, 54,
+ 52, 52, 52, -28, -16, -17, -18, -70, -20, -22,
+ 54, 6, 64, 63, 5, -14, 66, -51, -50, -41,
+ -63, -49, -67, -62, -45, -7, -44, -47, -55, 52,
+ 2, 20, 19, 18, -33, 39, 37, -48, 42, -57,
+ -29, 59, 38, -24, 7, 8, 9, 10, 11, 12,
+ 14, 15, 16, 17, 21, 22, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, 35, 36,
+ 40, 41, 46, 47, 48, 49, -65, -64, -7, -66,
+ -56, 52, 2, -27, 42, -57, 7, 8, 9, 10,
+ 11, 12, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 43, 44, 45, 46, 47, 48, 49, -69, -68, -43,
+ -45, 2, 20, 19, 18, -34, -30, 59, -25, 7,
+ 8, 9, 10, 11, 12, 13, 14, 15, 16, 17,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 36, 37, 38, 39, 40,
+ 41, 42, 43, 44, 45, 46, 47, 48, 49, -73,
+ -72, -7, -74, 52, 2, 47, 52, -40, 2, -39,
+ -38, -13, -22, 67, 6, 16, 5, 6, 16, 5,
+ 55, -50, 52, -32, 36, -32, 36, -32, 36, -22,
+ -60, -58, 5, -22, -22, -60, -54, -70, -28, 62,
+ 59, 55, -64, 52, 51, -61, -59, -21, 5, 64,
+ 55, -68, 52, -32, -32, -32, -22, -28, 59, 55,
+ -72, 52, -22, 55, 55, 60, 52, -40, 2, 60,
+ 52, 53, 67, -19, 62, -18, -28, 2, -22, -22,
+ -22, -22, -22, -22, 51, 52, -15, 67, 60, 40,
+ 54, 51, 52, 52, 60, -23, 23, 24, 25, 26,
+ 27, 28, 29, 30, 31, 32, 33, 34, -28, -21,
+ 52, 60, 40, 5, -22, -22, -22, 51, -28, -75,
+ 65, -17, 67, -19, 62, 68, -37, 2, -19, 62,
+ 2, -40, 68, 57, 68, 51, 51, 51, 51, 51,
+ 51, 5, 52, -9, -8, -14, -60, 5, 41, -53,
+ -52, -7, -42, -46, 2, -35, 36, -31, 59, -26,
+ 7, 8, 9, 10, 11, 12, 14, 15, 16, 17,
+ 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
+ 31, 32, 33, 34, 35, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 5, -54,
+ 60, 52, -15, -61, -21, 41, 51, 51, 51, 5,
+ 49, 48, -32, 68, -36, 2, -16, 62, 2, 68,
+ 68, 60, 2, 61, 61, -28, 5, 5, 5, 5,
+ 5, 5, 52, -15, 68, 60, 51, 55, -52, 52,
+ -22, -22, -28, 59, 52, -15, -32, 52, 5, 5,
+ 5, 52, -15, -75, -32, 66, 68, 68, 60, -40,
+ 2, 61, -37, 61, 68, 52, -15, 54, -15, 52,
+ -15, 54, -15, 52, -15, 54, -15, 52, -9, -16,
+ 51, 51, -28, 52, 61, 52, -15, 52, -15, 52,
+ -15, 52, 52, 54, 66, -36, 61, 61, 52, -51,
+ 54, 52, -51, 54, 52, -51, 54, 5, 5, 52,
+ 52, 52, -11, -10, -7, 52, 2, 60, 60, 55,
+ -51, 55, -51, 55, -51, 52, -15, 54, -15, 55,
+ -10, 52, -36, -36, 55, 55, 55, 52, -51, 54,
+ 55, -51, 55,
+}
+
+var protoDef = [...]int16{
+ -2, -2, -2, -2, 0, 6, 7, 8, 9, 10,
+ 11, 12, 13, 14, 16, 0, 0, 0, 0, 0,
+ 0, 0, -2, 5, 0, 15, 0, 0, 0, 48,
+ 0, 22, 380, 381, 382, 383, 384, 385, 386, 387,
+ 388, 389, 390, 391, 392, 393, 394, 395, 396, 397,
+ 398, 399, 400, 401, 402, 403, 404, 405, 406, 407,
+ 408, 409, 410, 411, 412, 413, 414, 415, 416, 417,
+ 418, 419, 420, 421, 422, 0, 31, 33, 0, 0,
+ 0, 0, 87, 0, 0, 0, 18, 0, 0, 49,
+ 21, 0, 0, 0, 0, -2, -2, -2, 88, -2,
+ 17, 19, 20, 23, 0, 35, 36, 37, 38, 39,
+ -2, 40, 0, 0, 45, 32, 34, 0, 184, 186,
+ 187, 188, 189, 190, 191, 192, 193, 194, 195, 196,
+ 198, 0, 0, 0, 0, 0, 0, 0, 0, 164,
+ 89, 0, 253, 24, 227, 228, 229, 230, 231, 232,
+ 233, 234, 235, 236, 237, 238, 239, 240, 241, 242,
+ 243, 244, 245, 246, 247, 248, 249, 250, 251, 252,
+ 254, 255, 256, 257, 258, 259, 0, 172, 174, 175,
+ 176, 177, 179, 0, 0, 166, 300, 301, 302, 303,
+ 304, 305, 306, 307, 308, 309, 310, 311, 312, 313,
+ 314, 315, 316, 317, 318, 319, 320, 321, 322, 323,
+ 324, 325, 326, 327, 328, 329, 330, 331, 332, 333,
+ 334, 335, 336, 337, 338, 339, 340, 0, 201, 203,
+ 204, 206, 0, 0, 0, 0, 91, 0, 26, 260,
+ 261, 262, 263, 264, 265, 266, 267, 268, 269, 270,
+ 271, 272, 273, 274, 275, 276, 277, 278, 279, 280,
+ 281, 282, 283, 284, 285, 286, 287, 288, 289, 290,
+ 291, 292, 293, 294, 295, 296, 297, 298, 299, 0,
+ 209, 211, 212, 213, 215, 0, 30, 0, 60, -2,
+ 55, 0, 72, 0, 41, 44, 47, 42, 43, 46,
+ 182, 183, 197, 0, 409, 0, 409, 0, 409, 0,
+ 0, 151, 153, 0, 0, 0, 0, 168, 90, 0,
+ 0, 170, 171, 178, 0, 0, 156, 158, 161, 0,
+ 199, 200, 205, 0, 0, 0, 0, 92, 0, 207,
+ 208, 214, 0, 50, 51, 58, 59, 53, 60, 56,
+ 57, 0, 0, 69, -2, 78, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 149, 0, 0, 0, 0,
+ -2, 0, 163, 167, 0, 0, 137, 138, 139, 140,
+ 141, 142, 143, 144, 145, 146, 147, 148, 25, 0,
+ 165, 0, 0, 162, 0, 0, 0, 0, 27, 0,
+ 0, 61, 0, 68, -2, 62, 0, 0, 76, -2,
+ 60, 0, 73, 0, 75, 0, 0, 0, 0, 0,
+ 0, 0, 150, 0, 112, 0, 152, 154, 155, 0,
+ 123, 125, 126, 127, 129, 0, 366, 93, 0, 28,
+ 341, 342, 343, 344, 345, 346, 347, 348, 349, 350,
+ 351, 352, 353, 354, 355, 356, 357, 358, 359, 360,
+ 361, 362, 363, 364, 365, 367, 368, 369, 370, 371,
+ 372, 373, 374, 375, 376, 377, 378, 379, 0, 169,
+ 0, 180, 0, 157, 159, 160, 0, 0, 0, 0,
+ 0, 421, 0, 63, 0, 0, 81, -2, 60, 64,
+ 67, 0, 60, 71, 79, 0, 0, 0, 0, 0,
+ 0, 0, 101, 0, 111, 0, 0, 121, 122, 128,
+ 0, 0, 94, 0, 134, 0, 0, 181, 0, 0,
+ 0, 109, 0, 0, 0, 219, 65, 66, 0, 0,
+ 60, 70, 77, 80, 74, 95, 0, -2, 0, 96,
+ 0, -2, 0, 97, 0, -2, 0, 102, 113, 114,
+ 0, 0, 29, 135, 136, 103, 0, 104, 0, 105,
+ 0, 110, 216, -2, 218, 82, 83, 85, 98, 0,
+ -2, 99, 0, -2, 100, 0, -2, 0, 0, 106,
+ 107, 108, 0, 221, 223, 224, 226, 0, 0, 115,
+ 0, 116, 0, 117, 0, 130, 0, -2, 0, 217,
+ 220, 225, 84, 86, 118, 119, 120, 131, 0, -2,
+ 132, 0, 133,
+}
+
+var protoTok1 = [...]int8{
+ 1, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 76, 3, 74, 73, 72, 70, 3,
+ 65, 66, 69, 63, 60, 64, 59, 57, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 53, 52,
+ 62, 51, 61, 58, 75, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 67, 56, 68, 71, 3, 78, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
+ 3, 3, 3, 54, 3, 55, 77,
+}
+
+var protoTok2 = [...]int8{
+ 2, 3, 4, 5, 6, 7, 8, 9, 10, 11,
+ 12, 13, 14, 15, 16, 17, 18, 19, 20, 21,
+ 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
+ 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
+ 42, 43, 44, 45, 46, 47, 48, 49, 50,
+}
+
+var protoTok3 = [...]int8{
+ 0,
+}
+
+var protoErrorMessages = [...]struct {
+ state int
+ token int
+ msg string
+}{}
+
+/* parser for yacc output */
+
+var (
+ protoDebug = 0
+ protoErrorVerbose = false
+)
+
+type protoLexer interface {
+ Lex(lval *protoSymType) int
+ Error(s string)
+}
+
+type protoParser interface {
+ Parse(protoLexer) int
+ Lookahead() int
+}
+
+type protoParserImpl struct {
+ lval protoSymType
+ stack [protoInitialStackSize]protoSymType
+ char int
+}
+
+func (p *protoParserImpl) Lookahead() int {
+ return p.char
+}
+
+func protoNewParser() protoParser {
+ return &protoParserImpl{}
+}
+
+const protoFlag = -1000
+
+func protoTokname(c int) string {
+ if c >= 1 && c-1 < len(protoToknames) {
+ if protoToknames[c-1] != "" {
+ return protoToknames[c-1]
+ }
+ }
+ return __yyfmt__.Sprintf("tok-%v", c)
+}
+
+func protoStatname(s int) string {
+ if s >= 0 && s < len(protoStatenames) {
+ if protoStatenames[s] != "" {
+ return protoStatenames[s]
+ }
+ }
+ return __yyfmt__.Sprintf("state-%v", s)
+}
+
+func protoErrorMessage(state, lookAhead int) string {
+ const TOKSTART = 4
+
+ if !protoErrorVerbose {
+ return "syntax error"
+ }
+
+ for _, e := range protoErrorMessages {
+ if e.state == state && e.token == lookAhead {
+ return "syntax error: " + e.msg
+ }
+ }
+
+ res := "syntax error: unexpected " + protoTokname(lookAhead)
+
+ // To match Bison, suggest at most four expected tokens.
+ expected := make([]int, 0, 4)
+
+ // Look for shiftable tokens.
+ base := int(protoPact[state])
+ for tok := TOKSTART; tok-1 < len(protoToknames); tok++ {
+ if n := base + tok; n >= 0 && n < protoLast && int(protoChk[int(protoAct[n])]) == tok {
+ if len(expected) == cap(expected) {
+ return res
+ }
+ expected = append(expected, tok)
+ }
+ }
+
+ if protoDef[state] == -2 {
+ i := 0
+ for protoExca[i] != -1 || int(protoExca[i+1]) != state {
+ i += 2
+ }
+
+ // Look for tokens that we accept or reduce.
+ for i += 2; protoExca[i] >= 0; i += 2 {
+ tok := int(protoExca[i])
+ if tok < TOKSTART || protoExca[i+1] == 0 {
+ continue
+ }
+ if len(expected) == cap(expected) {
+ return res
+ }
+ expected = append(expected, tok)
+ }
+
+ // If the default action is to accept or reduce, give up.
+ if protoExca[i+1] != 0 {
+ return res
+ }
+ }
+
+ for i, tok := range expected {
+ if i == 0 {
+ res += ", expecting "
+ } else {
+ res += " or "
+ }
+ res += protoTokname(tok)
+ }
+ return res
+}
+
+func protolex1(lex protoLexer, lval *protoSymType) (char, token int) {
+ token = 0
+ char = lex.Lex(lval)
+ if char <= 0 {
+ token = int(protoTok1[0])
+ goto out
+ }
+ if char < len(protoTok1) {
+ token = int(protoTok1[char])
+ goto out
+ }
+ if char >= protoPrivate {
+ if char < protoPrivate+len(protoTok2) {
+ token = int(protoTok2[char-protoPrivate])
+ goto out
+ }
+ }
+ for i := 0; i < len(protoTok3); i += 2 {
+ token = int(protoTok3[i+0])
+ if token == char {
+ token = int(protoTok3[i+1])
+ goto out
+ }
+ }
+
+out:
+ if token == 0 {
+ token = int(protoTok2[1]) /* unknown char */
+ }
+ if protoDebug >= 3 {
+ __yyfmt__.Printf("lex %s(%d)\n", protoTokname(token), uint(char))
+ }
+ return char, token
+}
+
+func protoParse(protolex protoLexer) int {
+ return protoNewParser().Parse(protolex)
+}
+
+func (protorcvr *protoParserImpl) Parse(protolex protoLexer) int {
+ var proton int
+ var protoVAL protoSymType
+ var protoDollar []protoSymType
+ _ = protoDollar // silence set and not used
+ protoS := protorcvr.stack[:]
+
+ Nerrs := 0 /* number of errors */
+ Errflag := 0 /* error recovery flag */
+ protostate := 0
+ protorcvr.char = -1
+ prototoken := -1 // protorcvr.char translated into internal numbering
+ defer func() {
+ // Make sure we report no lookahead when not parsing.
+ protostate = -1
+ protorcvr.char = -1
+ prototoken = -1
+ }()
+ protop := -1
+ goto protostack
+
+ret0:
+ return 0
+
+ret1:
+ return 1
+
+protostack:
+ /* put a state and value onto the stack */
+ if protoDebug >= 4 {
+ __yyfmt__.Printf("char %v in %v\n", protoTokname(prototoken), protoStatname(protostate))
+ }
+
+ protop++
+ if protop >= len(protoS) {
+ nyys := make([]protoSymType, len(protoS)*2)
+ copy(nyys, protoS)
+ protoS = nyys
+ }
+ protoS[protop] = protoVAL
+ protoS[protop].yys = protostate
+
+protonewstate:
+ proton = int(protoPact[protostate])
+ if proton <= protoFlag {
+ goto protodefault /* simple state */
+ }
+ if protorcvr.char < 0 {
+ protorcvr.char, prototoken = protolex1(protolex, &protorcvr.lval)
+ }
+ proton += prototoken
+ if proton < 0 || proton >= protoLast {
+ goto protodefault
+ }
+ proton = int(protoAct[proton])
+ if int(protoChk[proton]) == prototoken { /* valid shift */
+ protorcvr.char = -1
+ prototoken = -1
+ protoVAL = protorcvr.lval
+ protostate = proton
+ if Errflag > 0 {
+ Errflag--
+ }
+ goto protostack
+ }
+
+protodefault:
+ /* default state action */
+ proton = int(protoDef[protostate])
+ if proton == -2 {
+ if protorcvr.char < 0 {
+ protorcvr.char, prototoken = protolex1(protolex, &protorcvr.lval)
+ }
+
+ /* look through exception table */
+ xi := 0
+ for {
+ if protoExca[xi+0] == -1 && int(protoExca[xi+1]) == protostate {
+ break
+ }
+ xi += 2
+ }
+ for xi += 2; ; xi += 2 {
+ proton = int(protoExca[xi+0])
+ if proton < 0 || proton == prototoken {
+ break
+ }
+ }
+ proton = int(protoExca[xi+1])
+ if proton < 0 {
+ goto ret0
+ }
+ }
+ if proton == 0 {
+ /* error ... attempt to resume parsing */
+ switch Errflag {
+ case 0: /* brand new error */
+ protolex.Error(protoErrorMessage(protostate, prototoken))
+ Nerrs++
+ if protoDebug >= 1 {
+ __yyfmt__.Printf("%s", protoStatname(protostate))
+ __yyfmt__.Printf(" saw %s\n", protoTokname(prototoken))
+ }
+ fallthrough
+
+ case 1, 2: /* incompletely recovered error ... try again */
+ Errflag = 3
+
+ /* find a state where "error" is a legal shift action */
+ for protop >= 0 {
+ proton = int(protoPact[protoS[protop].yys]) + protoErrCode
+ if proton >= 0 && proton < protoLast {
+ protostate = int(protoAct[proton]) /* simulate a shift of "error" */
+ if int(protoChk[protostate]) == protoErrCode {
+ goto protostack
+ }
+ }
+
+ /* the current p has no shift on "error", pop stack */
+ if protoDebug >= 2 {
+ __yyfmt__.Printf("error recovery pops state %d\n", protoS[protop].yys)
+ }
+ protop--
+ }
+ /* there is no state on the stack with an error shift ... abort */
+ goto ret1
+
+ case 3: /* no shift yet; clobber input char */
+ if protoDebug >= 2 {
+ __yyfmt__.Printf("error recovery discards %s\n", protoTokname(prototoken))
+ }
+ if prototoken == protoEofCode {
+ goto ret1
+ }
+ protorcvr.char = -1
+ prototoken = -1
+ goto protonewstate /* try again in the same state */
+ }
+ }
+
+ /* reduction by production proton */
+ if protoDebug >= 2 {
+ __yyfmt__.Printf("reduce %v in:\n\t%v\n", proton, protoStatname(protostate))
+ }
+
+ protont := proton
+ protopt := protop
+ _ = protopt // guard against "declared and not used"
+
+ protop -= int(protoR2[proton])
+ // protop is now the index of $0. Perform the default action. Iff the
+ // reduced production is ε, $1 is possibly out of range.
+ if protop+1 >= len(protoS) {
+ nyys := make([]protoSymType, len(protoS)*2)
+ copy(nyys, protoS)
+ protoS = nyys
+ }
+ protoVAL = protoS[protop+1]
+
+ /* consult goto table to find next state */
+ proton = int(protoR1[proton])
+ protog := int(protoPgo[proton])
+ protoj := protog + protoS[protop].yys + 1
+
+ if protoj >= protoLast {
+ protostate = int(protoAct[protog])
+ } else {
+ protostate = int(protoAct[protoj])
+ if int(protoChk[protostate]) != -proton {
+ protostate = int(protoAct[protog])
+ }
+ }
+ // dummy call; replaced with literal code
+ switch protont {
+
+ case 1:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ lex := protolex.(*protoLex)
+ protoVAL.file = ast.NewFileNode(lex.info, protoDollar[1].syn, nil, lex.eof)
+ lex.res = protoVAL.file
+ }
+ case 2:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ lex := protolex.(*protoLex)
+ protoVAL.file = ast.NewFileNode(lex.info, nil, protoDollar[1].fileDecls, lex.eof)
+ lex.res = protoVAL.file
+ }
+ case 3:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ lex := protolex.(*protoLex)
+ protoVAL.file = ast.NewFileNode(lex.info, protoDollar[1].syn, protoDollar[2].fileDecls, lex.eof)
+ lex.res = protoVAL.file
+ }
+ case 4:
+ protoDollar = protoS[protopt-0 : protopt+1]
+ {
+ lex := protolex.(*protoLex)
+ protoVAL.file = ast.NewFileNode(lex.info, nil, nil, lex.eof)
+ lex.res = protoVAL.file
+ }
+ case 5:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[2].fileDecl != nil {
+ protoVAL.fileDecls = append(protoDollar[1].fileDecls, protoDollar[2].fileDecl)
+ } else {
+ protoVAL.fileDecls = protoDollar[1].fileDecls
+ }
+ }
+ case 6:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ if protoDollar[1].fileDecl != nil {
+ protoVAL.fileDecls = []ast.FileElement{protoDollar[1].fileDecl}
+ } else {
+ protoVAL.fileDecls = nil
+ }
+ }
+ case 7:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.fileDecl = protoDollar[1].imprt
+ }
+ case 8:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.fileDecl = protoDollar[1].pkg
+ }
+ case 9:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.fileDecl = protoDollar[1].opt
+ }
+ case 10:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.fileDecl = protoDollar[1].msg
+ }
+ case 11:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.fileDecl = protoDollar[1].en
+ }
+ case 12:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.fileDecl = protoDollar[1].extend
+ }
+ case 13:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.fileDecl = protoDollar[1].svc
+ }
+ case 14:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.fileDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
+ }
+ case 15:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.fileDecl = nil
+ }
+ case 16:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.fileDecl = nil
+ }
+ case 17:
+ protoDollar = protoS[protopt-4 : protopt+1]
+ {
+ protoVAL.syn = ast.NewSyntaxNode(protoDollar[1].id.ToKeyword(), protoDollar[2].b, protoDollar[3].str.toStringValueNode(), protoDollar[4].b)
+ }
+ case 18:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.imprt = ast.NewImportNode(protoDollar[1].id.ToKeyword(), nil, nil, protoDollar[2].str.toStringValueNode(), protoDollar[3].b)
+ }
+ case 19:
+ protoDollar = protoS[protopt-4 : protopt+1]
+ {
+ protoVAL.imprt = ast.NewImportNode(protoDollar[1].id.ToKeyword(), nil, protoDollar[2].id.ToKeyword(), protoDollar[3].str.toStringValueNode(), protoDollar[4].b)
+ }
+ case 20:
+ protoDollar = protoS[protopt-4 : protopt+1]
+ {
+ protoVAL.imprt = ast.NewImportNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), nil, protoDollar[3].str.toStringValueNode(), protoDollar[4].b)
+ }
+ case 21:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.pkg = ast.NewPackageNode(protoDollar[1].id.ToKeyword(), protoDollar[2].cid.toIdentValueNode(nil), protoDollar[3].b)
+ }
+ case 22:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.cid = &identList{protoDollar[1].id, nil, nil}
+ }
+ case 23:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.cid = &identList{protoDollar[1].id, protoDollar[2].b, protoDollar[3].cid}
+ }
+ case 24:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.cid = &identList{protoDollar[1].id, nil, nil}
+ }
+ case 25:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.cid = &identList{protoDollar[1].id, protoDollar[2].b, protoDollar[3].cid}
+ }
+ case 26:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.cid = &identList{protoDollar[1].id, nil, nil}
+ }
+ case 27:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.cid = &identList{protoDollar[1].id, protoDollar[2].b, protoDollar[3].cid}
+ }
+ case 28:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.cid = &identList{protoDollar[1].id, nil, nil}
+ }
+ case 29:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.cid = &identList{protoDollar[1].id, protoDollar[2].b, protoDollar[3].cid}
+ }
+ case 30:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ refs, dots := protoDollar[2].optNms.toNodes()
+ optName := ast.NewOptionNameNode(refs, dots)
+ protoVAL.opt = ast.NewOptionNode(protoDollar[1].id.ToKeyword(), optName, protoDollar[3].b, protoDollar[4].v, protoDollar[5].b)
+ }
+ case 31:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.optNms = &fieldRefList{protoDollar[1].ref, nil, nil}
+ }
+ case 32:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.optNms = &fieldRefList{protoDollar[1].ref, protoDollar[2].b, protoDollar[3].optNms}
+ }
+ case 33:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.ref = ast.NewFieldReferenceNode(protoDollar[1].id)
+ }
+ case 34:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.ref = ast.NewExtensionFieldReferenceNode(protoDollar[1].b, protoDollar[2].tid, protoDollar[3].b)
+ }
+ case 37:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.v = protoDollar[1].str.toStringValueNode()
+ }
+ case 39:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.v = protoDollar[1].id
+ }
+ case 40:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.v = protoDollar[1].f
+ }
+ case 41:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.v = ast.NewSignedFloatLiteralNode(protoDollar[1].b, protoDollar[2].f)
+ }
+ case 42:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.v = ast.NewSignedFloatLiteralNode(protoDollar[1].b, protoDollar[2].f)
+ }
+ case 43:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ f := ast.NewSpecialFloatLiteralNode(protoDollar[2].id.ToKeyword())
+ protoVAL.v = ast.NewSignedFloatLiteralNode(protoDollar[1].b, f)
+ }
+ case 44:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ f := ast.NewSpecialFloatLiteralNode(protoDollar[2].id.ToKeyword())
+ protoVAL.v = ast.NewSignedFloatLiteralNode(protoDollar[1].b, f)
+ }
+ case 45:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.v = protoDollar[1].i
+ }
+ case 46:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.v = ast.NewPositiveUintLiteralNode(protoDollar[1].b, protoDollar[2].i)
+ }
+ case 47:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[2].i.Val > math.MaxInt64+1 {
+ // can't represent as int so treat as float literal
+ protoVAL.v = ast.NewSignedFloatLiteralNode(protoDollar[1].b, protoDollar[2].i)
+ } else {
+ protoVAL.v = ast.NewNegativeIntLiteralNode(protoDollar[1].b, protoDollar[2].i)
+ }
+ }
+ case 48:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.str = &stringList{protoDollar[1].s, nil}
+ }
+ case 49:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.str = &stringList{protoDollar[1].s, protoDollar[2].str}
+ }
+ case 50:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ fields, delims := protoDollar[2].msgLit.toNodes()
+ protoVAL.v = ast.NewMessageLiteralNode(protoDollar[1].b, fields, delims, protoDollar[3].b)
+ }
+ case 51:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.v = nil
+ }
+ case 52:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ if protoDollar[1].msgEntry != nil {
+ protoVAL.msgLit = &messageFieldList{protoDollar[1].msgEntry, nil}
+ } else {
+ protoVAL.msgLit = nil
+ }
+ }
+ case 53:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[1].msgEntry != nil {
+ protoVAL.msgLit = &messageFieldList{protoDollar[1].msgEntry, protoDollar[2].msgLit}
+ } else {
+ protoVAL.msgLit = protoDollar[2].msgLit
+ }
+ }
+ case 54:
+ protoDollar = protoS[protopt-0 : protopt+1]
+ {
+ protoVAL.msgLit = nil
+ }
+ case 55:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ if protoDollar[1].msgField != nil {
+ protoVAL.msgEntry = &messageFieldEntry{protoDollar[1].msgField, nil}
+ } else {
+ protoVAL.msgEntry = nil
+ }
+ }
+ case 56:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[1].msgField != nil {
+ protoVAL.msgEntry = &messageFieldEntry{protoDollar[1].msgField, protoDollar[2].b}
+ } else {
+ protoVAL.msgEntry = nil
+ }
+ }
+ case 57:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[1].msgField != nil {
+ protoVAL.msgEntry = &messageFieldEntry{protoDollar[1].msgField, protoDollar[2].b}
+ } else {
+ protoVAL.msgEntry = nil
+ }
+ }
+ case 58:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.msgEntry = nil
+ }
+ case 59:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.msgEntry = nil
+ }
+ case 60:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgEntry = nil
+ }
+ case 61:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ if protoDollar[1].ref != nil {
+ protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, protoDollar[2].b, protoDollar[3].v)
+ } else {
+ protoVAL.msgField = nil
+ }
+ }
+ case 62:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ if protoDollar[1].ref != nil {
+ val := ast.NewArrayLiteralNode(protoDollar[2].b, nil, nil, protoDollar[3].b)
+ protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, nil, val)
+ } else {
+ protoVAL.msgField = nil
+ }
+ }
+ case 63:
+ protoDollar = protoS[protopt-4 : protopt+1]
+ {
+ if protoDollar[1].ref != nil {
+ val := ast.NewArrayLiteralNode(protoDollar[3].b, nil, nil, protoDollar[4].b)
+ protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, protoDollar[2].b, val)
+ } else {
+ protoVAL.msgField = nil
+ }
+ }
+ case 64:
+ protoDollar = protoS[protopt-4 : protopt+1]
+ {
+ if protoDollar[1].ref != nil {
+ vals, commas := protoDollar[3].sl.toNodes()
+ val := ast.NewArrayLiteralNode(protoDollar[2].b, vals, commas, protoDollar[4].b)
+ protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, nil, val)
+ } else {
+ protoVAL.msgField = nil
+ }
+ }
+ case 65:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ if protoDollar[1].ref != nil {
+ vals, commas := protoDollar[4].sl.toNodes()
+ val := ast.NewArrayLiteralNode(protoDollar[3].b, vals, commas, protoDollar[5].b)
+ protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, protoDollar[2].b, val)
+ } else {
+ protoVAL.msgField = nil
+ }
+ }
+ case 66:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.msgField = nil
+ }
+ case 67:
+ protoDollar = protoS[protopt-4 : protopt+1]
+ {
+ protoVAL.msgField = nil
+ }
+ case 68:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ if protoDollar[1].ref != nil && protoDollar[3].v != nil {
+ protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, protoDollar[2].b, protoDollar[3].v)
+ } else {
+ protoVAL.msgField = nil
+ }
+ }
+ case 69:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[1].ref != nil && protoDollar[2].v != nil {
+ protoVAL.msgField = ast.NewMessageFieldNode(protoDollar[1].ref, nil, protoDollar[2].v)
+ } else {
+ protoVAL.msgField = nil
+ }
+ }
+ case 70:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.msgField = nil
+ }
+ case 71:
+ protoDollar = protoS[protopt-4 : protopt+1]
+ {
+ protoVAL.msgField = nil
+ }
+ case 72:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.ref = ast.NewFieldReferenceNode(protoDollar[1].id)
+ }
+ case 73:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.ref = ast.NewExtensionFieldReferenceNode(protoDollar[1].b, protoDollar[2].cid.toIdentValueNode(nil), protoDollar[3].b)
+ }
+ case 74:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.ref = ast.NewAnyTypeReferenceNode(protoDollar[1].b, protoDollar[2].cid.toIdentValueNode(nil), protoDollar[3].b, protoDollar[4].cid.toIdentValueNode(nil), protoDollar[5].b)
+ }
+ case 75:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.ref = nil
+ }
+ case 76:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ if protoDollar[1].v == nil {
+ protoVAL.sl = nil
+ } else {
+ protoVAL.sl = &valueList{protoDollar[1].v, nil, nil}
+ }
+ }
+ case 77:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ if protoDollar[1].v == nil {
+ protoVAL.sl = nil
+ } else {
+ protoVAL.sl = &valueList{protoDollar[1].v, protoDollar[2].b, protoDollar[3].sl}
+ }
+ }
+ case 78:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.v = protoDollar[1].v
+ }
+ case 79:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ fields, delims := protoDollar[2].msgLit.toNodes()
+ protoVAL.v = ast.NewMessageLiteralNode(protoDollar[1].b, fields, delims, protoDollar[3].b)
+ }
+ case 80:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.v = nil
+ }
+ case 81:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.sl = &valueList{protoDollar[1].v, nil, nil}
+ }
+ case 82:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.sl = &valueList{protoDollar[1].v, protoDollar[2].b, protoDollar[3].sl}
+ }
+ case 83:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ fields, delims := protoDollar[2].msgLit.toNodes()
+ msg := ast.NewMessageLiteralNode(protoDollar[1].b, fields, delims, protoDollar[3].b)
+ protoVAL.sl = &valueList{msg, nil, nil}
+ }
+ case 84:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ fields, delims := protoDollar[2].msgLit.toNodes()
+ msg := ast.NewMessageLiteralNode(protoDollar[1].b, fields, delims, protoDollar[3].b)
+ protoVAL.sl = &valueList{msg, protoDollar[4].b, protoDollar[5].sl}
+ }
+ case 85:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.sl = nil
+ }
+ case 86:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.sl = protoDollar[5].sl
+ }
+ case 87:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.tid = protoDollar[1].cid.toIdentValueNode(nil)
+ }
+ case 88:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.tid = protoDollar[2].cid.toIdentValueNode(protoDollar[1].b)
+ }
+ case 89:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.tid = protoDollar[1].cid.toIdentValueNode(nil)
+ }
+ case 90:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.tid = protoDollar[2].cid.toIdentValueNode(protoDollar[1].b)
+ }
+ case 91:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.tid = protoDollar[1].cid.toIdentValueNode(nil)
+ }
+ case 92:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.tid = protoDollar[2].cid.toIdentValueNode(protoDollar[1].b)
+ }
+ case 93:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.tid = protoDollar[1].cid.toIdentValueNode(nil)
+ }
+ case 94:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.tid = protoDollar[2].cid.toIdentValueNode(protoDollar[1].b)
+ }
+ case 95:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b)
+ }
+ case 96:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b)
+ }
+ case 97:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b)
+ }
+ case 98:
+ protoDollar = protoS[protopt-7 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b)
+ }
+ case 99:
+ protoDollar = protoS[protopt-7 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b)
+ }
+ case 100:
+ protoDollar = protoS[protopt-7 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b)
+ }
+ case 101:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b)
+ }
+ case 102:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b)
+ }
+ case 103:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b)
+ }
+ case 104:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b)
+ }
+ case 105:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b)
+ }
+ case 106:
+ protoDollar = protoS[protopt-7 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b)
+ }
+ case 107:
+ protoDollar = protoS[protopt-7 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b)
+ }
+ case 108:
+ protoDollar = protoS[protopt-7 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b)
+ }
+ case 109:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b)
+ }
+ case 110:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b)
+ }
+ case 111:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ opts, commas := protoDollar[2].opts.toNodes()
+ protoVAL.cmpctOpts = ast.NewCompactOptionsNode(protoDollar[1].b, opts, commas, protoDollar[3].b)
+ }
+ case 112:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.opts = &compactOptionList{protoDollar[1].opt, nil, nil}
+ }
+ case 113:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.opts = &compactOptionList{protoDollar[1].opt, protoDollar[2].b, protoDollar[3].opts}
+ }
+ case 114:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ refs, dots := protoDollar[1].optNms.toNodes()
+ optName := ast.NewOptionNameNode(refs, dots)
+ protoVAL.opt = ast.NewCompactOptionNode(optName, protoDollar[2].b, protoDollar[3].v)
+ }
+ case 115:
+ protoDollar = protoS[protopt-8 : protopt+1]
+ {
+ protoVAL.grp = ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b, protoDollar[7].msgDecls, protoDollar[8].b)
+ }
+ case 116:
+ protoDollar = protoS[protopt-8 : protopt+1]
+ {
+ protoVAL.grp = ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b, protoDollar[7].msgDecls, protoDollar[8].b)
+ }
+ case 117:
+ protoDollar = protoS[protopt-8 : protopt+1]
+ {
+ protoVAL.grp = ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, nil, protoDollar[6].b, protoDollar[7].msgDecls, protoDollar[8].b)
+ }
+ case 118:
+ protoDollar = protoS[protopt-9 : protopt+1]
+ {
+ protoVAL.grp = ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b, protoDollar[8].msgDecls, protoDollar[9].b)
+ }
+ case 119:
+ protoDollar = protoS[protopt-9 : protopt+1]
+ {
+ protoVAL.grp = ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b, protoDollar[8].msgDecls, protoDollar[9].b)
+ }
+ case 120:
+ protoDollar = protoS[protopt-9 : protopt+1]
+ {
+ protoVAL.grp = ast.NewGroupNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id.ToKeyword(), protoDollar[3].id, protoDollar[4].b, protoDollar[5].i, protoDollar[6].cmpctOpts, protoDollar[7].b, protoDollar[8].msgDecls, protoDollar[9].b)
+ }
+ case 121:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.oo = ast.NewOneOfNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].ooDecls, protoDollar[5].b)
+ }
+ case 122:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[2].ooDecl != nil {
+ protoVAL.ooDecls = append(protoDollar[1].ooDecls, protoDollar[2].ooDecl)
+ } else {
+ protoVAL.ooDecls = protoDollar[1].ooDecls
+ }
+ }
+ case 123:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ if protoDollar[1].ooDecl != nil {
+ protoVAL.ooDecls = []ast.OneOfElement{protoDollar[1].ooDecl}
+ } else {
+ protoVAL.ooDecls = nil
+ }
+ }
+ case 124:
+ protoDollar = protoS[protopt-0 : protopt+1]
+ {
+ protoVAL.ooDecls = nil
+ }
+ case 125:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.ooDecl = protoDollar[1].opt
+ }
+ case 126:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.ooDecl = protoDollar[1].fld
+ }
+ case 127:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.ooDecl = protoDollar[1].grp
+ }
+ case 128:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.ooDecl = nil
+ }
+ case 129:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.ooDecl = nil
+ }
+ case 130:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b)
+ }
+ case 131:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.fld = ast.NewFieldNode(nil, protoDollar[1].tid, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b)
+ }
+ case 132:
+ protoDollar = protoS[protopt-7 : protopt+1]
+ {
+ protoVAL.grp = ast.NewGroupNode(nil, protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b, protoDollar[6].msgDecls, protoDollar[7].b)
+ }
+ case 133:
+ protoDollar = protoS[protopt-8 : protopt+1]
+ {
+ protoVAL.grp = ast.NewGroupNode(nil, protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b, protoDollar[7].msgDecls, protoDollar[8].b)
+ }
+ case 134:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.mapFld = ast.NewMapFieldNode(protoDollar[1].mapType, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, nil, protoDollar[5].b)
+ }
+ case 135:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.mapFld = ast.NewMapFieldNode(protoDollar[1].mapType, protoDollar[2].id, protoDollar[3].b, protoDollar[4].i, protoDollar[5].cmpctOpts, protoDollar[6].b)
+ }
+ case 136:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.mapType = ast.NewMapTypeNode(protoDollar[1].id.ToKeyword(), protoDollar[2].b, protoDollar[3].id, protoDollar[4].b, protoDollar[5].tid, protoDollar[6].b)
+ }
+ case 149:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ ranges, commas := protoDollar[2].rngs.toNodes()
+ protoVAL.ext = ast.NewExtensionRangeNode(protoDollar[1].id.ToKeyword(), ranges, commas, nil, protoDollar[3].b)
+ }
+ case 150:
+ protoDollar = protoS[protopt-4 : protopt+1]
+ {
+ ranges, commas := protoDollar[2].rngs.toNodes()
+ protoVAL.ext = ast.NewExtensionRangeNode(protoDollar[1].id.ToKeyword(), ranges, commas, protoDollar[3].cmpctOpts, protoDollar[4].b)
+ }
+ case 151:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.rngs = &rangeList{protoDollar[1].rng, nil, nil}
+ }
+ case 152:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.rngs = &rangeList{protoDollar[1].rng, protoDollar[2].b, protoDollar[3].rngs}
+ }
+ case 153:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.rng = ast.NewRangeNode(protoDollar[1].i, nil, nil, nil)
+ }
+ case 154:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.rng = ast.NewRangeNode(protoDollar[1].i, protoDollar[2].id.ToKeyword(), protoDollar[3].i, nil)
+ }
+ case 155:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.rng = ast.NewRangeNode(protoDollar[1].i, protoDollar[2].id.ToKeyword(), nil, protoDollar[3].id.ToKeyword())
+ }
+ case 156:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.rngs = &rangeList{protoDollar[1].rng, nil, nil}
+ }
+ case 157:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.rngs = &rangeList{protoDollar[1].rng, protoDollar[2].b, protoDollar[3].rngs}
+ }
+ case 158:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.rng = ast.NewRangeNode(protoDollar[1].il, nil, nil, nil)
+ }
+ case 159:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.rng = ast.NewRangeNode(protoDollar[1].il, protoDollar[2].id.ToKeyword(), protoDollar[3].il, nil)
+ }
+ case 160:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.rng = ast.NewRangeNode(protoDollar[1].il, protoDollar[2].id.ToKeyword(), nil, protoDollar[3].id.ToKeyword())
+ }
+ case 161:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.il = protoDollar[1].i
+ }
+ case 162:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.il = ast.NewNegativeIntLiteralNode(protoDollar[1].b, protoDollar[2].i)
+ }
+ case 163:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ ranges, commas := protoDollar[2].rngs.toNodes()
+ protoVAL.resvd = ast.NewReservedRangesNode(protoDollar[1].id.ToKeyword(), ranges, commas, protoDollar[3].b)
+ }
+ case 165:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ ranges, commas := protoDollar[2].rngs.toNodes()
+ protoVAL.resvd = ast.NewReservedRangesNode(protoDollar[1].id.ToKeyword(), ranges, commas, protoDollar[3].b)
+ }
+ case 167:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ names, commas := protoDollar[2].names.toNodes()
+ protoVAL.resvd = ast.NewReservedNamesNode(protoDollar[1].id.ToKeyword(), names, commas, protoDollar[3].b)
+ }
+ case 168:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.names = &nameList{protoDollar[1].str.toStringValueNode(), nil, nil}
+ }
+ case 169:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.names = &nameList{protoDollar[1].str.toStringValueNode(), protoDollar[2].b, protoDollar[3].names}
+ }
+ case 170:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.en = ast.NewEnumNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].enDecls, protoDollar[5].b)
+ }
+ case 171:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[2].enDecl != nil {
+ protoVAL.enDecls = append(protoDollar[1].enDecls, protoDollar[2].enDecl)
+ } else {
+ protoVAL.enDecls = protoDollar[1].enDecls
+ }
+ }
+ case 172:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ if protoDollar[1].enDecl != nil {
+ protoVAL.enDecls = []ast.EnumElement{protoDollar[1].enDecl}
+ } else {
+ protoVAL.enDecls = nil
+ }
+ }
+ case 173:
+ protoDollar = protoS[protopt-0 : protopt+1]
+ {
+ protoVAL.enDecls = nil
+ }
+ case 174:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.enDecl = protoDollar[1].opt
+ }
+ case 175:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.enDecl = protoDollar[1].env
+ }
+ case 176:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.enDecl = protoDollar[1].resvd
+ }
+ case 177:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.enDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
+ }
+ case 178:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.enDecl = nil
+ }
+ case 179:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.enDecl = nil
+ }
+ case 180:
+ protoDollar = protoS[protopt-4 : protopt+1]
+ {
+ protoVAL.env = ast.NewEnumValueNode(protoDollar[1].id, protoDollar[2].b, protoDollar[3].il, nil, protoDollar[4].b)
+ }
+ case 181:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.env = ast.NewEnumValueNode(protoDollar[1].id, protoDollar[2].b, protoDollar[3].il, protoDollar[4].cmpctOpts, protoDollar[5].b)
+ }
+ case 182:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.msg = ast.NewMessageNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].msgDecls, protoDollar[5].b)
+ }
+ case 183:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[2].msgDecl != nil {
+ protoVAL.msgDecls = append(protoDollar[1].msgDecls, protoDollar[2].msgDecl)
+ } else {
+ protoVAL.msgDecls = protoDollar[1].msgDecls
+ }
+ }
+ case 184:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ if protoDollar[1].msgDecl != nil {
+ protoVAL.msgDecls = []ast.MessageElement{protoDollar[1].msgDecl}
+ } else {
+ protoVAL.msgDecls = nil
+ }
+ }
+ case 185:
+ protoDollar = protoS[protopt-0 : protopt+1]
+ {
+ protoVAL.msgDecls = nil
+ }
+ case 186:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = protoDollar[1].fld
+ }
+ case 187:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = protoDollar[1].en
+ }
+ case 188:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = protoDollar[1].msg
+ }
+ case 189:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = protoDollar[1].extend
+ }
+ case 190:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = protoDollar[1].ext
+ }
+ case 191:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = protoDollar[1].grp
+ }
+ case 192:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = protoDollar[1].opt
+ }
+ case 193:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = protoDollar[1].oo
+ }
+ case 194:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = protoDollar[1].mapFld
+ }
+ case 195:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = protoDollar[1].resvd
+ }
+ case 196:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
+ }
+ case 197:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.msgDecl = nil
+ }
+ case 198:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.msgDecl = nil
+ }
+ case 199:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.extend = ast.NewExtendNode(protoDollar[1].id.ToKeyword(), protoDollar[2].tid, protoDollar[3].b, protoDollar[4].extDecls, protoDollar[5].b)
+ }
+ case 200:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[2].extDecl != nil {
+ protoVAL.extDecls = append(protoDollar[1].extDecls, protoDollar[2].extDecl)
+ } else {
+ protoVAL.extDecls = protoDollar[1].extDecls
+ }
+ }
+ case 201:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ if protoDollar[1].extDecl != nil {
+ protoVAL.extDecls = []ast.ExtendElement{protoDollar[1].extDecl}
+ } else {
+ protoVAL.extDecls = nil
+ }
+ }
+ case 202:
+ protoDollar = protoS[protopt-0 : protopt+1]
+ {
+ protoVAL.extDecls = nil
+ }
+ case 203:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.extDecl = protoDollar[1].fld
+ }
+ case 204:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.extDecl = protoDollar[1].grp
+ }
+ case 205:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.extDecl = nil
+ }
+ case 206:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.extDecl = nil
+ }
+ case 207:
+ protoDollar = protoS[protopt-5 : protopt+1]
+ {
+ protoVAL.svc = ast.NewServiceNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].b, protoDollar[4].svcDecls, protoDollar[5].b)
+ }
+ case 208:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[2].svcDecl != nil {
+ protoVAL.svcDecls = append(protoDollar[1].svcDecls, protoDollar[2].svcDecl)
+ } else {
+ protoVAL.svcDecls = protoDollar[1].svcDecls
+ }
+ }
+ case 209:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ if protoDollar[1].svcDecl != nil {
+ protoVAL.svcDecls = []ast.ServiceElement{protoDollar[1].svcDecl}
+ } else {
+ protoVAL.svcDecls = nil
+ }
+ }
+ case 210:
+ protoDollar = protoS[protopt-0 : protopt+1]
+ {
+ protoVAL.svcDecls = nil
+ }
+ case 211:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.svcDecl = protoDollar[1].opt
+ }
+ case 212:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.svcDecl = protoDollar[1].mtd
+ }
+ case 213:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.svcDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
+ }
+ case 214:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.svcDecl = nil
+ }
+ case 215:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.svcDecl = nil
+ }
+ case 216:
+ protoDollar = protoS[protopt-6 : protopt+1]
+ {
+ protoVAL.mtd = ast.NewRPCNode(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].rpcType, protoDollar[4].id.ToKeyword(), protoDollar[5].rpcType, protoDollar[6].b)
+ }
+ case 217:
+ protoDollar = protoS[protopt-8 : protopt+1]
+ {
+ protoVAL.mtd = ast.NewRPCNodeWithBody(protoDollar[1].id.ToKeyword(), protoDollar[2].id, protoDollar[3].rpcType, protoDollar[4].id.ToKeyword(), protoDollar[5].rpcType, protoDollar[6].b, protoDollar[7].rpcDecls, protoDollar[8].b)
+ }
+ case 218:
+ protoDollar = protoS[protopt-4 : protopt+1]
+ {
+ protoVAL.rpcType = ast.NewRPCTypeNode(protoDollar[1].b, protoDollar[2].id.ToKeyword(), protoDollar[3].tid, protoDollar[4].b)
+ }
+ case 219:
+ protoDollar = protoS[protopt-3 : protopt+1]
+ {
+ protoVAL.rpcType = ast.NewRPCTypeNode(protoDollar[1].b, nil, protoDollar[2].tid, protoDollar[3].b)
+ }
+ case 220:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ if protoDollar[2].rpcDecl != nil {
+ protoVAL.rpcDecls = append(protoDollar[1].rpcDecls, protoDollar[2].rpcDecl)
+ } else {
+ protoVAL.rpcDecls = protoDollar[1].rpcDecls
+ }
+ }
+ case 221:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ if protoDollar[1].rpcDecl != nil {
+ protoVAL.rpcDecls = []ast.RPCElement{protoDollar[1].rpcDecl}
+ } else {
+ protoVAL.rpcDecls = nil
+ }
+ }
+ case 222:
+ protoDollar = protoS[protopt-0 : protopt+1]
+ {
+ protoVAL.rpcDecls = nil
+ }
+ case 223:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.rpcDecl = protoDollar[1].opt
+ }
+ case 224:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.rpcDecl = ast.NewEmptyDeclNode(protoDollar[1].b)
+ }
+ case 225:
+ protoDollar = protoS[protopt-2 : protopt+1]
+ {
+ protoVAL.rpcDecl = nil
+ }
+ case 226:
+ protoDollar = protoS[protopt-1 : protopt+1]
+ {
+ protoVAL.rpcDecl = nil
+ }
+ }
+ goto protostack /* stack new state and value */
+}
diff --git a/vendor/github.com/bufbuild/protocompile/parser/result.go b/vendor/github.com/bufbuild/protocompile/parser/result.go
new file mode 100644
index 000000000..421a511fb
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/parser/result.go
@@ -0,0 +1,898 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 parser
+
+import (
+ "bytes"
+ "math"
+ "strings"
+ "unicode"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/internal"
+ "github.com/bufbuild/protocompile/reporter"
+)
+
+type result struct {
+ file *ast.FileNode
+ proto *descriptorpb.FileDescriptorProto
+
+ nodes map[proto.Message]ast.Node
+}
+
+// ResultWithoutAST returns a parse result that has no AST. All methods for
+// looking up AST nodes return a placeholder node that contains only the filename
+// in position information.
+func ResultWithoutAST(proto *descriptorpb.FileDescriptorProto) Result {
+ return &result{proto: proto}
+}
+
+// ResultFromAST constructs a descriptor proto from the given AST. The returned
+// result includes the descriptor proto and also contains an index that can be
+// used to lookup AST node information for elements in the descriptor proto
+// hierarchy.
+//
+// If validate is true, some basic validation is performed, to make sure the
+// resulting descriptor proto is valid per protobuf rules and semantics. Only
+// some language elements can be validated since some rules and semantics can
+// only be checked after all symbols are all resolved, which happens in the
+// linking step.
+//
+// The given handler is used to report any errors or warnings encountered. If any
+// errors are reported, this function returns a non-nil error.
+func ResultFromAST(file *ast.FileNode, validate bool, handler *reporter.Handler) (Result, error) {
+ filename := file.Name()
+ r := &result{file: file, nodes: map[proto.Message]ast.Node{}}
+ r.createFileDescriptor(filename, file, handler)
+ if validate {
+ validateBasic(r, handler)
+ }
+ return r, handler.Error()
+}
+
+func (r *result) AST() *ast.FileNode {
+ return r.file
+}
+
+func (r *result) FileDescriptorProto() *descriptorpb.FileDescriptorProto {
+ return r.proto
+}
+
+func (r *result) createFileDescriptor(filename string, file *ast.FileNode, handler *reporter.Handler) {
+ fd := &descriptorpb.FileDescriptorProto{Name: proto.String(filename)}
+ r.proto = fd
+
+ r.putFileNode(fd, file)
+
+ isProto3 := false
+ if file.Syntax != nil {
+ if file.Syntax.Syntax.AsString() == "proto3" {
+ isProto3 = true
+ } else if file.Syntax.Syntax.AsString() != "proto2" {
+ nodeInfo := file.NodeInfo(file.Syntax.Syntax)
+ if handler.HandleErrorf(nodeInfo.Start(), `syntax value must be "proto2" or "proto3"`) != nil {
+ return
+ }
+ }
+
+ // proto2 is the default, so no need to set unless proto3
+ if isProto3 {
+ fd.Syntax = proto.String(file.Syntax.Syntax.AsString())
+ }
+ } else {
+ nodeInfo := file.NodeInfo(file)
+ handler.HandleWarningWithPos(nodeInfo.Start(), ErrNoSyntax)
+ }
+
+ for _, decl := range file.Decls {
+ if handler.ReporterError() != nil {
+ return
+ }
+ switch decl := decl.(type) {
+ case *ast.EnumNode:
+ fd.EnumType = append(fd.EnumType, r.asEnumDescriptor(decl, handler))
+ case *ast.ExtendNode:
+ r.addExtensions(decl, &fd.Extension, &fd.MessageType, isProto3, handler)
+ case *ast.ImportNode:
+ index := len(fd.Dependency)
+ fd.Dependency = append(fd.Dependency, decl.Name.AsString())
+ if decl.Public != nil {
+ fd.PublicDependency = append(fd.PublicDependency, int32(index))
+ } else if decl.Weak != nil {
+ fd.WeakDependency = append(fd.WeakDependency, int32(index))
+ }
+ case *ast.MessageNode:
+ fd.MessageType = append(fd.MessageType, r.asMessageDescriptor(decl, isProto3, handler))
+ case *ast.OptionNode:
+ if fd.Options == nil {
+ fd.Options = &descriptorpb.FileOptions{}
+ }
+ fd.Options.UninterpretedOption = append(fd.Options.UninterpretedOption, r.asUninterpretedOption(decl))
+ case *ast.ServiceNode:
+ fd.Service = append(fd.Service, r.asServiceDescriptor(decl))
+ case *ast.PackageNode:
+ if fd.Package != nil {
+ nodeInfo := file.NodeInfo(decl)
+ if handler.HandleErrorf(nodeInfo.Start(), "files should have only one package declaration") != nil {
+ return
+ }
+ }
+ pkgName := string(decl.Name.AsIdentifier())
+ if len(pkgName) >= 512 {
+ nodeInfo := file.NodeInfo(decl.Name)
+ if handler.HandleErrorf(nodeInfo.Start(), "package name (with whitespace removed) must be less than 512 characters long") != nil {
+ return
+ }
+ }
+ if strings.Count(pkgName, ".") > 100 {
+ nodeInfo := file.NodeInfo(decl.Name)
+ if handler.HandleErrorf(nodeInfo.Start(), "package name may not contain more than 100 periods") != nil {
+ return
+ }
+ }
+ fd.Package = proto.String(string(decl.Name.AsIdentifier()))
+ }
+ }
+}
+
+func (r *result) asUninterpretedOptions(nodes []*ast.OptionNode) []*descriptorpb.UninterpretedOption {
+ if len(nodes) == 0 {
+ return nil
+ }
+ opts := make([]*descriptorpb.UninterpretedOption, len(nodes))
+ for i, n := range nodes {
+ opts[i] = r.asUninterpretedOption(n)
+ }
+ return opts
+}
+
+func (r *result) asUninterpretedOption(node *ast.OptionNode) *descriptorpb.UninterpretedOption {
+ opt := &descriptorpb.UninterpretedOption{Name: r.asUninterpretedOptionName(node.Name.Parts)}
+ r.putOptionNode(opt, node)
+
+ switch val := node.Val.Value().(type) {
+ case bool:
+ if val {
+ opt.IdentifierValue = proto.String("true")
+ } else {
+ opt.IdentifierValue = proto.String("false")
+ }
+ case int64:
+ opt.NegativeIntValue = proto.Int64(val)
+ case uint64:
+ opt.PositiveIntValue = proto.Uint64(val)
+ case float64:
+ opt.DoubleValue = proto.Float64(val)
+ case string:
+ opt.StringValue = []byte(val)
+ case ast.Identifier:
+ opt.IdentifierValue = proto.String(string(val))
+ default:
+ // the grammar does not allow arrays here, so the only possible case
+ // left should be []*ast.MessageFieldNode, which corresponds to an
+ // *ast.MessageLiteralNode
+ if n, ok := node.Val.(*ast.MessageLiteralNode); ok {
+ var buf bytes.Buffer
+ for i, el := range n.Elements {
+ flattenNode(r.file, el, &buf)
+ if len(n.Seps) > i && n.Seps[i] != nil {
+ buf.WriteRune(' ')
+ buf.WriteRune(n.Seps[i].Rune)
+ }
+ }
+ aggStr := buf.String()
+ opt.AggregateValue = proto.String(aggStr)
+ }
+ // TODO: else that reports an error or panics??
+ }
+ return opt
+}
+
+func flattenNode(f *ast.FileNode, n ast.Node, buf *bytes.Buffer) {
+ if cn, ok := n.(ast.CompositeNode); ok {
+ for _, ch := range cn.Children() {
+ flattenNode(f, ch, buf)
+ }
+ return
+ }
+
+ if buf.Len() > 0 {
+ buf.WriteRune(' ')
+ }
+ buf.WriteString(f.NodeInfo(n).RawText())
+}
+
+func (r *result) asUninterpretedOptionName(parts []*ast.FieldReferenceNode) []*descriptorpb.UninterpretedOption_NamePart {
+ ret := make([]*descriptorpb.UninterpretedOption_NamePart, len(parts))
+ for i, part := range parts {
+ np := &descriptorpb.UninterpretedOption_NamePart{
+ NamePart: proto.String(string(part.Name.AsIdentifier())),
+ IsExtension: proto.Bool(part.IsExtension()),
+ }
+ r.putOptionNamePartNode(np, part)
+ ret[i] = np
+ }
+ return ret
+}
+
+func (r *result) addExtensions(ext *ast.ExtendNode, flds *[]*descriptorpb.FieldDescriptorProto, msgs *[]*descriptorpb.DescriptorProto, isProto3 bool, handler *reporter.Handler) {
+ extendee := string(ext.Extendee.AsIdentifier())
+ count := 0
+ for _, decl := range ext.Decls {
+ switch decl := decl.(type) {
+ case *ast.FieldNode:
+ count++
+ // use higher limit since we don't know yet whether extendee is messageset wire format
+ fd := r.asFieldDescriptor(decl, internal.MaxTag, isProto3, handler)
+ fd.Extendee = proto.String(extendee)
+ *flds = append(*flds, fd)
+ case *ast.GroupNode:
+ count++
+ // ditto: use higher limit right now
+ fd, md := r.asGroupDescriptors(decl, isProto3, internal.MaxTag, handler)
+ fd.Extendee = proto.String(extendee)
+ *flds = append(*flds, fd)
+ *msgs = append(*msgs, md)
+ }
+ }
+ if count == 0 {
+ nodeInfo := r.file.NodeInfo(ext)
+ _ = handler.HandleErrorf(nodeInfo.Start(), "extend sections must define at least one extension")
+ }
+}
+
+func asLabel(lbl *ast.FieldLabel) *descriptorpb.FieldDescriptorProto_Label {
+ if !lbl.IsPresent() {
+ return nil
+ }
+ switch {
+ case lbl.Repeated:
+ return descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum()
+ case lbl.Required:
+ return descriptorpb.FieldDescriptorProto_LABEL_REQUIRED.Enum()
+ default:
+ return descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum()
+ }
+}
+
+func (r *result) asFieldDescriptor(node *ast.FieldNode, maxTag int32, isProto3 bool, handler *reporter.Handler) *descriptorpb.FieldDescriptorProto {
+ tag := node.Tag.Val
+ tagNodeInfo := r.file.NodeInfo(node.Tag)
+ if err := checkTag(tagNodeInfo.Start(), tag, maxTag); err != nil {
+ _ = handler.HandleError(err)
+ }
+ fd := newFieldDescriptor(node.Name.Val, string(node.FldType.AsIdentifier()), int32(tag), asLabel(&node.Label))
+ r.putFieldNode(fd, node)
+ if opts := node.Options.GetElements(); len(opts) > 0 {
+ fd.Options = &descriptorpb.FieldOptions{UninterpretedOption: r.asUninterpretedOptions(opts)}
+ }
+ if isProto3 && fd.Label != nil && fd.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL {
+ fd.Proto3Optional = proto.Bool(true)
+ }
+ return fd
+}
+
+var fieldTypes = map[string]descriptorpb.FieldDescriptorProto_Type{
+ "double": descriptorpb.FieldDescriptorProto_TYPE_DOUBLE,
+ "float": descriptorpb.FieldDescriptorProto_TYPE_FLOAT,
+ "int32": descriptorpb.FieldDescriptorProto_TYPE_INT32,
+ "int64": descriptorpb.FieldDescriptorProto_TYPE_INT64,
+ "uint32": descriptorpb.FieldDescriptorProto_TYPE_UINT32,
+ "uint64": descriptorpb.FieldDescriptorProto_TYPE_UINT64,
+ "sint32": descriptorpb.FieldDescriptorProto_TYPE_SINT32,
+ "sint64": descriptorpb.FieldDescriptorProto_TYPE_SINT64,
+ "fixed32": descriptorpb.FieldDescriptorProto_TYPE_FIXED32,
+ "fixed64": descriptorpb.FieldDescriptorProto_TYPE_FIXED64,
+ "sfixed32": descriptorpb.FieldDescriptorProto_TYPE_SFIXED32,
+ "sfixed64": descriptorpb.FieldDescriptorProto_TYPE_SFIXED64,
+ "bool": descriptorpb.FieldDescriptorProto_TYPE_BOOL,
+ "string": descriptorpb.FieldDescriptorProto_TYPE_STRING,
+ "bytes": descriptorpb.FieldDescriptorProto_TYPE_BYTES,
+}
+
+func newFieldDescriptor(name string, fieldType string, tag int32, lbl *descriptorpb.FieldDescriptorProto_Label) *descriptorpb.FieldDescriptorProto {
+ fd := &descriptorpb.FieldDescriptorProto{
+ Name: proto.String(name),
+ JsonName: proto.String(internal.JSONName(name)),
+ Number: proto.Int32(tag),
+ Label: lbl,
+ }
+ t, ok := fieldTypes[fieldType]
+ if ok {
+ fd.Type = t.Enum()
+ } else {
+ // NB: we don't have enough info to determine whether this is an enum
+ // or a message type, so we'll leave Type nil and set it later
+ // (during linking)
+ fd.TypeName = proto.String(fieldType)
+ }
+ return fd
+}
+
+func (r *result) asGroupDescriptors(group *ast.GroupNode, isProto3 bool, maxTag int32, handler *reporter.Handler) (*descriptorpb.FieldDescriptorProto, *descriptorpb.DescriptorProto) {
+ tag := group.Tag.Val
+ tagNodeInfo := r.file.NodeInfo(group.Tag)
+ if err := checkTag(tagNodeInfo.Start(), tag, maxTag); err != nil {
+ _ = handler.HandleError(err)
+ }
+ if !unicode.IsUpper(rune(group.Name.Val[0])) {
+ nameNodeInfo := r.file.NodeInfo(group.Name)
+ _ = handler.HandleErrorf(nameNodeInfo.Start(), "group %s should have a name that starts with a capital letter", group.Name.Val)
+ }
+ fieldName := strings.ToLower(group.Name.Val)
+ fd := &descriptorpb.FieldDescriptorProto{
+ Name: proto.String(fieldName),
+ JsonName: proto.String(internal.JSONName(fieldName)),
+ Number: proto.Int32(int32(tag)),
+ Label: asLabel(&group.Label),
+ Type: descriptorpb.FieldDescriptorProto_TYPE_GROUP.Enum(),
+ TypeName: proto.String(group.Name.Val),
+ }
+ r.putFieldNode(fd, group)
+ if opts := group.Options.GetElements(); len(opts) > 0 {
+ fd.Options = &descriptorpb.FieldOptions{UninterpretedOption: r.asUninterpretedOptions(opts)}
+ }
+ md := &descriptorpb.DescriptorProto{Name: proto.String(group.Name.Val)}
+ r.putMessageNode(md, group)
+ r.addMessageBody(md, &group.MessageBody, isProto3, handler)
+ return fd, md
+}
+
+func (r *result) asMapDescriptors(mapField *ast.MapFieldNode, isProto3 bool, maxTag int32, handler *reporter.Handler) (*descriptorpb.FieldDescriptorProto, *descriptorpb.DescriptorProto) {
+ tag := mapField.Tag.Val
+ tagNodeInfo := r.file.NodeInfo(mapField.Tag)
+ if err := checkTag(tagNodeInfo.Start(), tag, maxTag); err != nil {
+ _ = handler.HandleError(err)
+ }
+ var lbl *descriptorpb.FieldDescriptorProto_Label
+ if !isProto3 {
+ lbl = descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum()
+ }
+ keyFd := newFieldDescriptor("key", mapField.MapType.KeyType.Val, 1, lbl)
+ r.putFieldNode(keyFd, mapField.KeyField())
+ valFd := newFieldDescriptor("value", string(mapField.MapType.ValueType.AsIdentifier()), 2, lbl)
+ r.putFieldNode(valFd, mapField.ValueField())
+ entryName := internal.InitCap(internal.JSONName(mapField.Name.Val)) + "Entry"
+ fd := newFieldDescriptor(mapField.Name.Val, entryName, int32(tag), descriptorpb.FieldDescriptorProto_LABEL_REPEATED.Enum())
+ if opts := mapField.Options.GetElements(); len(opts) > 0 {
+ fd.Options = &descriptorpb.FieldOptions{UninterpretedOption: r.asUninterpretedOptions(opts)}
+ }
+ r.putFieldNode(fd, mapField)
+ md := &descriptorpb.DescriptorProto{
+ Name: proto.String(entryName),
+ Options: &descriptorpb.MessageOptions{MapEntry: proto.Bool(true)},
+ Field: []*descriptorpb.FieldDescriptorProto{keyFd, valFd},
+ }
+ r.putMessageNode(md, mapField)
+ return fd, md
+}
+
+func (r *result) asExtensionRanges(node *ast.ExtensionRangeNode, maxTag int32, handler *reporter.Handler) []*descriptorpb.DescriptorProto_ExtensionRange {
+ opts := r.asUninterpretedOptions(node.Options.GetElements())
+ ers := make([]*descriptorpb.DescriptorProto_ExtensionRange, len(node.Ranges))
+ for i, rng := range node.Ranges {
+ start, end := r.getRangeBounds(rng, 1, maxTag, handler)
+ er := &descriptorpb.DescriptorProto_ExtensionRange{
+ Start: proto.Int32(start),
+ End: proto.Int32(end + 1),
+ }
+ if len(opts) > 0 {
+ er.Options = &descriptorpb.ExtensionRangeOptions{UninterpretedOption: opts}
+ }
+ r.putExtensionRangeNode(er, rng)
+ ers[i] = er
+ }
+ return ers
+}
+
+func (r *result) asEnumValue(ev *ast.EnumValueNode, handler *reporter.Handler) *descriptorpb.EnumValueDescriptorProto {
+ num, ok := ast.AsInt32(ev.Number, math.MinInt32, math.MaxInt32)
+ if !ok {
+ numberNodeInfo := r.file.NodeInfo(ev.Number)
+ _ = handler.HandleErrorf(numberNodeInfo.Start(), "value %d is out of range: should be between %d and %d", ev.Number.Value(), math.MinInt32, math.MaxInt32)
+ }
+ evd := &descriptorpb.EnumValueDescriptorProto{Name: proto.String(ev.Name.Val), Number: proto.Int32(num)}
+ r.putEnumValueNode(evd, ev)
+ if opts := ev.Options.GetElements(); len(opts) > 0 {
+ evd.Options = &descriptorpb.EnumValueOptions{UninterpretedOption: r.asUninterpretedOptions(opts)}
+ }
+ return evd
+}
+
+func (r *result) asMethodDescriptor(node *ast.RPCNode) *descriptorpb.MethodDescriptorProto {
+ md := &descriptorpb.MethodDescriptorProto{
+ Name: proto.String(node.Name.Val),
+ InputType: proto.String(string(node.Input.MessageType.AsIdentifier())),
+ OutputType: proto.String(string(node.Output.MessageType.AsIdentifier())),
+ }
+ r.putMethodNode(md, node)
+ if node.Input.Stream != nil {
+ md.ClientStreaming = proto.Bool(true)
+ }
+ if node.Output.Stream != nil {
+ md.ServerStreaming = proto.Bool(true)
+ }
+ // protoc always adds a MethodOptions if there are brackets
+ // We do the same to match protoc as closely as possible
+ // https://github.com/protocolbuffers/protobuf/blob/0c3f43a6190b77f1f68b7425d1b7e1a8257a8d0c/src/google/protobuf/compiler/parser.cc#L2152
+ if node.OpenBrace != nil {
+ md.Options = &descriptorpb.MethodOptions{}
+ for _, decl := range node.Decls {
+ if option, ok := decl.(*ast.OptionNode); ok {
+ md.Options.UninterpretedOption = append(md.Options.UninterpretedOption, r.asUninterpretedOption(option))
+ }
+ }
+ }
+ return md
+}
+
+func (r *result) asEnumDescriptor(en *ast.EnumNode, handler *reporter.Handler) *descriptorpb.EnumDescriptorProto {
+ ed := &descriptorpb.EnumDescriptorProto{Name: proto.String(en.Name.Val)}
+ r.putEnumNode(ed, en)
+ for _, decl := range en.Decls {
+ switch decl := decl.(type) {
+ case *ast.OptionNode:
+ if ed.Options == nil {
+ ed.Options = &descriptorpb.EnumOptions{}
+ }
+ ed.Options.UninterpretedOption = append(ed.Options.UninterpretedOption, r.asUninterpretedOption(decl))
+ case *ast.EnumValueNode:
+ ed.Value = append(ed.Value, r.asEnumValue(decl, handler))
+ case *ast.ReservedNode:
+ for _, n := range decl.Names {
+ ed.ReservedName = append(ed.ReservedName, n.AsString())
+ }
+ for _, rng := range decl.Ranges {
+ ed.ReservedRange = append(ed.ReservedRange, r.asEnumReservedRange(rng, handler))
+ }
+ }
+ }
+ return ed
+}
+
+func (r *result) asEnumReservedRange(rng *ast.RangeNode, handler *reporter.Handler) *descriptorpb.EnumDescriptorProto_EnumReservedRange {
+ start, end := r.getRangeBounds(rng, math.MinInt32, math.MaxInt32, handler)
+ rr := &descriptorpb.EnumDescriptorProto_EnumReservedRange{
+ Start: proto.Int32(start),
+ End: proto.Int32(end),
+ }
+ r.putEnumReservedRangeNode(rr, rng)
+ return rr
+}
+
+func (r *result) asMessageDescriptor(node *ast.MessageNode, isProto3 bool, handler *reporter.Handler) *descriptorpb.DescriptorProto {
+ msgd := &descriptorpb.DescriptorProto{Name: proto.String(node.Name.Val)}
+ r.putMessageNode(msgd, node)
+ r.addMessageBody(msgd, &node.MessageBody, isProto3, handler)
+ return msgd
+}
+
+func (r *result) addMessageBody(msgd *descriptorpb.DescriptorProto, body *ast.MessageBody, isProto3 bool, handler *reporter.Handler) {
+ // first process any options
+ for _, decl := range body.Decls {
+ if opt, ok := decl.(*ast.OptionNode); ok {
+ if msgd.Options == nil {
+ msgd.Options = &descriptorpb.MessageOptions{}
+ }
+ msgd.Options.UninterpretedOption = append(msgd.Options.UninterpretedOption, r.asUninterpretedOption(opt))
+ }
+ }
+
+ // now that we have options, we can see if this uses messageset wire format, which
+ // impacts how we validate tag numbers in any fields in the message
+ maxTag := int32(internal.MaxNormalTag)
+ messageSetOpt, err := r.isMessageSetWireFormat("message "+msgd.GetName(), msgd, handler)
+ if err != nil {
+ return
+ } else if messageSetOpt != nil {
+ maxTag = internal.MaxTag // higher limit for messageset wire format
+ }
+
+ rsvdNames := map[string]int{}
+
+ // now we can process the rest
+ for _, decl := range body.Decls {
+ switch decl := decl.(type) {
+ case *ast.EnumNode:
+ msgd.EnumType = append(msgd.EnumType, r.asEnumDescriptor(decl, handler))
+ case *ast.ExtendNode:
+ r.addExtensions(decl, &msgd.Extension, &msgd.NestedType, isProto3, handler)
+ case *ast.ExtensionRangeNode:
+ msgd.ExtensionRange = append(msgd.ExtensionRange, r.asExtensionRanges(decl, maxTag, handler)...)
+ case *ast.FieldNode:
+ fd := r.asFieldDescriptor(decl, maxTag, isProto3, handler)
+ msgd.Field = append(msgd.Field, fd)
+ case *ast.MapFieldNode:
+ fd, md := r.asMapDescriptors(decl, isProto3, maxTag, handler)
+ msgd.Field = append(msgd.Field, fd)
+ msgd.NestedType = append(msgd.NestedType, md)
+ case *ast.GroupNode:
+ fd, md := r.asGroupDescriptors(decl, isProto3, maxTag, handler)
+ msgd.Field = append(msgd.Field, fd)
+ msgd.NestedType = append(msgd.NestedType, md)
+ case *ast.OneOfNode:
+ oodIndex := len(msgd.OneofDecl)
+ ood := &descriptorpb.OneofDescriptorProto{Name: proto.String(decl.Name.Val)}
+ r.putOneOfNode(ood, decl)
+ msgd.OneofDecl = append(msgd.OneofDecl, ood)
+ ooFields := 0
+ for _, oodecl := range decl.Decls {
+ switch oodecl := oodecl.(type) {
+ case *ast.OptionNode:
+ if ood.Options == nil {
+ ood.Options = &descriptorpb.OneofOptions{}
+ }
+ ood.Options.UninterpretedOption = append(ood.Options.UninterpretedOption, r.asUninterpretedOption(oodecl))
+ case *ast.FieldNode:
+ fd := r.asFieldDescriptor(oodecl, maxTag, isProto3, handler)
+ fd.OneofIndex = proto.Int32(int32(oodIndex))
+ msgd.Field = append(msgd.Field, fd)
+ ooFields++
+ case *ast.GroupNode:
+ fd, md := r.asGroupDescriptors(oodecl, isProto3, maxTag, handler)
+ fd.OneofIndex = proto.Int32(int32(oodIndex))
+ msgd.Field = append(msgd.Field, fd)
+ msgd.NestedType = append(msgd.NestedType, md)
+ ooFields++
+ }
+ }
+ if ooFields == 0 {
+ declNodeInfo := r.file.NodeInfo(decl)
+ _ = handler.HandleErrorf(declNodeInfo.Start(), "oneof must contain at least one field")
+ }
+ case *ast.MessageNode:
+ msgd.NestedType = append(msgd.NestedType, r.asMessageDescriptor(decl, isProto3, handler))
+ case *ast.ReservedNode:
+ for _, n := range decl.Names {
+ count := rsvdNames[n.AsString()]
+ if count == 1 { // already seen
+ nameNodeInfo := r.file.NodeInfo(n)
+ _ = handler.HandleErrorf(nameNodeInfo.Start(), "name %q is reserved multiple times", n.AsString())
+ }
+ rsvdNames[n.AsString()] = count + 1
+ msgd.ReservedName = append(msgd.ReservedName, n.AsString())
+ }
+ for _, rng := range decl.Ranges {
+ msgd.ReservedRange = append(msgd.ReservedRange, r.asMessageReservedRange(rng, maxTag, handler))
+ }
+ }
+ }
+
+ if messageSetOpt != nil {
+ if len(msgd.Field) > 0 {
+ node := r.FieldNode(msgd.Field[0])
+ nodeInfo := r.file.NodeInfo(node)
+ _ = handler.HandleErrorf(nodeInfo.Start(), "messages with message-set wire format cannot contain non-extension fields")
+ }
+ if len(msgd.ExtensionRange) == 0 {
+ node := r.OptionNode(messageSetOpt)
+ nodeInfo := r.file.NodeInfo(node)
+ _ = handler.HandleErrorf(nodeInfo.Start(), "messages with message-set wire format must contain at least one extension range")
+ }
+ }
+
+ // process any proto3_optional fields
+ if isProto3 {
+ r.processProto3OptionalFields(msgd)
+ }
+}
+
+func (r *result) isMessageSetWireFormat(scope string, md *descriptorpb.DescriptorProto, handler *reporter.Handler) (*descriptorpb.UninterpretedOption, error) {
+ uo := md.GetOptions().GetUninterpretedOption()
+ index, err := internal.FindOption(r, handler, scope, uo, "message_set_wire_format")
+ if err != nil {
+ return nil, err
+ }
+ if index == -1 {
+ // no such option
+ return nil, nil
+ }
+
+ opt := uo[index]
+
+ switch opt.GetIdentifierValue() {
+ case "true":
+ return opt, nil
+ case "false":
+ return nil, nil
+ default:
+ optNode := r.OptionNode(opt)
+ optNodeInfo := r.file.NodeInfo(optNode.GetValue())
+ return nil, handler.HandleErrorf(optNodeInfo.Start(), "%s: expecting bool value for message_set_wire_format option", scope)
+ }
+}
+
+func (r *result) asMessageReservedRange(rng *ast.RangeNode, maxTag int32, handler *reporter.Handler) *descriptorpb.DescriptorProto_ReservedRange {
+ start, end := r.getRangeBounds(rng, 1, maxTag, handler)
+ rr := &descriptorpb.DescriptorProto_ReservedRange{
+ Start: proto.Int32(start),
+ End: proto.Int32(end + 1),
+ }
+ r.putMessageReservedRangeNode(rr, rng)
+ return rr
+}
+
+func (r *result) getRangeBounds(rng *ast.RangeNode, minVal, maxVal int32, handler *reporter.Handler) (int32, int32) {
+ checkOrder := true
+ start, ok := rng.StartValueAsInt32(minVal, maxVal)
+ if !ok {
+ checkOrder = false
+ startValNodeInfo := r.file.NodeInfo(rng.StartVal)
+ _ = handler.HandleErrorf(startValNodeInfo.Start(), "range start %d is out of range: should be between %d and %d", rng.StartValue(), minVal, maxVal)
+ }
+
+ end, ok := rng.EndValueAsInt32(minVal, maxVal)
+ if !ok {
+ checkOrder = false
+ if rng.EndVal != nil {
+ endValNodeInfo := r.file.NodeInfo(rng.EndVal)
+ _ = handler.HandleErrorf(endValNodeInfo.Start(), "range end %d is out of range: should be between %d and %d", rng.EndValue(), minVal, maxVal)
+ }
+ }
+
+ if checkOrder && start > end {
+ rangeStartNodeInfo := r.file.NodeInfo(rng.RangeStart())
+ _ = handler.HandleErrorf(rangeStartNodeInfo.Start(), "range, %d to %d, is invalid: start must be <= end", start, end)
+ }
+
+ return start, end
+}
+
+func (r *result) asServiceDescriptor(svc *ast.ServiceNode) *descriptorpb.ServiceDescriptorProto {
+ sd := &descriptorpb.ServiceDescriptorProto{Name: proto.String(svc.Name.Val)}
+ r.putServiceNode(sd, svc)
+ for _, decl := range svc.Decls {
+ switch decl := decl.(type) {
+ case *ast.OptionNode:
+ if sd.Options == nil {
+ sd.Options = &descriptorpb.ServiceOptions{}
+ }
+ sd.Options.UninterpretedOption = append(sd.Options.UninterpretedOption, r.asUninterpretedOption(decl))
+ case *ast.RPCNode:
+ sd.Method = append(sd.Method, r.asMethodDescriptor(decl))
+ }
+ }
+ return sd
+}
+
+func checkTag(pos ast.SourcePos, v uint64, maxTag int32) error {
+ switch {
+ case v < 1:
+ return reporter.Errorf(pos, "tag number %d must be greater than zero", v)
+ case v > uint64(maxTag):
+ return reporter.Errorf(pos, "tag number %d is higher than max allowed tag number (%d)", v, maxTag)
+ case v >= internal.SpecialReservedStart && v <= internal.SpecialReservedEnd:
+ return reporter.Errorf(pos, "tag number %d is in disallowed reserved range %d-%d", v, internal.SpecialReservedStart, internal.SpecialReservedEnd)
+ default:
+ return nil
+ }
+}
+
+// processProto3OptionalFields adds synthetic oneofs to the given message descriptor
+// for each proto3 optional field. It also updates the fields to have the correct
+// oneof index reference.
+func (r *result) processProto3OptionalFields(msgd *descriptorpb.DescriptorProto) {
+ // add synthetic oneofs to the given message descriptor for each proto3
+ // optional field, and update each field to have correct oneof index
+ var allNames map[string]struct{}
+ for _, fd := range msgd.Field {
+ if fd.GetProto3Optional() {
+ // lazy init the set of all names
+ if allNames == nil {
+ allNames = map[string]struct{}{}
+ for _, fd := range msgd.Field {
+ allNames[fd.GetName()] = struct{}{}
+ }
+ for _, od := range msgd.OneofDecl {
+ allNames[od.GetName()] = struct{}{}
+ }
+ // NB: protoc only considers names of other fields and oneofs
+ // when computing the synthetic oneof name. But that feels like
+ // a bug, since it means it could generate a name that conflicts
+ // with some other symbol defined in the message. If it's decided
+ // that's NOT a bug and is desirable, then we should remove the
+ // following four loops to mimic protoc's behavior.
+ for _, fd := range msgd.Extension {
+ allNames[fd.GetName()] = struct{}{}
+ }
+ for _, ed := range msgd.EnumType {
+ allNames[ed.GetName()] = struct{}{}
+ for _, evd := range ed.Value {
+ allNames[evd.GetName()] = struct{}{}
+ }
+ }
+ for _, fd := range msgd.NestedType {
+ allNames[fd.GetName()] = struct{}{}
+ }
+ }
+
+ // Compute a name for the synthetic oneof. This uses the same
+ // algorithm as used in protoc:
+ // https://github.com/protocolbuffers/protobuf/blob/74ad62759e0a9b5a21094f3fb9bb4ebfaa0d1ab8/src/google/protobuf/compiler/parser.cc#L785-L803
+ ooName := fd.GetName()
+ if !strings.HasPrefix(ooName, "_") {
+ ooName = "_" + ooName
+ }
+ for {
+ _, ok := allNames[ooName]
+ if !ok {
+ // found a unique name
+ allNames[ooName] = struct{}{}
+ break
+ }
+ ooName = "X" + ooName
+ }
+
+ fd.OneofIndex = proto.Int32(int32(len(msgd.OneofDecl)))
+ ood := &descriptorpb.OneofDescriptorProto{Name: proto.String(ooName)}
+ msgd.OneofDecl = append(msgd.OneofDecl, ood)
+ ooident := r.FieldNode(fd).(*ast.FieldNode) //nolint:errcheck
+ r.putOneOfNode(ood, ast.NewSyntheticOneOf(ooident))
+ }
+ }
+}
+
+func (r *result) Node(m proto.Message) ast.Node {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[m]
+}
+
+func (r *result) FileNode() ast.FileDeclNode {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[r.proto].(ast.FileDeclNode)
+}
+
+func (r *result) OptionNode(o *descriptorpb.UninterpretedOption) ast.OptionDeclNode {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[o].(ast.OptionDeclNode)
+}
+
+func (r *result) OptionNamePartNode(o *descriptorpb.UninterpretedOption_NamePart) ast.Node {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[o]
+}
+
+func (r *result) MessageNode(m *descriptorpb.DescriptorProto) ast.MessageDeclNode {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[m].(ast.MessageDeclNode)
+}
+
+func (r *result) FieldNode(f *descriptorpb.FieldDescriptorProto) ast.FieldDeclNode {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[f].(ast.FieldDeclNode)
+}
+
+func (r *result) OneOfNode(o *descriptorpb.OneofDescriptorProto) ast.Node {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[o]
+}
+
+func (r *result) ExtensionRangeNode(e *descriptorpb.DescriptorProto_ExtensionRange) ast.RangeDeclNode {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[e].(ast.RangeDeclNode)
+}
+
+func (r *result) MessageReservedRangeNode(rr *descriptorpb.DescriptorProto_ReservedRange) ast.RangeDeclNode {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[rr].(ast.RangeDeclNode)
+}
+
+func (r *result) EnumNode(e *descriptorpb.EnumDescriptorProto) ast.Node {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[e]
+}
+
+func (r *result) EnumValueNode(e *descriptorpb.EnumValueDescriptorProto) ast.EnumValueDeclNode {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[e].(ast.EnumValueDeclNode)
+}
+
+func (r *result) EnumReservedRangeNode(rr *descriptorpb.EnumDescriptorProto_EnumReservedRange) ast.RangeDeclNode {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[rr].(ast.RangeDeclNode)
+}
+
+func (r *result) ServiceNode(s *descriptorpb.ServiceDescriptorProto) ast.Node {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[s]
+}
+
+func (r *result) MethodNode(m *descriptorpb.MethodDescriptorProto) ast.RPCDeclNode {
+ if r.nodes == nil {
+ return ast.NewNoSourceNode(r.proto.GetName())
+ }
+ return r.nodes[m].(ast.RPCDeclNode)
+}
+
+func (r *result) putFileNode(f *descriptorpb.FileDescriptorProto, n *ast.FileNode) {
+ r.nodes[f] = n
+}
+
+func (r *result) putOptionNode(o *descriptorpb.UninterpretedOption, n *ast.OptionNode) {
+ r.nodes[o] = n
+}
+
+func (r *result) putOptionNamePartNode(o *descriptorpb.UninterpretedOption_NamePart, n *ast.FieldReferenceNode) {
+ r.nodes[o] = n
+}
+
+func (r *result) putMessageNode(m *descriptorpb.DescriptorProto, n ast.MessageDeclNode) {
+ r.nodes[m] = n
+}
+
+func (r *result) putFieldNode(f *descriptorpb.FieldDescriptorProto, n ast.FieldDeclNode) {
+ r.nodes[f] = n
+}
+
+func (r *result) putOneOfNode(o *descriptorpb.OneofDescriptorProto, n ast.OneOfDeclNode) {
+ r.nodes[o] = n
+}
+
+func (r *result) putExtensionRangeNode(e *descriptorpb.DescriptorProto_ExtensionRange, n *ast.RangeNode) {
+ r.nodes[e] = n
+}
+
+func (r *result) putMessageReservedRangeNode(rr *descriptorpb.DescriptorProto_ReservedRange, n *ast.RangeNode) {
+ r.nodes[rr] = n
+}
+
+func (r *result) putEnumNode(e *descriptorpb.EnumDescriptorProto, n *ast.EnumNode) {
+ r.nodes[e] = n
+}
+
+func (r *result) putEnumValueNode(e *descriptorpb.EnumValueDescriptorProto, n *ast.EnumValueNode) {
+ r.nodes[e] = n
+}
+
+func (r *result) putEnumReservedRangeNode(rr *descriptorpb.EnumDescriptorProto_EnumReservedRange, n *ast.RangeNode) {
+ r.nodes[rr] = n
+}
+
+func (r *result) putServiceNode(s *descriptorpb.ServiceDescriptorProto, n *ast.ServiceNode) {
+ r.nodes[s] = n
+}
+
+func (r *result) putMethodNode(m *descriptorpb.MethodDescriptorProto, n *ast.RPCNode) {
+ r.nodes[m] = n
+}
diff --git a/vendor/github.com/bufbuild/protocompile/parser/validate.go b/vendor/github.com/bufbuild/protocompile/parser/validate.go
new file mode 100644
index 000000000..de2b814ac
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/parser/validate.go
@@ -0,0 +1,503 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 parser
+
+import (
+ "fmt"
+ "sort"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/internal"
+ "github.com/bufbuild/protocompile/reporter"
+ "github.com/bufbuild/protocompile/walk"
+)
+
+func validateBasic(res *result, handler *reporter.Handler) {
+ fd := res.proto
+ isProto3 := fd.GetSyntax() == "proto3"
+
+ if err := validateImports(res, handler); err != nil {
+ return
+ }
+
+ depth := 0
+ _ = walk.DescriptorProtosEnterAndExit(fd,
+ func(name protoreflect.FullName, d proto.Message) error {
+ if depth >= 32 {
+ // ignore any deeper structure
+ return nil
+ }
+
+ switch d := d.(type) {
+ case *descriptorpb.DescriptorProto:
+ depth++
+ if depth == 32 {
+ var n ast.Node = res.MessageNode(d)
+ if grp, ok := n.(*ast.GroupNode); ok {
+ // pinpoint the group keyword if the source is a group
+ n = grp.Keyword
+ }
+ if err := handler.HandleErrorf(res.file.NodeInfo(n).Start(), "message nesting depth must be less than 32"); err != nil {
+ // exit func is not called when enter returns error
+ depth--
+ return err
+ }
+ }
+ if err := validateMessage(res, isProto3, name, d, handler); err != nil {
+ // exit func is not called when enter returns error
+ depth--
+ return err
+ }
+ case *descriptorpb.EnumDescriptorProto:
+ if err := validateEnum(res, isProto3, name, d, handler); err != nil {
+ return err
+ }
+ case *descriptorpb.FieldDescriptorProto:
+ if err := validateField(res, isProto3, name, d, handler); err != nil {
+ return err
+ }
+ }
+ return nil
+ },
+ func(name protoreflect.FullName, d proto.Message) error {
+ if _, ok := d.(*descriptorpb.DescriptorProto); ok {
+ depth--
+ }
+ return nil
+ })
+}
+
+func validateImports(res *result, handler *reporter.Handler) error {
+ fileNode := res.file
+ if fileNode == nil {
+ return nil
+ }
+ imports := make(map[string]ast.SourcePos)
+ for _, decl := range fileNode.Decls {
+ imp, ok := decl.(*ast.ImportNode)
+ if !ok {
+ continue
+ }
+ startPos := fileNode.NodeInfo(decl).Start()
+ name := imp.Name.AsString()
+ if prev, ok := imports[name]; ok {
+ return handler.HandleErrorf(startPos, "%q was already imported at %v", name, prev)
+ }
+ imports[name] = startPos
+ }
+ return nil
+}
+
+func validateMessage(res *result, isProto3 bool, name protoreflect.FullName, md *descriptorpb.DescriptorProto, handler *reporter.Handler) error {
+ scope := fmt.Sprintf("message %s", name)
+
+ if isProto3 && len(md.ExtensionRange) > 0 {
+ n := res.ExtensionRangeNode(md.ExtensionRange[0])
+ nInfo := res.file.NodeInfo(n)
+ if err := handler.HandleErrorf(nInfo.Start(), "%s: extension ranges are not allowed in proto3", scope); err != nil {
+ return err
+ }
+ }
+
+ if index, err := internal.FindOption(res, handler, scope, md.Options.GetUninterpretedOption(), "map_entry"); err != nil {
+ return err
+ } else if index >= 0 {
+ opt := md.Options.UninterpretedOption[index]
+ optn := res.OptionNode(opt)
+ md.Options.UninterpretedOption = internal.RemoveOption(md.Options.UninterpretedOption, index)
+ valid := false
+ if opt.IdentifierValue != nil {
+ if opt.GetIdentifierValue() == "true" {
+ valid = true
+ optionNodeInfo := res.file.NodeInfo(optn.GetValue())
+ if err := handler.HandleErrorf(optionNodeInfo.Start(), "%s: map_entry option should not be set explicitly; use map type instead", scope); err != nil {
+ return err
+ }
+ } else if opt.GetIdentifierValue() == "false" {
+ valid = true
+ md.Options.MapEntry = proto.Bool(false)
+ }
+ }
+ if !valid {
+ optionNodeInfo := res.file.NodeInfo(optn.GetValue())
+ if err := handler.HandleErrorf(optionNodeInfo.Start(), "%s: expecting bool value for map_entry option", scope); err != nil {
+ return err
+ }
+ }
+ }
+
+ // reserved ranges should not overlap
+ rsvd := make(tagRanges, len(md.ReservedRange))
+ for i, r := range md.ReservedRange {
+ n := res.MessageReservedRangeNode(r)
+ rsvd[i] = tagRange{start: r.GetStart(), end: r.GetEnd(), node: n}
+ }
+ sort.Sort(rsvd)
+ for i := 1; i < len(rsvd); i++ {
+ if rsvd[i].start < rsvd[i-1].end {
+ rangeNodeInfo := res.file.NodeInfo(rsvd[i].node)
+ if err := handler.HandleErrorf(rangeNodeInfo.Start(), "%s: reserved ranges overlap: %d to %d and %d to %d", scope, rsvd[i-1].start, rsvd[i-1].end-1, rsvd[i].start, rsvd[i].end-1); err != nil {
+ return err
+ }
+ }
+ }
+
+ // extensions ranges should not overlap
+ exts := make(tagRanges, len(md.ExtensionRange))
+ for i, r := range md.ExtensionRange {
+ n := res.ExtensionRangeNode(r)
+ exts[i] = tagRange{start: r.GetStart(), end: r.GetEnd(), node: n}
+ }
+ sort.Sort(exts)
+ for i := 1; i < len(exts); i++ {
+ if exts[i].start < exts[i-1].end {
+ rangeNodeInfo := res.file.NodeInfo(exts[i].node)
+ if err := handler.HandleErrorf(rangeNodeInfo.Start(), "%s: extension ranges overlap: %d to %d and %d to %d", scope, exts[i-1].start, exts[i-1].end-1, exts[i].start, exts[i].end-1); err != nil {
+ return err
+ }
+ }
+ }
+
+ // see if any extension range overlaps any reserved range
+ var i, j int // i indexes rsvd; j indexes exts
+ for i < len(rsvd) && j < len(exts) {
+ if rsvd[i].start >= exts[j].start && rsvd[i].start < exts[j].end ||
+ exts[j].start >= rsvd[i].start && exts[j].start < rsvd[i].end {
+ var pos ast.SourcePos
+ if rsvd[i].start >= exts[j].start && rsvd[i].start < exts[j].end {
+ rangeNodeInfo := res.file.NodeInfo(rsvd[i].node)
+ pos = rangeNodeInfo.Start()
+ } else {
+ rangeNodeInfo := res.file.NodeInfo(exts[j].node)
+ pos = rangeNodeInfo.Start()
+ }
+ // ranges overlap
+ if err := handler.HandleErrorf(pos, "%s: extension range %d to %d overlaps reserved range %d to %d", scope, exts[j].start, exts[j].end-1, rsvd[i].start, rsvd[i].end-1); err != nil {
+ return err
+ }
+ }
+ if rsvd[i].start < exts[j].start {
+ i++
+ } else {
+ j++
+ }
+ }
+
+ // now, check that fields don't re-use tags and don't try to use extension
+ // or reserved ranges or reserved names
+ rsvdNames := map[string]struct{}{}
+ for _, n := range md.ReservedName {
+ // validate reserved name while we're here
+ if !isIdentifier(n) {
+ node := findMessageReservedNameNode(res.MessageNode(md), n)
+ nodeInfo := res.file.NodeInfo(node)
+ if err := handler.HandleErrorf(nodeInfo.Start(), "%s: reserved name %q is not a valid identifier", scope, n); err != nil {
+ return err
+ }
+ }
+ rsvdNames[n] = struct{}{}
+ }
+ fieldTags := map[int32]string{}
+ for _, fld := range md.Field {
+ fn := res.FieldNode(fld)
+ if _, ok := rsvdNames[fld.GetName()]; ok {
+ fieldNameNodeInfo := res.file.NodeInfo(fn.FieldName())
+ if err := handler.HandleErrorf(fieldNameNodeInfo.Start(), "%s: field %s is using a reserved name", scope, fld.GetName()); err != nil {
+ return err
+ }
+ }
+ if existing := fieldTags[fld.GetNumber()]; existing != "" {
+ fieldTagNodeInfo := res.file.NodeInfo(fn.FieldTag())
+ if err := handler.HandleErrorf(fieldTagNodeInfo.Start(), "%s: fields %s and %s both have the same tag %d", scope, existing, fld.GetName(), fld.GetNumber()); err != nil {
+ return err
+ }
+ }
+ fieldTags[fld.GetNumber()] = fld.GetName()
+ // check reserved ranges
+ r := sort.Search(len(rsvd), func(index int) bool { return rsvd[index].end > fld.GetNumber() })
+ if r < len(rsvd) && rsvd[r].start <= fld.GetNumber() {
+ fieldTagNodeInfo := res.file.NodeInfo(fn.FieldTag())
+ if err := handler.HandleErrorf(fieldTagNodeInfo.Start(), "%s: field %s is using tag %d which is in reserved range %d to %d", scope, fld.GetName(), fld.GetNumber(), rsvd[r].start, rsvd[r].end-1); err != nil {
+ return err
+ }
+ }
+ // and check extension ranges
+ e := sort.Search(len(exts), func(index int) bool { return exts[index].end > fld.GetNumber() })
+ if e < len(exts) && exts[e].start <= fld.GetNumber() {
+ fieldTagNodeInfo := res.file.NodeInfo(fn.FieldTag())
+ if err := handler.HandleErrorf(fieldTagNodeInfo.Start(), "%s: field %s is using tag %d which is in extension range %d to %d", scope, fld.GetName(), fld.GetNumber(), exts[e].start, exts[e].end-1); err != nil {
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
+func isIdentifier(s string) bool {
+ if len(s) == 0 {
+ return false
+ }
+ for i, r := range s {
+ if i == 0 && r >= '0' && r <= '9' {
+ // can't start with number
+ return false
+ }
+ // alphanumeric and underscore ok; everything else bad
+ switch {
+ case r >= '0' && r <= '9':
+ case r >= 'a' && r <= 'z':
+ case r >= 'A' && r <= 'Z':
+ case r == '_':
+ default:
+ return false
+ }
+ }
+ return true
+}
+
+func findMessageReservedNameNode(msgNode ast.MessageDeclNode, name string) ast.Node {
+ var decls []ast.MessageElement
+ switch msgNode := msgNode.(type) {
+ case *ast.MessageNode:
+ decls = msgNode.Decls
+ case *ast.GroupNode:
+ decls = msgNode.Decls
+ default:
+ // leave decls empty
+ }
+ return findReservedNameNode(msgNode, decls, name)
+}
+
+func findReservedNameNode[T ast.Node](parent ast.Node, decls []T, name string) ast.Node {
+ for _, decl := range decls {
+ // NB: We have to convert to empty interface first, before we can do a type
+ // assertion because type assertions on type parameters aren't allowed. (The
+ // compiler cannot yet know whether T is an interface type or not.)
+ rsvd, ok := any(decl).(*ast.ReservedNode)
+ if !ok {
+ continue
+ }
+ for _, rsvdName := range rsvd.Names {
+ if rsvdName.AsString() == name {
+ return rsvdName
+ }
+ }
+ }
+ // couldn't find it? Instead of puking, report position of the parent.
+ return parent
+}
+
+func validateEnum(res *result, isProto3 bool, name protoreflect.FullName, ed *descriptorpb.EnumDescriptorProto, handler *reporter.Handler) error {
+ scope := fmt.Sprintf("enum %s", name)
+
+ if len(ed.Value) == 0 {
+ enNode := res.EnumNode(ed)
+ enNodeInfo := res.file.NodeInfo(enNode)
+ if err := handler.HandleErrorf(enNodeInfo.Start(), "%s: enums must define at least one value", scope); err != nil {
+ return err
+ }
+ }
+
+ allowAlias := false
+ var allowAliasOpt *descriptorpb.UninterpretedOption
+ if index, err := internal.FindOption(res, handler, scope, ed.Options.GetUninterpretedOption(), "allow_alias"); err != nil {
+ return err
+ } else if index >= 0 {
+ allowAliasOpt = ed.Options.UninterpretedOption[index]
+ valid := false
+ if allowAliasOpt.IdentifierValue != nil {
+ if allowAliasOpt.GetIdentifierValue() == "true" {
+ allowAlias = true
+ valid = true
+ } else if allowAliasOpt.GetIdentifierValue() == "false" {
+ valid = true
+ }
+ }
+ if !valid {
+ optNode := res.OptionNode(allowAliasOpt)
+ optNodeInfo := res.file.NodeInfo(optNode.GetValue())
+ if err := handler.HandleErrorf(optNodeInfo.Start(), "%s: expecting bool value for allow_alias option", scope); err != nil {
+ return err
+ }
+ }
+ }
+
+ if isProto3 && len(ed.Value) > 0 && ed.Value[0].GetNumber() != 0 {
+ evNode := res.EnumValueNode(ed.Value[0])
+ evNodeInfo := res.file.NodeInfo(evNode.GetNumber())
+ if err := handler.HandleErrorf(evNodeInfo.Start(), "%s: proto3 requires that first value in enum have numeric value of 0", scope); err != nil {
+ return err
+ }
+ }
+
+ // check for aliases
+ vals := map[int32]string{}
+ hasAlias := false
+ for _, evd := range ed.Value {
+ existing := vals[evd.GetNumber()]
+ if existing != "" {
+ if allowAlias {
+ hasAlias = true
+ } else {
+ evNode := res.EnumValueNode(evd)
+ evNodeInfo := res.file.NodeInfo(evNode.GetNumber())
+ if err := handler.HandleErrorf(evNodeInfo.Start(), "%s: values %s and %s both have the same numeric value %d; use allow_alias option if intentional", scope, existing, evd.GetName(), evd.GetNumber()); err != nil {
+ return err
+ }
+ }
+ }
+ vals[evd.GetNumber()] = evd.GetName()
+ }
+ if allowAlias && !hasAlias {
+ optNode := res.OptionNode(allowAliasOpt)
+ optNodeInfo := res.file.NodeInfo(optNode.GetValue())
+ if err := handler.HandleErrorf(optNodeInfo.Start(), "%s: allow_alias is true but no values are aliases", scope); err != nil {
+ return err
+ }
+ }
+
+ // reserved ranges should not overlap
+ rsvd := make(tagRanges, len(ed.ReservedRange))
+ for i, r := range ed.ReservedRange {
+ n := res.EnumReservedRangeNode(r)
+ rsvd[i] = tagRange{start: r.GetStart(), end: r.GetEnd(), node: n}
+ }
+ sort.Sort(rsvd)
+ for i := 1; i < len(rsvd); i++ {
+ if rsvd[i].start <= rsvd[i-1].end {
+ rangeNodeInfo := res.file.NodeInfo(rsvd[i].node)
+ if err := handler.HandleErrorf(rangeNodeInfo.Start(), "%s: reserved ranges overlap: %d to %d and %d to %d", scope, rsvd[i-1].start, rsvd[i-1].end, rsvd[i].start, rsvd[i].end); err != nil {
+ return err
+ }
+ }
+ }
+
+ // now, check that fields don't re-use tags and don't try to use extension
+ // or reserved ranges or reserved names
+ rsvdNames := map[string]struct{}{}
+ for _, n := range ed.ReservedName {
+ // validate reserved name while we're here
+ if !isIdentifier(n) {
+ node := findEnumReservedNameNode(res.EnumNode(ed), n)
+ nodeInfo := res.file.NodeInfo(node)
+ if err := handler.HandleErrorf(nodeInfo.Start(), "%s: reserved name %q is not a valid identifier", scope, n); err != nil {
+ return err
+ }
+ }
+ rsvdNames[n] = struct{}{}
+ }
+ for _, ev := range ed.Value {
+ evn := res.EnumValueNode(ev)
+ if _, ok := rsvdNames[ev.GetName()]; ok {
+ enumValNodeInfo := res.file.NodeInfo(evn.GetName())
+ if err := handler.HandleErrorf(enumValNodeInfo.Start(), "%s: value %s is using a reserved name", scope, ev.GetName()); err != nil {
+ return err
+ }
+ }
+ // check reserved ranges
+ r := sort.Search(len(rsvd), func(index int) bool { return rsvd[index].end >= ev.GetNumber() })
+ if r < len(rsvd) && rsvd[r].start <= ev.GetNumber() {
+ enumValNodeInfo := res.file.NodeInfo(evn.GetNumber())
+ if err := handler.HandleErrorf(enumValNodeInfo.Start(), "%s: value %s is using number %d which is in reserved range %d to %d", scope, ev.GetName(), ev.GetNumber(), rsvd[r].start, rsvd[r].end); err != nil {
+ return err
+ }
+ }
+ }
+
+ return nil
+}
+
+func findEnumReservedNameNode(enumNode ast.Node, name string) ast.Node {
+ var decls []ast.EnumElement
+ if enumNode, ok := enumNode.(*ast.EnumNode); ok {
+ decls = enumNode.Decls
+ // if not the right type, we leave decls empty
+ }
+ return findReservedNameNode(enumNode, decls, name)
+}
+
+func validateField(res *result, isProto3 bool, name protoreflect.FullName, fld *descriptorpb.FieldDescriptorProto, handler *reporter.Handler) error {
+ scope := fmt.Sprintf("field %s", name)
+
+ node := res.FieldNode(fld)
+ if isProto3 {
+ if fld.GetType() == descriptorpb.FieldDescriptorProto_TYPE_GROUP {
+ groupNodeInfo := res.file.NodeInfo(node.GetGroupKeyword())
+ if err := handler.HandleErrorf(groupNodeInfo.Start(), "%s: groups are not allowed in proto3", scope); err != nil {
+ return err
+ }
+ } else if fld.Label != nil && fld.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REQUIRED {
+ fieldLabelNodeInfo := res.file.NodeInfo(node.FieldLabel())
+ if err := handler.HandleErrorf(fieldLabelNodeInfo.Start(), "%s: label 'required' is not allowed in proto3", scope); err != nil {
+ return err
+ }
+ }
+ if index, err := internal.FindOption(res, handler, scope, fld.Options.GetUninterpretedOption(), "default"); err != nil {
+ return err
+ } else if index >= 0 {
+ optNode := res.OptionNode(fld.Options.GetUninterpretedOption()[index])
+ optNameNodeInfo := res.file.NodeInfo(optNode.GetName())
+ if err := handler.HandleErrorf(optNameNodeInfo.Start(), "%s: default values are not allowed in proto3", scope); err != nil {
+ return err
+ }
+ }
+ } else {
+ if fld.Label == nil && fld.OneofIndex == nil {
+ fieldNameNodeInfo := res.file.NodeInfo(node.FieldName())
+ if err := handler.HandleErrorf(fieldNameNodeInfo.Start(), "%s: field has no label; proto2 requires explicit 'optional' label", scope); err != nil {
+ return err
+ }
+ }
+ if fld.GetExtendee() != "" && fld.Label != nil && fld.GetLabel() == descriptorpb.FieldDescriptorProto_LABEL_REQUIRED {
+ fieldLabelNodeInfo := res.file.NodeInfo(node.FieldLabel())
+ if err := handler.HandleErrorf(fieldLabelNodeInfo.Start(), "%s: extension fields cannot be 'required'", scope); err != nil {
+ return err
+ }
+ }
+ }
+
+ // finally, set any missing label to optional
+ if fld.Label == nil {
+ fld.Label = descriptorpb.FieldDescriptorProto_LABEL_OPTIONAL.Enum()
+ }
+
+ return nil
+}
+
+type tagRange struct {
+ start int32
+ end int32
+ node ast.RangeDeclNode
+}
+
+type tagRanges []tagRange
+
+func (r tagRanges) Len() int {
+ return len(r)
+}
+
+func (r tagRanges) Less(i, j int) bool {
+ return r[i].start < r[j].start ||
+ (r[i].start == r[j].start && r[i].end < r[j].end)
+}
+
+func (r tagRanges) Swap(i, j int) {
+ r[i], r[j] = r[j], r[i]
+}
diff --git a/vendor/github.com/bufbuild/protocompile/protoutil/protos.go b/vendor/github.com/bufbuild/protocompile/protoutil/protos.go
new file mode 100644
index 000000000..ad8044260
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/protoutil/protos.go
@@ -0,0 +1,261 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protoutil contains useful functions for interacting with descriptors.
+// For now these include only functions for efficiently converting descriptors
+// produced by the compiler to descriptor protos.
+//
+// Despite the fact that descriptor protos are mutable, calling code should NOT
+// mutate any of the protos returned from this package. For efficiency, some
+// protos returned from this package may be part of internal state of a compiler
+// result, and mutating the proto could corrupt or invalidate parts of that
+// result.
+package protoutil
+
+import (
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protodesc"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+)
+
+// DescriptorProtoWrapper is a protoreflect.Descriptor that wraps an
+// underlying descriptor proto. It provides the same interface as
+// Descriptor but with one extra operation, to efficiently query for
+// the underlying descriptor proto.
+//
+// Descriptors that implement this will also implement another method
+// whose specified return type is the concrete type returned by the
+// AsProto method. The name of this method varies by the type of this
+// descriptor:
+//
+// Descriptor Type Other Method Name
+// ---------------------+------------------------------------
+// FileDescriptor | FileDescriptorProto()
+// MessageDescriptor | MessageDescriptorProto()
+// FieldDescriptor | FieldDescriptorProto()
+// OneofDescriptor | OneOfDescriptorProto()
+// EnumDescriptor | EnumDescriptorProto()
+// EnumValueDescriptor | EnumValueDescriptorProto()
+// ServiceDescriptor | ServiceDescriptorProto()
+// MethodDescriptor | MethodDescriptorProto()
+//
+// For example, a DescriptorProtoWrapper that implements FileDescriptor
+// returns a *descriptorpb.FileDescriptorProto value from its AsProto
+// method and also provides a method with the following signature:
+//
+// FileDescriptorProto() *descriptorpb.FileDescriptorProto
+type DescriptorProtoWrapper interface {
+ protoreflect.Descriptor
+ // AsProto returns the underlying descriptor proto. The concrete
+ // type of the proto message depends on the type of this
+ // descriptor:
+ // Descriptor Type Proto Message Type
+ // ---------------------+------------------------------------
+ // FileDescriptor | *descriptorpb.FileDescriptorProto
+ // MessageDescriptor | *descriptorpb.DescriptorProto
+ // FieldDescriptor | *descriptorpb.FieldDescriptorProto
+ // OneofDescriptor | *descriptorpb.OneofDescriptorProto
+ // EnumDescriptor | *descriptorpb.EnumDescriptorProto
+ // EnumValueDescriptor | *descriptorpb.EnumValueDescriptorProto
+ // ServiceDescriptor | *descriptorpb.ServiceDescriptorProto
+ // MethodDescriptor | *descriptorpb.MethodDescriptorProto
+ AsProto() proto.Message
+}
+
+// ProtoFromDescriptor extracts a descriptor proto from the given "rich"
+// descriptor. For descriptors generated by the compiler, this is an
+// inexpensive and non-lossy operation. Descriptors from other sources
+// however may be expensive (to re-create a proto) and even lossy.
+func ProtoFromDescriptor(d protoreflect.Descriptor) proto.Message {
+ switch d := d.(type) {
+ case protoreflect.FileDescriptor:
+ return ProtoFromFileDescriptor(d)
+ case protoreflect.MessageDescriptor:
+ return ProtoFromMessageDescriptor(d)
+ case protoreflect.FieldDescriptor:
+ return ProtoFromFieldDescriptor(d)
+ case protoreflect.OneofDescriptor:
+ return ProtoFromOneofDescriptor(d)
+ case protoreflect.EnumDescriptor:
+ return ProtoFromEnumDescriptor(d)
+ case protoreflect.EnumValueDescriptor:
+ return ProtoFromEnumValueDescriptor(d)
+ case protoreflect.ServiceDescriptor:
+ return ProtoFromServiceDescriptor(d)
+ case protoreflect.MethodDescriptor:
+ return ProtoFromMethodDescriptor(d)
+ default:
+ // WTF??
+ if res, ok := d.(DescriptorProtoWrapper); ok {
+ return res.AsProto()
+ }
+ return nil
+ }
+}
+
+// ProtoFromFileDescriptor extracts a descriptor proto from the given "rich"
+// descriptor. For file descriptors generated by the compiler, this is an
+// inexpensive and non-lossy operation. File descriptors from other sources
+// however may be expensive (to re-create a proto) and even lossy.
+func ProtoFromFileDescriptor(d protoreflect.FileDescriptor) *descriptorpb.FileDescriptorProto {
+ if imp, ok := d.(protoreflect.FileImport); ok {
+ d = imp.FileDescriptor
+ }
+ type canProto interface {
+ FileDescriptorProto() *descriptorpb.FileDescriptorProto
+ }
+ if res, ok := d.(canProto); ok {
+ return res.FileDescriptorProto()
+ }
+ if res, ok := d.(DescriptorProtoWrapper); ok {
+ if fd, ok := res.AsProto().(*descriptorpb.FileDescriptorProto); ok {
+ return fd
+ }
+ }
+ return protodesc.ToFileDescriptorProto(d)
+}
+
+// ProtoFromMessageDescriptor extracts a descriptor proto from the given "rich"
+// descriptor. For message descriptors generated by the compiler, this is an
+// inexpensive and non-lossy operation. Message descriptors from other sources
+// however may be expensive (to re-create a proto) and even lossy.
+func ProtoFromMessageDescriptor(d protoreflect.MessageDescriptor) *descriptorpb.DescriptorProto {
+ type canProto interface {
+ MessageDescriptorProto() *descriptorpb.DescriptorProto
+ }
+ if res, ok := d.(canProto); ok {
+ return res.MessageDescriptorProto()
+ }
+ if res, ok := d.(DescriptorProtoWrapper); ok {
+ if md, ok := res.AsProto().(*descriptorpb.DescriptorProto); ok {
+ return md
+ }
+ }
+ return protodesc.ToDescriptorProto(d)
+}
+
+// ProtoFromFieldDescriptor extracts a descriptor proto from the given "rich"
+// descriptor. For field descriptors generated by the compiler, this is an
+// inexpensive and non-lossy operation. Field descriptors from other sources
+// however may be expensive (to re-create a proto) and even lossy.
+func ProtoFromFieldDescriptor(d protoreflect.FieldDescriptor) *descriptorpb.FieldDescriptorProto {
+ type canProto interface {
+ FieldDescriptorProto() *descriptorpb.FieldDescriptorProto
+ }
+ if res, ok := d.(canProto); ok {
+ return res.FieldDescriptorProto()
+ }
+ if res, ok := d.(DescriptorProtoWrapper); ok {
+ if fd, ok := res.AsProto().(*descriptorpb.FieldDescriptorProto); ok {
+ return fd
+ }
+ }
+ return protodesc.ToFieldDescriptorProto(d)
+}
+
+// ProtoFromOneofDescriptor extracts a descriptor proto from the given "rich"
+// descriptor. For oneof descriptors generated by the compiler, this is an
+// inexpensive and non-lossy operation. Oneof descriptors from other sources
+// however may be expensive (to re-create a proto) and even lossy.
+func ProtoFromOneofDescriptor(d protoreflect.OneofDescriptor) *descriptorpb.OneofDescriptorProto {
+ type canProto interface {
+ OneofDescriptorProto() *descriptorpb.OneofDescriptorProto
+ }
+ if res, ok := d.(canProto); ok {
+ return res.OneofDescriptorProto()
+ }
+ if res, ok := d.(DescriptorProtoWrapper); ok {
+ if ood, ok := res.AsProto().(*descriptorpb.OneofDescriptorProto); ok {
+ return ood
+ }
+ }
+ return protodesc.ToOneofDescriptorProto(d)
+}
+
+// ProtoFromEnumDescriptor extracts a descriptor proto from the given "rich"
+// descriptor. For enum descriptors generated by the compiler, this is an
+// inexpensive and non-lossy operation. Enum descriptors from other sources
+// however may be expensive (to re-create a proto) and even lossy.
+func ProtoFromEnumDescriptor(d protoreflect.EnumDescriptor) *descriptorpb.EnumDescriptorProto {
+ type canProto interface {
+ EnumDescriptorProto() *descriptorpb.EnumDescriptorProto
+ }
+ if res, ok := d.(canProto); ok {
+ return res.EnumDescriptorProto()
+ }
+ if res, ok := d.(DescriptorProtoWrapper); ok {
+ if ed, ok := res.AsProto().(*descriptorpb.EnumDescriptorProto); ok {
+ return ed
+ }
+ }
+ return protodesc.ToEnumDescriptorProto(d)
+}
+
+// ProtoFromEnumValueDescriptor extracts a descriptor proto from the given "rich"
+// descriptor. For enum value descriptors generated by the compiler, this is an
+// inexpensive and non-lossy operation. Enum value descriptors from other sources
+// however may be expensive (to re-create a proto) and even lossy.
+func ProtoFromEnumValueDescriptor(d protoreflect.EnumValueDescriptor) *descriptorpb.EnumValueDescriptorProto {
+ type canProto interface {
+ EnumValueDescriptorProto() *descriptorpb.EnumValueDescriptorProto
+ }
+ if res, ok := d.(canProto); ok {
+ return res.EnumValueDescriptorProto()
+ }
+ if res, ok := d.(DescriptorProtoWrapper); ok {
+ if ed, ok := res.AsProto().(*descriptorpb.EnumValueDescriptorProto); ok {
+ return ed
+ }
+ }
+ return protodesc.ToEnumValueDescriptorProto(d)
+}
+
+// ProtoFromServiceDescriptor extracts a descriptor proto from the given "rich"
+// descriptor. For service descriptors generated by the compiler, this is an
+// inexpensive and non-lossy operation. Service descriptors from other sources
+// however may be expensive (to re-create a proto) and even lossy.
+func ProtoFromServiceDescriptor(d protoreflect.ServiceDescriptor) *descriptorpb.ServiceDescriptorProto {
+ type canProto interface {
+ ServiceDescriptorProto() *descriptorpb.ServiceDescriptorProto
+ }
+ if res, ok := d.(canProto); ok {
+ return res.ServiceDescriptorProto()
+ }
+ if res, ok := d.(DescriptorProtoWrapper); ok {
+ if sd, ok := res.AsProto().(*descriptorpb.ServiceDescriptorProto); ok {
+ return sd
+ }
+ }
+ return protodesc.ToServiceDescriptorProto(d)
+}
+
+// ProtoFromMethodDescriptor extracts a descriptor proto from the given "rich"
+// descriptor. For method descriptors generated by the compiler, this is an
+// inexpensive and non-lossy operation. Method descriptors from other sources
+// however may be expensive (to re-create a proto) and even lossy.
+func ProtoFromMethodDescriptor(d protoreflect.MethodDescriptor) *descriptorpb.MethodDescriptorProto {
+ type canProto interface {
+ MethodDescriptorProto() *descriptorpb.MethodDescriptorProto
+ }
+ if res, ok := d.(canProto); ok {
+ return res.MethodDescriptorProto()
+ }
+ if res, ok := d.(DescriptorProtoWrapper); ok {
+ if md, ok := res.AsProto().(*descriptorpb.MethodDescriptorProto); ok {
+ return md
+ }
+ }
+ return protodesc.ToMethodDescriptorProto(d)
+}
diff --git a/vendor/github.com/bufbuild/protocompile/reporter/errors.go b/vendor/github.com/bufbuild/protocompile/reporter/errors.go
new file mode 100644
index 000000000..2932c79fb
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/reporter/errors.go
@@ -0,0 +1,68 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 reporter
+
+import (
+ "errors"
+ "fmt"
+
+ "github.com/bufbuild/protocompile/ast"
+)
+
+// ErrInvalidSource is a sentinel error that is returned by compilation and
+// stand-alone compilation steps (such as parsing, linking) when one or more
+// errors is reported but the configured ErrorReporter always returns nil.
+var ErrInvalidSource = errors.New("parse failed: invalid proto source")
+
+// ErrorWithPos is an error about a proto source file that adds information
+// about the location in the file that caused the error.
+type ErrorWithPos interface {
+ error
+ // GetPosition returns the source position that caused the underlying error.
+ GetPosition() ast.SourcePos
+ // Unwrap returns the underlying error.
+ Unwrap() error
+}
+
+// Error creates a new ErrorWithPos from the given error and source position.
+func Error(pos ast.SourcePos, err error) ErrorWithPos {
+ return errorWithSourcePos{pos: pos, underlying: err}
+}
+
+// Errorf creates a new ErrorWithPos whose underlying error is created using the
+// given message format and arguments (via fmt.Errorf).
+func Errorf(pos ast.SourcePos, format string, args ...interface{}) ErrorWithPos {
+ return errorWithSourcePos{pos: pos, underlying: fmt.Errorf(format, args...)}
+}
+
+type errorWithSourcePos struct {
+ underlying error
+ pos ast.SourcePos
+}
+
+func (e errorWithSourcePos) Error() string {
+ sourcePos := e.GetPosition()
+ return fmt.Sprintf("%s: %v", sourcePos, e.underlying)
+}
+
+func (e errorWithSourcePos) GetPosition() ast.SourcePos {
+ return e.pos
+}
+
+func (e errorWithSourcePos) Unwrap() error {
+ return e.underlying
+}
+
+var _ ErrorWithPos = errorWithSourcePos{}
diff --git a/vendor/github.com/bufbuild/protocompile/reporter/reporter.go b/vendor/github.com/bufbuild/protocompile/reporter/reporter.go
new file mode 100644
index 000000000..d3a316869
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/reporter/reporter.go
@@ -0,0 +1,232 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 reporter contains the types used for reporting errors from
+// protocompile operations. It contains error types as well as interfaces
+// for reporting and handling errors and warnings.
+package reporter
+
+import (
+ "sync"
+
+ "github.com/bufbuild/protocompile/ast"
+)
+
+// ErrorReporter is responsible for reporting the given error. If the reporter
+// returns a non-nil error, parsing/linking will abort with that error. If the
+// reporter returns nil, parsing will continue, allowing the parser to try to
+// report as many syntax and/or link errors as it can find.
+type ErrorReporter func(err ErrorWithPos) error
+
+// WarningReporter is responsible for reporting the given warning. This is used
+// for indicating non-error messages to the calling program for things that do
+// not cause the parse to fail but are considered bad practice. Though they are
+// just warnings, the details are supplied to the reporter via an error type.
+type WarningReporter func(ErrorWithPos)
+
+// Reporter is a type that handles reporting both errors and warnings.
+// A reporter does not need to be thread-safe. Safe concurrent access is
+// managed by a Handler.
+type Reporter interface {
+ // Error is called when the given error is encountered and needs to be
+ // reported to the calling program. This signature matches ErrorReporter
+ // because it has the same semantics. If this function returns non-nil
+ // then the operation will abort immediately with the given error. But
+ // if it returns nil, the operation will continue, reporting more errors
+ // as they are encountered. If the reporter never returns non-nil then
+ // the operation will eventually fail with ErrInvalidSource.
+ Error(ErrorWithPos) error
+ // Warning is called when the given warnings is encountered and needs to be
+ // reported to the calling program. Despite the argument being an error
+ // type, a warning will never cause the operation to abort or fail (unless
+ // the reporter's implementation of this method panics).
+ Warning(ErrorWithPos)
+}
+
+// NewReporter creates a new reporter that invokes the given functions on error
+// or warning.
+func NewReporter(errs ErrorReporter, warnings WarningReporter) Reporter {
+ return reporterFuncs{errs: errs, warnings: warnings}
+}
+
+type reporterFuncs struct {
+ errs ErrorReporter
+ warnings WarningReporter
+}
+
+func (r reporterFuncs) Error(err ErrorWithPos) error {
+ if r.errs == nil {
+ return err
+ }
+ return r.errs(err)
+}
+
+func (r reporterFuncs) Warning(err ErrorWithPos) {
+ if r.warnings != nil {
+ r.warnings(err)
+ }
+}
+
+// Handler is used by protocompile operations for handling errors and warnings.
+// This type is thread-safe. It uses a mutex to serialize calls to its reporter
+// so that reporter instances do not have to be thread-safe (unless re-used
+// across multiple handlers).
+type Handler struct {
+ parent *Handler
+ mu sync.Mutex
+ reporter Reporter
+ errsReported bool
+ err error
+}
+
+// NewHandler creates a new Handler that reports errors and warnings using the
+// given reporter.
+func NewHandler(rep Reporter) *Handler {
+ if rep == nil {
+ rep = NewReporter(nil, nil)
+ }
+ return &Handler{reporter: rep}
+}
+
+// SubHandler returns a "child" of h. Use of a child handler is the same as use
+// of the parent, except that the Error() and ReporterError() functions only
+// report non-nil for errors that were reported using the child handler. So
+// errors reported directly to the parent or to a different child handler won't
+// be returned. This is useful for making concurrent access to the handler more
+// deterministic: if a child handler is only used from one goroutine, its view
+// of reported errors is consistent and unimpacted by concurrent operations.
+func (h *Handler) SubHandler() *Handler {
+ return &Handler{parent: h}
+}
+
+// HandleError handles the given error. If the given err is an ErrorWithPos, it
+// is reported, and this function returns the error returned by the reporter. If
+// the given err is NOT an ErrorWithPos, the current operation will abort
+// immediately.
+//
+// If the handler has already aborted (by returning a non-nil error from a prior
+// call to HandleError or HandleErrorf), that same error is returned and the
+// given error is not reported.
+func (h *Handler) HandleError(err error) error {
+ if h.parent != nil {
+ _, isErrWithPos := err.(ErrorWithPos)
+ err = h.parent.HandleError(err)
+
+ // update child state
+ h.mu.Lock()
+ defer h.mu.Unlock()
+ if isErrWithPos {
+ h.errsReported = true
+ }
+ h.err = err
+ return err
+ }
+
+ h.mu.Lock()
+ defer h.mu.Unlock()
+
+ if h.err != nil {
+ return h.err
+ }
+ if ewp, ok := err.(ErrorWithPos); ok {
+ h.errsReported = true
+ err = h.reporter.Error(ewp)
+ }
+ h.err = err
+ return err
+}
+
+// HandleErrorWithPos handles an error with the given source position.
+//
+// If the handler has already aborted (by returning a non-nil error from a prior
+// call to HandleError or HandleErrorf), that same error is returned and the
+// given error is not reported.
+func (h *Handler) HandleErrorWithPos(pos ast.SourcePos, err error) error {
+ if ewp, ok := err.(ErrorWithPos); ok {
+ // replace existing position with given one
+ err = errorWithSourcePos{pos: pos, underlying: ewp.Unwrap()}
+ } else {
+ err = errorWithSourcePos{pos: pos, underlying: err}
+ }
+ return h.HandleError(err)
+}
+
+// HandleErrorf handles an error with the given source position, creating the
+// error using the given message format and arguments.
+//
+// If the handler has already aborted (by returning a non-nil error from a call
+// to HandleError or HandleErrorf), that same error is returned and the given
+// error is not reported.
+func (h *Handler) HandleErrorf(pos ast.SourcePos, format string, args ...interface{}) error {
+ return h.HandleError(Errorf(pos, format, args...))
+}
+
+// HandleWarning handles the given warning. This will delegate to the handler's
+// configured reporter.
+func (h *Handler) HandleWarning(err ErrorWithPos) {
+ if h.parent != nil {
+ h.parent.HandleWarning(err)
+ return
+ }
+
+ // even though we aren't touching mutable fields, we acquire lock anyway so
+ // that underlying reporter does not have to be thread-safe
+ h.mu.Lock()
+ defer h.mu.Unlock()
+
+ h.reporter.Warning(err)
+}
+
+// HandleWarningWithPos handles a warning with the given source position. This will
+// delegate to the handler's configured reporter.
+func (h *Handler) HandleWarningWithPos(pos ast.SourcePos, err error) {
+ ewp, ok := err.(ErrorWithPos)
+ if ok {
+ // replace existing position with given one
+ ewp = errorWithSourcePos{pos: pos, underlying: ewp.Unwrap()}
+ } else {
+ ewp = errorWithSourcePos{pos: pos, underlying: err}
+ }
+ h.HandleWarning(ewp)
+}
+
+// HandleWarningf handles a warning with the given source position, creating the
+// actual error value using the given message format and arguments.
+func (h *Handler) HandleWarningf(pos ast.SourcePos, format string, args ...interface{}) {
+ h.HandleWarning(Errorf(pos, format, args...))
+}
+
+// Error returns the handler result. If any errors have been reported then this
+// returns a non-nil error. If the reporter never returned a non-nil error then
+// ErrInvalidSource is returned. Otherwise, this returns the error returned by
+// the handler's reporter (the same value returned by ReporterError).
+func (h *Handler) Error() error {
+ h.mu.Lock()
+ defer h.mu.Unlock()
+
+ if h.errsReported && h.err == nil {
+ return ErrInvalidSource
+ }
+ return h.err
+}
+
+// ReporterError returns the error returned by the handler's reporter. If
+// the reporter has either not been invoked (no errors handled) or has not
+// returned any non-nil value, then this returns nil.
+func (h *Handler) ReporterError() error {
+ h.mu.Lock()
+ defer h.mu.Unlock()
+
+ return h.err
+}
diff --git a/vendor/github.com/bufbuild/protocompile/resolver.go b/vendor/github.com/bufbuild/protocompile/resolver.go
new file mode 100644
index 000000000..755554f0d
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/resolver.go
@@ -0,0 +1,182 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protocompile
+
+import (
+ "io"
+ "os"
+ "path/filepath"
+ "strings"
+
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/ast"
+)
+
+// Resolver is used by the compiler to resolve a proto source file name
+// into some unit that is usable by the compiler. The result could be source
+// for a proto file or it could be an already-parsed AST or descriptor.
+//
+// Resolver implementations must be thread-safe as a single compilation
+// operation could invoke FindFileByPath from multiple goroutines.
+type Resolver interface {
+ // FindFileByPath searches for information for the given file path. If no
+ // result is available, it should return a non-nil error, such as
+ // protoregistry.NotFound.
+ FindFileByPath(path string) (SearchResult, error)
+}
+
+// SearchResult represents information about a proto source file. Only one of
+// the various fields must be set, based on what is available for a file. If
+// multiple fields are set, the compiler prefers them in opposite order listed:
+// so it uses a descriptor if present and only falls back to source if nothing
+// else if available.
+type SearchResult struct {
+ // Represents source code for the file. This should be nil if source code
+ // is not available. If no field below is set, then the compiler will parse
+ // the source code into an AST.
+ Source io.Reader
+ // Represents the abstract syntax tree for the file. If no field below is
+ // set, then the compiler will convert the AST into a descriptor proto.
+ AST *ast.FileNode
+ // A descriptor proto that represents the file. If the field below is not
+ // set, then the compiler will link this proto with its dependencies to
+ // produce a linked descriptor.
+ Proto *descriptorpb.FileDescriptorProto
+ // A fully linked descriptor that represents the file. If this field is set,
+ // then the compiler has no additional work to do for this file as it is
+ // already compiled.
+ Desc protoreflect.FileDescriptor
+}
+
+// ResolverFunc is a simple function type that implements Resolver.
+type ResolverFunc func(string) (SearchResult, error)
+
+var _ Resolver = ResolverFunc(nil)
+
+func (f ResolverFunc) FindFileByPath(path string) (SearchResult, error) {
+ return f(path)
+}
+
+// CompositeResolver is a slice of resolvers, which are consulted in order
+// until one can supply a result. If none of the constituent resolvers can
+// supply a result, the error returned by the first resolver is returned. If
+// the slice of resolvers is empty, all operations return
+// protoregistry.NotFound.
+type CompositeResolver []Resolver
+
+var _ Resolver = CompositeResolver(nil)
+
+func (f CompositeResolver) FindFileByPath(path string) (SearchResult, error) {
+ if len(f) == 0 {
+ return SearchResult{}, protoregistry.NotFound
+ }
+ var firstErr error
+ for _, res := range f {
+ r, err := res.FindFileByPath(path)
+ if err == nil {
+ return r, nil
+ }
+ if firstErr == nil {
+ firstErr = err
+ }
+ }
+ return SearchResult{}, firstErr
+}
+
+// SourceResolver can resolve file names by returning source code. It uses
+// an optional list of import paths to search. By default, it searches the
+// file system.
+type SourceResolver struct {
+ // Optional list of import paths. If present and not empty, then all
+ // file paths to find are assumed to be relative to one of these paths.
+ // If nil or empty, all file paths to find are assumed to be relative to
+ // the current working directory.
+ ImportPaths []string
+ // Optional function for returning a file's contents. If nil, then
+ // os.Open is used to open files on the file system.
+ //
+ // This function must be thread-safe as a single compilation operation
+ // could result in concurrent invocations of this function from
+ // multiple goroutines.
+ Accessor func(path string) (io.ReadCloser, error)
+}
+
+var _ Resolver = (*SourceResolver)(nil)
+
+func (r *SourceResolver) FindFileByPath(path string) (SearchResult, error) {
+ if len(r.ImportPaths) == 0 {
+ reader, err := r.accessFile(path)
+ if err != nil {
+ return SearchResult{}, err
+ }
+ return SearchResult{Source: reader}, nil
+ }
+
+ var e error
+ for _, importPath := range r.ImportPaths {
+ reader, err := r.accessFile(filepath.Join(importPath, path))
+ if err != nil {
+ if os.IsNotExist(err) {
+ e = err
+ continue
+ }
+ return SearchResult{}, err
+ }
+ return SearchResult{Source: reader}, nil
+ }
+ return SearchResult{}, e
+}
+
+func (r *SourceResolver) accessFile(path string) (io.ReadCloser, error) {
+ if r.Accessor != nil {
+ return r.Accessor(path)
+ }
+ return os.Open(path)
+}
+
+// SourceAccessorFromMap returns a function that can be used as the Accessor
+// field of a SourceResolver that uses the given map to load source. The map
+// keys are file names and the values are the corresponding file contents.
+//
+// The given map is used directly and not copied. Since accessor functions
+// must be thread-safe, this means that the provided map must not be mutated
+// once this accessor is provided to a compile operation.
+func SourceAccessorFromMap(srcs map[string]string) func(string) (io.ReadCloser, error) {
+ return func(path string) (io.ReadCloser, error) {
+ src, ok := srcs[path]
+ if !ok {
+ return nil, os.ErrNotExist
+ }
+ return io.NopCloser(strings.NewReader(src)), nil
+ }
+}
+
+// WithStandardImports returns a new resolver that knows about the same standard
+// imports that are included with protoc.
+func WithStandardImports(r Resolver) Resolver {
+ return ResolverFunc(func(name string) (SearchResult, error) {
+ res, err := r.FindFileByPath(name)
+ if err != nil {
+ // error from given resolver? see if it's a known standard file
+ if d, ok := standardImports[name]; ok {
+ return SearchResult{Desc: d}, nil
+ }
+ }
+ return res, err
+ })
+}
diff --git a/vendor/github.com/bufbuild/protocompile/sourceinfo/source_code_info.go b/vendor/github.com/bufbuild/protocompile/sourceinfo/source_code_info.go
new file mode 100644
index 000000000..02e6a09cd
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/sourceinfo/source_code_info.go
@@ -0,0 +1,820 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 sourceinfo contains the logic for computing source code info for a
+// file descriptor.
+//
+// The inputs to the computation are an AST for a file as well as the index of
+// interpreted options for that file.
+package sourceinfo
+
+import (
+ "bytes"
+ "fmt"
+ "strings"
+
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/ast"
+ "github.com/bufbuild/protocompile/internal"
+ "github.com/bufbuild/protocompile/options"
+)
+
+// GenerateSourceInfo generates source code info for the given AST. If the given
+// opts is present, it can generate source code info for interpreted options.
+// Otherwise, any options in the AST will get source code info as uninterpreted
+// options.
+//
+// This includes comments only for locations that represent complete declarations.
+// This is the same behavior as protoc, the reference compiler for Protocol Buffers.
+func GenerateSourceInfo(file *ast.FileNode, opts options.Index) *descriptorpb.SourceCodeInfo {
+ return generateSourceInfo(file, opts, false)
+}
+
+// GenerateSourceInfoWithExtraComments generates source code info for the given
+// AST. If the given opts is present, it can generate source code info for
+// interpreted options. Otherwise, any options in the AST will get source code
+// info as uninterpreted options.
+//
+// This includes comments for all locations. This is still lossy, but less so as
+// it preserves far more comments from the source file.
+func GenerateSourceInfoWithExtraComments(file *ast.FileNode, opts options.Index) *descriptorpb.SourceCodeInfo {
+ return generateSourceInfo(file, opts, true)
+}
+
+func generateSourceInfo(file *ast.FileNode, opts options.Index, extraComments bool) *descriptorpb.SourceCodeInfo {
+ if file == nil {
+ return nil
+ }
+
+ sci := sourceCodeInfo{file: file, commentsUsed: map[ast.SourcePos]struct{}{}, extraComments: extraComments}
+ path := make([]int32, 0, 10)
+
+ sci.newLocWithoutComments(file, nil)
+
+ if file.Syntax != nil {
+ sci.newLocWithComments(file.Syntax, append(path, internal.FileSyntaxTag))
+ }
+
+ var depIndex, pubDepIndex, weakDepIndex, optIndex, msgIndex, enumIndex, extendIndex, svcIndex int32
+
+ for _, child := range file.Decls {
+ switch child := child.(type) {
+ case *ast.ImportNode:
+ sci.newLocWithComments(child, append(path, internal.FileDependencyTag, depIndex))
+ depIndex++
+ if child.Public != nil {
+ sci.newLoc(child.Public, append(path, internal.FilePublicDependencyTag, pubDepIndex))
+ pubDepIndex++
+ } else if child.Weak != nil {
+ sci.newLoc(child.Weak, append(path, internal.FileWeakDependencyTag, weakDepIndex))
+ weakDepIndex++
+ }
+ case *ast.PackageNode:
+ sci.newLocWithComments(child, append(path, internal.FilePackageTag))
+ case *ast.OptionNode:
+ generateSourceCodeInfoForOption(opts, &sci, child, false, &optIndex, append(path, internal.FileOptionsTag))
+ case *ast.MessageNode:
+ generateSourceCodeInfoForMessage(opts, &sci, child, nil, append(path, internal.FileMessagesTag, msgIndex))
+ msgIndex++
+ case *ast.EnumNode:
+ generateSourceCodeInfoForEnum(opts, &sci, child, append(path, internal.FileEnumsTag, enumIndex))
+ enumIndex++
+ case *ast.ExtendNode:
+ generateSourceCodeInfoForExtensions(opts, &sci, child, &extendIndex, &msgIndex, append(path, internal.FileExtensionsTag), append(dup(path), internal.FileMessagesTag))
+ case *ast.ServiceNode:
+ generateSourceCodeInfoForService(opts, &sci, child, append(path, internal.FileServicesTag, svcIndex))
+ svcIndex++
+ }
+ }
+
+ return &descriptorpb.SourceCodeInfo{Location: sci.locs}
+}
+
+func generateSourceCodeInfoForOption(opts options.Index, sci *sourceCodeInfo, n *ast.OptionNode, compact bool, uninterpIndex *int32, path []int32) {
+ if !compact {
+ sci.newLocWithoutComments(n, path)
+ }
+ subPath := opts[n]
+ if len(subPath) > 0 {
+ p := make([]int32, len(path), len(path)+len(subPath))
+ copy(p, path)
+ if subPath[0] == -1 {
+ // used by "default" and "json_name" field pseudo-options
+ // to attribute path to parent element (since those are
+ // stored directly on the descriptor, not its options)
+ subPath = subPath[1:]
+ p = p[:len(path)-1]
+ }
+ p = append(p, subPath...)
+ if compact {
+ sci.newLoc(n, p)
+ } else {
+ sci.newLocWithComments(n, p)
+ }
+ return
+ }
+
+ // it's an uninterpreted option
+ optPath := path
+ optPath = append(optPath, internal.UninterpretedOptionsTag, *uninterpIndex)
+ *uninterpIndex++
+ sci.newLoc(n, optPath)
+ var valTag int32
+ switch n.Val.(type) {
+ case ast.IdentValueNode:
+ valTag = internal.UninterpretedIdentTag
+ case *ast.NegativeIntLiteralNode:
+ valTag = internal.UninterpretedNegIntTag
+ case ast.IntValueNode:
+ valTag = internal.UninterpretedPosIntTag
+ case ast.FloatValueNode:
+ valTag = internal.UninterpretedDoubleTag
+ case ast.StringValueNode:
+ valTag = internal.UninterpretedStringTag
+ case *ast.MessageLiteralNode:
+ valTag = internal.UninterpretedAggregateTag
+ }
+ if valTag != 0 {
+ sci.newLoc(n.Val, append(optPath, valTag))
+ }
+ for j, nn := range n.Name.Parts {
+ optNmPath := optPath
+ optNmPath = append(optNmPath, internal.UninterpretedNameTag, int32(j))
+ sci.newLoc(nn, optNmPath)
+ sci.newLoc(nn.Name, append(optNmPath, internal.UninterpretedNameNameTag))
+ }
+}
+
+func generateSourceCodeInfoForMessage(opts options.Index, sci *sourceCodeInfo, n ast.MessageDeclNode, fieldPath []int32, path []int32) {
+ var openBrace ast.Node
+
+ var decls []ast.MessageElement
+ switch n := n.(type) {
+ case *ast.MessageNode:
+ openBrace = n.OpenBrace
+ decls = n.Decls
+ case *ast.GroupNode:
+ openBrace = n.OpenBrace
+ decls = n.Decls
+ case *ast.MapFieldNode:
+ sci.newLoc(n, path)
+ // map entry so nothing else to do
+ return
+ }
+ sci.newBlockLocWithComments(n, openBrace, path)
+
+ sci.newLoc(n.MessageName(), append(path, internal.MessageNameTag))
+ // matching protoc, which emits the corresponding field type name (for group fields)
+ // right after the source location for the group message name
+ if fieldPath != nil {
+ sci.newLoc(n.MessageName(), append(fieldPath, internal.FieldTypeNameTag))
+ }
+
+ var optIndex, fieldIndex, oneOfIndex, extendIndex, nestedMsgIndex int32
+ var nestedEnumIndex, extRangeIndex, reservedRangeIndex, reservedNameIndex int32
+ for _, child := range decls {
+ switch child := child.(type) {
+ case *ast.OptionNode:
+ generateSourceCodeInfoForOption(opts, sci, child, false, &optIndex, append(path, internal.MessageOptionsTag))
+ case *ast.FieldNode:
+ generateSourceCodeInfoForField(opts, sci, child, append(path, internal.MessageFieldsTag, fieldIndex))
+ fieldIndex++
+ case *ast.GroupNode:
+ fldPath := path
+ fldPath = append(fldPath, internal.MessageFieldsTag, fieldIndex)
+ generateSourceCodeInfoForField(opts, sci, child, fldPath)
+ fieldIndex++
+ generateSourceCodeInfoForMessage(opts, sci, child, fldPath, append(dup(path), internal.MessageNestedMessagesTag, nestedMsgIndex))
+ nestedMsgIndex++
+ case *ast.MapFieldNode:
+ generateSourceCodeInfoForField(opts, sci, child, append(path, internal.MessageFieldsTag, fieldIndex))
+ fieldIndex++
+ nestedMsgIndex++
+ case *ast.OneOfNode:
+ generateSourceCodeInfoForOneOf(opts, sci, child, &fieldIndex, &nestedMsgIndex, append(path, internal.MessageFieldsTag), append(dup(path), internal.MessageNestedMessagesTag), append(dup(path), internal.MessageOneOfsTag, oneOfIndex))
+ oneOfIndex++
+ case *ast.MessageNode:
+ generateSourceCodeInfoForMessage(opts, sci, child, nil, append(path, internal.MessageNestedMessagesTag, nestedMsgIndex))
+ nestedMsgIndex++
+ case *ast.EnumNode:
+ generateSourceCodeInfoForEnum(opts, sci, child, append(path, internal.MessageEnumsTag, nestedEnumIndex))
+ nestedEnumIndex++
+ case *ast.ExtendNode:
+ generateSourceCodeInfoForExtensions(opts, sci, child, &extendIndex, &nestedMsgIndex, append(path, internal.MessageExtensionsTag), append(dup(path), internal.MessageNestedMessagesTag))
+ case *ast.ExtensionRangeNode:
+ generateSourceCodeInfoForExtensionRanges(opts, sci, child, &extRangeIndex, append(path, internal.MessageExtensionRangesTag))
+ case *ast.ReservedNode:
+ if len(child.Names) > 0 {
+ resPath := path
+ resPath = append(resPath, internal.MessageReservedNamesTag)
+ sci.newLocWithComments(child, resPath)
+ for _, rn := range child.Names {
+ sci.newLoc(rn, append(resPath, reservedNameIndex))
+ reservedNameIndex++
+ }
+ }
+ if len(child.Ranges) > 0 {
+ resPath := path
+ resPath = append(resPath, internal.MessageReservedRangesTag)
+ sci.newLocWithComments(child, resPath)
+ for _, rr := range child.Ranges {
+ generateSourceCodeInfoForReservedRange(sci, rr, append(resPath, reservedRangeIndex))
+ reservedRangeIndex++
+ }
+ }
+ }
+ }
+}
+
+func generateSourceCodeInfoForEnum(opts options.Index, sci *sourceCodeInfo, n *ast.EnumNode, path []int32) {
+ sci.newBlockLocWithComments(n, n.OpenBrace, path)
+ sci.newLoc(n.Name, append(path, internal.EnumNameTag))
+
+ var optIndex, valIndex, reservedNameIndex, reservedRangeIndex int32
+ for _, child := range n.Decls {
+ switch child := child.(type) {
+ case *ast.OptionNode:
+ generateSourceCodeInfoForOption(opts, sci, child, false, &optIndex, append(path, internal.EnumOptionsTag))
+ case *ast.EnumValueNode:
+ generateSourceCodeInfoForEnumValue(opts, sci, child, append(path, internal.EnumValuesTag, valIndex))
+ valIndex++
+ case *ast.ReservedNode:
+ if len(child.Names) > 0 {
+ resPath := path
+ resPath = append(resPath, internal.EnumReservedNamesTag)
+ sci.newLocWithComments(child, resPath)
+ for _, rn := range child.Names {
+ sci.newLoc(rn, append(resPath, reservedNameIndex))
+ reservedNameIndex++
+ }
+ }
+ if len(child.Ranges) > 0 {
+ resPath := path
+ resPath = append(resPath, internal.EnumReservedRangesTag)
+ sci.newLocWithComments(child, resPath)
+ for _, rr := range child.Ranges {
+ generateSourceCodeInfoForReservedRange(sci, rr, append(resPath, reservedRangeIndex))
+ reservedRangeIndex++
+ }
+ }
+ }
+ }
+}
+
+func generateSourceCodeInfoForEnumValue(opts options.Index, sci *sourceCodeInfo, n *ast.EnumValueNode, path []int32) {
+ sci.newLocWithComments(n, path)
+ sci.newLoc(n.Name, append(path, internal.EnumValNameTag))
+ sci.newLoc(n.Number, append(path, internal.EnumValNumberTag))
+
+ // enum value options
+ if n.Options != nil {
+ optsPath := path
+ optsPath = append(optsPath, internal.EnumValOptionsTag)
+ sci.newLoc(n.Options, optsPath)
+ var optIndex int32
+ for _, opt := range n.Options.GetElements() {
+ generateSourceCodeInfoForOption(opts, sci, opt, true, &optIndex, optsPath)
+ }
+ }
+}
+
+func generateSourceCodeInfoForReservedRange(sci *sourceCodeInfo, n *ast.RangeNode, path []int32) {
+ sci.newLoc(n, path)
+ sci.newLoc(n.StartVal, append(path, internal.ReservedRangeStartTag))
+ switch {
+ case n.EndVal != nil:
+ sci.newLoc(n.EndVal, append(path, internal.ReservedRangeEndTag))
+ case n.Max != nil:
+ sci.newLoc(n.Max, append(path, internal.ReservedRangeEndTag))
+ default:
+ sci.newLoc(n.StartVal, append(path, internal.ReservedRangeEndTag))
+ }
+}
+
+func generateSourceCodeInfoForExtensions(opts options.Index, sci *sourceCodeInfo, n *ast.ExtendNode, extendIndex, msgIndex *int32, extendPath, msgPath []int32) {
+ sci.newBlockLocWithComments(n, n.OpenBrace, extendPath)
+ for _, decl := range n.Decls {
+ switch decl := decl.(type) {
+ case *ast.FieldNode:
+ generateSourceCodeInfoForField(opts, sci, decl, append(extendPath, *extendIndex))
+ *extendIndex++
+ case *ast.GroupNode:
+ fldPath := extendPath
+ fldPath = append(fldPath, *extendIndex)
+ generateSourceCodeInfoForField(opts, sci, decl, fldPath)
+ *extendIndex++
+ generateSourceCodeInfoForMessage(opts, sci, decl, fldPath, append(msgPath, *msgIndex))
+ *msgIndex++
+ }
+ }
+}
+
+func generateSourceCodeInfoForOneOf(opts options.Index, sci *sourceCodeInfo, n *ast.OneOfNode, fieldIndex, nestedMsgIndex *int32, fieldPath, nestedMsgPath, oneOfPath []int32) {
+ sci.newBlockLocWithComments(n, n.OpenBrace, oneOfPath)
+ sci.newLoc(n.Name, append(oneOfPath, internal.OneOfNameTag))
+
+ var optIndex int32
+ for _, child := range n.Decls {
+ switch child := child.(type) {
+ case *ast.OptionNode:
+ generateSourceCodeInfoForOption(opts, sci, child, false, &optIndex, append(oneOfPath, internal.OneOfOptionsTag))
+ case *ast.FieldNode:
+ generateSourceCodeInfoForField(opts, sci, child, append(fieldPath, *fieldIndex))
+ *fieldIndex++
+ case *ast.GroupNode:
+ fldPath := fieldPath
+ fldPath = append(fldPath, *fieldIndex)
+ generateSourceCodeInfoForField(opts, sci, child, fldPath)
+ *fieldIndex++
+ generateSourceCodeInfoForMessage(opts, sci, child, fldPath, append(nestedMsgPath, *nestedMsgIndex))
+ *nestedMsgIndex++
+ }
+ }
+}
+
+func generateSourceCodeInfoForField(opts options.Index, sci *sourceCodeInfo, n ast.FieldDeclNode, path []int32) {
+ var fieldType string
+ if f, ok := n.(*ast.FieldNode); ok {
+ fieldType = string(f.FldType.AsIdentifier())
+ }
+
+ if n.GetGroupKeyword() != nil {
+ // comments will appear on group message
+ sci.newLocWithoutComments(n, path)
+ if n.FieldExtendee() != nil {
+ sci.newLoc(n.FieldExtendee(), append(path, internal.FieldExtendeeTag))
+ }
+ if n.FieldLabel() != nil {
+ // no comments here either (label is first token for group, so we want
+ // to leave the comments to be associated with the group message instead)
+ sci.newLocWithoutComments(n.FieldLabel(), append(path, internal.FieldLabelTag))
+ }
+ sci.newLoc(n.FieldType(), append(path, internal.FieldTypeTag))
+ // let the name comments be attributed to the group name
+ sci.newLocWithoutComments(n.FieldName(), append(path, internal.FieldNameTag))
+ } else {
+ sci.newLocWithComments(n, path)
+ if n.FieldExtendee() != nil {
+ sci.newLoc(n.FieldExtendee(), append(path, internal.FieldExtendeeTag))
+ }
+ if n.FieldLabel() != nil {
+ sci.newLoc(n.FieldLabel(), append(path, internal.FieldLabelTag))
+ }
+ var tag int32
+ if _, isScalar := internal.FieldTypes[fieldType]; isScalar {
+ tag = internal.FieldTypeTag
+ } else {
+ // this is a message or an enum, so attribute type location
+ // to the type name field
+ tag = internal.FieldTypeNameTag
+ }
+ sci.newLoc(n.FieldType(), append(path, tag))
+ sci.newLoc(n.FieldName(), append(path, internal.FieldNameTag))
+ }
+ sci.newLoc(n.FieldTag(), append(path, internal.FieldNumberTag))
+
+ if n.GetOptions() != nil {
+ optsPath := path
+ optsPath = append(optsPath, internal.FieldOptionsTag)
+ sci.newLoc(n.GetOptions(), optsPath)
+ var optIndex int32
+ for _, opt := range n.GetOptions().GetElements() {
+ generateSourceCodeInfoForOption(opts, sci, opt, true, &optIndex, optsPath)
+ }
+ }
+}
+
+func generateSourceCodeInfoForExtensionRanges(opts options.Index, sci *sourceCodeInfo, n *ast.ExtensionRangeNode, extRangeIndex *int32, path []int32) {
+ sci.newLocWithComments(n, path)
+ startExtRangeIndex := *extRangeIndex
+ for _, child := range n.Ranges {
+ path := append(path, *extRangeIndex)
+ *extRangeIndex++
+ sci.newLoc(child, path)
+ sci.newLoc(child.StartVal, append(path, internal.ExtensionRangeStartTag))
+ switch {
+ case child.EndVal != nil:
+ sci.newLoc(child.EndVal, append(path, internal.ExtensionRangeEndTag))
+ case child.Max != nil:
+ sci.newLoc(child.Max, append(path, internal.ExtensionRangeEndTag))
+ default:
+ sci.newLoc(child.StartVal, append(path, internal.ExtensionRangeEndTag))
+ }
+ }
+ // options for all ranges go after the start+end values
+ for range n.Ranges {
+ path := append(path, startExtRangeIndex)
+ startExtRangeIndex++
+ if n.Options != nil {
+ optsPath := path
+ optsPath = append(optsPath, internal.ExtensionRangeOptionsTag)
+ sci.newLoc(n.Options, optsPath)
+ var optIndex int32
+ for _, opt := range n.Options.GetElements() {
+ generateSourceCodeInfoForOption(opts, sci, opt, true, &optIndex, optsPath)
+ }
+ }
+ }
+}
+
+func generateSourceCodeInfoForService(opts options.Index, sci *sourceCodeInfo, n *ast.ServiceNode, path []int32) {
+ sci.newBlockLocWithComments(n, n.OpenBrace, path)
+ sci.newLoc(n.Name, append(path, internal.ServiceNameTag))
+ var optIndex, rpcIndex int32
+ for _, child := range n.Decls {
+ switch child := child.(type) {
+ case *ast.OptionNode:
+ generateSourceCodeInfoForOption(opts, sci, child, false, &optIndex, append(path, internal.ServiceOptionsTag))
+ case *ast.RPCNode:
+ generateSourceCodeInfoForMethod(opts, sci, child, append(path, internal.ServiceMethodsTag, rpcIndex))
+ rpcIndex++
+ }
+ }
+}
+
+func generateSourceCodeInfoForMethod(opts options.Index, sci *sourceCodeInfo, n *ast.RPCNode, path []int32) {
+ if n.OpenBrace != nil {
+ sci.newBlockLocWithComments(n, n.OpenBrace, path)
+ } else {
+ sci.newLocWithComments(n, path)
+ }
+ sci.newLoc(n.Name, append(path, internal.MethodNameTag))
+ if n.Input.Stream != nil {
+ sci.newLoc(n.Input.Stream, append(path, internal.MethodInputStreamTag))
+ }
+ sci.newLoc(n.Input.MessageType, append(path, internal.MethodInputTag))
+ if n.Output.Stream != nil {
+ sci.newLoc(n.Output.Stream, append(path, internal.MethodOutputStreamTag))
+ }
+ sci.newLoc(n.Output.MessageType, append(path, internal.MethodOutputTag))
+
+ optsPath := path
+ optsPath = append(optsPath, internal.MethodOptionsTag)
+ var optIndex int32
+ for _, decl := range n.Decls {
+ if opt, ok := decl.(*ast.OptionNode); ok {
+ generateSourceCodeInfoForOption(opts, sci, opt, false, &optIndex, optsPath)
+ }
+ }
+}
+
+type sourceCodeInfo struct {
+ file *ast.FileNode
+ extraComments bool
+ locs []*descriptorpb.SourceCodeInfo_Location
+ commentsUsed map[ast.SourcePos]struct{}
+}
+
+func (sci *sourceCodeInfo) newLocWithoutComments(n ast.Node, path []int32) {
+ dup := make([]int32, len(path))
+ copy(dup, path)
+ var start, end ast.SourcePos
+ if n == sci.file {
+ // For files, we don't want to consider trailing EOF token
+ // as part of the span. We want the span to only include
+ // actual lexical elements in the file (which also excludes
+ // whitespace and comments).
+ children := sci.file.Children()
+ if len(children) > 0 && isEOF(children[len(children)-1]) {
+ children = children[:len(children)-1]
+ }
+ if len(children) == 0 {
+ start = ast.SourcePos{Filename: sci.file.Name(), Line: 1, Col: 1}
+ end = start
+ } else {
+ start = sci.file.TokenInfo(n.Start()).Start()
+ end = sci.file.TokenInfo(children[len(children)-1].End()).End()
+ }
+ } else {
+ info := sci.file.NodeInfo(n)
+ start, end = info.Start(), info.End()
+ }
+ sci.locs = append(sci.locs, &descriptorpb.SourceCodeInfo_Location{
+ Path: dup,
+ Span: makeSpan(start, end),
+ })
+}
+
+func (sci *sourceCodeInfo) newLoc(n ast.Node, path []int32) {
+ info := sci.file.NodeInfo(n)
+ if !sci.extraComments {
+ dup := make([]int32, len(path))
+ copy(dup, path)
+ start, end := info.Start(), info.End()
+ sci.locs = append(sci.locs, &descriptorpb.SourceCodeInfo_Location{
+ Path: dup,
+ Span: makeSpan(start, end),
+ })
+ } else {
+ detachedComments, leadingComments := sci.getLeadingComments(n)
+ trailingComments := sci.getTrailingComments(n)
+ sci.newLocWithGivenComments(info, detachedComments, leadingComments, trailingComments, path)
+ }
+}
+
+func isEOF(n ast.Node) bool {
+ r, ok := n.(*ast.RuneNode)
+ return ok && r.Rune == 0
+}
+
+func (sci *sourceCodeInfo) newBlockLocWithComments(n, openBrace ast.Node, path []int32) {
+ // Block definitions use trailing comments after the open brace "{" as the
+ // element's trailing comments. For example:
+ //
+ // message Foo { // this is a trailing comment for a message
+ //
+ // } // not this
+ //
+ nodeInfo := sci.file.NodeInfo(n)
+ detachedComments, leadingComments := sci.getLeadingComments(n)
+ trailingComments := sci.getTrailingComments(openBrace)
+ sci.newLocWithGivenComments(nodeInfo, detachedComments, leadingComments, trailingComments, path)
+}
+
+func (sci *sourceCodeInfo) newLocWithComments(n ast.Node, path []int32) {
+ nodeInfo := sci.file.NodeInfo(n)
+ detachedComments, leadingComments := sci.getLeadingComments(n)
+ trailingComments := sci.getTrailingComments(n)
+ sci.newLocWithGivenComments(nodeInfo, detachedComments, leadingComments, trailingComments, path)
+}
+
+func (sci *sourceCodeInfo) newLocWithGivenComments(nodeInfo ast.NodeInfo, detachedComments []comments, leadingComments comments, trailingComments comments, path []int32) {
+ if (len(detachedComments) > 0 && sci.commentUsed(detachedComments[0])) ||
+ (len(detachedComments) == 0 && sci.commentUsed(leadingComments)) {
+ detachedComments = nil
+ leadingComments = ast.EmptyComments
+ }
+ if sci.commentUsed(trailingComments) {
+ trailingComments = ast.EmptyComments
+ }
+
+ var trail *string
+ if trailingComments.Len() > 0 {
+ trail = proto.String(sci.combineComments(trailingComments))
+ }
+
+ var lead *string
+ if leadingComments.Len() > 0 {
+ lead = proto.String(sci.combineComments(leadingComments))
+ }
+
+ detached := make([]string, len(detachedComments))
+ for i, cmts := range detachedComments {
+ detached[i] = sci.combineComments(cmts)
+ }
+
+ dup := make([]int32, len(path))
+ copy(dup, path)
+ sci.locs = append(sci.locs, &descriptorpb.SourceCodeInfo_Location{
+ LeadingDetachedComments: detached,
+ LeadingComments: lead,
+ TrailingComments: trail,
+ Path: dup,
+ Span: makeSpan(nodeInfo.Start(), nodeInfo.End()),
+ })
+}
+
+type comments interface {
+ Len() int
+ Index(int) ast.Comment
+}
+
+type subComments struct {
+ offs, n int
+ c ast.Comments
+}
+
+func (s subComments) Len() int {
+ return s.n
+}
+
+func (s subComments) Index(i int) ast.Comment {
+ if i < 0 || i >= s.n {
+ panic(fmt.Errorf("runtime error: index out of range [%d] with length %d", i, s.n))
+ }
+ return s.c.Index(i + s.offs)
+}
+
+func (sci *sourceCodeInfo) getLeadingComments(n ast.Node) ([]comments, comments) {
+ s := n.Start()
+ info := sci.file.TokenInfo(s)
+ var prevInfo ast.NodeInfo
+ if prev, ok := sci.file.Tokens().Previous(s); ok {
+ prevInfo = sci.file.TokenInfo(prev)
+ }
+ _, d, l := sci.attributeComments(prevInfo, info)
+ return d, l
+}
+
+func (sci *sourceCodeInfo) getTrailingComments(n ast.Node) comments {
+ e := n.End()
+ next, ok := sci.file.Tokens().Next(e)
+ if !ok {
+ return ast.EmptyComments
+ }
+ info := sci.file.TokenInfo(e)
+ nextInfo := sci.file.TokenInfo(next)
+ t, _, _ := sci.attributeComments(info, nextInfo)
+ return t
+}
+
+func (sci *sourceCodeInfo) attributeComments(prevInfo, info ast.NodeInfo) (t comments, d []comments, l comments) {
+ detached := groupComments(info.LeadingComments())
+ var trail comments
+ if prevInfo.IsValid() {
+ trail = comments(prevInfo.TrailingComments())
+ if trail.Len() == 0 {
+ trail, detached = sci.maybeDonate(prevInfo, info, detached)
+ }
+ } else {
+ trail = ast.EmptyComments
+ }
+ detached, lead := sci.maybeAttach(prevInfo, info, trail.Len() > 0, detached)
+ return trail, detached, lead
+}
+
+func (sci *sourceCodeInfo) maybeDonate(prevInfo ast.NodeInfo, info ast.NodeInfo, lead []comments) (t comments, l []comments) {
+ if len(lead) == 0 {
+ // nothing to donate
+ return ast.EmptyComments, nil
+ }
+ if !sci.extraComments {
+ // Mirroring protoc for now: if tokens on the same line, attribution
+ // is ambiguous so drop everything.
+ // This condition can be dropped (and we can stop dropping comments)
+ // once this PR is released:
+ // https://github.com/protocolbuffers/protobuf/pull/10660
+ if prevInfo.End().Line == info.Start().Line {
+ return ast.EmptyComments, nil
+ }
+ }
+ if lead[0].Index(0).Start().Line > prevInfo.End().Line+1 {
+ // first comment is detached from previous token, so can't be a trailing comment
+ return ast.EmptyComments, lead
+ }
+ if len(lead) > 1 {
+ // multiple groups? then donate first comment to previous token
+ return lead[0], lead[1:]
+ }
+ // there is only one element in lead
+ comment := lead[0]
+ if comment.Index(comment.Len()-1).End().Line < info.Start().Line-1 {
+ // there is a blank line between the comments and subsequent token, so
+ // we can donate the comment to previous token
+ return comment, nil
+ }
+ if txt := info.RawText(); len(txt) == 1 && strings.ContainsAny(txt, "}]),;") {
+ // token is a symbol for the end of a scope, which doesn't need a leading comment
+ return comment, nil
+ }
+
+ // cannot donate
+ return ast.EmptyComments, lead
+}
+
+func (sci *sourceCodeInfo) maybeAttach(prevInfo ast.NodeInfo, info ast.NodeInfo, hasTrail bool, lead []comments) (d []comments, l comments) {
+ if len(lead) == 0 {
+ return nil, ast.EmptyComments
+ }
+
+ if len(lead) == 1 && !hasTrail && prevInfo.IsValid() {
+ // If the one comment appears attached to both previous and next tokens,
+ // don't attach to either.
+ comment := lead[0]
+ attachedToPrevious := comment.Index(0).Start().Line == prevInfo.End().Line
+ attachedToNext := comment.Index(comment.Len()-1).End().Line == info.Start().Line
+ if attachedToPrevious && attachedToNext {
+ if !sci.extraComments {
+ // Mirroring protoc for now: if comment starts on line of previous token
+ // and ends on line of next, attribution is ambiguous so drop everything.
+ // This condition can be dropped (and we can stop dropping comments)
+ // once this PR is released:
+ // https://github.com/protocolbuffers/protobuf/pull/10660
+ return nil, ast.EmptyComments
+ }
+ // Since attachment is ambiguous, leave it detached.
+ return lead, ast.EmptyComments
+ }
+ }
+
+ lastComment := lead[len(lead)-1]
+ if lastComment.Index(lastComment.Len()-1).End().Line >= info.Start().Line-1 {
+ return lead[:len(lead)-1], lastComment
+ }
+
+ return lead, ast.EmptyComments
+}
+
+func makeSpan(start, end ast.SourcePos) []int32 {
+ if start.Line == end.Line {
+ return []int32{int32(start.Line) - 1, int32(start.Col) - 1, int32(end.Col) - 1}
+ }
+ return []int32{int32(start.Line) - 1, int32(start.Col) - 1, int32(end.Line) - 1, int32(end.Col) - 1}
+}
+
+func (sci *sourceCodeInfo) commentUsed(c comments) bool {
+ if c.Len() == 0 {
+ return false
+ }
+ pos := c.Index(0).Start()
+ if _, ok := sci.commentsUsed[pos]; ok {
+ return true
+ }
+
+ sci.commentsUsed[pos] = struct{}{}
+ return false
+}
+
+func groupComments(cmts ast.Comments) []comments {
+ if cmts.Len() == 0 {
+ return nil
+ }
+ var groups []comments
+ singleLineStyle := cmts.Index(0).RawText()[:2] == "//"
+ line := cmts.Index(0).End().Line
+ start := 0
+ for i := 1; i < cmts.Len(); i++ {
+ c := cmts.Index(i)
+ prevSingleLine := singleLineStyle
+ singleLineStyle = strings.HasPrefix(c.RawText(), "//")
+ if !singleLineStyle || prevSingleLine != singleLineStyle || c.Start().Line > line+1 {
+ // new group!
+ groups = append(groups, subComments{offs: start, n: i - start, c: cmts})
+ start = i
+ }
+ line = c.End().Line
+ }
+ // don't forget last group
+ groups = append(groups, subComments{offs: start, n: cmts.Len() - start, c: cmts})
+ return groups
+}
+
+func (sci *sourceCodeInfo) combineComments(comments comments) string {
+ if comments.Len() == 0 {
+ return ""
+ }
+ var buf bytes.Buffer
+ for i, l := 0, comments.Len(); i < l; i++ {
+ c := comments.Index(i)
+ txt := c.RawText()
+ if txt[:2] == "//" {
+ buf.WriteString(txt[2:])
+ // protoc includes trailing newline for line comments,
+ // but it's not present in the AST comment. So we need
+ // to add it if present.
+ if i, ok := sci.file.Items().Next(c.AsItem()); ok {
+ info := sci.file.ItemInfo(i)
+ if strings.HasPrefix(info.LeadingWhitespace(), "\n") {
+ buf.WriteRune('\n')
+ }
+ }
+ } else {
+ lines := strings.Split(txt[2:len(txt)-2], "\n")
+ first := true
+ for _, l := range lines {
+ if first {
+ first = false
+ } else {
+ buf.WriteByte('\n')
+ }
+
+ // strip a prefix of whitespace followed by '*'
+ j := 0
+ for j < len(l) {
+ if l[j] != ' ' && l[j] != '\t' {
+ break
+ }
+ j++
+ }
+ switch {
+ case j == len(l):
+ l = ""
+ case l[j] == '*':
+ l = l[j+1:]
+ case j > 0:
+ l = " " + l[j:]
+ }
+
+ buf.WriteString(l)
+ }
+ }
+ }
+ return buf.String()
+}
+
+func dup(p []int32) []int32 {
+ return append(([]int32)(nil), p...)
+}
diff --git a/vendor/github.com/bufbuild/protocompile/std_imports.go b/vendor/github.com/bufbuild/protocompile/std_imports.go
new file mode 100644
index 000000000..dcf8553a7
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/std_imports.go
@@ -0,0 +1,62 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 protocompile
+
+import (
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/reflect/protoregistry"
+ _ "google.golang.org/protobuf/types/known/anypb" // link in packages that include the standard protos included with protoc.
+ _ "google.golang.org/protobuf/types/known/apipb"
+ _ "google.golang.org/protobuf/types/known/durationpb"
+ _ "google.golang.org/protobuf/types/known/emptypb"
+ _ "google.golang.org/protobuf/types/known/fieldmaskpb"
+ _ "google.golang.org/protobuf/types/known/sourcecontextpb"
+ _ "google.golang.org/protobuf/types/known/structpb"
+ _ "google.golang.org/protobuf/types/known/timestamppb"
+ _ "google.golang.org/protobuf/types/known/typepb"
+ _ "google.golang.org/protobuf/types/known/wrapperspb"
+ _ "google.golang.org/protobuf/types/pluginpb"
+)
+
+// All files that are included with protoc are also included with this package
+// so that clients do not need to explicitly supply a copy of these protos (just
+// like callers of protoc do not need to supply them).
+var standardImports map[string]protoreflect.FileDescriptor
+
+func init() {
+ standardFilenames := []string{
+ "google/protobuf/any.proto",
+ "google/protobuf/api.proto",
+ "google/protobuf/compiler/plugin.proto",
+ "google/protobuf/descriptor.proto",
+ "google/protobuf/duration.proto",
+ "google/protobuf/empty.proto",
+ "google/protobuf/field_mask.proto",
+ "google/protobuf/source_context.proto",
+ "google/protobuf/struct.proto",
+ "google/protobuf/timestamp.proto",
+ "google/protobuf/type.proto",
+ "google/protobuf/wrappers.proto",
+ }
+
+ standardImports = map[string]protoreflect.FileDescriptor{}
+ for _, fn := range standardFilenames {
+ fd, err := protoregistry.GlobalFiles.FindFileByPath(fn)
+ if err != nil {
+ panic(err.Error())
+ }
+ standardImports[fn] = fd
+ }
+}
diff --git a/vendor/github.com/bufbuild/protocompile/walk/walk.go b/vendor/github.com/bufbuild/protocompile/walk/walk.go
new file mode 100644
index 000000000..e7a1ab3b1
--- /dev/null
+++ b/vendor/github.com/bufbuild/protocompile/walk/walk.go
@@ -0,0 +1,445 @@
+// Copyright 2020-2022 Buf Technologies, Inc.
+//
+// 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 walk provides helper functions for traversing all elements in a
+// protobuf file descriptor. There are versions both for traversing "rich"
+// descriptors (protoreflect.Descriptor) and for traversing the underlying
+// "raw" descriptor protos.
+//
+// # Enter And Exit
+//
+// This package includes variants of the functions that accept two callback
+// functions. These variants have names ending with "EnterAndExit". One function
+// is called as each element is visited ("enter") and the other is called after
+// the element and all of its descendants have been visited ("exit"). This
+// can be useful when you need to track state that is scoped to the visitation
+// of a single element.
+//
+// # Source Path
+//
+// When traversing raw descriptor protos, this package include variants whose
+// callback accepts a protoreflect.SourcePath. These variants have names that
+// include "WithPath". This path can be used to locate corresponding data in the
+// file's source code info (if present).
+package walk
+
+import (
+ "google.golang.org/protobuf/proto"
+ "google.golang.org/protobuf/reflect/protoreflect"
+ "google.golang.org/protobuf/types/descriptorpb"
+
+ "github.com/bufbuild/protocompile/internal"
+)
+
+// Descriptors walks all descriptors in the given file using a depth-first
+// traversal, calling the given function for each descriptor in the hierarchy.
+// The walk ends when traversal is complete or when the function returns an
+// error. If the function returns an error, that is returned as the result of the
+// walk operation.
+//
+// Descriptors are visited using a pre-order traversal, where the function is
+// called for a descriptor before it is called for any of its descendants.
+func Descriptors(file protoreflect.FileDescriptor, fn func(protoreflect.Descriptor) error) error {
+ return DescriptorsEnterAndExit(file, fn, nil)
+}
+
+// DescriptorsEnterAndExit walks all descriptors in the given file using a
+// depth-first traversal, calling the given functions on entry and on exit
+// for each descriptor in the hierarchy. The walk ends when traversal is
+// complete or when a function returns an error. If a function returns an error,
+// that is returned as the result of the walk operation.
+//
+// The enter function is called using a pre-order traversal, where the function
+// is called for a descriptor before it is called for any of its descendants.
+// The exit function is called using a post-order traversal, where the function
+// is called for a descriptor only after it is called for any descendants.
+func DescriptorsEnterAndExit(file protoreflect.FileDescriptor, enter, exit func(protoreflect.Descriptor) error) error {
+ for i := 0; i < file.Messages().Len(); i++ {
+ msg := file.Messages().Get(i)
+ if err := messageDescriptor(msg, enter, exit); err != nil {
+ return err
+ }
+ }
+ for i := 0; i < file.Enums().Len(); i++ {
+ en := file.Enums().Get(i)
+ if err := enumDescriptor(en, enter, exit); err != nil {
+ return err
+ }
+ }
+ for i := 0; i < file.Extensions().Len(); i++ {
+ ext := file.Extensions().Get(i)
+ if err := enter(ext); err != nil {
+ return err
+ }
+ if exit != nil {
+ if err := exit(ext); err != nil {
+ return err
+ }
+ }
+ }
+ for i := 0; i < file.Services().Len(); i++ {
+ svc := file.Services().Get(i)
+ if err := enter(svc); err != nil {
+ return err
+ }
+ for i := 0; i < svc.Methods().Len(); i++ {
+ mtd := svc.Methods().Get(i)
+ if err := enter(mtd); err != nil {
+ return err
+ }
+ if exit != nil {
+ if err := exit(mtd); err != nil {
+ return err
+ }
+ }
+ }
+ if exit != nil {
+ if err := exit(svc); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func messageDescriptor(msg protoreflect.MessageDescriptor, enter, exit func(protoreflect.Descriptor) error) error {
+ if err := enter(msg); err != nil {
+ return err
+ }
+ for i := 0; i < msg.Fields().Len(); i++ {
+ fld := msg.Fields().Get(i)
+ if err := enter(fld); err != nil {
+ return err
+ }
+ if exit != nil {
+ if err := exit(fld); err != nil {
+ return err
+ }
+ }
+ }
+ for i := 0; i < msg.Oneofs().Len(); i++ {
+ oo := msg.Oneofs().Get(i)
+ if err := enter(oo); err != nil {
+ return err
+ }
+ if exit != nil {
+ if err := exit(oo); err != nil {
+ return err
+ }
+ }
+ }
+ for i := 0; i < msg.Messages().Len(); i++ {
+ nested := msg.Messages().Get(i)
+ if err := messageDescriptor(nested, enter, exit); err != nil {
+ return err
+ }
+ }
+ for i := 0; i < msg.Enums().Len(); i++ {
+ en := msg.Enums().Get(i)
+ if err := enumDescriptor(en, enter, exit); err != nil {
+ return err
+ }
+ }
+ for i := 0; i < msg.Extensions().Len(); i++ {
+ ext := msg.Extensions().Get(i)
+ if err := enter(ext); err != nil {
+ return err
+ }
+ if exit != nil {
+ if err := exit(ext); err != nil {
+ return err
+ }
+ }
+ }
+ if exit != nil {
+ if err := exit(msg); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func enumDescriptor(en protoreflect.EnumDescriptor, enter, exit func(protoreflect.Descriptor) error) error {
+ if err := enter(en); err != nil {
+ return err
+ }
+ for i := 0; i < en.Values().Len(); i++ {
+ enVal := en.Values().Get(i)
+ if err := enter(enVal); err != nil {
+ return err
+ }
+ if exit != nil {
+ if err := exit(enVal); err != nil {
+ return err
+ }
+ }
+ }
+ if exit != nil {
+ if err := exit(en); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+// DescriptorProtosWithPath walks all descriptor protos in the given file using
+// a depth-first traversal. This is the same as DescriptorProtos except that the
+// callback function, fn, receives a protoreflect.SourcePath, that indicates the
+// path for the element in the file's source code info.
+func DescriptorProtosWithPath(file *descriptorpb.FileDescriptorProto, fn func(protoreflect.FullName, protoreflect.SourcePath, proto.Message) error) error {
+ return DescriptorProtosWithPathEnterAndExit(file, fn, nil)
+}
+
+// DescriptorProtosWithPathEnterAndExit walks all descriptor protos in the given
+// file using a depth-first traversal. This is the same as
+// DescriptorProtosEnterAndExit except that the callback function, fn, receives
+// a protoreflect.SourcePath, that indicates the path for the element in the
+// file's source code info.
+func DescriptorProtosWithPathEnterAndExit(file *descriptorpb.FileDescriptorProto, enter, exit func(protoreflect.FullName, protoreflect.SourcePath, proto.Message) error) error {
+ w := &protoWalker{usePath: true, enter: enter, exit: exit}
+ return w.walkDescriptorProtos(file)
+}
+
+// DescriptorProtos walks all descriptor protos in the given file using a
+// depth-first traversal, calling the given function for each descriptor proto
+// in the hierarchy. The walk ends when traversal is complete or when the
+// function returns an error. If the function returns an error, that is
+// returned as the result of the walk operation.
+//
+// Descriptor protos are visited using a pre-order traversal, where the function
+// is called for a descriptor before it is called for any of its descendants.
+func DescriptorProtos(file *descriptorpb.FileDescriptorProto, fn func(protoreflect.FullName, proto.Message) error) error {
+ return DescriptorProtosEnterAndExit(file, fn, nil)
+}
+
+// DescriptorProtosEnterAndExit walks all descriptor protos in the given file
+// using a depth-first traversal, calling the given functions on entry and on
+// exit for each descriptor in the hierarchy. The walk ends when traversal is
+// complete or when a function returns an error. If a function returns an error,
+// that is returned as the result of the walk operation.
+//
+// The enter function is called using a pre-order traversal, where the function
+// is called for a descriptor proto before it is called for any of its
+// descendants. The exit function is called using a post-order traversal, where
+// the function is called for a descriptor proto only after it is called for any
+// descendants.
+func DescriptorProtosEnterAndExit(file *descriptorpb.FileDescriptorProto, enter, exit func(protoreflect.FullName, proto.Message) error) error {
+ enterWithPath := func(n protoreflect.FullName, p protoreflect.SourcePath, m proto.Message) error {
+ return enter(n, m)
+ }
+ var exitWithPath func(n protoreflect.FullName, p protoreflect.SourcePath, m proto.Message) error
+ if exit != nil {
+ exitWithPath = func(n protoreflect.FullName, p protoreflect.SourcePath, m proto.Message) error {
+ return exit(n, m)
+ }
+ }
+ w := &protoWalker{
+ enter: enterWithPath,
+ exit: exitWithPath,
+ }
+ return w.walkDescriptorProtos(file)
+}
+
+type protoWalker struct {
+ usePath bool
+ enter, exit func(protoreflect.FullName, protoreflect.SourcePath, proto.Message) error
+}
+
+func (w *protoWalker) walkDescriptorProtos(file *descriptorpb.FileDescriptorProto) error {
+ prefix := file.GetPackage()
+ if prefix != "" {
+ prefix += "."
+ }
+ var path protoreflect.SourcePath
+ for i, msg := range file.MessageType {
+ var p protoreflect.SourcePath
+ if w.usePath {
+ p = path
+ p = append(p, internal.FileMessagesTag, int32(i))
+ }
+ if err := w.walkDescriptorProto(prefix, p, msg); err != nil {
+ return err
+ }
+ }
+ for i, en := range file.EnumType {
+ var p protoreflect.SourcePath
+ if w.usePath {
+ p = path
+ p = append(p, internal.FileEnumsTag, int32(i))
+ }
+ if err := w.walkEnumDescriptorProto(prefix, p, en); err != nil {
+ return err
+ }
+ }
+ for i, ext := range file.Extension {
+ var p protoreflect.SourcePath
+ if w.usePath {
+ p = path
+ p = append(p, internal.FileExtensionsTag, int32(i))
+ }
+ fqn := prefix + ext.GetName()
+ if err := w.enter(protoreflect.FullName(fqn), p, ext); err != nil {
+ return err
+ }
+ if w.exit != nil {
+ if err := w.exit(protoreflect.FullName(fqn), p, ext); err != nil {
+ return err
+ }
+ }
+ }
+ for i, svc := range file.Service {
+ var p protoreflect.SourcePath
+ if w.usePath {
+ p = path
+ p = append(p, internal.FileServicesTag, int32(i))
+ }
+ fqn := prefix + svc.GetName()
+ if err := w.enter(protoreflect.FullName(fqn), p, svc); err != nil {
+ return err
+ }
+ for j, mtd := range svc.Method {
+ var mp protoreflect.SourcePath
+ if w.usePath {
+ mp = p
+ mp = append(mp, internal.ServiceMethodsTag, int32(j))
+ }
+ mtdFqn := fqn + "." + mtd.GetName()
+ if err := w.enter(protoreflect.FullName(mtdFqn), mp, mtd); err != nil {
+ return err
+ }
+ if w.exit != nil {
+ if err := w.exit(protoreflect.FullName(mtdFqn), mp, mtd); err != nil {
+ return err
+ }
+ }
+ }
+ if w.exit != nil {
+ if err := w.exit(protoreflect.FullName(fqn), p, svc); err != nil {
+ return err
+ }
+ }
+ }
+ return nil
+}
+
+func (w *protoWalker) walkDescriptorProto(prefix string, path protoreflect.SourcePath, msg *descriptorpb.DescriptorProto) error {
+ fqn := prefix + msg.GetName()
+ if err := w.enter(protoreflect.FullName(fqn), path, msg); err != nil {
+ return err
+ }
+ prefix = fqn + "."
+ for i, fld := range msg.Field {
+ var p protoreflect.SourcePath
+ if w.usePath {
+ p = path
+ p = append(p, internal.MessageFieldsTag, int32(i))
+ }
+ fqn := prefix + fld.GetName()
+ if err := w.enter(protoreflect.FullName(fqn), p, fld); err != nil {
+ return err
+ }
+ if w.exit != nil {
+ if err := w.exit(protoreflect.FullName(fqn), p, fld); err != nil {
+ return err
+ }
+ }
+ }
+ for i, oo := range msg.OneofDecl {
+ var p protoreflect.SourcePath
+ if w.usePath {
+ p = path
+ p = append(p, internal.MessageOneOfsTag, int32(i))
+ }
+ fqn := prefix + oo.GetName()
+ if err := w.enter(protoreflect.FullName(fqn), p, oo); err != nil {
+ return err
+ }
+ if w.exit != nil {
+ if err := w.exit(protoreflect.FullName(fqn), p, oo); err != nil {
+ return err
+ }
+ }
+ }
+ for i, nested := range msg.NestedType {
+ var p protoreflect.SourcePath
+ if w.usePath {
+ p = path
+ p = append(p, internal.MessageNestedMessagesTag, int32(i))
+ }
+ if err := w.walkDescriptorProto(prefix, p, nested); err != nil {
+ return err
+ }
+ }
+ for i, en := range msg.EnumType {
+ var p protoreflect.SourcePath
+ if w.usePath {
+ p = path
+ p = append(p, internal.MessageEnumsTag, int32(i))
+ }
+ if err := w.walkEnumDescriptorProto(prefix, p, en); err != nil {
+ return err
+ }
+ }
+ for i, ext := range msg.Extension {
+ var p protoreflect.SourcePath
+ if w.usePath {
+ p = path
+ p = append(p, internal.MessageExtensionsTag, int32(i))
+ }
+ fqn := prefix + ext.GetName()
+ if err := w.enter(protoreflect.FullName(fqn), p, ext); err != nil {
+ return err
+ }
+ if w.exit != nil {
+ if err := w.exit(protoreflect.FullName(fqn), p, ext); err != nil {
+ return err
+ }
+ }
+ }
+ if w.exit != nil {
+ if err := w.exit(protoreflect.FullName(fqn), path, msg); err != nil {
+ return err
+ }
+ }
+ return nil
+}
+
+func (w *protoWalker) walkEnumDescriptorProto(prefix string, path protoreflect.SourcePath, en *descriptorpb.EnumDescriptorProto) error {
+ fqn := prefix + en.GetName()
+ if err := w.enter(protoreflect.FullName(fqn), path, en); err != nil {
+ return err
+ }
+ for i, val := range en.Value {
+ var p protoreflect.SourcePath
+ if w.usePath {
+ p = path
+ p = append(p, internal.EnumValuesTag, int32(i))
+ }
+ fqn := prefix + val.GetName()
+ if err := w.enter(protoreflect.FullName(fqn), p, val); err != nil {
+ return err
+ }
+ if w.exit != nil {
+ if err := w.exit(protoreflect.FullName(fqn), p, val); err != nil {
+ return err
+ }
+ }
+ }
+ if w.exit != nil {
+ if err := w.exit(protoreflect.FullName(fqn), path, en); err != nil {
+ return err
+ }
+ }
+ return nil
+}
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md b/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
new file mode 100644
index 000000000..1cade6cef
--- /dev/null
+++ b/vendor/github.com/cpuguy83/go-md2man/v2/LICENSE.md
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014 Brian Goff
+
+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/cpuguy83/go-md2man/v2/md2man/md2man.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
new file mode 100644
index 000000000..b48005673
--- /dev/null
+++ b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/md2man.go
@@ -0,0 +1,14 @@
+package md2man
+
+import (
+ "github.com/russross/blackfriday/v2"
+)
+
+// Render converts a markdown document into a roff formatted document.
+func Render(doc []byte) []byte {
+ renderer := NewRoffRenderer()
+
+ return blackfriday.Run(doc,
+ []blackfriday.Option{blackfriday.WithRenderer(renderer),
+ blackfriday.WithExtensions(renderer.GetExtensions())}...)
+}
diff --git a/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
new file mode 100644
index 000000000..be2b34360
--- /dev/null
+++ b/vendor/github.com/cpuguy83/go-md2man/v2/md2man/roff.go
@@ -0,0 +1,336 @@
+package md2man
+
+import (
+ "fmt"
+ "io"
+ "os"
+ "strings"
+
+ "github.com/russross/blackfriday/v2"
+)
+
+// roffRenderer implements the blackfriday.Renderer interface for creating
+// roff format (manpages) from markdown text
+type roffRenderer struct {
+ extensions blackfriday.Extensions
+ listCounters []int
+ firstHeader bool
+ firstDD bool
+ listDepth int
+}
+
+const (
+ titleHeader = ".TH "
+ topLevelHeader = "\n\n.SH "
+ secondLevelHdr = "\n.SH "
+ otherHeader = "\n.SS "
+ crTag = "\n"
+ emphTag = "\\fI"
+ emphCloseTag = "\\fP"
+ strongTag = "\\fB"
+ strongCloseTag = "\\fP"
+ breakTag = "\n.br\n"
+ paraTag = "\n.PP\n"
+ hruleTag = "\n.ti 0\n\\l'\\n(.lu'\n"
+ linkTag = "\n\\[la]"
+ linkCloseTag = "\\[ra]"
+ codespanTag = "\\fB\\fC"
+ codespanCloseTag = "\\fR"
+ codeTag = "\n.PP\n.RS\n\n.nf\n"
+ codeCloseTag = "\n.fi\n.RE\n"
+ quoteTag = "\n.PP\n.RS\n"
+ quoteCloseTag = "\n.RE\n"
+ listTag = "\n.RS\n"
+ listCloseTag = "\n.RE\n"
+ dtTag = "\n.TP\n"
+ dd2Tag = "\n"
+ tableStart = "\n.TS\nallbox;\n"
+ tableEnd = ".TE\n"
+ tableCellStart = "T{\n"
+ tableCellEnd = "\nT}\n"
+)
+
+// NewRoffRenderer creates a new blackfriday Renderer for generating roff documents
+// from markdown
+func NewRoffRenderer() *roffRenderer { // nolint: golint
+ var extensions blackfriday.Extensions
+
+ extensions |= blackfriday.NoIntraEmphasis
+ extensions |= blackfriday.Tables
+ extensions |= blackfriday.FencedCode
+ extensions |= blackfriday.SpaceHeadings
+ extensions |= blackfriday.Footnotes
+ extensions |= blackfriday.Titleblock
+ extensions |= blackfriday.DefinitionLists
+ return &roffRenderer{
+ extensions: extensions,
+ }
+}
+
+// GetExtensions returns the list of extensions used by this renderer implementation
+func (r *roffRenderer) GetExtensions() blackfriday.Extensions {
+ return r.extensions
+}
+
+// RenderHeader handles outputting the header at document start
+func (r *roffRenderer) RenderHeader(w io.Writer, ast *blackfriday.Node) {
+ // disable hyphenation
+ out(w, ".nh\n")
+}
+
+// RenderFooter handles outputting the footer at the document end; the roff
+// renderer has no footer information
+func (r *roffRenderer) RenderFooter(w io.Writer, ast *blackfriday.Node) {
+}
+
+// RenderNode is called for each node in a markdown document; based on the node
+// type the equivalent roff output is sent to the writer
+func (r *roffRenderer) RenderNode(w io.Writer, node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
+
+ var walkAction = blackfriday.GoToNext
+
+ switch node.Type {
+ case blackfriday.Text:
+ escapeSpecialChars(w, node.Literal)
+ case blackfriday.Softbreak:
+ out(w, crTag)
+ case blackfriday.Hardbreak:
+ out(w, breakTag)
+ case blackfriday.Emph:
+ if entering {
+ out(w, emphTag)
+ } else {
+ out(w, emphCloseTag)
+ }
+ case blackfriday.Strong:
+ if entering {
+ out(w, strongTag)
+ } else {
+ out(w, strongCloseTag)
+ }
+ case blackfriday.Link:
+ if !entering {
+ out(w, linkTag+string(node.LinkData.Destination)+linkCloseTag)
+ }
+ case blackfriday.Image:
+ // ignore images
+ walkAction = blackfriday.SkipChildren
+ case blackfriday.Code:
+ out(w, codespanTag)
+ escapeSpecialChars(w, node.Literal)
+ out(w, codespanCloseTag)
+ case blackfriday.Document:
+ break
+ case blackfriday.Paragraph:
+ // roff .PP markers break lists
+ if r.listDepth > 0 {
+ return blackfriday.GoToNext
+ }
+ if entering {
+ out(w, paraTag)
+ } else {
+ out(w, crTag)
+ }
+ case blackfriday.BlockQuote:
+ if entering {
+ out(w, quoteTag)
+ } else {
+ out(w, quoteCloseTag)
+ }
+ case blackfriday.Heading:
+ r.handleHeading(w, node, entering)
+ case blackfriday.HorizontalRule:
+ out(w, hruleTag)
+ case blackfriday.List:
+ r.handleList(w, node, entering)
+ case blackfriday.Item:
+ r.handleItem(w, node, entering)
+ case blackfriday.CodeBlock:
+ out(w, codeTag)
+ escapeSpecialChars(w, node.Literal)
+ out(w, codeCloseTag)
+ case blackfriday.Table:
+ r.handleTable(w, node, entering)
+ case blackfriday.TableHead:
+ case blackfriday.TableBody:
+ case blackfriday.TableRow:
+ // no action as cell entries do all the nroff formatting
+ return blackfriday.GoToNext
+ case blackfriday.TableCell:
+ r.handleTableCell(w, node, entering)
+ case blackfriday.HTMLSpan:
+ // ignore other HTML tags
+ default:
+ fmt.Fprintln(os.Stderr, "WARNING: go-md2man does not handle node type "+node.Type.String())
+ }
+ return walkAction
+}
+
+func (r *roffRenderer) handleHeading(w io.Writer, node *blackfriday.Node, entering bool) {
+ if entering {
+ switch node.Level {
+ case 1:
+ if !r.firstHeader {
+ out(w, titleHeader)
+ r.firstHeader = true
+ break
+ }
+ out(w, topLevelHeader)
+ case 2:
+ out(w, secondLevelHdr)
+ default:
+ out(w, otherHeader)
+ }
+ }
+}
+
+func (r *roffRenderer) handleList(w io.Writer, node *blackfriday.Node, entering bool) {
+ openTag := listTag
+ closeTag := listCloseTag
+ if node.ListFlags&blackfriday.ListTypeDefinition != 0 {
+ // tags for definition lists handled within Item node
+ openTag = ""
+ closeTag = ""
+ }
+ if entering {
+ r.listDepth++
+ if node.ListFlags&blackfriday.ListTypeOrdered != 0 {
+ r.listCounters = append(r.listCounters, 1)
+ }
+ out(w, openTag)
+ } else {
+ if node.ListFlags&blackfriday.ListTypeOrdered != 0 {
+ r.listCounters = r.listCounters[:len(r.listCounters)-1]
+ }
+ out(w, closeTag)
+ r.listDepth--
+ }
+}
+
+func (r *roffRenderer) handleItem(w io.Writer, node *blackfriday.Node, entering bool) {
+ if entering {
+ if node.ListFlags&blackfriday.ListTypeOrdered != 0 {
+ out(w, fmt.Sprintf(".IP \"%3d.\" 5\n", r.listCounters[len(r.listCounters)-1]))
+ r.listCounters[len(r.listCounters)-1]++
+ } else if node.ListFlags&blackfriday.ListTypeTerm != 0 {
+ // DT (definition term): line just before DD (see below).
+ out(w, dtTag)
+ r.firstDD = true
+ } else if node.ListFlags&blackfriday.ListTypeDefinition != 0 {
+ // DD (definition description): line that starts with ": ".
+ //
+ // We have to distinguish between the first DD and the
+ // subsequent ones, as there should be no vertical
+ // whitespace between the DT and the first DD.
+ if r.firstDD {
+ r.firstDD = false
+ } else {
+ out(w, dd2Tag)
+ }
+ } else {
+ out(w, ".IP \\(bu 2\n")
+ }
+ } else {
+ out(w, "\n")
+ }
+}
+
+func (r *roffRenderer) handleTable(w io.Writer, node *blackfriday.Node, entering bool) {
+ if entering {
+ out(w, tableStart)
+ // call walker to count cells (and rows?) so format section can be produced
+ columns := countColumns(node)
+ out(w, strings.Repeat("l ", columns)+"\n")
+ out(w, strings.Repeat("l ", columns)+".\n")
+ } else {
+ out(w, tableEnd)
+ }
+}
+
+func (r *roffRenderer) handleTableCell(w io.Writer, node *blackfriday.Node, entering bool) {
+ if entering {
+ var start string
+ if node.Prev != nil && node.Prev.Type == blackfriday.TableCell {
+ start = "\t"
+ }
+ if node.IsHeader {
+ start += codespanTag
+ } else if nodeLiteralSize(node) > 30 {
+ start += tableCellStart
+ }
+ out(w, start)
+ } else {
+ var end string
+ if node.IsHeader {
+ end = codespanCloseTag
+ } else if nodeLiteralSize(node) > 30 {
+ end = tableCellEnd
+ }
+ if node.Next == nil && end != tableCellEnd {
+ // Last cell: need to carriage return if we are at the end of the
+ // header row and content isn't wrapped in a "tablecell"
+ end += crTag
+ }
+ out(w, end)
+ }
+}
+
+func nodeLiteralSize(node *blackfriday.Node) int {
+ total := 0
+ for n := node.FirstChild; n != nil; n = n.FirstChild {
+ total += len(n.Literal)
+ }
+ return total
+}
+
+// because roff format requires knowing the column count before outputting any table
+// data we need to walk a table tree and count the columns
+func countColumns(node *blackfriday.Node) int {
+ var columns int
+
+ node.Walk(func(node *blackfriday.Node, entering bool) blackfriday.WalkStatus {
+ switch node.Type {
+ case blackfriday.TableRow:
+ if !entering {
+ return blackfriday.Terminate
+ }
+ case blackfriday.TableCell:
+ if entering {
+ columns++
+ }
+ default:
+ }
+ return blackfriday.GoToNext
+ })
+ return columns
+}
+
+func out(w io.Writer, output string) {
+ io.WriteString(w, output) // nolint: errcheck
+}
+
+func escapeSpecialChars(w io.Writer, text []byte) {
+ for i := 0; i < len(text); i++ {
+ // escape initial apostrophe or period
+ if len(text) >= 1 && (text[0] == '\'' || text[0] == '.') {
+ out(w, "\\&")
+ }
+
+ // directly copy normal characters
+ org := i
+
+ for i < len(text) && text[i] != '\\' {
+ i++
+ }
+ if i > org {
+ w.Write(text[org:i]) // nolint: errcheck
+ }
+
+ // escape a character
+ if i >= len(text) {
+ break
+ }
+
+ w.Write([]byte{'\\', text[i]}) // nolint: errcheck
+ }
+}
diff --git a/vendor/github.com/docker/cli/AUTHORS b/vendor/github.com/docker/cli/AUTHORS
new file mode 100644
index 000000000..8990f85b5
--- /dev/null
+++ b/vendor/github.com/docker/cli/AUTHORS
@@ -0,0 +1,771 @@
+# This file lists all individuals having contributed content to the repository.
+# For how it is generated, see `scripts/docs/generate-authors.sh`.
+
+Aanand Prasad
+Aaron L. Xu
+Aaron Lehmann
+Aaron.L.Xu
+Abdur Rehman
+Abhinandan Prativadi
+Abin Shahab
+Abreto FU
+Ace Tang
+Addam Hardy
+Adolfo Ochagavía
+Adrian Plata
+Adrien Duermael
+Adrien Folie
+Ahmet Alp Balkan
+Aidan Feldman
+Aidan Hobson Sayers
+AJ Bowen
+Akhil Mohan
+Akihiro Suda
+Akim Demaille
+Alan Thompson
+Albert Callarisa
+Albin Kerouanton
+Aleksa Sarai
+Aleksander Piotrowski
+Alessandro Boch
+Alex Mavrogiannis
+Alex Mayer
+Alexander Boyd
+Alexander Larsson
+Alexander Morozov
+Alexander Ryabov
+Alexandre González
+Alfred Landrum
+Alicia Lauerman
+Allen Sun
+Alvin Deng
+Amen Belayneh
+Amir Goldstein
+Amit Krishnan
+Amit Shukla
+Amy Lindburg
+Anca Iordache
+Anda Xu
+Andrea Luzzardi
+Andreas Köhler
+Andrew France
+Andrew Hsu
+Andrew Macpherson
+Andrew McDonnell
+Andrew Po
+Andrey Petrov
+Andrii Berehuliak
+André Martins
+Andy Goldstein
+Andy Rothfusz
+Anil Madhavapeddy
+Ankush Agarwal
+Anne Henmi
+Anton Polonskiy
+Antonio Murdaca
+Antonis Kalipetis
+Anusha Ragunathan
+Ao Li
+Arash Deshmeh
+Arko Dasgupta
+Arnaud Porterie
+Arthur Peka
+Ashwini Oruganti
+Azat Khuyiyakhmetov
+Bardia Keyoumarsi
+Barnaby Gray
+Bastiaan Bakker
+BastianHofmann
+Ben Bonnefoy
+Ben Creasy
+Ben Firshman
+Benjamin Boudreau
+Benoit Sigoure
+Bhumika Bayani
+Bill Wang
+Bin Liu
+Bingshen Wang
+Boaz Shuster
+Bogdan Anton
+Boris Pruessmann
+Bradley Cicenas