mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 04:08:16 +00:00 
			
		
		
		
	Merge pull request #52132 from portworx/kubelet_weird_output_fix
Automatic merge from submit-queue (batch tested with PRs 51064, 52132). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>.. Kubelet weird output fix **What this PR does / why we need it**: All kube binaries print the following message at the top when executed: ``` 2017/08/28 21:37:12 proto: duplicate proto type registered: google.protobuf.Any 2017/08/28 21:37:12 proto: duplicate proto type registered: google.protobuf.Duration 2017/08/28 21:37:12 proto: duplicate proto type registered: google.protobuf.Timestamp ``` This PR addresses the above issue It involves the following two changes: 1. Updating vendor packages - Removes everything under the repo ``go.pedge.io`` - Updates repo libopenstorage/openstorage (which was using the above package) 2. Updates the portworx volume native driver to adhere to the newly vendor'ed code. **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes #51452 **Special notes for your reviewer**: I have divided the changes into 2 commits 1. Vendor'ed changes 2. Changes in portworx volume driver. ```release-note Remove duplicate proto errors in kubelet. ```
This commit is contained in:
		
							
								
								
									
										24
									
								
								Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										24
									
								
								Godeps/Godeps.json
									
									
									
										generated
									
									
									
								
							@@ -1930,27 +1930,31 @@
 | 
				
			|||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			"ImportPath": "github.com/libopenstorage/openstorage/api",
 | 
								"ImportPath": "github.com/libopenstorage/openstorage/api",
 | 
				
			||||||
			"Rev": "6e787003b91ddba85f108b8aede075b1af0d3606"
 | 
								"Rev": "093a0c3888753c2056e7373183693d670c6bba01"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			"ImportPath": "github.com/libopenstorage/openstorage/api/client",
 | 
								"ImportPath": "github.com/libopenstorage/openstorage/api/client",
 | 
				
			||||||
			"Rev": "6e787003b91ddba85f108b8aede075b1af0d3606"
 | 
								"Rev": "093a0c3888753c2056e7373183693d670c6bba01"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			"ImportPath": "github.com/libopenstorage/openstorage/api/client/volume",
 | 
								"ImportPath": "github.com/libopenstorage/openstorage/api/client/volume",
 | 
				
			||||||
			"Rev": "6e787003b91ddba85f108b8aede075b1af0d3606"
 | 
								"Rev": "093a0c3888753c2056e7373183693d670c6bba01"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			"ImportPath": "github.com/libopenstorage/openstorage/api/spec",
 | 
								"ImportPath": "github.com/libopenstorage/openstorage/api/spec",
 | 
				
			||||||
			"Rev": "6e787003b91ddba85f108b8aede075b1af0d3606"
 | 
								"Rev": "093a0c3888753c2056e7373183693d670c6bba01"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"ImportPath": "github.com/libopenstorage/openstorage/pkg/parser",
 | 
				
			||||||
 | 
								"Rev": "093a0c3888753c2056e7373183693d670c6bba01"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			"ImportPath": "github.com/libopenstorage/openstorage/pkg/units",
 | 
								"ImportPath": "github.com/libopenstorage/openstorage/pkg/units",
 | 
				
			||||||
			"Rev": "6e787003b91ddba85f108b8aede075b1af0d3606"
 | 
								"Rev": "093a0c3888753c2056e7373183693d670c6bba01"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			"ImportPath": "github.com/libopenstorage/openstorage/volume",
 | 
								"ImportPath": "github.com/libopenstorage/openstorage/volume",
 | 
				
			||||||
			"Rev": "6e787003b91ddba85f108b8aede075b1af0d3606"
 | 
								"Rev": "093a0c3888753c2056e7373183693d670c6bba01"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			"ImportPath": "github.com/lpabon/godbc",
 | 
								"ImportPath": "github.com/lpabon/godbc",
 | 
				
			||||||
@@ -2000,6 +2004,10 @@
 | 
				
			|||||||
			"ImportPath": "github.com/mitchellh/mapstructure",
 | 
								"ImportPath": "github.com/mitchellh/mapstructure",
 | 
				
			||||||
			"Rev": "53818660ed4955e899c0bcafa97299a388bd7c8e"
 | 
								"Rev": "53818660ed4955e899c0bcafa97299a388bd7c8e"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								"ImportPath": "github.com/mohae/deepcopy",
 | 
				
			||||||
 | 
								"Rev": "491d3605edfb866af34a48075bd4355ac1bf46ca"
 | 
				
			||||||
 | 
							},
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			"ImportPath": "github.com/mreiferson/go-httpclient",
 | 
								"ImportPath": "github.com/mreiferson/go-httpclient",
 | 
				
			||||||
			"Rev": "31f0106b4474f14bc441575c19d3a5fa21aa1f6c"
 | 
								"Rev": "31f0106b4474f14bc441575c19d3a5fa21aa1f6c"
 | 
				
			||||||
@@ -2749,10 +2757,6 @@
 | 
				
			|||||||
			"Comment": "v1.0-13-g5292687",
 | 
								"Comment": "v1.0-13-g5292687",
 | 
				
			||||||
			"Rev": "5292687f5379e01054407da44d7c4590a61fd3de"
 | 
								"Rev": "5292687f5379e01054407da44d7c4590a61fd3de"
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			"ImportPath": "go.pedge.io/pb/go/google/protobuf",
 | 
					 | 
				
			||||||
			"Rev": "f3c84f58974dc53d460d0855337cad85843bf0df"
 | 
					 | 
				
			||||||
		},
 | 
					 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			"ImportPath": "go4.org/errorutil",
 | 
								"ImportPath": "go4.org/errorutil",
 | 
				
			||||||
			"Rev": "03efcb870d84809319ea509714dd6d19a1498483"
 | 
								"Rev": "03efcb870d84809319ea509714dd6d19a1498483"
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										258
									
								
								Godeps/LICENSES
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										258
									
								
								Godeps/LICENSES
									
									
									
										generated
									
									
									
								
							@@ -67651,6 +67651,205 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 | 
				
			|||||||
================================================================================
 | 
					================================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					================================================================================
 | 
				
			||||||
 | 
					= vendor/github.com/libopenstorage/openstorage/pkg/parser licensed under: =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                                 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
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   Copyright 2015 Openstorage.org.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   Licensed under the Apache License, Version 2.0 (the "License");
 | 
				
			||||||
 | 
					   you may not use this file except in compliance with the License.
 | 
				
			||||||
 | 
					   You may obtain a copy of the License at
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					       http://www.apache.org/licenses/LICENSE-2.0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					   Unless required by applicable law or agreed to in writing, software
 | 
				
			||||||
 | 
					   distributed under the License is distributed on an "AS IS" BASIS,
 | 
				
			||||||
 | 
					   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 | 
				
			||||||
 | 
					   See the License for the specific language governing permissions and
 | 
				
			||||||
 | 
					   limitations under the License.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					= vendor/github.com/libopenstorage/openstorage/LICENSE 40c3e1c9eacda859a17048003909a2f8
 | 
				
			||||||
 | 
					================================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
================================================================================
 | 
					================================================================================
 | 
				
			||||||
= vendor/github.com/libopenstorage/openstorage/pkg/units licensed under: =
 | 
					= vendor/github.com/libopenstorage/openstorage/pkg/units licensed under: =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -69146,6 +69345,35 @@ THE SOFTWARE.
 | 
				
			|||||||
================================================================================
 | 
					================================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					================================================================================
 | 
				
			||||||
 | 
					= vendor/github.com/mohae/deepcopy licensed under: =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					The MIT License (MIT)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Copyright (c) 2014 Joel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					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.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					= vendor/github.com/mohae/deepcopy/LICENSE 268dc9c546e3de67a93c1d12a039d702
 | 
				
			||||||
 | 
					================================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
================================================================================
 | 
					================================================================================
 | 
				
			||||||
= vendor/github.com/mreiferson/go-httpclient licensed under: =
 | 
					= vendor/github.com/mreiferson/go-httpclient licensed under: =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -88246,36 +88474,6 @@ SOFTWARE.
 | 
				
			|||||||
================================================================================
 | 
					================================================================================
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
================================================================================
 | 
					 | 
				
			||||||
= vendor/go.pedge.io/pb/go/google/protobuf licensed under: =
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
The MIT License (MIT)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
Copyright (c) 2015 Peter Edge
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
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.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
= vendor/go.pedge.io/pb/LICENSE bd5821dd74e6e83799a4a8dd9f48c43f
 | 
					 | 
				
			||||||
================================================================================
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
================================================================================
 | 
					================================================================================
 | 
				
			||||||
= vendor/go4.org/errorutil licensed under: =
 | 
					= vendor/go4.org/errorutil licensed under: =
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -31,6 +31,11 @@ import (
 | 
				
			|||||||
	"k8s.io/kubernetes/pkg/volume/util/volumehelper"
 | 
						"k8s.io/kubernetes/pkg/volume/util/volumehelper"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const (
 | 
				
			||||||
 | 
						attachContextKey = "context"
 | 
				
			||||||
 | 
						attachHostKey    = "host"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// This is the primary entrypoint for volume plugins.
 | 
					// This is the primary entrypoint for volume plugins.
 | 
				
			||||||
func ProbeVolumePlugins() []volume.VolumePlugin {
 | 
					func ProbeVolumePlugins() []volume.VolumePlugin {
 | 
				
			||||||
	return []volume.VolumePlugin{&portworxVolumePlugin{nil, nil}}
 | 
						return []volume.VolumePlugin{&portworxVolumePlugin{nil, nil}}
 | 
				
			||||||
@@ -205,7 +210,7 @@ type portworxManager interface {
 | 
				
			|||||||
	// Deletes a volume
 | 
						// Deletes a volume
 | 
				
			||||||
	DeleteVolume(deleter *portworxVolumeDeleter) error
 | 
						DeleteVolume(deleter *portworxVolumeDeleter) error
 | 
				
			||||||
	// Attach a volume
 | 
						// Attach a volume
 | 
				
			||||||
	AttachVolume(mounter *portworxVolumeMounter) (string, error)
 | 
						AttachVolume(mounter *portworxVolumeMounter, attachOptions map[string]string) (string, error)
 | 
				
			||||||
	// Detach a volume
 | 
						// Detach a volume
 | 
				
			||||||
	DetachVolume(unmounter *portworxVolumeUnmounter) error
 | 
						DetachVolume(unmounter *portworxVolumeUnmounter) error
 | 
				
			||||||
	// Mount a volume
 | 
						// Mount a volume
 | 
				
			||||||
@@ -274,7 +279,10 @@ func (b *portworxVolumeMounter) SetUpAt(dir string, fsGroup *int64) error {
 | 
				
			|||||||
		return nil
 | 
							return nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if _, err := b.manager.AttachVolume(b); err != nil {
 | 
						attachOptions := make(map[string]string)
 | 
				
			||||||
 | 
						attachOptions[attachContextKey] = dir
 | 
				
			||||||
 | 
						attachOptions[attachHostKey] = b.plugin.host.GetHostName()
 | 
				
			||||||
 | 
						if _, err := b.manager.AttachVolume(b, attachOptions); err != nil {
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -97,7 +97,7 @@ type fakePortworxManager struct {
 | 
				
			|||||||
	mountCalled  bool
 | 
						mountCalled  bool
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (fake *fakePortworxManager) AttachVolume(b *portworxVolumeMounter) (string, error) {
 | 
					func (fake *fakePortworxManager) AttachVolume(b *portworxVolumeMounter, attachOptions map[string]string) (string, error) {
 | 
				
			||||||
	fake.attachCalled = true
 | 
						fake.attachCalled = true
 | 
				
			||||||
	return "", nil
 | 
						return "", nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -35,6 +35,7 @@ const (
 | 
				
			|||||||
	pxdDriverName    = "pxd"
 | 
						pxdDriverName    = "pxd"
 | 
				
			||||||
	pvcClaimLabel    = "pvc"
 | 
						pvcClaimLabel    = "pvc"
 | 
				
			||||||
	pxServiceName    = "portworx-service"
 | 
						pxServiceName    = "portworx-service"
 | 
				
			||||||
 | 
						pxDriverName     = "pxd-sched"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type PortworxVolumeUtil struct {
 | 
					type PortworxVolumeUtil struct {
 | 
				
			||||||
@@ -60,23 +61,26 @@ func (util *PortworxVolumeUtil) CreateVolume(p *portworxVolumeProvisioner) (stri
 | 
				
			|||||||
	// doesn't support new parameters, the server-side processing will parse it correctly.
 | 
						// doesn't support new parameters, the server-side processing will parse it correctly.
 | 
				
			||||||
	// We still need to call SpecFromOpts() here to handle cases where someone is running Portworx 1.2.8 and lower.
 | 
						// We still need to call SpecFromOpts() here to handle cases where someone is running Portworx 1.2.8 and lower.
 | 
				
			||||||
	specHandler := osdspec.NewSpecHandler()
 | 
						specHandler := osdspec.NewSpecHandler()
 | 
				
			||||||
	spec, _ := specHandler.SpecFromOpts(p.options.Parameters)
 | 
						spec, locator, source, _ := specHandler.SpecFromOpts(p.options.Parameters)
 | 
				
			||||||
	if spec == nil {
 | 
						if spec == nil {
 | 
				
			||||||
		spec = specHandler.DefaultSpec()
 | 
							spec = specHandler.DefaultSpec()
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Pass all parameters as volume labels for Portworx server-side processing.
 | 
						// Pass all parameters as volume labels for Portworx server-side processing.
 | 
				
			||||||
	spec.VolumeLabels = p.options.Parameters
 | 
						spec.VolumeLabels = p.options.Parameters
 | 
				
			||||||
 | 
						// Update the requested size in the spec
 | 
				
			||||||
	spec.Size = uint64(requestGB * 1024 * 1024 * 1024)
 | 
						spec.Size = uint64(requestGB * 1024 * 1024 * 1024)
 | 
				
			||||||
	source := osdapi.Source{}
 | 
						// Change the Portworx Volume name to PV name
 | 
				
			||||||
	locator := osdapi.VolumeLocator{
 | 
						if locator == nil {
 | 
				
			||||||
		Name: p.options.PVName,
 | 
							locator = &osdapi.VolumeLocator{
 | 
				
			||||||
 | 
								VolumeLabels: make(map[string]string),
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						locator.Name = p.options.PVName
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// Add claim Name as a part of Portworx Volume Labels
 | 
						// Add claim Name as a part of Portworx Volume Labels
 | 
				
			||||||
	locator.VolumeLabels = make(map[string]string)
 | 
					 | 
				
			||||||
	locator.VolumeLabels[pvcClaimLabel] = p.options.PVC.Name
 | 
						locator.VolumeLabels[pvcClaimLabel] = p.options.PVC.Name
 | 
				
			||||||
	volumeID, err := driver.Create(&locator, &source, spec)
 | 
						volumeID, err := driver.Create(locator, source, spec)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		glog.Errorf("Error creating Portworx Volume : %v", err)
 | 
							glog.Errorf("Error creating Portworx Volume : %v", err)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -102,14 +106,14 @@ func (util *PortworxVolumeUtil) DeleteVolume(d *portworxVolumeDeleter) error {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// AttachVolume attaches a Portworx Volume
 | 
					// AttachVolume attaches a Portworx Volume
 | 
				
			||||||
func (util *PortworxVolumeUtil) AttachVolume(m *portworxVolumeMounter) (string, error) {
 | 
					func (util *PortworxVolumeUtil) AttachVolume(m *portworxVolumeMounter, attachOptions map[string]string) (string, error) {
 | 
				
			||||||
	driver, err := util.getPortworxDriver(m.plugin.host, true /*localOnly*/)
 | 
						driver, err := util.getPortworxDriver(m.plugin.host, true /*localOnly*/)
 | 
				
			||||||
	if err != nil || driver == nil {
 | 
						if err != nil || driver == nil {
 | 
				
			||||||
		glog.Errorf("Failed to get portworx driver. Err: %v", err)
 | 
							glog.Errorf("Failed to get portworx driver. Err: %v", err)
 | 
				
			||||||
		return "", err
 | 
							return "", err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	devicePath, err := driver.Attach(m.volName)
 | 
						devicePath, err := driver.Attach(m.volName, attachOptions)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		glog.Errorf("Error attaching Portworx Volume (%v): %v", m.volName, err)
 | 
							glog.Errorf("Error attaching Portworx Volume (%v): %v", m.volName, err)
 | 
				
			||||||
		return "", err
 | 
							return "", err
 | 
				
			||||||
@@ -125,7 +129,7 @@ func (util *PortworxVolumeUtil) DetachVolume(u *portworxVolumeUnmounter) error {
 | 
				
			|||||||
		return err
 | 
							return err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	err = driver.Detach(u.volName)
 | 
						err = driver.Detach(u.volName, false /*doNotForceDetach*/)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		glog.Errorf("Error detaching Portworx Volume (%v): %v", u.volName, err)
 | 
							glog.Errorf("Error detaching Portworx Volume (%v): %v", u.volName, err)
 | 
				
			||||||
		return err
 | 
							return err
 | 
				
			||||||
@@ -181,7 +185,7 @@ func isClientValid(client *osdclient.Client) (bool, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
func createDriverClient(hostname string) (*osdclient.Client, error) {
 | 
					func createDriverClient(hostname string) (*osdclient.Client, error) {
 | 
				
			||||||
	client, err := volumeclient.NewDriverClient("http://"+hostname+":"+osdMgmtPort,
 | 
						client, err := volumeclient.NewDriverClient("http://"+hostname+":"+osdMgmtPort,
 | 
				
			||||||
		pxdDriverName, osdDriverVersion)
 | 
							pxdDriverName, osdDriverVersion, pxDriverName)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								vendor/BUILD
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/BUILD
									
									
									
									
										vendored
									
									
								
							@@ -260,6 +260,7 @@ filegroup(
 | 
				
			|||||||
        "//vendor/github.com/kr/fs:all-srcs",
 | 
					        "//vendor/github.com/kr/fs:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/kr/pty:all-srcs",
 | 
					        "//vendor/github.com/kr/pty:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/libopenstorage/openstorage/api:all-srcs",
 | 
					        "//vendor/github.com/libopenstorage/openstorage/api:all-srcs",
 | 
				
			||||||
 | 
					        "//vendor/github.com/libopenstorage/openstorage/pkg/parser:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/libopenstorage/openstorage/pkg/units:all-srcs",
 | 
					        "//vendor/github.com/libopenstorage/openstorage/pkg/units:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/libopenstorage/openstorage/volume:all-srcs",
 | 
					        "//vendor/github.com/libopenstorage/openstorage/volume:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/lpabon/godbc:all-srcs",
 | 
					        "//vendor/github.com/lpabon/godbc:all-srcs",
 | 
				
			||||||
@@ -273,6 +274,7 @@ filegroup(
 | 
				
			|||||||
        "//vendor/github.com/mistifyio/go-zfs:all-srcs",
 | 
					        "//vendor/github.com/mistifyio/go-zfs:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/mitchellh/go-wordwrap:all-srcs",
 | 
					        "//vendor/github.com/mitchellh/go-wordwrap:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/mitchellh/mapstructure:all-srcs",
 | 
					        "//vendor/github.com/mitchellh/mapstructure:all-srcs",
 | 
				
			||||||
 | 
					        "//vendor/github.com/mohae/deepcopy:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/mreiferson/go-httpclient:all-srcs",
 | 
					        "//vendor/github.com/mreiferson/go-httpclient:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/mrunalp/fileutils:all-srcs",
 | 
					        "//vendor/github.com/mrunalp/fileutils:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/mvdan/xurls:all-srcs",
 | 
					        "//vendor/github.com/mvdan/xurls:all-srcs",
 | 
				
			||||||
@@ -330,7 +332,6 @@ filegroup(
 | 
				
			|||||||
        "//vendor/github.com/xanzy/go-cloudstack/cloudstack:all-srcs",
 | 
					        "//vendor/github.com/xanzy/go-cloudstack/cloudstack:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/xiang90/probing:all-srcs",
 | 
					        "//vendor/github.com/xiang90/probing:all-srcs",
 | 
				
			||||||
        "//vendor/github.com/xyproto/simpleredis:all-srcs",
 | 
					        "//vendor/github.com/xyproto/simpleredis:all-srcs",
 | 
				
			||||||
        "//vendor/go.pedge.io/pb/go/google/protobuf:all-srcs",
 | 
					 | 
				
			||||||
        "//vendor/go4.org/errorutil:all-srcs",
 | 
					        "//vendor/go4.org/errorutil:all-srcs",
 | 
				
			||||||
        "//vendor/golang.org/x/crypto/bcrypt:all-srcs",
 | 
					        "//vendor/golang.org/x/crypto/bcrypt:all-srcs",
 | 
				
			||||||
        "//vendor/golang.org/x/crypto/blowfish:all-srcs",
 | 
					        "//vendor/golang.org/x/crypto/blowfish:all-srcs",
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										3
									
								
								vendor/github.com/libopenstorage/openstorage/api/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/github.com/libopenstorage/openstorage/api/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -10,7 +10,8 @@ go_library(
 | 
				
			|||||||
    visibility = ["//visibility:public"],
 | 
					    visibility = ["//visibility:public"],
 | 
				
			||||||
    deps = [
 | 
					    deps = [
 | 
				
			||||||
        "//vendor/github.com/golang/protobuf/proto:go_default_library",
 | 
					        "//vendor/github.com/golang/protobuf/proto:go_default_library",
 | 
				
			||||||
        "//vendor/go.pedge.io/pb/go/google/protobuf:go_default_library",
 | 
					        "//vendor/github.com/golang/protobuf/ptypes/timestamp:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/github.com/mohae/deepcopy:go_default_library",
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										79
									
								
								vendor/github.com/libopenstorage/openstorage/api/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										79
									
								
								vendor/github.com/libopenstorage/openstorage/api/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,79 @@
 | 
				
			|||||||
 | 
					# OpenStorage API usage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Any storage product that uses the openstorage API can be managed via this API.  Below are some examples of using this API.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Enumerate nodes in a cluster
 | 
				
			||||||
 | 
					```go
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
					    ...
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    "github.com/libopenstorage/gossip/types"
 | 
				
			||||||
 | 
					    "github.com/libopenstorage/openstorage/api"
 | 
				
			||||||
 | 
					    "github.com/libopenstorage/openstorage/api/client/cluster"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type myapp struct {
 | 
				
			||||||
 | 
					    manager cluster.Cluster
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *myapp) init() {
 | 
				
			||||||
 | 
					    // Choose the default version.
 | 
				
			||||||
 | 
					    // Leave the host blank to use the local UNIX socket, or pass in an IP and a port at which the server is listening on.
 | 
				
			||||||
 | 
					    clnt, err := cluster.NewClusterClient("", cluster.APIVersion)
 | 
				
			||||||
 | 
					    if err != nil {
 | 
				
			||||||
 | 
					        fmt.Printf("Failed to initialize client library: %v\n", err)
 | 
				
			||||||
 | 
					        os.Exit(1)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    c.manager = cluster.ClusterManager(clnt)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *myapp) listNodes() {
 | 
				
			||||||
 | 
					    cluster, err := c.manager.Enumerate()
 | 
				
			||||||
 | 
					    if err != nil {
 | 
				
			||||||
 | 
					        cmdError(context, fn, err)
 | 
				
			||||||
 | 
					        return
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    // cluster is now a hashmap of nodes... do something useful with it:
 | 
				
			||||||
 | 
					    for _, n := range cluster.Nodes {
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					     }
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					### Inspect a volume in a cluster
 | 
				
			||||||
 | 
					```go
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
					    ...
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    "github.com/libopenstorage/openstorage/api"
 | 
				
			||||||
 | 
					    volumeclient "github.com/libopenstorage/openstorage/api/client/volume"
 | 
				
			||||||
 | 
					    "github.com/libopenstorage/openstorage/volume"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type myapp struct {
 | 
				
			||||||
 | 
					    volDriver volume.VolumeDriver
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *myapp) init() {
 | 
				
			||||||
 | 
					    // Choose the default version.
 | 
				
			||||||
 | 
					    // Leave the host blank to use the local UNIX socket, or pass in an IP and a port at which the server is listening on.
 | 
				
			||||||
 | 
					    clnt, err := volumeclient.NewDriverClient("", v.name, volume.APIVersion)
 | 
				
			||||||
 | 
					    if err != nil {
 | 
				
			||||||
 | 
					        fmt.Printf("Failed to initialize client library: %v\n", err)
 | 
				
			||||||
 | 
					        os.Exit(1)
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    v.volDriver = volumeclient.VolumeDriver(clnt)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (c *myapp) inspect(id string) {
 | 
				
			||||||
 | 
					    stats, err := v.volDriver.Stats(id, true)
 | 
				
			||||||
 | 
					    if err != nil {
 | 
				
			||||||
 | 
					        return
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    // stats is an object that has various volume properties and statistics.
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
							
								
								
									
										191
									
								
								vendor/github.com/libopenstorage/openstorage/api/api.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										191
									
								
								vendor/github.com/libopenstorage/openstorage/api/api.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -2,26 +2,44 @@ package api
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
						"math"
 | 
				
			||||||
	"strconv"
 | 
						"strconv"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						"github.com/mohae/deepcopy"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Strings for VolumeSpec
 | 
					// Strings for VolumeSpec
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	Name                 = "name"
 | 
						Name                     = "name"
 | 
				
			||||||
	SpecEphemeral        = "ephemeral"
 | 
						SpecNodes                = "nodes"
 | 
				
			||||||
	SpecShared           = "shared"
 | 
						SpecParent               = "parent"
 | 
				
			||||||
	SpecSize             = "size"
 | 
						SpecEphemeral            = "ephemeral"
 | 
				
			||||||
	SpecScale            = "scale"
 | 
						SpecShared               = "shared"
 | 
				
			||||||
	SpecFilesystem       = "fs"
 | 
						SpecSticky               = "sticky"
 | 
				
			||||||
	SpecBlockSize        = "block_size"
 | 
						SpecSecure               = "secure"
 | 
				
			||||||
	SpecHaLevel          = "repl"
 | 
						SpecCompressed           = "compressed"
 | 
				
			||||||
	SpecPriority         = "io_priority"
 | 
						SpecSize                 = "size"
 | 
				
			||||||
	SpecSnapshotInterval = "snap_interval"
 | 
						SpecScale                = "scale"
 | 
				
			||||||
	SpecAggregationLevel = "aggregation_level"
 | 
						SpecFilesystem           = "fs"
 | 
				
			||||||
	SpecDedupe           = "dedupe"
 | 
						SpecBlockSize            = "block_size"
 | 
				
			||||||
	SpecPassphrase       = "passphrase"
 | 
						SpecHaLevel              = "repl"
 | 
				
			||||||
 | 
						SpecPriority             = "io_priority"
 | 
				
			||||||
 | 
						SpecSnapshotInterval     = "snap_interval"
 | 
				
			||||||
 | 
						SpecSnapshotSchedule     = "snap_schedule"
 | 
				
			||||||
 | 
						SpecAggregationLevel     = "aggregation_level"
 | 
				
			||||||
 | 
						SpecDedupe               = "dedupe"
 | 
				
			||||||
 | 
						SpecPassphrase           = "secret_key"
 | 
				
			||||||
 | 
						SpecAutoAggregationValue = "auto"
 | 
				
			||||||
 | 
						SpecGroup                = "group"
 | 
				
			||||||
 | 
						SpecGroupEnforce         = "fg"
 | 
				
			||||||
 | 
						SpecZones                = "zones"
 | 
				
			||||||
 | 
						SpecRacks                = "racks"
 | 
				
			||||||
 | 
						SpecRegions              = "regions"
 | 
				
			||||||
 | 
						SpecLabels               = "labels"
 | 
				
			||||||
 | 
						SpecPriorityAlias        = "priority_io"
 | 
				
			||||||
 | 
						SpecIoProfile            = "io_profile"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// OptionKey specifies a set of recognized query params.
 | 
					// OptionKey specifies a set of recognized query params.
 | 
				
			||||||
@@ -30,6 +48,8 @@ const (
 | 
				
			|||||||
	OptName = "Name"
 | 
						OptName = "Name"
 | 
				
			||||||
	// OptVolumeID query parameter used to lookup volume by ID.
 | 
						// OptVolumeID query parameter used to lookup volume by ID.
 | 
				
			||||||
	OptVolumeID = "VolumeID"
 | 
						OptVolumeID = "VolumeID"
 | 
				
			||||||
 | 
						// OptSnapID query parameter used to lookup snapshot by ID.
 | 
				
			||||||
 | 
						OptSnapID = "SnapID"
 | 
				
			||||||
	// OptLabel query parameter used to lookup volume by set of labels.
 | 
						// OptLabel query parameter used to lookup volume by set of labels.
 | 
				
			||||||
	OptLabel = "Label"
 | 
						OptLabel = "Label"
 | 
				
			||||||
	// OptConfigLabel query parameter used to lookup volume by set of labels.
 | 
						// OptConfigLabel query parameter used to lookup volume by set of labels.
 | 
				
			||||||
@@ -40,9 +60,16 @@ const (
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Api client-server Constants
 | 
					// Api client-server Constants
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	OsdVolumePath = "osd-volumes"
 | 
						OsdVolumePath   = "osd-volumes"
 | 
				
			||||||
	OsdSnapshotPath = "osd-snapshot"
 | 
						OsdSnapshotPath = "osd-snapshot"
 | 
				
			||||||
 | 
						TimeLayout      = "Jan 2 15:04:05 UTC 2006"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const (
 | 
				
			||||||
 | 
						// AutoAggregation value indicates driver to select aggregation level.
 | 
				
			||||||
 | 
						AutoAggregation = math.MaxUint32
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Node describes the state of a node.
 | 
					// Node describes the state of a node.
 | 
				
			||||||
// It includes the current physical state (CPU, memory, storage, network usage) as
 | 
					// It includes the current physical state (CPU, memory, storage, network usage) as
 | 
				
			||||||
// well as the containers running on the system.
 | 
					// well as the containers running on the system.
 | 
				
			||||||
@@ -56,6 +83,7 @@ type Node struct {
 | 
				
			|||||||
	Status    Status
 | 
						Status    Status
 | 
				
			||||||
	GenNumber uint64
 | 
						GenNumber uint64
 | 
				
			||||||
	Disks     map[string]StorageResource
 | 
						Disks     map[string]StorageResource
 | 
				
			||||||
 | 
						Pools     []StoragePool
 | 
				
			||||||
	MgmtIp    string
 | 
						MgmtIp    string
 | 
				
			||||||
	DataIp    string
 | 
						DataIp    string
 | 
				
			||||||
	Timestamp time.Time
 | 
						Timestamp time.Time
 | 
				
			||||||
@@ -66,6 +94,17 @@ type Node struct {
 | 
				
			|||||||
	NodeLabels map[string]string
 | 
						NodeLabels map[string]string
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type FluentDConfig struct {
 | 
				
			||||||
 | 
						IP   string `json:"ip"`
 | 
				
			||||||
 | 
						Port string `json:"port"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type TunnelConfig struct {
 | 
				
			||||||
 | 
						Key      string `json:"key"`
 | 
				
			||||||
 | 
						Cert     string `json:"cert"`
 | 
				
			||||||
 | 
						Endpoint string `json:"tunnel_endpoint"`
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Cluster represents the state of the cluster.
 | 
					// Cluster represents the state of the cluster.
 | 
				
			||||||
type Cluster struct {
 | 
					type Cluster struct {
 | 
				
			||||||
	Status Status
 | 
						Status Status
 | 
				
			||||||
@@ -79,6 +118,18 @@ type Cluster struct {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
	// Nodes is an array of all the nodes in the cluster.
 | 
						// Nodes is an array of all the nodes in the cluster.
 | 
				
			||||||
	Nodes []Node
 | 
						Nodes []Node
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Logging url for the cluster.
 | 
				
			||||||
 | 
						LoggingURL string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Management url for the cluster
 | 
				
			||||||
 | 
						ManagementURL string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// FluentD Host for the cluster
 | 
				
			||||||
 | 
						FluentDConfig FluentDConfig
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// TunnelConfig for the cluster [key, cert, endpoint]
 | 
				
			||||||
 | 
						TunnelConfig TunnelConfig
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// StatPoint represents the basic structure of a single Stat reported
 | 
					// StatPoint represents the basic structure of a single Stat reported
 | 
				
			||||||
@@ -95,69 +146,97 @@ type StatPoint struct {
 | 
				
			|||||||
	Timestamp int64
 | 
						Timestamp int64
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// DriverTypeSimpleValueOf returns the string format of DriverType
 | 
				
			||||||
func DriverTypeSimpleValueOf(s string) (DriverType, error) {
 | 
					func DriverTypeSimpleValueOf(s string) (DriverType, error) {
 | 
				
			||||||
	obj, err := simpleValueOf("driver_type", DriverType_value, s)
 | 
						obj, err := simpleValueOf("driver_type", DriverType_value, s)
 | 
				
			||||||
	return DriverType(obj), err
 | 
						return DriverType(obj), err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SimpleString returns the string format of DriverType
 | 
				
			||||||
func (x DriverType) SimpleString() string {
 | 
					func (x DriverType) SimpleString() string {
 | 
				
			||||||
	return simpleString("driver_type", DriverType_name, int32(x))
 | 
						return simpleString("driver_type", DriverType_name, int32(x))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FSTypeSimpleValueOf returns the string format of FSType
 | 
				
			||||||
func FSTypeSimpleValueOf(s string) (FSType, error) {
 | 
					func FSTypeSimpleValueOf(s string) (FSType, error) {
 | 
				
			||||||
	obj, err := simpleValueOf("fs_type", FSType_value, s)
 | 
						obj, err := simpleValueOf("fs_type", FSType_value, s)
 | 
				
			||||||
	return FSType(obj), err
 | 
						return FSType(obj), err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SimpleString returns the string format of DriverType
 | 
				
			||||||
func (x FSType) SimpleString() string {
 | 
					func (x FSType) SimpleString() string {
 | 
				
			||||||
	return simpleString("fs_type", FSType_name, int32(x))
 | 
						return simpleString("fs_type", FSType_name, int32(x))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// CosTypeSimpleValueOf returns the string format of CosType
 | 
				
			||||||
func CosTypeSimpleValueOf(s string) (CosType, error) {
 | 
					func CosTypeSimpleValueOf(s string) (CosType, error) {
 | 
				
			||||||
	obj, err := simpleValueOf("cos_type", CosType_value, s)
 | 
						obj, exists := CosType_value[strings.ToUpper(s)]
 | 
				
			||||||
	return CosType(obj), err
 | 
						if !exists {
 | 
				
			||||||
 | 
							return -1, fmt.Errorf("Invalid cos value: %s", s)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return CosType(obj), nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SimpleString returns the string format of CosType
 | 
				
			||||||
func (x CosType) SimpleString() string {
 | 
					func (x CosType) SimpleString() string {
 | 
				
			||||||
	return simpleString("cos_type", CosType_name, int32(x))
 | 
						return simpleString("cos_type", CosType_name, int32(x))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// GraphDriverChangeTypeSimpleValueOf returns the string format of GraphDriverChangeType
 | 
				
			||||||
func GraphDriverChangeTypeSimpleValueOf(s string) (GraphDriverChangeType, error) {
 | 
					func GraphDriverChangeTypeSimpleValueOf(s string) (GraphDriverChangeType, error) {
 | 
				
			||||||
	obj, err := simpleValueOf("graph_driver_change_type", GraphDriverChangeType_value, s)
 | 
						obj, err := simpleValueOf("graph_driver_change_type", GraphDriverChangeType_value, s)
 | 
				
			||||||
	return GraphDriverChangeType(obj), err
 | 
						return GraphDriverChangeType(obj), err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SimpleString returns the string format of GraphDriverChangeType
 | 
				
			||||||
func (x GraphDriverChangeType) SimpleString() string {
 | 
					func (x GraphDriverChangeType) SimpleString() string {
 | 
				
			||||||
	return simpleString("graph_driver_change_type", GraphDriverChangeType_name, int32(x))
 | 
						return simpleString("graph_driver_change_type", GraphDriverChangeType_name, int32(x))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// VolumeActionParamSimpleValueOf returns the string format of VolumeAction
 | 
				
			||||||
func VolumeActionParamSimpleValueOf(s string) (VolumeActionParam, error) {
 | 
					func VolumeActionParamSimpleValueOf(s string) (VolumeActionParam, error) {
 | 
				
			||||||
	obj, err := simpleValueOf("volume_action_param", VolumeActionParam_value, s)
 | 
						obj, err := simpleValueOf("volume_action_param", VolumeActionParam_value, s)
 | 
				
			||||||
	return VolumeActionParam(obj), err
 | 
						return VolumeActionParam(obj), err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SimpleString returns the string format of VolumeAction
 | 
				
			||||||
func (x VolumeActionParam) SimpleString() string {
 | 
					func (x VolumeActionParam) SimpleString() string {
 | 
				
			||||||
	return simpleString("volume_action_param", VolumeActionParam_name, int32(x))
 | 
						return simpleString("volume_action_param", VolumeActionParam_name, int32(x))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// VolumeStateSimpleValueOf returns the string format of VolumeState
 | 
				
			||||||
func VolumeStateSimpleValueOf(s string) (VolumeState, error) {
 | 
					func VolumeStateSimpleValueOf(s string) (VolumeState, error) {
 | 
				
			||||||
	obj, err := simpleValueOf("volume_state", VolumeState_value, s)
 | 
						obj, err := simpleValueOf("volume_state", VolumeState_value, s)
 | 
				
			||||||
	return VolumeState(obj), err
 | 
						return VolumeState(obj), err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SimpleString returns the string format of VolumeState
 | 
				
			||||||
func (x VolumeState) SimpleString() string {
 | 
					func (x VolumeState) SimpleString() string {
 | 
				
			||||||
	return simpleString("volume_state", VolumeState_name, int32(x))
 | 
						return simpleString("volume_state", VolumeState_name, int32(x))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// VolumeStatusSimpleValueOf returns the string format of VolumeStatus
 | 
				
			||||||
func VolumeStatusSimpleValueOf(s string) (VolumeStatus, error) {
 | 
					func VolumeStatusSimpleValueOf(s string) (VolumeStatus, error) {
 | 
				
			||||||
	obj, err := simpleValueOf("volume_status", VolumeStatus_value, s)
 | 
						obj, err := simpleValueOf("volume_status", VolumeStatus_value, s)
 | 
				
			||||||
	return VolumeStatus(obj), err
 | 
						return VolumeStatus(obj), err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SimpleString returns the string format of VolumeStatus
 | 
				
			||||||
func (x VolumeStatus) SimpleString() string {
 | 
					func (x VolumeStatus) SimpleString() string {
 | 
				
			||||||
	return simpleString("volume_status", VolumeStatus_name, int32(x))
 | 
						return simpleString("volume_status", VolumeStatus_name, int32(x))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// IoProfileSimpleValueOf returns the string format of IoProfile
 | 
				
			||||||
 | 
					func IoProfileSimpleValueOf(s string) (IoProfile, error) {
 | 
				
			||||||
 | 
						obj, err := simpleValueOf("io_profile", IoProfile_value, s)
 | 
				
			||||||
 | 
						return IoProfile(obj), err
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SimpleString returns the string format of IoProfile
 | 
				
			||||||
 | 
					func (x IoProfile) SimpleString() string {
 | 
				
			||||||
 | 
						return simpleString("io_profile", IoProfile_name, int32(x))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func simpleValueOf(typeString string, valueMap map[string]int32, s string) (int32, error) {
 | 
					func simpleValueOf(typeString string, valueMap map[string]int32, s string) (int32, error) {
 | 
				
			||||||
	obj, ok := valueMap[strings.ToUpper(fmt.Sprintf("%s_%s", typeString, s))]
 | 
						obj, ok := valueMap[strings.ToUpper(fmt.Sprintf("%s_%s", typeString, s))]
 | 
				
			||||||
	if !ok {
 | 
						if !ok {
 | 
				
			||||||
@@ -178,6 +257,7 @@ func toSec(ms uint64) uint64 {
 | 
				
			|||||||
	return ms / 1000
 | 
						return ms / 1000
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// WriteThroughput returns the write throughput
 | 
				
			||||||
func (v *Stats) WriteThroughput() uint64 {
 | 
					func (v *Stats) WriteThroughput() uint64 {
 | 
				
			||||||
	if v.IntervalMs == 0 {
 | 
						if v.IntervalMs == 0 {
 | 
				
			||||||
		return 0
 | 
							return 0
 | 
				
			||||||
@@ -185,6 +265,7 @@ func (v *Stats) WriteThroughput() uint64 {
 | 
				
			|||||||
	return (v.WriteBytes) / toSec(v.IntervalMs)
 | 
						return (v.WriteBytes) / toSec(v.IntervalMs)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// ReadThroughput returns the read throughput
 | 
				
			||||||
func (v *Stats) ReadThroughput() uint64 {
 | 
					func (v *Stats) ReadThroughput() uint64 {
 | 
				
			||||||
	if v.IntervalMs == 0 {
 | 
						if v.IntervalMs == 0 {
 | 
				
			||||||
		return 0
 | 
							return 0
 | 
				
			||||||
@@ -192,17 +273,93 @@ func (v *Stats) ReadThroughput() uint64 {
 | 
				
			|||||||
	return (v.ReadBytes) / toSec(v.IntervalMs)
 | 
						return (v.ReadBytes) / toSec(v.IntervalMs)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Latency returns latency
 | 
				
			||||||
func (v *Stats) Latency() uint64 {
 | 
					func (v *Stats) Latency() uint64 {
 | 
				
			||||||
	ops := v.Writes + v.Reads
 | 
						ops := v.Writes + v.Reads
 | 
				
			||||||
	if ops == 0 {
 | 
						if ops == 0 {
 | 
				
			||||||
		return 0
 | 
							return 0
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return (uint64)((v.IoMs * 1000) / (v.Writes + v.Reads))
 | 
						return (uint64)((v.IoMs * 1000) / ops)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Read latency returns avg. time required for read operation to complete
 | 
				
			||||||
 | 
					func (v *Stats) ReadLatency() uint64 {
 | 
				
			||||||
 | 
						if v.Reads == 0 {
 | 
				
			||||||
 | 
							return 0
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return (uint64)((v.ReadMs * 1000) / v.Reads)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Write latency returns avg. time required for write operation to complete
 | 
				
			||||||
 | 
					func (v *Stats) WriteLatency() uint64 {
 | 
				
			||||||
 | 
						if v.Writes == 0 {
 | 
				
			||||||
 | 
							return 0
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return (uint64)((v.WriteMs * 1000) / v.Writes)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Iops returns iops
 | 
				
			||||||
func (v *Stats) Iops() uint64 {
 | 
					func (v *Stats) Iops() uint64 {
 | 
				
			||||||
	if v.IntervalMs == 0 {
 | 
						if v.IntervalMs == 0 {
 | 
				
			||||||
		return 0
 | 
							return 0
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return (v.Writes + v.Reads) / toSec(v.IntervalMs)
 | 
						return (v.Writes + v.Reads) / toSec(v.IntervalMs)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Scaled returns true if the volume is scaled.
 | 
				
			||||||
 | 
					func (v *Volume) Scaled() bool {
 | 
				
			||||||
 | 
						return v.Spec.Scale > 1
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Contains returns true if mid is a member of volume's replication set.
 | 
				
			||||||
 | 
					func (m *Volume) Contains(mid string) bool {
 | 
				
			||||||
 | 
						rsets := m.GetReplicaSets()
 | 
				
			||||||
 | 
						for _, rset := range rsets {
 | 
				
			||||||
 | 
							for _, node := range rset.Nodes {
 | 
				
			||||||
 | 
								if node == mid {
 | 
				
			||||||
 | 
									return true
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return false
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Copy makes a deep copy of VolumeSpec
 | 
				
			||||||
 | 
					func (s *VolumeSpec) Copy() *VolumeSpec {
 | 
				
			||||||
 | 
						spec := *s
 | 
				
			||||||
 | 
						if s.VolumeLabels != nil {
 | 
				
			||||||
 | 
							spec.VolumeLabels = make(map[string]string)
 | 
				
			||||||
 | 
							for k, v := range s.VolumeLabels {
 | 
				
			||||||
 | 
								spec.VolumeLabels[k] = v
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if s.ReplicaSet != nil {
 | 
				
			||||||
 | 
							spec.ReplicaSet = &ReplicaSet{Nodes: make([]string, len(s.ReplicaSet.Nodes))}
 | 
				
			||||||
 | 
							copy(spec.ReplicaSet.Nodes, s.ReplicaSet.Nodes)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return &spec
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Copy makes a deep copy of Node
 | 
				
			||||||
 | 
					func (s *Node) Copy() *Node {
 | 
				
			||||||
 | 
						localCopy := deepcopy.Copy(*s)
 | 
				
			||||||
 | 
						nodeCopy := localCopy.(Node)
 | 
				
			||||||
 | 
						return &nodeCopy
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (v Volume) IsClone() bool {
 | 
				
			||||||
 | 
						return v.Source != nil && len(v.Source.Parent) != 0 && !v.Readonly
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (v Volume) IsSnapshot() bool {
 | 
				
			||||||
 | 
						return v.Source != nil && len(v.Source.Parent) != 0 && v.Readonly
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (v Volume) DisplayId() string {
 | 
				
			||||||
 | 
						if v.Locator != nil {
 | 
				
			||||||
 | 
							return fmt.Sprintf("%s (%s)", v.Locator.Name, v.Id)
 | 
				
			||||||
 | 
						} else {
 | 
				
			||||||
 | 
							return v.Id
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return ""
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										856
									
								
								vendor/github.com/libopenstorage/openstorage/api/api.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										856
									
								
								vendor/github.com/libopenstorage/openstorage/api/api.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
							
								
								
									
										183
									
								
								vendor/github.com/libopenstorage/openstorage/api/api.proto
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										183
									
								
								vendor/github.com/libopenstorage/openstorage/api/api.proto
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -90,6 +90,13 @@ enum CosType {
 | 
				
			|||||||
  HIGH = 3;
 | 
					  HIGH = 3;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					enum IoProfile {
 | 
				
			||||||
 | 
					  IO_PROFILE_SEQUENTIAL = 0;
 | 
				
			||||||
 | 
					  IO_PROFILE_RANDOM= 1;
 | 
				
			||||||
 | 
					  IO_PROFILE_DB = 2;
 | 
				
			||||||
 | 
					  IO_PROFILE_DB_REMOTE = 3;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// VolumeState represents the state of a volume.
 | 
					// VolumeState represents the state of a volume.
 | 
				
			||||||
enum VolumeState {
 | 
					enum VolumeState {
 | 
				
			||||||
  VOLUME_STATE_NONE = 0;
 | 
					  VOLUME_STATE_NONE = 0;
 | 
				
			||||||
@@ -108,6 +115,10 @@ enum VolumeState {
 | 
				
			|||||||
  // Volume is deleted, it will remain in this state
 | 
					  // Volume is deleted, it will remain in this state
 | 
				
			||||||
  // while resources are asynchronously reclaimed
 | 
					  // while resources are asynchronously reclaimed
 | 
				
			||||||
  VOLUME_STATE_DELETED = 7;
 | 
					  VOLUME_STATE_DELETED = 7;
 | 
				
			||||||
 | 
					  // Volume is trying to be detached
 | 
				
			||||||
 | 
					  VOLUME_STATE_TRY_DETACHING = 8;
 | 
				
			||||||
 | 
					  // Volume is undergoing restore
 | 
				
			||||||
 | 
					  VOLUME_STATE_RESTORE = 9;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// VolumeStatus represents a health status for a volume.
 | 
					// VolumeStatus represents a health status for a volume.
 | 
				
			||||||
@@ -138,6 +149,15 @@ enum ClusterNotify {
 | 
				
			|||||||
 CLUSTER_NOTIFY_DOWN = 0;
 | 
					 CLUSTER_NOTIFY_DOWN = 0;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					enum AttachState {
 | 
				
			||||||
 | 
					    // Attached and available externally
 | 
				
			||||||
 | 
					    ATTACH_STATE_EXTERNAL = 0;
 | 
				
			||||||
 | 
					    // Attached but only available internally
 | 
				
			||||||
 | 
					    ATTACH_STATE_INTERNAL = 1;
 | 
				
			||||||
 | 
					    // Switching from External to Internal
 | 
				
			||||||
 | 
					    ATTACH_STATE_INTERNAL_SWITCH = 2;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// StorageResource groups properties of a storage device.
 | 
					// StorageResource groups properties of a storage device.
 | 
				
			||||||
message StorageResource {
 | 
					message StorageResource {
 | 
				
			||||||
  // Id is the LUN identifier.
 | 
					  // Id is the LUN identifier.
 | 
				
			||||||
@@ -166,6 +186,24 @@ message StorageResource {
 | 
				
			|||||||
  google.protobuf.Timestamp last_scan = 12;
 | 
					  google.protobuf.Timestamp last_scan = 12;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// StoragePool groups different storage devices based on their CosType
 | 
				
			||||||
 | 
					message StoragePool {
 | 
				
			||||||
 | 
					  // ID pool ID
 | 
				
			||||||
 | 
					  int32 ID = 1;
 | 
				
			||||||
 | 
					  // Cos reflects the capabilities of this drive pool
 | 
				
			||||||
 | 
					  CosType Cos = 2;
 | 
				
			||||||
 | 
					  // Medium underlying storage type
 | 
				
			||||||
 | 
					  StorageMedium Medium = 3;
 | 
				
			||||||
 | 
					  // RaidLevel storage raid level
 | 
				
			||||||
 | 
					  string RaidLevel = 4;
 | 
				
			||||||
 | 
					  // TotalSize of the pool
 | 
				
			||||||
 | 
					  uint64 TotalSize = 7;
 | 
				
			||||||
 | 
					  // Used size of the pool
 | 
				
			||||||
 | 
					  uint64 Used = 8;
 | 
				
			||||||
 | 
					  // Labels is a list of user defined name-value pairs
 | 
				
			||||||
 | 
					  map<string, string> labels = 9;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// VolumeLocator is a structure that is attached to a volume
 | 
					// VolumeLocator is a structure that is attached to a volume
 | 
				
			||||||
// and is used to carry opaque metadata.
 | 
					// and is used to carry opaque metadata.
 | 
				
			||||||
message VolumeLocator {
 | 
					message VolumeLocator {
 | 
				
			||||||
@@ -183,89 +221,115 @@ message Source {
 | 
				
			|||||||
  string seed = 2;
 | 
					  string seed = 2;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					message Group {
 | 
				
			||||||
 | 
					  // Id common identifier across volumes that have the same group.
 | 
				
			||||||
 | 
					  string id = 1;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// VolumeSpec has the properties needed to create a volume.
 | 
					// VolumeSpec has the properties needed to create a volume.
 | 
				
			||||||
message VolumeSpec {
 | 
					message VolumeSpec {
 | 
				
			||||||
  // Ephemeral storage
 | 
					  // Ephemeral storage
 | 
				
			||||||
  bool ephemeral = 1;
 | 
					  bool ephemeral = 1;
 | 
				
			||||||
  // Thin provisioned volume size in bytes
 | 
					  // Size specifies the thin provisioned volume size.
 | 
				
			||||||
  uint64 size = 2;
 | 
					  uint64 size = 2;
 | 
				
			||||||
  // Format disk with this FSType
 | 
					  // Format specifies the filesystem for this volume.
 | 
				
			||||||
  FSType format = 3;
 | 
					  FSType format = 3;
 | 
				
			||||||
  // Block size for filesystem
 | 
					  // BlockSize for the filesystem.
 | 
				
			||||||
  int64 block_size = 4;
 | 
					  int64 block_size = 4;
 | 
				
			||||||
  // Specifies the number of nodes that are
 | 
					  // HaLevel specifies the number of copies of data.
 | 
				
			||||||
  // allowed to fail, and yet data is available
 | 
					 | 
				
			||||||
  // A value of 0 implies that data is not erasure coded,
 | 
					 | 
				
			||||||
  // a failure of a node will lead to data loss
 | 
					 | 
				
			||||||
  int64 ha_level = 5;
 | 
					  int64 ha_level = 5;
 | 
				
			||||||
  // The COS, 1 to 9
 | 
					  // Cos specifies the relative class of service.
 | 
				
			||||||
  CosType cos = 6;
 | 
					  CosType cos = 6;
 | 
				
			||||||
  // Perform dedupe on this disk
 | 
					  // IoProfile provides a hint about application using this volume.
 | 
				
			||||||
  bool dedupe = 7;
 | 
					  IoProfile io_profile = 7;
 | 
				
			||||||
 | 
					  // Dedupe specifies if the volume data is to be de-duplicated.
 | 
				
			||||||
 | 
					  bool dedupe = 8;
 | 
				
			||||||
  // SnapshotInterval in minutes, set to 0 to disable snapshots
 | 
					  // SnapshotInterval in minutes, set to 0 to disable snapshots
 | 
				
			||||||
  uint32 snapshot_interval = 8;
 | 
					  uint32 snapshot_interval = 9;
 | 
				
			||||||
  // Volume configuration labels
 | 
					  // VolumeLabels configuration labels
 | 
				
			||||||
  map<string, string> volume_labels = 9;
 | 
					  map<string, string> volume_labels = 10;
 | 
				
			||||||
  // Shared is true if this volume can be remotely accessed.
 | 
					  // Shared is true if this volume can be remotely accessed.
 | 
				
			||||||
  bool shared = 10;
 | 
					  bool shared = 11;
 | 
				
			||||||
  // ReplicaSet is the desired replicaSet the volume want to be placed.
 | 
					  // ReplicaSet is the desired set of nodes for the volume data.
 | 
				
			||||||
  ReplicaSet replica_set = 11;
 | 
					  ReplicaSet replica_set = 12;
 | 
				
			||||||
  // Specifies the number of parts the volume can be aggregated from.
 | 
					  // Aggregatiokn level Specifies the number of parts the volume can be aggregated from.
 | 
				
			||||||
  uint32 aggregation_level = 12;
 | 
					  uint32 aggregation_level = 13;
 | 
				
			||||||
  // Encrypted is true if this volume will be cryptographically secured.
 | 
					  // Encrypted is true if this volume will be cryptographically secured.
 | 
				
			||||||
  bool encrypted = 13;
 | 
					  bool encrypted = 14;
 | 
				
			||||||
  // User passphrase if this is an encrypted volume
 | 
					  // Passphrase for an encrypted volume
 | 
				
			||||||
  string passphrase = 14;
 | 
					  string passphrase = 15;
 | 
				
			||||||
  // SnapshotSchedule 
 | 
					  // SnapshotSchedule a well known string that specifies when snapshots should be taken. 
 | 
				
			||||||
  string snapshot_schedule = 15;
 | 
					  string snapshot_schedule = 16;
 | 
				
			||||||
  // Scale allows autocreation of volumes.
 | 
					  // Scale allows autocreation of volumes.
 | 
				
			||||||
  uint32 scale = 16;
 | 
					  uint32 scale = 17;
 | 
				
			||||||
 | 
					  // Sticky volumes cannot be deleted until the flag is removed.
 | 
				
			||||||
 | 
					  bool sticky = 18;
 | 
				
			||||||
 | 
					  // Group identifies a consistency group
 | 
				
			||||||
 | 
					  Group group = 21;
 | 
				
			||||||
 | 
					  // GroupEnforced is true if consistency group creation is enforced.
 | 
				
			||||||
 | 
					  bool group_enforced = 22;
 | 
				
			||||||
 | 
					  // Compressed is true if this volume is to be compressed.
 | 
				
			||||||
 | 
					  bool compressed = 23;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Set of machine IDs (nodes) to which part of this volume is erasure coded - for clustered storage arrays
 | 
					// ReplicaSet set of machine IDs (nodes) to which part of this volume is erasure 
 | 
				
			||||||
 | 
					// coded - for clustered storage arrays
 | 
				
			||||||
message ReplicaSet {
 | 
					message ReplicaSet {
 | 
				
			||||||
  repeated string nodes = 1;
 | 
					  repeated string nodes = 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 // List of name value mapping of driver specific runtime information.
 | 
					// RuntimeStateMap is a list of name value mapping of driver specific runtime 
 | 
				
			||||||
 | 
					// information.
 | 
				
			||||||
message RuntimeStateMap {
 | 
					message RuntimeStateMap {
 | 
				
			||||||
  map<string, string> runtime_state = 1;
 | 
					  map<string, string> runtime_state = 1;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Volume represents a live, created volume.
 | 
					// Volume represents an abstract storage volume.
 | 
				
			||||||
 | 
					// Volume represents an abstract storage volume.
 | 
				
			||||||
message Volume {
 | 
					message Volume {
 | 
				
			||||||
  // Self referential volume ID
 | 
					  // Self referential volume ID.
 | 
				
			||||||
  string id = 1;
 | 
					  string id = 1;
 | 
				
			||||||
 | 
					  // Source specified seed data for the volume.
 | 
				
			||||||
  Source source = 2;
 | 
					  Source source = 2;
 | 
				
			||||||
  bool readonly = 3;
 | 
					  // Group volumes in the same group have the same group id.
 | 
				
			||||||
 | 
					  Group group = 3;
 | 
				
			||||||
 | 
					  // Readonly is true if this volume is to be mounted with readonly access.
 | 
				
			||||||
 | 
					  bool readonly = 4;
 | 
				
			||||||
  // User specified locator
 | 
					  // User specified locator
 | 
				
			||||||
  VolumeLocator locator = 4;
 | 
					  VolumeLocator locator = 5;
 | 
				
			||||||
  // Volume creation time
 | 
					  // Volume creation time
 | 
				
			||||||
  google.protobuf.Timestamp ctime = 5;
 | 
					  google.protobuf.Timestamp ctime = 6;
 | 
				
			||||||
  // User specified VolumeSpec
 | 
					  // User specified VolumeSpec
 | 
				
			||||||
  VolumeSpec spec = 6;
 | 
					  VolumeSpec spec = 7;
 | 
				
			||||||
  // Volume usage
 | 
					  // Usage is bytes consumed by vtheis volume.
 | 
				
			||||||
  uint64 usage = 7;
 | 
					  uint64 usage = 8;
 | 
				
			||||||
  // Time when an integrity check for run
 | 
					  // LastScan is the time when an integrity check was run.
 | 
				
			||||||
  google.protobuf.Timestamp last_scan = 8;
 | 
					  google.protobuf.Timestamp last_scan = 9;
 | 
				
			||||||
  // Format FSType type if any
 | 
					  // Format specifies the filesytem for this volume.
 | 
				
			||||||
  FSType format = 9;
 | 
					  FSType format = 10;
 | 
				
			||||||
  VolumeStatus status = 10;
 | 
					  // Status is the availability status of this volume.
 | 
				
			||||||
  VolumeState state = 11;
 | 
					  VolumeStatus status = 11;
 | 
				
			||||||
  // Machine ID (node) on which this volume is attached
 | 
					  // State is the current runtime state of this volume.
 | 
				
			||||||
  // Machine ID is a node instance identifier for clustered systems.
 | 
					  VolumeState state = 12;
 | 
				
			||||||
  string attached_on = 12;
 | 
					  // AttachedOn is the node instance identifier for clustered systems.
 | 
				
			||||||
  string device_path = 14;
 | 
					  string attached_on = 13;
 | 
				
			||||||
  repeated string attach_path = 15;
 | 
					  // AttachedState shows whether the device is attached for internal or external use.
 | 
				
			||||||
  // List of ReplicaSets which provide storage for this volume, for clustered storage arrays
 | 
					  AttachState attached_state = 14;
 | 
				
			||||||
  repeated ReplicaSet  replica_sets = 16;
 | 
					  // DevicePath is the device exported by block device implementations.
 | 
				
			||||||
  // Last recorded error
 | 
					  string device_path = 15;
 | 
				
			||||||
  string error = 17;
 | 
					  // SecureDevicePath is the device path for an encrypted volume.
 | 
				
			||||||
  // List of name value mapping of driver specific runtime information.
 | 
					  string secure_device_path = 16;
 | 
				
			||||||
  repeated RuntimeStateMap runtime_state = 18;
 | 
					  // AttachPath is the mounted path in the host namespace.
 | 
				
			||||||
  string secure_device_path = 19;
 | 
					  repeated string attach_path = 17;
 | 
				
			||||||
  // BackgroundProcessing is true if volume is attached but not by the user
 | 
					  // AttachInfo is a list of name value mappings that provides attach information.
 | 
				
			||||||
  bool background_processing = 20;
 | 
					  map<string, string> attach_info = 18;
 | 
				
			||||||
 | 
					  // ReplicatSets storage for this volumefor clustered storage arrays.
 | 
				
			||||||
 | 
					  repeated ReplicaSet replica_sets = 19;
 | 
				
			||||||
 | 
					  // RuntimeState is a lst of name value mapping of driver specific runtime 
 | 
				
			||||||
 | 
					  // information.
 | 
				
			||||||
 | 
					  repeated RuntimeStateMap runtime_state = 20;
 | 
				
			||||||
 | 
					  // Error is the Last recorded error.
 | 
				
			||||||
 | 
					  string error = 21;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
message Stats {
 | 
					message Stats {
 | 
				
			||||||
@@ -308,6 +372,8 @@ message Alert {
 | 
				
			|||||||
  bool cleared = 8;
 | 
					  bool cleared = 8;
 | 
				
			||||||
  // TTL in seconds for this Alert
 | 
					  // TTL in seconds for this Alert
 | 
				
			||||||
  uint64 ttl = 9;
 | 
					  uint64 ttl = 9;
 | 
				
			||||||
 | 
					  // UniqueTag helps identify a unique alert for a given resouce
 | 
				
			||||||
 | 
					  string unique_tag = 10;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
message Alerts {
 | 
					message Alerts {
 | 
				
			||||||
@@ -339,9 +405,13 @@ message VolumeStateAction {
 | 
				
			|||||||
  VolumeActionParam attach = 1;
 | 
					  VolumeActionParam attach = 1;
 | 
				
			||||||
  // Mount or unmount volume
 | 
					  // Mount or unmount volume
 | 
				
			||||||
  VolumeActionParam mount = 2;
 | 
					  VolumeActionParam mount = 2;
 | 
				
			||||||
 | 
					  // MountPath Path where the device is mounted
 | 
				
			||||||
  string mount_path = 3;
 | 
					  string mount_path = 3;
 | 
				
			||||||
  // Device path returned in attach
 | 
					  // DevicePath Path returned in attach
 | 
				
			||||||
  string device_path = 4;
 | 
					  string device_path = 4;
 | 
				
			||||||
 | 
					  // UnmountBeforeDetach is used to check whether unmount should be done before
 | 
				
			||||||
 | 
					  // a detach
 | 
				
			||||||
 | 
					  bool unmount_before_detach = 5;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
message VolumeSetRequest {
 | 
					message VolumeSetRequest {
 | 
				
			||||||
@@ -351,6 +421,9 @@ message VolumeSetRequest {
 | 
				
			|||||||
  VolumeSpec spec = 2;
 | 
					  VolumeSpec spec = 2;
 | 
				
			||||||
  // State modification on this volume.
 | 
					  // State modification on this volume.
 | 
				
			||||||
  VolumeStateAction action = 3;
 | 
					  VolumeStateAction action = 3;
 | 
				
			||||||
 | 
					  // additional options
 | 
				
			||||||
 | 
					  // required for the Set operation.
 | 
				
			||||||
 | 
					  map<string, string> options = 4;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
message VolumeSetResponse {
 | 
					message VolumeSetResponse {
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										101
									
								
								vendor/github.com/libopenstorage/openstorage/api/client/client.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										101
									
								
								vendor/github.com/libopenstorage/openstorage/api/client/client.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -16,7 +16,7 @@ var (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// NewClient returns a new REST client for specified server.
 | 
					// NewClient returns a new REST client for specified server.
 | 
				
			||||||
func NewClient(host string, version string) (*Client, error) {
 | 
					func NewClient(host, version, userAgent string) (*Client, error) {
 | 
				
			||||||
	baseURL, err := url.Parse(host)
 | 
						baseURL, err := url.Parse(host)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return nil, err
 | 
							return nil, err
 | 
				
			||||||
@@ -25,14 +25,48 @@ func NewClient(host string, version string) (*Client, error) {
 | 
				
			|||||||
		baseURL.Path = "/"
 | 
							baseURL.Path = "/"
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	unix2HTTP(baseURL)
 | 
						unix2HTTP(baseURL)
 | 
				
			||||||
 | 
						hClient := getHTTPClient(host)
 | 
				
			||||||
 | 
						if hClient == nil {
 | 
				
			||||||
 | 
							return nil, fmt.Errorf("Unable to parse provided url: %v", host)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	c := &Client{
 | 
						c := &Client{
 | 
				
			||||||
		base:       baseURL,
 | 
							base:        baseURL,
 | 
				
			||||||
		version:    version,
 | 
							version:     version,
 | 
				
			||||||
		httpClient: getHttpClient(host),
 | 
							httpClient:  hClient,
 | 
				
			||||||
 | 
							authstring:  "",
 | 
				
			||||||
 | 
							accesstoken: "",
 | 
				
			||||||
 | 
							userAgent:   fmt.Sprintf("%v/%v", userAgent, version),
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return c, nil
 | 
						return c, nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewAuthClient returns a new REST client for specified server.
 | 
				
			||||||
 | 
					func NewAuthClient(host, version, authstring, accesstoken, userAgent string) (*Client, error) {
 | 
				
			||||||
 | 
						baseURL, err := url.Parse(host)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return nil, err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if baseURL.Path == "" {
 | 
				
			||||||
 | 
							baseURL.Path = "/"
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						unix2HTTP(baseURL)
 | 
				
			||||||
 | 
						hClient := getHTTPClient(host)
 | 
				
			||||||
 | 
						if hClient == nil {
 | 
				
			||||||
 | 
							return nil, fmt.Errorf("Unable to parse provided url: %v", host)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						c := &Client{
 | 
				
			||||||
 | 
							base:        baseURL,
 | 
				
			||||||
 | 
							version:     version,
 | 
				
			||||||
 | 
							httpClient:  hClient,
 | 
				
			||||||
 | 
							authstring:  authstring,
 | 
				
			||||||
 | 
							accesstoken: accesstoken,
 | 
				
			||||||
 | 
							userAgent:   fmt.Sprintf("%v/%v", userAgent, version),
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return c, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// GetUnixServerPath returns a unix domain socket prepended with the
 | 
				
			||||||
 | 
					// provided path.
 | 
				
			||||||
func GetUnixServerPath(socketName string, paths ...string) string {
 | 
					func GetUnixServerPath(socketName string, paths ...string) string {
 | 
				
			||||||
	serverPath := "unix://"
 | 
						serverPath := "unix://"
 | 
				
			||||||
	for _, path := range paths {
 | 
						for _, path := range paths {
 | 
				
			||||||
@@ -42,13 +76,15 @@ func GetUnixServerPath(socketName string, paths ...string) string {
 | 
				
			|||||||
	return serverPath
 | 
						return serverPath
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
// Client is an HTTP REST wrapper. Use one of Get/Post/Put/Delete to get a request
 | 
					// Client is an HTTP REST wrapper. Use one of Get/Post/Put/Delete to get a request
 | 
				
			||||||
// object.
 | 
					// object.
 | 
				
			||||||
type Client struct {
 | 
					type Client struct {
 | 
				
			||||||
	base       *url.URL
 | 
						base        *url.URL
 | 
				
			||||||
	version    string
 | 
						version     string
 | 
				
			||||||
	httpClient *http.Client
 | 
						httpClient  *http.Client
 | 
				
			||||||
 | 
						authstring  string
 | 
				
			||||||
 | 
						accesstoken string
 | 
				
			||||||
 | 
						userAgent   string
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Status sends a Status request at the /status REST endpoint.
 | 
					// Status sends a Status request at the /status REST endpoint.
 | 
				
			||||||
@@ -58,7 +94,7 @@ func (c *Client) Status() (*Status, error) {
 | 
				
			|||||||
	return status, err
 | 
						return status, err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Version send a request at the /versions REST endpoint.
 | 
					// Versions send a request at the /versions REST endpoint.
 | 
				
			||||||
func (c *Client) Versions(endpoint string) ([]string, error) {
 | 
					func (c *Client) Versions(endpoint string) ([]string, error) {
 | 
				
			||||||
	versions := []string{}
 | 
						versions := []string{}
 | 
				
			||||||
	err := c.Get().Resource(endpoint + "/versions").Do().Unmarshal(&versions)
 | 
						err := c.Get().Resource(endpoint + "/versions").Do().Unmarshal(&versions)
 | 
				
			||||||
@@ -67,22 +103,22 @@ func (c *Client) Versions(endpoint string) ([]string, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Get returns a Request object setup for GET call.
 | 
					// Get returns a Request object setup for GET call.
 | 
				
			||||||
func (c *Client) Get() *Request {
 | 
					func (c *Client) Get() *Request {
 | 
				
			||||||
	return NewRequest(c.httpClient, c.base, "GET", c.version)
 | 
						return NewRequest(c.httpClient, c.base, "GET", c.version, c.authstring, c.userAgent)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Post returns a Request object setup for POST call.
 | 
					// Post returns a Request object setup for POST call.
 | 
				
			||||||
func (c *Client) Post() *Request {
 | 
					func (c *Client) Post() *Request {
 | 
				
			||||||
	return NewRequest(c.httpClient, c.base, "POST", c.version)
 | 
						return NewRequest(c.httpClient, c.base, "POST", c.version, c.authstring, c.userAgent)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Put returns a Request object setup for PUT call.
 | 
					// Put returns a Request object setup for PUT call.
 | 
				
			||||||
func (c *Client) Put() *Request {
 | 
					func (c *Client) Put() *Request {
 | 
				
			||||||
	return NewRequest(c.httpClient, c.base, "PUT", c.version)
 | 
						return NewRequest(c.httpClient, c.base, "PUT", c.version, c.authstring, c.userAgent)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Put returns a Request object setup for DELETE call.
 | 
					// Delete returns a Request object setup for DELETE call.
 | 
				
			||||||
func (c *Client) Delete() *Request {
 | 
					func (c *Client) Delete() *Request {
 | 
				
			||||||
	return NewRequest(c.httpClient, c.base, "DELETE", c.version)
 | 
						return NewRequest(c.httpClient, c.base, "DELETE", c.version, c.authstring, c.userAgent)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func unix2HTTP(u *url.URL) {
 | 
					func unix2HTTP(u *url.URL) {
 | 
				
			||||||
@@ -94,7 +130,12 @@ func unix2HTTP(u *url.URL) {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func newHTTPClient(u *url.URL, tlsConfig *tls.Config, timeout time.Duration) *http.Client {
 | 
					func newHTTPClient(
 | 
				
			||||||
 | 
						u *url.URL,
 | 
				
			||||||
 | 
						tlsConfig *tls.Config,
 | 
				
			||||||
 | 
						timeout time.Duration,
 | 
				
			||||||
 | 
						responseTimeout time.Duration,
 | 
				
			||||||
 | 
					) *http.Client {
 | 
				
			||||||
	httpTransport := &http.Transport{
 | 
						httpTransport := &http.Transport{
 | 
				
			||||||
		TLSClientConfig: tlsConfig,
 | 
							TLSClientConfig: tlsConfig,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -114,28 +155,24 @@ func newHTTPClient(u *url.URL, tlsConfig *tls.Config, timeout time.Duration) *ht
 | 
				
			|||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return &http.Client{Transport: httpTransport}
 | 
						return &http.Client{Transport: httpTransport, Timeout: responseTimeout}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func getHttpClient(host string) *http.Client {
 | 
					func getHTTPClient(host string) *http.Client {
 | 
				
			||||||
 | 
						cacheLock.Lock()
 | 
				
			||||||
 | 
						defer cacheLock.Unlock()
 | 
				
			||||||
	c, ok := httpCache[host]
 | 
						c, ok := httpCache[host]
 | 
				
			||||||
	if !ok {
 | 
						if !ok {
 | 
				
			||||||
		cacheLock.Lock()
 | 
							u, err := url.Parse(host)
 | 
				
			||||||
		defer cacheLock.Unlock()
 | 
							if err != nil {
 | 
				
			||||||
		c, ok = httpCache[host]
 | 
								return nil
 | 
				
			||||||
		if !ok {
 | 
					 | 
				
			||||||
			u, err := url.Parse(host)
 | 
					 | 
				
			||||||
			if err != nil {
 | 
					 | 
				
			||||||
				// TODO(pedge): clean up
 | 
					 | 
				
			||||||
				fmt.Println("Failed to parse into url", host)
 | 
					 | 
				
			||||||
				return nil
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			if u.Path == "" {
 | 
					 | 
				
			||||||
				u.Path = "/"
 | 
					 | 
				
			||||||
			}
 | 
					 | 
				
			||||||
			c = newHTTPClient(u, nil, 10*time.Second)
 | 
					 | 
				
			||||||
			httpCache[host] = c
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							if u.Path == "" {
 | 
				
			||||||
 | 
								u.Path = "/"
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							c = newHTTPClient(u, nil, 10*time.Second, 5*time.Minute)
 | 
				
			||||||
 | 
							httpCache[host] = c
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return c
 | 
						return c
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										36
									
								
								vendor/github.com/libopenstorage/openstorage/api/client/request.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										36
									
								
								vendor/github.com/libopenstorage/openstorage/api/client/request.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -11,6 +11,7 @@ import (
 | 
				
			|||||||
	"strconv"
 | 
						"strconv"
 | 
				
			||||||
	"strings"
 | 
						"strings"
 | 
				
			||||||
	"time"
 | 
						"time"
 | 
				
			||||||
 | 
						"math/rand"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Request is contructed iteratively by the client and finally dispatched.
 | 
					// Request is contructed iteratively by the client and finally dispatched.
 | 
				
			||||||
@@ -31,6 +32,8 @@ type Request struct {
 | 
				
			|||||||
	req      *http.Request
 | 
						req      *http.Request
 | 
				
			||||||
	resp     *http.Response
 | 
						resp     *http.Response
 | 
				
			||||||
	timeout  time.Duration
 | 
						timeout  time.Duration
 | 
				
			||||||
 | 
						authstring string
 | 
				
			||||||
 | 
						accesstoken string
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Response is a representation of HTTP response received from the server.
 | 
					// Response is a representation of HTTP response received from the server.
 | 
				
			||||||
@@ -48,14 +51,17 @@ type Status struct {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// NewRequest instance
 | 
					// NewRequest instance
 | 
				
			||||||
func NewRequest(client *http.Client, base *url.URL, verb string, version string) *Request {
 | 
					func NewRequest(client *http.Client, base *url.URL, verb string, version string, authstring, userAgent string) *Request {
 | 
				
			||||||
	return &Request{
 | 
						r := &Request{
 | 
				
			||||||
		client:  client,
 | 
							client:  client,
 | 
				
			||||||
		verb:    verb,
 | 
							verb:    verb,
 | 
				
			||||||
		base:    base,
 | 
							base:    base,
 | 
				
			||||||
		path:    base.Path,
 | 
							path:    base.Path,
 | 
				
			||||||
		version: version,
 | 
							version: version,
 | 
				
			||||||
 | 
							authstring: authstring,
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						r.SetHeader("User-Agent", userAgent)
 | 
				
			||||||
 | 
						return r
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func checkExists(mustExist string, before string) error {
 | 
					func checkExists(mustExist string, before string) error {
 | 
				
			||||||
@@ -251,8 +257,19 @@ func (r *Request) Do() *Response {
 | 
				
			|||||||
	if r.headers == nil {
 | 
						if r.headers == nil {
 | 
				
			||||||
		r.headers = http.Header{}
 | 
							r.headers = http.Header{}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	req.Header = r.headers
 | 
						req.Header = r.headers
 | 
				
			||||||
	req.Header.Set("Content-Type", "application/json")
 | 
						req.Header.Set("Content-Type", "application/json")
 | 
				
			||||||
 | 
						req.Header.Set("Date", time.Now().String())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if len(r.authstring) > 0 {
 | 
				
			||||||
 | 
							req.Header.Set("Authorization", "Basic "+ r.authstring)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if len(r.accesstoken) > 0 {
 | 
				
			||||||
 | 
							req.Header.Set("Access-Token", r.accesstoken)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	resp, err = r.client.Do(req)
 | 
						resp, err = r.client.Do(req)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return &Response{err: err}
 | 
							return &Response{err: err}
 | 
				
			||||||
@@ -295,10 +312,21 @@ func (r Response) Error() error {
 | 
				
			|||||||
	return r.err
 | 
						return r.err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// FormatError formats the error
 | 
				
			||||||
func (r Response) FormatError() error {
 | 
					func (r Response) FormatError() error {
 | 
				
			||||||
	if len(r.body) == 0 {
 | 
						if len(r.body) == 0 {
 | 
				
			||||||
		return fmt.Errorf("Error: %v", r.err)
 | 
							return fmt.Errorf("Error: %v", r.err)
 | 
				
			||||||
	} else {
 | 
					 | 
				
			||||||
		return fmt.Errorf("HTTP-%d: %s", r.statusCode, string(r.body))
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						return fmt.Errorf("HTTP-%d: %s", r.statusCode, string(r.body))
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func digest(method string, path string) string {
 | 
				
			||||||
 | 
						now := time.Now().String()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						s1 := rand.NewSource(time.Now().UnixNano())
 | 
				
			||||||
 | 
						r1 := rand.New(s1)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						nonce := r1.Intn(10)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return method + "+" + path + "+" + now + "+" + strconv.Itoa(nonce)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										44
									
								
								vendor/github.com/libopenstorage/openstorage/api/client/volume/client.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										44
									
								
								vendor/github.com/libopenstorage/openstorage/api/client/volume/client.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -195,6 +195,21 @@ func (v *volumeClient) Snapshot(volumeID string, readonly bool,
 | 
				
			|||||||
	return "", nil
 | 
						return "", nil
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Restore specified volume to given snapshot state
 | 
				
			||||||
 | 
					func (v *volumeClient) Restore(volumeID string, snapID string) error {
 | 
				
			||||||
 | 
						response := &api.VolumeResponse{}
 | 
				
			||||||
 | 
						req := v.c.Post().Resource(snapPath + "/restore").Instance(volumeID)
 | 
				
			||||||
 | 
						req.QueryOption(api.OptSnapID, snapID)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if err := req.Do().Unmarshal(response); err != nil {
 | 
				
			||||||
 | 
							return err
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if response.Error != "" {
 | 
				
			||||||
 | 
							return errors.New(response.Error)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Stats for specified volume.
 | 
					// Stats for specified volume.
 | 
				
			||||||
// Errors ErrEnoEnt may be returned
 | 
					// Errors ErrEnoEnt may be returned
 | 
				
			||||||
func (v *volumeClient) Stats(
 | 
					func (v *volumeClient) Stats(
 | 
				
			||||||
@@ -205,21 +220,20 @@ func (v *volumeClient) Stats(
 | 
				
			|||||||
	req := v.c.Get().Resource(volumePath + "/stats").Instance(volumeID)
 | 
						req := v.c.Get().Resource(volumePath + "/stats").Instance(volumeID)
 | 
				
			||||||
	req.QueryOption(api.OptCumulative, strconv.FormatBool(cumulative))
 | 
						req.QueryOption(api.OptCumulative, strconv.FormatBool(cumulative))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if err := req.Do().Unmarshal(stats); err != nil {
 | 
						err := req.Do().Unmarshal(stats)
 | 
				
			||||||
		return nil, err
 | 
						return stats, err
 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
	return stats, nil
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Alerts on this volume.
 | 
					// UsedSize returns allocated volume size.
 | 
				
			||||||
// Errors ErrEnoEnt may be returned
 | 
					// Errors ErrEnoEnt may be returned
 | 
				
			||||||
func (v *volumeClient) Alerts(volumeID string) (*api.Alerts, error) {
 | 
					func (v *volumeClient) UsedSize(
 | 
				
			||||||
	alerts := &api.Alerts{}
 | 
						volumeID string,
 | 
				
			||||||
	if err := v.c.Get().Resource(volumePath + "/alerts").Instance(volumeID).Do().Unmarshal(alerts); err != nil {
 | 
					) (uint64, error) {
 | 
				
			||||||
		return nil, err
 | 
						var usedSize uint64
 | 
				
			||||||
	}
 | 
						req := v.c.Get().Resource(volumePath + "/usedsize").Instance(volumeID)
 | 
				
			||||||
	return alerts, nil
 | 
						err := req.Do().Unmarshal(&usedSize)
 | 
				
			||||||
 | 
						return usedSize, err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Active Requests on all volume.
 | 
					// Active Requests on all volume.
 | 
				
			||||||
@@ -289,13 +303,14 @@ func (v *volumeClient) SnapEnumerate(ids []string,
 | 
				
			|||||||
// Attach map device to the host.
 | 
					// Attach map device to the host.
 | 
				
			||||||
// On success the devicePath specifies location where the device is exported
 | 
					// On success the devicePath specifies location where the device is exported
 | 
				
			||||||
// Errors ErrEnoEnt, ErrVolAttached may be returned.
 | 
					// Errors ErrEnoEnt, ErrVolAttached may be returned.
 | 
				
			||||||
func (v *volumeClient) Attach(volumeID string) (string, error) {
 | 
					func (v *volumeClient) Attach(volumeID string, attachOptions map[string]string) (string, error) {
 | 
				
			||||||
	response, err := v.doVolumeSetGetResponse(
 | 
						response, err := v.doVolumeSetGetResponse(
 | 
				
			||||||
		volumeID,
 | 
							volumeID,
 | 
				
			||||||
		&api.VolumeSetRequest{
 | 
							&api.VolumeSetRequest{
 | 
				
			||||||
			Action: &api.VolumeStateAction{
 | 
								Action: &api.VolumeStateAction{
 | 
				
			||||||
				Attach: api.VolumeActionParam_VOLUME_ACTION_PARAM_ON,
 | 
									Attach: api.VolumeActionParam_VOLUME_ACTION_PARAM_ON,
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
 | 
								Options: attachOptions,
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
@@ -313,12 +328,13 @@ func (v *volumeClient) Attach(volumeID string) (string, error) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// Detach device from the host.
 | 
					// Detach device from the host.
 | 
				
			||||||
// Errors ErrEnoEnt, ErrVolDetached may be returned.
 | 
					// Errors ErrEnoEnt, ErrVolDetached may be returned.
 | 
				
			||||||
func (v *volumeClient) Detach(volumeID string) error {
 | 
					func (v *volumeClient) Detach(volumeID string, unmountBeforeDetach bool) error {
 | 
				
			||||||
	return v.doVolumeSet(
 | 
						return v.doVolumeSet(
 | 
				
			||||||
		volumeID,
 | 
							volumeID,
 | 
				
			||||||
		&api.VolumeSetRequest{
 | 
							&api.VolumeSetRequest{
 | 
				
			||||||
			Action: &api.VolumeStateAction{
 | 
								Action: &api.VolumeStateAction{
 | 
				
			||||||
				Attach: api.VolumeActionParam_VOLUME_ACTION_PARAM_OFF,
 | 
									Attach:              api.VolumeActionParam_VOLUME_ACTION_PARAM_OFF,
 | 
				
			||||||
 | 
									UnmountBeforeDetach: unmountBeforeDetach,
 | 
				
			||||||
			},
 | 
								},
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										27
									
								
								vendor/github.com/libopenstorage/openstorage/api/client/volume/volume.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										27
									
								
								vendor/github.com/libopenstorage/openstorage/api/client/volume/volume.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -2,9 +2,9 @@ package volume
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
import (
 | 
					import (
 | 
				
			||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
 | 
						"github.com/libopenstorage/openstorage/api"
 | 
				
			||||||
	"github.com/libopenstorage/openstorage/api/client"
 | 
						"github.com/libopenstorage/openstorage/api/client"
 | 
				
			||||||
	"github.com/libopenstorage/openstorage/volume"
 | 
						"github.com/libopenstorage/openstorage/volume"
 | 
				
			||||||
	"github.com/libopenstorage/openstorage/api"
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// VolumeDriver returns a REST wrapper for the VolumeDriver interface.
 | 
					// VolumeDriver returns a REST wrapper for the VolumeDriver interface.
 | 
				
			||||||
@@ -12,10 +12,10 @@ func VolumeDriver(c *client.Client) volume.VolumeDriver {
 | 
				
			|||||||
	return newVolumeClient(c)
 | 
						return newVolumeClient(c)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// NewDriver returns a new REST client of the supplied version for specified driver.
 | 
					// NewAuthDriverClient returns a new REST client of the supplied version for specified driver.
 | 
				
			||||||
// host: REST endpoint [http://<ip>:<port> OR unix://<path-to-unix-socket>]. default: [unix:///var/lib/osd/<driverName>.sock]
 | 
					// host: REST endpoint [http://<ip>:<port> OR unix://<path-to-unix-socket>]. default: [unix:///var/lib/osd/<driverName>.sock]
 | 
				
			||||||
// version: Volume API version
 | 
					// version: Volume API version
 | 
				
			||||||
func NewDriverClient(host, driverName, version string) (*client.Client, error) {
 | 
					func NewAuthDriverClient(host, driverName, version, authstring, accesstoken, userAgent string) (*client.Client, error) {
 | 
				
			||||||
	if driverName == "" {
 | 
						if driverName == "" {
 | 
				
			||||||
		return nil, fmt.Errorf("Driver Name cannot be empty")
 | 
							return nil, fmt.Errorf("Driver Name cannot be empty")
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -26,7 +26,24 @@ func NewDriverClient(host, driverName, version string) (*client.Client, error) {
 | 
				
			|||||||
		// Set the default version
 | 
							// Set the default version
 | 
				
			||||||
		version = volume.APIVersion
 | 
							version = volume.APIVersion
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return client.NewClient(host, version)
 | 
						return client.NewAuthClient(host, version, authstring, accesstoken, userAgent)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewDriverClient returns a new REST client of the supplied version for specified driver.
 | 
				
			||||||
 | 
					// host: REST endpoint [http://<ip>:<port> OR unix://<path-to-unix-socket>]. default: [unix:///var/lib/osd/<driverName>.sock]
 | 
				
			||||||
 | 
					// version: Volume API version
 | 
				
			||||||
 | 
					func NewDriverClient(host, driverName, version, userAgent string) (*client.Client, error) {
 | 
				
			||||||
 | 
						if driverName == "" {
 | 
				
			||||||
 | 
							return nil, fmt.Errorf("Driver Name cannot be empty")
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if host == "" {
 | 
				
			||||||
 | 
							host = client.GetUnixServerPath(driverName, volume.DriverAPIBase)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if version == "" {
 | 
				
			||||||
 | 
							// Set the default version
 | 
				
			||||||
 | 
							version = volume.APIVersion
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return client.NewClient(host, version, userAgent)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// GetSupportedDriverVersions returns a list of supported versions
 | 
					// GetSupportedDriverVersions returns a list of supported versions
 | 
				
			||||||
@@ -38,7 +55,7 @@ func GetSupportedDriverVersions(driverName, host string) ([]string, error) {
 | 
				
			|||||||
		host = client.GetUnixServerPath(driverName, volume.DriverAPIBase)
 | 
							host = client.GetUnixServerPath(driverName, volume.DriverAPIBase)
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	client, err := client.NewClient(host, "")
 | 
						client, err := client.NewClient(host, "", "")
 | 
				
			||||||
	if err != nil {
 | 
						if err != nil {
 | 
				
			||||||
		return []string{}, err
 | 
							return []string{}, err
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										1
									
								
								vendor/github.com/libopenstorage/openstorage/api/spec/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										1
									
								
								vendor/github.com/libopenstorage/openstorage/api/spec/BUILD
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -6,6 +6,7 @@ go_library(
 | 
				
			|||||||
    visibility = ["//visibility:public"],
 | 
					    visibility = ["//visibility:public"],
 | 
				
			||||||
    deps = [
 | 
					    deps = [
 | 
				
			||||||
        "//vendor/github.com/libopenstorage/openstorage/api:go_default_library",
 | 
					        "//vendor/github.com/libopenstorage/openstorage/api:go_default_library",
 | 
				
			||||||
 | 
					        "//vendor/github.com/libopenstorage/openstorage/pkg/parser:go_default_library",
 | 
				
			||||||
        "//vendor/github.com/libopenstorage/openstorage/pkg/units:go_default_library",
 | 
					        "//vendor/github.com/libopenstorage/openstorage/pkg/units:go_default_library",
 | 
				
			||||||
    ],
 | 
					    ],
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										225
									
								
								vendor/github.com/libopenstorage/openstorage/api/spec/spec_handler.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										225
									
								
								vendor/github.com/libopenstorage/openstorage/api/spec/spec_handler.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -4,8 +4,10 @@ import (
 | 
				
			|||||||
	"fmt"
 | 
						"fmt"
 | 
				
			||||||
	"regexp"
 | 
						"regexp"
 | 
				
			||||||
	"strconv"
 | 
						"strconv"
 | 
				
			||||||
 | 
						"strings"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	"github.com/libopenstorage/openstorage/api"
 | 
						"github.com/libopenstorage/openstorage/api"
 | 
				
			||||||
 | 
						"github.com/libopenstorage/openstorage/pkg/parser"
 | 
				
			||||||
	"github.com/libopenstorage/openstorage/pkg/units"
 | 
						"github.com/libopenstorage/openstorage/pkg/units"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -16,54 +18,92 @@ type SpecHandler interface {
 | 
				
			|||||||
	// If the scheduler was unable to pass in the volume spec via the API,
 | 
						// If the scheduler was unable to pass in the volume spec via the API,
 | 
				
			||||||
	// the spec can be passed in via the name in the format:
 | 
						// the spec can be passed in via the name in the format:
 | 
				
			||||||
	// "key=value;key=value;name=volname"
 | 
						// "key=value;key=value;name=volname"
 | 
				
			||||||
 | 
						// source is populated if key parent=<volume_id> is specified.
 | 
				
			||||||
	// If the spec was parsed, it returns:
 | 
						// If the spec was parsed, it returns:
 | 
				
			||||||
	//  	(true, parsed_spec, parsed_name)
 | 
						//  	(true, parsed_spec, locator, source, parsed_name)
 | 
				
			||||||
	// If the input string didn't contain the string, it returns:
 | 
						// If the input string didn't contain the string, it returns:
 | 
				
			||||||
	// 	(false, DefaultSpec(), inputString)
 | 
						// 	(false, DefaultSpec(), nil, nil, inputString)
 | 
				
			||||||
	SpecFromString(inputString string) (bool, *api.VolumeSpec, string)
 | 
						SpecFromString(inputString string) (
 | 
				
			||||||
 | 
							bool,
 | 
				
			||||||
 | 
							*api.VolumeSpec,
 | 
				
			||||||
 | 
							*api.VolumeLocator,
 | 
				
			||||||
 | 
							*api.Source,
 | 
				
			||||||
 | 
							string,
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	// SpecFromOpts parses in docker options passed in the the docker run
 | 
						// SpecFromOpts parses in docker options passed in the the docker run
 | 
				
			||||||
	// command of the form --opt name=value
 | 
						// command of the form --opt name=value
 | 
				
			||||||
 | 
						// source is populated if --opt parent=<volume_id> is specified.
 | 
				
			||||||
	// If the options are validated then it returns:
 | 
						// If the options are validated then it returns:
 | 
				
			||||||
	// 	(resultant_VolumeSpec, nil)
 | 
						// 	(resultant_VolumeSpec, source, locator, nil)
 | 
				
			||||||
	// If the options have invalid values then it returns:
 | 
						// If the options have invalid values then it returns:
 | 
				
			||||||
	//	(nil, error)
 | 
						//	(nil, nil, nil, error)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						SpecFromOpts(opts map[string]string) (
 | 
				
			||||||
 | 
							*api.VolumeSpec,
 | 
				
			||||||
 | 
							*api.VolumeLocator,
 | 
				
			||||||
 | 
							*api.Source,
 | 
				
			||||||
 | 
							error,
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// UpdateSpecFromOpts parses in volume options passed through the opts map and updates given spec, locator & source
 | 
				
			||||||
 | 
						// If the options are validated then it returns:
 | 
				
			||||||
 | 
						// 	(resultant_VolumeSpec, source, locator, nil)
 | 
				
			||||||
 | 
						// If the options have invalid values then it returns:
 | 
				
			||||||
 | 
						//	(nil, nil, nil, error)
 | 
				
			||||||
 | 
						UpdateSpecFromOpts(opts map[string]string, spec *api.VolumeSpec, locator *api.VolumeLocator, source *api.Source) (
 | 
				
			||||||
 | 
							*api.VolumeSpec,
 | 
				
			||||||
 | 
							*api.VolumeLocator,
 | 
				
			||||||
 | 
							*api.Source,
 | 
				
			||||||
 | 
							error,
 | 
				
			||||||
 | 
						)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	SpecFromOpts(opts map[string]string) (*api.VolumeSpec, error)
 | 
					 | 
				
			||||||
	// Returns a default VolumeSpec if no docker options or string encoding
 | 
						// Returns a default VolumeSpec if no docker options or string encoding
 | 
				
			||||||
	// was provided.
 | 
						// was provided.
 | 
				
			||||||
	DefaultSpec() *api.VolumeSpec
 | 
						DefaultSpec() *api.VolumeSpec
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
	nameRegex       = regexp.MustCompile(api.Name + "=([0-9A-Za-z]+),?")
 | 
						nameRegex       = regexp.MustCompile(api.Name + "=([0-9A-Za-z_-]+),?")
 | 
				
			||||||
 | 
						nodesRegex      = regexp.MustCompile(api.SpecNodes + "=([0-9A-Za-z_-]+),?")
 | 
				
			||||||
	sizeRegex       = regexp.MustCompile(api.SpecSize + "=([0-9A-Za-z]+),?")
 | 
						sizeRegex       = regexp.MustCompile(api.SpecSize + "=([0-9A-Za-z]+),?")
 | 
				
			||||||
	scaleRegex      = regexp.MustCompile(api.SpecScale + "=([0-9A-Za-z]+),?")
 | 
						scaleRegex      = regexp.MustCompile(api.SpecScale + "=([0-9]+),?")
 | 
				
			||||||
	fsRegex         = regexp.MustCompile(api.SpecFilesystem + "=([0-9A-Za-z]+),?")
 | 
						fsRegex         = regexp.MustCompile(api.SpecFilesystem + "=([0-9A-Za-z]+),?")
 | 
				
			||||||
	bsRegex         = regexp.MustCompile(api.SpecBlockSize + "=([0-9]+),?")
 | 
						bsRegex         = regexp.MustCompile(api.SpecBlockSize + "=([0-9]+),?")
 | 
				
			||||||
	haRegex         = regexp.MustCompile(api.SpecHaLevel + "=([0-9]+),?")
 | 
						haRegex         = regexp.MustCompile(api.SpecHaLevel + "=([0-9]+),?")
 | 
				
			||||||
	cosRegex        = regexp.MustCompile(api.SpecPriority + "=([A-Za-z]+),?")
 | 
						cosRegex        = regexp.MustCompile(api.SpecPriority + "=([A-Za-z]+),?")
 | 
				
			||||||
	sharedRegex     = regexp.MustCompile(api.SpecShared + "=([A-Za-z]+),?")
 | 
						sharedRegex     = regexp.MustCompile(api.SpecShared + "=([A-Za-z]+),?")
 | 
				
			||||||
	passphraseRegex = regexp.MustCompile(api.SpecPassphrase + "=([0-9A-Za-z_@./#&+-]+),?")
 | 
						passphraseRegex = regexp.MustCompile(api.SpecPassphrase + "=([0-9A-Za-z_@./#&+-]+),?")
 | 
				
			||||||
 | 
						stickyRegex     = regexp.MustCompile(api.SpecSticky + "=([A-Za-z]+),?")
 | 
				
			||||||
 | 
						secureRegex     = regexp.MustCompile(api.SpecSecure + "=([A-Za-z]+),?")
 | 
				
			||||||
 | 
						zonesRegex      = regexp.MustCompile(api.SpecZones + "=([A-Za-z]+),?")
 | 
				
			||||||
 | 
						racksRegex      = regexp.MustCompile(api.SpecRacks + "=([A-Za-z]+),?")
 | 
				
			||||||
 | 
						aggrRegex       = regexp.MustCompile(api.SpecAggregationLevel + "=([0-9]+|" +
 | 
				
			||||||
 | 
							api.SpecAutoAggregationValue + "),?")
 | 
				
			||||||
 | 
						compressedRegex   = regexp.MustCompile(api.SpecCompressed + "=([A-Za-z]+),?")
 | 
				
			||||||
 | 
						snapScheduleRegex = regexp.MustCompile(api.SpecSnapshotSchedule +
 | 
				
			||||||
 | 
							`=([A-Za-z0-9:;@=#]+),?`)
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type specHandler struct {
 | 
					type specHandler struct {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// NewSpecHandler returns a new SpecHandler interface
 | 
				
			||||||
func NewSpecHandler() SpecHandler {
 | 
					func NewSpecHandler() SpecHandler {
 | 
				
			||||||
	return &specHandler{}
 | 
						return &specHandler{}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (d *specHandler) cosLevel(cos string) (uint32, error) {
 | 
					func (d *specHandler) cosLevel(cos string) (api.CosType, error) {
 | 
				
			||||||
 | 
						cos = strings.ToLower(cos)
 | 
				
			||||||
	switch cos {
 | 
						switch cos {
 | 
				
			||||||
	case "high", "3":
 | 
						case "high", "3":
 | 
				
			||||||
		return uint32(api.CosType_HIGH), nil
 | 
							return api.CosType_HIGH, nil
 | 
				
			||||||
	case "medium", "2":
 | 
						case "medium", "2":
 | 
				
			||||||
		return uint32(api.CosType_MEDIUM), nil
 | 
							return api.CosType_MEDIUM, nil
 | 
				
			||||||
	case "low", "1", "":
 | 
						case "low", "1", "":
 | 
				
			||||||
		return uint32(api.CosType_LOW), nil
 | 
							return api.CosType_LOW, nil
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return uint32(api.CosType_LOW),
 | 
						return api.CosType_NONE,
 | 
				
			||||||
		fmt.Errorf("Cos must be one of %q | %q | %q", "high", "medium", "low")
 | 
							fmt.Errorf("Cos must be one of %q | %q | %q", "high", "medium", "low")
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -91,30 +131,58 @@ func (d *specHandler) DefaultSpec() *api.VolumeSpec {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (d *specHandler) SpecFromOpts(
 | 
					func (d *specHandler) UpdateSpecFromOpts(opts map[string]string, spec *api.VolumeSpec, locator *api.VolumeLocator,
 | 
				
			||||||
	opts map[string]string,
 | 
						source *api.Source) (*api.VolumeSpec, *api.VolumeLocator, *api.Source, error) {
 | 
				
			||||||
) (*api.VolumeSpec, error) {
 | 
						nodeList := make([]string, 0)
 | 
				
			||||||
	spec := d.DefaultSpec()
 | 
					
 | 
				
			||||||
 | 
						if spec == nil {
 | 
				
			||||||
 | 
							spec = d.DefaultSpec()
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if source == nil {
 | 
				
			||||||
 | 
							source = &api.Source{}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if locator == nil {
 | 
				
			||||||
 | 
							locator = &api.VolumeLocator{
 | 
				
			||||||
 | 
								VolumeLabels: make(map[string]string),
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	for k, v := range opts {
 | 
						for k, v := range opts {
 | 
				
			||||||
		switch k {
 | 
							switch k {
 | 
				
			||||||
 | 
							case api.SpecNodes:
 | 
				
			||||||
 | 
								inputNodes := strings.Split(v, ",")
 | 
				
			||||||
 | 
								for _, node := range inputNodes {
 | 
				
			||||||
 | 
									if len(node) != 0 {
 | 
				
			||||||
 | 
										nodeList = append(nodeList, node)
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								spec.ReplicaSet = &api.ReplicaSet{Nodes: nodeList}
 | 
				
			||||||
 | 
							case api.SpecParent:
 | 
				
			||||||
 | 
								source.Parent = v
 | 
				
			||||||
		case api.SpecEphemeral:
 | 
							case api.SpecEphemeral:
 | 
				
			||||||
			spec.Ephemeral, _ = strconv.ParseBool(v)
 | 
								spec.Ephemeral, _ = strconv.ParseBool(v)
 | 
				
			||||||
		case api.SpecSize:
 | 
							case api.SpecSize:
 | 
				
			||||||
			if size, err := units.Parse(v); err != nil {
 | 
								if size, err := units.Parse(v); err != nil {
 | 
				
			||||||
				return nil, err
 | 
									return nil, nil, nil, err
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				spec.Size = uint64(size)
 | 
									spec.Size = uint64(size)
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
							case api.SpecScale:
 | 
				
			||||||
 | 
								if scale, err := strconv.ParseUint(v, 10, 64); err == nil {
 | 
				
			||||||
 | 
									spec.Scale = uint32(scale)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		case api.SpecFilesystem:
 | 
							case api.SpecFilesystem:
 | 
				
			||||||
			if value, err := api.FSTypeSimpleValueOf(v); err != nil {
 | 
								if value, err := api.FSTypeSimpleValueOf(v); err != nil {
 | 
				
			||||||
				return nil, err
 | 
									return nil, nil, nil, err
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				spec.Format = value
 | 
									spec.Format = value
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		case api.SpecBlockSize:
 | 
							case api.SpecBlockSize:
 | 
				
			||||||
			if blockSize, err := units.Parse(v); err != nil {
 | 
								if blockSize, err := units.Parse(v); err != nil {
 | 
				
			||||||
				return nil, err
 | 
									return nil, nil, nil, err
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				spec.BlockSize = blockSize
 | 
									spec.BlockSize = blockSize
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
@@ -122,39 +190,108 @@ func (d *specHandler) SpecFromOpts(
 | 
				
			|||||||
			haLevel, _ := strconv.ParseInt(v, 10, 64)
 | 
								haLevel, _ := strconv.ParseInt(v, 10, 64)
 | 
				
			||||||
			spec.HaLevel = haLevel
 | 
								spec.HaLevel = haLevel
 | 
				
			||||||
		case api.SpecPriority:
 | 
							case api.SpecPriority:
 | 
				
			||||||
			cos, _ := api.CosTypeSimpleValueOf(v)
 | 
								cos, err := d.cosLevel(v)
 | 
				
			||||||
 | 
								if err != nil {
 | 
				
			||||||
 | 
									return nil, nil, nil, err
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								spec.Cos = cos
 | 
				
			||||||
 | 
							case api.SpecPriorityAlias:
 | 
				
			||||||
 | 
								cos, err := d.cosLevel(v)
 | 
				
			||||||
 | 
								if err != nil {
 | 
				
			||||||
 | 
									return nil, nil, nil, err
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
			spec.Cos = cos
 | 
								spec.Cos = cos
 | 
				
			||||||
		case api.SpecDedupe:
 | 
							case api.SpecDedupe:
 | 
				
			||||||
			spec.Dedupe, _ = strconv.ParseBool(v)
 | 
								spec.Dedupe, _ = strconv.ParseBool(v)
 | 
				
			||||||
		case api.SpecSnapshotInterval:
 | 
							case api.SpecSnapshotInterval:
 | 
				
			||||||
			snapshotInterval, _ := strconv.ParseUint(v, 10, 32)
 | 
								snapshotInterval, _ := strconv.ParseUint(v, 10, 32)
 | 
				
			||||||
			spec.SnapshotInterval = uint32(snapshotInterval)
 | 
								spec.SnapshotInterval = uint32(snapshotInterval)
 | 
				
			||||||
 | 
							case api.SpecSnapshotSchedule:
 | 
				
			||||||
 | 
								spec.SnapshotSchedule = v
 | 
				
			||||||
		case api.SpecAggregationLevel:
 | 
							case api.SpecAggregationLevel:
 | 
				
			||||||
			aggregationLevel, _ := strconv.ParseUint(v, 10, 32)
 | 
								if v == api.SpecAutoAggregationValue {
 | 
				
			||||||
			spec.AggregationLevel = uint32(aggregationLevel)
 | 
									spec.AggregationLevel = api.AutoAggregation
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									aggregationLevel, _ := strconv.ParseUint(v, 10, 32)
 | 
				
			||||||
 | 
									spec.AggregationLevel = uint32(aggregationLevel)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		case api.SpecShared:
 | 
							case api.SpecShared:
 | 
				
			||||||
			if shared, err := strconv.ParseBool(v); err != nil {
 | 
								if shared, err := strconv.ParseBool(v); err != nil {
 | 
				
			||||||
				return nil, err
 | 
									return nil, nil, nil, err
 | 
				
			||||||
			} else {
 | 
								} else {
 | 
				
			||||||
				spec.Shared = shared
 | 
									spec.Shared = shared
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
 | 
							case api.SpecSticky:
 | 
				
			||||||
 | 
								if sticky, err := strconv.ParseBool(v); err != nil {
 | 
				
			||||||
 | 
									return nil, nil, nil, err
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									spec.Sticky = sticky
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							case api.SpecSecure:
 | 
				
			||||||
 | 
								if secure, err := strconv.ParseBool(v); err != nil {
 | 
				
			||||||
 | 
									return nil, nil, nil, err
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									spec.Encrypted = secure
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		case api.SpecPassphrase:
 | 
							case api.SpecPassphrase:
 | 
				
			||||||
			spec.Encrypted = true
 | 
								spec.Encrypted = true
 | 
				
			||||||
			spec.Passphrase = v
 | 
								spec.Passphrase = v
 | 
				
			||||||
 | 
							case api.SpecGroup:
 | 
				
			||||||
 | 
								spec.Group = &api.Group{Id: v}
 | 
				
			||||||
 | 
							case api.SpecGroupEnforce:
 | 
				
			||||||
 | 
								if groupEnforced, err := strconv.ParseBool(v); err != nil {
 | 
				
			||||||
 | 
									return nil, nil, nil, err
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									spec.GroupEnforced = groupEnforced
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							case api.SpecZones, api.SpecRacks:
 | 
				
			||||||
 | 
								locator.VolumeLabels[k] = v
 | 
				
			||||||
 | 
							case api.SpecCompressed:
 | 
				
			||||||
 | 
								if compressed, err := strconv.ParseBool(v); err != nil {
 | 
				
			||||||
 | 
									return nil, nil, nil, err
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									spec.Compressed = compressed
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							case api.SpecLabels:
 | 
				
			||||||
 | 
								if labels, err := parser.LabelsFromString(v); err != nil {
 | 
				
			||||||
 | 
									return nil, nil, nil, err
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									for k, v := range labels {
 | 
				
			||||||
 | 
										locator.VolumeLabels[k] = v
 | 
				
			||||||
 | 
									}
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
							case api.SpecIoProfile:
 | 
				
			||||||
 | 
								if ioProfile, err := api.IoProfileSimpleValueOf(v); err != nil {
 | 
				
			||||||
 | 
									return nil, nil, nil, err
 | 
				
			||||||
 | 
								} else {
 | 
				
			||||||
 | 
									spec.IoProfile = ioProfile
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
		default:
 | 
							default:
 | 
				
			||||||
			spec.VolumeLabels[k] = v
 | 
								spec.VolumeLabels[k] = v
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return spec, nil
 | 
						return spec, locator, source, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (d *specHandler) SpecFromOpts(
 | 
				
			||||||
 | 
						opts map[string]string,
 | 
				
			||||||
 | 
					) (*api.VolumeSpec, *api.VolumeLocator, *api.Source, error) {
 | 
				
			||||||
 | 
						source := &api.Source{}
 | 
				
			||||||
 | 
						locator := &api.VolumeLocator{
 | 
				
			||||||
 | 
							VolumeLabels: make(map[string]string),
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						spec := d.DefaultSpec()
 | 
				
			||||||
 | 
						return d.UpdateSpecFromOpts(opts, spec, locator, source)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (d *specHandler) SpecFromString(
 | 
					func (d *specHandler) SpecFromString(
 | 
				
			||||||
	str string,
 | 
						str string,
 | 
				
			||||||
) (bool, *api.VolumeSpec, string) {
 | 
					) (bool, *api.VolumeSpec, *api.VolumeLocator, *api.Source, string) {
 | 
				
			||||||
	// If we can't parse the name, the rest of the spec is invalid.
 | 
						// If we can't parse the name, the rest of the spec is invalid.
 | 
				
			||||||
	ok, name := d.getVal(nameRegex, str)
 | 
						ok, name := d.getVal(nameRegex, str)
 | 
				
			||||||
	if !ok {
 | 
						if !ok {
 | 
				
			||||||
		return false, d.DefaultSpec(), str
 | 
							return false, d.DefaultSpec(), nil, nil, str
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	opts := make(map[string]string)
 | 
						opts := make(map[string]string)
 | 
				
			||||||
@@ -162,6 +299,9 @@ func (d *specHandler) SpecFromString(
 | 
				
			|||||||
	if ok, sz := d.getVal(sizeRegex, str); ok {
 | 
						if ok, sz := d.getVal(sizeRegex, str); ok {
 | 
				
			||||||
		opts[api.SpecSize] = sz
 | 
							opts[api.SpecSize] = sz
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if ok, nodes := d.getVal(nodesRegex, str); ok {
 | 
				
			||||||
 | 
							opts[api.SpecNodes] = nodes
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if ok, scale := d.getVal(scaleRegex, str); ok {
 | 
						if ok, scale := d.getVal(scaleRegex, str); ok {
 | 
				
			||||||
		opts[api.SpecScale] = scale
 | 
							opts[api.SpecScale] = scale
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
@@ -180,13 +320,34 @@ func (d *specHandler) SpecFromString(
 | 
				
			|||||||
	if ok, shared := d.getVal(sharedRegex, str); ok {
 | 
						if ok, shared := d.getVal(sharedRegex, str); ok {
 | 
				
			||||||
		opts[api.SpecShared] = shared
 | 
							opts[api.SpecShared] = shared
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if ok, sticky := d.getVal(stickyRegex, str); ok {
 | 
				
			||||||
 | 
							opts[api.SpecSticky] = sticky
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if ok, secure := d.getVal(secureRegex, str); ok {
 | 
				
			||||||
 | 
							opts[api.SpecSecure] = secure
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	if ok, passphrase := d.getVal(passphraseRegex, str); ok {
 | 
						if ok, passphrase := d.getVal(passphraseRegex, str); ok {
 | 
				
			||||||
		opts[api.SpecPassphrase] = passphrase
 | 
							opts[api.SpecPassphrase] = passphrase
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
						if ok, zones := d.getVal(zonesRegex, str); ok {
 | 
				
			||||||
	spec, err := d.SpecFromOpts(opts)
 | 
							opts[api.SpecZones] = zones
 | 
				
			||||||
	if err != nil {
 | 
					 | 
				
			||||||
		return false, d.DefaultSpec(), name
 | 
					 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	return true, spec, name
 | 
						if ok, racks := d.getVal(racksRegex, str); ok {
 | 
				
			||||||
 | 
							opts[api.SpecRacks] = racks
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if ok, aggregationLvl := d.getVal(aggrRegex, str); ok {
 | 
				
			||||||
 | 
							opts[api.SpecAggregationLevel] = aggregationLvl
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if ok, compressed := d.getVal(compressedRegex, str); ok {
 | 
				
			||||||
 | 
							opts[api.SpecCompressed] = compressed
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if ok, sched := d.getVal(snapScheduleRegex, str); ok {
 | 
				
			||||||
 | 
							opts[api.SpecSnapshotSchedule] = strings.Replace(sched, "#", ",", -1)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						spec, locator, source, err := d.SpecFromOpts(opts)
 | 
				
			||||||
 | 
						if err != nil {
 | 
				
			||||||
 | 
							return false, d.DefaultSpec(), nil, nil, name
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return true, spec, locator, source, name
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										30
									
								
								vendor/github.com/libopenstorage/openstorage/api/status.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										30
									
								
								vendor/github.com/libopenstorage/openstorage/api/status.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,5 +1,6 @@
 | 
				
			|||||||
package api
 | 
					package api
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// StatusKind indicates the severity of a status
 | 
				
			||||||
type StatusKind int32
 | 
					type StatusKind int32
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
@@ -12,32 +13,35 @@ const (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var statusToStatusKind = map[Status]StatusKind{
 | 
					var statusToStatusKind = map[Status]StatusKind{
 | 
				
			||||||
	Status_STATUS_NONE:              StatusSeverityHigh,
 | 
						Status_STATUS_NONE:                  StatusSeverityHigh,
 | 
				
			||||||
	Status_STATUS_INIT:              StatusSeverityMedium,
 | 
						Status_STATUS_INIT:                  StatusSeverityMedium,
 | 
				
			||||||
	Status_STATUS_OK:                StatusSeverityLow,
 | 
						Status_STATUS_OK:                    StatusSeverityLow,
 | 
				
			||||||
	Status_STATUS_OFFLINE:           StatusSeverityHigh,
 | 
						Status_STATUS_OFFLINE:               StatusSeverityHigh,
 | 
				
			||||||
	Status_STATUS_ERROR:             StatusSeverityHigh,
 | 
						Status_STATUS_ERROR:                 StatusSeverityHigh,
 | 
				
			||||||
	Status_STATUS_NOT_IN_QUORUM:     StatusSeverityHigh,
 | 
						Status_STATUS_NOT_IN_QUORUM:         StatusSeverityHigh,
 | 
				
			||||||
	Status_STATUS_DECOMMISSION:      StatusSeverityHigh,
 | 
						Status_STATUS_DECOMMISSION:          StatusSeverityHigh,
 | 
				
			||||||
	Status_STATUS_MAINTENANCE:       StatusSeverityHigh,
 | 
						Status_STATUS_MAINTENANCE:           StatusSeverityHigh,
 | 
				
			||||||
	Status_STATUS_STORAGE_DOWN:      StatusSeverityHigh,
 | 
						Status_STATUS_STORAGE_DOWN:          StatusSeverityHigh,
 | 
				
			||||||
	Status_STATUS_STORAGE_DEGRADED:  StatusSeverityHigh,
 | 
						Status_STATUS_STORAGE_DEGRADED:      StatusSeverityHigh,
 | 
				
			||||||
	Status_STATUS_NEEDS_REBOOT:      StatusSeverityHigh,
 | 
						Status_STATUS_NEEDS_REBOOT:          StatusSeverityHigh,
 | 
				
			||||||
	Status_STATUS_STORAGE_REBALANCE: StatusSeverityMedium,
 | 
						Status_STATUS_STORAGE_REBALANCE:     StatusSeverityMedium,
 | 
				
			||||||
	Status_STATUS_STORAGE_DRIVE_REPLACE:     StatusSeverityMedium,
 | 
						Status_STATUS_STORAGE_DRIVE_REPLACE: StatusSeverityMedium,
 | 
				
			||||||
	// Add statuses before MAX
 | 
						// Add statuses before MAX
 | 
				
			||||||
	Status_STATUS_MAX: StatusSeverityHigh,
 | 
						Status_STATUS_MAX: StatusSeverityHigh,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// StatusSimpleValueOf returns the string format of Status
 | 
				
			||||||
func StatusSimpleValueOf(s string) (Status, error) {
 | 
					func StatusSimpleValueOf(s string) (Status, error) {
 | 
				
			||||||
	obj, err := simpleValueOf("status", Status_value, s)
 | 
						obj, err := simpleValueOf("status", Status_value, s)
 | 
				
			||||||
	return Status(obj), err
 | 
						return Status(obj), err
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SimpleString returns the string format of Status
 | 
				
			||||||
func (x Status) SimpleString() string {
 | 
					func (x Status) SimpleString() string {
 | 
				
			||||||
	return simpleString("status", Status_name, int32(x))
 | 
						return simpleString("status", Status_name, int32(x))
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// StatusKind returns the king of status
 | 
				
			||||||
func (x Status) StatusKind() StatusKind {
 | 
					func (x Status) StatusKind() StatusKind {
 | 
				
			||||||
	statusType, _ := statusToStatusKind[x]
 | 
						statusType, _ := statusToStatusKind[x]
 | 
				
			||||||
	return statusType
 | 
						return statusType
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -2,21 +2,8 @@ load("@io_bazel_rules_go//go:def.bzl", "go_library")
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
go_library(
 | 
					go_library(
 | 
				
			||||||
    name = "go_default_library",
 | 
					    name = "go_default_library",
 | 
				
			||||||
    srcs = [
 | 
					    srcs = ["labels.go"],
 | 
				
			||||||
        "any.pb.go",
 | 
					 | 
				
			||||||
        "api.pb.go",
 | 
					 | 
				
			||||||
        "duration.pb.go",
 | 
					 | 
				
			||||||
        "empty.pb.go",
 | 
					 | 
				
			||||||
        "field_mask.pb.go",
 | 
					 | 
				
			||||||
        "protobuf.gen.go",
 | 
					 | 
				
			||||||
        "source_context.pb.go",
 | 
					 | 
				
			||||||
        "struct.pb.go",
 | 
					 | 
				
			||||||
        "timestamp.pb.go",
 | 
					 | 
				
			||||||
        "type.pb.go",
 | 
					 | 
				
			||||||
        "wrappers.pb.go",
 | 
					 | 
				
			||||||
    ],
 | 
					 | 
				
			||||||
    visibility = ["//visibility:public"],
 | 
					    visibility = ["//visibility:public"],
 | 
				
			||||||
    deps = ["//vendor/github.com/golang/protobuf/proto:go_default_library"],
 | 
					 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
filegroup(
 | 
					filegroup(
 | 
				
			||||||
							
								
								
									
										74
									
								
								vendor/github.com/libopenstorage/openstorage/pkg/parser/labels.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										74
									
								
								vendor/github.com/libopenstorage/openstorage/pkg/parser/labels.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,74 @@
 | 
				
			|||||||
 | 
					package parser
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"fmt"
 | 
				
			||||||
 | 
						"strings"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const (
 | 
				
			||||||
 | 
						NoLabel = "NoLabel"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func LabelsFromString(str string) (map[string]string, error) {
 | 
				
			||||||
 | 
						if len(str) == 0 {
 | 
				
			||||||
 | 
							return nil, nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						labels := strings.Split(str, ",")
 | 
				
			||||||
 | 
						m := make(map[string]string, len(labels))
 | 
				
			||||||
 | 
						for _, v := range labels {
 | 
				
			||||||
 | 
							if strings.Contains(v, "=") {
 | 
				
			||||||
 | 
								label := strings.SplitN(v, "=", 2)
 | 
				
			||||||
 | 
								if len(label) != 2 {
 | 
				
			||||||
 | 
									return m, fmt.Errorf("Malformed label: %s", v)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								if _, ok := m[label[0]]; ok {
 | 
				
			||||||
 | 
									return m, fmt.Errorf("Duplicate label: %s", v)
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								m[label[0]] = label[1]
 | 
				
			||||||
 | 
							} else if len(v) != 0 {
 | 
				
			||||||
 | 
								m[v] = ""
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return m, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func LabelsToString(labels map[string]string) string {
 | 
				
			||||||
 | 
						l := ""
 | 
				
			||||||
 | 
						for k, v := range labels {
 | 
				
			||||||
 | 
							if len(l) != 0 {
 | 
				
			||||||
 | 
								l += ","
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							if len(v) != 0 {
 | 
				
			||||||
 | 
								l += k + "=" + v
 | 
				
			||||||
 | 
							} else if len(k) != 0 {
 | 
				
			||||||
 | 
								l += k
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return l
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func MergeLabels(old map[string]string, new map[string]string) map[string]string {
 | 
				
			||||||
 | 
						if old == nil {
 | 
				
			||||||
 | 
							return new
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						if new == nil {
 | 
				
			||||||
 | 
							return old
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						m := make(map[string]string, len(old)+len(new))
 | 
				
			||||||
 | 
						for k, v := range old {
 | 
				
			||||||
 | 
							m[k] = v
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						for k, v := range new {
 | 
				
			||||||
 | 
							m[k] = v
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return m
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func HasLabels(set map[string]string, subset map[string]string) bool {
 | 
				
			||||||
 | 
						for k, v1 := range subset {
 | 
				
			||||||
 | 
							if v2, ok := set[k]; !ok || v1 != v2 {
 | 
				
			||||||
 | 
								return false
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
						return true
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										20
									
								
								vendor/github.com/libopenstorage/openstorage/pkg/units/units.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										20
									
								
								vendor/github.com/libopenstorage/openstorage/pkg/units/units.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -40,16 +40,16 @@ var (
 | 
				
			|||||||
		"B": 1,
 | 
							"B": 1,
 | 
				
			||||||
		"b": 1,
 | 
							"b": 1,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		"KB": KB,
 | 
							"KB": KiB,
 | 
				
			||||||
		"kb": KB,
 | 
							"kb": KiB,
 | 
				
			||||||
		"MB": MB,
 | 
							"MB": MiB,
 | 
				
			||||||
		"mb": MB,
 | 
							"mb": MiB,
 | 
				
			||||||
		"GB": GB,
 | 
							"GB": GiB,
 | 
				
			||||||
		"gb": GB,
 | 
							"gb": GiB,
 | 
				
			||||||
		"TB": TB,
 | 
							"TB": TiB,
 | 
				
			||||||
		"tb": TB,
 | 
							"tb": TiB,
 | 
				
			||||||
		"PB": PB,
 | 
							"PB": PiB,
 | 
				
			||||||
		"pb": PB,
 | 
							"pb": PiB,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		"K": KiB,
 | 
							"K": KiB,
 | 
				
			||||||
		"k": KiB,
 | 
							"k": KiB,
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										102
									
								
								vendor/github.com/libopenstorage/openstorage/volume/volume.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										102
									
								
								vendor/github.com/libopenstorage/openstorage/volume/volume.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -7,30 +7,67 @@ import (
 | 
				
			|||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
var (
 | 
					var (
 | 
				
			||||||
	ErrAlreadyShutdown         = errors.New("VolumeDriverProvider already shutdown")
 | 
						// ErrAlreadyShutdown returned when driver is shutdown
 | 
				
			||||||
	ErrExist                   = errors.New("Driver already exists")
 | 
						ErrAlreadyShutdown = errors.New("VolumeDriverProvider already shutdown")
 | 
				
			||||||
	ErrDriverNotFound          = errors.New("Driver implementation not found")
 | 
						// ErrExit returned when driver already registered
 | 
				
			||||||
	ErrDriverInitializing      = errors.New("Driver is initializing")
 | 
						ErrExist = errors.New("Already exists")
 | 
				
			||||||
	ErrEnoEnt                  = errors.New("Volume does not exist.")
 | 
						// ErrDriverNotFound returned when a driver is not registered
 | 
				
			||||||
	ErrEnomem                  = errors.New("Out of memory.")
 | 
						ErrDriverNotFound = errors.New("Driver implementation not found")
 | 
				
			||||||
	ErrEinval                  = errors.New("Invalid argument")
 | 
						// ErrDriverInitializing returned when a driver is initializing
 | 
				
			||||||
	ErrVolDetached             = errors.New("Volume is detached")
 | 
						ErrDriverInitializing = errors.New("Driver is initializing")
 | 
				
			||||||
	ErrVolAttached             = errors.New("Volume is attached")
 | 
						// ErrEnoEnt returned when volume does not exist
 | 
				
			||||||
 | 
						ErrEnoEnt = errors.New("Volume does not exist.")
 | 
				
			||||||
 | 
						// ErrEnomem returned when we are out of memory
 | 
				
			||||||
 | 
						ErrEnomem = errors.New("Out of memory.")
 | 
				
			||||||
 | 
						// ErrEinval returned when an invalid input is provided
 | 
				
			||||||
 | 
						ErrEinval = errors.New("Invalid argument")
 | 
				
			||||||
 | 
						// ErrVolDetached returned when volume is in detached state
 | 
				
			||||||
 | 
						ErrVolDetached = errors.New("Volume is detached")
 | 
				
			||||||
 | 
						// ErrVolAttached returned when volume is in attached state
 | 
				
			||||||
 | 
						ErrVolAttached = errors.New("Volume is attached")
 | 
				
			||||||
 | 
						// ErrVolAttachedOnRemoteNode returned when volume is in attached on different node
 | 
				
			||||||
	ErrVolAttachedOnRemoteNode = errors.New("Volume is attached on another node")
 | 
						ErrVolAttachedOnRemoteNode = errors.New("Volume is attached on another node")
 | 
				
			||||||
	ErrVolAttachedScale        = errors.New("Volume is attached but can be scaled")
 | 
						// ErrVolAttachedScale returned when volume is attached and can be scaled
 | 
				
			||||||
	ErrVolHasSnaps             = errors.New("Volume has snapshots associated")
 | 
						ErrVolAttachedScale = errors.New("Volume is attached on another node." +
 | 
				
			||||||
	ErrNotSupported            = errors.New("Operation not supported")
 | 
							" Increase scale factor to create more instances")
 | 
				
			||||||
 | 
						// ErrVolHasSnaps returned when volume has previous snapshots
 | 
				
			||||||
 | 
						ErrVolHasSnaps = errors.New("Volume has snapshots associated")
 | 
				
			||||||
 | 
						// ErrNotSupported returned when the operation is not supported
 | 
				
			||||||
 | 
						ErrNotSupported = errors.New("Operation not supported")
 | 
				
			||||||
 | 
						// ErrVolBusy returned when volume is in busy state
 | 
				
			||||||
 | 
						ErrVolBusy = errors.New("Volume is busy")
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Constants used by the VolumeDriver
 | 
					// Constants used by the VolumeDriver
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	APIVersion    = "v1"
 | 
						// APIVersion for the volume management apis
 | 
				
			||||||
 | 
						APIVersion = "v1"
 | 
				
			||||||
 | 
						// PluginAPIBase where the docker unix socket resides
 | 
				
			||||||
	PluginAPIBase = "/run/docker/plugins/"
 | 
						PluginAPIBase = "/run/docker/plugins/"
 | 
				
			||||||
 | 
						// DriverAPIBase where the osd unix socket resides
 | 
				
			||||||
	DriverAPIBase = "/var/lib/osd/driver/"
 | 
						DriverAPIBase = "/var/lib/osd/driver/"
 | 
				
			||||||
	MountBase     = "/var/lib/osd/mounts/"
 | 
						// MountBase for osd mountpoints
 | 
				
			||||||
	VolumeBase    = "/var/lib/osd/"
 | 
						MountBase = "/var/lib/osd/mounts/"
 | 
				
			||||||
 | 
						// VolumeBase for osd volumes
 | 
				
			||||||
 | 
						VolumeBase = "/var/lib/osd/"
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const (
 | 
				
			||||||
 | 
						// LocationConstaint is a label that specifies data location constraint.
 | 
				
			||||||
 | 
						LocationConstraint = "LocationConstraint"
 | 
				
			||||||
 | 
						// LocalNode is an alias for this node - similar to localhost.
 | 
				
			||||||
 | 
						LocalNode = "LocalNode"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// AttachOptionsKey specifies a key type from a key-value pair
 | 
				
			||||||
 | 
					// that will be passed in to the Attach api
 | 
				
			||||||
 | 
					type AttachOptionsKey string
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					const (
 | 
				
			||||||
 | 
						AttachOptionsSecret = AttachOptionsKey("SECRET_KEY")
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Store defines the interface for basic volume store operations
 | 
				
			||||||
type Store interface {
 | 
					type Store interface {
 | 
				
			||||||
	// Lock volume specified by volumeID.
 | 
						// Lock volume specified by volumeID.
 | 
				
			||||||
	Lock(volumeID string) (interface{}, error)
 | 
						Lock(volumeID string) (interface{}, error)
 | 
				
			||||||
@@ -68,16 +105,34 @@ type IODriver interface {
 | 
				
			|||||||
	Flush(volumeID string) error
 | 
						Flush(volumeID string) error
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// SnapshotDriver interfaces provides snapshot capability
 | 
				
			||||||
type SnapshotDriver interface {
 | 
					type SnapshotDriver interface {
 | 
				
			||||||
	// Snapshot create volume snapshot.
 | 
						// Snapshot create volume snapshot.
 | 
				
			||||||
	// Errors ErrEnoEnt may be returned
 | 
						// Errors ErrEnoEnt may be returned
 | 
				
			||||||
	Snapshot(volumeID string, readonly bool, locator *api.VolumeLocator) (string, error)
 | 
						Snapshot(volumeID string, readonly bool, locator *api.VolumeLocator) (string, error)
 | 
				
			||||||
 | 
						// Restore restores volume to specified snapshot.
 | 
				
			||||||
 | 
						Restore(volumeID string, snapshotID string) error
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// StatsDriver interface provides stats features
 | 
				
			||||||
 | 
					type StatsDriver interface {
 | 
				
			||||||
 | 
						// Stats for specified volume.
 | 
				
			||||||
 | 
						// cumulative stats are /proc/diskstats style stats.
 | 
				
			||||||
 | 
						// nonCumulative stats are stats for specific duration.
 | 
				
			||||||
 | 
						// Errors ErrEnoEnt may be returned
 | 
				
			||||||
 | 
						Stats(volumeID string, cumulative bool) (*api.Stats, error)
 | 
				
			||||||
 | 
						// UsedSize returns currently used volume size.
 | 
				
			||||||
 | 
						// Errors ErrEnoEnt may be returned.
 | 
				
			||||||
 | 
						UsedSize(volumeID string) (uint64, error)
 | 
				
			||||||
 | 
						// GetActiveRequests get active requests
 | 
				
			||||||
 | 
						GetActiveRequests() (*api.ActiveRequests, error)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// ProtoDriver must be implemented by all volume drivers.  It specifies the
 | 
					// ProtoDriver must be implemented by all volume drivers.  It specifies the
 | 
				
			||||||
// most basic functionality, such as creating and deleting volumes.
 | 
					// most basic functionality, such as creating and deleting volumes.
 | 
				
			||||||
type ProtoDriver interface {
 | 
					type ProtoDriver interface {
 | 
				
			||||||
	SnapshotDriver
 | 
						SnapshotDriver
 | 
				
			||||||
 | 
						StatsDriver
 | 
				
			||||||
	// Name returns the name of the driver.
 | 
						// Name returns the name of the driver.
 | 
				
			||||||
	Name() string
 | 
						Name() string
 | 
				
			||||||
	// Type of this driver
 | 
						// Type of this driver
 | 
				
			||||||
@@ -99,16 +154,6 @@ type ProtoDriver interface {
 | 
				
			|||||||
	// Update not all fields of the spec are supported, ErrNotSupported will be thrown for unsupported
 | 
						// Update not all fields of the spec are supported, ErrNotSupported will be thrown for unsupported
 | 
				
			||||||
	// updates.
 | 
						// updates.
 | 
				
			||||||
	Set(volumeID string, locator *api.VolumeLocator, spec *api.VolumeSpec) error
 | 
						Set(volumeID string, locator *api.VolumeLocator, spec *api.VolumeSpec) error
 | 
				
			||||||
	// Stats for specified volume.
 | 
					 | 
				
			||||||
	// cumulative stats are /proc/diskstats style stats.
 | 
					 | 
				
			||||||
	// nonCumulative stats are stats for specific duration.
 | 
					 | 
				
			||||||
	// Errors ErrEnoEnt may be returned
 | 
					 | 
				
			||||||
	Stats(volumeID string, cumulative bool) (*api.Stats, error)
 | 
					 | 
				
			||||||
	// Alerts on this volume.
 | 
					 | 
				
			||||||
	// Errors ErrEnoEnt may be returned
 | 
					 | 
				
			||||||
	Alerts(volumeID string) (*api.Alerts, error)
 | 
					 | 
				
			||||||
	// GetActiveRequests get active requests
 | 
					 | 
				
			||||||
	GetActiveRequests() (*api.ActiveRequests, error)
 | 
					 | 
				
			||||||
	// Status returns a set of key-value pairs which give low
 | 
						// Status returns a set of key-value pairs which give low
 | 
				
			||||||
	// level diagnostic status about this driver.
 | 
						// level diagnostic status about this driver.
 | 
				
			||||||
	Status() [][2]string
 | 
						Status() [][2]string
 | 
				
			||||||
@@ -128,6 +173,7 @@ type Enumerator interface {
 | 
				
			|||||||
	SnapEnumerate(volID []string, snapLabels map[string]string) ([]*api.Volume, error)
 | 
						SnapEnumerate(volID []string, snapLabels map[string]string) ([]*api.Volume, error)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// StoreEnumerator combines Store and Enumerator capabilities
 | 
				
			||||||
type StoreEnumerator interface {
 | 
					type StoreEnumerator interface {
 | 
				
			||||||
	Store
 | 
						Store
 | 
				
			||||||
	Enumerator
 | 
						Enumerator
 | 
				
			||||||
@@ -139,10 +185,10 @@ type BlockDriver interface {
 | 
				
			|||||||
	// Attach map device to the host.
 | 
						// Attach map device to the host.
 | 
				
			||||||
	// On success the devicePath specifies location where the device is exported
 | 
						// On success the devicePath specifies location where the device is exported
 | 
				
			||||||
	// Errors ErrEnoEnt, ErrVolAttached may be returned.
 | 
						// Errors ErrEnoEnt, ErrVolAttached may be returned.
 | 
				
			||||||
	Attach(volumeID string) (string, error)
 | 
						Attach(volumeID string, attachOptions map[string]string) (string, error)
 | 
				
			||||||
	// Detach device from the host.
 | 
						// Detach device from the host.
 | 
				
			||||||
	// Errors ErrEnoEnt, ErrVolDetached may be returned.
 | 
						// Errors ErrEnoEnt, ErrVolDetached may be returned.
 | 
				
			||||||
	Detach(volumeID string) error
 | 
						Detach(volumeID string, unmountBeforeDetach bool) error
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// VolumeDriverProvider provides VolumeDrivers.
 | 
					// VolumeDriverProvider provides VolumeDrivers.
 | 
				
			||||||
@@ -165,7 +211,7 @@ type VolumeDriverRegistry interface {
 | 
				
			|||||||
	Add(name string, init func(map[string]string) (VolumeDriver, error)) error
 | 
						Add(name string, init func(map[string]string) (VolumeDriver, error)) error
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// VolumeDriverRegistry constructs a new VolumeDriverRegistry.
 | 
					// NewVolumeDriverRegistry constructs a new VolumeDriverRegistry.
 | 
				
			||||||
func NewVolumeDriverRegistry(nameToInitFunc map[string]func(map[string]string) (VolumeDriver, error)) VolumeDriverRegistry {
 | 
					func NewVolumeDriverRegistry(nameToInitFunc map[string]func(map[string]string) (VolumeDriver, error)) VolumeDriverRegistry {
 | 
				
			||||||
	return newVolumeDriverRegistry(nameToInitFunc)
 | 
						return newVolumeDriverRegistry(nameToInitFunc)
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										39
									
								
								vendor/github.com/libopenstorage/openstorage/volume/volume_not_supported.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										39
									
								
								vendor/github.com/libopenstorage/openstorage/volume/volume_not_supported.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -8,19 +8,24 @@ var (
 | 
				
			|||||||
	// BlockNotSupported is a default (null) block driver implementation.  This can be
 | 
						// BlockNotSupported is a default (null) block driver implementation.  This can be
 | 
				
			||||||
	// used by drivers that do not want to (or care about) implementing the attach,
 | 
						// used by drivers that do not want to (or care about) implementing the attach,
 | 
				
			||||||
	// format and detach interfaces.
 | 
						// format and detach interfaces.
 | 
				
			||||||
	BlockNotSupported    = &blockNotSupported{}
 | 
						BlockNotSupported = &blockNotSupported{}
 | 
				
			||||||
 | 
						// SnapshotNotSupported is a null snapshot driver implementation. This can be used
 | 
				
			||||||
 | 
						// by drivers that do not want to implement the snapshot interface
 | 
				
			||||||
	SnapshotNotSupported = &snapshotNotSupported{}
 | 
						SnapshotNotSupported = &snapshotNotSupported{}
 | 
				
			||||||
	IONotSupported       = &ioNotSupported{}
 | 
						// IONotSupported is a null IODriver interface
 | 
				
			||||||
 | 
						IONotSupported = &ioNotSupported{}
 | 
				
			||||||
 | 
						// StatsNotSupported is a null stats driver implementation. This can be used
 | 
				
			||||||
 | 
						// by drivers that do not want to implement the stats interface.
 | 
				
			||||||
 | 
						StatsNotSupported = &statsNotSupported{}
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 | 
				
			||||||
type blockNotSupported struct{}
 | 
					type blockNotSupported struct{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (b *blockNotSupported) Attach(volumeID string) (string, error) {
 | 
					func (b *blockNotSupported) Attach(volumeID string, attachOptions map[string]string) (string, error) {
 | 
				
			||||||
	return "", ErrNotSupported
 | 
						return "", ErrNotSupported
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (b *blockNotSupported) Detach(volumeID string) error {
 | 
					func (b *blockNotSupported) Detach(volumeID string, unmountBeforeDetach bool) error {
 | 
				
			||||||
	return ErrNotSupported
 | 
						return ErrNotSupported
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -30,6 +35,10 @@ func (s *snapshotNotSupported) Snapshot(volumeID string, readonly bool, locator
 | 
				
			|||||||
	return "", ErrNotSupported
 | 
						return "", ErrNotSupported
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (s *snapshotNotSupported) Restore(volumeID, snapshotID string) error {
 | 
				
			||||||
 | 
						return ErrNotSupported
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
type ioNotSupported struct{}
 | 
					type ioNotSupported struct{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (i *ioNotSupported) Read(volumeID string, buffer []byte, size uint64, offset int64) (int64, error) {
 | 
					func (i *ioNotSupported) Read(volumeID string, buffer []byte, size uint64, offset int64) (int64, error) {
 | 
				
			||||||
@@ -43,3 +52,23 @@ func (i *ioNotSupported) Write(volumeID string, buffer []byte, size uint64, offs
 | 
				
			|||||||
func (i *ioNotSupported) Flush(volumeID string) error {
 | 
					func (i *ioNotSupported) Flush(volumeID string) error {
 | 
				
			||||||
	return ErrNotSupported
 | 
						return ErrNotSupported
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					type statsNotSupported struct{}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Stats returns stats
 | 
				
			||||||
 | 
					func (s *statsNotSupported) Stats(
 | 
				
			||||||
 | 
						volumeID string,
 | 
				
			||||||
 | 
						cumulative bool,
 | 
				
			||||||
 | 
					) (*api.Stats, error) {
 | 
				
			||||||
 | 
						return nil, ErrNotSupported
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// UsedSize returns allocated size
 | 
				
			||||||
 | 
					func (s *statsNotSupported) UsedSize(volumeID string) (uint64, error) {
 | 
				
			||||||
 | 
						return 0, ErrNotSupported
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// GetActiveRequests gets active requests
 | 
				
			||||||
 | 
					func (s *statsNotSupported) GetActiveRequests() (*api.ActiveRequests, error) {
 | 
				
			||||||
 | 
						return nil, nil
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										26
									
								
								vendor/github.com/mohae/deepcopy/.gitignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								vendor/github.com/mohae/deepcopy/.gitignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,26 @@
 | 
				
			|||||||
 | 
					# Compiled Object files, Static and Dynamic libs (Shared Objects)
 | 
				
			||||||
 | 
					*.o
 | 
				
			||||||
 | 
					*.a
 | 
				
			||||||
 | 
					*.so
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Folders
 | 
				
			||||||
 | 
					_obj
 | 
				
			||||||
 | 
					_test
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Architecture specific extensions/prefixes
 | 
				
			||||||
 | 
					*.[568vq]
 | 
				
			||||||
 | 
					[568vq].out
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*.cgo1.go
 | 
				
			||||||
 | 
					*.cgo2.c
 | 
				
			||||||
 | 
					_cgo_defun.c
 | 
				
			||||||
 | 
					_cgo_gotypes.go
 | 
				
			||||||
 | 
					_cgo_export.*
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					_testmain.go
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					*.exe
 | 
				
			||||||
 | 
					*.test
 | 
				
			||||||
 | 
					*~
 | 
				
			||||||
 | 
					*.out
 | 
				
			||||||
 | 
					*.log
 | 
				
			||||||
							
								
								
									
										11
									
								
								vendor/github.com/mohae/deepcopy/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										11
									
								
								vendor/github.com/mohae/deepcopy/.travis.yml
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,11 @@
 | 
				
			|||||||
 | 
					language: go
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					go:
 | 
				
			||||||
 | 
					  - tip
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					matrix:
 | 
				
			||||||
 | 
					  allow_failures:
 | 
				
			||||||
 | 
					    - go: tip
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					script:
 | 
				
			||||||
 | 
					  - go test ./...
 | 
				
			||||||
							
								
								
									
										21
									
								
								vendor/github.com/mohae/deepcopy/BUILD
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								vendor/github.com/mohae/deepcopy/BUILD
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,21 @@
 | 
				
			|||||||
 | 
					load("@io_bazel_rules_go//go:def.bzl", "go_library")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					go_library(
 | 
				
			||||||
 | 
					    name = "go_default_library",
 | 
				
			||||||
 | 
					    srcs = ["deepcopy.go"],
 | 
				
			||||||
 | 
					    visibility = ["//visibility:public"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "package-srcs",
 | 
				
			||||||
 | 
					    srcs = glob(["**"]),
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    visibility = ["//visibility:private"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					filegroup(
 | 
				
			||||||
 | 
					    name = "all-srcs",
 | 
				
			||||||
 | 
					    srcs = [":package-srcs"],
 | 
				
			||||||
 | 
					    tags = ["automanaged"],
 | 
				
			||||||
 | 
					    visibility = ["//visibility:public"],
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
							
								
								
									
										3
									
								
								vendor/go.pedge.io/pb/LICENSE → vendor/github.com/mohae/deepcopy/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										3
									
								
								vendor/go.pedge.io/pb/LICENSE → vendor/github.com/mohae/deepcopy/LICENSE
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,6 +1,6 @@
 | 
				
			|||||||
The MIT License (MIT)
 | 
					The MIT License (MIT)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Copyright (c) 2015 Peter Edge
 | 
					Copyright (c) 2014 Joel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
					Permission is hereby granted, free of charge, to any person obtaining a copy
 | 
				
			||||||
of this software and associated documentation files (the "Software"), to deal
 | 
					of this software and associated documentation files (the "Software"), to deal
 | 
				
			||||||
@@ -19,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 | 
				
			|||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 | 
					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
 | 
					OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 | 
				
			||||||
SOFTWARE.
 | 
					SOFTWARE.
 | 
				
			||||||
 | 
					 | 
				
			||||||
							
								
								
									
										8
									
								
								vendor/github.com/mohae/deepcopy/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								vendor/github.com/mohae/deepcopy/README.md
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,8 @@
 | 
				
			|||||||
 | 
					deepCopy
 | 
				
			||||||
 | 
					========
 | 
				
			||||||
 | 
					[](https://godoc.org/github.com/mohae/deepcopy)[](https://travis-ci.org/mohae/deepcopy)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					DeepCopy makes deep copies of things: unexported field values are not copied.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Usage
 | 
				
			||||||
 | 
					    cpy := deepcopy.Copy(orig)
 | 
				
			||||||
							
								
								
									
										112
									
								
								vendor/github.com/mohae/deepcopy/deepcopy.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										112
									
								
								vendor/github.com/mohae/deepcopy/deepcopy.go
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,112 @@
 | 
				
			|||||||
 | 
					// deepcopy makes deep copies of things. A standard copy will copy the
 | 
				
			||||||
 | 
					// pointers: deep copy copies the values pointed to.  Unexported field
 | 
				
			||||||
 | 
					// values are not copied.
 | 
				
			||||||
 | 
					//
 | 
				
			||||||
 | 
					// Copyright (c)2014-2016, Joel Scoble (github.com/mohae), all rights reserved.
 | 
				
			||||||
 | 
					// License: MIT, for more details check the included LICENSE file.
 | 
				
			||||||
 | 
					package deepcopy
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import (
 | 
				
			||||||
 | 
						"reflect"
 | 
				
			||||||
 | 
						"time"
 | 
				
			||||||
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Iface is an alias to Copy; this exists for backwards compatibility reasons.
 | 
				
			||||||
 | 
					func Iface(iface interface{}) interface{} {
 | 
				
			||||||
 | 
						return Copy(iface)
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Copy creates a deep copy of whatever is passed to it and returns the copy
 | 
				
			||||||
 | 
					// in an interface{}.  The returned value will need to be asserted to the
 | 
				
			||||||
 | 
					// correct type.
 | 
				
			||||||
 | 
					func Copy(src interface{}) interface{} {
 | 
				
			||||||
 | 
						if src == nil {
 | 
				
			||||||
 | 
							return nil
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Make the interface a reflect.Value
 | 
				
			||||||
 | 
						original := reflect.ValueOf(src)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Make a copy of the same type as the original.
 | 
				
			||||||
 | 
						cpy := reflect.New(original.Type()).Elem()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Recursively copy the original.
 | 
				
			||||||
 | 
						copyRecursive(original, cpy)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						// Return the copy as an interface.
 | 
				
			||||||
 | 
						return cpy.Interface()
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// copyRecursive does the actual copying of the interface. It currently has
 | 
				
			||||||
 | 
					// limited support for what it can handle. Add as needed.
 | 
				
			||||||
 | 
					func copyRecursive(original, cpy reflect.Value) {
 | 
				
			||||||
 | 
						// handle according to original's Kind
 | 
				
			||||||
 | 
						switch original.Kind() {
 | 
				
			||||||
 | 
						case reflect.Ptr:
 | 
				
			||||||
 | 
							// Get the actual value being pointed to.
 | 
				
			||||||
 | 
							originalValue := original.Elem()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// if  it isn't valid, return.
 | 
				
			||||||
 | 
							if !originalValue.IsValid() {
 | 
				
			||||||
 | 
								return
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							cpy.Set(reflect.New(originalValue.Type()))
 | 
				
			||||||
 | 
							copyRecursive(originalValue, cpy.Elem())
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						case reflect.Interface:
 | 
				
			||||||
 | 
							// If this is a nil, don't do anything
 | 
				
			||||||
 | 
							if original.IsNil() {
 | 
				
			||||||
 | 
								return
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							// Get the value for the interface, not the pointer.
 | 
				
			||||||
 | 
							originalValue := original.Elem()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
							// Get the value by calling Elem().
 | 
				
			||||||
 | 
							copyValue := reflect.New(originalValue.Type()).Elem()
 | 
				
			||||||
 | 
							copyRecursive(originalValue, copyValue)
 | 
				
			||||||
 | 
							cpy.Set(copyValue)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						case reflect.Struct:
 | 
				
			||||||
 | 
							t, ok := original.Interface().(time.Time)
 | 
				
			||||||
 | 
							if ok {
 | 
				
			||||||
 | 
								cpy.Set(reflect.ValueOf(t))
 | 
				
			||||||
 | 
								return
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							// Go through each field of the struct and copy it.
 | 
				
			||||||
 | 
							for i := 0; i < original.NumField(); i++ {
 | 
				
			||||||
 | 
								// The Type's StructField for a given field is checked to see if StructField.PkgPath
 | 
				
			||||||
 | 
								// is set to determine if the field is exported or not because CanSet() returns false
 | 
				
			||||||
 | 
								// for settable fields.  I'm not sure why.  -mohae
 | 
				
			||||||
 | 
								if original.Type().Field(i).PkgPath != "" {
 | 
				
			||||||
 | 
									continue
 | 
				
			||||||
 | 
								}
 | 
				
			||||||
 | 
								copyRecursive(original.Field(i), cpy.Field(i))
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						case reflect.Slice:
 | 
				
			||||||
 | 
							if original.IsNil() {
 | 
				
			||||||
 | 
								return
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							// Make a new slice and copy each element.
 | 
				
			||||||
 | 
							cpy.Set(reflect.MakeSlice(original.Type(), original.Len(), original.Cap()))
 | 
				
			||||||
 | 
							for i := 0; i < original.Len(); i++ {
 | 
				
			||||||
 | 
								copyRecursive(original.Index(i), cpy.Index(i))
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						case reflect.Map:
 | 
				
			||||||
 | 
							if original.IsNil() {
 | 
				
			||||||
 | 
								return
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
							cpy.Set(reflect.MakeMap(original.Type()))
 | 
				
			||||||
 | 
							for _, key := range original.MapKeys() {
 | 
				
			||||||
 | 
								originalValue := original.MapIndex(key)
 | 
				
			||||||
 | 
								copyValue := reflect.New(originalValue.Type()).Elem()
 | 
				
			||||||
 | 
								copyRecursive(originalValue, copyValue)
 | 
				
			||||||
 | 
								copyKey := Copy(key.Interface())
 | 
				
			||||||
 | 
								cpy.SetMapIndex(reflect.ValueOf(copyKey), copyValue)
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						default:
 | 
				
			||||||
 | 
							cpy.Set(original)
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
							
								
								
									
										104
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/any.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										104
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/any.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,104 +0,0 @@
 | 
				
			|||||||
// Code generated by protoc-gen-go.
 | 
					 | 
				
			||||||
// source: google/protobuf/any.proto
 | 
					 | 
				
			||||||
// DO NOT EDIT!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import proto "github.com/golang/protobuf/proto"
 | 
					 | 
				
			||||||
import fmt "fmt"
 | 
					 | 
				
			||||||
import math "math"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
					 | 
				
			||||||
var _ = proto.Marshal
 | 
					 | 
				
			||||||
var _ = fmt.Errorf
 | 
					 | 
				
			||||||
var _ = math.Inf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// This is a compile-time assertion to ensure that this generated file
 | 
					 | 
				
			||||||
// is compatible with the proto package it is being compiled against.
 | 
					 | 
				
			||||||
// A compilation error at this line likely means your copy of the
 | 
					 | 
				
			||||||
// proto package needs to be updated.
 | 
					 | 
				
			||||||
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// `Any` contains an arbitrary serialized message along with a URL
 | 
					 | 
				
			||||||
// that describes the type of the serialized message.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// 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:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     package google.profile;
 | 
					 | 
				
			||||||
//     message Person {
 | 
					 | 
				
			||||||
//       string first_name = 1;
 | 
					 | 
				
			||||||
//       string last_name = 2;
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     {
 | 
					 | 
				
			||||||
//       "@type": "type.googleapis.com/google.profile.Person",
 | 
					 | 
				
			||||||
//       "firstName": <string>,
 | 
					 | 
				
			||||||
//       "lastName": <string>
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// If the embedded message type is well-known and has a custom JSON
 | 
					 | 
				
			||||||
// representation, that representation will be embedded adding a field
 | 
					 | 
				
			||||||
// `value` which holds the custom JSON in addition to the `@type`
 | 
					 | 
				
			||||||
// field. Example (for message [google.protobuf.Duration][]):
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     {
 | 
					 | 
				
			||||||
//       "@type": "type.googleapis.com/google.protobuf.Duration",
 | 
					 | 
				
			||||||
//       "value": "1.212s"
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
type Any struct {
 | 
					 | 
				
			||||||
	// A URL/resource name whose content describes the type of the
 | 
					 | 
				
			||||||
	// serialized message.
 | 
					 | 
				
			||||||
	//
 | 
					 | 
				
			||||||
	// For URLs which use the schema `http`, `https`, or no schema, the
 | 
					 | 
				
			||||||
	// following restrictions and interpretations apply:
 | 
					 | 
				
			||||||
	//
 | 
					 | 
				
			||||||
	// * If no schema is provided, `https` is assumed.
 | 
					 | 
				
			||||||
	// * The last segment of the URL's path must represent the fully
 | 
					 | 
				
			||||||
	//   qualified name of the type (as in `path/google.protobuf.Duration`).
 | 
					 | 
				
			||||||
	// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
 | 
					 | 
				
			||||||
	//   value in binary format, or produce an error.
 | 
					 | 
				
			||||||
	// * Applications are allowed to cache lookup results based on the
 | 
					 | 
				
			||||||
	//   URL, or have them precompiled into a binary to avoid any
 | 
					 | 
				
			||||||
	//   lookup. Therefore, binary compatibility needs to be preserved
 | 
					 | 
				
			||||||
	//   on changes to types. (Use versioned type names to manage
 | 
					 | 
				
			||||||
	//   breaking changes.)
 | 
					 | 
				
			||||||
	//
 | 
					 | 
				
			||||||
	// Schemas other than `http`, `https` (or the empty schema) might be
 | 
					 | 
				
			||||||
	// used with implementation specific semantics.
 | 
					 | 
				
			||||||
	//
 | 
					 | 
				
			||||||
	TypeUrl string `protobuf:"bytes,1,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"`
 | 
					 | 
				
			||||||
	// Must be valid serialized data of the above specified type.
 | 
					 | 
				
			||||||
	Value []byte `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Any) Reset()                    { *m = Any{} }
 | 
					 | 
				
			||||||
func (m *Any) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Any) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Any) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
 | 
					 | 
				
			||||||
func (*Any) XXX_WellKnownType() string   { return "Any" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	proto.RegisterType((*Any)(nil), "google.protobuf.Any")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() { proto.RegisterFile("google/protobuf/any.proto", fileDescriptor0) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var fileDescriptor0 = []byte{
 | 
					 | 
				
			||||||
	// 160 bytes of a gzipped FileDescriptorProto
 | 
					 | 
				
			||||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x4c, 0xcf, 0xcf, 0x4f,
 | 
					 | 
				
			||||||
	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcc, 0xab, 0xd4,
 | 
					 | 
				
			||||||
	0x03, 0x73, 0x84, 0xf8, 0x21, 0x52, 0x7a, 0x30, 0x29, 0x25, 0x33, 0x2e, 0x66, 0xc7, 0xbc, 0x4a,
 | 
					 | 
				
			||||||
	0x21, 0x49, 0x2e, 0x8e, 0x92, 0xca, 0x82, 0xd4, 0xf8, 0xd2, 0xa2, 0x1c, 0x09, 0x46, 0x05, 0x46,
 | 
					 | 
				
			||||||
	0x0d, 0xce, 0x20, 0x76, 0x10, 0x3f, 0xb4, 0x28, 0x47, 0x48, 0x84, 0x8b, 0xb5, 0x2c, 0x31, 0xa7,
 | 
					 | 
				
			||||||
	0x34, 0x55, 0x82, 0x09, 0x28, 0xce, 0x13, 0x04, 0xe1, 0x38, 0x79, 0x73, 0x09, 0x27, 0xe7, 0xe7,
 | 
					 | 
				
			||||||
	0xea, 0xa1, 0x19, 0xe7, 0xc4, 0x01, 0x34, 0x2c, 0x00, 0xc4, 0x09, 0x60, 0x5c, 0xc0, 0xc8, 0xb8,
 | 
					 | 
				
			||||||
	0x88, 0x89, 0xd9, 0x3d, 0xc0, 0x69, 0x15, 0x93, 0x9c, 0x3b, 0x44, 0x59, 0x00, 0x54, 0x99, 0x5e,
 | 
					 | 
				
			||||||
	0x78, 0x6a, 0x4e, 0x8e, 0x77, 0x5e, 0x7e, 0x79, 0x5e, 0x08, 0xd0, 0x92, 0xe2, 0x24, 0x36, 0xb0,
 | 
					 | 
				
			||||||
	0x7e, 0x63, 0x40, 0x00, 0x00, 0x00, 0xff, 0xff, 0x83, 0x49, 0xa8, 0x53, 0xb9, 0x00, 0x00, 0x00,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										246
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/api.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										246
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/api.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,246 +0,0 @@
 | 
				
			|||||||
// Code generated by protoc-gen-go.
 | 
					 | 
				
			||||||
// source: google/protobuf/api.proto
 | 
					 | 
				
			||||||
// DO NOT EDIT!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import proto "github.com/golang/protobuf/proto"
 | 
					 | 
				
			||||||
import fmt "fmt"
 | 
					 | 
				
			||||||
import math "math"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
					 | 
				
			||||||
var _ = proto.Marshal
 | 
					 | 
				
			||||||
var _ = fmt.Errorf
 | 
					 | 
				
			||||||
var _ = math.Inf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Api is a light-weight descriptor for a protocol buffer service.
 | 
					 | 
				
			||||||
type Api struct {
 | 
					 | 
				
			||||||
	// The fully qualified name of this api, including package name
 | 
					 | 
				
			||||||
	// followed by the api's simple name.
 | 
					 | 
				
			||||||
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
 | 
					 | 
				
			||||||
	// The methods of this api, in unspecified order.
 | 
					 | 
				
			||||||
	Methods []*Method `protobuf:"bytes,2,rep,name=methods" json:"methods,omitempty"`
 | 
					 | 
				
			||||||
	// Any metadata attached to the API.
 | 
					 | 
				
			||||||
	Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
 | 
					 | 
				
			||||||
	// A version string for this api. If specified, must have the form
 | 
					 | 
				
			||||||
	// `major-version.minor-version`, as in `1.10`. If the minor version
 | 
					 | 
				
			||||||
	// is omitted, it defaults to zero. If the entire version field is
 | 
					 | 
				
			||||||
	// empty, the major version is derived from the package name, as
 | 
					 | 
				
			||||||
	// outlined below. If the field is not empty, the version in the
 | 
					 | 
				
			||||||
	// package name will be verified to be consistent with what is
 | 
					 | 
				
			||||||
	// provided here.
 | 
					 | 
				
			||||||
	//
 | 
					 | 
				
			||||||
	// The versioning schema uses [semantic
 | 
					 | 
				
			||||||
	// versioning](http://semver.org) where the major version number
 | 
					 | 
				
			||||||
	// indicates a breaking change and the minor version an additive,
 | 
					 | 
				
			||||||
	// non-breaking change. Both version numbers are signals to users
 | 
					 | 
				
			||||||
	// what to expect from different versions, and should be carefully
 | 
					 | 
				
			||||||
	// chosen based on the product plan.
 | 
					 | 
				
			||||||
	//
 | 
					 | 
				
			||||||
	// The major version is also reflected in the package name of the
 | 
					 | 
				
			||||||
	// API, which must end in `v<major-version>`, as in
 | 
					 | 
				
			||||||
	// `google.feature.v1`. For major versions 0 and 1, the suffix can
 | 
					 | 
				
			||||||
	// be omitted. Zero major versions must only be used for
 | 
					 | 
				
			||||||
	// experimental, none-GA apis.
 | 
					 | 
				
			||||||
	//
 | 
					 | 
				
			||||||
	//
 | 
					 | 
				
			||||||
	Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"`
 | 
					 | 
				
			||||||
	// Source context for the protocol buffer service represented by this
 | 
					 | 
				
			||||||
	// message.
 | 
					 | 
				
			||||||
	SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"`
 | 
					 | 
				
			||||||
	// Included APIs. See [Mixin][].
 | 
					 | 
				
			||||||
	Mixins []*Mixin `protobuf:"bytes,6,rep,name=mixins" json:"mixins,omitempty"`
 | 
					 | 
				
			||||||
	// The source syntax of the service.
 | 
					 | 
				
			||||||
	Syntax Syntax `protobuf:"varint,7,opt,name=syntax,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Api) Reset()                    { *m = Api{} }
 | 
					 | 
				
			||||||
func (m *Api) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Api) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Api) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Api) GetMethods() []*Method {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Methods
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Api) GetOptions() []*Option {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Options
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Api) GetSourceContext() *SourceContext {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.SourceContext
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Api) GetMixins() []*Mixin {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Mixins
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Method represents a method of an api.
 | 
					 | 
				
			||||||
type Method struct {
 | 
					 | 
				
			||||||
	// The simple name of this method.
 | 
					 | 
				
			||||||
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
 | 
					 | 
				
			||||||
	// A URL of the input message type.
 | 
					 | 
				
			||||||
	RequestTypeUrl string `protobuf:"bytes,2,opt,name=request_type_url,json=requestTypeUrl" json:"request_type_url,omitempty"`
 | 
					 | 
				
			||||||
	// If true, the request is streamed.
 | 
					 | 
				
			||||||
	RequestStreaming bool `protobuf:"varint,3,opt,name=request_streaming,json=requestStreaming" json:"request_streaming,omitempty"`
 | 
					 | 
				
			||||||
	// The URL of the output message type.
 | 
					 | 
				
			||||||
	ResponseTypeUrl string `protobuf:"bytes,4,opt,name=response_type_url,json=responseTypeUrl" json:"response_type_url,omitempty"`
 | 
					 | 
				
			||||||
	// If true, the response is streamed.
 | 
					 | 
				
			||||||
	ResponseStreaming bool `protobuf:"varint,5,opt,name=response_streaming,json=responseStreaming" json:"response_streaming,omitempty"`
 | 
					 | 
				
			||||||
	// Any metadata attached to the method.
 | 
					 | 
				
			||||||
	Options []*Option `protobuf:"bytes,6,rep,name=options" json:"options,omitempty"`
 | 
					 | 
				
			||||||
	// The source syntax of this method.
 | 
					 | 
				
			||||||
	Syntax Syntax `protobuf:"varint,7,opt,name=syntax,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Method) Reset()                    { *m = Method{} }
 | 
					 | 
				
			||||||
func (m *Method) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Method) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Method) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Method) GetOptions() []*Option {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Options
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Declares an API to be included in this API. The including API must
 | 
					 | 
				
			||||||
// redeclare all the methods from the included API, but documentation
 | 
					 | 
				
			||||||
// and options are inherited as follows:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// - If after comment and whitespace stripping, the documentation
 | 
					 | 
				
			||||||
//   string of the redeclared method is empty, it will be inherited
 | 
					 | 
				
			||||||
//   from the original method.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// - Each annotation belonging to the service config (http,
 | 
					 | 
				
			||||||
//   visibility) which is not set in the redeclared method will be
 | 
					 | 
				
			||||||
//   inherited.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// - If an http annotation is inherited, the path pattern will be
 | 
					 | 
				
			||||||
//   modified as follows. Any version prefix will be replaced by the
 | 
					 | 
				
			||||||
//   version of the including API plus the [root][] path if specified.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Example of a simple mixin:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     package google.acl.v1;
 | 
					 | 
				
			||||||
//     service AccessControl {
 | 
					 | 
				
			||||||
//       // Get the underlying ACL object.
 | 
					 | 
				
			||||||
//       rpc GetAcl(GetAclRequest) returns (Acl) {
 | 
					 | 
				
			||||||
//         option (google.api.http).get = "/v1/{resource=**}:getAcl";
 | 
					 | 
				
			||||||
//       }
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     package google.storage.v2;
 | 
					 | 
				
			||||||
//     service Storage {
 | 
					 | 
				
			||||||
//       rpc GetAcl(GetAclRequest) returns (Acl);
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//       // Get a data record.
 | 
					 | 
				
			||||||
//       rpc GetData(GetDataRequest) returns (Data) {
 | 
					 | 
				
			||||||
//         option (google.api.http).get = "/v2/{resource=**}";
 | 
					 | 
				
			||||||
//       }
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Example of a mixin configuration:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     apis:
 | 
					 | 
				
			||||||
//     - name: google.storage.v2.Storage
 | 
					 | 
				
			||||||
//       mixins:
 | 
					 | 
				
			||||||
//       - name: google.acl.v1.AccessControl
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The mixin construct implies that all methods in `AccessControl` are
 | 
					 | 
				
			||||||
// also declared with same name and request/response types in
 | 
					 | 
				
			||||||
// `Storage`. A documentation generator or annotation processor will
 | 
					 | 
				
			||||||
// see the effective `Storage.GetAcl` method after inherting
 | 
					 | 
				
			||||||
// documentation and annotations as follows:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     service Storage {
 | 
					 | 
				
			||||||
//       // Get the underlying ACL object.
 | 
					 | 
				
			||||||
//       rpc GetAcl(GetAclRequest) returns (Acl) {
 | 
					 | 
				
			||||||
//         option (google.api.http).get = "/v2/{resource=**}:getAcl";
 | 
					 | 
				
			||||||
//       }
 | 
					 | 
				
			||||||
//       ...
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Note how the version in the path pattern changed from `v1` to `v2`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// If the `root` field in the mixin is specified, it should be a
 | 
					 | 
				
			||||||
// relative path under which inherited HTTP paths are placed. Example:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     apis:
 | 
					 | 
				
			||||||
//     - name: google.storage.v2.Storage
 | 
					 | 
				
			||||||
//       mixins:
 | 
					 | 
				
			||||||
//       - name: google.acl.v1.AccessControl
 | 
					 | 
				
			||||||
//         root: acls
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// This implies the following inherited HTTP annotation:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     service Storage {
 | 
					 | 
				
			||||||
//       // Get the underlying ACL object.
 | 
					 | 
				
			||||||
//       rpc GetAcl(GetAclRequest) returns (Acl) {
 | 
					 | 
				
			||||||
//         option (google.api.http).get = "/v2/acls/{resource=**}:getAcl";
 | 
					 | 
				
			||||||
//       }
 | 
					 | 
				
			||||||
//       ...
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
type Mixin struct {
 | 
					 | 
				
			||||||
	// The fully qualified name of the API which is included.
 | 
					 | 
				
			||||||
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
 | 
					 | 
				
			||||||
	// If non-empty specifies a path under which inherited HTTP paths
 | 
					 | 
				
			||||||
	// are rooted.
 | 
					 | 
				
			||||||
	Root string `protobuf:"bytes,2,opt,name=root" json:"root,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Mixin) Reset()                    { *m = Mixin{} }
 | 
					 | 
				
			||||||
func (m *Mixin) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Mixin) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Mixin) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	proto.RegisterType((*Api)(nil), "google.protobuf.Api")
 | 
					 | 
				
			||||||
	proto.RegisterType((*Method)(nil), "google.protobuf.Method")
 | 
					 | 
				
			||||||
	proto.RegisterType((*Mixin)(nil), "google.protobuf.Mixin")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() { proto.RegisterFile("google/protobuf/api.proto", fileDescriptor1) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var fileDescriptor1 = []byte{
 | 
					 | 
				
			||||||
	// 408 bytes of a gzipped FileDescriptorProto
 | 
					 | 
				
			||||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x94, 0x92, 0xd1, 0x4e, 0xc2, 0x30,
 | 
					 | 
				
			||||||
	0x14, 0x86, 0xb3, 0x0d, 0x06, 0x96, 0x08, 0x5a, 0x13, 0x9d, 0x5c, 0x10, 0x42, 0xbc, 0x58, 0x34,
 | 
					 | 
				
			||||||
	0x6e, 0x11, 0x9f, 0x40, 0x8c, 0xe1, 0x82, 0x18, 0x97, 0xa1, 0xf1, 0x92, 0x0c, 0xac, 0xb8, 0x64,
 | 
					 | 
				
			||||||
	0x5b, 0x67, 0xdb, 0x29, 0xbc, 0x8d, 0xf1, 0xd2, 0x4b, 0xdf, 0xc0, 0x37, 0xb3, 0xeb, 0x56, 0xc0,
 | 
					 | 
				
			||||||
	0x81, 0x89, 0xde, 0xf5, 0x9c, 0xff, 0xeb, 0xdf, 0x73, 0xfe, 0x0d, 0x1c, 0x4e, 0x31, 0x9e, 0x06,
 | 
					 | 
				
			||||||
	0xc8, 0x8e, 0x09, 0x66, 0x78, 0x9c, 0x3c, 0xda, 0x5e, 0xec, 0x5b, 0xa2, 0x80, 0x8d, 0x4c, 0xb2,
 | 
					 | 
				
			||||||
	0xa4, 0xd4, 0x3c, 0x2a, 0xb2, 0x14, 0x27, 0x64, 0x82, 0x46, 0x13, 0x1c, 0x31, 0x34, 0x63, 0x19,
 | 
					 | 
				
			||||||
	0xd8, 0x6c, 0x16, 0x29, 0x36, 0x8f, 0x73, 0x93, 0xce, 0x97, 0x0a, 0xb4, 0x8b, 0xd8, 0x87, 0x10,
 | 
					 | 
				
			||||||
	0x94, 0x22, 0x2f, 0x44, 0x86, 0xd2, 0x56, 0xcc, 0x2d, 0x57, 0x9c, 0xe1, 0x19, 0xa8, 0x84, 0x88,
 | 
					 | 
				
			||||||
	0x3d, 0xe1, 0x07, 0x6a, 0xa8, 0x6d, 0xcd, 0xac, 0x75, 0x0f, 0xac, 0xc2, 0x00, 0xd6, 0xb5, 0xd0,
 | 
					 | 
				
			||||||
	0x5d, 0xc9, 0xa5, 0x57, 0x70, 0xcc, 0x7c, 0x1c, 0x51, 0x43, 0xfb, 0xe5, 0xca, 0x8d, 0xd0, 0x5d,
 | 
					 | 
				
			||||||
	0xc9, 0x41, 0x03, 0x54, 0x5e, 0x10, 0xa1, 0xfc, 0x6c, 0x94, 0xc4, 0xe3, 0xb2, 0x84, 0x57, 0xa0,
 | 
					 | 
				
			||||||
	0xfe, 0x73, 0x1f, 0xa3, 0xcc, 0x81, 0x5a, 0xb7, 0xb5, 0xe6, 0x39, 0x14, 0xd8, 0x65, 0x46, 0xb9,
 | 
					 | 
				
			||||||
	0xdb, 0x74, 0xb5, 0x84, 0x16, 0xd0, 0x43, 0x7f, 0xe6, 0xf3, 0x91, 0x74, 0x31, 0xd2, 0xfe, 0xfa,
 | 
					 | 
				
			||||||
	0x16, 0xa9, 0xec, 0xe6, 0x14, 0xb4, 0x81, 0x4e, 0xe7, 0x11, 0xf3, 0x66, 0x46, 0x85, 0x3f, 0x57,
 | 
					 | 
				
			||||||
	0xdf, 0xb0, 0xc2, 0x50, 0xc8, 0x6e, 0x8e, 0x75, 0x3e, 0x55, 0xa0, 0x67, 0x41, 0x6c, 0x8c, 0xd1,
 | 
					 | 
				
			||||||
	0x04, 0x3b, 0x04, 0x3d, 0x27, 0x88, 0xb2, 0x51, 0x1a, 0xfc, 0x28, 0x21, 0x01, 0xcf, 0x33, 0xd5,
 | 
					 | 
				
			||||||
	0xeb, 0x79, 0xff, 0x96, 0xb7, 0xef, 0x48, 0x00, 0x4f, 0xc0, 0xae, 0x24, 0x29, 0x23, 0xc8, 0x0b,
 | 
					 | 
				
			||||||
	0xfd, 0x68, 0xca, 0x73, 0x54, 0xcc, 0xaa, 0x2b, 0x2d, 0x86, 0xb2, 0x0f, 0x8f, 0x53, 0x98, 0xc6,
 | 
					 | 
				
			||||||
	0x3c, 0x42, 0xb4, 0xf4, 0xcd, 0x12, 0x6c, 0x48, 0x41, 0x1a, 0x9f, 0x02, 0xb8, 0x60, 0x97, 0xce,
 | 
					 | 
				
			||||||
	0x65, 0xe1, 0xbc, 0x70, 0x59, 0x5a, 0xaf, 0x7c, 0x45, 0xfd, 0x8f, 0x5f, 0xf1, 0xdf, 0xa1, 0xd9,
 | 
					 | 
				
			||||||
	0xa0, 0x2c, 0x62, 0xdf, 0x18, 0x19, 0xef, 0x11, 0x8c, 0x59, 0x1e, 0x93, 0x38, 0xf7, 0x06, 0x60,
 | 
					 | 
				
			||||||
	0x6f, 0x82, 0xc3, 0xa2, 0x6d, 0xaf, 0xca, 0xff, 0x5e, 0x27, 0x2d, 0x1c, 0xe5, 0x4d, 0x51, 0xde,
 | 
					 | 
				
			||||||
	0x55, 0xad, 0xef, 0xf4, 0x3e, 0xd4, 0x56, 0x3f, 0xc3, 0x1c, 0xf9, 0xfa, 0x3d, 0x0a, 0x82, 0x41,
 | 
					 | 
				
			||||||
	0x84, 0x5f, 0xa3, 0x34, 0x12, 0x3a, 0xd6, 0xc5, 0xfd, 0xf3, 0xef, 0x00, 0x00, 0x00, 0xff, 0xff,
 | 
					 | 
				
			||||||
	0xa4, 0x45, 0xd6, 0xc6, 0x6d, 0x03, 0x00, 0x00,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										95
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/duration.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										95
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/duration.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,95 +0,0 @@
 | 
				
			|||||||
// Code generated by protoc-gen-go.
 | 
					 | 
				
			||||||
// source: google/protobuf/duration.proto
 | 
					 | 
				
			||||||
// DO NOT EDIT!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import proto "github.com/golang/protobuf/proto"
 | 
					 | 
				
			||||||
import fmt "fmt"
 | 
					 | 
				
			||||||
import math "math"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
					 | 
				
			||||||
var _ = proto.Marshal
 | 
					 | 
				
			||||||
var _ = fmt.Errorf
 | 
					 | 
				
			||||||
var _ = math.Inf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// A Duration represents a signed, fixed-length span of time represented
 | 
					 | 
				
			||||||
// as a count of seconds and fractions of seconds at nanosecond
 | 
					 | 
				
			||||||
// resolution. It is independent of any calendar and concepts like "day"
 | 
					 | 
				
			||||||
// or "month". It is related to Timestamp in that the difference between
 | 
					 | 
				
			||||||
// two Timestamp values is a Duration and it can be added or subtracted
 | 
					 | 
				
			||||||
// from a Timestamp. Range is approximately +-10,000 years.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Example 1: Compute Duration from two Timestamps in pseudo code.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     Timestamp start = ...;
 | 
					 | 
				
			||||||
//     Timestamp end = ...;
 | 
					 | 
				
			||||||
//     Duration duration = ...;
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     duration.seconds = end.seconds - start.seconds;
 | 
					 | 
				
			||||||
//     duration.nanos = end.nanos - start.nanos;
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     if (duration.seconds < 0 && duration.nanos > 0) {
 | 
					 | 
				
			||||||
//       duration.seconds += 1;
 | 
					 | 
				
			||||||
//       duration.nanos -= 1000000000;
 | 
					 | 
				
			||||||
//     } else if (durations.seconds > 0 && duration.nanos < 0) {
 | 
					 | 
				
			||||||
//       duration.seconds -= 1;
 | 
					 | 
				
			||||||
//       duration.nanos += 1000000000;
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Example 2: Compute Timestamp from Timestamp + Duration in pseudo code.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     Timestamp start = ...;
 | 
					 | 
				
			||||||
//     Duration duration = ...;
 | 
					 | 
				
			||||||
//     Timestamp end = ...;
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     end.seconds = start.seconds + duration.seconds;
 | 
					 | 
				
			||||||
//     end.nanos = start.nanos + duration.nanos;
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     if (end.nanos < 0) {
 | 
					 | 
				
			||||||
//       end.seconds -= 1;
 | 
					 | 
				
			||||||
//       end.nanos += 1000000000;
 | 
					 | 
				
			||||||
//     } else if (end.nanos >= 1000000000) {
 | 
					 | 
				
			||||||
//       end.seconds += 1;
 | 
					 | 
				
			||||||
//       end.nanos -= 1000000000;
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
type Duration struct {
 | 
					 | 
				
			||||||
	// Signed seconds of the span of time. Must be from -315,576,000,000
 | 
					 | 
				
			||||||
	// to +315,576,000,000 inclusive.
 | 
					 | 
				
			||||||
	Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
 | 
					 | 
				
			||||||
	// Signed fractions of a second at nanosecond resolution of the span
 | 
					 | 
				
			||||||
	// of time. Durations less than one second are represented with a 0
 | 
					 | 
				
			||||||
	// `seconds` field and a positive or negative `nanos` field. For durations
 | 
					 | 
				
			||||||
	// of one second or more, a non-zero value for the `nanos` field must be
 | 
					 | 
				
			||||||
	// of the same sign as the `seconds` field. Must be from -999,999,999
 | 
					 | 
				
			||||||
	// to +999,999,999 inclusive.
 | 
					 | 
				
			||||||
	Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Duration) Reset()                    { *m = Duration{} }
 | 
					 | 
				
			||||||
func (m *Duration) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Duration) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Duration) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
 | 
					 | 
				
			||||||
func (*Duration) XXX_WellKnownType() string   { return "Duration" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	proto.RegisterType((*Duration)(nil), "google.protobuf.Duration")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() { proto.RegisterFile("google/protobuf/duration.proto", fileDescriptor2) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var fileDescriptor2 = []byte{
 | 
					 | 
				
			||||||
	// 161 bytes of a gzipped FileDescriptorProto
 | 
					 | 
				
			||||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
 | 
					 | 
				
			||||||
	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0x29, 0x2d, 0x4a,
 | 
					 | 
				
			||||||
	0x2c, 0xc9, 0xcc, 0xcf, 0xd3, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0x56,
 | 
					 | 
				
			||||||
	0x5c, 0x1c, 0x2e, 0x50, 0x25, 0x42, 0x12, 0x5c, 0xec, 0xc5, 0xa9, 0xc9, 0xf9, 0x79, 0x29, 0xc5,
 | 
					 | 
				
			||||||
	0x12, 0x8c, 0x0a, 0x8c, 0x1a, 0xcc, 0x41, 0x30, 0xae, 0x90, 0x08, 0x17, 0x6b, 0x5e, 0x62, 0x5e,
 | 
					 | 
				
			||||||
	0x7e, 0xb1, 0x04, 0x13, 0x50, 0x9c, 0x35, 0x08, 0xc2, 0x71, 0x0a, 0xe0, 0x12, 0x4e, 0xce, 0xcf,
 | 
					 | 
				
			||||||
	0xd5, 0x43, 0x33, 0xd2, 0x89, 0x17, 0x66, 0x60, 0x00, 0x48, 0x24, 0x80, 0x71, 0x01, 0x23, 0xe3,
 | 
					 | 
				
			||||||
	0x22, 0x26, 0x66, 0xf7, 0x00, 0xa7, 0x55, 0x4c, 0x72, 0xee, 0x10, 0xb5, 0x01, 0x50, 0xb5, 0x7a,
 | 
					 | 
				
			||||||
	0xe1, 0xa9, 0x39, 0x39, 0xde, 0x79, 0xf9, 0xe5, 0x79, 0x21, 0x95, 0x05, 0xa9, 0xc5, 0x49, 0x6c,
 | 
					 | 
				
			||||||
	0x60, 0x43, 0x8c, 0x01, 0x01, 0x00, 0x00, 0xff, 0xff, 0x5b, 0xa9, 0x05, 0xfd, 0xc7, 0x00, 0x00,
 | 
					 | 
				
			||||||
	0x00,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										50
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/empty.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										50
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/empty.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,50 +0,0 @@
 | 
				
			|||||||
// Code generated by protoc-gen-go.
 | 
					 | 
				
			||||||
// source: google/protobuf/empty.proto
 | 
					 | 
				
			||||||
// DO NOT EDIT!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import proto "github.com/golang/protobuf/proto"
 | 
					 | 
				
			||||||
import fmt "fmt"
 | 
					 | 
				
			||||||
import math "math"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
					 | 
				
			||||||
var _ = proto.Marshal
 | 
					 | 
				
			||||||
var _ = fmt.Errorf
 | 
					 | 
				
			||||||
var _ = math.Inf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// A generic empty message that you can re-use to avoid defining duplicated
 | 
					 | 
				
			||||||
// empty messages in your APIs. A typical example is to use it as the request
 | 
					 | 
				
			||||||
// or the response type of an API method. For instance:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     service Foo {
 | 
					 | 
				
			||||||
//       rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `Empty` is empty JSON object `{}`.
 | 
					 | 
				
			||||||
type Empty struct {
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Empty) Reset()                    { *m = Empty{} }
 | 
					 | 
				
			||||||
func (m *Empty) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Empty) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
 | 
					 | 
				
			||||||
func (*Empty) XXX_WellKnownType() string   { return "Empty" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	proto.RegisterType((*Empty)(nil), "google.protobuf.Empty")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() { proto.RegisterFile("google/protobuf/empty.proto", fileDescriptor3) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var fileDescriptor3 = []byte{
 | 
					 | 
				
			||||||
	// 124 bytes of a gzipped FileDescriptorProto
 | 
					 | 
				
			||||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x4e, 0xcf, 0xcf, 0x4f,
 | 
					 | 
				
			||||||
	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcd, 0x2d, 0x28,
 | 
					 | 
				
			||||||
	0xa9, 0xd4, 0x03, 0x73, 0x85, 0xf8, 0x21, 0x92, 0x7a, 0x30, 0x49, 0x25, 0x76, 0x2e, 0x56, 0x57,
 | 
					 | 
				
			||||||
	0x90, 0xbc, 0x53, 0x00, 0x97, 0x70, 0x72, 0x7e, 0xae, 0x1e, 0x9a, 0xbc, 0x13, 0x17, 0x58, 0x36,
 | 
					 | 
				
			||||||
	0x00, 0xc4, 0x0d, 0x60, 0x5c, 0xc0, 0xc8, 0xf8, 0x83, 0x91, 0x71, 0x11, 0x13, 0xb3, 0x7b, 0x80,
 | 
					 | 
				
			||||||
	0xd3, 0x2a, 0x26, 0x39, 0x77, 0x88, 0xda, 0x00, 0xa8, 0x5a, 0xbd, 0xf0, 0xd4, 0x9c, 0x1c, 0xef,
 | 
					 | 
				
			||||||
	0xbc, 0xfc, 0xf2, 0xbc, 0x90, 0xca, 0x82, 0xd4, 0xe2, 0x24, 0x36, 0xb0, 0x21, 0xc6, 0x80, 0x00,
 | 
					 | 
				
			||||||
	0x00, 0x00, 0xff, 0xff, 0xac, 0xca, 0x5b, 0xd0, 0x91, 0x00, 0x00, 0x00,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										167
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/field_mask.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										167
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/field_mask.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,167 +0,0 @@
 | 
				
			|||||||
// Code generated by protoc-gen-go.
 | 
					 | 
				
			||||||
// source: google/protobuf/field_mask.proto
 | 
					 | 
				
			||||||
// DO NOT EDIT!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import proto "github.com/golang/protobuf/proto"
 | 
					 | 
				
			||||||
import fmt "fmt"
 | 
					 | 
				
			||||||
import math "math"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
					 | 
				
			||||||
var _ = proto.Marshal
 | 
					 | 
				
			||||||
var _ = fmt.Errorf
 | 
					 | 
				
			||||||
var _ = math.Inf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// `FieldMask` represents a set of symbolic field paths, for example:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     paths: "f.a"
 | 
					 | 
				
			||||||
//     paths: "f.b.d"
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Here `f` represents a field in some root message, `a` and `b`
 | 
					 | 
				
			||||||
// fields in the message found in `f`, and `d` a field found in the
 | 
					 | 
				
			||||||
// message in `f.b`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Field masks are used to specify a subset of fields that should be
 | 
					 | 
				
			||||||
// returned by a get operation or modified by an update operation.
 | 
					 | 
				
			||||||
// Field masks also have a custom JSON encoding (see below).
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// # Field Masks in Projections
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// When used in the context of a projection, a response message or
 | 
					 | 
				
			||||||
// sub-message is filtered by the API to only contain those fields as
 | 
					 | 
				
			||||||
// specified in the mask. For example, if the mask in the previous
 | 
					 | 
				
			||||||
// example is applied to a response message as follows:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     f {
 | 
					 | 
				
			||||||
//       a : 22
 | 
					 | 
				
			||||||
//       b {
 | 
					 | 
				
			||||||
//         d : 1
 | 
					 | 
				
			||||||
//         x : 2
 | 
					 | 
				
			||||||
//       }
 | 
					 | 
				
			||||||
//       y : 13
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//     z: 8
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The result will not contain specific values for fields x,y and z
 | 
					 | 
				
			||||||
// (their value will be set to the default, and omitted in proto text
 | 
					 | 
				
			||||||
// output):
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     f {
 | 
					 | 
				
			||||||
//       a : 22
 | 
					 | 
				
			||||||
//       b {
 | 
					 | 
				
			||||||
//         d : 1
 | 
					 | 
				
			||||||
//       }
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// A repeated field is not allowed except at the last position of a
 | 
					 | 
				
			||||||
// field mask.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// If a FieldMask object is not present in a get operation, the
 | 
					 | 
				
			||||||
// operation applies to all fields (as if a FieldMask of all fields
 | 
					 | 
				
			||||||
// had been specified).
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Note that a field mask does not necessarily applies to the
 | 
					 | 
				
			||||||
// top-level response message. In case of a REST get operation, the
 | 
					 | 
				
			||||||
// field mask applies directly to the response, but in case of a REST
 | 
					 | 
				
			||||||
// list operation, the mask instead applies to each individual message
 | 
					 | 
				
			||||||
// in the returned resource list. In case of a REST custom method,
 | 
					 | 
				
			||||||
// other definitions may be used. Where the mask applies will be
 | 
					 | 
				
			||||||
// clearly documented together with its declaration in the API.  In
 | 
					 | 
				
			||||||
// any case, the effect on the returned resource/resources is required
 | 
					 | 
				
			||||||
// behavior for APIs.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// # Field Masks in Update Operations
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// A field mask in update operations specifies which fields of the
 | 
					 | 
				
			||||||
// targeted resource are going to be updated. The API is required
 | 
					 | 
				
			||||||
// to only change the values of the fields as specified in the mask
 | 
					 | 
				
			||||||
// and leave the others untouched. If a resource is passed in to
 | 
					 | 
				
			||||||
// describe the updated values, the API ignores the values of all
 | 
					 | 
				
			||||||
// fields not covered by the mask.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// In order to reset a field's value to the default, the field must
 | 
					 | 
				
			||||||
// be in the mask and set to the default value in the provided resource.
 | 
					 | 
				
			||||||
// Hence, in order to reset all fields of a resource, provide a default
 | 
					 | 
				
			||||||
// instance of the resource and set all fields in the mask, or do
 | 
					 | 
				
			||||||
// not provide a mask as described below.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// If a field mask is not present on update, the operation applies to
 | 
					 | 
				
			||||||
// all fields (as if a field mask of all fields has been specified).
 | 
					 | 
				
			||||||
// Note that in the presence of schema evolution, this may mean that
 | 
					 | 
				
			||||||
// fields the client does not know and has therefore not filled into
 | 
					 | 
				
			||||||
// the request will be reset to their default. If this is unwanted
 | 
					 | 
				
			||||||
// behavior, a specific service may require a client to always specify
 | 
					 | 
				
			||||||
// a field mask, producing an error if not.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// As with get operations, the location of the resource which
 | 
					 | 
				
			||||||
// describes the updated values in the request message depends on the
 | 
					 | 
				
			||||||
// operation kind. In any case, the effect of the field mask is
 | 
					 | 
				
			||||||
// required to be honored by the API.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// ## Considerations for HTTP REST
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The HTTP kind of an update operation which uses a field mask must
 | 
					 | 
				
			||||||
// be set to PATCH instead of PUT in order to satisfy HTTP semantics
 | 
					 | 
				
			||||||
// (PUT must only be used for full updates).
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// # JSON Encoding of Field Masks
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// In JSON, a field mask is encoded as a single string where paths are
 | 
					 | 
				
			||||||
// separated by a comma. Fields name in each path are converted
 | 
					 | 
				
			||||||
// to/from lower-camel naming conventions.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// As an example, consider the following message declarations:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     message Profile {
 | 
					 | 
				
			||||||
//       User user = 1;
 | 
					 | 
				
			||||||
//       Photo photo = 2;
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//     message User {
 | 
					 | 
				
			||||||
//       string display_name = 1;
 | 
					 | 
				
			||||||
//       string address = 2;
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// In proto a field mask for `Profile` may look as such:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     mask {
 | 
					 | 
				
			||||||
//       paths: "user.display_name"
 | 
					 | 
				
			||||||
//       paths: "photo"
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// In JSON, the same mask is represented as below:
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     {
 | 
					 | 
				
			||||||
//       mask: "user.displayName,photo"
 | 
					 | 
				
			||||||
//     }
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
type FieldMask struct {
 | 
					 | 
				
			||||||
	// The set of field mask paths.
 | 
					 | 
				
			||||||
	Paths []string `protobuf:"bytes,1,rep,name=paths" json:"paths,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *FieldMask) Reset()                    { *m = FieldMask{} }
 | 
					 | 
				
			||||||
func (m *FieldMask) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*FieldMask) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*FieldMask) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	proto.RegisterType((*FieldMask)(nil), "google.protobuf.FieldMask")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() { proto.RegisterFile("google/protobuf/field_mask.proto", fileDescriptor4) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var fileDescriptor4 = []byte{
 | 
					 | 
				
			||||||
	// 147 bytes of a gzipped FileDescriptorProto
 | 
					 | 
				
			||||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x48, 0xcf, 0xcf, 0x4f,
 | 
					 | 
				
			||||||
	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x4f, 0xcb, 0x4c, 0xcd,
 | 
					 | 
				
			||||||
	0x49, 0x89, 0xcf, 0x4d, 0x2c, 0xce, 0xd6, 0x03, 0x8b, 0x09, 0xf1, 0x43, 0x54, 0xe8, 0xc1, 0x54,
 | 
					 | 
				
			||||||
	0x28, 0x29, 0x72, 0x71, 0xba, 0x81, 0x14, 0xf9, 0x02, 0xd5, 0x08, 0x89, 0x70, 0xb1, 0x16, 0x24,
 | 
					 | 
				
			||||||
	0x96, 0x64, 0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6b, 0x70, 0x06, 0x41, 0x38, 0x4e, 0x81, 0x5c, 0xc2,
 | 
					 | 
				
			||||||
	0xc9, 0xf9, 0xb9, 0x7a, 0x68, 0x3a, 0x9d, 0xf8, 0xe0, 0xfa, 0x02, 0x40, 0x42, 0x01, 0x8c, 0x0b,
 | 
					 | 
				
			||||||
	0x18, 0x19, 0x17, 0x31, 0x31, 0xbb, 0x07, 0x38, 0xad, 0x62, 0x92, 0x73, 0x87, 0x28, 0x0e, 0x80,
 | 
					 | 
				
			||||||
	0x2a, 0xd6, 0x0b, 0x4f, 0xcd, 0xc9, 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0xa9, 0x2c, 0x48, 0x2d,
 | 
					 | 
				
			||||||
	0x4e, 0x62, 0x03, 0x9b, 0x62, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x21, 0xb1, 0xe8, 0x01, 0xb1,
 | 
					 | 
				
			||||||
	0x00, 0x00, 0x00,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										67
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/protobuf.gen.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										67
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/protobuf.gen.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,67 +0,0 @@
 | 
				
			|||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import (
 | 
					 | 
				
			||||||
	"time"
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var (
 | 
					 | 
				
			||||||
	// EmptyInstance is an instance of Empty.
 | 
					 | 
				
			||||||
	EmptyInstance = &Empty{}
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Now returns the current time as a protobuf Timestamp.
 | 
					 | 
				
			||||||
func Now() *Timestamp {
 | 
					 | 
				
			||||||
	return TimeToProto(time.Now().UTC())
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// TimeToProto converts a go Time to a protobuf Timestamp.
 | 
					 | 
				
			||||||
func TimeToProto(t time.Time) *Timestamp {
 | 
					 | 
				
			||||||
	return &Timestamp{
 | 
					 | 
				
			||||||
		Seconds: t.UnixNano() / int64(time.Second),
 | 
					 | 
				
			||||||
		Nanos:   int32(t.UnixNano() % int64(time.Second)),
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// GoTime converts a protobuf Timestamp to a go Time.
 | 
					 | 
				
			||||||
func (t *Timestamp) GoTime() time.Time {
 | 
					 | 
				
			||||||
	if t == nil {
 | 
					 | 
				
			||||||
		return time.Unix(0, 0).UTC()
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return time.Unix(
 | 
					 | 
				
			||||||
		t.Seconds,
 | 
					 | 
				
			||||||
		int64(t.Nanos),
 | 
					 | 
				
			||||||
	).UTC()
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Before returns true if t is before j.
 | 
					 | 
				
			||||||
func (t *Timestamp) Before(j *Timestamp) bool {
 | 
					 | 
				
			||||||
	if j == nil {
 | 
					 | 
				
			||||||
		return false
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if t == nil {
 | 
					 | 
				
			||||||
		return true
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if t.Seconds < j.Seconds {
 | 
					 | 
				
			||||||
		return true
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	if t.Seconds > j.Seconds {
 | 
					 | 
				
			||||||
		return false
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return t.Nanos < j.Nanos
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// DurationToProto converts a go Duration to a protobuf Duration.
 | 
					 | 
				
			||||||
func DurationToProto(d time.Duration) *Duration {
 | 
					 | 
				
			||||||
	return &Duration{
 | 
					 | 
				
			||||||
		Seconds: int64(d) / int64(time.Second),
 | 
					 | 
				
			||||||
		Nanos:   int32(int64(d) % int64(time.Second)),
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// GoDuration converts a protobuf Duration to a go Duration.
 | 
					 | 
				
			||||||
func (d *Duration) GoDuration() time.Duration {
 | 
					 | 
				
			||||||
	if d == nil {
 | 
					 | 
				
			||||||
		return 0
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return time.Duration((d.Seconds * int64(time.Second)) + int64(d.Nanos))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										47
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/source_context.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										47
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/source_context.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,47 +0,0 @@
 | 
				
			|||||||
// Code generated by protoc-gen-go.
 | 
					 | 
				
			||||||
// source: google/protobuf/source_context.proto
 | 
					 | 
				
			||||||
// DO NOT EDIT!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import proto "github.com/golang/protobuf/proto"
 | 
					 | 
				
			||||||
import fmt "fmt"
 | 
					 | 
				
			||||||
import math "math"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
					 | 
				
			||||||
var _ = proto.Marshal
 | 
					 | 
				
			||||||
var _ = fmt.Errorf
 | 
					 | 
				
			||||||
var _ = math.Inf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// `SourceContext` represents information about the source of a
 | 
					 | 
				
			||||||
// protobuf element, like the file in which it is defined.
 | 
					 | 
				
			||||||
type SourceContext struct {
 | 
					 | 
				
			||||||
	// The path-qualified name of the .proto file that contained the associated
 | 
					 | 
				
			||||||
	// protobuf element.  For example: `"google/protobuf/source.proto"`.
 | 
					 | 
				
			||||||
	FileName string `protobuf:"bytes,1,opt,name=file_name,json=fileName" json:"file_name,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *SourceContext) Reset()                    { *m = SourceContext{} }
 | 
					 | 
				
			||||||
func (m *SourceContext) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*SourceContext) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*SourceContext) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	proto.RegisterType((*SourceContext)(nil), "google.protobuf.SourceContext")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() { proto.RegisterFile("google/protobuf/source_context.proto", fileDescriptor5) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var fileDescriptor5 = []byte{
 | 
					 | 
				
			||||||
	// 159 bytes of a gzipped FileDescriptorProto
 | 
					 | 
				
			||||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x52, 0x49, 0xcf, 0xcf, 0x4f,
 | 
					 | 
				
			||||||
	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xce, 0x2f, 0x2d,
 | 
					 | 
				
			||||||
	0x4a, 0x4e, 0x8d, 0x4f, 0xce, 0xcf, 0x2b, 0x49, 0xad, 0x28, 0xd1, 0x03, 0x8b, 0x0b, 0xf1, 0x43,
 | 
					 | 
				
			||||||
	0x54, 0xe9, 0xc1, 0x54, 0x29, 0xe9, 0x70, 0xf1, 0x06, 0x83, 0x15, 0x3a, 0x43, 0xd4, 0x09, 0x49,
 | 
					 | 
				
			||||||
	0x73, 0x71, 0xa6, 0x65, 0xe6, 0xa4, 0xc6, 0xe7, 0x25, 0xe6, 0xa6, 0x4a, 0x30, 0x2a, 0x30, 0x6a,
 | 
					 | 
				
			||||||
	0x70, 0x06, 0x71, 0x80, 0x04, 0xfc, 0x80, 0x7c, 0xa7, 0x50, 0x2e, 0xe1, 0xe4, 0xfc, 0x5c, 0x3d,
 | 
					 | 
				
			||||||
	0x34, 0x43, 0x9c, 0x84, 0x50, 0x8c, 0x08, 0x00, 0x09, 0x07, 0x30, 0x2e, 0x60, 0x64, 0x5c, 0xc4,
 | 
					 | 
				
			||||||
	0xc4, 0xec, 0x1e, 0xe0, 0xb4, 0x8a, 0x49, 0xce, 0x1d, 0xa2, 0x21, 0x00, 0xaa, 0x41, 0x2f, 0x3c,
 | 
					 | 
				
			||||||
	0x35, 0x27, 0xc7, 0x3b, 0x2f, 0xbf, 0x3c, 0x2f, 0xa4, 0xb2, 0x20, 0xb5, 0x38, 0x89, 0x0d, 0x6c,
 | 
					 | 
				
			||||||
	0x92, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0xb6, 0x80, 0x1f, 0xc2, 0xc4, 0x00, 0x00, 0x00,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										361
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/struct.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										361
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/struct.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,361 +0,0 @@
 | 
				
			|||||||
// Code generated by protoc-gen-go.
 | 
					 | 
				
			||||||
// source: google/protobuf/struct.proto
 | 
					 | 
				
			||||||
// DO NOT EDIT!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import proto "github.com/golang/protobuf/proto"
 | 
					 | 
				
			||||||
import fmt "fmt"
 | 
					 | 
				
			||||||
import math "math"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
					 | 
				
			||||||
var _ = proto.Marshal
 | 
					 | 
				
			||||||
var _ = fmt.Errorf
 | 
					 | 
				
			||||||
var _ = math.Inf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// `NullValue` is a singleton enumeration to represent the null value for the
 | 
					 | 
				
			||||||
// `Value` type union.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//  The JSON representation for `NullValue` is JSON `null`.
 | 
					 | 
				
			||||||
type NullValue int32
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const (
 | 
					 | 
				
			||||||
	// Null value.
 | 
					 | 
				
			||||||
	NullValue_NULL_VALUE NullValue = 0
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var NullValue_name = map[int32]string{
 | 
					 | 
				
			||||||
	0: "NULL_VALUE",
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
var NullValue_value = map[string]int32{
 | 
					 | 
				
			||||||
	"NULL_VALUE": 0,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (x NullValue) String() string {
 | 
					 | 
				
			||||||
	return proto.EnumName(NullValue_name, int32(x))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
func (NullValue) EnumDescriptor() ([]byte, []int) { return fileDescriptor6, []int{0} }
 | 
					 | 
				
			||||||
func (NullValue) XXX_WellKnownType() string       { return "NullValue" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// `Struct` represents a structured data value, consisting of fields
 | 
					 | 
				
			||||||
// which map to dynamically typed values. In some languages, `Struct`
 | 
					 | 
				
			||||||
// might be supported by a native representation. For example, in
 | 
					 | 
				
			||||||
// scripting languages like JS a struct is represented as an
 | 
					 | 
				
			||||||
// object. The details of that representation are described together
 | 
					 | 
				
			||||||
// with the proto support for the language.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `Struct` is JSON object.
 | 
					 | 
				
			||||||
type Struct struct {
 | 
					 | 
				
			||||||
	// Map of dynamically typed values.
 | 
					 | 
				
			||||||
	Fields map[string]*Value `protobuf:"bytes,1,rep,name=fields" json:"fields,omitempty" protobuf_key:"bytes,1,opt,name=key" protobuf_val:"bytes,2,opt,name=value"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Struct) Reset()                    { *m = Struct{} }
 | 
					 | 
				
			||||||
func (m *Struct) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Struct) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Struct) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{0} }
 | 
					 | 
				
			||||||
func (*Struct) XXX_WellKnownType() string   { return "Struct" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Struct) GetFields() map[string]*Value {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Fields
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// `Value` represents a dynamically typed value which can be either
 | 
					 | 
				
			||||||
// null, a number, a string, a boolean, a recursive struct value, or a
 | 
					 | 
				
			||||||
// list of values. A producer of value is expected to set one of that
 | 
					 | 
				
			||||||
// variants, absence of any variant indicates an error.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `Value` is JSON value.
 | 
					 | 
				
			||||||
type Value struct {
 | 
					 | 
				
			||||||
	// The kind of value.
 | 
					 | 
				
			||||||
	//
 | 
					 | 
				
			||||||
	// Types that are valid to be assigned to Kind:
 | 
					 | 
				
			||||||
	//	*Value_NullValue
 | 
					 | 
				
			||||||
	//	*Value_NumberValue
 | 
					 | 
				
			||||||
	//	*Value_StringValue
 | 
					 | 
				
			||||||
	//	*Value_BoolValue
 | 
					 | 
				
			||||||
	//	*Value_StructValue
 | 
					 | 
				
			||||||
	//	*Value_ListValue
 | 
					 | 
				
			||||||
	Kind isValue_Kind `protobuf_oneof:"kind"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Value) Reset()                    { *m = Value{} }
 | 
					 | 
				
			||||||
func (m *Value) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Value) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Value) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{1} }
 | 
					 | 
				
			||||||
func (*Value) XXX_WellKnownType() string   { return "Value" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
type isValue_Kind interface {
 | 
					 | 
				
			||||||
	isValue_Kind()
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
type Value_NullValue struct {
 | 
					 | 
				
			||||||
	NullValue NullValue `protobuf:"varint,1,opt,name=null_value,json=nullValue,enum=google.protobuf.NullValue,oneof"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
type Value_NumberValue struct {
 | 
					 | 
				
			||||||
	NumberValue float64 `protobuf:"fixed64,2,opt,name=number_value,json=numberValue,oneof"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
type Value_StringValue struct {
 | 
					 | 
				
			||||||
	StringValue string `protobuf:"bytes,3,opt,name=string_value,json=stringValue,oneof"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
type Value_BoolValue struct {
 | 
					 | 
				
			||||||
	BoolValue bool `protobuf:"varint,4,opt,name=bool_value,json=boolValue,oneof"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
type Value_StructValue struct {
 | 
					 | 
				
			||||||
	StructValue *Struct `protobuf:"bytes,5,opt,name=struct_value,json=structValue,oneof"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
type Value_ListValue struct {
 | 
					 | 
				
			||||||
	ListValue *ListValue `protobuf:"bytes,6,opt,name=list_value,json=listValue,oneof"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (*Value_NullValue) isValue_Kind()   {}
 | 
					 | 
				
			||||||
func (*Value_NumberValue) isValue_Kind() {}
 | 
					 | 
				
			||||||
func (*Value_StringValue) isValue_Kind() {}
 | 
					 | 
				
			||||||
func (*Value_BoolValue) isValue_Kind()   {}
 | 
					 | 
				
			||||||
func (*Value_StructValue) isValue_Kind() {}
 | 
					 | 
				
			||||||
func (*Value_ListValue) isValue_Kind()   {}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Value) GetKind() isValue_Kind {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Kind
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Value) GetNullValue() NullValue {
 | 
					 | 
				
			||||||
	if x, ok := m.GetKind().(*Value_NullValue); ok {
 | 
					 | 
				
			||||||
		return x.NullValue
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return NullValue_NULL_VALUE
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Value) GetNumberValue() float64 {
 | 
					 | 
				
			||||||
	if x, ok := m.GetKind().(*Value_NumberValue); ok {
 | 
					 | 
				
			||||||
		return x.NumberValue
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return 0
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Value) GetStringValue() string {
 | 
					 | 
				
			||||||
	if x, ok := m.GetKind().(*Value_StringValue); ok {
 | 
					 | 
				
			||||||
		return x.StringValue
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return ""
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Value) GetBoolValue() bool {
 | 
					 | 
				
			||||||
	if x, ok := m.GetKind().(*Value_BoolValue); ok {
 | 
					 | 
				
			||||||
		return x.BoolValue
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return false
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Value) GetStructValue() *Struct {
 | 
					 | 
				
			||||||
	if x, ok := m.GetKind().(*Value_StructValue); ok {
 | 
					 | 
				
			||||||
		return x.StructValue
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Value) GetListValue() *ListValue {
 | 
					 | 
				
			||||||
	if x, ok := m.GetKind().(*Value_ListValue); ok {
 | 
					 | 
				
			||||||
		return x.ListValue
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// XXX_OneofFuncs is for the internal use of the proto package.
 | 
					 | 
				
			||||||
func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
 | 
					 | 
				
			||||||
	return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{
 | 
					 | 
				
			||||||
		(*Value_NullValue)(nil),
 | 
					 | 
				
			||||||
		(*Value_NumberValue)(nil),
 | 
					 | 
				
			||||||
		(*Value_StringValue)(nil),
 | 
					 | 
				
			||||||
		(*Value_BoolValue)(nil),
 | 
					 | 
				
			||||||
		(*Value_StructValue)(nil),
 | 
					 | 
				
			||||||
		(*Value_ListValue)(nil),
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func _Value_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
 | 
					 | 
				
			||||||
	m := msg.(*Value)
 | 
					 | 
				
			||||||
	// kind
 | 
					 | 
				
			||||||
	switch x := m.Kind.(type) {
 | 
					 | 
				
			||||||
	case *Value_NullValue:
 | 
					 | 
				
			||||||
		b.EncodeVarint(1<<3 | proto.WireVarint)
 | 
					 | 
				
			||||||
		b.EncodeVarint(uint64(x.NullValue))
 | 
					 | 
				
			||||||
	case *Value_NumberValue:
 | 
					 | 
				
			||||||
		b.EncodeVarint(2<<3 | proto.WireFixed64)
 | 
					 | 
				
			||||||
		b.EncodeFixed64(math.Float64bits(x.NumberValue))
 | 
					 | 
				
			||||||
	case *Value_StringValue:
 | 
					 | 
				
			||||||
		b.EncodeVarint(3<<3 | proto.WireBytes)
 | 
					 | 
				
			||||||
		b.EncodeStringBytes(x.StringValue)
 | 
					 | 
				
			||||||
	case *Value_BoolValue:
 | 
					 | 
				
			||||||
		t := uint64(0)
 | 
					 | 
				
			||||||
		if x.BoolValue {
 | 
					 | 
				
			||||||
			t = 1
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		b.EncodeVarint(4<<3 | proto.WireVarint)
 | 
					 | 
				
			||||||
		b.EncodeVarint(t)
 | 
					 | 
				
			||||||
	case *Value_StructValue:
 | 
					 | 
				
			||||||
		b.EncodeVarint(5<<3 | proto.WireBytes)
 | 
					 | 
				
			||||||
		if err := b.EncodeMessage(x.StructValue); err != nil {
 | 
					 | 
				
			||||||
			return err
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	case *Value_ListValue:
 | 
					 | 
				
			||||||
		b.EncodeVarint(6<<3 | proto.WireBytes)
 | 
					 | 
				
			||||||
		if err := b.EncodeMessage(x.ListValue); err != nil {
 | 
					 | 
				
			||||||
			return err
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
	case nil:
 | 
					 | 
				
			||||||
	default:
 | 
					 | 
				
			||||||
		return fmt.Errorf("Value.Kind has unexpected type %T", x)
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func _Value_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
 | 
					 | 
				
			||||||
	m := msg.(*Value)
 | 
					 | 
				
			||||||
	switch tag {
 | 
					 | 
				
			||||||
	case 1: // kind.null_value
 | 
					 | 
				
			||||||
		if wire != proto.WireVarint {
 | 
					 | 
				
			||||||
			return true, proto.ErrInternalBadWireType
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		x, err := b.DecodeVarint()
 | 
					 | 
				
			||||||
		m.Kind = &Value_NullValue{NullValue(x)}
 | 
					 | 
				
			||||||
		return true, err
 | 
					 | 
				
			||||||
	case 2: // kind.number_value
 | 
					 | 
				
			||||||
		if wire != proto.WireFixed64 {
 | 
					 | 
				
			||||||
			return true, proto.ErrInternalBadWireType
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		x, err := b.DecodeFixed64()
 | 
					 | 
				
			||||||
		m.Kind = &Value_NumberValue{math.Float64frombits(x)}
 | 
					 | 
				
			||||||
		return true, err
 | 
					 | 
				
			||||||
	case 3: // kind.string_value
 | 
					 | 
				
			||||||
		if wire != proto.WireBytes {
 | 
					 | 
				
			||||||
			return true, proto.ErrInternalBadWireType
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		x, err := b.DecodeStringBytes()
 | 
					 | 
				
			||||||
		m.Kind = &Value_StringValue{x}
 | 
					 | 
				
			||||||
		return true, err
 | 
					 | 
				
			||||||
	case 4: // kind.bool_value
 | 
					 | 
				
			||||||
		if wire != proto.WireVarint {
 | 
					 | 
				
			||||||
			return true, proto.ErrInternalBadWireType
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		x, err := b.DecodeVarint()
 | 
					 | 
				
			||||||
		m.Kind = &Value_BoolValue{x != 0}
 | 
					 | 
				
			||||||
		return true, err
 | 
					 | 
				
			||||||
	case 5: // kind.struct_value
 | 
					 | 
				
			||||||
		if wire != proto.WireBytes {
 | 
					 | 
				
			||||||
			return true, proto.ErrInternalBadWireType
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		msg := new(Struct)
 | 
					 | 
				
			||||||
		err := b.DecodeMessage(msg)
 | 
					 | 
				
			||||||
		m.Kind = &Value_StructValue{msg}
 | 
					 | 
				
			||||||
		return true, err
 | 
					 | 
				
			||||||
	case 6: // kind.list_value
 | 
					 | 
				
			||||||
		if wire != proto.WireBytes {
 | 
					 | 
				
			||||||
			return true, proto.ErrInternalBadWireType
 | 
					 | 
				
			||||||
		}
 | 
					 | 
				
			||||||
		msg := new(ListValue)
 | 
					 | 
				
			||||||
		err := b.DecodeMessage(msg)
 | 
					 | 
				
			||||||
		m.Kind = &Value_ListValue{msg}
 | 
					 | 
				
			||||||
		return true, err
 | 
					 | 
				
			||||||
	default:
 | 
					 | 
				
			||||||
		return false, nil
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func _Value_OneofSizer(msg proto.Message) (n int) {
 | 
					 | 
				
			||||||
	m := msg.(*Value)
 | 
					 | 
				
			||||||
	// kind
 | 
					 | 
				
			||||||
	switch x := m.Kind.(type) {
 | 
					 | 
				
			||||||
	case *Value_NullValue:
 | 
					 | 
				
			||||||
		n += proto.SizeVarint(1<<3 | proto.WireVarint)
 | 
					 | 
				
			||||||
		n += proto.SizeVarint(uint64(x.NullValue))
 | 
					 | 
				
			||||||
	case *Value_NumberValue:
 | 
					 | 
				
			||||||
		n += proto.SizeVarint(2<<3 | proto.WireFixed64)
 | 
					 | 
				
			||||||
		n += 8
 | 
					 | 
				
			||||||
	case *Value_StringValue:
 | 
					 | 
				
			||||||
		n += proto.SizeVarint(3<<3 | proto.WireBytes)
 | 
					 | 
				
			||||||
		n += proto.SizeVarint(uint64(len(x.StringValue)))
 | 
					 | 
				
			||||||
		n += len(x.StringValue)
 | 
					 | 
				
			||||||
	case *Value_BoolValue:
 | 
					 | 
				
			||||||
		n += proto.SizeVarint(4<<3 | proto.WireVarint)
 | 
					 | 
				
			||||||
		n += 1
 | 
					 | 
				
			||||||
	case *Value_StructValue:
 | 
					 | 
				
			||||||
		s := proto.Size(x.StructValue)
 | 
					 | 
				
			||||||
		n += proto.SizeVarint(5<<3 | proto.WireBytes)
 | 
					 | 
				
			||||||
		n += proto.SizeVarint(uint64(s))
 | 
					 | 
				
			||||||
		n += s
 | 
					 | 
				
			||||||
	case *Value_ListValue:
 | 
					 | 
				
			||||||
		s := proto.Size(x.ListValue)
 | 
					 | 
				
			||||||
		n += proto.SizeVarint(6<<3 | proto.WireBytes)
 | 
					 | 
				
			||||||
		n += proto.SizeVarint(uint64(s))
 | 
					 | 
				
			||||||
		n += s
 | 
					 | 
				
			||||||
	case nil:
 | 
					 | 
				
			||||||
	default:
 | 
					 | 
				
			||||||
		panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return n
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// `ListValue` is a wrapper around a repeated field of values.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `ListValue` is JSON array.
 | 
					 | 
				
			||||||
type ListValue struct {
 | 
					 | 
				
			||||||
	// Repeated field of dynamically typed values.
 | 
					 | 
				
			||||||
	Values []*Value `protobuf:"bytes,1,rep,name=values" json:"values,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *ListValue) Reset()                    { *m = ListValue{} }
 | 
					 | 
				
			||||||
func (m *ListValue) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*ListValue) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*ListValue) Descriptor() ([]byte, []int) { return fileDescriptor6, []int{2} }
 | 
					 | 
				
			||||||
func (*ListValue) XXX_WellKnownType() string   { return "ListValue" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *ListValue) GetValues() []*Value {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Values
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	proto.RegisterType((*Struct)(nil), "google.protobuf.Struct")
 | 
					 | 
				
			||||||
	proto.RegisterType((*Value)(nil), "google.protobuf.Value")
 | 
					 | 
				
			||||||
	proto.RegisterType((*ListValue)(nil), "google.protobuf.ListValue")
 | 
					 | 
				
			||||||
	proto.RegisterEnum("google.protobuf.NullValue", NullValue_name, NullValue_value)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() { proto.RegisterFile("google/protobuf/struct.proto", fileDescriptor6) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var fileDescriptor6 = []byte{
 | 
					 | 
				
			||||||
	// 378 bytes of a gzipped FileDescriptorProto
 | 
					 | 
				
			||||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0x74, 0x91, 0x4b, 0x4f, 0xe2, 0x50,
 | 
					 | 
				
			||||||
	0x14, 0xc7, 0xb9, 0x2d, 0x34, 0xd3, 0xd3, 0x09, 0x43, 0x3a, 0xc9, 0x0c, 0x61, 0x26, 0x6a, 0x60,
 | 
					 | 
				
			||||||
	0x43, 0x8c, 0x29, 0x09, 0x6e, 0x8c, 0xb8, 0xb1, 0x09, 0x62, 0x62, 0x43, 0x6a, 0x15, 0x5c, 0x12,
 | 
					 | 
				
			||||||
	0x0b, 0x85, 0x34, 0x5c, 0xee, 0x25, 0x7d, 0x68, 0xf8, 0x26, 0x2e, 0x8d, 0x4b, 0x97, 0x7e, 0x42,
 | 
					 | 
				
			||||||
	0xef, 0xa3, 0xad, 0x06, 0xc2, 0xee, 0x9e, 0xff, 0xf9, 0x9d, 0xff, 0x79, 0x5c, 0xf8, 0xbf, 0xa0,
 | 
					 | 
				
			||||||
	0x74, 0x81, 0x83, 0xce, 0x3a, 0xa2, 0x09, 0xf5, 0xd3, 0x79, 0x27, 0x4e, 0xa2, 0x74, 0x9a, 0x58,
 | 
					 | 
				
			||||||
	0x22, 0x36, 0x7f, 0xc9, 0xac, 0x95, 0x67, 0x9b, 0x2f, 0x08, 0xb4, 0x3b, 0x41, 0x98, 0x3d, 0xd0,
 | 
					 | 
				
			||||||
	0xe6, 0x61, 0x80, 0x67, 0x71, 0x1d, 0x1d, 0xa9, 0x6d, 0xa3, 0xdb, 0xb2, 0xb6, 0x60, 0x4b, 0x82,
 | 
					 | 
				
			||||||
	0xd6, 0x95, 0xa0, 0xfa, 0x24, 0x89, 0x36, 0x5e, 0x56, 0xd2, 0xb8, 0x05, 0xe3, 0x9b, 0x6c, 0xd6,
 | 
					 | 
				
			||||||
	0x40, 0x5d, 0x06, 0x1b, 0x66, 0x84, 0xda, 0xba, 0xc7, 0x9f, 0xe6, 0x09, 0x54, 0x9e, 0x1e, 0x71,
 | 
					 | 
				
			||||||
	0x1a, 0xd4, 0x15, 0xa6, 0x19, 0xdd, 0x3f, 0x3b, 0xe6, 0x63, 0x9e, 0xf5, 0x24, 0x74, 0xae, 0x9c,
 | 
					 | 
				
			||||||
	0xa1, 0xe6, 0x87, 0x02, 0x15, 0x21, 0xb2, 0xc9, 0x80, 0xa4, 0x18, 0x4f, 0xa4, 0x01, 0x37, 0xad,
 | 
					 | 
				
			||||||
	0x76, 0x1b, 0x3b, 0x06, 0x43, 0x86, 0x08, 0xfe, 0xba, 0xe4, 0xe9, 0x24, 0x0f, 0xcc, 0x16, 0xfc,
 | 
					 | 
				
			||||||
	0x24, 0xe9, 0xca, 0x0f, 0xa2, 0xc9, 0x57, 0x7f, 0xc4, 0x10, 0x43, 0xaa, 0x05, 0xc4, 0xee, 0x14,
 | 
					 | 
				
			||||||
	0x92, 0x45, 0x06, 0xa9, 0x7c, 0x70, 0x0e, 0x49, 0x55, 0x42, 0x87, 0x00, 0x3e, 0xa5, 0xf9, 0x18,
 | 
					 | 
				
			||||||
	0x65, 0x86, 0xfc, 0xe0, 0xad, 0xb8, 0x26, 0x81, 0x0b, 0xe1, 0xc2, 0x4e, 0x94, 0x21, 0x15, 0xb1,
 | 
					 | 
				
			||||||
	0xea, 0xdf, 0x3d, 0x77, 0xcc, 0xec, 0xd9, 0xab, 0xd8, 0x12, 0x87, 0x71, 0x5e, 0xab, 0x89, 0xda,
 | 
					 | 
				
			||||||
	0xdd, 0x2d, 0x1d, 0x86, 0x14, 0x5b, 0xe2, 0x3c, 0xb0, 0x35, 0x28, 0x2f, 0x43, 0x32, 0x6b, 0xf6,
 | 
					 | 
				
			||||||
	0x40, 0x2f, 0x08, 0xd3, 0x02, 0x4d, 0x98, 0xe5, 0x3f, 0xba, 0xef, 0xe8, 0x19, 0x75, 0xfc, 0x0f,
 | 
					 | 
				
			||||||
	0xf4, 0xe2, 0x88, 0x66, 0x15, 0x60, 0x38, 0x72, 0x9c, 0xc9, 0xf8, 0xd2, 0x19, 0xf5, 0x6b, 0x25,
 | 
					 | 
				
			||||||
	0x7b, 0x08, 0xbf, 0xa7, 0x74, 0xb5, 0xed, 0x60, 0x1b, 0x72, 0x19, 0x97, 0xc7, 0x2e, 0x7a, 0x45,
 | 
					 | 
				
			||||||
	0xe8, 0x4d, 0x51, 0x07, 0xae, 0xfd, 0xae, 0x1c, 0x0c, 0x24, 0xe9, 0xe6, 0xbd, 0x1e, 0x02, 0x8c,
 | 
					 | 
				
			||||||
	0x6f, 0x08, 0x7d, 0x26, 0xf7, 0x9b, 0x75, 0x10, 0xfb, 0x9a, 0xb0, 0x38, 0xfd, 0x0c, 0x00, 0x00,
 | 
					 | 
				
			||||||
	0xff, 0xff, 0x08, 0x22, 0x4f, 0xb6, 0xb1, 0x02, 0x00, 0x00,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										108
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/timestamp.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										108
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/timestamp.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,108 +0,0 @@
 | 
				
			|||||||
// Code generated by protoc-gen-go.
 | 
					 | 
				
			||||||
// source: google/protobuf/timestamp.proto
 | 
					 | 
				
			||||||
// DO NOT EDIT!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import proto "github.com/golang/protobuf/proto"
 | 
					 | 
				
			||||||
import fmt "fmt"
 | 
					 | 
				
			||||||
import math "math"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
					 | 
				
			||||||
var _ = proto.Marshal
 | 
					 | 
				
			||||||
var _ = fmt.Errorf
 | 
					 | 
				
			||||||
var _ = math.Inf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// A Timestamp represents a point in time independent of any time zone
 | 
					 | 
				
			||||||
// or calendar, represented as seconds and fractions of seconds at
 | 
					 | 
				
			||||||
// nanosecond resolution in UTC Epoch time. It is encoded using the
 | 
					 | 
				
			||||||
// Proleptic Gregorian Calendar which extends the Gregorian calendar
 | 
					 | 
				
			||||||
// backwards to year one. It is encoded assuming all minutes are 60
 | 
					 | 
				
			||||||
// seconds long, i.e. leap seconds are "smeared" so that no leap second
 | 
					 | 
				
			||||||
// table is needed for interpretation. Range is from
 | 
					 | 
				
			||||||
// 0001-01-01T00:00:00Z to 9999-12-31T23:59:59.999999999Z.
 | 
					 | 
				
			||||||
// By restricting to that range, we ensure that we can convert to
 | 
					 | 
				
			||||||
// and from  RFC 3339 date strings.
 | 
					 | 
				
			||||||
// See [https://www.ietf.org/rfc/rfc3339.txt](https://www.ietf.org/rfc/rfc3339.txt).
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Example 1: Compute Timestamp from POSIX `time()`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     Timestamp timestamp;
 | 
					 | 
				
			||||||
//     timestamp.set_seconds(time(NULL));
 | 
					 | 
				
			||||||
//     timestamp.set_nanos(0);
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Example 2: Compute Timestamp from POSIX `gettimeofday()`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     struct timeval tv;
 | 
					 | 
				
			||||||
//     gettimeofday(&tv, NULL);
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     Timestamp timestamp;
 | 
					 | 
				
			||||||
//     timestamp.set_seconds(tv.tv_sec);
 | 
					 | 
				
			||||||
//     timestamp.set_nanos(tv.tv_usec * 1000);
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Example 3: Compute Timestamp from Win32 `GetSystemTimeAsFileTime()`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     FILETIME ft;
 | 
					 | 
				
			||||||
//     GetSystemTimeAsFileTime(&ft);
 | 
					 | 
				
			||||||
//     UINT64 ticks = (((UINT64)ft.dwHighDateTime) << 32) | ft.dwLowDateTime;
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     // A Windows tick is 100 nanoseconds. Windows epoch 1601-01-01T00:00:00Z
 | 
					 | 
				
			||||||
//     // is 11644473600 seconds before Unix epoch 1970-01-01T00:00:00Z.
 | 
					 | 
				
			||||||
//     Timestamp timestamp;
 | 
					 | 
				
			||||||
//     timestamp.set_seconds((INT64) ((ticks / 10000000) - 11644473600LL));
 | 
					 | 
				
			||||||
//     timestamp.set_nanos((INT32) ((ticks % 10000000) * 100));
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Example 4: Compute Timestamp from Java `System.currentTimeMillis()`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     long millis = System.currentTimeMillis();
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     Timestamp timestamp = Timestamp.newBuilder().setSeconds(millis / 1000)
 | 
					 | 
				
			||||||
//         .setNanos((int) ((millis % 1000) * 1000000)).build();
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// Example 5: Compute Timestamp from current time in Python.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//     now = time.time()
 | 
					 | 
				
			||||||
//     seconds = int(now)
 | 
					 | 
				
			||||||
//     nanos = int((now - seconds) * 10**9)
 | 
					 | 
				
			||||||
//     timestamp = Timestamp(seconds=seconds, nanos=nanos)
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
type Timestamp struct {
 | 
					 | 
				
			||||||
	// Represents seconds of UTC time since Unix epoch
 | 
					 | 
				
			||||||
	// 1970-01-01T00:00:00Z. Must be from from 0001-01-01T00:00:00Z to
 | 
					 | 
				
			||||||
	// 9999-12-31T23:59:59Z inclusive.
 | 
					 | 
				
			||||||
	Seconds int64 `protobuf:"varint,1,opt,name=seconds" json:"seconds,omitempty"`
 | 
					 | 
				
			||||||
	// Non-negative fractions of a second at nanosecond resolution. Negative
 | 
					 | 
				
			||||||
	// second values with fractions must still have non-negative nanos values
 | 
					 | 
				
			||||||
	// that count forward in time. Must be from 0 to 999,999,999
 | 
					 | 
				
			||||||
	// inclusive.
 | 
					 | 
				
			||||||
	Nanos int32 `protobuf:"varint,2,opt,name=nanos" json:"nanos,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Timestamp) Reset()                    { *m = Timestamp{} }
 | 
					 | 
				
			||||||
func (m *Timestamp) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Timestamp) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Timestamp) Descriptor() ([]byte, []int) { return fileDescriptor7, []int{0} }
 | 
					 | 
				
			||||||
func (*Timestamp) XXX_WellKnownType() string   { return "Timestamp" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	proto.RegisterType((*Timestamp)(nil), "google.protobuf.Timestamp")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() { proto.RegisterFile("google/protobuf/timestamp.proto", fileDescriptor7) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var fileDescriptor7 = []byte{
 | 
					 | 
				
			||||||
	// 165 bytes of a gzipped FileDescriptorProto
 | 
					 | 
				
			||||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x4f, 0xcf, 0xcf, 0x4f,
 | 
					 | 
				
			||||||
	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0xc9, 0xcc, 0x4d,
 | 
					 | 
				
			||||||
	0x2d, 0x2e, 0x49, 0xcc, 0x2d, 0xd0, 0x03, 0x0b, 0x09, 0xf1, 0x43, 0x14, 0xe8, 0xc1, 0x14, 0x28,
 | 
					 | 
				
			||||||
	0x59, 0x73, 0x71, 0x86, 0xc0, 0xd4, 0x08, 0x49, 0x70, 0xb1, 0x17, 0xa7, 0x26, 0xe7, 0xe7, 0xa5,
 | 
					 | 
				
			||||||
	0x14, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x30, 0x07, 0xc1, 0xb8, 0x42, 0x22, 0x5c, 0xac, 0x79, 0x89,
 | 
					 | 
				
			||||||
	0x79, 0xf9, 0xc5, 0x12, 0x4c, 0x40, 0x71, 0xd6, 0x20, 0x08, 0xc7, 0x29, 0x84, 0x4b, 0x38, 0x39,
 | 
					 | 
				
			||||||
	0x3f, 0x57, 0x0f, 0xcd, 0x4c, 0x27, 0x3e, 0xb8, 0x89, 0x01, 0x20, 0xa1, 0x00, 0xc6, 0x05, 0x8c,
 | 
					 | 
				
			||||||
	0x8c, 0x3f, 0x18, 0x19, 0x17, 0x31, 0x31, 0xbb, 0x07, 0x38, 0xad, 0x62, 0x92, 0x73, 0x87, 0xa8,
 | 
					 | 
				
			||||||
	0x0f, 0x80, 0xaa, 0xd7, 0x0b, 0x4f, 0xcd, 0xc9, 0xf1, 0xce, 0xcb, 0x2f, 0xcf, 0x0b, 0xa9, 0x2c,
 | 
					 | 
				
			||||||
	0x48, 0x2d, 0x4e, 0x62, 0x03, 0x1b, 0x64, 0x0c, 0x08, 0x00, 0x00, 0xff, 0xff, 0x10, 0x2f, 0xb9,
 | 
					 | 
				
			||||||
	0x47, 0xcd, 0x00, 0x00, 0x00,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										390
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/type.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										390
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/type.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,390 +0,0 @@
 | 
				
			|||||||
// Code generated by protoc-gen-go.
 | 
					 | 
				
			||||||
// source: google/protobuf/type.proto
 | 
					 | 
				
			||||||
// DO NOT EDIT!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import proto "github.com/golang/protobuf/proto"
 | 
					 | 
				
			||||||
import fmt "fmt"
 | 
					 | 
				
			||||||
import math "math"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
					 | 
				
			||||||
var _ = proto.Marshal
 | 
					 | 
				
			||||||
var _ = fmt.Errorf
 | 
					 | 
				
			||||||
var _ = math.Inf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// The syntax in which a protocol buffer element is defined.
 | 
					 | 
				
			||||||
type Syntax int32
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const (
 | 
					 | 
				
			||||||
	// Syntax `proto2`.
 | 
					 | 
				
			||||||
	Syntax_SYNTAX_PROTO2 Syntax = 0
 | 
					 | 
				
			||||||
	// Syntax `proto3`.
 | 
					 | 
				
			||||||
	Syntax_SYNTAX_PROTO3 Syntax = 1
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var Syntax_name = map[int32]string{
 | 
					 | 
				
			||||||
	0: "SYNTAX_PROTO2",
 | 
					 | 
				
			||||||
	1: "SYNTAX_PROTO3",
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
var Syntax_value = map[string]int32{
 | 
					 | 
				
			||||||
	"SYNTAX_PROTO2": 0,
 | 
					 | 
				
			||||||
	"SYNTAX_PROTO3": 1,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (x Syntax) String() string {
 | 
					 | 
				
			||||||
	return proto.EnumName(Syntax_name, int32(x))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
func (Syntax) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{0} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Basic field types.
 | 
					 | 
				
			||||||
type Field_Kind int32
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const (
 | 
					 | 
				
			||||||
	// Field type unknown.
 | 
					 | 
				
			||||||
	Field_TYPE_UNKNOWN Field_Kind = 0
 | 
					 | 
				
			||||||
	// Field type double.
 | 
					 | 
				
			||||||
	Field_TYPE_DOUBLE Field_Kind = 1
 | 
					 | 
				
			||||||
	// Field type float.
 | 
					 | 
				
			||||||
	Field_TYPE_FLOAT Field_Kind = 2
 | 
					 | 
				
			||||||
	// Field type int64.
 | 
					 | 
				
			||||||
	Field_TYPE_INT64 Field_Kind = 3
 | 
					 | 
				
			||||||
	// Field type uint64.
 | 
					 | 
				
			||||||
	Field_TYPE_UINT64 Field_Kind = 4
 | 
					 | 
				
			||||||
	// Field type int32.
 | 
					 | 
				
			||||||
	Field_TYPE_INT32 Field_Kind = 5
 | 
					 | 
				
			||||||
	// Field type fixed64.
 | 
					 | 
				
			||||||
	Field_TYPE_FIXED64 Field_Kind = 6
 | 
					 | 
				
			||||||
	// Field type fixed32.
 | 
					 | 
				
			||||||
	Field_TYPE_FIXED32 Field_Kind = 7
 | 
					 | 
				
			||||||
	// Field type bool.
 | 
					 | 
				
			||||||
	Field_TYPE_BOOL Field_Kind = 8
 | 
					 | 
				
			||||||
	// Field type string.
 | 
					 | 
				
			||||||
	Field_TYPE_STRING Field_Kind = 9
 | 
					 | 
				
			||||||
	// Field type group. Proto2 syntax only, and deprecated.
 | 
					 | 
				
			||||||
	Field_TYPE_GROUP Field_Kind = 10
 | 
					 | 
				
			||||||
	// Field type message.
 | 
					 | 
				
			||||||
	Field_TYPE_MESSAGE Field_Kind = 11
 | 
					 | 
				
			||||||
	// Field type bytes.
 | 
					 | 
				
			||||||
	Field_TYPE_BYTES Field_Kind = 12
 | 
					 | 
				
			||||||
	// Field type uint32.
 | 
					 | 
				
			||||||
	Field_TYPE_UINT32 Field_Kind = 13
 | 
					 | 
				
			||||||
	// Field type enum.
 | 
					 | 
				
			||||||
	Field_TYPE_ENUM Field_Kind = 14
 | 
					 | 
				
			||||||
	// Field type sfixed32.
 | 
					 | 
				
			||||||
	Field_TYPE_SFIXED32 Field_Kind = 15
 | 
					 | 
				
			||||||
	// Field type sfixed64.
 | 
					 | 
				
			||||||
	Field_TYPE_SFIXED64 Field_Kind = 16
 | 
					 | 
				
			||||||
	// Field type sint32.
 | 
					 | 
				
			||||||
	Field_TYPE_SINT32 Field_Kind = 17
 | 
					 | 
				
			||||||
	// Field type sint64.
 | 
					 | 
				
			||||||
	Field_TYPE_SINT64 Field_Kind = 18
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var Field_Kind_name = map[int32]string{
 | 
					 | 
				
			||||||
	0:  "TYPE_UNKNOWN",
 | 
					 | 
				
			||||||
	1:  "TYPE_DOUBLE",
 | 
					 | 
				
			||||||
	2:  "TYPE_FLOAT",
 | 
					 | 
				
			||||||
	3:  "TYPE_INT64",
 | 
					 | 
				
			||||||
	4:  "TYPE_UINT64",
 | 
					 | 
				
			||||||
	5:  "TYPE_INT32",
 | 
					 | 
				
			||||||
	6:  "TYPE_FIXED64",
 | 
					 | 
				
			||||||
	7:  "TYPE_FIXED32",
 | 
					 | 
				
			||||||
	8:  "TYPE_BOOL",
 | 
					 | 
				
			||||||
	9:  "TYPE_STRING",
 | 
					 | 
				
			||||||
	10: "TYPE_GROUP",
 | 
					 | 
				
			||||||
	11: "TYPE_MESSAGE",
 | 
					 | 
				
			||||||
	12: "TYPE_BYTES",
 | 
					 | 
				
			||||||
	13: "TYPE_UINT32",
 | 
					 | 
				
			||||||
	14: "TYPE_ENUM",
 | 
					 | 
				
			||||||
	15: "TYPE_SFIXED32",
 | 
					 | 
				
			||||||
	16: "TYPE_SFIXED64",
 | 
					 | 
				
			||||||
	17: "TYPE_SINT32",
 | 
					 | 
				
			||||||
	18: "TYPE_SINT64",
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
var Field_Kind_value = map[string]int32{
 | 
					 | 
				
			||||||
	"TYPE_UNKNOWN":  0,
 | 
					 | 
				
			||||||
	"TYPE_DOUBLE":   1,
 | 
					 | 
				
			||||||
	"TYPE_FLOAT":    2,
 | 
					 | 
				
			||||||
	"TYPE_INT64":    3,
 | 
					 | 
				
			||||||
	"TYPE_UINT64":   4,
 | 
					 | 
				
			||||||
	"TYPE_INT32":    5,
 | 
					 | 
				
			||||||
	"TYPE_FIXED64":  6,
 | 
					 | 
				
			||||||
	"TYPE_FIXED32":  7,
 | 
					 | 
				
			||||||
	"TYPE_BOOL":     8,
 | 
					 | 
				
			||||||
	"TYPE_STRING":   9,
 | 
					 | 
				
			||||||
	"TYPE_GROUP":    10,
 | 
					 | 
				
			||||||
	"TYPE_MESSAGE":  11,
 | 
					 | 
				
			||||||
	"TYPE_BYTES":    12,
 | 
					 | 
				
			||||||
	"TYPE_UINT32":   13,
 | 
					 | 
				
			||||||
	"TYPE_ENUM":     14,
 | 
					 | 
				
			||||||
	"TYPE_SFIXED32": 15,
 | 
					 | 
				
			||||||
	"TYPE_SFIXED64": 16,
 | 
					 | 
				
			||||||
	"TYPE_SINT32":   17,
 | 
					 | 
				
			||||||
	"TYPE_SINT64":   18,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (x Field_Kind) String() string {
 | 
					 | 
				
			||||||
	return proto.EnumName(Field_Kind_name, int32(x))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
func (Field_Kind) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{1, 0} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Whether a field is optional, required, or repeated.
 | 
					 | 
				
			||||||
type Field_Cardinality int32
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
const (
 | 
					 | 
				
			||||||
	// For fields with unknown cardinality.
 | 
					 | 
				
			||||||
	Field_CARDINALITY_UNKNOWN Field_Cardinality = 0
 | 
					 | 
				
			||||||
	// For optional fields.
 | 
					 | 
				
			||||||
	Field_CARDINALITY_OPTIONAL Field_Cardinality = 1
 | 
					 | 
				
			||||||
	// For required fields. Proto2 syntax only.
 | 
					 | 
				
			||||||
	Field_CARDINALITY_REQUIRED Field_Cardinality = 2
 | 
					 | 
				
			||||||
	// For repeated fields.
 | 
					 | 
				
			||||||
	Field_CARDINALITY_REPEATED Field_Cardinality = 3
 | 
					 | 
				
			||||||
)
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var Field_Cardinality_name = map[int32]string{
 | 
					 | 
				
			||||||
	0: "CARDINALITY_UNKNOWN",
 | 
					 | 
				
			||||||
	1: "CARDINALITY_OPTIONAL",
 | 
					 | 
				
			||||||
	2: "CARDINALITY_REQUIRED",
 | 
					 | 
				
			||||||
	3: "CARDINALITY_REPEATED",
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
var Field_Cardinality_value = map[string]int32{
 | 
					 | 
				
			||||||
	"CARDINALITY_UNKNOWN":  0,
 | 
					 | 
				
			||||||
	"CARDINALITY_OPTIONAL": 1,
 | 
					 | 
				
			||||||
	"CARDINALITY_REQUIRED": 2,
 | 
					 | 
				
			||||||
	"CARDINALITY_REPEATED": 3,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (x Field_Cardinality) String() string {
 | 
					 | 
				
			||||||
	return proto.EnumName(Field_Cardinality_name, int32(x))
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
func (Field_Cardinality) EnumDescriptor() ([]byte, []int) { return fileDescriptor8, []int{1, 1} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// A protocol buffer message type.
 | 
					 | 
				
			||||||
type Type struct {
 | 
					 | 
				
			||||||
	// The fully qualified message name.
 | 
					 | 
				
			||||||
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
 | 
					 | 
				
			||||||
	// The list of fields.
 | 
					 | 
				
			||||||
	Fields []*Field `protobuf:"bytes,2,rep,name=fields" json:"fields,omitempty"`
 | 
					 | 
				
			||||||
	// The list of types appearing in `oneof` definitions in this type.
 | 
					 | 
				
			||||||
	Oneofs []string `protobuf:"bytes,3,rep,name=oneofs" json:"oneofs,omitempty"`
 | 
					 | 
				
			||||||
	// The protocol buffer options.
 | 
					 | 
				
			||||||
	Options []*Option `protobuf:"bytes,4,rep,name=options" json:"options,omitempty"`
 | 
					 | 
				
			||||||
	// The source context.
 | 
					 | 
				
			||||||
	SourceContext *SourceContext `protobuf:"bytes,5,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"`
 | 
					 | 
				
			||||||
	// The source syntax.
 | 
					 | 
				
			||||||
	Syntax Syntax `protobuf:"varint,6,opt,name=syntax,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Type) Reset()                    { *m = Type{} }
 | 
					 | 
				
			||||||
func (m *Type) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Type) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Type) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{0} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Type) GetFields() []*Field {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Fields
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Type) GetOptions() []*Option {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Options
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Type) GetSourceContext() *SourceContext {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.SourceContext
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// A single field of a message type.
 | 
					 | 
				
			||||||
type Field struct {
 | 
					 | 
				
			||||||
	// The field type.
 | 
					 | 
				
			||||||
	Kind Field_Kind `protobuf:"varint,1,opt,name=kind,enum=google.protobuf.Field_Kind" json:"kind,omitempty"`
 | 
					 | 
				
			||||||
	// The field cardinality.
 | 
					 | 
				
			||||||
	Cardinality Field_Cardinality `protobuf:"varint,2,opt,name=cardinality,enum=google.protobuf.Field_Cardinality" json:"cardinality,omitempty"`
 | 
					 | 
				
			||||||
	// The field number.
 | 
					 | 
				
			||||||
	Number int32 `protobuf:"varint,3,opt,name=number" json:"number,omitempty"`
 | 
					 | 
				
			||||||
	// The field name.
 | 
					 | 
				
			||||||
	Name string `protobuf:"bytes,4,opt,name=name" json:"name,omitempty"`
 | 
					 | 
				
			||||||
	// The field type URL, without the scheme, for message or enumeration
 | 
					 | 
				
			||||||
	// types. Example: `"type.googleapis.com/google.protobuf.Timestamp"`.
 | 
					 | 
				
			||||||
	TypeUrl string `protobuf:"bytes,6,opt,name=type_url,json=typeUrl" json:"type_url,omitempty"`
 | 
					 | 
				
			||||||
	// The index of the field type in `Type.oneofs`, for message or enumeration
 | 
					 | 
				
			||||||
	// types. The first type has index 1; zero means the type is not in the list.
 | 
					 | 
				
			||||||
	OneofIndex int32 `protobuf:"varint,7,opt,name=oneof_index,json=oneofIndex" json:"oneof_index,omitempty"`
 | 
					 | 
				
			||||||
	// Whether to use alternative packed wire representation.
 | 
					 | 
				
			||||||
	Packed bool `protobuf:"varint,8,opt,name=packed" json:"packed,omitempty"`
 | 
					 | 
				
			||||||
	// The protocol buffer options.
 | 
					 | 
				
			||||||
	Options []*Option `protobuf:"bytes,9,rep,name=options" json:"options,omitempty"`
 | 
					 | 
				
			||||||
	// The field JSON name.
 | 
					 | 
				
			||||||
	JsonName string `protobuf:"bytes,10,opt,name=json_name,json=jsonName" json:"json_name,omitempty"`
 | 
					 | 
				
			||||||
	// The string value of the default value of this field. Proto2 syntax only.
 | 
					 | 
				
			||||||
	DefaultValue string `protobuf:"bytes,11,opt,name=default_value,json=defaultValue" json:"default_value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Field) Reset()                    { *m = Field{} }
 | 
					 | 
				
			||||||
func (m *Field) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Field) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Field) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{1} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Field) GetOptions() []*Option {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Options
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Enum type definition.
 | 
					 | 
				
			||||||
type Enum struct {
 | 
					 | 
				
			||||||
	// Enum type name.
 | 
					 | 
				
			||||||
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
 | 
					 | 
				
			||||||
	// Enum value definitions.
 | 
					 | 
				
			||||||
	Enumvalue []*EnumValue `protobuf:"bytes,2,rep,name=enumvalue" json:"enumvalue,omitempty"`
 | 
					 | 
				
			||||||
	// Protocol buffer options.
 | 
					 | 
				
			||||||
	Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
 | 
					 | 
				
			||||||
	// The source context.
 | 
					 | 
				
			||||||
	SourceContext *SourceContext `protobuf:"bytes,4,opt,name=source_context,json=sourceContext" json:"source_context,omitempty"`
 | 
					 | 
				
			||||||
	// The source syntax.
 | 
					 | 
				
			||||||
	Syntax Syntax `protobuf:"varint,5,opt,name=syntax,enum=google.protobuf.Syntax" json:"syntax,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Enum) Reset()                    { *m = Enum{} }
 | 
					 | 
				
			||||||
func (m *Enum) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Enum) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Enum) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{2} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Enum) GetEnumvalue() []*EnumValue {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Enumvalue
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Enum) GetOptions() []*Option {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Options
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Enum) GetSourceContext() *SourceContext {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.SourceContext
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Enum value definition.
 | 
					 | 
				
			||||||
type EnumValue struct {
 | 
					 | 
				
			||||||
	// Enum value name.
 | 
					 | 
				
			||||||
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
 | 
					 | 
				
			||||||
	// Enum value number.
 | 
					 | 
				
			||||||
	Number int32 `protobuf:"varint,2,opt,name=number" json:"number,omitempty"`
 | 
					 | 
				
			||||||
	// Protocol buffer options.
 | 
					 | 
				
			||||||
	Options []*Option `protobuf:"bytes,3,rep,name=options" json:"options,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *EnumValue) Reset()                    { *m = EnumValue{} }
 | 
					 | 
				
			||||||
func (m *EnumValue) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*EnumValue) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*EnumValue) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{3} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *EnumValue) GetOptions() []*Option {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Options
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// A protocol buffer option, which can be attached to a message, field,
 | 
					 | 
				
			||||||
// enumeration, etc.
 | 
					 | 
				
			||||||
type Option struct {
 | 
					 | 
				
			||||||
	// The option's name. For example, `"java_package"`.
 | 
					 | 
				
			||||||
	Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
 | 
					 | 
				
			||||||
	// The option's value. For example, `"com.google.protobuf"`.
 | 
					 | 
				
			||||||
	Value *Any `protobuf:"bytes,2,opt,name=value" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Option) Reset()                    { *m = Option{} }
 | 
					 | 
				
			||||||
func (m *Option) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Option) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Option) Descriptor() ([]byte, []int) { return fileDescriptor8, []int{4} }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Option) GetValue() *Any {
 | 
					 | 
				
			||||||
	if m != nil {
 | 
					 | 
				
			||||||
		return m.Value
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
	return nil
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	proto.RegisterType((*Type)(nil), "google.protobuf.Type")
 | 
					 | 
				
			||||||
	proto.RegisterType((*Field)(nil), "google.protobuf.Field")
 | 
					 | 
				
			||||||
	proto.RegisterType((*Enum)(nil), "google.protobuf.Enum")
 | 
					 | 
				
			||||||
	proto.RegisterType((*EnumValue)(nil), "google.protobuf.EnumValue")
 | 
					 | 
				
			||||||
	proto.RegisterType((*Option)(nil), "google.protobuf.Option")
 | 
					 | 
				
			||||||
	proto.RegisterEnum("google.protobuf.Syntax", Syntax_name, Syntax_value)
 | 
					 | 
				
			||||||
	proto.RegisterEnum("google.protobuf.Field_Kind", Field_Kind_name, Field_Kind_value)
 | 
					 | 
				
			||||||
	proto.RegisterEnum("google.protobuf.Field_Cardinality", Field_Cardinality_name, Field_Cardinality_value)
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() { proto.RegisterFile("google/protobuf/type.proto", fileDescriptor8) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var fileDescriptor8 = []byte{
 | 
					 | 
				
			||||||
	// 768 bytes of a gzipped FileDescriptorProto
 | 
					 | 
				
			||||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xa4, 0x55, 0xcd, 0x6e, 0xda, 0x58,
 | 
					 | 
				
			||||||
	0x14, 0x1e, 0x83, 0x31, 0xf8, 0x38, 0x10, 0xe7, 0x26, 0x4a, 0x1c, 0x22, 0x65, 0x22, 0x66, 0x16,
 | 
					 | 
				
			||||||
	0x51, 0x16, 0x44, 0x43, 0x46, 0xa3, 0xd9, 0x42, 0x70, 0x18, 0x2b, 0xc4, 0xf6, 0x5c, 0x4c, 0x13,
 | 
					 | 
				
			||||||
	0x56, 0xc8, 0x01, 0x13, 0x91, 0x38, 0x36, 0xc2, 0xa6, 0x0d, 0x0f, 0xd1, 0x77, 0xa8, 0xba, 0xec,
 | 
					 | 
				
			||||||
	0xba, 0x0f, 0xd1, 0xb7, 0x6a, 0xef, 0xbd, 0x06, 0x63, 0x7e, 0x2a, 0xa5, 0xed, 0x8e, 0xf3, 0x7d,
 | 
					 | 
				
			||||||
	0xdf, 0xf9, 0xbd, 0xc7, 0x07, 0x28, 0x3e, 0xf8, 0xfe, 0x83, 0xeb, 0x9c, 0x8f, 0xc6, 0x7e, 0xe8,
 | 
					 | 
				
			||||||
	0xdf, 0x4f, 0x06, 0xe7, 0xe1, 0x74, 0xe4, 0x94, 0x99, 0x85, 0xb6, 0x23, 0xae, 0x3c, 0xe7, 0x8a,
 | 
					 | 
				
			||||||
	0x87, 0xab, 0x62, 0xdb, 0x9b, 0x46, 0x6c, 0xf1, 0xcf, 0x55, 0x2a, 0xf0, 0x27, 0xe3, 0x9e, 0xd3,
 | 
					 | 
				
			||||||
	0xed, 0xf9, 0x5e, 0xe8, 0xbc, 0x84, 0x91, 0xaa, 0xf4, 0x3e, 0x05, 0xbc, 0x45, 0x12, 0x20, 0x04,
 | 
					 | 
				
			||||||
	0xbc, 0x67, 0x3f, 0x3b, 0x0a, 0x77, 0xc2, 0x9d, 0x8a, 0x98, 0xfd, 0x46, 0x65, 0x10, 0x06, 0x43,
 | 
					 | 
				
			||||||
	0xc7, 0xed, 0x07, 0x4a, 0xea, 0x24, 0x7d, 0x2a, 0x55, 0xf6, 0xcb, 0x2b, 0xf9, 0xcb, 0x57, 0x94,
 | 
					 | 
				
			||||||
	0xc6, 0x33, 0x15, 0xda, 0x07, 0xc1, 0xf7, 0x1c, 0x7f, 0x10, 0x28, 0x69, 0xa2, 0x17, 0xf1, 0xcc,
 | 
					 | 
				
			||||||
	0x42, 0x7f, 0x41, 0xd6, 0x1f, 0x85, 0x43, 0xdf, 0x0b, 0x14, 0x9e, 0x05, 0x3a, 0x58, 0x0b, 0x64,
 | 
					 | 
				
			||||||
	0x30, 0x1e, 0xcf, 0x75, 0x48, 0x85, 0xc2, 0x72, 0xbd, 0x4a, 0x86, 0x14, 0x26, 0x55, 0x8e, 0xd7,
 | 
					 | 
				
			||||||
	0x3c, 0x5b, 0x4c, 0x76, 0x19, 0xa9, 0x70, 0x3e, 0x48, 0x9a, 0xe8, 0x1c, 0x84, 0x60, 0xea, 0x85,
 | 
					 | 
				
			||||||
	0xf6, 0x8b, 0x22, 0x10, 0xf7, 0xc2, 0x86, 0xc4, 0x2d, 0x46, 0xe3, 0x99, 0xac, 0xf4, 0x59, 0x80,
 | 
					 | 
				
			||||||
	0x0c, 0x6b, 0x8a, 0xb8, 0xf2, 0x4f, 0x43, 0xaf, 0xcf, 0x06, 0x52, 0xa8, 0x1c, 0x6d, 0x6e, 0xbd,
 | 
					 | 
				
			||||||
	0x7c, 0x4d, 0x24, 0x98, 0x09, 0x51, 0x1d, 0xa4, 0x9e, 0x3d, 0xee, 0x0f, 0x3d, 0xdb, 0x1d, 0x86,
 | 
					 | 
				
			||||||
	0x53, 0x32, 0x32, 0xea, 0x57, 0xfa, 0x8e, 0xdf, 0xe5, 0x42, 0x89, 0x93, 0x6e, 0x74, 0x86, 0xde,
 | 
					 | 
				
			||||||
	0xe4, 0xf9, 0xde, 0x19, 0x93, 0x19, 0x72, 0xa7, 0x19, 0x3c, 0xb3, 0xe2, 0xf7, 0xe1, 0x13, 0xef,
 | 
					 | 
				
			||||||
	0x73, 0x08, 0x39, 0xba, 0x1c, 0xdd, 0xc9, 0xd8, 0x65, 0xfd, 0x89, 0x38, 0x4b, 0xed, 0xf6, 0xd8,
 | 
					 | 
				
			||||||
	0x45, 0xbf, 0x83, 0xc4, 0x86, 0xdf, 0x25, 0x95, 0x39, 0x2f, 0x4a, 0x96, 0xc5, 0x02, 0x06, 0x69,
 | 
					 | 
				
			||||||
	0x14, 0xa1, 0x79, 0x46, 0x76, 0xef, 0xc9, 0xe9, 0x2b, 0x39, 0xc2, 0xe5, 0xf0, 0xcc, 0x4a, 0xbe,
 | 
					 | 
				
			||||||
	0x95, 0xf8, 0xca, 0xb7, 0x3a, 0x02, 0xf1, 0x31, 0xf0, 0xbd, 0x2e, 0xab, 0x0f, 0x58, 0x1d, 0x39,
 | 
					 | 
				
			||||||
	0x0a, 0xe8, 0xb4, 0xc6, 0x3f, 0x20, 0xdf, 0x77, 0x06, 0xf6, 0xc4, 0x0d, 0xbb, 0x6f, 0x6d, 0x77,
 | 
					 | 
				
			||||||
	0xe2, 0x28, 0x12, 0x13, 0x6c, 0xcd, 0xc0, 0x37, 0x14, 0x2b, 0x7d, 0x21, 0x5b, 0x48, 0x27, 0x89,
 | 
					 | 
				
			||||||
	0x64, 0xd8, 0xb2, 0x3a, 0xa6, 0xda, 0x6d, 0xeb, 0xd7, 0xba, 0x71, 0xab, 0xcb, 0xbf, 0xa1, 0x6d,
 | 
					 | 
				
			||||||
	0x90, 0x18, 0x52, 0x37, 0xda, 0xb5, 0xa6, 0x2a, 0x73, 0xa8, 0x00, 0xc0, 0x80, 0xab, 0xa6, 0x51,
 | 
					 | 
				
			||||||
	0xb5, 0xe4, 0x54, 0x6c, 0x6b, 0xba, 0xf5, 0xcf, 0xdf, 0x72, 0x3a, 0x76, 0x68, 0x47, 0x00, 0x9f,
 | 
					 | 
				
			||||||
	0x14, 0x5c, 0x54, 0xe4, 0x4c, 0x9c, 0xe3, 0x4a, 0xbb, 0x53, 0xeb, 0x44, 0x21, 0x2c, 0x23, 0x44,
 | 
					 | 
				
			||||||
	0x93, 0x45, 0x79, 0x10, 0x19, 0x52, 0x33, 0x8c, 0xa6, 0x9c, 0x8b, 0x63, 0xb6, 0x2c, 0xac, 0xe9,
 | 
					 | 
				
			||||||
	0x0d, 0x59, 0x8c, 0x63, 0x36, 0xb0, 0xd1, 0x36, 0x65, 0x88, 0x23, 0xdc, 0xa8, 0xad, 0x56, 0xb5,
 | 
					 | 
				
			||||||
	0xa1, 0xca, 0x52, 0xac, 0xa8, 0x75, 0x2c, 0xb5, 0x25, 0x6f, 0x2d, 0x95, 0x45, 0x52, 0xe4, 0xe3,
 | 
					 | 
				
			||||||
	0x14, 0xaa, 0xde, 0xbe, 0x91, 0x0b, 0x68, 0x07, 0xf2, 0x51, 0x8a, 0x79, 0x11, 0xdb, 0x2b, 0x10,
 | 
					 | 
				
			||||||
	0xa9, 0x54, 0x5e, 0x14, 0x12, 0x45, 0xd9, 0x59, 0x02, 0x88, 0x02, 0x95, 0x42, 0x90, 0x12, 0xbb,
 | 
					 | 
				
			||||||
	0x85, 0x0e, 0x60, 0xf7, 0xb2, 0x8a, 0xeb, 0x9a, 0x5e, 0x6d, 0x6a, 0x56, 0x27, 0x31, 0x57, 0x05,
 | 
					 | 
				
			||||||
	0xf6, 0x92, 0x84, 0x61, 0x5a, 0x9a, 0x41, 0x7e, 0x93, 0x01, 0xaf, 0x30, 0x58, 0xfd, 0xbf, 0xad,
 | 
					 | 
				
			||||||
	0x61, 0xb5, 0x4e, 0x46, 0xbd, 0xc6, 0x98, 0x6a, 0xd5, 0x22, 0x4c, 0xba, 0xf4, 0x95, 0x03, 0x5e,
 | 
					 | 
				
			||||||
	0x25, 0x9b, 0xba, 0xf1, 0x8c, 0xfc, 0x0b, 0xa2, 0x43, 0xb8, 0xe8, 0xf9, 0xa3, 0x4b, 0x52, 0x5c,
 | 
					 | 
				
			||||||
	0x5b, 0x2a, 0xea, 0xcd, 0x96, 0x01, 0x2f, 0xc4, 0xc9, 0x65, 0x4c, 0xff, 0xf4, 0xe1, 0xe0, 0x7f,
 | 
					 | 
				
			||||||
	0xed, 0x70, 0x64, 0x5e, 0x77, 0x38, 0x1e, 0x41, 0x8c, 0x5b, 0xd8, 0x38, 0x85, 0xc5, 0x87, 0x9d,
 | 
					 | 
				
			||||||
	0x5a, 0xfa, 0xb0, 0x7f, 0xbc, 0xc7, 0xd2, 0x7f, 0x20, 0x44, 0xd0, 0xc6, 0x44, 0x67, 0x90, 0x99,
 | 
					 | 
				
			||||||
	0x8f, 0x9a, 0x36, 0xbe, 0xb7, 0x16, 0xae, 0xea, 0x4d, 0x71, 0x24, 0x39, 0x23, 0x17, 0x3e, 0xea,
 | 
					 | 
				
			||||||
	0x83, 0x2e, 0x5b, 0xab, 0xa3, 0x5b, 0xd5, 0xbb, 0xae, 0x89, 0x0d, 0xcb, 0xa8, 0x90, 0x15, 0x59,
 | 
					 | 
				
			||||||
	0x81, 0x2e, 0x64, 0xae, 0xd6, 0x84, 0xdd, 0x9e, 0xff, 0xbc, 0x1a, 0xb1, 0x26, 0xd2, 0xbf, 0x10,
 | 
					 | 
				
			||||||
	0x93, 0x5a, 0x26, 0xf7, 0x81, 0xe3, 0x3e, 0xa6, 0xd2, 0x0d, 0xb3, 0xf6, 0x29, 0x75, 0xdc, 0x88,
 | 
					 | 
				
			||||||
	0x74, 0xe6, 0x3c, 0xf3, 0xad, 0xe3, 0xba, 0xd7, 0x9e, 0xff, 0xce, 0xa3, 0xfa, 0xe0, 0x5e, 0x60,
 | 
					 | 
				
			||||||
	0x01, 0x2e, 0xbe, 0x05, 0x00, 0x00, 0xff, 0xff, 0x95, 0xbb, 0xeb, 0x52, 0xf3, 0x06, 0x00, 0x00,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
							
								
								
									
										173
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/wrappers.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							
							
						
						
									
										173
									
								
								vendor/go.pedge.io/pb/go/google/protobuf/wrappers.pb.go
									
									
									
										generated
									
									
										vendored
									
									
								
							@@ -1,173 +0,0 @@
 | 
				
			|||||||
// Code generated by protoc-gen-go.
 | 
					 | 
				
			||||||
// source: google/protobuf/wrappers.proto
 | 
					 | 
				
			||||||
// DO NOT EDIT!
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
package google_protobuf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import proto "github.com/golang/protobuf/proto"
 | 
					 | 
				
			||||||
import fmt "fmt"
 | 
					 | 
				
			||||||
import math "math"
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Reference imports to suppress errors if they are not otherwise used.
 | 
					 | 
				
			||||||
var _ = proto.Marshal
 | 
					 | 
				
			||||||
var _ = fmt.Errorf
 | 
					 | 
				
			||||||
var _ = math.Inf
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Wrapper message for `double`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `DoubleValue` is JSON number.
 | 
					 | 
				
			||||||
type DoubleValue struct {
 | 
					 | 
				
			||||||
	// The double value.
 | 
					 | 
				
			||||||
	Value float64 `protobuf:"fixed64,1,opt,name=value" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *DoubleValue) Reset()                    { *m = DoubleValue{} }
 | 
					 | 
				
			||||||
func (m *DoubleValue) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*DoubleValue) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*DoubleValue) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{0} }
 | 
					 | 
				
			||||||
func (*DoubleValue) XXX_WellKnownType() string   { return "DoubleValue" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Wrapper message for `float`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `FloatValue` is JSON number.
 | 
					 | 
				
			||||||
type FloatValue struct {
 | 
					 | 
				
			||||||
	// The float value.
 | 
					 | 
				
			||||||
	Value float32 `protobuf:"fixed32,1,opt,name=value" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *FloatValue) Reset()                    { *m = FloatValue{} }
 | 
					 | 
				
			||||||
func (m *FloatValue) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*FloatValue) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*FloatValue) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{1} }
 | 
					 | 
				
			||||||
func (*FloatValue) XXX_WellKnownType() string   { return "FloatValue" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Wrapper message for `int64`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `Int64Value` is JSON string.
 | 
					 | 
				
			||||||
type Int64Value struct {
 | 
					 | 
				
			||||||
	// The int64 value.
 | 
					 | 
				
			||||||
	Value int64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Int64Value) Reset()                    { *m = Int64Value{} }
 | 
					 | 
				
			||||||
func (m *Int64Value) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Int64Value) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Int64Value) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{2} }
 | 
					 | 
				
			||||||
func (*Int64Value) XXX_WellKnownType() string   { return "Int64Value" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Wrapper message for `uint64`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `UInt64Value` is JSON string.
 | 
					 | 
				
			||||||
type UInt64Value struct {
 | 
					 | 
				
			||||||
	// The uint64 value.
 | 
					 | 
				
			||||||
	Value uint64 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *UInt64Value) Reset()                    { *m = UInt64Value{} }
 | 
					 | 
				
			||||||
func (m *UInt64Value) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*UInt64Value) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*UInt64Value) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{3} }
 | 
					 | 
				
			||||||
func (*UInt64Value) XXX_WellKnownType() string   { return "UInt64Value" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Wrapper message for `int32`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `Int32Value` is JSON number.
 | 
					 | 
				
			||||||
type Int32Value struct {
 | 
					 | 
				
			||||||
	// The int32 value.
 | 
					 | 
				
			||||||
	Value int32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *Int32Value) Reset()                    { *m = Int32Value{} }
 | 
					 | 
				
			||||||
func (m *Int32Value) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*Int32Value) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*Int32Value) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{4} }
 | 
					 | 
				
			||||||
func (*Int32Value) XXX_WellKnownType() string   { return "Int32Value" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Wrapper message for `uint32`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `UInt32Value` is JSON number.
 | 
					 | 
				
			||||||
type UInt32Value struct {
 | 
					 | 
				
			||||||
	// The uint32 value.
 | 
					 | 
				
			||||||
	Value uint32 `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *UInt32Value) Reset()                    { *m = UInt32Value{} }
 | 
					 | 
				
			||||||
func (m *UInt32Value) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*UInt32Value) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*UInt32Value) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{5} }
 | 
					 | 
				
			||||||
func (*UInt32Value) XXX_WellKnownType() string   { return "UInt32Value" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Wrapper message for `bool`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `BoolValue` is JSON `true` and `false`.
 | 
					 | 
				
			||||||
type BoolValue struct {
 | 
					 | 
				
			||||||
	// The bool value.
 | 
					 | 
				
			||||||
	Value bool `protobuf:"varint,1,opt,name=value" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *BoolValue) Reset()                    { *m = BoolValue{} }
 | 
					 | 
				
			||||||
func (m *BoolValue) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*BoolValue) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*BoolValue) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{6} }
 | 
					 | 
				
			||||||
func (*BoolValue) XXX_WellKnownType() string   { return "BoolValue" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Wrapper message for `string`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `StringValue` is JSON string.
 | 
					 | 
				
			||||||
type StringValue struct {
 | 
					 | 
				
			||||||
	// The string value.
 | 
					 | 
				
			||||||
	Value string `protobuf:"bytes,1,opt,name=value" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *StringValue) Reset()                    { *m = StringValue{} }
 | 
					 | 
				
			||||||
func (m *StringValue) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*StringValue) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*StringValue) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{7} }
 | 
					 | 
				
			||||||
func (*StringValue) XXX_WellKnownType() string   { return "StringValue" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Wrapper message for `bytes`.
 | 
					 | 
				
			||||||
//
 | 
					 | 
				
			||||||
// The JSON representation for `BytesValue` is JSON string.
 | 
					 | 
				
			||||||
type BytesValue struct {
 | 
					 | 
				
			||||||
	// The bytes value.
 | 
					 | 
				
			||||||
	Value []byte `protobuf:"bytes,1,opt,name=value,proto3" json:"value,omitempty"`
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func (m *BytesValue) Reset()                    { *m = BytesValue{} }
 | 
					 | 
				
			||||||
func (m *BytesValue) String() string            { return proto.CompactTextString(m) }
 | 
					 | 
				
			||||||
func (*BytesValue) ProtoMessage()               {}
 | 
					 | 
				
			||||||
func (*BytesValue) Descriptor() ([]byte, []int) { return fileDescriptor9, []int{8} }
 | 
					 | 
				
			||||||
func (*BytesValue) XXX_WellKnownType() string   { return "BytesValue" }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() {
 | 
					 | 
				
			||||||
	proto.RegisterType((*DoubleValue)(nil), "google.protobuf.DoubleValue")
 | 
					 | 
				
			||||||
	proto.RegisterType((*FloatValue)(nil), "google.protobuf.FloatValue")
 | 
					 | 
				
			||||||
	proto.RegisterType((*Int64Value)(nil), "google.protobuf.Int64Value")
 | 
					 | 
				
			||||||
	proto.RegisterType((*UInt64Value)(nil), "google.protobuf.UInt64Value")
 | 
					 | 
				
			||||||
	proto.RegisterType((*Int32Value)(nil), "google.protobuf.Int32Value")
 | 
					 | 
				
			||||||
	proto.RegisterType((*UInt32Value)(nil), "google.protobuf.UInt32Value")
 | 
					 | 
				
			||||||
	proto.RegisterType((*BoolValue)(nil), "google.protobuf.BoolValue")
 | 
					 | 
				
			||||||
	proto.RegisterType((*StringValue)(nil), "google.protobuf.StringValue")
 | 
					 | 
				
			||||||
	proto.RegisterType((*BytesValue)(nil), "google.protobuf.BytesValue")
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
func init() { proto.RegisterFile("google/protobuf/wrappers.proto", fileDescriptor9) }
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
var fileDescriptor9 = []byte{
 | 
					 | 
				
			||||||
	// 233 bytes of a gzipped FileDescriptorProto
 | 
					 | 
				
			||||||
	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x09, 0x6e, 0x88, 0x02, 0xff, 0xe2, 0x92, 0x4b, 0xcf, 0xcf, 0x4f,
 | 
					 | 
				
			||||||
	0xcf, 0x49, 0xd5, 0x2f, 0x28, 0xca, 0x2f, 0xc9, 0x4f, 0x2a, 0x4d, 0xd3, 0x2f, 0x2f, 0x4a, 0x2c,
 | 
					 | 
				
			||||||
	0x28, 0x48, 0x2d, 0x2a, 0xd6, 0x03, 0x8b, 0x08, 0xf1, 0x43, 0xe4, 0xf5, 0x60, 0xf2, 0x4a, 0xca,
 | 
					 | 
				
			||||||
	0x5c, 0xdc, 0x2e, 0xf9, 0xa5, 0x49, 0x39, 0xa9, 0x61, 0x89, 0x39, 0xa5, 0xa9, 0x42, 0x22, 0x5c,
 | 
					 | 
				
			||||||
	0xac, 0x65, 0x20, 0x86, 0x04, 0xa3, 0x02, 0xa3, 0x06, 0x63, 0x10, 0x84, 0xa3, 0xa4, 0xc4, 0xc5,
 | 
					 | 
				
			||||||
	0xe5, 0x96, 0x93, 0x9f, 0x58, 0x82, 0x45, 0x0d, 0x13, 0x92, 0x1a, 0xcf, 0xbc, 0x12, 0x33, 0x13,
 | 
					 | 
				
			||||||
	0x2c, 0x6a, 0x98, 0x61, 0x6a, 0x80, 0x96, 0x85, 0xe2, 0x52, 0xc4, 0x82, 0x6a, 0x90, 0xb1, 0x11,
 | 
					 | 
				
			||||||
	0x16, 0x35, 0xac, 0x68, 0x06, 0x61, 0x55, 0xc4, 0x0b, 0x53, 0xa4, 0xc8, 0xc5, 0xe9, 0x94, 0x9f,
 | 
					 | 
				
			||||||
	0x9f, 0x83, 0x45, 0x09, 0x07, 0x92, 0x39, 0xc1, 0x25, 0x45, 0x99, 0x79, 0xe9, 0x58, 0x14, 0x71,
 | 
					 | 
				
			||||||
	0x22, 0x39, 0xc8, 0xa9, 0xb2, 0x24, 0xb5, 0x18, 0x8b, 0x1a, 0x1e, 0xa8, 0x1a, 0xa7, 0x60, 0x2e,
 | 
					 | 
				
			||||||
	0xe1, 0xe4, 0xfc, 0x5c, 0x3d, 0xb4, 0xd0, 0x75, 0xe2, 0x0d, 0x87, 0x06, 0x7f, 0x00, 0x48, 0x24,
 | 
					 | 
				
			||||||
	0x80, 0x71, 0x01, 0x23, 0xe3, 0x0f, 0x46, 0xc6, 0x45, 0x4c, 0xcc, 0xee, 0x01, 0x4e, 0xab, 0x98,
 | 
					 | 
				
			||||||
	0xe4, 0xdc, 0x21, 0xca, 0x03, 0xa0, 0xca, 0xf5, 0xc2, 0x53, 0x73, 0x72, 0xbc, 0xf3, 0xf2, 0xcb,
 | 
					 | 
				
			||||||
	0xf3, 0x42, 0x2a, 0x0b, 0x52, 0x8b, 0x93, 0xd8, 0xc0, 0xe6, 0x18, 0x03, 0x02, 0x00, 0x00, 0xff,
 | 
					 | 
				
			||||||
	0xff, 0xd8, 0xa5, 0x6f, 0xc9, 0xd5, 0x01, 0x00, 0x00,
 | 
					 | 
				
			||||||
}
 | 
					 | 
				
			||||||
		Reference in New Issue
	
	Block a user